body1
stringlengths 20
4.1k
| body2
stringlengths 23
4.09k
|
---|---|
Some time ago I created these two questions: "" and "". The first one is mor general, the second one refers to a concrete way of the solution. Anyway, the questions don't duplicate each other. Now I've finally found a solution for the second question and it's also a possible solution for the first one. I want to post it as answer. Is it allowed to post the same solution for diferent questions? If not -- why? | Let's say there is a user who has found a satisfactory answer to a common question asked on Stack Overflow (or other Stack Exchange website). This answer may be a snippet of code, or an addon, or a framework, or something else. Is it acceptable for this user to formulate an answer for one question, find every related question and then copy the exact answer to each of those questions? And, if not, what should users who finds themselves in this situation do? |
Let $\mathbb{Z}[\zeta]=\{a+b\zeta:a,b\in\mathbb Z\} $, and $\zeta=e^{\frac{2\pi i}{3}}=\frac{-1}2+\frac{\sqrt{3}}{2}i$, ($\zeta^3=1$) Define the norm $N:\mathbb Z[\zeta]\rightarrow \mathbb Z$ by $N(a+b\zeta)=a^2+b^2-ab$ I need to show that $\alpha$ is a unit iff $N(\alpha)=1$.($\alpha=a+b\zeta$) and finding all the units I showed $\Rightarrow$, now if $N(\alpha)=1$, then $a^2+b^2-ab=1$, so clearly if $a=b=\pm 1, a=\pm 1\ \& \ b=0, and \ a=0\ \& \ b=\pm 1$ I need another method that is not involving the calculations of the units. In fact, I need to write the general form of $\alpha^{-1}$, so I can confirm it is a unit. | On page 230 of Dummit and Foote's Abstract Algebra, they say: the units of $\mathbb{Z}\left[\frac{1+\sqrt{-3}}{2}\right]$ are determined by the integers $a,b$ with $a^2+ab+b^2=\pm1$ i.e. with $(2a+b)^2+3b^2=4$, from which is is easy to see the group of units is a group of order $6$ given by $\{\pm1,\pm\rho,\pm\rho^2\}$ where $\rho=\frac{-1+\sqrt{-3}}{2}$. First, why change the characterization of unit from integers solutions of $a^2+ab+b^2=\pm1$ to integers solutions of $(2a+b)^2+3b^2=4$? How did they arrive at their answer? |
/Downloads/vmd-1.9.2/src$ make install cp: cannot create regular file ‘/usr/local/lib/vmd/Announcement’: Permission denied cp: cannot create regular file ‘/usr/local/lib/vmd/README’: Permission denied cp: cannot create regular file ‘/usr/local/lib/vmd/LICENSE’: Permission denied cp: cannot create regular file ‘/usr/local/lib/vmd/doc/ug.pdf’: Permission denied cp: cannot stat ‘../LINUXAMD64/vmd_LINUXAMD64’: No such file or directory cp: cannot stat ‘../lib/stride/stride_LINUXAMD64’: No such file or directory cp: cannot stat ‘../lib/surf/surf_LINUXAMD64’: No such file or directory cp: cannot stat ‘../lib/tachyon/tachyon_LINUXAMD64’: No such file or directory tar: plugins: Cannot stat: No such file or directory tar: Exiting with failure status due to previous errors cp: cannot create regular file ‘/usr/local/lib/vmd/.vmdrc’: Permission denied cp: cannot create regular file ‘/usr/local/lib/vmd/.vmdsensors’: Permission denied cp: cannot create regular file ‘/usr/local/lib/vmd/vmd_completion.dat’: Permission denied Info: /bin/csh shell not found, installing Bourne shell startup script instead cp: cannot create regular file ‘/usr/local/bin/vmd’: Permission denied Make sure /usr/local/bin/vmd is in your path. VMD installation complete. Enjoy! sumit@sumit-Ubuntu:~/Downloads/vmd-1.9.2/src$ vmd rlwrap: Cannot execute /usr/local/lib/vmd/vmd_LINUX: No such file or directory | I have downloaded tar.gz files. But I don't know how to install it. How do I install this kind of file? |
How typical is it for parents to give end-of-school-year gifts to teachers at a private school? If it is usual or frequent, what types of gifts and how expensive? (My 6 yo has 4 teachers for his kindergarden class.) | My 16 year old wants to give her teachers Christmas gifts. She is in 10th grade, so there are quite a number of teachers. As a retired teacher, I do not think teachers need gifts. I would have loved a card or note with a comment or appreciative remarks. I taught special needs students and liked when a parent made snack for the entire class or contributed to the trip fund, but I never needed them to spend their hard-earned money on me. I suggested my kid make cards -- she is very artistic, and add a heartfelt message. She disagrees and wants twenty dollar gift cards, which for the record, she cannot contribute to. We are trying to find a compromise. I think that over $100 is ridiculous. It is also too much to 'lend' my kid. (Deep background, this is not my own daughter but my godchild. When her parents died, I became her guardian. She was 4 when they died. So sometimes she uses that as her trump card. Teens aren't 'easy'.) I said I'd ask what others think. |
I do not want to have Newtonsoft.Json.dll next to my EXE file, so I am wondering if there is any way to include Json.NET to my project without using DLL? | Is it possible to embed a pre-existing DLL into a compiled C# executable (so that you only have one file to distribute)? If it is possible, how would one go about doing it? Normally, I'm cool with just leaving the DLLs outside and having the setup program handle everything, but there have been a couple of people at work who have asked me this and I honestly don't know. |
I am in the final semester of my mechanical engineering bachelors, though I could have finished my bachelors about 4 months ago, but I failed to clear 2 of my subjects, for which I would appear again in the December examination. Physics has always caught my attention, but then, everything I see catches my attention.I want to study physics now after I get my degree. The problem is my grades. I have scored an aggregate of 65% in my bachelors, but I can learn and understand things once I decide to do so. I am from India. How can I apply in foreign universities for MS, considering that they take engineering graduates for MS in physics, what kind of entrance/competitive exams would I have to give. Thanks. | Can I be admitted to graduate school in a different field from my degree? Specific cases include: If I've taken plenty of advanced courses in field X in the process of completing a degree in another field, can I apply to graduate school in X? What if I haven't taken many courses in X, but I have acquired a good grasp of X through self-study or working in a related field? What if I've never studied X, but I have done very well in an unrelated field? Could I be admitted to graduate school in X on the basis of general intellectual promise, and then make up the missing background after enrollment? Note that this question is an attempt to provide a comprehensive answer, to avoid the need for a profusion of field-specific questions on this topic (see the associated ). Please feel free to edit the question or answer to improve them. |
I understand the question may not make sense at first, but I'll explain it here. First, I have the following C++ code, a simple Hello World. #include <stdio.h> #include <stdlib.h> int main() { printf("Hello World "); return(0); } Now I am calling it from within Java using this: long start = System.nanoTime(); Process p = Runtime.getRuntime().exec("/home/name/./test"); long totalTime = System.nanoTime() - start; System.out.println("Time: " + totalTime); After doing this a couple times i get the following output: Time: 8155128 Time: 732204 Time: 508819 Time: 662987 I wonder if this is a correct way to measure the time for the c++ code execution and i am want to know if there is an explanation on why always the first execution shows a time 10X bigger than the others (even if it's nanoseconds) | How do you write (and run) a correct micro-benchmark in Java? I'm looking for some code samples and comments illustrating various things to think about. Example: Should the benchmark measure time/iteration or iterations/time, and why? Related: |
This may be a duplicate, but I did a thorough search and couldn't find it. It would be useful to have the original question visible when composing an answer. I often want to reference the question to use the askers variable names, and check my wording. | Right now in the iOS app, I have to save my answer as a draft in order to view the question. Since I'm often referring back to the question, this is inconvenient and less friendly than the old app (although many other things are improved!) I would love to be able to glance back, either by scrolling up, by showing the Q on the right, or any other means. Thanks for the awesome app and community! |
I am looking for a closed form for the sum below $$ \sum_{k=0}^{r} \frac{1}{2-\delta_{k, r-k}} \binom{n}{k} \binom{n}{r-k} $$ where $\delta_{k, r-k}$ is the Kronecker delta. I'd appreciate any helps in finding a closed-form solution for this sum. To my understanding, this is basically equivalent to finding a closed-form solution to the following problem: Given a set $S$ with size $|S|=n$, what is the number of two-element subsets of $\mathcal{P}(S)$, $\{A, B\} \in \mathcal{P}(S)$ such that $|A|+|B| = r$ for a fixed $r$. I tried to use Wolfram Alpha, but it is given me this for the case where we count ordered pairs $(A, B)$ instead of sets (i.e. the sum if we ignore $\frac{1}{2-\delta_{k, r-k}}$), which contains factorial of a negative integer(!!) (and I don't know how to specify in Wolfram that $n>r>0$ and both are integers): $$ \frac{(-1)^r (-2n+r-1)!}{(-2n-1)!r!} $$ | How can we prove that $$\sum_{k=0}^{n}\binom{R}{k}\binom{M}{n-k}=\binom{R+M}{n}?$$ (Presumptive) Source: Theoretical Exercise 8, Ch 1, A First Course in Probability, 8th ed by Sheldon Ross. |
My family and I are planning a visit to Niagara falls from the USA side. Is it possible to walk over to Canada and back? We are travelling with South African passports, ie, do we need visas for Canada? | We have friends, a married couple from the Dominican Republic, coming to the US on 30-day visas. We are US passport holders, and would like our friends to the Canadian side of Niagara Falls. Are they allowed to enter Canada for a few hours to a day with their DR passports and US visas? Do they need a visa to enter Canada and can they leave the US and re-enter with their 30-day US visas? |
There is an undocumented API /_vti_bin/homeapi.ashx/sites/followed that returns the list of followed sites for the currently logged in user. This one does not seem to be useful due to permission-related limitations. There is also a Graph API endpoint: https://graph.microsoft.com/beta/users/[email protected]/followedSites But it gives me access denied: PnP SharePoint PowerShell Script $AppSecret = 'XXXXX*[ZLq9Q3VFOwXGRm2NSP' $appId = 'fb32c27b-XXXXX-4824-8af0-e8d303553d9e' $AADDomain = 'contosoTenant.onmicrosoft.com' Connect-PnPOnline -AppId $AppId -AppSecret $AppSecret -AADDomain $AADDomain $accesstoken = Get-PnPAccessToken $response = Invoke-RestMethod -Uri 'https://graph.microsoft.com/beta/users/[email protected]/followedSites' -ContentType "application/json" -Headers @{Authorization = "Bearer $accesstoken"} -Method Get Permissions assigned to the AAD App: Question Is there a way to retrieve the list of followed sites for a specific user using REST API, Graph or some other way? Explanation We are going to need to write a crawler that runs every day and for every user in Office 365, gets the list of followed sites. This will later be used for a separate email notifications feature. But first, I am trying to understand if it's even possible to get users' followed sites. Any help will be greatly appreciated! Edit There is a , but we are using Office 365, which makes this question different. | How to get another user's followed sites, programmatically. It seems that SPSocialFollowingManager followingManager = new SPSocialFollowingManager(userProfile, context); only works for the current user; for another user it always returns null. I have tried to run with elevated privileges and it can't get the result for even the current user. |
My DEM raster coordinates are in WGS84: 45.4763884,-121.5736061 and vertical units are in feet I believe. I want to do a slope analysis. Do I need to add scale factor? I have been seeing different answers all over and am confused. | After the DEM creation, I wanted to create slope layer. However, the result has not satisfied me. I don't think the slope map is correct. Have you ever encountered false calculated terrain map? This is the DEM: And this is the slope layer. |
For example I've came to a webpage having the following tag inside its <head> tag: <link rel="alternate" type="application/rss+xml" title="A blog feed" href="http://johndoe.github.com/atom.xml"> Or a blogger.com blog having both RSS and Atom feeds rels. But my Firefox (7.0.1 on XUbuntu 11.10) doesn't indicate this! I have to view a page source code to see whether there is an RSS/Atom feed for it or not. Why? How to fix this? | I've upgraded to Firefox 4 and the RSS feed button was removed from the address bar! How do I get it back? |
In the three types of pNFS (block layout, file layout and object layout), as I know, block layout is lack of security. So, between file layout and object layout of pNFS, which type is more secure? | As I know, Parallel NFS (pNFS) has three types: file layout, block layout and object layout. What are the advantages and disadvantages of each type? |
I have gone through a tone of links to understand the concept of Kernel linear and rbf but it's still not clear to me along with gamma and C values (I do know for linear kernel we only use C value). From what I have read if the number of features are greater it's better to use linear and if the features are less rbf should be used. I have total 821 instances in data and 19 features and 1 class label, which kernel should I use? Also please explain to me gamma and C in possible easiest way. Thanks | I am trying to fit a SVM to my data. My dataset contains 3 classes and I am performing 10 fold cross validation (in LibSVM): ./svm-train -g 0.5 -c 10 -e 0.1 -v 10 training_data The help thereby states: -c cost : set the parameter C of C-SVC, epsilon-SVR, and nu-SVR (default 1) For me, providing higher cost (C) values gives me higher accuracy. What does C in SVM actually mean? Why and when should I use higher/lower values (or the LibSVM given default value) of C? |
I want to catch some pokemons with my camera, but I see the place that I'm showing whit my camera but the pokemon doesn't come on the camera, I can see the pokebal the backpag and other stuf but not the pokemon. Can someone help me? | After I began Pokemon go, I clicked "no" if you want the camera to be on. I don't want to make a new account to activate it, so is there anyway to activate it after initially declining to use it? If not, should I make a new account? |
I had a client's site and I was trying to stop MySQL Injection on it. The code is so messed up(wasn't coded by me) that I cant use PDO so I tried mysql_real_escape_string() but it is also not stopping attack as according to my research it only works when MySQL DB structure is in UTF8 so I tried to stop the attack manually so I wrote this code $input = $_REQUEST; foreach ($input as $key=>$value){ $input[$key] = preg_replace("/[^A-Za-z0-9\. ]/", "", $input[$key]); if($input[$key] =='') $input[$key]=1; } I limited only alphanumeric and few other characters for Chatting purposes but this is also not preventing the attack as I run again vulnerability scanner and it says the GET value was set to 6%c0%00xa7%c0%a2 which prompted SQLi error again. Its a HEX value that was converted to 6xa7. Is there any other best approach to stop this attack? | If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example: $unsafe_variable = $_POST['user_input']; mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')"); That's because the user can input something like value'); DROP TABLE table;--, and the query becomes: INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--') What can be done to prevent this from happening? |
When answering/asking a question if you want to achieve a black dot before the text, you can either use "-" before your text or use: <ul> <li>some text</li> <ul/> So far so good, but I just noticed that if I use this black dotted text, any code blocks will not be seen after. Here I have two screenshots to better illustrate the problem: With "-" before the text: And now without: As you probably noticed, the code blocks are only seen if the "-" char does not exist. Why is this happening? Is this a bug or something that I miss regarding this answer/question editor? | Oftentimes, I want to include code samples in a list, for example: Item One Item Two, for example: private bool ItemTwo() { return this.IFeelLucky; } Item Three The problem is that there isn't a good and intuitive way to do this using . It's doable, but you have to do some formatting black-magic to get it that way, which is just not "nice" to deal with. Source that produces this: 1. Item One 2. Item Two, for example: <br/><br/><pre><code>private bool ItemTwo() { return this.IFeelLucky; }</code></pre> 3. Item Three I would love to just be able to do it this way: 1. Item One 2. Item Two, for example: private bool Test() { return this.IFeelLucky; } 3. Item Three Which results in, well, this: Item One Item Two, for example: private bool Test() { return this.IFeelLucky; } Item Three |
I have a question about creating an excel chart with two Y axes. Suppose I have the following data: Horizontal Axis Primary Vertical Axis Secondary Vertical Axis Series 1 1 0.5 5.7 2 0.2 6.3 3 0.3 6.2 4 0.8 4.8 5 0.4 4.2 Series 2 1 0.3 5.1 2 0.5 7.2 3 0.2 6.4 4 0.6 6.1 5 0.4 4.9 I want to create a scatter plot with two lines from the data above, where the primary vertical axis data is read on the left side of the graph and the secondary vertical axis data is read on the right. The only information I have found is how to insert entirely new series' for the information that will be read from the secondary axis, but this is not what I want to do. If I did that I would end up with 4 lines on the chart (2 for the primary axis and 2 for the secondary axis). Instead, I only want to have 2 lines on the chart that read from both the primary and secondary vertical axis at the same time. In other words, each line should be plotted as having two independent variables (one for each vertical axis). Thanks | How do you make a scatter graph with 2 Y axis (one on the left and one on the right)? I have 2 scatter graphs that I want to combine. I need to have 2 lines, both lines have the same dependent variable but have their own independent variable. Click the link "graph" below to get an idea of what I'm looking for. (I'm using google sheets but I can also find a computer with Excel if needed) |
In the diagonal argument in which we prove $\mathbb{R}$ is uncountable, we take any function $f: \mathbb{N} \to \mathbb{R}$, suppose for the sake of contradiction that it is surjective, and consider any enumeration of $\mathbb{R}$, which will take the form: \begin{align*} f(0) & = a_{00} . a_{01} a_{02} a_{03} \ldots \\ f(2) & = a_{10} . a_{11} a_{12} a_{13} \ldots \\ f(3) & = a_{20} . a_{21} a_{22} a_{23} \ldots \\ \vdots \end{align*} The proof then constructs $x = b_0 b_1 b_2 \ldots$ where $b_i \neq a_{ii}$ for each $i$, so $x \not \in f(i)$ for any $i$, hence $x \not \in f(\mathbb{N})$. Here is the question I have: what about ending in an infinite string of $9$'s? I can require when constructing $f(n)$ for each $n$ that I represent a real number in its decimal expansion not terminating in $9's$ (so I write $0.5\overline{0}$ instead of $0.4\overline{9}$, for example), but what is to stop the $x$ I construct from ending in $9$'s? If that's the case, I can't go digit-by-digit and rule out each line in this enumeration. | I'm having trouble understanding Cantor's diagonal argument. Specifically, I do not understand how it proves that something is "uncountable". My understanding of the argument is that it takes the following form (modified slightly from the article, assuming base 2, where the numbers must be from the set $ \lbrace 0,1 \rbrace $): \begin{align} s_1 &= (\mathbf{0},1,0,\dots)\\ s_2 &= (1,\mathbf{1},0,\dots)\\ s_3 &= (0,0,\mathbf{1},\dots)\\ \vdots &= (s_n \text{ continues}) \end{align} In this case, the diagonal number is the bold diagonal numbers $(0, 1, 1)$, which when "flipped" is $(1,0,0)$, neither of which is $s_1$, $s_2$, or $s_3$. My question, or misunderstanding, is: When there exists the possibility that more $s_n$ exist, as is the case in the example above, how does this "prove" anything? For example: \begin{align} s_0 &= (1,0,0,\mathbf{0},\dots)\ \ \textrm{ (...the wikipedia flipped diagonal)}\\ s_1 &= (\mathbf{0},1,0,\dots)\\ s_2 &= (1,\mathbf{1},0,\dots)\\ s_3 &= (0,0,\mathbf{1},\dots)\\ s_4 &= (0,1,1,\mathbf{1},\dots)\\ s_4 &= (1,0,0,\mathbf{1},\dots)\ \ \textrm{ (...alternate, flipped } s_4\textrm{)}\\ s_5 &= (1,0,0,0,\dots)\\ s_6 &= (1,0,0,1,\dots)\\ \vdots &= (s_n \text{ continues}) \end{align} In other words, as long as there is a $\dots \text{ continues}$ at the end, the very next number could be the "impossible diagonal number", with the caveat that it's not strictly identical to the "impossible diagonal number" as the wikipedia article defines it: For each $m$ and $n$ let $s_{n,m}$ be the $m^{th}$ element of the $n^{th}$ sequence on the list; so for each $n$, $$s_n = (s_{n,1}, s_{n,2}, s_{n,3}, s_{n,4}, \dots).$$ ...snip... Otherwise, it would be possible by the above process to construct a sequence $s_0$ which would both be in $T$ (because it is a sequence of 0s and 1s which is by the definition of $T$ in $T$) and at the same time not in $T$ (because we can deliberately construct it not to be in the list). $T$, containing all such sequences, must contain $s_0$, which is just such a sequence. But since $s_0$ does not appear anywhere on the list, $T$ cannot contain $s_0$. Therefore $T$ cannot be placed in one-to-one correspondence with the natural numbers. In other words, it is uncountable. I'm not sure this definition is correct, because if we assume that $m = (1, \dots)$, then this definition says that "$s_n$ is equal to itself"&mdadsh;there is no "diagonalization" in this particular description of the argument, nor does it incorporate the "flipping" part of the argument, never mind the fact that we have very clearly constructed just such an impossible $T$ list above. An attempt to correct the "diagonalization" and "flipping" problem: $$s_n = (\lnot s_{m,m}, \lnot s_{m,m}, \dots) \quad \text{where $m$ is the element index and} \quad\begin{equation}\lnot s_{m,m} = \begin{cases}0 & \mathrm{if\ } s_{m,m} = 1\\1 & \mathrm{if\ } s_{m,m} = 0\end{cases}\end{equation}$$ This definition doesn't quite work either, as we immediately run in to problems with just $s_1 = (0),$ which is impossible because by definition $s_1$ must be $ = (1)$ if $s_1 = (0)$, which would also be impossible because... Or more generally, with the revised definition there is a contradiction whenever $n = m$, which would seem to invalidate the revised formulation of the argument / proof. Nothing about this argument / proof makes any sense to me, nor why it only applies to real numbers and makes them "uncountable". As near as I can tell it would seem to apply equal well to natural numbers, which are "countable". What am I missing? |
I always see home in the navigation and it seems redundant. Mainly because I would press the logo to go back home. The argument would go, not everyone knows the logo would take you home especially if we consider different levels of users. In that case, the home button should be in the navigation. What if we have a big website that has 8 or more items in the navigation? Should we still keep "Home" or should we drop it? At what point should we keep home? Or should home even be allowed on the navigation? Are there any studies or concepts that back it up? | I know that it is common behavior to have the logo of a web page be a link to the home page, but should I also have a 'home' link in the navigation bar for it as well? |
I can use either combinatorial argument, or mathematical induction on ${n+1\choose k} = {n\choose k}+{n\choose k-1}$ to prove $\prod_{i=0}^{k-1}(n-i)$ being divisible by $k!$ or that $n \choose k$ is a natural number for natural numbers $n$ and $k$. What is a number theoretical proof for it that does not use mathematical induction? Please do not give me a combinatorial argument with which I am infinitely familiar! | How can we prove, without using the properties of binomial coefficients, the product of $n$ consecutive integers is divisible by $n$ factorial? |
My solution I tried to use VirtualBox to simulate , but experienced problems (see below). My solution was to use Hyper-V (as answered in comment). How to access Hyper-V: Type in the Start Menu search Hyper-V Manager. My problem I'm using Windows 8.1 Pro x64 build 9600. My goal is to simulate Windows 10 Technical Preview x64 on VirtualBox. I downloaded VirtualBox 4.3.16 from . This is my system information: Steps i've tried: I enabled virtualization: I executed command in CMD: "C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" modifyvm "Windows 10" --longmode on I enabled Hyper-V feature: I also tried to use a 32-bit ISO of Windows 10 Technical Preview. If the status of Hyper-V is or , I get the following error when I start simulating Windows 10 Technical Preview: However, if I Hyper-V, I get the following error: If I hit Continue, the following error comes: I still cannot use 64-bit operating systems: | My host is x64 bits Windows 8.1. I downloaded the latest Virtual Box (4.3) and I'm trying to create a VM with a 64 bits Ubuntu OS (ubuntu-12.04.3-desktop-amd64). When I go to New VM wizard, it doesn't give me option to select "Ubuntu (x64)" as I have seen in other people's screenshots, only just "Ubuntu". As a result, the ISO can't boot. I tried in another PC and Virtual Box gives the x64 variants to most listed OS... Control Panel shows x64 OS, x64 processor. My host laptop is a Sony Vaio VPCZ22UGX/N, Intel® Core™ i7-2640M processor. CPUz shows Vx-t is available on my processor, of course. Here is what I tried so far: I enabled IO APIC as required in the docs. I have virtualization enabled in the BIOS. It works fine in VMware. Check that Hyper-V is not running or even installed on my Windows. Same for VMware. I also tried running the command: VBoxManage modifyvm [vmname] --longmode on for that VM, but no change.. I think the issue is really that I can't select x64 variant of the Ubuntu OS for that VM. Other people seem to indicate that's a requirement, but I don't get that option for some reason. I spent a lot of time and can't find what's wrong... Anyone knows what could be missing here? Thank you very much!! Eduardo |
I want to print the actual remaining time and this in the way in one line on the screen. So I print the persistend part of the text before the while-loop and only overwrite the old number characters of the text within the while. There is time.sleep() in the space of the while loop. But this does not matter. It does not print. Not until the while-loop was passed. I work with Windows 7 by the way. I tried to change the output stream to a file to figure out if cmd is too slow. I tailed the file with notepad++. The same happening. It seems to me a newline is important to print. import sys temp = sys.stdout sys.sdtout = open('testfile.txt', 'w') # my code <---* sys.stdout.close() sys.stdout = temp # my similiar code to demonstrate *---> i = 5 m = len(str(i)) print('Remaining time in seconds: {}'.format(' ' * m), end='') while i: m = len(str(i+1)) st = '{}{}'.format('\b' * m, i) print(st, end='') time.sleep(1) i -= 1 print('\b0') | How do I force Python's print function to output to the screen? |
On normal system, I can see However, on my other system, How can I bring those options back? Both systems are Windows 10 19H1, one with the option is build 18362.295, one without the option is build 18362.239. However, I think the difference between those minor versions are not the cause since it was all the same throughout all previous minor versions. edit: is not about my case because, 1. it deals mainly about gpedit settings, 2. if settings on gpedit are having some effect, then those options would be greyed out as a screenshot on the answer post. However, in my case, those options are completely missing. | In Windows 10 version 1607, it was still possible to defer updates by a few months via the Local Group Policy Editor, but now there's a subfolder containing two entries where it's only possible to defer them by 30-60 days with a maximum of 365 days (timer has to be set anew every time). Am I seeing this correct or am I missing something? And what's the difference between feature and quality updates? |
I am puzzling if it is possible to add decimal values which I get from a stored procedure together and get all decimals within the loop added together as one value. For example: <c:forEach var="row" items="${ aStoredProcedure }"> <fmt:formatNumber value="${ row.decimalNumber }"pattern="#,##0.00"/> <br> </c:forEach> This prints out the values of each decimalNumber of each row onto their own lines in the form of common currency. I need a way to get all these decimalNumbers added together with each other, and I only need the final sum of them all. Can this be accomplished in JSP? any help is appreciated. | I have a Java bean like this: class Person { int age; String name; } I'd like to iterate over a collection of these beans in a JSP, showing each person in a HTML table row, and in the last row of the table I'd like to show the total of all the ages. The code to generate the table rows will look something like this: <c:forEach var="person" items="${personList}"> <tr><td>${person.name}<td><td>${person.age}</td></tr> </c:forEach> However, I'm struggling to find a way to calculate the age total that will be shown in the final row without resorting to scriptlet code, any suggestions? |
I recently started working from home full-time (as everyone else here, thanks to Covid-19), and I noticed the following strange behavior when remote-controlling my work PC via RDP: Sometimes, the RDP window will just stop showing screen updates, as if the remote screen were "frozen". It looks like the RDP session is stuck, but it isn't: After reconnecting, I can see that all the keyboard and mouse events I sent after the screen froze have been processed. The mouse cursor still changes according to what is really underneath: If I drag and drop a window a few centimeters, the window will still be shown at the old position, but the cursor changes to the "resize" cursor when I hover over the new position of the border of the window. It's not a temporary network issue either: If I wait, the screen just stays frozen (I tried it for many minutes while writing this question). If I close the RDP session and reconnect, everything works fine again (until it freezes again at some random time). Switching from full-screen to windowed mode and vice versa doesn't help. It looks like a bug in the RDP client or server (both machines are Windows 10 1909). Is it a known issue? Is there some known workaround (except for closing and reconnecting)? | I use a Windows 10 machine remotely at work. Both the local and remote machine are in the same ISP network (not same local network, but same ISP). I've been using it like that for almost a year now and I had never experienced absolutely any issues. Until recently. I don't know if anything specific triggered this behavior, but I feel that it started happening after I upgraded the remote to W10 1903. I later upgraded the local one as well and I feel that it only made the problem worse (but I don't really have any data). From time to time, the session will freeze - the image stops updating. However, what I type and mouse clicks are still being sent. No error message is shown whatsoever, the image simply freezes. To make it work again, I have to close and re-open the session. Everything that I had typed and/or clicked while it was frozen is there. Is there any way I can debug this? |
I have this integral expression to be evaluated: $$\int{\frac{1}{x+\sqrt{x^2-x+1}}dx}$$ I've followed these steps: Completed the square in $x$ and then substituted $u=x-\frac{1}{2}.$ Trig substituted $u = \frac{\sqrt{3}}{2}\tan t.$ and then simplified the equation thereby giving: $$\int{\frac{\sqrt{3}\sec^2t}{\sqrt{3}\tan t+\sqrt{3}\sec t+1}dt}$$ I know up to this, but I'm unclear what to do next. Feel free to correct me if I'm wrong. | Evaluate : $$\frac{dx}{x+ \sqrt{x^2-x+1}}$$ After dividing and multiply with $x-\sqrt{x^2-x+1}$, I get $x+\ln |x-1|-\int \frac{\sqrt{x^2-x+1}}{x-1}dx$. Is $\int \frac{\sqrt{x^2-x+1}}{x-1}dx$ is integrable in terms of elementary functions? |
I am looking for an idiom or phrase that describes, in a humorous or funny way, the act of looking for something that probably isnt't there, or the act of looking for a solution in a place where it is not likely to be found. | I'm trying to find a word or short phrase that would describe chasing something that doesn't exist. My restriction is that it can't be referencing something that would only make sense in our world (things like "chasing the white whale" as it's a reference to Moby Dick) I'm writing a book that does not take place on earth. So referencing our literature, specific places on earth, or specific cultures on earth don't really work well with the setting. I'll be taking a look at worldbuilding.stackexchange.com as well, but for reference for those who comment or come back to view this question. The world the story takes place in is similar to earth in regards to atmosphere, environments, and natural phenomenon. Things like "chasing the rainbow" would work. As for context in how I'm trying to use this. Two people are having a tense conversation. Person 1 is attempting to convince Person 2 to join a group that has made person 1 very idealistic promises. Person 2's reply is “You paint a pretty picture, but it’s one drenched in the blood and death of every nation. You use to be so smart, so tactful, now you’re nothing but a fool chasing after a _______________.” |
I know how to edit a file using sed one step at a time, but how would I create an actual sed script and then use it on the file to do the same things that the individual sed commands would do? For example these 3 sed commands: sed -i '4i\ ' baconFile sed -i 's/,/\t\t/' baconFile sed -i 's/,/ /' baconFile | Typing /usr/bin/env sed -f in terminal works. But if use it as a shebang, #!/usr/bin/env sed -f s/a/b/ The script will be fail to execute: /usr/bin/env: sed -f: No such file or directory I kind of believe that it's related with the -f. But how to resolve this? |
Can anyone help me out. I reach to the conclusion that all three inequalities are wrong. But a) , b) are correct.(Answer is given in NBHM site) | Let $f\in C[a,b]$. Assume that $\min_{[a,b]}f=m>0$ and $M=\max_{[a,b]}f$. Which one is true? a. $$\frac{1}{M}\int_a^bf(x)dx+m\int_a^b\frac{1}{f(x)}dx\geq 2\sqrt{\frac{m}{M}}(b-a)$$ b. $$\int_a^bf(x)dx\int\frac{1}{f(x)}dx\geq (b-a)^2$$ c. $$\int f(x)dx\int_a^b\frac{1}{f(x)}dx\leq (b-a)^2$$ For the first one $$\frac{1}{M}\int _a^bf(x)+m\int _a^b\frac{1}{f(x)}dx\geq {\frac{m}{M}}(b-a)+{\frac{m}{M}}(b-a)$$ and the last two I am not getting. How to find these? |
I have a form which contain textbox for email. I am validating email address using reg Expression in javascript. I used following reg :- var regEmail = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/; This reg is validating email address but the issue is if i used email address like [email protected] . It not produce error. Please suggest me any other reg expression which not accept email address for [email protected] | Over the years I have slowly developed a that validates MOST email addresses correctly, assuming they don't use an IP address as the server part. I use it in several PHP programs, and it works most of the time. However, from time to time I get contacted by someone that is having trouble with a site that uses it, and I end up having to make some adjustment (most recently I realized that I wasn't allowing 4-character TLDs). What is the best regular expression you have or have seen for validating emails? I've seen several solutions that use functions that use several shorter expressions, but I'd rather have one long complex expression in a simple function instead of several short expression in a more complex function. |
When a cloth is wet, it appears to be darker than it actually is. why does its colour change to a darker shade? | When something gets wet, it usually appears darker. This can be observed with soil, sand, cloth, paper, concrete, bricks... What is the reason for this? How does water soaking into the material change its optical properties? |
In zsh, when I type ls, it lists the files in the directory, as I would expect it to. However, when I type sl zsh does not ASK whether I want a steam locomotive to roll across my screen. It simply autocorrects to ls with no way to actually run the program sl. This is very annoying, how do I tell zsh that sl really means sl? It's worth noting that zsh does NOT ask if I want it corrected (unlike the usual auto-correct), it seems to be an alias. However, I can't figure out where the alias is. (which file) | The autocorrection function of zsh is very helpful for me but it does't always gives a proper result. ~$ sudo vim somefile zsh: correct 'vim' to '.vim' [nyae]? Yet what I want is something like the a never option that can stop it to correct commands like those forever. How can I do this? |
With the code below, baz is nested in bar. What I'd like to do is break this nesting, in other word make it look like a section as if there were no preceding chapters. \documentclass{scrreprt} \begin{document} \tableofcontents \chapter{foo} \chapter{bar} % Sectioning break where % Everything that follows % belongs to the document, not nested in preceding chapters \section{baz} \end{document} | I want remove the space in my table of contents of \section, \subsection and \subsubsection. This is my code: \documentclass{book} \usepackage[utf8]{inputenc} \usepackage{imakeidx} \makeindex[columns=3, title=Alphabetical Index, intoc] \begin{document} \tableofcontents \chapter{chapter} \section{Introduction} In this example several keywords\index{keywords} will be used which are important and deserve to appear in the Index\index{Index}. \subsection{subsection} Terms like generate\index{generate} and some\index{others} will also show up. Terms in the index can also be nested \index{Index!nested} \clearpage \section{Second section} This second section\index{section} may include some special word, and expand the ones already used\index{keywords!used}. \printindex \end{document} |
Here is the circuit of cellphone charger. I have seen the input voltage range for a cellphone charger to be 100-230 V but the output voltage to be fixed to the rated value(like ~4.5 V). So, my question is how the output voltage is fixed to the optimized value if I provide different mains supply voltage. Like, in India I give 220 V RMS value while in Japan I provide 100 V RMS.The grid frequency is also different in different countries as well as the RMS voltge. I am attaching a picture of the rating of an ac adapter(cellphone charger).- | I would like to know about the workings of mobile phone battery chargers. I know the basic principle, you take a transformer to bring it down to 9/6/3.7 volts then a bridge rectifier circuit and a capacitor input filter to rectify it into DC. Then you apply it to the battery. But I know this should not be enough, I need at least two things, Protection against back current flow Switch off power when the battery is fully charged. Can someone point me to something simple (apart from this ) |
I'm trying to book for Thanksgiving, but they are not showing that far in advance. I emailed the company but didn't get an answer. | I've been trying to buy Allegiant Air tickets for an August 20 trip for several weeks now and every time I check their website I see the following: Displaying all available flight dates. Now accepting reservations through Tue Aug 15, 2017. At first I thought that only showed flights like 7 months in advance or some such. Under that hypothesis they'd have added the August 20 flights a few days after I initially checked. But nope - a few weeks has passed and I'm still seeing that message. So now I'm wondering... when will tickets for flights after August 15 be available for purchase? |
I'm trying to .put a pair into a linkedhashmap but when i put 2 or more the size never changes! When i iterate it i get every pair but in random order but the size stays 1. When i hard code the .put (example playerCoords.put(1,"test")) the size changes. playerCoords = new LinkedHashMap<Integer, String>(); while (message[0] != "234124214") { message = (String[]) input.readObject(); if (message[0] != null) { playerCoords.put(Integer.parseInt(message[0]), message[1]); output.writeObject(playerCoords); output.flush(); } } EDIT: When i open the program 1 client connects to the server and his coords and port get written in the linkedhashmap (ex. 25565,"1 1 2") and then another joins (ex/ 25566, "1 2 1") and when I iterate i get both of these examples but the size still is 1! | 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? |
What's the difference between "That is not good" and "That is not well"? In what context should each expression be used or does it not make any difference? Example: That's not good. He should do the right thing. and That's not well. He should do the right thing. | What can I say instead of "I'm very tired, I guess I'm sick"? I don't feel good. I don't feel well. I feel bad. I'm not good. I'm not well. |
I need to prove or give a counterexample: If matrix $A$ is unitary and $B^2 = A$ then $B$ is also unitary I think the statement is true since the unitary matrix A can only be Identity matrix I or negative identity matrix $-I$; and $B=A^2$ is an identity matrix which makes sure it is unitary. | If matrix $A$ is unitary and the matrix $B$ satisfies $B^2=A$, is $B$ necessarily unitary? |
Edit 1: I'm sorry, but the answers provided in the do not answer this question. To clarify: I'm not asking how to whitelist a domain, I'm asking WHY a domain is blacklisted - seemingly without reason - in the first place when no explicit nor mature content can be found on it. It's imperative that the website can be acccessed on any iOS device, even if web content restrictions are in place, with no further user intervention. EDIT 2: I've found that not all pages on our domain are blocked by this setting, so it seems iOS blocks a page based on specific content (words, images, etc.), maybe even certain HTML. Would be grand to know what exactly triggers the block. EDIT 3: it's definitely the content. Once I remove all the main content from our website and just leave the header, footer, HTML tags, scripts etc. in tact, the website is accessible even with "Limit Adult Content" setting turned on. I've scoured the content but can't fathom what exactly causes this. The website text is in German (the HTML lang tag is set accordingly) and there's imo literally nothing that could be seen as adult content. Guess we'll just have to get in touch with Apple to figure this one out. Thanks though! Original question: I just launched a new website for a client. The website is aimed at teenagers from 12-14 and doesn't contain any explicit content whatsoever. If web page content restriction are turned on in iOS, the website cannot be accessed with Safari and the following message is displayed instead: You cannot browse this page at "domain.com" because it is restricted Why does this happen and what can we do about it? This makes no sense. The domain name in question is brand new, hasn't been used before and isn't on any blacklists as far as I can tell. Any help is appreciated, we really need to get this website rated appropriately. | I don't add these web sites to the restricted list. Is the iPhone sending every page I visit to Apple? Random surfing will encounter a random restricted site. In this case it renders this app broken because the 'allow' link doesn't work. Setting is currently set to limit adult content which allows me to use a white list and blacklist. I never added this site to blacklist. I only blacklist 3 sites. How does iOS know that a website is restricted? Does it send it every page I visit to Apple? How does iOS know if a website is restricted? Does it send it every page I visit to Apple? See this is the BS I'm talking about: iOS 10.1.1 |
I'm creating a web page, when opened in iphone safari browser, a cookie will be created. I am also creating iOS application in which it has to read the cookie created by my web page in safari browser. Is it possible to read that cookie from my iOS application? | Can an iPhone application read cookies previously stored by Safari Mobile? |
How does people have hundreds of badges, when the list shows(When you click on Badges tab) few? | What are badges? How do users get badges? How can users get tag badges? Can badges be lost/revoked/taken away after they are awarded? If so, how and when? How can I suggest a new badge? For more information, see "" and the in the . |
As far as I understand we should try to find a geometric series $g(z)$ with a known sum and then get the sum $s$ from manipulating $g(z)$. I have a hard time finding $g(z)$ though. Any help appreciated! | Could anyone help me find an explicit formula for: $$ \sum_{n=1}^\infty n^2x^n $$ We're supposed to use: $$\sum_{n=1}^\infty nx^n = \frac{x}{(1-x)^2} \qquad |x| <1 $$ |
I accidentally left a clan after receiving troops, and now all of the clan members won't let me re-join and they are saying on global chat: "Don't let Corry join ur clan she is a hopper and she was only in our clan for a total of three seconds!" So I'm not too popular at the moment and I want to delete and recreate a new account. I've tried to uninstall then reinstall but it's not working. Any ideas? If it helps I didn't bind my account. | I downloaded Clash of Clans to my iPad (iOS 7) this past weekend and started playing. Of course, after a couple of hours I realized I made some newbie mistakes that are fatal to my future success. I wanted to restart, but it seems the only way to do so is to reset the device which I really would like to avoid. After some Googling I tried the option of logging out of Game Center and logging in with a different Apple ID. But, sadly, CoC re-launched back into the existing game. Is there any way I can start over? Or at least start a new game under a different account on the same device? |
I am trying to find the font I saw in some lecture notes. I think they are TeX native fonts but they might as well be fonts from Latex's packages? Please see attachment. Is there a place I can find the fonts that are native to TeX, by that I mean METAFONT? | Is it possible to identify the font used in a specific document/picture? Answers to this question should identify: Possible methods to do this (perhaps one answer per method) and adequately describe how to use it (as opposed to merely stating it); Ways of finding the identified fonts, if possible (free or not); and Any prerequisites associated with the method used, if required (for example, "In order to use method X, your document has to be in format Y"). This question is meant as an FAQ, based on an . Its aim is to facilitate the community with the general procedures involved in font identification. Similar cases are solved on a per-usage basis on 's tag. |
I want the smallest possible code for this question. I never want to follow other questions as they never helped me and given me back to back errors | I want to retrieve information like the city, state, and country of a visitor from their IP address, so that I can customize my web page according to their location. Is there a good and reliable way to do this in PHP? I am using JavaScript for client-side scripting, PHP for server-side scripting, and MySQL for the database. |
I was able to successfully encrypt a message with a generated key. Now I am trying to achive decryption whereby a user would enter a key (hex) and there encrypted message (hex). I am having a problem when decrypting the the encrypted message (hex). I receive multiple NullPointerExceptions. Could you possible help me figure out a solution to this problem please? //Edit: For Example the key (Hex): CFDD0F5311764F9EA56CF4126E304BC2 | Encrypted Message: C2A80A2B7A84A5A785E059F19322E5BA private void executeDecryption() { encryptMessageStr = messageEncryptTA.getText(); algorithmType = decryptAlgorithmTypeCB.getSelectionModel().getSelectedItem(); keyDecrypt = keyTF.getText(); if (!messageEncryptedTA.getText().isEmpty()) { try { //Using decryptText() String textDecipher = decryptText(encryptedMessageStr, keyDecrypt); messageEncryptedTA.setText(textDecipher); } catch (Exception ex) { MessageBox.display("Error!", "Could not decrypt message! Please try again later"); //System.out.println(ex.getMessage()); } } else { MessageBox.display("Warning!", "Please make sure message field is not empty!"); } } public static String decryptText(String encryptedMessageStr, String secretKey) { try { Key k = new SecretKeySpec(Base64.getDecoder().decode(secretKey), "AES"); Cipher cipherAES = Cipher.getInstance("AES"); cipherAES.init(Cipher.DECRYPT_MODE, k); byte[] decodedValue = Base64.getDecoder().decode(encryptedMessageStr); byte[] cipherTextBytes = cipherAES.doFinal(decodedValue); String decryptedValue = new String(cipherTextBytes); return decryptedValue; } catch (Exception ex) { ex.printStackTrace(); } return "Error"; } Edited: EXCEPTION: javax.crypto.IllegalBlockSizeException: Input length must be multiple of 16 when decrypting with padded cipher | What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them? What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely? |
This is the code: import re regex = re.compile('java') print regex.match('/something.java') This is the output: None | What is the difference between the search() and match() functions in the ? I've read the (), but I never seem to remember it. I keep having to look it up and re-learn it. I'm hoping that someone will answer it clearly with examples so that (perhaps) it will stick in my head. Or at least I'll have a better place to return with my question and it will take less time to re-learn it. |
title task .model small .stack 100h .data string db "I got 10$ as reward for my hard work",'$' main proc mov ax,@data mov ds,ax mov ah,9 mov dx,offset string int 21h mov ah, 4Ch int 21h main endp end main | In my assembly language class, our first assignment was to write a program to print out a simple dollar-terminated string in DOS. It looked something like this: BITS 32 global _main section .data msg db "Hello, world!", 13, 10, ’$’ section .text _main: mov ah, 9 mov edx, msg int 21h ret As I understand it, the $ sign serves to terminate the sting like null does in C. But what do I do if I want to put a dollar sign in the string (like I want to print out "it costs $30")? This seems like a simple question, but my professor didn't know the answer and I don't seem to find it using a google search. |
I know that $\lim_{x\to0}\frac{x}{x}=$ 1. But in my text book, it is written that it is $\infty$ and even $\frac10=\infty$. But how is it possible? And are they both same? What is the difference between indeterminate and undefined? And if they are $\infty$ then what is the reason? And why can't we define something for these numbers? Now see that book says when $x=0$, $t=\infty$. If it is wrong, why did they just write it? | I was on the tube and overheard a dad questioning his kids about maths. The children were probably about 11 or 12 years old. After several more mundane questions he asked his daughter what $1/0$ evaluated to. She stated that it had no answer. He asked who told her that and she said her teacher. He then stated that her teacher had "taught it wrong" and it was actually $∞$. I thought the Dad's statement was a little irresponsible. Does that seem like reasonable attitude? I suppose this question is partly about morality. |
I had this create method: [HttpPost] [Route("")] /// <summary> /// Create a team /// </summary> /// <param name="model">The team model</param> /// <returns>The modified team model</returns> public async Task<IHttpActionResult> Create(TeamBindingViewModel model) { // If our model is invalid, return the errors if (!ModelState.IsValid) return BadRequest(ModelState); // Get all our colours var colours = await this.colourService.GetAllAsync(); // Create our new model var team = new Team() { Name = model.Name, Sport = model.Sport }; // For each colour, Add to our team team.Colours = colours.Where(m => model.Colours.Any(c => c.Id == m.Id)).ToList(); // Create our team this.service.Create(team); // Save our changes await this.unitOfWork.SaveChangesAsync(); // Assign our Id to our model model.Id = team.Id; // Return Ok return Ok(model); } As you can see, when a Team is created, I need to add the Colours to the lookup table. To do this, I get the Colours from the database and then filter them by the colours that were passed as part of the model. That tells Entity Framework that these Colours are not new entities, so it just creates a reference in the lookup table rather than creating new Colours. Now I want to do the same for the update method. I tried this: [HttpPut] [Route("")] /// <summary> /// Update a team /// </summary> /// <param name="model">The team model</param> /// <returns>The modified team model</returns> public async Task<IHttpActionResult> Update(TeamBindingViewModel model) { // If our model is invalid, return the errors if (!ModelState.IsValid) return BadRequest(ModelState); // Get our current team var team = await this.service.GetAsync(model.Id, "Colours"); // Get all our colours var colours = await this.colourService.GetAllAsync(); // Make changes to our team team.Name = model.Name; team.Sport = model.Sport; // For each colour in our team colours but not in our model colours, remove foreach (var colour in team.Colours) if (!model.Colours.Any(c => c.Id == colour.Id)) team.Colours.Remove(colour); // For each colour that has to be added, add to our team colours if (model.Colours != null) foreach (var colour in model.Colours) if (!team.Colours.Any(c => c.Id == colour.Id)) team.Colours.Add(colours.Where(m => m.Id == colour.Id).SingleOrDefault()); // Update the team this.service.Update(team); // Save our changes await this.unitOfWork.SaveChangesAsync(); // Return Ok return Ok(model); } But it didn't work. I got an error stating: Collection was modified; enumeration operation may not execute. I know it is talking about the Colours but I have no idea how to get around it. Perhaps someone has had a similar problem and managed to fix it? | I can't get to the bottom of this error, because when the debugger is attached, it does not seem to occur. Collection was modified; enumeration operation may not execute Below is the code. This is a WCF server in a Windows service. The method NotifySubscribers() is called by the service whenever there is a data event (at random intervals, but not very often - about 800 times per day). When a Windows Forms client subscribes, the subscriber ID is added to the subscribers dictionary, and when the client unsubscribes, it is deleted from the dictionary. The error happens when (or after) a client unsubscribes. It appears that the next time the NotifySubscribers() method is called, the foreach() loop fails with the error in the subject line. The method writes the error into the application log as shown in the code below. When a debugger is attached and a client unsubscribes, the code executes fine. Do you see a problem with this code? Do I need to make the dictionary thread-safe? [ServiceBehavior(InstanceContextMode=InstanceContextMode.Single)] public class SubscriptionServer : ISubscriptionServer { private static IDictionary<Guid, Subscriber> subscribers; public SubscriptionServer() { subscribers = new Dictionary<Guid, Subscriber>(); } public void NotifySubscribers(DataRecord sr) { foreach(Subscriber s in subscribers.Values) { try { s.Callback.SignalData(sr); } catch (Exception e) { DCS.WriteToApplicationLog(e.Message, System.Diagnostics.EventLogEntryType.Error); UnsubscribeEvent(s.ClientId); } } } public Guid SubscribeEvent(string clientDescription) { Subscriber subscriber = new Subscriber(); subscriber.Callback = OperationContext.Current. GetCallbackChannel<IDCSCallback>(); subscribers.Add(subscriber.ClientId, subscriber); return subscriber.ClientId; } public void UnsubscribeEvent(Guid clientId) { try { subscribers.Remove(clientId); } catch(Exception e) { System.Diagnostics.Debug.WriteLine("Unsubscribe Error " + e.Message); } } } |
If there is: $$ U = \sum_{x,y \in \mathbb{Z}_2} |x \dot{+} y\rangle |y\rangle \langle x| \langle y| $$ acting over $|\psi\rangle$ which can be $|00\rangle, |01\rangle, |10\rangle, |11\rangle$, does it act on the first qubit or on both? Also if I want to take the partial trace: $$ Tr_{1}[U(|\psi\rangle\langle\psi|U^{\dagger}] $$ would it be correct to do: $$ Tr_{1}[U(|\psi\rangle\langle\psi|U^{\dagger}] $$ $$ = \sum_{ n,u,w,x,y,z \in \mathbb{Z}_2} \langle n| x \dot{+} y\rangle \langle x | \psi\rangle\langle\psi|w\rangle\langle w\dot{+} z|n\rangle |x \dot{+} y\rangle \langle x | \psi\rangle\langle\psi|w\rangle\langle w\dot{+} z| $$ | I am doing my bachelors dissertation based on an article by David Deutsch. He defines the action of a quantum gate as: $$ U = \sum_{x, y \in \mathcal{Z}_{2}} |x \dot{+}y\rangle|y\rangle\langle x|\langle y| $$ where $\dot{+}$ is the OR operator from boolean algebra. Then, according to me: He then takes the partial trace: $$ \text{Tr}_{2}[U(|\psi\rangle\langle\psi|\otimes\hat{\rho})U^{\dagger}] $$ and it is equal to: $$ \frac{1}{2}\hat{I} + \text{Re}[(\langle 0|\psi\rangle\langle\psi|1\rangle)(|0\rangle\langle 1|+|1\rangle\langle 0|)] $$ EDIT: where does the $\frac{1}{2}\hat{I}$ comes from? |
I have a problem: I render images, and if Blender accidentally quits while performing some sort of operation, I lose my rendered data. (If only a single unsaved image). I have external data > 'Pack all into .blend' enabled, but this does not pack rendered images into the file. Is there a way to pack single rendered images into the .blend along with all of my already packed textures? This would be extremely helpful, and would save a lot of render time! | Is it possible to render an image and have blender remember it, so that next time I open the file the render result will not be blank? I am not talking about saving to an external file. Specifically I would like to render an image, close blender, and come back later and be able to do some compositing on the render without having to waste a half an hour rendering it again (my GPU drivers are messed up so I have to use the CPU). Currently the render result is blank when ever I open a file. |
case 1: { //question is about this curly brace int val; scanf("%d", &val); if(top1 == NULL){ enqueue(top1, val, bottom1); } else{ enqueue(top1, val); } break; } Without the curly brace after case 1: it gave an error: * a label can only be part of a statement and a declaration is not a statement: int val; * | 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? |
I have a 4GB RAM laptop with 500GB hard-disc space and I'm using Ubuntu 18.04 LTS. So, I need to use the android studio a lot and recommended RAM for that is 8GB. My computer crashes a lot lately so really either should buy an 8GB Ram to do the swap partition. I would love to find a solution with no costs! So my question is this: Should I swap space to double my RAM? Would that be harmful to my computer? Please, guys, be nice! | I read many places that the rule of thumb for swap space is to double the amount of physical RAM. However, 32 GB does seem a LOT. Do I need that much? Do I need it at all with this high amount of physical RAM? |
I stopped the windows7 update process while it was downloading files. (I have a laptop that is seldom used and has 76 updates to be applied.) If I restart it, will it pickup where it was, or will it start over? Sp1 is on. I have 76 updates to be applied. I am using wi-fi(which shouldn't matter. I am in the process of downloading them. Extremely slow, most of the down loads use less than 1% of capacity. Long waits between downloads. I stopped the downloads and connected to the direct lan connection I have on my desktop. same thing, just really poor performance!! Thanks for the replies. | I installed Windows 7 fresh and installed SP1. Now, when I try to check manually for Windows Updates it just hangs on the Checking for updates screen. I tried running the tools in , but this did not fix the issue either: No matter what I do it just hangs on the "Checking for updates..." screen and goes no further. |
I thought I read somewhere something like having someone drafting behind also has effect to the rider in front. I wonder if it's true and would like to understand how does it work because it's quite unintuitive (if it's true at all). So, other than robbing the rider in front from tailwind, does the drafter help at all? | I know that when riding close to another cyclist, I expend less energy to go the same speed. But does the Conservation of Energy "law" mean that the lead cyclist is going to expend more energy to allow me to expend less? (i.e. Is there a physical reason to get angry at someone drafting behind you? Does riding in their slipstream cause drag for them?) |
This is the sentence I wrote: It is as simple as adding or removing an item to/from the list. Now I'm wondering if I should use "to" or "from" or "to/from" in: Written English, Spoken English. | Examples: Data can be imported to and exported from the application. Data can be imported and exported from the application. Data can be imported to the application and exported from it. The manager defined the products that should be added to and removed from the store. The manager defined the products that should be added and removed from the store. The manager defined the products that should be added to the store and removed from it. I assume that the third sentence is correct in my examples. My question is whether the two other sentences are correct. |
When I say: The board and council meetings will be held on the 5th and the 6th of this month, respectively. it seems to be the proper way to say it and it sounds correct . But when I say: Let's get tea and coffee for you and for me, respectively. especially in an informal environment, it sounds unnatural at best and snobbish at worst. So what is a good informal word for 'respectively'? | Is there any other word I can use instead of respectively? This word provides me a way to describe a list of items conveniently in a single sentence and hence save space. I've used this many times and there are mainly two reasons I am asking this: I'm just looking for alternatives, since I don't want to use the same word everywhere. Another small reason is that I find the word respectively a bit long which makes writing short sentences using it difficult. Since an example of its use was requested: "Samantha, John and Jack bought apples, mangoes and oranges respectively from the market." (I know it's not a very creative one.) I also looked for synonyms at but the only close ones I found were correspondingly and individually. I'm unsure whether these are valid substitutions for the use of respectively as in my example. |
I'm wondering if someone can help explain why the following code snippet returns a and b both equal to 6. int main(){ int a =5, b; a++,b=a; printf("%d %d\n", a, b); } Is the answer that, in fact, the behaviour is implementation-specific (based on compiler)? Or, is the following the explanation (my understanding of postfix is that the incrementing only happens after the variable a has been "used" by whatever other operator exists around it). In this case, is the a "used" by the comma operator when the LHS is evaluated and then thrown away, such that incrementing happens before the RHS is evaluated? Thanks in advance! | What does the , operator do in C? |
Let $(V, \|\cdot\|)$ be a Banach space over $\mathbf R$ and $W$ be a closed subspace of $V$. We know that $V/W$ becomes a normed linear space under the quotient norm $\|\cdot\|_q$ defined as $\|v+W\|_q=\inf_{w\in W} \|v+w\|$ for all $v\in V$. Suppose $v\in V$ and we have $\|{v+W}\|_q=\lambda$. Does there necessarily exist a $w\in W$ such that $\|{v+w}\|=\lambda$. Clearly, the above is true if $\lambda=0$ or if $V$ is finite dimensional (because we can use the compactness of $S^n$). But I am getting nowhere with the statement in block quotes. We get a sequence $(w_n)$ in $W$ such that $\|v+w_n\|>\lambda+1/n$ for all $n$. But this is weaker than saying $\|v+W\|_q=\lambda$. | Let $E$ be a Banach space and $F$ a closed subspace. It is well known that the quotient space $E/F$ is also a Banach space with respect to the norm $$ \left\Vert x+F\right\Vert_{E/F}=\inf\{\left\Vert y\right\Vert_E\mid y\in x+F\}. $$ Unfortunately in a set of lecture notes on (Lie) group representations (material for our study group) the author accidentally used here $\min$ instead of $\inf$. Probably a mostly harmless booboo, because at that point it was only needed to get a Banach space structure on the quotient, and we will probably be concentrating on Hilbert spaces anyway, where the problem does not arise. Namely from Rudin's Functional Analysis I could not find a proof that the minimum should always be attained. Except in the case of a Hilbert space, where an application of parallelogram law (the sum of the squared norms of the two diagonals of a parallelogram equals that of the four sides) allows us to find a Cauchy sequence among a sequence of vectors $(y_n)\subset x+F$ such that $$\lim_{n\to\infty}\left\Vert y_n\right\Vert_E=\left\Vert x+F\right\Vert_{E/F}.$$ But anyway, the suspicion was left that the infimum is there for a reason (other than conveniently allowing us to sweep this detail under the rug at that point of the development of theory), so in the interest of serving our study group I had to come up with a specific example, where the minimum is not achieved. It's been 25 years since I really had to exercise the Banach space gland in my brain, so it has shrunk to size of a raisin. Searching this site did help, because I found . There we have $E=C([0,1])$, the space of continuous real functions on $[0,1]$ equipped with the sup-norm. If we denote by $\Lambda$ the continuous functional $$ \Lambda: E\to\mathbb{R},f\mapsto\int_0^{1/2}f-\int_{1/2}^1f $$ and let $F=\ker\Lambda$, then the answer to the linked question proves that there is no minimum sup-norm function in the coset $\Lambda^{-1}(1)$. So I have a (counter)example, and the main question has evolved to: When can we use minimum in place of infimum in the definition of the quotient space norm? My thinking: It seems to me that the answer is affirmative, if $F$ has a complement, i.e. we can write $E=F\oplus F'$ as a direct sum of two closed subspaces such that the norm on $E$ is equivalent to the sum of the norms on $F$ and $F'$-components. But the first point also raises the suspicion that the question may be a bit ill-defined (and uninteresting) in the sense that the answer might depend on the choice of the norm $\left\Vert\cdot\right\Vert_E$ among the set of equivalent norms. However, if we, for example, perturb the sup-norm of $C([0,1])$ in the above example by multiplying the functions with a fixed positive definite function before taking the sup-norm, the argument seems to survive, so may be replacing the norm with an equivalent one is irrelevant? So to satisfy my curiosity I also welcome "your favorite example" (one with a finite-dimensional $F$ would be nice to see), where we absolutely need the infimum here. Bits about any sufficient or necessary conditions for the minimum to be sufficient or (as a last resort :-) pointers to relevant literature are, of course, also appreciated. |
So, I have been studying causality and came across with Googles Causality Impact Analysis. I already read the paper and watched Kay's keynote. However, I wonder if it is also possible to use a simple regression or a machine learning model build the synthetic post intervention series. | I am often told that the crucial difficulty in causal inference is that we only observe one value between $Y(1)$ and $Y(0)$ while we want to estimate $E[Y(1) - Y(0)]$. There is always an unobserved value. Here is my problem: why don't we simply use the samples with treatment $z_i = 1$ to regress $y(1) \sim x$ , and similarly use the samples with treatment $z_i = 0$ to regress $y(0) \sim x$, and combine them to estimate $E[Y(1) - Y(0)]$? From this perspective, causal inference is just two regression problems and needn't be treated as a special area. I am sure that there must be something wrong, but what is it? |
I'm trying to filter every string which are not valid (simple) email adress. Thus starting with a dot is a "no go". But my expression doesn't reject strings like [email protected] preg_match('/^(?<!\.)[\w0-9\.]+(?<!\.)@+(?<!\.)[\w0-9\.]+\.\w{1,3}(\s*<[^>]+>)?$/', $part) Shouldn't /^(?<!\.) do the trick? EDIT: This question is not a duplicate of the indicated question. I am not asking about the context, I want more information about look behind, the approach itself, not the specific use-case. | Over the years I have slowly developed a that validates MOST email addresses correctly, assuming they don't use an IP address as the server part. I use it in several PHP programs, and it works most of the time. However, from time to time I get contacted by someone that is having trouble with a site that uses it, and I end up having to make some adjustment (most recently I realized that I wasn't allowing 4-character TLDs). What is the best regular expression you have or have seen for validating emails? I've seen several solutions that use functions that use several shorter expressions, but I'd rather have one long complex expression in a simple function instead of several short expression in a more complex function. |
I applied to a remote job on indeed North America (job listing had Louisville, KY as location), and overnight , without interview, they gave me an offer letter saying I was selected and I'll be a part time assistant manager, and job was to go to super markets and snap pictures. And they sent me a document in which I was supposed to fill , to get started on job. ** bank name (they specified only chase, BoFa , Wells Fargo and US Bank ) bank account number, routing number , full name and date of birth. (they didn't ask for ssn) phone number**. The document has a one line company address based out of Buenos Aires Argentina. It has company logo on all pages, no letter head nothing. But the guy who sent me email said the office was in Sweden but none in US and gave one address. I google that address it shows some other company name. If I were to provide my full name date of birth and Bank account + routing number, and in case it turns out to be an elaborate scam, can the miscreants wreak havoc like steal from my account , make purchases or sell my info on the deepweb/darkweb/darknet/whatever , ?? I looked at : and but that didn't satisfactorily answer my question. I called my bank (bofa) thrice, each time I was put on hold for >1hour and call got disconnected. PS: In 2015, after signing up for one vpn (private internet access) and connecting to it via my mobile phone, my entire bofa checkings account was emptied in less than an hour with purchases being made all over the world. Bofa gave me my money after a week. ^ | A man in west coast Austria wants to deposit money into my account. I'm in Alabama. I had to get an online account. I did that, but he says his bank manager needs all this information: DOB SSN online access username online access password security question and answer bank name bank address bank number person who is on the account their name their address account no routing no OK. Is it safe to do this or am I being scammed? I don't want him to be able to end up withdrawing all my money instead of depositing money. |
I have learned EFA and CFA in SPSS/ AMOS and a basic understanding of why they work (but in a non-mathematical way, which makes me feel I might have some fundamental misconceptions, and hence this question). I wanted to know what are some good books/ lectures/ notes to learn the theoretical foundations of EFA and CFA, from beginner's to advanced levels of understanding. I know that might be a lot to learn, I plan to learn it as soon as possible, but would not mind if learning it too quickly is not possible, and would be grateful for resources that take longer to learn too. I am comfortable with UG level mathematics (in my final year currently). | Is there any "state of the art" book on SEM/CFA that you can recommend? I am looking for something that offers both some theory and some practice and I am using R with lavaan. I am a psychologist and mainly interested in CFA to test questionnaire structure, etc. Please note why your book of choice is worth reading. |
I am trying to learn how to tweak my shell in the file but can't seems to find the file in my home directory or in /etc/profile. Is there any other file I need to search for, or am I expected to create one from scratch? | I can't find .bash_profile in Ubuntu 14.04 in my /home/user directory. I used the ls -a command to see the .bash_profile, but there isn't such a file. |
At the risk of asking a duplicate question (a few searches yielded no good question/answer), and after messing this up royally myself () I am going to ask: What is a least-trouble some but still effective way to move my user data onto a separate drive. Goals: OS/boot drive is used pretty much for booting and OS and Programs only Data disk is for all conceivable user data (Photos, Videos, etc) If I by change remove "Data" drive, have Windows still be fully operational What I did in the linked question, was me using a hard link/junction to point C:\Users to D:\Users. It worked perfectly for me, until I removed drive D and booted Windows, causing Windows to not be able to load User Profile. And reattaching drive D, it did not fix my User Profile service issue and I did an OS reinstall to fix it. So I am looking for a safer option, where my Data is still on another drive, but I can remove and replug drives as needed, with Windows breaking and still having a "Data" drive when I plug it back, with minimal recovery procedures (in case Windows complains about it missing) | When I format the computer and reinstall Windows, my first step is move the My Documents folder to another partition. In Windows XP it wasn't enough because the desktop folder and another user folders was in the primary partition. Now in Windows Vista and 7 we can use junctions/symlinks to "move" the folder to another partition and Windows and another programs will think that the data is in the primary partition. What the fastest and secure steps to move the Users folder to another partition and to create the hardlinks correctly? |
I changed my password and shortly afterward was no longer able to access my Gmail account. How can I sign into my email again? | I have forgotten the password or username for my Google account, or I'm unable to access my account for other reasons. How can I recover my account? (This Q&A is meant as a general description for all Google and Gmail username/password questions. See: ) |
I'm looking to print a dash "-" until the end of the user's screen. Basically my program would print a line of text and then a line of dashes beneath it and then another line of text. This would be done so that the user can easily distinguish between the first and second line. Something like this: First line of text -------------------------------------------------------------------------------------- Second line of text Is there a way for me to do this using the standard python 2.6 libraries. I cannot use any additional libraries such as texttable or a newer version of Python. | Is there a way in python to programmatically determine the width of the console? I mean the number of characters that fits in one line without wrapping, not the pixel width of the window. Edit Looking for a solution that works on Linux |
When using the exam class, is there a way to change the formatting of \fillin[][] command so I can increase the vertical space between text and underline? please see the output of the following code \documentclass[answers]{exam} \usepackage{amsmath,amsbsy,amssymb,amsthm,xcolor} \usepackage{blkarray,mathrsfs,amsrefs,amsfonts,enumerate,pifont,enumitem} \newcommand{\ans}{\vskip0.01in {\color{blue}\textbf{Answer:}}} \begin{document} \begin{questions} \question $f(x) = x-1$ and $g(x) = \frac{1}{x+1},$ find: \begin{enumerate}[font=\color{magenta} \Large, label=(\alph*)] \item $(g\circ g)(x)$ and $(g\circ g)(5)$ \ans \fillin[$(g\circ g)(x)=g(g(x))=\frac{1}{\frac{1}{x+1}+1}=\frac{1+x}{2+x}$ and $(g\circ g)(5)=\frac67$][4.5in] \end{enumerate} \end{questions} \end{document} Thanks | I am using an exam package and the following code \fillin[$P(X\le6)-P(X\le3)$][3.7in] but there is an vertical space issue which I could not find a solution for it between the equation and the horizontal line. Please see the picture |
I'm looking for a Linux command that does literally nothing, doesn't output anything, but stays alive until ^C. while true; do; done is not a good solution, because it is CPU intensive. | I have a program which produces useful information on stdout but also reads from stdin. I want to redirect its standard output to a file without providing anything on standard input. So far, so good: I can do: program > output and don't do anything in the tty. However, the problem is I want to do this in the background. If I do: program > output & the program will get suspended ("suspended (tty input)"). If I do: program < /dev/null > output & the program terminates immediately because it reaches EOF. It seems that what I need is to pipe into program something which does not do anything for an indefinite amount of time and does not read stdin. The following approaches work: while true; do sleep 100; done | program > output & mkfifo fifo && cat fifo | program > output & tail -f /dev/null | program > output & However, this is all very ugly. There has to be an elegant way, using standard Unix utilities, to "do nothing, indefinitely" (to paraphrase man true). How could I achieve this? (My main criteria for elegance here: no temporary files; no busy-waiting or periodic wakeups; no exotic utilities; as short as possible.) |
I just upgraded from Debian Squeeze to Wheezy and mysql stopped working. Blindly following without any understanding of what I was doing, I removed ibdata1 in an attempt to solve the problem. Unfortunately, it was only after doing so that I realised this was a terrible idea, especially as I was missing this option in my.cnf: innodb_file_per_table = 1. I found the cause of my problem and now my DB server is working again. However, now, I am left with a mess. My problem is that some (but not all) of my tables, which appear when I do show tables;, are giving me this error: ERROR 1146 (42S02): Table 'db.tablename' doesn't exist I have since enabled the setting innodb_file_per_table = 1 (perhaps this was a bad idea?) and before I came to realise that I probably didn't have a chance, I was trying out the innodb_force_recovery flags. I'm fairly confident that these tables are gone for good so I'm trying to restore my database from earlier dumps. The problem is that the import breaks on these tables that "do but don't" exist. I have tried dropping the database before doing the import but there are clearly some other files lying around. Needless to say I'm reluctant to do any more speculative deletion of files... Any advice on how to clean up this mess? | My WAMP directory accidentally get deleted by another user. Only data folder in MySQLis available. And, in that only database-folders (folders in "\bin\mysql\mysql5.6.12\data\" with name of databases) are available. All files including "ibdata1" in root of "\bin\mysql\mysql5.6.12\data\" are also deleted. The database folders contains files with below extensions only. *.frm, *.ibd and "db.opt" file. How the databases can be recovered? I already have tried to recover bdata1. But, unable to get it back. And, some database contains MYISAM also. |
Q: Calculate $$S=1+{3\over4}+{3\times5\over4\times8}+{3\times5\times7\over4\times8\times12}+\dots$$ I calculated that the $n$th term is given by $$ \begin{align} A_n&={3\times5\times7\times\dots\times(2n+1)\over4\times8\times12\times\dots\times4n}\\ &={{(2n+1)!\over2\times4\times8\dots\times2n}\over4^nn!}\\ &={(2n+1)!\over8^n(n!)^2} \end{align}$$ Hence $$S=\sum_{n=0}^{\infty}{(2n+1)!\over8^n(n!)^2} =\sum_{n=0}^{\infty}{\binom{2n}{n}(2n+1){1\over8^n}}$$ I'm not sure how to proceed I feel like generating function for $\sum{\binom{2n}{n}(2n+1)}$ would be helpful but don't know how to derieve it. | How to find infinite sum How to find infinite sum $$1+\dfrac13+\dfrac{1\cdot3}{3\cdot6}+\dfrac{1\cdot3\cdot5}{3\cdot6\cdot9}+\dfrac{1\cdot3\cdot5\cdot7}{3\cdot6\cdot9\cdot12}+\dots? $$ I can see that 3 cancels out after 1/3, but what next? I can't go further. |
How do I use the command line interface (not a GUI) to convert the list of dependency packages in the output from apt-cache depends into a space‐separated list for use with apt-get download? Preferably, I’d like the two actions to be executable via a single command. (By “list of dependency packages”, I’m referring to all packages prefixed by the string “Depends:”.) The use case is to download all dependent packages of a package onto a machine with Internet access for use on a machine without Internet access as well as to teach myself how to reformat text via the command line. One example with a long list of dependencies involves the command apt-cache depends gimp, the output of which is shown below. (This example includes a few dependencies listed multiple times, but apt-get download apparently ignores duplicate entries, so there’s no need to filter them out.) gimp Depends: libgimp2.0 Depends: libgimp2.0 Depends: gimp-data Depends: gimp-data Depends: libgdk-pixbuf2.0-0 Depends: xdg-utils Depends: libaa1 Depends: libbabl-0.1-0 Depends: libbz2-1.0 Depends: libc6 Depends: libcairo2 Depends: libfontconfig1 Depends: libfreetype6 Depends: libgcc1 Depends: libgegl-0.4-0 Depends: libgexiv2-2 Depends: libglib2.0-0 Depends: libgs9 Depends: libgtk2.0-0 Depends: libgudev-1.0-0 Depends: libharfbuzz0b Depends: libheif1 Depends: libilmbase23 Depends: libjpeg8 Depends: liblcms2-2 Depends: liblzma5 Depends: libmng2 Depends: libmypaint-1.3-0 Depends: libopenexr23 Depends: libopenjp2-7 Depends: libpango-1.0-0 Depends: libpangocairo-1.0-0 Depends: libpangoft2-1.0-0 Depends: libpng16-16 Depends: libpoppler-glib8 Depends: librsvg2-2 Depends: libstdc++6 Depends: libtiff5 Depends: libwebp6 Depends: libwebpdemux2 Depends: libwebpmux3 Depends: libwmf0.2-7 Depends: libx11-6 Depends: libxcursor1 Depends: libxext6 Depends: libxfixes3 Depends: libxmu6 Depends: libxpm4 Depends: zlib1g Breaks: gimp-plugin-registry Recommends: ghostscript ghostscript:i386 |Suggests: gimp-help-en Suggests: <gimp-help> gimp-help-ca gimp-help-de gimp-help-el gimp-help-en gimp-help-es gimp-help-fr gimp-help-it gimp-help-ja gimp-help-ko gimp-help-nl gimp-help-nn gimp-help-pt gimp-help-ru gimp-help-sl gimp-help-sv Suggests: gimp-data-extras Suggests: gimp-python Suggests: gvfs-backends gvfs-backends:i386 Suggests: libasound2 liboss4-salsa-asound2 Replaces: gimp-plugin-registry | I have a friend who has got a computer that is not connected to the Internet. Is there any way to install software offline easily? |
All, I have a dataset that contains more than 45k rows and 2 columns. Below is dput() of first 50 rows. One thing to consider is that category column contains 34 factor of different levels. I am using Logistic regression model to predict the category based on other two columns. Below is my model. However, I am getting warning in my model. I Googled the warning, and found that there might be linear relationship between my DV(Dependent Variable) and IV (Independent Variable). I am not sure how to deal with this warning. Some post suggested to perform Log transformation, but not sure How to perform in my model. Being a newbie to R if you could provide an explanation of how to deal with the warning that will be great. > dput(droplevels(head(new_df1, 10))) structure(list(category = structure(c(1L, 5L, 7L, 8L, 9L, 10L, 2L, 3L, 4L, 6L), .Label = c("", "baking", "canned", "crackers", "DELI", "dessert", "MEAT", "NUTRITION", "PASTRY", "PRODUCE"), class = "factor"), quantity = c(5L, 27L, 3L, 1L, 29L, 94L, 70L, 20L, 12L, 122L ), sales_value = c(11.6, 86.83, 13.46, 2, 52.4, 133.75, 160.15, 38.81, 29.91, 208.75)), row.names = c(NA, 10L), class = "data.frame") > dput(droplevels(head(new_df1, 50))) structure(list(category = structure(c(1L, 5L, 20L, 21L, 24L, 27L, 2L, 3L, 4L, 6L, 7L, 8L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 22L, 23L, 25L, 26L, 28L, 1L, 5L, 20L, 21L, 24L, 27L, 2L, 3L, 4L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 15L, 16L, 17L, 18L, 19L, 22L), .Label = c("", "baking", "canned", "crackers", "DELI", "dessert", "drinks", "drug", "ethnic", "food", "food add-ons", "frozen dessert", "frozen food", "frozen meat", "fruit", "health", "household", "instant dinner", "meat", "MEAT", "NUTRITION", "other", "packaged foods", "PASTRY", "personal care", "produce", "PRODUCE", "seasonal"), class = "factor"), quantity = c(5L, 27L, 3L, 1L, 29L, 94L, 70L, 20L, 12L, 122L, 81L, 1L, 78L, 82L, 30L, 7L, 1L, 33L, 5L, 56L, 4L, 66L, 5L, 45L, 37L, 36L, 3L, 1L, 41L, 2L, 18L, 20L, 115L, 83L, 32L, 24L, 118L, 72L, 2L, 1L, 73L, 92L, 44L, 16L, 21L, 1L, 57L, 1L, 68L, 14L), sales_value = c(11.6, 86.83, 13.46, 2, 52.4, 133.75, 160.15, 38.81, 29.91, 208.75, 204.38, 3.99, 128.27, 193.84, 56.27, 11.75, 1.5, 41.59, 33.51, 140.42, 7, 170.11, 14.08, 84.93, 111.53, 33.62, 2.07, 2.99, 125.34, 4.45, 46.33, 42.91, 132.35, 181.04, 51.64, 59.91, 260.86, 189.15, 12.68, 1.09, 115.18, 210.44, 111.53, 31.4, 25.16, 2.29, 142.57, 2.5, 179.86, 59.28)), row.names = c(NA, 50L), class = "data.frame") My model fit_glm = glm(category~.,new_df1,family = 'binomial') Warning: Warning message: glm.fit: fitted probabilities numerically 0 or 1 occurred | If you have a variable which perfectly separates zeroes and ones in target variable, R will yield the following "perfect or quasi perfect separation" warning message: Warning message: glm.fit: fitted probabilities numerically 0 or 1 occurred We still get the model but the coefficient estimates are inflated. How do you deal with this in practice? |
I'd like to see the list of questions and answers where I have left a upvote/downvote. I also would like to see a list of comments that I have upvoted. Today I only have the count of upvotes/downvotes but no tracking available. Right know I'm trying to remember where I left a upvote for a really interesting comment. I'd like to copy/mention a phrase of that comment to a blog post I'm writing. For example: if I click one of my tags, I'm presented with a list of questions I've answered that were tagged with that specific tag. This is the kind of functionality that would help me track my upvotes/downvotes. I tried Google but couldn't get to the question that contain that specific comment I'm looking for. Edit: I just found the phrase using Google. This is the query I used: This is the phrase: There's a saying: When you finish your bachelor's, you think you know everything; When you finish your master's, you realize you know nothing; When you finish your doctorate, you realize nobody knows anything, including whether or not you needed to finish a doctorate to realize that. Note: I didn't find the comment I upvoted but just found an answer that has the same phrase. | Consider the following situation: I downvote a question / answer with a comment The answerer / asker edits the question and improves it In that case, I think the downvote should be removed. I know it's possible to find my downvotes by going to: http://stackoverflow.com/users/1438393/?tab=votes&sort=downvote but that requires me going to each and every post, check if it was edited etc. I was wondering if it can be done with the . I've looked at the existing queries searched for a similar one but couldn't find anything except and . (I've seen answer by Jeff and this is just a personal view) So, my question is: how can I list the posts that I downvoted that were edited later? |
Let $\scr{A}$ be an algebra of subsets. Let $(\Omega, \sigma(\mathscr{A}), P)$ be a probability space. Then for each $B \in \sigma(\scr{A})$ and $\epsilon > 0$, there exists $A \in \scr{A}$ such that $$P(A \Delta B) := P((A \setminus B) \cup (B \setminus A)) < \epsilon.$$ There is a suggestion to consider a collection of such all sets $B$ satisfying the condition. I guess I should look at $$G = \{B \subseteq \Omega :\ \mbox{there exists} \ A \in \mathscr{A} \ \mbox{such that} \ P^*(A \Delta B) < \epsilon \ \forall \epsilon > 0\}$$ (I am not sure here that I should use the measure $P$, or its corresponding outer measure $P^*$ instead). I find that the hint does not much helpful for me, can anyone suggest more about this problem ? | Theorem. Let $(X,\mathcal B,\mu)$ a finite measure space, where $\mu$ is a positive measure. Let $\mathcal A\subset \mathcal B$ an algebra generating $\cal B$. Then for all $B\in\cal B$ and $\varepsilon>0$, we can find $A\in\cal A$ such that $$\mu(A\Delta B)=\mu(A\cup B)-\mu(A\cap B)<\varepsilon.$$ I don't think there is a proof in this site. It's a useful result for several reasons: We know what the algebra generated by a collection of sets is, but not what the generated $\sigma$-algebra is. The map $\rho\colon \cal B\times\cal B\to \Bbb R_+$, $\rho(A,A')=\mu(A\Delta A')$ gives a pseudo-metric on $\cal B$. This makes a link between generating for an algebra and dense for the pseudo-metric. We say that a $\sigma$-algebra is separable if it's generated by a countable class of sets. In this case, the algebra generated by this class is countable. An with the mentioned result, we can show that $L^p(\mu)$ is separable for $1\leq p<\infty$, which makes a link between the two notions. In ergodic theory, we have to test mixing conditions only an a generating algebra, not on all the $\sigma$-algebra. |
Since I updated Ubuntu, I am not able to go to login screen. It just keeps on loading but it never goes to the login screen. I logged in using Ctrl+Alt+F1. I typed username and password then this message popped up - "this ubuntu 12.04 system is past its end of life and is no longer receiving security updates. To protect the integrity of this system, it is critical that you enable extended security maintenance updates." followed by a link to ubuntu.com. I just want to login. | I just did a do-release-upgrade going from Ubuntu 16.04 to 17.04. However, now when I login via SSH I have the following message Welcome to Ubuntu 17.04 (GNU/Linux 4.10.0-20-generic x86_64) * Documentation: https://help.ubuntu.com * Management: https://landscape.canonical.com * Support: https://ubuntu.com/advantage Ubuntu 12.04 LTS end-of-life was April 28, 2017 -- Upgrade your Precise systems! $ sudo do-release-upgrade -m server 0 packages can be updated. 0 updates are security updates. My question is, how can I remove the Ubuntu 12.04 LTS end-of-life was April 28, 2017 -- Upgrade your Precise systems! $ sudo do-release-upgrade -m server it wasn't there prior the release-upgrade I checked and I am on Zesty lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 17.04 Release: 17.04 Codename: zesty My question is not, how can I remove this message, this I found. My question is more, is there a reason why this appears after a release-upgrade? Is this message something generic not taking into consideration the current version of Ubuntu? Or maybe my system is not updated properly? |
If I accept an answer in my question, how can I retract my proposal (and accept another)? Furthermore, will I lose any reputation retracting answer acception? Will the answerer lose any reputation with his answer being retracted? | What does it mean to accept an answer? How do I accept an answer, and what are the rules? Can I accept my own self-answer? What are the reputation benefits? Which answer should I accept? Should I upvote the accepted answer? What should I do if none of the answers are suitable? For more information, see "" in the . |
For example consider a database that has many SP and many query execute on it using ORMs. It's very time consuming that check every SP or profile all queries that ORMs generate for performance and missing index problem. Is there any way to get missing index statistics for all SP and queries? thanks | tool available to find missing indexes in mssql 2008 ? can we find the missing index using Database Engine Tuning Advisor |
I'm attempting to create a better logging situation for myself. Currently I'm just custom writing a string and logging that string. What I'd like to do instead is know the exact Class#method combination that I'm logging. Currently I'm writing it out such as: Logger.push(String s) where s is something like "ClassA#myMethod: Successfully implemented database What I want to do it make it a little easier on myself, my reducing the text I have to write if possible. I don't want to have to type ClassA#myMethod, instead what I want to do is pass a method and use reflection to get the desired names. Here's the example logger function I've created: public static void push(String msg, Method cont){ logger.info(cont.getDeclaringClass().getSimpleName() + "#" + cont.getName() + ": " + msg); } My issue is with passing the method. Ideally I'm looking for something like this, but for the actual method. Currently the only way I could think of is something like: Logger.push("Hello World", getClass().getDeclaredMethods("thisMethodName"); I was just wondering if there was an easier to get the currently used function. Thanks! | I need to find the caller of a method. Is it possible using stacktrace or reflection? |
Let $R$ be an integrally closed domain and let $K$ be its fraction field. Let $L\supseteq K$ be a field. If $\alpha\in L$ is integral over $R$ (i.e. if it satisfies a monic polynomial in $R[x]$), does its minimal polynomial over $K$ lie in $R[x]$? CONTEXT: I'm trying to prove that the trace $t_{L/K}$ of integral elements lie in $R$ (provided that the extension $L/K$ is finite). I'm trying to use the fact that the trace of $\alpha$ is an integer multiple of certain coefficient of its minimal polynomial, so this trace lies in $R$ if such coefficient does. Since $\alpha$ satisfies an integral relation $p(\alpha)=0$ over $R$, it's minimal polynomial $q$ over $K$ exists and it divides $p$, does it imply that $q\in R[x]$? if so, then I'd be done. It's clear that the result is true if $R$ is a UFD. In such a case, it's only a matter of looking at the unique factorization of the polynomial in $R[x]$ and apply Gauss' lemma. However, I don't see a straight proof nor counter example in the general case. | I am having some trouble understanding Proposition 5.15 in Introduction to Commutative Algebra by Atiyah and Macdonald. Let $A\subset B$ be integral domains, $A$ integrally closed, and $x\in B$ be integral over an ideal $\mathfrak{a}$ of $A$. Then $x$ is algebraic over the field of fractions $K$ of $A$, and if its minimal polynomial over $K$ is $t^n+a_1t^{n-1} + \cdots + a_n$, then the $a_1, a_2, \ldots , a_n$ all lie in the radical of $\mathfrak{a}$. The proof of the proposition states that the coefficients of the minimal polynomial of $x$ are polynomials in the $x_i$ (the conjugates of $x$). I don't understand this, and am struggling with the rest of the proof as well. Thanks for any help. |
I am trying to solve this enigma: int direction = 1; char direction_name = direction["nsew"]; Like why does it compile on a first place, what exactly is it trying to prove and what is it used for ? I spotted this code in a site with no relevant explanation other than "[] is symmetric". I mean what am I supposed to do with this information.. | As Joel points out in , in (aka: K & R), there is mention of this property of arrays in C: a[5] == 5[a] Joel says that it's because of pointer arithmetic but I still don't understand. Why does a[5] == 5[a]? |
Basically, there is no error in the following steps(as it seems), but there is some error due to which 2 + 2 = 5. What is it? -20 = -20 16-36 = 25-45 16-36+(81/4) = 25-45+(81/4) (4^2)-(2*4*9/2)+((9/2)^2) = (5^2)-(2*5*(9/2))+((9/2)^2) (4-(9/2))^2 = (5-(9/2))^2 4-(9/2) = 5-(9/2) 4 = 5 2+2 = 5 | $$\begin{align} 2+2 &= 4 - \frac92 +\frac92\\ &= \sqrt{\left(4-\frac92\right)^2} +\frac92\\ &= \sqrt{16 -2\times4\times\frac92 +\left(\frac92\right)^2} + \frac92\\ &= \sqrt{16 -36 + \left(\frac92\right)^2} +\frac92\\ &= \sqrt {-20 +\left(\frac92\right)^2} + \frac92\\ &= \sqrt{25-45 +\left(\frac92\right)^2} +\frac92\\ &= \sqrt {5^2 -2\times5\times\frac92 + \left(\frac92\right) ^2} + \frac92\\ &= \sqrt {\left(5-\frac92\right)^2} +\frac92\\ &= 5 + \frac92 - \frac92 \\ &= 5\end{align}$$ Where did I go wrong |
I use command line a lot, like most programmers. I want to be able to launch Finder, Safari or any other application for that matter from command line e.g. finder . where it will start Finder app, and the set the view to the current folder that I am in at the command line. | If I am in a specific path in a Terminal window, how can I open that same window in a new Finder window? Note: This is the opposite of . |
Related to question. Is it possible in comment too or only in question and answer? I tried this but it didn't work. <kbd>CTRL</kbd>+<kbd>Z</kbd> | What special formatting tricks can be done in the comments now? Proven: **text** or __text__ = Bolding = text *text* or _text_ = Italics = text `text` = Code Formatting = text [example](http://example.com "title") Inline links with title and text http://example.com plain old links Disproven: Cannot insert <kbd> (i.e. F12) characters Cannot use #[text] to increase size |
Should I add @Override annotation when overriding doGet() and doPost() methods from javax.servlet.http.HttpServlet? For example: @WebServlet("/") public class MyServlet extends HttpServlet { @Override protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { /* my code */ } } I've never seen code that adds @Override annotation to servlet code. | 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? |
I ran in to this problem today, and I seem to have trouble. Suppose $p$ is prime, $p = 1\mod4$, and that $a^2+b^2=p$ with $a$ odd and positive. Show that $(\frac{a}{p}) = 1$. How can I show that this holds true? | Let a,b be integers and p be an odd prime. if $p$=$a^2+b^2$ and a is odd, prove $(a/p)$ which is legendre symbol = $1$ what i have done is that : because p and a are odd, b must be even and p is the form of $4k+1$ ($k$ is integer) and after this, how to prove it ? |
New users posting thanks, comments or new questions as answers on existing questions is very common. It is also something that should be easily handled by the community itself, without requiring diamond moderators to intervene. The action that need to be taken in such a case are: commenting on the post to explain that answers shouldn't be used in this way deleting the post in rare cases where the post contains valuable information, but isn't an answer, it can be converted to a comment Problems with the current tools Commenting can be done by the community, though . In theory, the community can delete such posts. The post needs to be downvoted and three 20k+ users need to vote to delete it. There are several problems with that, making community deletion rather rare. The other problem with community deletion is that the bar is very high, there just aren't that many 20k+ users on most site. And reputation alone isn't a very good way to determine who should have access to that kind of moderator tool. Conversion to comment is a mod-only feature, and probably should stay that way. The temptation to do the nicer thing and just convert to a comment when the post should probably be deleted is pretty high. My possible solution There are a lot of users that know the SE system well and can reliably identify non-answers, but don't have the 20k reputation necessary to fully act on them. It shouldn't be too hard to identify these user based on their flagging volume and success. I think that a criterium like "flagged x posts as not an answer with at least y% declared valid" would be a far better way to identify trustworthy users than the current 20k+ reputation requirement. For those users that are determined to be trustworthy, either the "not an answer" flags should automatically delete the post when enough of them are cast by trusted users and if at least one of them has commented on the post. This would enable those users to deal with "not an answer" flags without requiring a moderator to step in. As a way to safeguard these expanded privileges against abuse or mistakes I'd suggest that even a single "disputed" flag would disable the automatic mechanisms and force the flag to be handled by a diamond moderator. A different possibility would be to just give those users a delete link on "not an answer"-flagged posts. | are pretty cool... You get a birds-eye view of activity on the site, a "dashboard" view of what's happening. Some of the individual tools haven't scaled particularly well with Stack Overflow's growth, but the concept behind them is still sound: we trust you to enough to be a bee watcher now. ...and then there's . What a let-down! Once upon a time, this queue contained spam and offensive flags, which one might reasonably assume were important enough to put in front of the more trusted members of the site. Re-flagging them brought them that much closer to deletion, while editing them offered salvation to some hapless author. Nowadays, it's a bunch of Not an Answer flags and a smattering of assorted cruft. 10K users can't even vote to delete these; only 20K users have that privilege. Re-flagging them does nothing but increase their priority in the moderator flag queue, where they frequently outrank more pressing issues; has . Also, it's , and the behavior has diverged far enough from that of the moderator flag queue on which it is based that it has become an active hindrance to further development of the tooling there. Worst of all, we have that's available to anyone with the editing privilege. It even has logic built in to prioritize answers likely to be deleted for users with . It's like we gave you a car for your 10th birthday, and then replaced it with a rusty bicycle when you turned 16. It was a nice idea, but it has outlived its usefulness. Proposed changes The /tools/flagged route goes away. Period. No replacement. The rest of the 10K tools stick around as informational pages. Not an Answer flags go into /review/low-quality, . Then we beef up the Low Quality review process to make better use of more experienced reviewers and solve this whole "declined / helpful / disputed" flag debate once and for all: Effective # of reviews required == ReviewsRequired + # of applicable flags (where ReviewsRequired is 2 on Stack Overflow, 1 everywhere else). So 1 VLQ or NAA flag means EffectiveReviewsRequired=3. LQ tasks are not dequeued until one of the following conditions is met: Post is edited from within review. Outcome: flags are marked "helpful" (current behavior). Post accumulates 3 Delete votes (can only happen when post scores <= 0 and reviewers have >= 20K rep). Outcome: post is deleted, flags are marked "helpful". Task accumulates EffectiveReviewsRequired "Looks Good" reviews. Outcome: if the number of (Recommend)Delete reviews is >= the number of Looks Good reviews, mark flags "disputed" and raise DisputedLowQuality mod flag. Otherwise, mark flags "declined". Task accumulates 6* RecommendDelete + Delete reviews. Outcome: mark flags "helpful". If the post scores > 0 then raise DisputedLowQuality mod flag, else just delete post (current behavior). As under the current system, flags on posts that've already completed one full review cycle without being deleted should skip /review and go directly into the mod queue. End result Flags get handled faster, more accurately, and with less wasted effort from 10K reviewers. Moderators are free to focus on situations that can't be handled by the community - the ! Developers are free to make enhancements to the moderator tooling without having to work around 10K user restrictions. Questions Am I forgetting anything here? I haven't really spent much time in the 10K flag queue since back when it was filled with spam flags and therefore useful - is there a use-case that you depend on that would be lost with its removal? Post 'em below. *: on Stack Overflow, only . |
I want to show the following converse of an (apparently) common integration theory exercise. Suppose $f:[0,1]\rightarrow\mathbb R$ is integrable, then $$\sum_{n=1}^\infty 2^n\lambda(\{\lvert f\rvert\ge 2^n\})<\infty.$$ Since series convergence is annoying to prove, I thought the best way to tackle this problem would be by assuming that the series doesn't converge, then showing that $f$ can't be integrable. However, I couldn't get much from the series not converging, as the terms of the series might well go to $0$ even if the series doesn't converge. Is there something I'm missing to make this approach work? Or is a direct proof easier somehow? | I need help proving that if f is Lebesgue integrable then $$\sum_{k \in \mathbb{Z}}{ 2^k*m(|f| > 2^k)}$$ converges. I proved the opposite direction but I don't know how to put any bounds on each term, I would appreciate hints/suggestions. |
one day you were standing on the shore of a small lake. you looked out onto the water and saw a boat. in the boat were two men with five huge steel beams. the men were sidling the beams out of the boat and into the lake. if you could actually see it or measure it, would the level of the water in the lake be rising, falling, or staying the same? | This comes from a brain teaser but I'm not sure I can solve it: You are in a rowing boat on a lake. A large heavy rock is also in the boat. You heave the rock overboard. It sinks to the bottom of the lake. What happens to the water level in the lake? Does it rise, fall or stay the same? I'd say that the water level drops, because when you drop the stone in the lake, the water level rises according to the volume of the stone, BUT the water level decreases by a volume of water weighting the stone's weight, when you take it off the boat. Is that correct? |
I'm pretty new to leaflet and I'm trying to figure out how to use Google Streetview with Leaflet. What I would like to have is the Google pegman in the right bottom of my map so that I can click and drag it to have the street view : Can anyone provide me with an example of the Javascript/HTML code that allows to do this ? | The person who asked the question at the link below way back in 2011 said, "I understand that it is possible to incorporate Google StreetView into non-Google apps". Can anyone tell me how this is possible? I'd like to add street view functionality to my leaflet map. |
I made this account a couple of years ago, however this email address is no longer in use (it exists, but I can't access it). Is it possible to merge this Stack Overflow account with my new one? P.S. The only way I can use to log in to this account (and prove it's mine) is because I'm automatically logged in in the app. Update: I do not know the password to this account. | I accidentally posted a question without being logged in. Is there a way to associate that question with my account? For more information, visit "" in the . a.k.a. How can you link a registered account to a cookie-based account? a.k.a. How do I merge an unregistered account with a registered account a.k.a. Merging users a.k.a. How do I associate anonymous questions I’ve asked with my registered account? a.k.a. Is there a way to claim an unregistered user? (in case anyone searches with those terms) |
In Sweden, if your name is Sven Andersson and there is a person of interest (for any reason) that has the same name as you, there is a slightly affectionate word you can use where you say that this person (that you often don't know at all) is your namne (namn means name). Is there a similar word in English, and how does the usage differ, if at all? | I believe it's a common practice in some communities to name children after their grandparents or parents or relatives and sometimes even friends and popular people. Places, roads, streets etc., get named after famous people, too. Many inventions and discoveries have been named after people who invented or discovered them. But I am not yet aware of a term that refers to the person whose name is given to people, places or objects this way. Is there a suitable word to fill in the blank below? They named their son after the famous football player, David Beckham. David Beckham is .......... of their son. |
I have this echo $line Thisisaline. I was wondering why is this not working: if [[ "$line" =~ "[a-zA-Z]+\.$" ]] ; then echo "hello"; fi Above regex gives no output. | The following code number=1 if [[ $number =~ [0-9] ]] then echo matched fi works. If I try to use quotes in the regex, however, it stops: number=1 if [[ $number =~ "[0-9]" ]] then echo matched fi I tried "\[0-9\]", too. What am I missing? Funnily enough, suggests this should work. Bash version 3.2.39. |
From a chemical scientific stand point... What roles does salt play in food besides the usual afterthought of sprinkling some on top of your food item to increase/enhance the flavor. I know this is vague so lets just say bread. Why all these years have chefs/food scientist bothered adding salt to almost every bread recipe? Does salt control moisture? Does salt control yeast activity? does salt control sugar regulation between the yeast through osmosis? (Side not: Sorry if some of this is worded oddly. There thoughts straight off the brain.) | I was always taught to add a pinch of salt to flour when baking (mainly cakes / muffins and puddings). I have recipes that specifically mention adding salt and others that don't. Is there a scientific reason to add salt? |
It seems that a Jordan basis, for, say, an operator $φ:V→V$ with $V$ a vector space can have several Jordan bases. However I don't see how this is true and I didn't achieve to prove it. Indeed I tried assuming the uniquness of a Jordan basis of $\varphi$ to achieve a contradiction but I did not find any.. I also looked up on mathstack but the only thing I found was this: And it doesn't realy help because I'm more looking for the general case, which is unclear to me. Could anyone explain why this is true and help me proving it ? | Is Jordan basis unique? I have a 4x4 matrix, find eigenvectors and one generalized eigenvector, also trying different linearly independent eigenvectors but the matrix P so that PJP^-1 =A only works for certain vector. \begin{pmatrix}-\frac{1}{2}&0&-\frac{1}{2}&0\\ \frac{3}{2}&0&\frac{1}{2}&0\\ -\frac{3}{2}&0&-\frac{3}{2}&-1\\ 1&1&1&1\end{pmatrix}\begin{pmatrix}1&-1&0&-1\\ 0&2&0&1\\ -2&1&-1&1\\ 2&-1&2&0\end{pmatrix}\begin{pmatrix}1&1&0&0\\ -1&0&1&1\\ -3&-1&0&0\\ 3&0&-1&0\end{pmatrix}=\begin{pmatrix}-1&0&0&0\\ 0&1&0&-1\\ 0&0&1&1\\ 0&0&0&1\end{pmatrix} |
For example if I have the lists: x = [1,2,3,4,5,6] y = [4,3,2,5,6,7] How do I subtract my lists in order to get: z = "x-y" = [1-4,2-3,3-2,4-5,5-6,6-7] z = [-3,-1,1,-1,-1,-1] ? Meaning, as long as the numbers from my lists share the same index then subtract them. Thanks in advance. | Right now I have vector3 values represented as lists. is there a way to subtract 2 of these like vector3 values, like [2,2,2] - [1,1,1] = [1,1,1] Should I use tuples? If none of them defines these operands on these types, can I define it instead? If not, should I create a new vector3 class? |
I have installed Ubuntu Server 18.04 on an old notebook for home purposes (SAMBA, Transmission, etc...). When I open it, it shows me . It remains for about 2-3 minutes and it slows the boot process. How can I remove this screen? | There is a long time where SSD does nothing. How can I find the fault and fix it ? Already checked /etc/fstab, no swap or anything wrong there (32GB of RAM, no swap) [ 2.173492] usb 2-1.6: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 2.173497] usb 2-1.6: Product: DW375 Bluetooth Module [ 2.173501] usb 2-1.6: Manufacturer: Dell Computer Corp [ 2.173511] usb 2-1.6: SerialNumber: 7CE9D3C0713B [ 2.323728] ata4: SATA link down (SStatus 0 SControl 300) [ 2.441062] input: AlpsPS/2 ALPS GlidePoint as /devices/platform/i8042/serio1/input/input6 [ 2.640309] ata5: SATA link down (SStatus 0 SControl 300) [ 2.954947] ata6: SATA link down (SStatus 0 SControl 300) [ 3.068090] clocksource: Switched to clocksource tsc [ 36.584826] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null) [ 36.726117] ip_tables: (C) 2000-2006 Netfilter Core Team [ 36.732610] systemd[1]: systemd 237 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +AC L +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid) [ 36.751996] systemd[1]: Detected architecture x86-64. [ 36.753867] systemd[1]: Set hostname to <latitude-e5520>. [ 36.868561] systemd[1]: Started Forward Password Requests to Wall Directory Watch. [ 36.868594] systemd[1]: Reached target Remote File Systems. [ 36.868751] systemd[1]: Created slice User and Session Slice. [ 36.868869] systemd[1]: Created slice System Slice. [ 36.868948] systemd[1]: Listening on udev Control Socket. [ 36.868957] systemd[1]: Reached target Slices. [ 36.868996] systemd[1]: Listening on udev Kernel Socket. [ 36.895156] EXT4-fs (sda1): re-mounted. Opts: errors=remount-ro [ 36.898185] lp: driver loaded but no devices found [ 36.903941] ppdev: user-space parallel port driver |
Subsets and Splits