body1
stringlengths 20
4.1k
| body2
stringlengths 23
4.09k
|
---|---|
I need a line break in one of the column headers. I tried using the suggestions from the earlier posts but since the column header is an equation, I couldn't use them. I need the line break in the column header of 4th column as given below :- The code i have written is : \begin {table}[h] \begin{center} \begin{tabular}{|l|l|l|l|} \hline $i$ & $Degree \phi_i$ & $\cos(\phi_i)$ & Product of $\cos(\phi_i)\par K=\prod K_i=\prod\cos(\phi_i)$ \\ \end{tabular} \end{center} \end {table} Thanks in advance | I have some text in a table and I want to add a forced line break. I want to insert a forced line break without having to specify the column width, i.e. something like the following: \begin{tabular}{|c|c|c|} \hline Foo bar & Foo <forced line break here> bar & Foo bar \\ \hline \end{tabular} I know that \\ inserts a line break in most cases, but here it starts a new table row instead. A similar question was asked before: |
var x = 2; var y=x+2<<2; Console.WriteLine(y); output = 16 my doubt is that how 16 is come.i know about bitwise shift left operator.what kind of operation is done. | I've been attempting to learn C in my spare time, and other languages (C#, Java, etc.) have the same concept (and often the same operators) ... What I'm wondering is, at a core level, what does bit-shifting (<<, >>, >>>) do, what problems can it help solve, and what gotchas lurk around the bend? In other words, an absolute beginner's guide to bit shifting in all its goodness. |
I recently reviewed over on SFF in the Low Quality Posts queue. It didn't warrant closure and could do with a small edit so naturally I clicked Edit, did what I needed to do and moved on. Going back through my review history though and navigating to I am met with this: As you can see the body of the review is completely missing and the question is not shown. I did also for it but the question body is shown there. Is this a bug and if so can it be fixed? Looking on a previous I edited on and the review is shown though it was an answer. Further this again doesn't show anything but . Also looking at an on Arqade doesn't show anything like the issue here. It appears as this bug might be affecting questions only and only when Editing from the Low Quality Posts review as the others appear to be fine as far as I can tell. For completeness sake I checked the other types of reviews , and and I can see all of them. | On Ask Ubuntu, when I try to view my Low Quality Posts review history and click on the action taken on questions, I can only see the actions taken and no preview of the question. : The question still exists on the site: It seems question review history page is missing this HTML class: <div class="reviewable-post reviewable-post-post_id"> On the other hand, everything is working fine for answers. |
I'm guessing the {} expansion results in something like _() _ _()_&; _ but I would appreciate if a BASH guru chimed in and explained those characters chaining actions. | I looked at and can't understand how this works. This command "exponentially spawns subprocesses until your box locks up". But why? What I understand less are the colons. user@host$ :(){ :|:& };: |
On ebay there are some $100 hp and dell blade server units that I've seen in action in data center tours. My question is, would a single one with 32gb ram, 4 intel xeon 3ghz processors and NO graphics card be able to run ubuntu? And would ubuntu be able to actually use the entire system? I won't be using it for "big data" per se, but I am thinking of compiling my own custom android builds and building/compiling my own custom build of ubuntu (kind of just for the fun of it, maybe a little for the fact that I'll be able to show off computer prowess). Also, I want to know if a full desktop environment would even run right due to the lack of a graphics card. I might be able to get a graphics card, but if I can avoid it I will at all costs (except for if it exceeds the price of a card). | I'm thinking about installing Ubuntu Desktop, but I don't know what flavor is the best for my system. What are the minimum and recommended hardware requirements? What kind of CPU? How much memory? Should I have Hardware Acceleration? What flavor should I use? This is an attempt of a canonical answer. My answers have the "official requirements", the recommended are a mix of official sources and opinion based (along with the answer it's told the source). You can comment or edit if you feel that the information is obsolete or incomplete. It is a good rule of thumb that any system capable of running Windows Vista, 7, 8, x86 (Intel) OS X will almost always be a lot faster with any Ubuntu flavor even if they are lower-spec than described below. |
I have a large data export that is going through the end user for spot-checking. The data was formatted with tab delimiter, as it contains a lot of prices and measurements containing commas. The problem is that when the user opens the files using excel, excel recognizes all the commas and helpfully formats the data, incorrectly, as a comma delimited file in stead of a tab delimited file. As this is an end-user, I don't want to make them format everything manually each time. Especially because excel isn't delimiting the column headers, causing our end user to scratch his head in confusion and drown his sorrows in coffee. How can I set up the files to make sure that excel does not automatically try and delimit them? Or failing that how can I tell excel to undo the automatic delimiting? | CSV files are automatically associated with Excel but when I open them, all the rows are basically in the first column, like this: It's probably because when Excel thinks "comma-separated values", it actually searches for some other delimiter (I think it's semicolon but it's not important). Now when I have already opened this file in Excel, is there a button or something to tell it "reopen this file and use comma as a delimiter"? I know I can import the data into a new worksheet etc. but I'm asking specifically for a help with situation where I already have a CSV file with commas in it and I want to open it in Excel without creating new workbook or transforming the original file. |
I'm interested in functional equation. I've been thinking about the following functional equation: $$f(x^2+1)={f(x)}^2+1\ \ \ \cdots(\star).$$ I found several functions such as $f(x)=x, x^2+1, (x^2+1)^2+1,\cdots$. Then, I got interested the following question: Find every natural number $n$ such that there exists a $n$-th polynomial which satisfies $(\star).$ Then, I got the following fact: Fact: There exists a $2^k$-th polynomial which satisfies $(\star)$ for any non-negative integer $k$. Proof: Let us define $\{f_k(x)\}$ as the following: $$f_0(x)=x, f_{k+1}(x)={f_k(x)}^2+1\ \ \ \cdots(\star\star).$$ Supposing that both $f_0(x)$ and $f_k(x)$ satisfy $(\star)$, then $f_{k+1}(x)$ also satisfies $(\star)$ because $$f_{k+1}(x^2+1)=\{f_k(x^2+1)\}^2+1=\{{f_k(x)}^2+1\}^2+1={f_{k+1}(x)}^2+1.$$ Hence, $\{f_k(x)\}$ satisfy $(\star)$. Since we know that the degree of $f_k(x)$ is $2^k$ inductively from $(\star\star)$, now the proof is completed. However, I can't prove that there is no other $n$ such that there exists a $n$-th polynomial which satisfies $(\star)$. Then, here is my question. Question: Could you show me how to solve the above question? | Find all polynomials $P$ such that $$P(x^2+1)=P(x)^2+1$$ |
I'm trying to calculate the young modulus of a certain material using it's load-deflection curve. For such, I need to get the slope of the linear part of the curve (just the beginning). But my files contain the whole data, so I tried to remove the rest of the data by restricting the domain as shown in , didn't work. Then I came upon this one: . I thought it would solve my problem but the answer is kind of incomplete, as it only tells how to ignore the beginning of the data which is the opposite of what I want. I also saw a question on how to mod the file but there must be an easier way I'm not seeing. Here's a MWE (with the domain restricted) \usepackage{pgfplots} \usepackage{pgfplotstable} \pgfplotsset{compat=1.12, legend pos=north west, legend style={draw=none}} \begin{tikzpicture} \begin{axis}[xlabel=Deformação (mm),ylabel=Força (N), ymin=0, width=\textwidth, height=\textwidth, scaled ticks=false, ytick={0,10000,20000,30000,40000,50000}] \addplot +[restrict x to domain=7:14] [no markers, red, thick] table [x=Deformacao, y=Forca, col sep=semicolon]{cp2.csv}; \addplot +[restrict x to domain=7:14] [no markers, black, dashed] table [y={create col/linear regression={y=Forca}}, col sep=semicolon]{cp2.csv}; \addlegendentry{CP2} \addlegendentry{E=$\pgfmathprintnumber{\pgfplotstableregressiona}$(N/mm)} \end{axis} \end{tikzpicture} This is the result: Here's the complete data (no domain restriction) And if it's of interest this is the | Based on the MWE of , I want to apply the regression only to a portion of the graph as in , but not just the last portion. I want to do regression on the beginning so that the instruction skip first n=3 do not apply. I can't make it work as I wish, i.e. regression only on the initial part of the graph. The command select coords between index={1}{3} generates an error. \begin{tikzpicture} \begin{axis}[ytick={1,...,6}] \pgfplotstableread{% X Z Y 1 3 0 2 4 1 3 5 2 4 6 6 }\test \addplot[only marks, mark=*] table[x=X, y=Y] {\test}; \addplot[ no markers,dashed, red, select coords between index={1}{3} ] table [ header=false, x=X, y={create col/linear regression={y=Y}}] {\test}; \end{axis} \end{tikzpicture} When commenting the line with select coords between index the regression applies to all graph, and this is not what I want |
When developing a theme wordpress grant us to use front-page and home page templates, so what is the major difference between these two templates as they seems like identical. I also want to know what will be the purpose of index.php file if we have front-page.php or home.php to work like our main index file, I mean server accepts the index file to index as main page or home page so if we name the file front-page or home how it will possible for site indexing. | I'm really confused with index.php, home.php and front-page.php. In many cases even though I had an index.php, I overwrite it with front-page.php. But recently, I became aware about home.php. What's the difference between the home.php and index.php? What's the ideal condition to use a home.php than an index.php? What's the ideal condition to use a front-page.php? When I'm using a front-page.php then what specific task an index.php is doing for me then? I've read the in Codex. Please don't mix my question with Page Templates, I understand 'em, alHamduLILLAH. |
Which is correct in the following example? "The following staff are/is (?) absent today: John Doe Jane Doe Bob Doe" | Which one of these two statements is correct? Our staff do ... Our staff does ... And is staffs ever correct? |
HI I am applying for a Schengen visa. I have one page with both sides blank and two one side blank pages in my passport. Is it enough for Schengen Visa? They say that I need two blank pages. Is it both side blank or will one side blank do? | My Indian passport is almost full, I have 4 blank pages, but not facing pages (1 blank page at the beginning of my passport, one in the middle, and the very last page recto/verso). Do I need to renew my passport or can I apply directly? The rules are not so clear, do the blank pages need to be facing one another, just be consecutive, or it doesn't matter? |
I have very recently purchased Mote E. I have disabled Mobile data and work only with Wifi. Even after this I see I am being charged with 0 MB data usage. enter image description here (Click for full size) I don't understand what is happening here. It is coming very frequently. I am very sure none of the Apps are using it since I uninstalled almost every app that I installed after this problem has arisen. I have checked data usage logs and it says 0 MB data usage and that none of my app have used any mobile data. Why is this happening? Probably some check after wifi gets disconnected? I checked with android debugger but there is too many log statement... anything particular I should be looking at? Any help or suggestion is apprecia | I have very recently purchased Moto E and using Vodafone Karnataka SIM. I have disabled mobile data and work only with WiFi. Even after this, I see I am being charged with 0 MB data usage. (Click for full size) I don't understand what is happening here. It is coming very frequently. I am very sure none of the apps are using it since I uninstalled almost every app that I installed after this problem has arisen. I have checked data usage logs and it says 0 MB data usage and that none of my app have used any mobile data. Why is this happening? Probably some check after WiFi gets disconnected? I checked with Android debugger, but there is too many log statement. Anything particular I should be looking at? Any help or suggestion is appreciated. |
I've been running Windows XP mode on my Windows 7 Laptop for a while now and I've got my VM set up just how I like it. I am switchign laptops due to an intermittent hardware failure. Is it possible to transfer my Windows XP mode VM to my new laptop? I know it's just a Windows Virtual PC VM, how would I go about transferring it if this is possible? Will the Fact that I'm moving from Windows 7 Ultimate to Windows 7 Pro make a difference? AFAIK they both support Windows XP Mode. | At the moment I am running Vista 32 bit and use VPC 2007 a lot. I have several Windows 2000 Virtual Machines set up with complex software configurations. For me, one of the advantages of working with VPCs is that a Virtual Machine can easily be copied to another PC (like a notebook). Also, when I move to a new PC, I can immediately work with my existing Virtual Machines without the need to reinstall all applications. I am thinking about buying a new pc with Windows 7 64 bit pro, and using the XP-Mode Virtual Machine that comes with Windows 7. The advantages would be support for more memory (so being able to run more Virtual Machines simultaneously) and having a licenced XP Virtual Machine. I would like to know if you can transfer a VHD that is based on the XP-mode VHD to another machine without Activation issues. The other machine will of course, also be running Windows 7. I would guess that this would not be a problem. However, I did read about a guy who had to reinstall his Windows 7 because of a harddisk failure, and could not access his XP-mode VHD anymore because it demanded re-activation. So can you transfer a Windows 7 XP-mode VHD to a new PC without the need for reactivation? |
This is quite a stupid question. I want to find out how to increase a number in the end of the variable: $Coffee1 = "black"; $Coffee2 = "brown"; $Coffee3 = "gray"; echo $Coffee1; => black echo $Coffee1+1; => brown echo $Coffee2+1; => gray | I want to store courseworks marks of n courseworks into n variables, such as cw1 and cw2 etc. Using variable variables how can I come with cw1, cw2 etc. How can I dynamically create variables? |
Basically, I'm looking for a yes/no answer to this question: example: a colleague creates a file in USA at 11AM (GMT-5), I copy this file onto my laptop, which has the UK time-zone settings (GMT in winter). What's the time am i going to see as a value of "Modified Date" file attribute? | I have a file that was modified either before or after it was sent to me. However, it was created in a different time zone, so if the modification date is in the timezone of the sender, he was the last to modify it. If it is in my timezone, I modified it. So, do you know if Windows file modification dates are timezone aware? |
There are certain concerns that say this might be duplicate of this question: . However, I believe that is not the case. That question talks about a low overall GPA. I do not have a low overall GPA but just an accidental F. I think that is different. My situation is a little bit special so I am sorry if I did not write a perfect title to summarize the whole story. I will briefly tell the case and my situations and then ask the questions in detail. I am an international student in pure math at a US college with 10-20 ranking and I plan to be a mathematician from the very beginning since I was young. However, I got into an accident in the first half of my 3rd year. I missed the deadline of the final of my PDE class and that final counted up for 40% of the grade, making me fail the course. This made me so depressed, since my school will show both grades even if you retake the course. I can retake the course but some of the grad schools that I hope to get into have an application deadline before my fall semester grade come out, which is really troublesome. Also here is some of my overall performance in college 1.After fail, I still have an overall GPA about 3.8 2.I had top performance on other my courses and even I can do better than grad students in grad level course. For example, I just got a solid A+ in commutative algebra and functional analysis for the last semester. 3.I attended a wide range of math courses in graduate level like algebraic number theory, knot theory and geometric topologies with A grade. 4.I will retake PDE in fall 2016 and I am very likely to get a rec letter from the professors of that course. Also, the professor of PDE course in fall 2015 agrees to write a supportive letter for me confirming my situation. 5.I got independent study experience in pure math. (You cannot do original research in pure math as undergrad, usually)I did a very successful reading and presenting course in hyperbolic manifold (with 6 A+ credits) and I will do another courses like this in OPUC in fall 2016. However, that is all I can get. I was rejected by all REU I applied since unfornately all REU I was interested in did not accept non native students. 6.Because of 5, my other two rec letters will be from a very recognized professor in my department and from my department chair. 7.I have a high GRE general/subject test score. Now is my question: Based on my overall performance and the rescue actions I took, How badly this F will affect my PhD application? If I want to apply for a school whose deadline of application is earlier than the time when my fall grades come out, how can I show that I have come back and fixed my mistakes? I apologize in advance for grammar mistakes and awkward expressions if there are any. I really love mathematics and I really want to get into top tier school. Thanks so much. | When applying to a PhD program in the US, how does the admissions process work? If an applicant is weak in a particular area, is it possible to offset that by being strong in a different area? Note that this question originated from this . Please feel free to edit the question to improve it. |
I have a polygon and want to distribute a certain number of points within that polygon. The Points should have almost the same distance to each other and also to the boundary. | I usually use qgis. I explain my problem with an example: there is a forest (irregular geometry1 ) and one tree (geomery2). I want to know the maximum number of trees that the forest can contain. Furthermore i want a shapefile output of the best disposition of these trees inside the forest. |
It is well known that the quadratic formula for $ax^2+bx+c=0$ is given by$$x=\dfrac {-b\pm\sqrt{b^2-4ac}}{2a}\tag1$$ Where $a\ne0$. However, I read somewhere else that given $ax^2+bx+c=0$, we have another solution for $x$ as$$x=\dfrac {-2c}{b\pm\sqrt{b^2-4ac}}\tag2$$ Where $c\ne0$. In fact, $(2)$ gives solutions for $0x^2+bx+c=0$! Question: How would you prove $(2)$? Why is $(2)$ somewhat similar to $\dfrac 1{(1)}$ but with $2a$ replaced with $-2c$? | I'm trying to understand how we got to the "citardauq" formula (note: "quadratic", reversed) I found , first answer by Andre says Multiply "top" and "bottom" by $-b\mp\sqrt{b^2-4ac}$. After the smoke clears, we obtain $$\frac{2c}{-b \mp \sqrt{b^2-4ac}}.$$ Question is, how does the smoke actually clear? I was able to get to the final result by just distributing and canceling out terms but I wasn't sure I went about it the right way, the $\mp$ confused me a bit. How do you multiply $\pm \sqrt{b^2-4ac}$ with $\mp \sqrt{b^2-4ac}$? |
Whenever I do a question and it receives a large number of downvotes, I usually tend to delete them instead of editing, as I am nervous about losing my reputation. From my past experience with Stack Exchange, I always knew that deleting questions can get your reputation back. Oddly enough, when you delete a question in hopes of earning your reputation back, it will take a long period of time to earn it back. Earning your reputation can take about several minutes to half an hour. Should this issue with having to wait a long amount of time be fixed? | Update (March, 2012): This has been rolled out to all sites in the network. Behind the scenes we've been hard at work making some changes to how we track reputation. Here are some of the issues we're aiming to address with these changes: Reputation Skew (your actual reputation doesn't match what's shown) Up/Down votes oddities (mostly with the daily rep cap, the magical +2) Historical Deletes (not impacting rep immediately, contributing to skew) Unaccepts (display issues in the profile) User Deletion (magically missing rep, another skew contributor) To be clear: reputation values are not changing, every action in the system is still worth the same amount. Here’s what will be different: Your reputation will be correct at all times Deletions will have a much more immediate effect on reputation, not waiting on a recalc (but reputation sync takes up to 5 minutes on a delete/undelete action; as to not block the user's response thread, it's offloaded to a background queue) Recalcs will no longer be necessary Up/Down vote reversals will restore the correct reputation amount Up/Down vote reversals will correctly adjust to the reputation cap The reputation history in your profile will be more detailed and accurate (e.g. when a post is deleted, you'll see that in the reputation tab of your profile) This means your reputation will go up and down more than it has previously, but it will be in sync. To think of it more easily: imagine that a recalc will be done after every action in the system. Probably the biggest impact many will be concerned with is that you may see your reputation drop in cases where it didn't seem like it did before This was effectively happening before, but the results of that change were not applied immediately, but on the next rep recalc. Post deletion is the biggest factor here, previously it didn't (immediately) account for the reputation impact...that will no longer be the case. Reputation changes from the deletion will now be applied within the hour, and most other changes will be instant. Now the part that will make everyone throw vegetables our way: this will require a global recalc to get everything in sync. We'll be rolling it out first here on meta, then the rest of the network...the enabling of the detailed rep view and global recalc on each individual site will coincide. During the rollout you will see empty reputation tabs on profiles as we transition to the new storage behind the scenes, they'll be restored as the recalc rolls though each user. We’ll put up a blog post on before the network-wide rollout. If you have any questions about this change or details I may have left out, please do so in answers below so that we can clear up as much as possible before this rolls out. |
I am looking to get more information about the mechanism of the $CaCl_2$ in the bacterial transformation. I read online about the topic but I didn't found any reverent information on the topic, I don't have access to most of the scientific publications. However, I found this . According to this website, there is a lot of theory about the mechanism of calcium chloride in the bacterial transformation. Would it be possible to get a short scientific referenced explanation about the topic and I can or cannot be related to heat shocks? | I am aware of the fact that $CaCl_2$ settles down on the cell wall making it less negative may be by forming bond with Teichoic acid. Also due to the positive charge it attracts DNA (DNA is negatively charged due to phosphate group). But is there anything else the $CaCl_2$ does? Also if its the work of $CaCl_2$ why we are adding $MgCl_2$ first in the standard protocol of the making competent cell preparation chemically? |
Is there any difference between due to and owing to? Are there some specific situations when owing to is to be used rather than due to? | "Due to" seems more common than "owing to" in modern English. Is "owing to" simply an old-fashioned way of saying the same thing, or is there a rule to using it? |
Warm Wishes I'm a student of Electronics background and I'm very much interested in python and JavaScript I'm planning to shift to Ubuntu (20.04LTS) from Windows 10 My SSD has 101GB Free space. How much space should I allocate to Ubuntu for Machine leaning and other programming stuff? Laptop : Lenovo Legion Y540 RAM : 8GB SSD : 256 GB Much Thanks Vraj Parikh :) | I plan on installing Ubuntu 19.04 and give it 100 GB of my 256 GB SSD space and leave the rest for Windows as I would primarily be using Ubuntu. A. Now, as I plan to install a lot of applications in Ubuntu, should I give more space to the / partition than the home partition? (Or maybe even drop the /home altogether?). B. I have another 128 GB SD card for files like photos, audio and video files. Please suggest me the optimal partitioning for the use case. C. Also, I have 8 GB of RAM so what should be the optimal swap partition size? D. How would the distribution be if I choose "install Ubuntu alongside Windows" option? |
In my data, two coders annotated subjectively (but independently), when certain time-point phenomena (a specific turn in a movement pattern) occurred. The data for the first 14 seconds looks something like this: rater1: (1) 00:028 (2) 01:385 (3) 04:987 (4) 10:728 rater2: (1) 00:022 (2) 05:100 (3) 10:602 Objective: Find an interrater-reliability index for this data. Note that the number of observations differ and, accordingly, rater1(3) is not close to rater2(3) but rather to rater2(2). What I've done in R so far: I put forth a tolerance offset (120ms), and calculated the number of matches: 2. Annotations (1) and (3) of rater1 have a match in rater2 (tolerating 120ms offset). This is the first value for a contingency table. From the overall number of annotations, I subtracted the number of matches to obtain the mismatching annotations for rater1 (2 mismatches) and rater2 (1 mismatch). The last field in the contingency table is the number of time units that both raters agree that the phenomenon is not present. If one time-point annotation of any rater accepts a matching annotation of the other rater within a time interval of 120ms in the future and 120ms in the past, then one time unit could be defined as an interval of 240ms. When I divide my data into these time intervals and subtract the time intervals already 'occupied', I get: 14seconds/240ms - (all matches and mismatches) = 58 - 5 = 53 Kappa.test(matrix(c(2,2,1,53),2,2)) Since Cohen's kappa is not very susceptible to the prevalence of the last cell of the contingency table, I'm happy with the results I get. But I don't know whether there are much more sophisticated and flawless solutions out there. Could you give me advice on this and direct me to literature that deals with these kinds of problems? I'm not finding work comparable to this data and this problem. | My data consists of two raters interpreting one specific phenomenon to occur at different points in time (the observations are not paired, the raters actually identified different amounts of observations). I have two questions: 1) What do I call these data? "Time-series data" seems too general and usually refers to metric data changing continuously over time (while I have just points of data along the time line). Under "time-point data" I don't find problems of the kinds described in question (2). 2) What indices for interrater reliability can I use (in R)? (If an index requires defining how much offset is tolerated, that could be 0.120 seconds.) example data (in seconds) rater1: 181.23 181.566 181.986 182.784 183.204 191.352 193.956 195.426 197.568 197.82 198.576 202.02 205.8 206.136 208.53 209.034 216.216 220.08 220.584 230.706 238.266 238.518 239.442 241.5 241.836 244.398 rater2: 181.902 182.784 183.204 193.956 195.384 197.694 197.82 198.576 199.5 202.146 205.8 206.136 208.53 216.258 219.576 220.542 222.096 222.558 226.002 228.312 229.11 230.244 230.496 230.832 231.504 232.554 238.266 238.518 238.602 238.938 241.5 241.836 244.272 I asked about a different part of this problem already . But I guess that was not the ideal community and I supplied insufficient data. |
In a research domain, evaluation part is itself challenging, and thus we are proposing a way of doing the evaluation in that domain (i.e. determining what inputs should be given to the system and what outputs should be expected). Should we call what we are proposing an "evaluation method" or an "evaluation methodology"? | Say I developed something called "Methodology for Establishing Remaining Life of Components". Basically, at work, we have components (or equipment). I wanted to develop a way to identify how much longer the components / equipment can last before they ware out and cannot be used. It takes into account "the degree of damage currently in the component, the rate of future damage accumulation based on realistic operating scenarios, and the degree of damage required to cause failure." Taking these three into account, the remaining life of a component can be assessed. This is what I call "Methodology for Establishing Remaining Life of Components". My question is, would this be considered a 'methodology for establishing remaining life of components' or just a 'method for establishing remaining life of components'? Or do you need more information to figure out if it is a method or methodology? I cannot provide all the information for business purposes, but if additional information is required to figure out if it is a method or methodology, I will provide it. |
Suppose one executes either . some_script or source some_script How can some_script determine the absolute path of the current shell (i.e. the one that is executing the . or source command)? (Note that, in general, this path is not the same as the value of $SHELL.) In other words, I'm looking for the "absolute path" counterpart of $$. I figure that the current shell process must know the executable whence it came, but AFAICT, it's not stored in any environment variable. The best I can come up with boils down to scraping the output generated by a suitable variant of ps -p $$; for example: CURRENT_SHELL=${"$( PS_FORMAT=cmd PS_PERSONALITY=linux ps -p $$ -h )"% *} This is probably not very portable. (And it's ugly, to boot.) I'm primarily interested in the case where the current shell is some version of zsh. (I have a secondary interest in the corresponding answer for bash.) | Sometimes the output of ps -p $$ shows the absolute path to the currently-running zsh, % ps -p $$ PID TTY TIME CMD 1027 ttys005 0:00.11 /usr/local/bin/zsh but not always: % ps -p $$ PID TTY TIME CMD 1507 ttys003 0:00.07 zsh -fl What is a consistent way to get the path to the currently-running zsh? EDIT (clarification): I'm interested in how to do this primarily in Darwin and Linux, but also in NetBSD. |
I need some help designing a circuit to pull a floating pin to ground for approx 500ms when the circuit is first powered on, then pulling it to ground again for another 500ms when powered is lost. The floating pin is the trigger for an RF transmitter circuit, pulling it to ground will transmit its code - I need a pulse when power is turned on and pulse when power is turned off. I've got a 5v power supply. I haven't done any electrical engineering work for over 20 years.. It seems from other related posts that a tried and trusted 555 timer might be the simplest solution, I can clearly see how I can get a slight delay, then a 500ms pull to ground using a couple of RC networks and transistor on the 555 output pin when turned on, but can I use the same 555 and a capacitor to pulse when the power is lost somehow? I don't mind if I have to have two 555 timers - or if there is a simpler or easier solution? | I've noticed that whilst I have a well-known solution using an NE555, that IC doesn't fulfill my needs perfectly. Others have told me that the NE555 is very rarely an appropriate solution to one of the problems it's being used for. What are the systematic problems with the NE555? More specifically, I'd like to have a better (lower part count / complexity, better stability, lower power consumption) solution for the following typical applications: One-off timer (Monostable Multivibrator) Ramp generator Dear versed reader: please extend this list with typical applications! |
When to use a web service and when not to use a web service? | Using a web service is often an excellent architectural approach. And, with the advent of WCF in .Net, it's getting even better. But, in my experience, some people seem to think that web services should always be used in the data access layer for calls to the database. I don't think that web services are the universal solution. I am thinking of smaller intranet applications with a few dozen users. The web app and its web service are deployed to one web server, not a web farm. There isn't going to be another web app in the future that can use this particular web service. It seems to me that the cost of calling the web service unnecessarily increases the burden on the web server. There is a performance hit to inter-process calls. Maintaining and debugging the code for the web app and the web service is more complicated. So is deployment. I just don't see the advantages of using a web service here. One could test this by creating two versions of the web app, with and without the web service, and do stress testing, but I haven't done it. Do you have an opinion on using web services for small-scale web app's? Any other occasions when web services are not a good architectural choice? |
I have a list of FTP files and I can only convert the first FTPFile to File. I am using org.apache.commons.net.ftp library. My code is works fine for the first time: for (FTPFile file : files) { if(ftpClient.sendNoOp()){ if(file.getName()!=null || !file.getName().equals("")) { InputStream iStream=ftpClient.retrieveFileStream(file.getName()); File file2 = File.createTempFile("xml", null); FileUtils.copyInputStreamToFile(iStream, file2); iStream.close(); } } } From this code the loop traverse only time and the FTPFile is converted to File and after that it will get exception which is created by null value generated in ftpClient.retrieveFileStream(file.getName()). Please help. | 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? |
For a battery powered sensor node, I need to be able to measure current levels that have a dynamic range from 0.1uA [standby current] to 100mA [peak current]. For this, I am thinking of a high-side current shunt resistor and amplifier feeding an ADC. For the shunt, I could go with a 0.1ohm resistor to minimize the voltage drop in the peak current case [but lose capability to measure standby current], or go with a 10ohm resistor to have some shot at being able to measure the standby current of 0.1uA [but risk too high a voltage drop in the peak current case]. This must be a pretty standard problem for people measuring currents at sensor nodes. For someone who might have resolved a similar issue in the past, What circuit did you design for measuring currents ranging from 0.1uA to 100mA [being able to measure standby currents of the order of 0.1uA is critical for me] What type of shunt resistor and amplifier did you select? [Edit: This question is different from the one as I am trying to design a single circuit that would measure across 0.1uA to 100mA - without having to manually switch resistors. The main solution in the answer to the other question requires one to set beforehand the current range to be measured. My question addresses a different problem.] | I'm wondering if anyone knows the accuracy of measuring uA current with a cheep (~25$) DMM? I need to measure some low power circuits (10-500uA) and I'm deciding whether I should get an analog uA meter or use my DMM. My guess is that the DMM will not be very reliable? I can test it with a dummy resistor load and attempt to verify with a scope I suppose. Update: Accuracy I'm looking for: good question, I would ask the same. within 2.5% is good enough, what I want to try to avoid is disturbing the circuit... Also The op-amp + shunt idea is one I had, I wanted to get peoples opinions first before I invested the time into that. |
How can I, in Windows 7, set up a virtual printer that's just an alias to another printer I have installed, but with certain options set? I'd like to make the virtual printer redirect to a certain network printer but with output going to the manual feed tray. (Some new software I just started using just sends the job right to the printer without going through the dialog that would allow me to choose the manual feed tray.) | Has anyone been able to copy an existing printer in Windows 7? I know that we were able to do this in XP (not as a direct copy/paste, but by installing the printer twice) but in Windows 7 it doesn't seem to be possible. Googling the answer is hopeless because searching for "copy printer" or "duplicate printer" you get a bunch of posts about "printer copiers" or people complaining about duplicate printers getting created in the background (precisely what I'd like to be able to do) It'd be good to know how to do it in general, but if it depends on the printer type, then in our case we are trying to make a copy of an HP Laserjet. Tried installing from the CD - but the CD is too old for Windows 7 Tried installing via Add Printer and that seems to install the printer but it's marked with an error. Tried installing via the .exe installer from the HP site and that does result in a successful printer being installed, but it won't let you install the same printer twice (stalls on the "insert USB cable now" step - simply won't enable the greyed out "Next" button). The reason this is required is so that we can print to one to the feeder and to the tray separately. |
I was just happily typing away, trying out some Android development on my Ubuntu machine. I pressed Ctrl + Alt + F11 instead of Ctrl + F11 to run the program in Eclipse. This made the screen go blank with a white flashing cursor and it stayed like that for a while, so I pressed Ctrl + Alt + F4 to get to a terminal I could use and remembered seeing somewhere startx to start the GUI again, so I tried that and had something I have also been trying commands like unity, unity start and unity restart, but they all seem to run, but I never get my GUI back. The fact that it only happened to my user account is strange. If I use guest I can access the GUI, but if I try and log in to my account the screen goes black for a few seconds and then sends be back to the log in screen. I have tried installing the Xubuntu desktop over the top of it, but it does the same thing with that desktop as well. My knowledge of Linux is starting to get stretched at this point now. What may have happened and how do I put it right? Maybe it's a user setting or something I could change? Also could anyone tell me what Ctrl + Alt and F11 does? I'm using the latest version of Ubuntu and ran the latest updates today as well. When running startx, I get an error saying: Fatal Server error@ server is already active for display 0 if this server is no longer running, remove /temp/.x0-lock and start again Another thing I have tried is using Ctrl + Alt + F7 to bring back the GUI, but that doesn't seem to help either. It always sends me back to the log in screen (which is the GUI log in screen). | I accidentally pressed Ctrl+Alt+F12 and my display turned to black... I then had to make a reboot.. What did it do to my system? Also what does Alt+ F8 to F10 do? |
I am trying to fetch map properties using arcpy.mp (since I am using ArcGIS Pro trial version) from mxd files. I am able to get the extent info for individual layers but not for the dataframe. Sample code fc = "\demo.gdb\dist" spatial_ref = arcpy.Describe(fc).spatialReference print("Co ordinate : ", spatial_ref.name) extent = arcpy.Describe(fc).extent There are code samples available with arcpy.mapping module (for desktop vsersion), but I am using ArcGIS Pro, which supports arcpy.mp module. | I am looking for a way to access a .mxd file's layer names and data sources. In ArcGIS Desktop, I could do: def print_layer_info(mxd_path): print(mxd_path + ":") mxd = arcpy.mapping.MapDocument(mxd_path) for df in arcpy.mapping.ListDataFrames(mxd, "*"): lyr = arcpy.mapping.ListLayers(mxd, "", df)[0] if lyr.supports("dataSource"): print "\t" + lyr.name print "\t\t" + lyr.dataSource del mxd According to , I could do: p = arcpy.mp.ArcGISProject("file.mxd") But that doesn't work. When I do that I get a OSError. Since the arcpy.mapping.MapDocument is gone in ArcPy for ArcGIS Pro, what is the equivalent way of reading layer name and datasource of an .mxd file? |
How would I implement the following command in python: ALTER TABLE {tableName} ADD COLUMN COLNew {type}; I assume it would look something like the following: cursor.execute('ALTER TABLE my_table ADD COLUMN COLNEW ... ??? The problem is there are lots of sqlite tutorials for python and lots of sqlite examples. How does one convert a sqlite command to python? | Using SQLite3 with Python 2.5, I'm trying to iterate through a list and pull the weight of an item from the database based on the item's name. I tried using the "?" parameter substitution suggested to prevent SQL injections but it doesn't work. For example, when I use: for item in self.inventory_names: self.cursor.execute("SELECT weight FROM Equipment WHERE name = ?", item) self.cursor.close() I get the error: sqlite3.ProgrammingError: Incorrect number of bindings supplied. The current statement uses 1, and there are 8 supplied. I believe this is somehow caused by the initial creation of the database; the module I made that actually creates the DB does have 8 bindings. cursor.execute("""CREATE TABLE Equipment (id INTEGER PRIMARY KEY, name TEXT, price INTEGER, weight REAL, info TEXT, ammo_cap INTEGER, availability_west TEXT, availability_east TEXT)""") However, when I use the less-secure "%s" substitution for each item name, it works just fine. Like so: for item in self.inventory_names: self.cursor.execute("SELECT weight FROM Equipment WHERE name = '%s'" % item) self.cursor.close() I can't figure out why it thinks I have 8 bindins when I'm only calling one. How can I fix it? |
I can not choose what to write for my project about being organised... Should I write: organization or organisation Is it just a spelling difference between American English and British English? (I use British English in my school.) When I search up and try to get an answer, it will say, "British English uses 's' more than 'z'. But sometimes, they use 'z'." Can you please help? Thank you. | Looking at several online dictionary resources, it seems that the accepted spelling of "organization" is with a 'z', however, even on this site, "organisation" is frequently used as the spelling. Why the difference, and when is it appropriate to use one over the other? EDIT: Here is a link to the Oxford Dictionary article, just for ease of reference: The link for the non-American-English article as well: |
Ubuntu 12.04 OpenSSL 1.0.1 14 Wget 1.13.4 My setup: create our own CA (our_own_ca.crt) generate a certificate which is signed with the above CA (graphite.local.crt) Concatenate that cert and the CA cert into a bundle file Nginx configuration: ssl_certificate /etc/ssl/certs/graphite.local.crt; ssl_certificate_key /etc/ssl/certs/graphite.local.key; ssl_client_certificate /etc/ssl/certs/our_own_ca_chained.crt; with: our_own_ca_chained.crt = graphite.local.crt + own_own_ca.crt To install this CA into the trusted store, according to /usr/share/doc/ca-certificates/README.Debian, I just need to copy it to the /usr/local/share/ca-certificates/, then run update-ca-certificates. Here's the output: Updating certificates in /etc/ssl/certs... 1 added, 0 removed; done. Running hooks in /etc/ca-certificates/update.d.... Warning: there was a problem reading the certificate file /etc/ssl/certs/our_own_ca.pem. Message: Extensions not allowed in v2 certificate done. done. After that, we have something like belows in /etc/ssl/certs: lrwxrwxrwx 1 root root 17 Mar 11 05:27 99ff557c.0 -> our_own_ca.pem lrwxrwxrwx 1 root root 17 Mar 11 05:27 dc79b3f0.0 -> our_own_ca.pem lrwxrwxrwx 1 root root 50 Mar 11 05:27 our_own_ca.pem -> /usr/local/share/ca-certificates/our_own_ca.crt then curl worked: curl -I HTTP/1.1 302 FOUND Server: nginx Date: Wed, 11 Mar 2015 05:30:30 GMT Content-Type: text/html; charset=utf-8 Connection: keep-alive Vary: Cookie Location: https://graphite.local/account/login?next=/ Strict-Transport-Security: max-age=15768000 but wget does not: wget https://graphite.local --2015-03-11 05:31:22-- https://graphite.local/ Resolving graphite.local (graphite.local)... 127.0.0.1 Connecting to graphite.local (graphite.local)|127.0.0.1|:443... connected. ERROR: cannot verify graphite.local's certificate, issued by `xxx': Self-signed certificate encountered. To connect to graphite.local insecurely, use `--no-check-certificate'. I also tried to use the --ca-certificate but got the same error. Did I miss something? | I have a problem with my Fedora 8 installation. It looks that wget doesn't know how to verify SSL certificates any more. It's strange because I have another Fedora 8 box which I believe has the same configuration and it works! How can I make it work without using --no-check-certificate switch? This is a sample output: wget https://www.google.com --2011-09-23 00:11:13-- https://www.google.com/ Resolving www.google.com... 74.125.230.146, 74.125.230.147, 74.125.230.148, ... Connecting to www.google.com|74.125.230.146|:443... connected. ERROR: cannot verify www.google.com's certificate, issued by `/C=ZA/O=Thawte Consulting (Pty) Ltd./CN=Thawte SGC CA': Unable to locally verify the issuer's authority. To connect to www.google.com insecurely, use `--no-check-certificate'. Unable to establish SSL connection. EDIT I have this file /etc/pki/tls/certs/ca-bundle.crt file and when I run wget with --ca-certificate switch pointing to this file everything goes fine. Where should this file be placed so that I don't need to use the switch? BTW: curl and links work fine, but lynx also complains: "SSL error:unable to get local issuer certificate" so this is not only wget's issue... |
How can I force the user to first choose a category product before continuing to the editor when creating a new product? I found a successful solution but it is working for posts not products. What I did: I changed the following code : $post_type = 'post'; if ( isset( $_REQUEST['post_type'] ) ) { $post_type = $_REQUEST['post_type']; } // Only do this for posts if ( 'post' != $post_type ) { return; } To $post_type = 'product'; if ( isset( $_REQUEST['post_type'] ) ) { $post_type = $_REQUEST['post_type']; } // Only do this for products if ( 'product' != $post_type ) { return; } It worked, But it Still listing post categories not product categories. | How can I force the user to first choose a category before continuing to the editor when creating a new post? I want to , but this is based on the category, so I need to know that before showing the editor (unless I do some fancy Ajax stuff, but in this case I don't want to do that). |
What does this mean: The "system" section is taking up 80 GB. Why is it taking up so much and is there any way I can reduce it? | Every few days I get notices on my MacBook that it's running or run out of hard drive space. Curiously, restarting the computer will enable me to recover gigabytes of space (this past time, it was able to recover about 2.2GB). However, I can't identify anything in my personal activity that consumed that space. It's possible that it's a rogue iTunes podcast or a huge software update that my Mac is automatically downloading - would either of these reclaim the space upon a restart? One possibility that I can think of is that FileVault has some sort of disk leak, allocating but not freeing files. Does this make sense? Is there a tool that I can run to determine where this space is going? Assuming it is FileVault, should I try to disable it? What's the best way to turn of FileVault on a nearly full computer? |
I have a tv about 40+ feet from my pc (multiple rooms and 1 level separate us) I want to use as another monitor. I ran HDMI to the tv which worked fine, but then I tried to run a chain of multiple 10 ft USB 2.0 M/F from my computer to a USB 2.0 Hub, where I then plugged my keyboard and mouse into the hub. I did this without consulting anyone, and now realize I should have, as I am having problems getting my PC to recognize the devices plugged into the hub. I can plug a single device into the end of the USB chain and that works fine, however I do need two devices on the hub on the end. Signal strength degradation isn't a big deal for me by the way as all I need it for is keyboard/mouse. I've been reading about active extension USB and powered USB hubs today and think they might be able to solve my problem, but I am not familiar with them. Can anyone offer an idea for a setup so I can use a mouse and keyboard with this tv, all while my PC is 40+ feet away? There were a couple similar questions I read that did not solve my problem by the way, so I don't think this is a duplicate. Sorry in advance for anything, as I'm new. please provide a solution for my desired setup | I want to use a very long USB cable to place a webcam in a different room. The maximum length that I found was five meters. What is the maximum length of a USB cable? What is the maximum length achievable when using USB extension cables? |
I'm now at the point where I walk around and see light; its direction, strength, softness, casted shadows etc. Now I'm almost at the point where I also understand it; i.e. the science behind what light is for a camera and what a camera can do with it. I'm a little confused about low key photography; for example, I read a statement like "make sure that the light of your strobe doesn't reach you background". And I'm like... light travels at 300.000 m/s? I would like an explanation as to how the general idea of low key photography works; completely blackening the background and lighting an object in the frame. I'm especially interested in the (real world) physical distance en properties of the object and background that's being framed. | I'm just getting started - in my last shoot, I was using a 6D with a 50mm/1.4. In low light, the pictures looked fantastic on the viewfinder but on the computer screen, appeared extremely grainy. For future shoots, if I want to achieve something like this: Should I shoot with way more light / lower ISO to retain clarity, and then just darken in post? What kind of setup would be needed to achieve the above? With my setup - Camera Canon EOS 6D Lens EF50mm f/1.4 USM Focal Length 50mm Shutter Speed 1/40 s Aperture f/1.8 ISO/Film 6400 I was getting very grainy results that I had to soften in post (in case you want to see my attempts): Any tips would be much appreciated. |
I have a Dell E6510 with a Nvidia NVS 3100M graphics card. Can I plug in a monitor into my displayport and then another into my VGA port and utilize 3 monitors? | For example the Alienware m17x offers 3 connections, HDMI, DisplayPort, and VGA. Is it possible to connect two independent external monitors, one through the DisplayPort and one through the HDMI port? |
my_array=[1,2,3] my_array1=['John','Tom','Peter'] search=int(input("Enter your number")) for i in range(0,3): if search==my_array[i]: ### can you please point out the purpose of this '[i]' ? what does it do? print(my_array1[i]) ### also this one | I need a good explanation (references are a plus) on Python's slice notation. To me, this notation needs a bit of picking up. It looks extremely powerful, but I haven't quite got my head around it. |
Assuming that the operator $\hat{A}$ does not necessarily commute with $d \hat A/dt$, what is $$\frac{d}{dt}(\exp(\hat A))~?\tag{1}$$ Is it $\exp(\hat A(t)) \frac{d \hat A}{dt}$ or $\frac {d\hat A}{dt} \exp(\hat A(t))$ and why? EDIT: Actually here is my original question: I was asked to show that $$\frac{d(\exp{A})}{dt} \exp{(-A)} = \sum_{n=0}^{\infty} \frac{1}{(n+1)!} L^n_A(\frac{dA}{dt}),\tag{2}$$ with $$L_A(X) = [A,X], \qquad L^2_A(X) = [A,[A,X]],\qquad \ldots \tag{3}$$ I thought the Baker–Campbell–Hausdorff formula said $$\exp{(A)} B \exp{(-A)} = \sum_{n=0}^{\infty} \frac{1}{n!} L^n_A(B),\tag{4}$$ and so comparing the two equations above, I would get $$\frac{d\exp(A)}{dt} = \exp{(A)} \frac{dA}{dt}\tag{5}$$ (by plugging in $B = \frac{dA}{dt}$). Now that it seems that this is not true, does it mean that the identity I was asked to prove is also not true? | I'm asked to show that $$\frac{d(\hat{A}\hat{B})}{d\lambda} ~=~ \frac{d\hat{A}}{d\lambda}\hat{B} + \hat{A}\frac{d\hat{b}}{d\lambda}$$ With $\lambda$ a continuous parameter. Should I use the definition $$\frac{d\hat{A}}{d\lambda} ~=~ \lim_{\epsilon \to 0} \frac{\hat{A}(\lambda + \epsilon) - \hat{A}(\lambda)}{\epsilon}$$ applied to $\hat{A}\hat{B}$ like $$\frac{d(\hat{A}\hat{B})}{d\lambda} ~=~ \lim_{\epsilon \to 0} \frac{\hat{A}(\lambda + \epsilon)\hat{B}(\lambda + \epsilon) - \hat{A}(\lambda)\hat{B}(\lambda)}{\epsilon}$$ and do some algebra to get the RHS of the first equation, or I'm missing something? Another interesting derivative to pay attention to is: $$\frac{d}{d\lambda}\exp(\hat{A}(\lambda) )~?$$ |
I'm trying to test my installation for on my Mac for the first time and when I put in: pk2cmd -?v I get: -bash: /usr/local/bin/pk2cmd: cannot execute binary file How do I resolve this problem? | I have a file named b1 that contains assembly language. I am trying to execute the file on OSX using $ ./b1 I get the following error: -bash: ./b1: cannot execute binary file I've looked at other similar questions, but to no avail. I'm definitely using a 64 bit architecture. Here are output of relevant info: $ file b1 b1: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, not stripped $ uname -a Darwin Anthonys-MacBook-Pro.local 13.0.0 Darwin Kernel Version 13.0.0: Thu Sep 19 22:22:27 PDT 2013; root:xnu-2422.1.72~6/RELEASE_X86_64 x86_64 Edit: Ran as b1 which ended up terminating with: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/as: fatal error in /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../libexec/as/x86_64/as |
In my physics book static friction is explained by cold welds between contact points. If I now try to lift this object is there an initial max static lifting force which is slightly greater than the weight of the object? | My physics textbook says that friction mainly arises due to intermolecular attraction between atoms of the objects in contact and clashes between peaks are only significant for rough surfaces. I was wondering, if friction arises due to intermolecular attraction, why doesn't it oppose lifting a body as well(considering that the atoms are attracted to each other). Why doesn't it oppose rolling? (even when there is no slippage, if atoms of the contact patch are attracted to the atoms in the ground, there should be a force opposing movement) Another related question: Is there an intuitive reason why(for most pairs of surfaces) kinetic friction is lower than static friction? |
Since I am so used to using the standard Ctrl+-a to select all, I am wondering why in Firefox I have to use Alt-a? I just downloaded this -- in the hope of solving this issue, but on opening the preferences for this add-on I see that the keyboard command is already set-up as Ctrl-a. However that is not the case in reality. Is this something deeper in Ubuntu that needs changing? I think there are some other programs, although I cant think of them of the top of my head that also use the Alt-a to select all, although there are some that don't. Leaf Pad for example uses the standard Ctrl-a. I just upgraded to 14.04, and was using 13.10 before that, in either case the problem is the exactly the same. | The combination for select all (Ctrl+A) doesn't work in a browser (either if we speak about firefox or chromium). It doesn't work if I try to clik in to the adress bar nor if I try to use it to select what I've written in google search bar at google.com. When I press Ctrl+A it simply takes the cursor before the first letter. This doesn't happen when I use a text editor software like Libre Office. There the shortcut does what's supposed to do, selecting all the text. What could be the problem? |
So, I barely started learning about linked lists, and I made a a function that inserts a head into the linked list. The problem I'm having trouble figuring out is if I'm entering in the arguments incorrectly, or if my code has some errors. node struct: template<typename T> struct node { public: node(node* next = nullptr, const T& item = T()); template<typename U> friend ostream& operator <<(ostream& outs, const node<U> &print_me); T _item; //crate node* next; //label }; insert_head function: node<T>* insert_head(node<T> *&head, const T& insert_this) { //create new dynamic variable node<T>* temp = new node<T>; //IT SHOWS THAT THE ERROR OCCURS HERE //temp takes in the insert_this item temp->_item = insert_this; //temp points to the head so it doesn't lose the location temp->next = head; //head points back to temp head = temp; return head; //returns back the head of the list } Main: { node<int>* head_ptr = nullptr; for(node<int>* nPtr = head_ptr; nPtr != nullptr; nPtr = nPtr->next) { insert_head(head_ptr, 7); //insert integer 5 into the head PrintList(head_ptr); //print the linked list } return 0; } Error: undefined reference to 'node::node(node*, int const&)' | Quote from : The only portable way of using templates at the moment is to implement them in header files by using inline functions. Why is this? (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.) |
I have a point feature class in a geodatabase that uses WGS84 as its SRS. A colleage of mine created points in this feature class using an external database containing lat and long values. However, the lat and long values in the external database were using NAD83 (my fault -- I knew they were, I just forgot). I thought it wouldn't be a problem -- I just created a copy of the geodatabase and changed the coordinate system used by the feature class to NAD83. Should be good, right? I added this feature class into ArcMap. I saw that the points in the copied feature class (now using NAD83) exactly line up with the original feature class (using WGS84). That doesn't seem right. If two points, having the same lat / long values, but referenced in different coordinate systems are overlaid on the same map, one of them should be projected on the fly to the coordinate system of the data frame, no? Now, here's the weird part -- if I project the original point feature class (using WGS84) to NAD83, and add it to the map, then the points don't line up. See, this isn't what i expected, either. I expected that they would be projected to the other coordinate system (i.e., their lat / long values would be different by virtue of being projected, but they would be aligned with the original point because they were simply projected to the new coordinate system (then projected on the fly back to the original coordinate system). Can anyone explain the behaviour that I'm seeing? And, how do I properly ensure that the NAD83 lat and long values collected by my colleague are projected to WGS84 in my target geodatabase properly? | I put 4 different layers into my ArcMap document, but only one of them will show up on the map! I should be seeing the other 3 layers as well. When I do a Zoom to layer, I can see one layer, but I cannot figure out how to make the other 3 show up at once on top of each other. Before I opened ArcMap, I used ArcCatalog where I right-clicked 3/4 of the shapefiles and clicked Properties → Coordinate system → Import and then clicked on my Trees layer, which has the coordinate system I want the other 3 to have. But when I opened ArcMap the 4 layers did not overlap, nor could I move them above or below each other. |
I am an artist, and I have heard that white is a 'tint' and black is a 'shade' in the artist world. I have also heard that they are colours in the normal world/scientific world. Which is correct and why? | Is black a color or absence of color? When there is no light, everything is black, so how can we say that black is a color? |
I'm trying to convert a user inputted string into a list of 2 digit numbers. When the user enters a string, say "1234" and I convert that into a list, it becomes [1,2,3,4]. What I need it to become is [12,34] and so on. How would one go about doing this? print("Please insert string.") # User enters "12345678" string1 = input() list1 = list(string1) # "12345678" becomes [1,2,3,4,5,6,7,8] if not any(char.isdigit() for char in string1): print("Submission must be numbers only.") else: magically turn list1 into 2digitlist print(2digitlist) # Desired output: [12,34,56,78] Hopefully there's a solution to this but I certainly have no clue what it is. That's what I get for trying to do something complex even though I have little experience I suppose. Thanks in advance. | I have a list of arbitrary length, and I need to split it up into equal size chunks and operate on it. There are some obvious ways to do this, like keeping a counter and two lists, and when the second list fills up, add it to the first list and empty the second list for the next round of data, but this is potentially extremely expensive. I was wondering if anyone had a good solution to this for lists of any length, e.g. using generators. I was looking for something useful in itertools but I couldn't find anything obviously useful. Might've missed it, though. Related question: |
Whenever I watch a professional Protoss (usually WhiteRa) in replays of HotS, they usually get Armor (ground/air armor) after getting Attack but before getting Shields. Why is that? | I've been watching a lot of pro replays ever since the SC2 beta came out, and I've noticed that almost always, when Protoss research upgrades, the shields are the last research chosen. Why is that? Seems to me that if anything, shields should be the most important upgrade, as they affect all Protoss units and buildings. |
I have a PC with Windows 10 and Ubuntu 18.04, but would like to add more Android x86(lineageOS 14.1). The ISO file works perfectly in Live USB. After installing with USB (by selecting "Run LineageOS"), the android launches without problems. But after the restart (added lineageOS 14.1 via /etc/grub.d/40_custom), it does start with the following message: Detecting Android-x86... found at /dev/sda7 [ 3.697517] sysrq: SysRq: Emergency remount R/0 Then it reboots to the GRUB2 menu. How do I fix this, and boot lineageOS 14.1? My PC with an CPU Intel Celeron 2.6 GHz 1 core, 1GB ram, and I am trying to start lineageOS 14.1 on a 8GB partition (without SDcard). My boot code is: recordfail=1 if [ -n ${have_grubenv} ]; then save_env recordfail; fi set quiet=1 insmod ext2 set root=(hd0,7) search --no-floppy --fs-uuid --set 033e8fc7-4cfe-9454-bc59-df7329ca862d linux /cm-x86-14.1-r2/kernel root=UUID=033e8fc7-4cfe-9454-bc59-df7329ca862d ro quiet splash initrd /cm-x86-14.1-r2/initrd.img | I have a 10.1 inch notebook with Linux, but would like to dualboot with Android x86. The ISO file works perfectly in VirtualBox, VMware, and on Live USB. I have tried both install from the Install program and copying the .img files onto a partition, then adding the boot entry to /etc/grub.d/40_custom. I get the following displayed on my screen when I select the boot entry. Detecting Android-x86... found at /dev/sda2 [ 3.697517] sysrq: SysRq: Emergency remount R/0 Then it reboots to the GRUB menu. How do I fix this, and boot Android-x86? I have an HP-e010nr with an AMD A4 dual [email protected], 2GB ram, and I am trying to start Android-x86_64 7.1 on a 32GB partition (no fake sdcard). I have stored everything in the parition in an "Android" directory. My boot code is: set root = (hd0,2) #/dev/sda2 in the partition where Android-x86 is located kernel /Android/kernel quiet root=/dev/ram0 androidboot.selinux=permissive buildvariant=userdebug SRC=/Android/ initrd /Android/initrd.img |
Laptop was slow so I tried to be smart and do factory reset. Picked the option to delete hard disk including partition without backing up. On laptop, laptop ask for system file. Don't have it. Don't know what to do please help. I bet I deleted windows and also don't have the disk. | Recently, I accidentally deleted a partition off of my external hard disk. I had a copy of Minitool Power Data Recovery left over when the same drive had become RAW about a year ago. When I selected lost partition recovery, it immediately identified my deleted partition and allowed me to access and recover the files that were there. My question is this. Is there any way to change the deleted partition back to NTFS without having to have a drive that you need to recover the files to and then move them back after formatting, as I don’t have any space left on either the computer or on my other external hard drive, so that I don’t need to buy a new one. The files on the disk were really important. I am using Windows 7 Home Premium. I appreciate any help in solving this crisis. |
After upgrading Fedora 31->34 pasting PRIMARY into urxvt windows has changed, but only if it runs bash. In all applications it work as it did: middle-click just paste the text. But when it runs bash: All pasted text is automatically become selected. EOLs are treated as newlines, therefore commands are not executed on EOL, but pasted as a big text. If I paste several lines with EOLs and then press enter they all would be executed one by one. I do not like both, but I do not even understand what documentation to look at or what config to change to turn things back. | My usual shell is bash, my usual terminal is xterm, on Debian Sid. Following a recent release of bash, when I use button-2 to paste some text (selected by clicking and dragging button-1) into the bash command line I have that new lines in the pasted text are, so to say, inactive and I have to give an additional newline from the keyboard to execute the pasted text. It seems to me something that Debian newly configured in bash, because if I use another shell (e.g., dash) the pasted lines are immediately executed, as it happened in bash and in all the shells I've previously used. Is it possible to revert bash behaviour to the old one? from dpkg -l ii bash 5.1-2 amd64 GNU Bourne Again SHell ii xterm 363-1 amd64 X terminal emulator from uname -a Linux debian 5.10.0-1-amd64 #1 SMP Debian 5.10.5-1 (2021-01-09) x86_64 GNU/Linux |
I'm looking for book recommendations for Time series Data Analysis. All my time series data is in the engineering domain, pressure, volume, voltage, images etc. I'm experienced in Matlab and mostly all kinds of smoothing, curve fitting, Kalman, fft type workflows but am looking for more skills specifically for feature extraction (i.e. ECG). Perhaps Wavelet, Stats? I'm interested in learning tools but most useful would be guidance to what methods/tools to apply for a given problem. i.e. remove means, fft, band filter freq of interest, ifft, correlate and so on. | I started by Time Series Analysis by Hamilton, but I am lost hopelessly. This book is really too theoretical for me to learn by myself. Does anybody have a recommendation for a textbook on time series analysis that's suitable for self-study? |
I see myself confronted with an unusual problem: I own a laptop which was (past) served with an installed initial disk image with all the required drives already installed on it. Within the installed initial disk image was a proprietary device driver. Also a tool to create recovery DVDs. So until here a common "modern" setup like most laptop manufacturers use today. The issue is that both the recovery DVD created from the tool and recovery DVD ordered from the manufacturer does not contain the one device driver which I need in order to use the device. After 5 unsuccessful "repairs" (replacing the totally intact/working device) the manufacturer finally replaced the whole laptop so I do have the required device driver again pre-installed (initial disk image) on my laptop. Off course I could just make a backup of the image but there is a catch... It is an old Windows 7 image. And there are several factors that requires me to perform a clean installation of the operating system (Windows 10). You may point out that I also do not have the other device drivers in this case but those are available for download on the download website of the laptop manufacturer. All the other drivers but not the one in question. The laptop manufacturer and the device manufacturer both refuses to send me the required device driver. So: How to extract an pre-installed device driver on Windows 7 to use/install it on Windows 10 after clean install. The driver itself works great on Windows 10 (verified via Windows 7 to 10 upgrade process). | I want to reinstall Windows on a machine which has some very obscure drivers. I don't much fancy having to hunt round for them (that's if I'm able to locate them at all). Is it possible to save or backup already installed drivers? If so, how do I do this? How do I then go about installing these 'saved' drivers? |
I want to limit the internet bandwidth to avoid causing a bad ping for other users in the same network. I used to use wondershaper but it doesn't seem work on Ubuntu 17.04 (kernel 4.10, 64bit): sudo wondershaper enp2s0 2000 200 RTNETLINK answers: Invalid argument We have an error talking to the kernel I tried trickle, but it didn't work (unchanged bandwidth and only single application). I read that maybe tc could help me, but I failed at finding a way to get it to work. Any ideas / solutions for my problem? Edit: and don't help, cause wondershaper sadly doesn't seem to work on 17.04, trickle didn't really work too and doesn't really fit my needs, and tc isn't explained in those answers. | How I can limit Download/Upload bandwidth for: Entire OS. One network interface. Single application. |
I just installed MacTeX and texmaker. I'm trying to create a measured angle. The following code: \documentclass[12pt]{article} \begin{document} The measure of $\angle{ABC}$ is expressed as $\measuredangle{ABC}$. \end{document} keeps getting me ! Undefined control sequence. <recently read> \measuredangle l.4 ...angle{ABC}$ is expressed as $\measuredangle {ABC}$. I've tried web searches on my favorite engines for latex undefined control sequence measuredangle, but I keep results that are not useful; they're either listings of control sequences or people who had problems with different control sequences. Thanks! | I know what my symbol or character looks like, but I don't know what the command is or which math alphabet it came from. How do I go about finding this out? |
I have recently started reading "The UNIX Programming Environment" by Kernighan and Pike. My objective is to learn about the UNIX philosophy. My question is, Do I need to install UNIX on my desktop to make the most out of the book, or will any *NIX system work? I currently use Linux (ubuntu). | I've got the Unix Programming Environment book by Kernighan & Pike, copyright 1984. The book says that you need the Unix programmer's manual while reading the book. The preface of the Unix Programming Environment book referenced a quote from the Unix programmer's manual 2nd edition June, 1972. Does anyone know if that means that that is the edition of the Unix programmer's manual, I should use and/or whether I can use that edition of the manual? If not so, which edition of Unix programmer's manual should I use, for that edition of the Unix programming Environment book? I think that maybe someone that read the book, might be more helpful, telling me the manual edition they used. Finally I've a Windows machine, does anyone know the best option for me to be able to use a Unix terminal, while reading this book |
In My Java code I'm trying to do following double a=1769.58; double b=986.58; double c=a-b; System.out.println("Result "+c); This is retuning the result as 782.9999999999999. but it should be 783.00 what is wrong with this.how can I get correct value and what is the reason for this? | Consider the following code: 0.1 + 0.2 == 0.3 -> false 0.1 + 0.2 -> 0.30000000000000004 Why do these inaccuracies happen? |
See the last comment on and the comments on for more details. In those two cases, I tried to tag a user and the tag just vanished. Now I don't know if that is normal at the start of a comment or with those users, or both, or if it's a malfunction, but I wanted to report this and ask if it was or not a bug in the @-tagging function. And since it was from two different SX sites, I thought I'd ask about it on the general Meta, i.e. here, rather than on the Meta of either of those sites. | How do the comment replies (aka "pinging users") work? Who can I send an @reply to? How do I respond to a specific user when entering my comment? Will they be notified? What do people mean when they talk about "pinging" another user? Related: |
I frequently write slides in beamer, and besides a few macros I use (e.g. for two-column frame), I often type \begin{itemize} and \end{itemize}. What would be a nice TeXish way for either starting the itemization automatically when \item outside of itemization/enumeration is encountered? Or alternately, how to write a macro which would do something like (pseudocode, this does not work unfortunately as it is): \documentclass{beamer} \usepackage{etextools} \def\firstitem{\begin{itemize}\AfterGroup{\end{itemize}}\item} \begin{document} \begin{frame}{title} \firstitem a \item b \end{frame} \end{document} | If your document use itemize a lot of time, you are likely to get fed up putting \begin{}...\end{}. Is there any better way to do this? Something like a org mode of emacs use or lyx use? |
Is it a good practice to store primary key values in form elements for storing data after form submission? For example if I have a select tag inside my form like this: <select name="city"> <option value="3">Kolkata</option> <option value="7">Bangalore</option> <option value="1">Delhi</option> <option value="4">Mumbai</option> </select> In my City table they are stored like this: Id Name -- ---- 1 Delhi 3 Kolkata 4 Mumbai 7 Bangalore After form submission, extraction of values is pretty simple and we directly get the foreign key value without looking up the City table. However, I feel that this could be a major problem since one can easily manipulate the values through developer tools. If not this approach, what is the general and widely accepted norm? EDIT Since this question has been suggested as a duplicate of , I've added my reason against it: This question deals with the aspect of general practice followed by developers unlike the other with deals with security concerns if a particular practice is followed. | I've heard that exposing database IDs (in URLs, for example) is a security risk, but I'm having trouble understanding why. Any opinions or links on why it's a risk, or why it isn't? EDIT: of course the access is scoped, e.g. if you can't see resource foo?id=123 you'll get an error page. Otherwise the URL itself should be secret. EDIT: if the URL is secret, it will probably contain a generated token that has a limited lifetime, e.g. valid for 1 hour and can only be used once. EDIT (months later): my current preferred practice for this is to use UUIDS for IDs and expose them. If I'm using sequential numbers (usually for performance on some DBs) as IDs I like generating a UUID token for each entry as an alternate key, and expose that. |
If $R$ is an integral domain, $a, b\in R, a\neq 0$ and $\bar b$ is not a zero divisor in $R/(a)$. I'm trying to prove $(ax-b)\in R[x]$ is prime. This question seems easy but I couldn't prove it, maybe there is some trick which I could solve this problem easily? Thanks | This is the exercise mentioned above: Let $a,b$ be regular sequence over a domain $R$. Prove that $ax-b$ is a prime of $R[x]$. Thank you for your answer! |
I just got my account today and I am trying to join a server and it says the authentication servers are down and I checked more than once to see if it's online and I still cannot join please help | Similar to on the bugs in Minecraft, I would like a complete list of what error codes exist in Minecraft and how they occur, as well as how they can be resolved. |
string (*add(string (*str)[10])) [10]; //function return a point to array of 10 string int main() { string s[10] = {"a","b","c","d","e","f","g","f","i","j"}; string (*str)[10] = &s; string (*str2)[10] = add(str); cout << (*str2)[1] << endl; return 0; } string (*add(string (*str)[10])) [10] { for (int i = 0; i < 10; i++) for (auto &c : (*str)[i]) { c = toupper(c); cout << c << endl; } return str; } i think those codes which used a point to an array are complex for a fresh man, and other approaches make it easier. i would like to what it is like to use it in general. | I know this is a really basic question, but I've just started with some basic C++ programming after coding a few projects with high-level languages. Basically I have three questions: Why use pointers over normal variables? When and where should I use pointers? How do you use pointers with arrays? |
I did a usermod to add the current user user in a group, but when I run id -Gn it only shows the main user's group: [user@computer ~]$ id -Gn user But when I specify the user, it works normally: [user@computer ~]$ id -Gn user user newgroup Do you have an idea why it works like it? Am I missing something concerning the groups management in UNIX? | I changed permissions of a file (chmod g+w testfile) and running ls -l testfile gives: -rwxrwxr-x 1 user1 user1 0 2011-01-24 20:36 testfile I then added a user to that group ("/etc/group" has user1:x:1000:user2 line), but am failing to edit that file as user2. Why is this so? |
A certain interaction between Han Solo and Finn has really been bothering me lately. While infiltrating Star Killer Base, just before they go in to rescue Rey, Finn reveals to Han that he doesn't actually know how to lower the shields like he had promised. Han is obviously upset by this, and the dialog is as follows: Han Solo: People are counting on us. The galaxy is counting on us. Finn: Solo, we'll figure it out. We'll use the Force. Han Solo: That's not how the Force works! My problem is that this is exactly how the Force works, and Han Solo knows it! In fact, for the majority of the original films, it is hypothesized that Han uses the Force (whether he realizes it or not) in situations exactly like this. And in The Force Awakens, we learn that Han does believe in the Force, and he must understand that the Force has been with him in most, if not all, of his past adventures, including his most recent escape from the Guavian Death Gangs. For the sake of clarity, let me specify that I am not saying that Han actively uses the Force, like a Jedi would. Rather, I am saying that the Force is with him, and he is using it for "good luck". So why would Han say this? He has knows that the Force does, in fact, work like that. | In The Force Awakens, the following conversation takes place, on Starkiller Base: Han Solo: People are counting on us. The galaxy is counting on us. Finn: Solo, we'll figure it out. We'll use the Force. Han Solo: That's not how the Force works! Finn was willing to lead Han and Chewie behind the enemy lines, without really knowing what he was about going to do. At the site, he figured they'd use the Force – of which he was never even supposed to have heard of! Where did he get the idea the Force would help them? And in what way? As a Stormtrooper of the First Order, where did he get any thoughts regarding to the Force, and how it works? |
I want to have this var myobject = { 'a': [{ 'b': 2 }] }; var myother = { 'a': [{ 'c': 3 }] }; to become : {'a' : [{'b': 2},{'c': 3}]} how can I achieve this ? | I need to be able to merge two (very simple) JavaScript objects at runtime. For example I'd like to: var obj1 = { food: 'pizza', car: 'ford' } var obj2 = { animal: 'dog' } obj1.merge(obj2); //obj1 now has three properties: food, car, and animal Does anyone have a script for this or know of a built in way to do this? I do not need recursion, and I do not need to merge functions, just methods on flat objects. |
I'm pretty new to LaTex, so please forgive my sloppy code. I'm trying to create a table from a csv file, and pass a list of colors in so that LaTex will color each cell of the a column of the table differently depending on the corresponding element in the list. I can't get it to work. Any suggestions? \documentclass{article} \usepackage{pgfplotstable,filecontents} \RequirePackage{listofitems} \begin{filecontents*}{test.csv} ColA, ColB, ColC 0.17, 0.91, 0.67 0.15, 0.17, 0.92 0.48, 0.1, 0.28 \end{filecontents*} \begin{document} \pgfplotstabletypeset[col sep=comma, ]{test.csv} \def\mylistOne{green, blue, orange} \readlist*\mylistTwo{\mylistOne} \newcounter{myCounter} \setcounter{myCounter}{-1} \foreachitem\x\in\mylistTwo[]{ \stepcounter{myCounter} \pgfplotstableset{ every row \themyCounter column 1/.style={ postproc cell content/.append style={ /pgfplots/table/@cell content/.add={\cellcolor{\x}}{}, } } } } \end{document} | How do I use xcolor to color a specific cell from a table in pgfplots? Is xcolor the best tool to use here? I'm trying to loop over a list of colors and color the cells in the column individually. \documentclass{article} \usepackage{pgfplotstable,filecontents} \RequirePackage{listofitems} \usepackage{} \begin{filecontents*}{test.csv} ColA, ColB, ColC 0.17, 0.91, 0.67 0.15, 0.17, 0.92 0.48, 0.1, 0.28 \end{filecontents*} \begin{document} \pgfplotstabletypeset[col sep=comma, ]{test.csv} \def\mylistOne{green, blue, orange} \readlist*\mylistTwo{\mylistOne} \newcounter{myCounter} \setcounter{myCounter}{-1} \foreachitem\x\in\mylistTwo[]{ \stepcounter{myCounter} \pgfplotstableset{ every row \themyCounter column 1/.style={ \cellcolor{\x} } } } \end{document} |
I am not a native English speaker. What I would like to understand is - if a non native speaker who’s got a fairly decent command on the language (in this case say English) speaks to his or her kid in English, would it increase their kids grasp on English and the ability to comprehend the language better. In essence, does interacting with kids in a foreign language increase the kid’s grasp on a foreign language? I understand accent, pronunciation, modulation, intonation all these aspects play an important role but my question is primarily about the usage, and by that I mean the usage of words, grammar, phrases, idioms. I would like to add one more parameter, If the family is not resident in a native English speaking country, and in future if the kid travels to an English speaking country would they be able to seamlessly integrate into the English speaking community (nothing to do with cultural values, in this context), and would their ability to comprehend, read, write and speak be as good OR nearly as good as the native speakers. Have you come across such cases wherein someone mastered a foreign language even without staying in the country to which the language is native? | My husband and I can speak daily conversational Mandarin, probably at the fluency and vocabulary of a native 3rd grade speaker. So decent, but not great. We speak 99% of the time in Mandarin to our son (though we speak English to each other in front of him). As he is a toddler now and getting older, I find my limited vocabulary more of an issue than when he was younger (e.g. at the zoo, we see a polar bear... I didn't know "polar bear" in Mandarin and had to just call it... a "white bear"). I worry that I will cause him developmental issues since I've read that the amount you speak to children impacts their learning (more is better). Unfortunately, the studies I've seen are unclear whether it is purely volume or also diversity of words. Anyone with info or personal experience with this? |
i wrote a code to print a list of a number's prime factorization, and for example, if the user input was "18", it would output "[2, 3, 3]". how do i make it print in such a way that it follows this format: "18 = 2x3x3"? | What is the best approach to calculating the largest prime factor of a number? I'm thinking the most efficient would be the following: Find lowest prime number that divides cleanly Check if result of division is prime If not, find next lowest Go to 2. I'm basing this assumption on it being easier to calculate the small prime factors. Is this about right? What other approaches should I look into? Edit: I've now realised that my approach is futile if there are more than 2 prime factors in play, since step 2 fails when the result is a product of two other primes, therefore a recursive algorithm is needed. Edit again: And now I've realised that this does still work, because the last found prime number has to be the highest one, therefore any further testing of the non-prime result from step 2 would result in a smaller prime. |
I've found multiple stack overflow solutions that suggest to use align stretch in order to make one child occupy the rest of the available container height, but can't make it work for now. P.S: I would like to keep the position absolution on the parent container. .parent { position: absolute; top: 0; left: 0; bottom: 0; right: 0; height: 100%; width: 100%; display: flex; flex-direction: column; align-items: stretch; justify-content: stretch; background-color: lightgrey; } .child-1 { background-color: green; width: 100%; } .child-2 { background-color: yellow; width: 100%; align-self: stretch; } <div class='parent'> <div class='child-1'>no need to stretch</div> <div class='child-2'>would be nice to stretch to rest of available height</div> </div> | I am working on a web application where I want the content to fill the height of the entire screen. The page has a header, which contains a logo, and account information. This could be an arbitrary height. I want the content div to fill the rest of the page to the bottom. I have a header div and a content div. At the moment I am using a table for the layout like so: CSS and HTML #page { height: 100%; width: 100% } #tdcontent { height: 100%; } #content { overflow: auto; /* or overflow: hidden; */ } <table id="page"> <tr> <td id="tdheader"> <div id="header">...</div> </td> </tr> <tr> <td id="tdcontent"> <div id="content">...</div> </td> </tr> </table> The entire height of the page is filled, and no scrolling is required. For anything inside the content div, setting top: 0; will put it right underneath the header. Sometimes the content will be a real table, with its height set to 100%. Putting header inside content will not allow this to work. Is there a way to achieve the same effect without using the table? Update: Elements inside the content div will have heights set to percentages as well. So something at 100% inside the div will fill it to the bottom. As will two elements at 50%. Update 2: For instance, if the header takes up 20% of the screen's height, a table specified at 50% inside #content would take up 40% of the screen space. So far, wrapping the entire thing in a table is the only thing that works. |
My teacher told us that : $$\sum_{k=0}^{n-1} \cos\frac{2k\pi}{n}=0$$ Without giving any proof If someone could tell me how to approach this that would be great ! | Possible Duplicate: Prove $$\cos(\alpha) + \cos(\alpha + \beta) + \cos(\alpha + 2\beta) + \dots + \cos[\alpha + (n-1)\beta] = \frac{\cos(\alpha + \frac{n-1}{2}\beta) \cdot \sin\frac{n\beta}{2}}{\sin\frac{\beta}{2}} $$ |
I asked this question, (10k-only link), Sep 10th, 2010. It was closed Oct 23rd, 2012. How can it be closed two years after the fact? Is there no rule for grandfathering in early questions? (I rarely go on SO, and just noticed it today.) | I just stumbled upon a question from 2009 (that's what I mean by 'old'), . I think we can all agree that by Today's standards this question would be closed (with a couple of valid reasons to choose from). However, things were different back then - well from what I can gather, I see quite a few questions like this from back in the day. This kind of question was clearly acceptable at one point. So, should I vote to close it or leave it be? And just for extra understanding, what would happen to any rep for that question and the answers if it was closed? |
I am trying to write an essay which is a couple of pages long I have 10 pages including the first page but I want it to not say a page number on the first page and on the second page say "Page 1 of 9" how do I reflect this behaviour in Word 2007? | I show the number of pages as 1 / 4, with 4 being the total number of pages. But I do not want to count the first page. Important: I know how to do it for the current page number (Starting at ..), I mean the total number of pages. So if the document has one cover page + 3 pages, I want to show it as 1/3, 2/3 ..., not as 1/4. |
I have a laptop with lubuntu. It's great but I wish LXDE was optional instead of autostarting. So my question is, what can I do to make it boot directly into a text only mode, not loading anything extra until I do something like start x ? My goal is to have my system be as lightweight as possible until I need the extra stuff. | I have installed Debian wheezy on my machine with a netinst image, now I would like to deactivate the desktop and boot straight to the command line, not only that but I would like to not waste any resource on the X11/gnome/gdm at all if not needed. I tried ( as root ) update-rc.d -f gdm remove update-rc.d -f gdm3 remove update-rc.d -f wdm remove but Debian keeps booting into the login manager, I really don't need that, how I can deactivate this kind of boot and start X only when needed ? |
Well i installed apache2 by typing sudo apt-get install apache2 now i am tring to uninstall apache2 by this command sudo apt-get autoremove apache2 Well my apache2 is still running. And when i stop it vie typing sudo service apache2 stop it stops, and i can also start it typing sudo service apache2 start Whats the point of auto remove anyway? and how to remove apache2 ? | It seems a simple apt-get remove apache2 does not completely remove apache2 as I can still see it on one of the processes when running top. How does one remove apache2 completely on his ubuntu server? It's not removed indeed: ~# which apache2 /usr/sbin/apache2 ~# whereis apache2 apache2: /usr/sbin/apache2 /etc/apache2 /usr/lib/apache2 /usr/share/apache2 /usr/share/man/man8/apache2.8.gz But when I do apt-get remove apache2 again: # apt-get remove apache2 Reading package lists... Done Building dependency tree Reading state information... Done Package apache2 is not installed, so not removed 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. |
I have an array that looks like this: $scope.quotes = [ { 'quote': 'foo', 'author': 'bar', 'source': 'foobar', 'first': 'slideout', }, { ... }, ] I'm trying to remove the key-value first: slideout from the array. like this: delete $scope.quotes[0][first]; I also tried: delete $scope.quotes[0].first; | Say I create an object as follows: let myObject = { "ircEvent": "PRIVMSG", "method": "newURI", "regex": "^http://.*" }; How should I remove the property regex to end up with new myObject as follows? let myObject = { "ircEvent": "PRIVMSG", "method": "newURI" }; |
In a card deck of $52$, I want to count the ways for $12$ card-hands to contain 4 cards in each of three suits. I thought that it'd be: The ways of picking first suit $\to 4$ The ways of having 4 cards with this suit $\to \binom{12}4$ The ways of picking first suit $\to 3$ The ways of having 4 cards with this suit $\to \binom{12}4$ The ways of picking first suit $\to 2$ The ways of having 4 cards with this suit $\to \binom{12}4$ So total ways is: $4\cdot 3\cdot 2 \cdot \binom{13}4 ^3$. My notes say this is incorrect but do not say why. | Problem: Find the number of twelve-card hands containing four cards in each of three suits. My solution: pick a suit : 4 ways. choose 4 cards from the 13 in that suit: ${^{13}}{C}_{4}$ ways. pick another suit: 3 ways. choose 4 cards from the 13 in the new suit: ${^{13}}{C}_{4}$ ways. pick the final suit: 2 ways. choose 4 cards from the 13 in the final suit: ${^{13}}{C}_{4}$ ways. Hence, total number of ways is $4\cdot{^{13}}{C}_{4}\cdot3\cdot{^{13}}{C}_{4}\cdot2\cdot{^{13}}{C}_{4} = {^{4}}{P}_{3}\cdot\left({^{13}}{C}_{4}\right)^3 $ total hands. This is the incorrect answer. Why? |
Say I have these lists: a = [1, 2, 3, 4] b = [6,7] c = ['a', 'b', 'c'] I would like to create a 3-Dimensional data structure that contains new lists combining all the elements of each list together in all possible ways. I would then like to access these new list using matrix like indexing. So for example, say f is a function that does what I want. Then I could do this: m = f(a,b,c) Then m[0][0][0] would give [1,6,'a'], m[1][0][0] would give [2,6,'a'], and so on. Basically, I know I can already do this using nested for loops. jList = [] for j in a: kList = [] for k in b: lList = [] for l in c: o = [j,k,l] lList.append(o) kList.append(lList) jList.append(kList) This gives me a list of lists of lists of lists. [[[[1, 6, 'a'], [1, 6, 'b'], [1, 6, 'c']], [[1, 7, 'a'], [1, 7, 'b'], [1, 7, 'c']]], [[[2, 6, 'a'], [2, 6, 'b'], [2, 6, 'c']], [[2, 7, 'a'], [2, 7, 'b'], [2, 7, 'c']]], [[[3, 6, 'a'], [3, 6, 'b'], [3, 6, 'c']], [[3, 7, 'a'], [3, 7, 'b'], [3, 7, 'c']]], [[[4, 6, 'a'], [4, 6, 'b'], [4, 6, 'c']], [[4, 7, 'a'], [4, 7, 'b'], [4, 7, 'c']]]] This is fine, but I have to do this for dimensions higher than 3, and the many nested for loops just seems like it can't possibly be the best or most efficient way to build this type of data structure. I can't help but thinking there must be a better solution, something in some library like the function I made up above, maybe numpy function, but I've done a lot of searching and have not found something for lists of varying sizes and data types like I have. Any ideas? | How can I get the Cartesian product (every possible combination of values) from a group of lists? Input: somelists = [ [1, 2, 3], ['a', 'b'], [4, 5] ] Desired output: [(1, 'a', 4), (1, 'a', 5), (1, 'b', 4), (1, 'b', 5), (2, 'a', 4), (2, 'a', 5) ...] |
Create two variables assign month as one variable and year as another variable and pass into next request using JSR223 post processor am getting issue while doing this,can anyone please suggest me | Assign month as one varaible and year as one variable pass into next requst For the above thing needed using bean shell post processor and dummy sampler |
I have followed the steps on the Ubuntu website as it says, and it gets stuck halfway through 'phablet-flash -b'. What makes it worse i then when i try to put it into recovery, and run the code 'adb devices' it doesn't show any devices? Any help please? | I have installed the Ubuntu Touch Developer Preview on my Nexus 4. It is the problem when I want to get back to my android 4.2.2 but I wipe all my data first, from factory reset, cache partition and also the dalvik cache. Now, I cannot root my phone to android neither ubuntu because the pc cannot recognize my phone. Can you tell me what is my problem and how can I fix this? Thanks! |
In my QFT course, we studied the Klein Gordon equation, and we found that the field operators verifies : $[\phi(x), \phi^\dagger (y)]=-i \Delta(x,y)$ With $$\Delta(x,y)=i \int d\widetilde{k} (e^{-ik(x-y)}-e^{+ik(x-y)})$$ Where $d\widetilde{k}=\frac{d^3k}{2k^0(2\pi)^3}$. And we said that : if $(x-y)^2<0$ then $\Delta(x,y)=0$ But I don't know how to prove this ? I tried to manipulate the integral to show this but nothing very useful... How to prove this ? And as I understand the property, it means that if we have $x$ and $y$ that have space-like separation, then they commutes. So in more physical way, it means that if I measure $\phi$ in $x$ and then in $y$ or in $y$ and then in $x$ in a faster way than light could reach the distance between $x$ and $y$, I will have the same result. Which is logic because in thoose configurations, the field "can't be aware" of a previous measurement as $(x-y)$ lives outside of the light cone. So my two questions : How to prove that $\Delta(x,y)=0$ for $(x-y)^2<0$. Is my physical interpretation of this entirely correct? | Related post In Peskin and Schroeder's QFT p28, the authors tried to show causality is preserved in scalar field theory. Consider commutator $$ [ \phi(x), \phi(y) ] = D(x-y) - D(y-x) \tag{2.53} $$ where $D(x-y)$ is the two-point correlation function, $$D(x-y):= \langle 0 | \phi(x) \phi(y) | 0 \rangle = \int \frac{d^3 p}{ (2\pi)^3} \frac{1}{ 2E_{\mathbf{p}}} e^{-ip(x-y)}\tag{2.50}$$ P&S argued that each term in the right-hand-side of (2.53) is Lorentz invariant, since $$\int \frac{d^3p }{ (2\pi)^3} \frac{1}{2E_{\mathbf{p}}} = \int \frac{ d^4 p }{ (2\pi)^4} (2\pi) \delta(p^2-m^2)|_{p^0>0} \tag{2.40}$$ is Lorentz invariant. Since there exists a continuous Lorentz transformation in the spacelike interval $(x-y)^2<0 $ such that $(x-y) \rightarrow - (x-y) $ and $D(y-x)=D(x-y)$, (2.53) equals zero in the spacelike interval. In timelike interval, since such continuous Lorentz transformation does not exist, (2.53) is non-zero in general. My question is, consider a non-continuous Lorentz transmation in the timelike interval, $PT$, namely time reversal times parity transformation. I can also let $(x-y) \rightarrow - (x-y) $. Why (2.53) in the timelike interval is non-zero? I guess $PT$ will let (2.40) go to $p^0<0$ branch. But I am not sure if it breaks the Lorentz invariant of (2.40) and (2.50). |
I have just installed Ubuntu for the first time I cant get my bluetooth to turn on. I ran a couple of commands and these are the results: $ sudo rfkill list 0: phy0: Wireless LAN Soft blocked: no Hard blocked: no 1: brcmwl-0: Wireless LAN Soft blocked: no Hard blocked: no 2: hci0: Bluetooth Soft blocked: no Hard blocked: no $ sudo rfkill unblock bluetooth $ sudo rfkill list 0: phy0: Wireless LAN Soft blocked: no Hard blocked: no 1: brcmwl-0: Wireless LAN Soft blocked: no Hard blocked: no 2: hci0: Bluetooth Soft blocked: no Hard blocked: no $ dmesg | grep Blue [ 16.575002] Bluetooth: Core ver 2.21 [ 16.575014] Bluetooth: HCI device and connection manager initialized [ 16.575016] Bluetooth: HCI socket layer initialized [ 16.575018] Bluetooth: L2CAP socket layer initialized [ 16.575021] Bluetooth: SCO socket layer initialized [ 19.060274] Bluetooth: hci0 command 0x1001 tx timeout [ 27.056612] Bluetooth: hci0: BCM: Reading local version info failed (-110) [ 27.061648] Bluetooth: hci0: BCM: chip id 70 [ 27.077663] Bluetooth: hci0: BCM43142A [ 27.077667] Bluetooth: hci0: BCM (001.001.011) build 0000 [ 27.535077] Bluetooth: hci0: BCM: Patch brcm/BCM.hcd not found [ 34.933334] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 34.933337] Bluetooth: BNEP filters: protocol multicast [ 34.933341] Bluetooth: BNEP socket layer initialized $ lspci -knn | grep Net -A2; lsusb 04:00.0 Network controller [0280]: Broadcom Corporation BCM43142 802.11b/g/n [14e4:4365] (rev 01) Subsystem: Hewlett-Packard Company BCM43142 802.11b/g/n [103c:804a] Kernel driver in use: wl Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 004: ID 138a:0050 Validity Sensors, Inc. Swipe Fingerprint Sensor Bus 001 Device 003: ID 064e:930a Suyin Corp. Bus 001 Device 002: ID 0a5c:216d Broadcom Corp. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub | Bluetooth is on but can't find or be found by any other devices. Output of sudo service bluetooth status: ● bluetooth.service - Bluetooth service Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled) Active: active (running) since ხუთ 2015-06-04 22:33:18 GET; 13min ago Main PID: 26678 (bluetoothd) CGroup: /system.slice/bluetooth.service └─26678 /usr/sbin/bluetoothd -n ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/HFPAG ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/HFPHS ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/A2DPSource ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/A2DPSink ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/HFPAG ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/HFPHS ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/A2DPSource ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/A2DPSink ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Adapter /org/bluez/26678/hci0 has been enabled ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Adapter /org/bluez/26678/hci0 has been enabled Output of lsusb: Bus 003 Device 005: ID 0a5c:21d7 Broadcom Corp. BCM43142 Bluetooth 4.0 How can I fix it? |
I am trying to write a program from removing spaces in a string in C. I tried to debug using gdb but I guess I am not very knowledgable in using that tool. My code is as follows: #include<stdio.h> void RemoveSpaces(char * str){ char *var1, *var2; var1 = str; var2 = str; while(*var1 != '\0'){ if(*var1 != ' '){ *var2 = *var1; var2++; } var1++; } *var2 = '\0'; } int main(){ char *str = "abc de"; printf("Before: %s\n", str); RemoveSpaces(str); printf("After: %s\n", str); return 0; } I tried to set watch on var1 and var2 but I get SIGSEGV on line where *var2 = *var1; I looked for some code before writing my own. Of course, the answer states that its untested but I am doing a similar statement on the line where I get error. Why wouldn't (thereotically) *i = *j++; give an error while *var2 = *var1; would? (I don't want someone to remove my error. I just want to know why I might be getting this error so that I can avoid it in future. ) | The following code receives seg fault on line 2: char *str = "string"; str[0] = 'z'; // could be also written as *str = 'z' printf("%s\n", str); While this works perfectly well: char str[] = "string"; str[0] = 'z'; printf("%s\n", str); Tested with MSVC and GCC. |
import java.util.*; public class Solution5 { public static void main(String args[]) { int voterId; String voterName; int voterAge; boolean isVoteCasted; String constituency; Scanner sc = new Scanner(System.in); Vote v[] = new Vote[4]; for(int i=0;i<4;i++) { voterId = sc.nextInt(); sc.nextLine(); voterName = sc.nextLine(); voterAge = sc.nextInt(); isVoteCasted = sc.nextBoolean(); sc.nextLine(); constituency = sc.nextLine(); v[i] = new Vote(voterId, voterName, voterAge, isVoteCasted, constituency); } String con = sc.nextLine(); sc.close(); int total = findTotalVotesCastedByConstituency(v, con); if(total == 0) System.out.println("No votes casted"); else System.out.println(total); Vote[] search = searchVoteByAge(v); if(search == null) System.out.println("No such voters"); else { for(int i=0;i<search.length;i++) System.out.println(search[i].getVoterId()); } } public static int findTotalVotesCastedByConstituency(Vote v[], String con) { int c=0; for(int i=0;i<4;i++) { if(con.equalsIgnoreCase(v[i].getConstituency())) { if(v[i].getIsVoteCasted()) c++; } } return c; } public static Vote[] searchVoteByAge(Vote v[]) { Vote temp[] = new Vote[4]; Vote t; int c=0; for(int i=0;i<4;i++) { if(v[i].getVoterAge()<30) temp[c++]=v[i]; } //for(int i=0;i<c;i++) // System.out.println(temp[i].getVoterAge()); if(c==0) return null; for(int i=0;i<c;i++) { for(int j=0;j<c-i-1;j++) { if(temp[j].getVoterAge() > temp[j+1].getVoterAge()) { t = temp[j]; temp[j] = temp[j+1]; temp[j+1] = t; } } } return temp; } } class Vote { private int voterId; private String voterName; private int voterAge; private boolean isVoteCasted; private String constituency; public Vote(int voterId, String voterName, int voterAge, boolean isVoteCasted, String constituency) { this.voterId = voterId; this.voterName = voterName; this.voterAge = voterAge; this.isVoteCasted = isVoteCasted; this.constituency = constituency; } public int getVoterId() { return voterId; } public String getVoterName() { return voterName; } public int getVoterAge() { return voterAge; } public boolean getIsVoteCasted() { return isVoteCasted; } public String getConstituency() { return constituency; } } In this code, I am trying to return array objects (in ascending order) of those voters whose age is less than 30. Since I am new to this concept, so I did not use List and Collection. Rather opted for simple bubble sort. The results displayed are perfectly correct. Still I get an additional line which says: Exception in thread "main" java.lang.NullPointerException: Cannot invoke "Vote.getVoterId()" because "search[i]" is null at Solution5.main(Solution5.java:40) | What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them? What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely? |
I previously thought that RAW format is just a one format and any Ps version works with it. But now I know that different RAW formats from newer cameras are not supported by the Ps version that exists at the time the cameras is released. Anyway, I found a which what ACR and LR versions support this specific camera's RW2 files are mentioned. (It says ACR 9.8 & LR 6.8 support RW2s from the FZ2000, right?) So, how can I know about what Photoshop version that supports FZ2000's RW2s? And, is the ACR (in this case, version 9.8) integrated in it?; do I need to get the ACR (9.8) separately?.. | I am a beginner photographer with a Canon 7d and MacBook Pro. I'm not sure if Adobe camera Raw is compatible with either and really need advice on how to go about downloading the correct version. |
The badges for editing posts explicitly exclude tag edits. I understand why - they are supposed to reward substantial edits. At the same time, tags are useful, necessary, for how Stack Exchange works: they are needed so people can find relevant questions, and so people can be notified there's a question they might be able to answer. So, it follows that someone who spends time correcting tags on questions does a service to the community. So could there perhaps be some separate badge for editing tags? "Edited tags on 250 questions - Silver, Edited tags on 1000 questions - Gold", or something like that? | I've been busy retaggin questions since I got my retag privileges. Shouldn't there be an incentive to retag wrongly tagged questions, other than the urge to do things right? I'm mean, the only "badge incentive" for retagging are "Firs edit" (Organizer) and "Creation of a tag used 50 times" (Taxonomist). The first one is easy to get, and the second one, right now in SO is almost impossible to get without cheating, that's editing 50 questions with an unlikely tag. Taxonomist I guess, could encourage wrongly tagging. Is this really a problem? We could have an "Tagged 200 question" badge, so people go for that badge, instead of taxonomist. |
I created local empty folder structure and I don't see folders in Unstaged Changes view I can't commit and push folders to repository, why can't it be done in Eclipse? In git command line I can git add empty folders | How can I add an empty directory (that contains no files) to a Git repository? |
The decision for refusal Please advise me on when next to apply and how to go about a fresh application without getting refused again, in a few weeks' time I'm going to be through with my university undergraduates course. | I am a Nigerian citizen. I was refused a visitor visa to the UK. Here is my rejection letter: How can I apply again so as to not be refused? How soon can I apply? My university undergraduate course will be finished in a few weeks. |
This Association’s standards are to be used globally for all ABC related Engineering issues. My question is that is ''are to be used'' passive structure? And if it is, what type is it. Because I can not see this kind of structure when I check the passive voice chart. | Several times I've heard sentences like You are not to be here. whereas I'd expected something with should. Or He is absolutely not to know.. What is this form? When should I use it? |
Me and my daughter are dependents who got our ITIN in April, but did not get our passports back after 100 days. We called the call center and got different answers at all times and twice they said it has been sent. Yesterday the customer care lady told me to ask the congressman of my place. Its been only 1 year since we came from India. My daughter is two. We went to Bellevue IRS office but they did not help. We called taxpayer advocate but they said they don't take document missing cases. Now who is congressman of Bellevue Washington? Can he really get passports back? We can't get help from our embassy since the office is a 10 hour drive, and I don't think I have any original documents for myself and daughter. Hope to see reply. Worried to even call customer care since July. | I have filed my 2012 tax return jointly with my wife, along with my wife's ITIN application, back in late March. In April, I got a letter for IRS ITIN department saying that we should send my wife's original passport to them. So we sent my wife's passport on May 15th. USPS tracking number confirmed that IRS received it on May 20th. However, last week (end of June) we have received another letter from IRS ITIN department saying that our ITIN application has been rejected, rejected because we have not sent the original identification document that they requested! Okay, let's put our tax return and ITIN aside. Where is my wife's passport? Right now my wife does not have her personal identification, nor proof of legal status in U.S. Could IRS have lost it? I tried to call the IRS several times. One time I waited for 1 hour and 20 minutes to talk to a person, and that person said he has only 10 minutes to talk before he has to leave. He said they'll investigate and someone(?) will call us back soon, but never called back. I wrote them a letter, but no response. I tried calling several times more, but machine is saying 'sorry too many calls right now, we can't accept your call'. What can I do? |
Hello I have been searching for ways to update my apps & download without having to use a credit card which I don't have and I don't have the "none or Paypal" option in the payment section and I don't know what else to do. Is there any way without having those options that I can update my apps or even download any?? | I want to download free app in my iPod touch device and i have the following doubts. Kindly resolve me doubts. when i try to download it asks my credit card security number. since i am trying to download free app , why do i need to provide my credit card security code? Will i be debited for downloading the free app from app store? I cant able to find any information regarding this on apple. Please provide me some references about this from apple and please resolve my doubts. Thanks a lot. |
How do you prove the following limit? $$\lim_{n\to\infty}\left(\sum_{k=1}^n\frac{k}{2^k}\right)=2$$ Do you need any theorems to prove it? | How can I evaluate $$\sum_{n=1}^\infty\frac{2n}{3^{n+1}}$$? I know the answer thanks to , but I'm more concerned with how I can derive that answer. It cites tests to prove that it is convergent, but my class has never learned these before. So I feel that there must be a simpler method. In general, how can I evaluate $$\sum_{n=0}^\infty (n+1)x^n?$$ |
The linked question is exactly what my problem was but it is not having any solution still. In the above image we can see the comment box going out of the dialog box in every Stack Exchange Sites,when we click other (needs ♦ moderator attention) in flag section. | To reproduce: Click Flag (question or answer) Click other (needs moderator attention) The textarea is too wide: StackOverflow AskUbuntu StackExchange Most probably affects other sites, but didn't check. I think it's enough. :-) Reproducing on: Chromium Version 40.0.2214.111 Ubuntu 15.04 (64-bit) Google Chrome Version 41.0.2272.76 (64-bit) Firefox 36.0 (I'm using Ubuntu 15.04) |
I've been playing and casting spells but there's no xp bar for the magic. I have checked the options but that's not it, I can move it but can't see it. I'm also not levelling - I've killed like 20 mobs with just magic and I'm still level 1 with 100 mana and like 11 burnout. Ars Magica is a Minecraft mod and is part of some of the Feed the Beast packs for 1.6.4 and i can cast the spells | I took with my first skill points "Self" and "Regenerate" and "Projectile". Now I can make only 2 spells - "Self Regenerate" & "Projectile Regenerate" - which I both can't cast. The first uses 270 Mana, the second uses 540 mana - but I have only 100. How can I progress further? I don't have any points to unlock other spells and I can't cast my current ones because I don't have the mana - thus I can't progress. How do I level up so I can unlock more points? |
Windows has a certain format, and if a file is to be used in Linux, the line endings have to be converted. Isn't the line ending just a character like any other? Why is it treated specially? | Why did DOS/Windows and Mac decide to use \r\n and \r for line ending instead of \n? Was it just a result of trying to be "different" from Unix? And now that Mac OS X is Unix (-like), did Apple switch to \n from \r? |
I know they can be $\frac{0}{0}$ or $\frac{\pm\infty}{\pm\infty}$, but what do they mean in English? For example, $$\lim_{n\rightarrow \infty}A$$ In the context of limits, when the above example get a limit that is an indeterminate form. I assume it means that $A$ does not give enough information to "determine" a limit. Fine. But why is it that when we cancel out some terms out in $A$, *poof* now we have enough information to get a definite limit even though no extra information (i.e. additional expressions) have been added to $A$. Another example: $\lim_{x\rightarrow3}\frac{(x-3)(x+3)}{x-3}=\frac{0}{0}$, not enough information to determine the limit. $\lim_{x\rightarrow3}\frac{(x-3)(x+3)}{x-3}=\lim_{x\rightarrow3}(x+3)=6$, Hey! Now we have enough information to determine the limit! (I thought you said you didn't have enough information) | We can apply l’Hôpital’s Rule to the indeterminate quotients $ \dfrac{0}{0} $ and $ \dfrac{\infty}{\infty} $, but why can’t we directly apply it to the indeterminate difference $ \infty - \infty $ or to the indeterminate product $ 0 \cdot \infty $? Furthermore, why can’t we call $ \infty + \infty $ and $ \infty \cdot \infty $ indeterminate forms? I’m new to calculus, so please clear up my concepts if you can. Thanks! |
I have a private comparator in Level class: bool positionCmp(Entity* a, Entity* b); and when I try to use this in another Level class method: void Level::drawEntities(std::vector<Entity*> entities) { sort(entities.begin(), entities.end(), positionCmp); for (int i = 0; i < entities.size(); ++i) entities[i]->draw(); } Visual Studio 2019 compiler says: 'Level::positionCmp': non-standard syntax; use '&' to create a pointer to member. If I add the '&', I getting '&': illegal operation on bound member function expression void Level::drawEntities(std::vector<Entity*> entities) { sort(entities.begin(), entities.end(), &positionCmp); for (int i = 0; i < entities.size(); ++i) entities[i]->draw(); } What should I do? | I'm using an API that requires me to pass a function pointer as a callback. I'm trying to use this API from my class but I'm getting compilation errors. Here is what I did from my constructor: m_cRedundencyManager->Init(this->RedundencyManagerCallBack); This doesn't compile - I get the following error: Error 8 error C3867: 'CLoggersInfra::RedundencyManagerCallBack': function call missing argument list; use '&CLoggersInfra::RedundencyManagerCallBack' to create a pointer to member I tried the suggestion to use &CLoggersInfra::RedundencyManagerCallBack - didn't work for me. Any suggestions/explanation for this?? I'm using VS2008. Thanks!! |
I've followed all the instructions for installing rabbitvcs and am running nautilus3 but do not get right-click svn options (I believe it worked under 10.10). I should add that I'm running 12.04 under VMware Fusion. Any suggestions (I've searched the web but no luck). | I was evaluating RabbitVCS as replacement of RapidSVN to connect to my SVN repository on Ubuntu server. This what I did on my 12.04 Opened the Ubuntu software centre Searched for RabbitVCS-Core and RabbitVCS-nautilus. They were listed. Installed both of them and they are successfull installed. Then, I used the dash home to see if I can find these programs. Opened Home folder and right clicked on certain folders which was checked out using Rapid SVN. I could not find any options to use RabbitVCS in nautilus from here. I restarted my machine and repeated both process again. So How can I use RabbitVCS? Am I seeing everything as it is expected or some thing weird? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.