body1
stringlengths
20
4.1k
body2
stringlengths
23
4.09k
$V$ is an inner product space and $u, v$ belong to $V$. I need to prove that $\langle u,v\rangle = 0$ iff $\|u\| \le \|u+cv\|$ for all scalars $c$. So far to show the backward proof, I've established that $0 \le \overline{c}\langle u,v\rangle + c\langle v,u \rangle + c\langle v,v\rangle $ but don't think I am on the right track. Any hints or methods would be much appreciated!
Prove that $\langle u,v\rangle=0\Longleftrightarrow \|u\|\leq \|u+av\|$. So far I can get the $\Longrightarrow$ very easily, but I need some help with the $\Longleftarrow$ implication, any hints would be greatly appreciated. Please no answers, I just want a small nudge to get me in the right direction, I've been stumped on this for a little bit. Here's what I have so far: ($\Longleftarrow$) Assume $\|u\| \leq \|u+av\|$ $\|u+av\|^2=\langle u+av,u+av\rangle=\langle u,u\rangle+ \langle u,av\rangle+\langle av,u\rangle+\langle v,v\rangle=\|u\|^2+\bar{a} \langle u,v\rangle+a\langle v,u\rangle+\|v\|^2=\|u\|^2+ \bar{a}\bar{\langle v,u\rangle}+a\langle v,u\rangle+\|v\|^2$ Thoughts/ideas?
I've got following sentence in a visa application form: You are not required to provide a medical certificate or Chest X-ray Certificate if you will be in New Zealand for less than six months. I fully understand the meaning. But the sentence does not match the , and this confuses me. So, the questions are: Is this a legitimate use? Are there any grammatical rules in place?
All the textbooks I have ever come across during the course of my studying English emphasize that future tense should not be used in conditional clauses. For example, If it rains in the evening, we will not go for a walk. (if it will rain in the evening...) We decided to go for a walk if it didn't rain in the evening. (...if it wouldn't rain in the evening) However, in the following sentence I'm really inclined to use the future tense. Don't implement this feature if it will significantly increase the complexity of the user interface. According to all the rules I know of, the future tense is illegal here. However, my gut feeling tells me that the sentence is correct. If I am wrong, the question ends here. Otherwise please read on. I find the last example different from my first two because: In the first examples we must wait and see if the condition is true, and then make a decision accordingly, whereas in the last example, we must actually analyze/predict/forecast the future in order to make the decision in the present. (might be irrelevant) In my first language - Armenian - where we have a special mood for conditions, the translation of the third sentence actually uses indicative, whereas the first two use that special mood (the conditional mood, as it were). Since the second would-be principle is easier for me to experiment with, I noticed that every time a condition uses the indicative mood in my language, I'm inclined to use the future tense in English. As another example: I will give you the money if it will make you happier. Am I imagining things or are my examples of the future tense in the conditional clause valid? If they are valid, what rule would you suggest to distinguish the cases when it's OK? (I do realize that translating a sentence to another language and analyzing the translation doesn't really count as a rule).
Is there a culturally-universal symbol to represent religion or a place of worship? I would like to avoid having an icon containing multiple religious symbols because that opens up a whole mess of problems and which symbols to show would depend a lot on the cultural of the viewer.
I am involved in a web application where items in a list have a category. Each category of an item is shown through the use of an expressive icon. One of the categories is religion. My coworker, a graphic designer, is at a loss on how he would represent religion in a logo "neutrally". Some of the items may be associated with Christianity, Islam, Buddhism, etc. so a religion-specific icon would not work and may be potentially offensive. So, is there a way we can represent it in a different way?
Suppose i have the following class structure. If i execute the child class, it will print both. Inside Public method Inside Private method Could anyone explain the reason how the private method code is reachable to m1 ? class Base { public void m1() { System.out.println("Inside Public method"); m2(); } private void m2() { System.out.println("Inside Private method"); } } public class Child extends Base { public static void main(String[] args) { Child ob = new Child(); ob.m1(); } }
In Java, are there clear rules on when to use each of access modifiers, namely the default (package private), public, protected and private, while making class and interface and dealing with inheritance?
The prompt is to find the ways there are to sit n people on k chairs standing in a row so that no 2 people sit next to each other. Pigeon hole theorem is what I am using to attempt this problem. since there are k chairs, and n people. we must have at least $k-n+1$ chairs. Assuming people to be X and chairs to be O, it can be visualized as XOXOXOX so at least n-1 unoccupied chairs are needed to occupy n people in a way that they aren't next to each other or vice versa. So now we have $k-n+1$ holes and n pigeons to occupy these places, giving us ${k-n+1} \choose{n}$$n!$ ways to do this right since all people are unique. Let's say we have 9 chairs and 4 people, we have $6\choose4$$4! = 450$ ways to do so. Is this the correct way to approach a problem like this?
There are n chairs in a row. In how many ways can a teacher sit k students on these chairs so that no 2 students sit next to each other (and obviously no 2 students sit on 1 chair)? I was thinking about inclusion-exclusion, that each student will sit next to each other, however it isn't good enough since there could be more chairs than students. Basically currently I have no idea how to solve it.
dev/sda5:%20clean,1538857/37347328%20files,%2013595168/149369856%20blocks I'm getting that error when I boot my system.
On every bootup it's the same: /dev/sda1: clean, 908443/38690816 files, 44176803/154733312 blocks Is it some kind of option Ubuntu uses to ensure filesystem consistency or is there something wrong with my HDD? fsck takes up to 30s while booting and so about triples the time needed otherwise. Full output (partly in German): Begin: Loading essential drivers ... done. Begin: Running /scripts/init-premount ... done. Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done. Begin: Running /scripts/local-premount ... done. Begin: Running /scripts/local-bottom ... done. done. Begin: Running /scripts/init-bottom ... done. fsck von util-linux 2.20.1 /dev/sda1: sauber, 908443/38690816 Dateien, 44176803/154733312 Blöcke udevd[623]: unknown key 'SYSFS{idVendor}' in /lib/udev/rules.d/45-libticables.rules:6 udevd[623]: invalid rule '/lib/udev/rules.d/45-libticables.rules:6' * Starting mDNS/DNS-SD daemon [ OK ] * Starting Reload cups, upon starting avahi-daemon to make sure remote queues are populated [ OK ] * Starting configure network device security [ OK ] * Starting bluetooth daemon [ OK ] ####* Starting all other stuff
I am doing this programming assignment for uni and I am using an ArrayList, now when I select a button I want a textfield to display the farm name text from that ArrayList. Here is a screenshot of my code and errors. The code for jtfFarmName.setText.... works out of "display(int i)" but when I put that code in "display(int i)" and call it like this "display(0)" it gives me that error. Any help would be amazing, thanks. It is really annoying me. I have already initialized the farm variable;
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?
Is there any real-time anti virus for Ubuntu? Which antivirus is good and in real-time (I mean that, if I try to open an infected file or go to a bad website, it stops it). I read a post in and here is a part of it: Anti-virus If you are running a file server, interface frequently with Windows drives or share files with Windows users, or use virtualization, you will want a virus checker for your Windows files. Despite extensive misinformation, Linux is not immune from malware (witness the explosion of malware being created for the Linux-based Google Android systems). The malware is not usually spread within the OS itself (as long as the OS is a well-respected distribution obtained through official channels), but in trojan programs downloaded and installed by users outside of the normal software distribution channels (i.e. repositories) of the OS. There is always a danger to using programs downloaded from the Internet from sources other than respected repositories -- it is the primary reason that Debian and (K)Ubuntu retain tight control over their software repositories. Any file can have malware embedded in it (which is trivial to achieve by concatenation, for example: cat originalfile.avi malware.exe > originalfileplusmalware.avi). The question is whether a user will try to open a file with a program (such as a media player) that has been compromised in a way that allows it to execute the code found in the infected media (e.g. .avi) file. This can occur not only for Windows users but for any OS (including Mac OSX and Linux) with a compromised program (e.g. media player). An example is the extensive problems the Mac OS community is currently having with the Flash player. Routine scanning of any file downloaded from the Internet, any file imported from another user's computer (even a trusted source, since their attention to virus prevention may not be as compulsive as yours), or any attachment received in an email (even from a trusted sender) should be done with an anti-virus program. So I think that there is a need for anti-virus in Ubuntu.
I thought that there was no need to scan for viruses either in Ubuntu or any Linux distros until I found virus scanner packages clamtk and klamav in Ubuntu software center yesterday. This leads to the following questions: How do viruses differ between Linux and Windows? How do the strategies for protection differ between Linux and Windows? Should a virus scanner package be installed on my system? If so, which would be a better option?
In my office i am using NETGEAR Wi-Fi device. Some person get my wifi password and using my internet connection. I am using NETGEAR genie software. it shows the connected device MAC address & IP address. Then how to block the particular device. (IP address) I have many time change my wifi password. that also no use. My PC have wired connection with WIFI system. I cant turnoff myWIFI. Bcse my boss using Laptop. i only want to block the particular device IP. Kindly send the solution. My PC OS is win 7 home premium 64bit. my wifi system is NETGEAR-WNR3500Lv2
I kust realized that some other PC is also getting assigned a IP address (DHCP Lease) from my modem. I am sure this is not one of the PCs in my home. My modem was using WEP security. I know WEP is far less secure and WPA is better, but this actually is a borrowed modem, and I did not know that WEP was used. I immediately did the following : On My Modem Changed the encryption mode from WEP to WPA Changed the password After this I do not see the intruder PC on the DHCP list. On my Mac: Changed the permissions on the public folder to "everyone - no access" Turned off "File Sharing" in System Preferences (But I would want to turn it back on sometime) My mac is the one that is always on, Both the admin user and the user I normally use are password protected. Is the above sufficient? Should I do something more? Also, is WPA security sufficient? Should I take other steps?
Let $a,b\in \mathbb{R}$ with $a<b$ and $f,g:[a,b]\to\mathbb{R}$ where $f$ is differentiable, continous and monotone increasing and $g$ is continuous show that there exists $\xi \in [a,b]$ such that the following equality holds. $$\int_a^b \! f(x)g(x) \mathrm{d}x = f(a) \int_a^{\xi} \! g(x)\mathrm{d}x+ f(b)\int_{\xi}^b \!g(x)$$ I thought about using partial integration but I couldn't construct a way to prove it. Any help would be appreciated.
Let $f,g,g´$ be continous on $[a,b]$ and $g$ monotone on $[a,b]$; then there exist $c\in (a,b)$ so that $$\int_{a}^{b}f(x)g(x)dx=g(a)\int_{a}^{c}f(x)dx+g(b)\int_{c}^{b}f(x)dx$$ Ineed to apply the first generalized mean value theorem for integrals i.e. $$\int_{a}^{b}f(x)g(x)dx=f(c)\int_{a}^{b}g(x)dx$$ to $g´$and $\int_{a}^{x}f(x)dx$ but I don´t know how please I would appreciate your help
Prelude While studying trigonometry, I came across this very interesting problem. It wasn't very difficult to solve, however it's result was quite interesting. I have given the solution below. Try to solve it yourself before looking. Problem The diagram below shows three equal squares, with angels $\alpha$, $\beta$, $\gamma$ as marked. Prove that $ \alpha + \beta = \gamma $. Hint If you are not in the midst of a trigonometry course, chances are you will need to see this hint, as it is an uncommon identity. Hover below to see a hint. $ \arctan a + \arctan b = \arctan{\frac{a + b}{1 - ab}} $ This identity was solved earlier in the book I found this problem in (see Postscript). Try to prove this identity for yourself, too! Postscript This problem came from the textbook: "Trigonometry" by I. M. Gelfand.
How can I show that $x+y=z$ in the figure without using trigonometry? I have tried to solve it with analytic geometry, but it doesn't work out for me.
How I can make a TabPage in a TabControl visible/hidden and enabled/disabled?
Is there a way to disable a tab in a ?
I have this code below. As you can guess, when I press on "foobar", a new element is added. The problem: when I click on the the new element nothing happens, why? Im using jQuery 2.1. <div> <span>foobar</span> </div> <script type="text/javascript"> $("span").on('click', function() { $(this).clone().appendTo('div').addClass('new'); alert("click on first element"); }); $(".new").on('click', function() { alert("click on second element"); }); </script>
I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off. This happens on page ready and works just fine. The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound. I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.
I am asked to determine using an appropriate test whether the internal concentration of isoleucine is statistically different between appropriate experiments. So I constructed a data frame in R as follow: dat <- data.frame(experiment = c('no glu', 'glu', 'gluFCCP', 'gluV', 'gluN', 'gluNV'),internal_concentration = c(2.38, 8.57, 3.42, 6.17, 4.58,3.51)) print(dat) experiment internal_concentration 1 no glu 2.38 2 glu 8.57 3 gluFCCP 3.42 4 gluV 6.17 5 gluN 4.58 6 gluNV 3.51 I chose to perform an ANOVA test: model<-lm(dat$internal_concentration~dat$experiment) anova(model) Analysis of Variance Table Response: dat$internal_concentration Df Sum Sq Mean Sq F value Pr(>F) dat$experiment 5 25.558 5.1117 Residuals 0 0.000 I need the F and p values to determine if there's a significant difference, but this result is not working. How should I interpret this error and any suggestion on how to change the code/method?
I am asked to determine using an appropriate test whether the internal concentration of isoleucine is statistically different between appropriate experiments. So I constructed a data frame in R as follow: dat <- data.frame(experiment = c('no glu', 'glu', 'gluFCCP', 'gluV', 'gluN', 'gluNV'),internal_concentration = c(2.38, 8.57, 3.42, 6.17, 4.58,3.51)) print(dat) experiment internal_concentration 1 no glu 2.38 2 glu 8.57 3 gluFCCP 3.42 4 gluV 6.17 5 gluN 4.58 6 gluNV 3.51 I chose to perform an ANOVA test: model<-lm(dat$internal_concentration~dat$experiment) anova(model) Analysis of Variance Table Response: dat$internal_concentration Df Sum Sq Mean Sq F value Pr(>F) dat$experiment 5 25.558 5.1117 Residuals 0 0.000 I need the F and p values to determine if there's a significant difference, but this result is not working. How should I interpret this error and any suggestion on how to change the code/the test used? I just have one value for the concentration for each experiment.
$$\lim _{x\rightarrow a} f(x)+g(x) = f(a)+g(a)$$ Let $ε>0$ be given Since $f$ and $g$ are continuous, $|f(x)-f(a)|< ε$ when $0<|x-a|< \delta_f $ and $|g(x)-g(a)|< ε$ $\ $ when $0<|x-a|< 𝛿_g$ Let $𝛿_h$ be defined as $\min(𝛿_g ,𝛿_f)$ and $h(x)$ be defined as $f(x)+g(x)$ $\ |f(x)-f(a)|+|g(x)-g(a)|< 2ε$ $\ |f(x)-f(a) + g(x)-g(a)|< 2ε$ $\ |h(x)-h(a)|< 2ε$ We can replace $𝛿_f$ and $𝛿_g$ by $𝛿_h$ to get $|f(x)-f(a)| < ε$ when $0<|x-a|<𝛿_h$ and $\ |g(x)-g(a)|< ε$ when $0<|x-a|<𝛿_h$ How do I prove that $\ |h(x)-h(a)|< ε$ instead of $\ |h(x)-h(a)|< 2ε$?
$$\lim _{x\rightarrow a} f(x)+g(x) = f(a)+g(a)$$ Let $\epsilon>0$ be given Since $f$ and $g$ are continuous, $|f(x)-f(a)|< \epsilon$ when $0<|x-a|< \delta_f $ and $|g(x)-g(a)|< \epsilon$ $\ $ when $0<|x-a|< \delta_g$ Let $\delta_h$ be defined as $\min(\delta_g ,\delta_f)$ and $h(x)$ be defined as $f(x)+g(x)$ $$\ |f(x)-f(a)|+|g(x)-g(a)|< 2\epsilon\tag{1}$$ $$\ |f(x)-f(a) + g(x)-g(a)|< 2\epsilon$$ $$\ |h(x)-h(a)|< 2\epsilon$$ We can replace $\delta_f$ and $\delta_g$ by $𝛿_h$ to get $|f(x)-f(a)| < \epsilon$ when $0<|x-a|<\delta_h$ and $\ |g(x)-g(a)|< \epsilon$ when $0<|x-a|<\delta_h$ Since (1) is true when $0<|x-a|<\delta_h$, we can find a $\delta_h$ for every value of $2ε$ for every $2\epsilon>0$ there is a $\delta>0$ such that $|x−a|<\delta\implies ∣h(x)−h(a)∣<2\epsilon$ and for every $2\epsilon$ there exists an $\epsilon$ so for every $\epsilon$ there exists a $\delta$. Is the proof logically correct and is it worded correctly?
This is my jQuery function: var flashField = function ($field) { var colour = $field.css('background-color'); // gets colour ok $field.css( 'backgroundColor', '#FF0000' ); // sets background ok $field.animate({ 'backgroundColor': colour }, 1500); // nada } I want to grab the element's current background, switch it to red and then fade back to the original colour. However the animate function doesn't do anything and no errors are shown in the console. What have I done wrong? Have tried searching but can't find anything that shows bad syntax or whatever. (testing in Chrome 45.0.2454.93 m)
I am trying to animate a change in backgroundColor using jQuery on mouseover. I have checked some example and I seem to have it right, it works with other properties like fontSize, but with backgroundColor I get and "Invalid Property" js error. The element I am working with is a div. $(".usercontent").mouseover(function() { $(this).animate({ backgroundColor: "olive" }, "slow"); }); Any ideas?
I am working on porting code from JAVA to C#, and part of the JAVA code uses tokenizer - but it is my understanding that the resulting array from the stringtokenizer in Java will also have the separators (in this case +, -, /, *, (, )) as tokens. I have attempted to use the C# Split() function, but it seems to eliminate the separators themselves. In the end, this will parse a string and run it as a calculation. I have done a lot of research, and have not found any references on the topic. Does anyone know how to get the actual separators, in the order they were encountered, to be in the split array? Code for token-izing: public CalcLexer(String s) { char[] seps = {'\t','\n','\r','+','-','*','/','(',')'}; tokens = s.Split(seps); advance(); } Testing: static void Main(string[] args) { CalcLexer myCalc = new CalcLexer("24+3"); Console.ReadLine(); } The "24+3" would result in the following output: "24", "3" I am looking for an output of "24", "+", "3" In the nature of full disclosure, this project is part of a class assignment, and uses the following complete source code:
I'm doing simple string input parsing and I am in need of a string tokenizer. I am new to C# but have programmed Java, and it seems natural that C# should have a string tokenizer. Does it? Where is it? How do I use it?
Using a Canon T3i, 18-55 kit lens, 18mm, 1/40 sec, F9, ISO 200 on a sunny afternoon I shot two people, shaded, in a cupola. They came out great, properly exposed. The sunny front bar of the cupola and the field in the background are washed out. Is there a way that I could have avoided the washout but kept the good view of the people in the shaded area? (I tried to upload the picture but the system was telling me that there was a problem because of framing and the shot could not be uploaded, I realize that the picture would have made it easier to advise) This might show the picture I'm referring to. It's the best I can do.
I took a picture once in a beautiful location with an awesome background, and a cool location to get the shot. The problem is, the location of the subject had substantially less light then the background, giving a silhouette effect. Without using an external flash, and on a low budget, what could I do to improve this picture? Specifically, I shooting with a DSLR, outdoors. The DSLR has a small pop-up flash. The nearest good light source was maybe 5-10 feet away. Thanks guys! How do I avoid a dark subject when there's bright sunlight from windows? by I recently shot some photos at a friend's wedding. The location was lovely with lots of light — sometimes too much. The sunlight from the windows and skylights seemed to overpower the shot and the subject/people were very dark. What are some ways to avoid this without using fancy equipment? (I'm just starting out, I'm not a wedding photographer or anything!) Here is one example I took — and this is after I've lightened it somewhat with Picasa: I'm using a Nikon D5000 with a standard 18-55mm lens.
How to remove indent between chapter and section in table of contents. I am using document class report. I have made a table of contents as shown in 1st Figure. The following is code used in package file to create entire formating \NeedsTeXFormat{LaTeX2e}[1994/06/01] \ProvidesPackage{mypackage} [2011/01/11 v0.01 LaTeX package for my own purpose] \RequirePackage[dvips]{graphicx} \RequirePackage[cmex10]{amsmath} \RequirePackage{setspace} \RequirePackage{float} \usepackage{showframe} \RequirePackage[margin=1in]{geometry} \usepackage{subcaption} \RequirePackage{cite} \RequirePackage{caption} \RequirePackage{etoolbox} \RequirePackage{tabularx} \RequirePackage[toc,page]{appendix} \usepackage{tocloft} \RequirePackage{titletoc} \RequirePackage[compact]{titlesec} \captionsetup{labelsep=period} \setcounter{secnumdepth}{3} \makeatletter \patchcmd{\@makechapterhead}{50\p@}{0pt}{}{} \patchcmd{\@makeschapterhead}{50\p@}{0pt}{}{} \makeatother \cleardoublepage %\cleardoublepage %for openright \renewcommand{\chaptername}{CHAPTER} \renewcommand{\thechapter}{\Roman{chapter}}%chapter number in roman %For displaying chapter title and heading in centre with required font \titleformat{\chapter}[display] {\normalfont\large\bfseries\centering}{\chaptertitlename\ \thechapter} {0pc}{\large}%changing font size,and centering of chapter heading \titleformat{\section} {\normalfont}{\thesection}{1em}{\MakeUppercase} However,I want the table of contents to look as in 2nd Figure . Also how to add page number header above the page numbers. Thanks.
How can I change the settings of my table of contents, so that the sections and subsections are not indented as shown in the second picture. I would also like to center the title of the Contents. I am using the article class.
consider following C code int a[]={1,2,3,4}; printf("%d",2[a]); this prints "3".How is it possible? I know in a[2] a is the base address of array.But in 2[a] what is 2? and how it accessses array a?I am totally confused with this representation of array.
As Joel points out in , in (aka: K & R), there is mention of this property of arrays in C: a[5] == 5[a] Joel says that it's because of pointer arithmetic but I still don't understand. Why does a[5] == 5[a]?
A part of my program is supposed to create an array holding either an asterisk or a dot. I have to use a prototype function where if the random number generated(between 0 and 1) is less than a variable p, the array should hold '*'. otherwise it should hold '.'. The array created is only producing dots. What's wrong? (i have declared the function earlier in the program) else { for( i = 0; i<m;i++){ for( j = 0; j<n; j++){ array[i][j] = assignBomb(p); printf("%c", array[i][j]); } printf("\n"); } return 0; } int assignBomb(double p) { srand((int)time(0)); //random number seed double random; random = ((double) rand() / RAND_MAX); //generates random number betwn 0 & 1 char cellchar; //declaring a character variable if (random < p) { cellchar = '*'; } else { cellchar = '.'; } return cellchar; //function returns cellchar }
I need a 'good' way to initialize the pseudo-random number generator in C++. I've found that states: In order to generate random-like numbers, srand is usually initialized to some distinctive value, like those related with the execution time. For example, the value returned by the function time (declared in header ctime) is different each second, which is distinctive enough for most randoming needs. Unixtime isn't distinctive enough for my application. What's a better way to initialize this? Bonus points if it's portable, but the code will primarily be running on Linux hosts. I was thinking of doing some pid/unixtime math to get an int, or possibly reading data from /dev/urandom. Thanks! EDIT Yes, I am actually starting my application multiple times a second and I've run into collisions.
The question was presented during review as off-topic, but was a very clear duplicate of another question with an excellent answer. When I went to VTC I was informed that I failed the audit. It is not appropriate to fail an audit immediately upon clicking the Close button without considering the reason to close. This has happened to me more than once, and indicates a subtle problem with the design of the audit system: questions that deserve to be closed for reasons different from what the audit system assigns them. Happened again: The question is definitely "Unclear what you're asking" but was picked by the audit engine and marked as Off-topic. Once again, just clicking "Close" brings up the verbal scolding without a chance to provide a real, valid close reason. The audit engine behavior is broken, and is embarrassing conscientious users who are working to cope with the ever-increasing close-vote queue.
Having just from any of the queues, it was reviewing close votes; however, this audit was flawed in that I didn't even cast a close vote. Often I press the Close button to preview greater detail and sentiment of the closure, spawning the Why should this question be closed dialog box: Especially for duplicates, where functionality is solely dependent on spawning this dialog. From Closing > Duplicate, I can search or view selected duplicates: Although, I realize general closure reasons are summarized on the page: This question had 6-upvotes, but seemed very localized referencing subjective query is "taking too long" and even had a sqlfiddle link. Maybe overly broad regarding performance tuning, the OP was posting like a forum with two answer posts to his own question and with one of those answers asking follow-up questions. Wanting to gauge community response, current closure totals struck my curiosity. So, I pressed the Close button and boom - oh, the humanity! I failed, and didn't even cast a close vote. Votes are not cast until a reason for closure is selected and Vote to Close is pressed. Taking any review very seriously on this site, it only seems fair that my review quality is tested through actionable steps instead of clicking for more detailed information, leveraging the functional design of the close vote user interface. Sure, it's complex to seed fake vote totals, and then there's controversy of mindless voting in the majority or people who simply cherry pick 4-vote questions. Still though, it seems unfair I should hesitate to review further information of vote totals and duplicates before skipping due to the implementation of this audit.
I'm willing to understand how to use golden ratio for layout purposes in Indesign. I've found a couple of 'explanations' over internet but they are too enigmatic and I can't really see the possible usage of it in Indesign projects. I know that other people are doing it so it's possible. Can someone explain it to me ?
The is the stuff of legend () and is . My question is two-fold, really: Is the Golden Ratio really a good tool used in modern design (defined here as 20th century on forward), and if so, how often is it used outside of the aforementioned known uses? EDIT: To @e100's first comment, examples of modern use of the Golden Ratio would be a great thing to add here if there any documented or arguably conclusive uses of it.
I am trying to send email from the command line from my ubuntu server. So I started configuring the postfix onto my local machine rather than on server. So basically these are steps which I followed: sudo apt-get install postfix mailutils libsasl2-2 ca-certificates libsasl2-modules sudo vim /etc/postfix/main.cf Added below lines into the file: relayhost = [smtp.gmail.com]:587 smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd smtp_sasl_security_options = noanonymous smtp_tls_CAfile = /etc/postfix/cacert.pem smtp_use_tls = yes sudo vim /etc/postfix/sasl_passwd Added this one line in the file [smtp.gmail.com]:587 [email protected]:PASSWORD Permissions and updated the postfix config file. sudo chmod 400 /etc/postfix/sasl_passwd sudo postmap /etc/postfix/sasl_passwd reload the POSTFIX : sudo /etc/init.d/postfix reload Then on my terminal I run this command : echo "Test mail from postfix" | mail -s "Test Postfix" [email protected] But didn't receive the mail. So I checked the log file and that is where i found the below stack trace for it: postfix/pickup[26530]: A62AF2E29B4: uid=1000 from=<z@mylaptop> postfix/cleanup[27372]: A62AF2E29B4: message-id=<20160428114754.A62AF2E29B4@mylaptop> postfix/qmgr[26529]: A62AF2E29B4: from=<z@mylaptop>, size=365, nrcpt=1 (queue active) postfix/smtp[27379]: cannot load Certificate Authority data: disabling TLS support postfix/smtp[27379]: warning: TLS library problem: error:02001002:system library:fopen:No such file or directory:bss_file.c:169:fopen('/etc/postfix/cacert.pem','r'): postfix/smtp[27379]: warning: TLS library problem: error:2006D080:BIO routines:BIO_new_file:no such file:bss_file.c:172: postfix/smtp[27379]: warning: TLS library problem: error:0B084002:x509 certificate routines:X509_load_cert_crl_file:system lib:by_file.c:274: postfix/smtp[27379]: connect to smtp.gmail.com[2404:6800:4003:c02::6d]:587: Network is unreachable postfix/smtp[27379]: A62AF2E29B4: to=<[email protected]>, relay=smtp.gmail.com[74.125.68.108]:587, delay=1.4, delays=0.01/0.02/1/0.34, dsn=5.7.0, status=bounced (host smtp.gmail.com[74.125.68.108] said: 530 5.7.0 Must issue a STARTTLS command first. g70sm14489231pfb.7 - gsmtp (in reply to MAIL FROM command)) postfix/cleanup[27372]: 5BFDF2E2B48: message-id=<20160428114756.5BFDF2E2B48@mylaptop> postfix/bounce[27383]: A62AF2E29B4: sender non-delivery notification: 5BFDF2E2B48 postfix/qmgr[26529]: 5BFDF2E2B48: from=<>, size=2239, nrcpt=1 (queue active) postfix/qmgr[26529]: A62AF2E29B4: removed postfix/local[27384]: 5BFDF2E2B48: to=<z@mylaptop>, relay=local, delay=0.01, delays=0/0.01/0/0, dsn=2.0.0, status=sent (delivered to mailbox) postfix/qmgr[26529]: 5BFDF2E2B48: removed
I'm trying to get postfix set-up on Ubuntu 13.04 but no luck so far. I found a few answers here on ServerFault that didn't work. I re-installed a bunch of times, nothing. This is my first time dealing with it, I followed this and . I tried , nothing. This is what I get from telnet localhost 25 and ehlo localhost: 250-elclanrs.localdomain 250-PIPELINING 250-SIZE 10240000 250-VRFY 250-ETRN 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN As you can see, no AUTH in there... This is my main.cf: smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) biff = no append_dot_mydomain = no readme_directory = no myorigin = /etc/mailname mydestination = $myhostname, localhost.$mydomain, localhost mynetworks = 127.0.0.0/8 192.168.1.0/24 [::1]/128 [fe80::]/64 mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = all inet_protocols = all relayhost = [smtp.gmail.com]:587 smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd smtp_sasl_security_options = noanonymous smtp_tls_CAfile = /etc/postfix/cacert.pem smtp_use_tls = yes Then I've this in sasl_passwd: [smtp.gmail.com]:587 [email protected]:mypass I also configured php.ini: sendmail_path = "/usr/sbin/sendmail -t -i" Nothing is working, emails are not being sent from PHP. How to make it work?
I upgraded to Ubuntu 18.04 from 16.04. On startup the display is black for 15 minutes, doesn’t boot and is stuck indefinitely displaying Ubuntu logo. Kindly let me know how do I boot successfully as I don’t want to lose my important files.
I am trying to boot Ubuntu on my computer. When I boot Ubuntu, it boots to a black screen. How can I fix this? Table of Contents:
I am new to abstract algebra, group theory. So, its difficult for me to solve this question. Kindly, please help me.
In a finite group, show that the number of nonidentity elements that satisfy the equation $x^5 = e$ is a multiple of 4. I think that besides $ x, x^2, x^3, x^4 $ also satisfies the given equation but how can I show them distinct ?
I understand that division by zero isn't allowed, but we merely just multiplied $f(x) = 1$ by $\frac{x-1}{x-1}$ to get $f(x) = \frac{x-1}{x-1}$ and $a\cdot 1 = 1\cdot a = a$ so they're the same function but with different domain how is this possible? Or in other words why don't we simplify $f(x) = \frac{x-1}{x-1}$ to $f(x) = 1$ before plotting the points. Is it just defined this way or is there a particular reason ? Note: my book says the domain of $f(x) = 1$ is $\mathbb{R}$ and the domain of $f(x) = \frac{x-1}{x-1}$ is $\mathbb{R}$ except $1$.
$$\lim _{x\rightarrow 5}\frac{x^2-25}{x-5} = \lim_{x\rightarrow 5} (x+5)$$ I understand that to evaluate a limit that has a zero ("hole") in the denominator we have to factor and cancel terms, and that the original limit is equal to the new and simplified limit. I understand how to do this procedurally, but I'd like to know why this works. I've only been told the methodology of expanding the $x^2-25$ into $(x-5)(x+5)$, but I don't just want to understand the methodology which my teacher tells me to "just memorize", I really want to know what's going on. I've read about factoring in abstract algebra, and about irreducible polynomials (just an example...), and I'd like to get a bigger picture of the abstract algebra in order to see why we factor the limit and why the simplified is equal to the original if it's missing the $(x-5)$, which has been cancelled. I don't want to just memorize things, I would really like to understand, but I've been told that this is "just how we do it" and that I should "practice to just memorize the procedure." I really want to understand this in abstract algebra terms, please elaborate. Thank you very much.
I want to use Ayli, Eternal Pilgrim in my black and white aggro deck. Would it be possible if someone attacked me and I blocked with a less stronger creature causing it to die but can I activate Ayli, Eternal Pilgrims ability at this same time so a I get something out of it? I’m also asking the same thing about if I used one of my creatures to attack and it got blocked by a higher creature or got countered by a spell there it would die but can I use the sacrifice ability at the same time?
In Magic:The Gathering it is possible to trigger abilities of creatures at the same time you can play instants? I play it that I can block with a creature and sacrifice it at the same time. The attacking creature blocked this ways does not deal damage because the blocking creature is gone - and I get the bonus for the sacrifice (e.g. gives me an extra B-Mana). In a recent discussion the topic came up again. It seems like the rulings even allow for the blocking player to wait until the damage is put on the stack. Once the damage is on the stack, I can sacrifice my creature, gain the benefits from the sacrifice ability AND deal damage to the attacking create. In my Blood Pet example I would be able to kill an attacking creature with toughness 1 and get 1 B-Mana. Is this correct? Where can I find the official ruling that clarifies that?
My String is like String body = "GH 1234 RING 5"; I want to extract the number 1234, RING and last 5 into separate variables and want to compare each of those values..It will be like.. pass = 1234, cmnd = RING and duration = 5 like this.. Please help me to figure out how to achieve this. Im doing like String body="GH 1234 RING"; String pass=bodypass = body.replaceAll("[^0-9]", ""); to get the 1234 in it.But i cant find how to retrieve RING and 5.
What regex pattern would need I to pass to java.lang.String.split() to split a String into an Array of substrings using all whitespace characters (' ', '\t', '\n', etc.) as delimiters?
If a bard were to scribe Cure Light Wounds into a scroll, would it be possible for a Wizard to write it into his spellbook given that it's the arcane version of the spell? I know about , but I'm unsure if the rules are different when dealing with a Wizard versus a Sorcerer.
According to the book, the sorcerer can learn an unusual spell from a scroll if the spell is Arcane. A Bard can use Arcane spells, and the "Cure Light Wounds" is available on his magic table. So if I am a sorcerer and found a "Cure Light Wounds" scroll, would I be able to learn it as an unusual spell? My question is because on page 64(Players book) there is this situation: For example, a sorcerer with a scroll or spellbook detailing an unusual sorcerer/wizard spell (one not on the sorcerer/wizard spell list in this book) could select that spell as one of his new spells for attaining a new level, provided that it is of the right spell level. The sorcerer can’t use this method of spell acquisition to learn spells at a faster rate, however
I have this input field: <input alt="PayPal - The safer, easier way to pay online!" name="submit" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" type="image" class="paypal"> I want to center it on the page, I tried using text-align:center, I tried to wrap it in a div set width to 100% and the margin to auto but it gets stretched in an ugly way, so how can I center it correctly?
Best way to center a <div> element on a page both vertically and horizontally? I know that margin-left: auto; margin-right: auto; will center on the horizontal, but what is the best way to do it vertically, too?
When apt lists an automatically-installed package that I don't recognize, I'd sometimes like to know which manually-installed package originally triggered the installation. Is this possible?
Let's say there are A, B and C package. A and C were installed manually with apt-get install, and B is a dependency of A and was installed by apt automatically. Is it possible to know that with some apt-* or dpkg command?
One of my question in SO has only 1532 view counts, But when i look into my profile where all my questions are listed it is shown as 2k Views, even when i hover on this 2k the tooltip shows 1532 views
Due to this question and answer , I assume 1k = 1000, 2k= 2000... I don't believe it. Or maybe I am wrong. Please check the below images. You will see 2kviews. But when you navigate to it, the actual view count is 15xx. What is going on? Is it a bug?
He is not a popular teacher. He does not respect students. He would be a popular teacher if he respected students. One of my students wrote: If he did respect students he would be~. Have you seen this? I haven't. What do you think?
This morning I read this sentence (see ): On July 24th and again on July 29th, Egyptian police did shoot dead unarmed African migrants attempting to cross that border. Why "did shoot" and not "shot"?
I have a pendrive when I insert it into one o my port it shows in the My Computer but when I try to explore, it shows please insert a disk into drive H. However my usb drive is well inserted. I tried to format it but it is showing There is no disk in drive H, Insert a disk then try again. Its properties is showing Unknown File System and the used space and free space part showing 0 bytes. I cann't also check for errors in the drive. Its device status:The device is working properly. I also reinstalled the driver but that did not help me. Please suggest some way to recover the issue. Thanks.
I have a USB flash drive which is no longer recognized by my computer. Windows Disk Management and DiskPart report No Media with no storage space (0 bytes) on the drive and I cannot partition or format the drive: If the drive appears in Windows Explorer, trying to access it returns an error message indicating that there is no disk inserted, such as the following: Please insert a disk into drive X:. Various disk partitioning and data recovery utilities don't recognize the drive or only give a generic name for the drive and cannot access the contents of the drive. What can I do? How do I recover data from the drive? This question comes up often and the answers are usually the same. This post is meant to provide a definitive, canonical answer for this problem. Feel free to edit the answer to add additional details.
I've just recently started using the 4x1 (Hot Question) widget for the Stack Exchange app. Is there a way to modify which site's questions are featured on the widget? I've noticed a lot of questions come up that are from sites I have no experience with.
The thing about the Hot questions widget is that it's a neat idea, and well executed. However, it shows questions from all around the network. And most of the time from topics I have no interest in. I suggest another widget be added* to show questions from a specific user-defined set of sites. There could also be the choice of showing "new" questions** or "hot" questions from the chosen sites. I envision this new widget to be useful as it will give us hot trending questions from our favorite sites to read on (less refreshing, more reading) or new questions, encouraging us to contribute more to the site. :) Also, tapping the site icon should open the relevant list of questions at the site, not the current question. That will be a handy shortcut (can be applied to the existing widget as well). * Or the existing widget could have added options to choose between hot network questions and the above. ** There could be an optional filter of selecting only new questions with 0 or more nett vote score for the widget.
Why doesn't my keyboard work when the computer is booting? I can enter BIOS and change the settings, but when the system is booting it doesn't work at all! This is not a new problem, but I now want to install Ubuntu alongside Windows, but what if GRUB doesn't work and will always boot into Ubuntu? I have tried to put the USB keyboard in the other slots including those on the front.
I wanted to perform a memory test on one of my desktop machines, but encountered a very strange problem: I can use the (usual) USB keyboard (tried Cherry Evolution Stream as well as an older one from Logitech) to open the BIOS (by pressing Del) and changing it, but not in the Ubuntu boot menu (where to select the language and keyboard type for pre-10.* Ubuntu versions). After Ubuntu booted, the keyboard is usable. I've also tried to use a different USB port, but without success. Is this a known mainboard, BIOS or Ubuntu problem?
What does an 18 - 50 mm lens mean? Are those numbers the first focal length and second focal length? How do you use this parameter to judge what kind of lens to buy? Does more equal better?
What is focal-length? Are focal-length and zoom synonymous? How does the focal length of a photo affect it? Are there common uses for different focal lengths, and how can I decide what to use when?
Does the query shown below work? (Sorry for this type of question, but I am a novice and it is not possible for me to run it right now). SELECT table.id SUM(10/ta.value) AS amount JOIN tableA ta ON ta.key = t.key What I am curious about if it is possible to refer to a alias "before" (i.e higher up) it has been assigned. Thanks!
I'm not used to the 'as' keyword and I thought it would be a nice idea to use it. So why do I get an 'unknown column' (eid) error? I use mysql... select t1.index as eid, t1.col1 as col1, t1.col2 as col2, t2.index, t2.col1, t2.col2, t3.index, t3.col1, t3.col2 from table1 t1 left join table2 t2 on t2.index=eid left join table3 t3 on t3.index=eid; The full statement is too long to present here without boring everybody. The column and table names are random.
I have a LWC component which calls an apex class that does callout: public static List<Case> doCallout(List<Case> cases) { ....... CalloutLogger.insertLog(req, res, time); ........ try { .... if(isFromComponent) throwAuraException(System.Label.CustomException); .... } catch(Exception e) { .... } } The throwAuraException method: private static void throwAuraException(String message) { AuraHandledException e = new AuraHandledException(message); e.setMessage(message); throw e; } On LWC: handleSend() { sendRequest({caseToSend : this.recordId}) .catch(error => { ...... }).then(result => { ...... }); } Inside the CalloutLogger.insertLog(req, res, time); method I am inserting a record of Logger__c. The problem is that when throwAuraException method is called the logger record inserted gets rolledback, due to throwing an exception that is not handled in the Apex code. But the exception is caught in the catch of LWC. I would like to insert the logger record even if the exception is thrown.
We have an error log object where we store the errors and I have a simple try catch like below... My issue is that the insert in the finally does not appear to be happening. Any advice? or is that a limitation in the try-catch error handling? list<Error_Log__c> error_logs = new list<Error_Log__c> () try { if(status__c == '100') { \\do something } else { throw new AuraHandledException('System Error'); } } Catch (Exception e) { Error_Log__c rec = new Error_Log__c(Name="Error Message: "); error_logs.add(rec); throw new AuraHandledException('System Error'); } finally { insert error_logs; }
In Finder > Select a folder > Right click, we get a popup with an option to create a new folder: Is there a way to add menu item New Textfile for adding a new text file?
In windows I right click and then there is an option to create a text file. How to do so in mac?
I got the definition and the intuition being finitely generated vector spaces. Could you help me with some examples about not finitely generated vector spaces? It looks like I can't get the intuition behind them. Thank you in advance
Here's what I've come up with. Let $\mathcal B$ be a generating set of $\mathcal F(R)$. Let us assume that $\mathcal B$ is a finite set, thus: $\lt \mathcal B \gt = \lt \{b_1, ..., b_n \}\gt, n \in N$. Let $\mathcal f \in F(R).$ Thus: $\mathcal f = \alpha_1 b_1 + ... + \alpha_nb_n,$ where $ \alpha_1,..., \alpha_n \in R$ are not all zeroes. If $\mathcal F(R)$ is a vector space, so there can be a function $\mathcal g \in F(R)$ such as $\mathcal g \neq \lambda f, \lambda \in R$. Thus $\mathcal f+g \in F(R)$ but $\mathcal f+g \neq \alpha_1 b_1 + ... + \alpha_nb_n$. If is $\mathcal g$ is to belong to $ \lt \mathcal B \gt$ we must add a new vector to $\mathcal B$. Repeating the above mentioned procedure, we can find a function $\mathcal g\in F(R)$ such as $\mathcal h \neq \mathcal\lambda g$. Thus, we can find infinite functions and thus need infinite base vectors. Is this proof right?
I want to have a static const char array in my class. GCC complained and told me I should use constexpr, although now it's telling me it's an undefined reference. If I make the array a non-member then it compiles. What is going on? // .hpp struct foo { void bar(); static constexpr char baz[] = "quz"; }; // .cpp void foo::bar() { std::string str(baz); // undefined reference to baz }
Can anyone explain why following code won't compile? At least on g++ 4.2.4. And more interesting, why it will compile when I cast MEMBER to int? #include <vector> class Foo { public: static const int MEMBER = 1; }; int main(){ vector<int> v; v.push_back( Foo::MEMBER ); // undefined reference to `Foo::MEMBER' v.push_back( (int) Foo::MEMBER ); // OK return 0; }
I have an iPhone 5 that I use with Straight Talk (telecom provider) and I am trying to "upgrade" it from 7.0.4 to 7.1.2, or any release with the 7.x version for that matter. I specifically do not want to upgrade to IOS 8 just yet. I have the file "iPhone5,2_7.1.2_11D257_Restore.ipsw" but I get the error "The device isn't eligible for the requested build." I've also hashed out the gs.apple address in my hosts file. I know you can't downgrade from 8 to 7, but in this case is there a way I can still upgrade to a later version of 7.x?
I'm trying to downgrade my iPhone from the current iOS to an older one, as per . But every time I try, I always receive this error: The iPhone could not be restored. This device isn't eligible for the requested build. I have tried many times with and without DFU mode. Any ideas regarding this?
Not a word that reads the same, a word that actually sounds the same whether it's pronounced forwards or backwards.
I find it very interesting that Judge /dʒʌdʒ/ is pronounced the same backwards as forwards while it is not a palindrome. Does this phenomenon have a name?
I have known NullPointerException to be caused by using an uninitialized object for example Button button;and then try to use it before button= new Button(). However, in this case I cant see why and where have I gone wrong. I have my Main class: public class Main extends Application { private Stage primaryStage; private BorderPane mainLayout; @Override public void start(Stage primaryStage) throws IOException { this.primaryStage=primaryStage; this.primaryStage.setTitle("Employee App"); showMainView(); showMainItems(); } public void showMainView() throws IOException{ FXMLLoader loader= new FXMLLoader(); loader.setLocation(Main.class.getResource("view/MainView.fxml")); this.mainLayout=loader.load(); Scene scene= new Scene(this.mainLayout); this.primaryStage.setScene(scene); this.primaryStage.show(); } public void showMainItems() throws IOException{ FXMLLoader loader= new FXMLLoader(); loader.setLocation(Main.class.getResource("view/MainItemsView.fxml")); BorderPane mainItems=loader.load(); mainLayout.setCenter(mainItems); } public void showEletricalScene() throws IOException{ FXMLLoader loader= new FXMLLoader(); loader.setLocation(Main.class.getResource("electrical/ElectricalDeptView.fxml")); BorderPane eletricalDpet=loader.load(); mainLayout.setCenter(eletricalDpet); } public static void main(String[] args) { launch(args); } } And my controller where I am trying to call a method in Main class to show/load another view. public class MainItemsController { private Main main; @FXML private void gotEletrical() throws IOException{ this.main.showEletricalScene(); } } Everything has been working fine until the time I am trying to call showEletricalScene. I have pinned my controllers and everything is fine except this nasty error below: Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at sun.reflect.misc.Trampoline.invoke(Unknown Source) at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at sun.reflect.misc.MethodUtil.invoke(Unknown Source) ... 51 more Caused by: java.lang.NullPointerException at employee.view.MainItemsController.gotEletrical(MainItemsController.java:11) ... 60 more Any help, thanks.
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 know the second derivative of y wrt x: $\frac{d^2y}{dx^2}$ means $\frac{d}{dx}(\frac{dy}{dx})$, but is there a mathematical reason you square the $d$ in the numerator but the $x$ in the denominator? I've wondered if it's because the $d$ in the denominator represents some arbitrary infinitely tiny amount, and the $d$ in the numerator is that same $d$, only squared to account for the second derivative. Does that make sense, and/or am I missing something significant about derivatives?
I've always wondered why the numerator is $d^n$ while the denominator is $dx^n$ instead of $d^nx$ like the numerator. I must be missing something very obvious or fundamental. Is this notation derived from the chain rule in some way?
Is it ok to use an exclamation mark in the middle of a sentence like in the following? (first exclamation mark) "Hurry!" said Mark," we can't be late!" Or in: Hurry! we need to go!
May I use a question mark in the middle of a sentence? Examples: Would you like the drapes to be white? or perhaps something off-white? Would you like the logo to be centered? at the bottom? left off entirely?
How to prove that $$\int_0^\infty \frac{x\sin x}{x^2+1}dx=\frac{\pi}{2e}$$ I've tried several basic approaches like substitution and IBP but can't move forward.
Another exam problem I'm looking at is to evaluate the following integral. $$ \int_{-\infty}^{\infty} \frac{x\hspace{-0.04 in}\cdot\hspace{-0.04 in}\sin(x)}{x^{\hspace{.02 in}2}+1} dx $$ This is a complex analysis exam, so the solution probably involves contours. $\:$ Since the integrand is an even function, one could potentially simplify by changing one endpoint to $0$. However, I have no idea how to make a contour work since the absolute value of the integrand grows exponentially away from the real axis. What does one need to do to evaluate that integral?
I got 2 functions in javascript (Chrome and IE): function call(param1, param2){ console.log("call param - 2"); } and function call(param1){ console.log("call param - 1"); } I called like this: call(1,2); But I receive this on console: call - param - 1
What is the best way(s) to fake function overloading in Javascript? I know it is not possible to overload functions in Javascript as in other languages. If I needed a function with two uses foo(x) and foo(x,y,z) which is the best / preferred way: Using different names in the first place Using optional arguments like y = y || 'default' Using number of arguments Checking types of arguments Or how?
When issuing suspensions on a user, the recommended lengths are: 1st suspension: 7 days 2nd suspension: 30 days 3rd suspension: 365 days However, it was originally: 1st suspension: 7 days 2nd suspension: 30 days 3rd suspension: 120 days or deletion Why was it originally 7/30/120-or-deletion, but later changed to 7/30/365?
I've tried to make some searches about ban and suspension but the data I found doesn't seem to correspond to my experience. I also cannot find a FAQ on the help section. Can you explain me how these mechanics work? I've just found for a review ban duration to be extended automatically at every new suspension . But it's speaking of 2, 7, 30 days. I've heard from a moderator that the suspension duration is 7, 30, 365 days. Is that correct? Can a moderator change the duration of a suspension?
I'm trying to put together a quad tree for a homework assignment, similar in function to a binary tree, and I got down to implementing the get() method, where it returned a key's value if the value existed, otherwise it returned null. However, with my given test cases, I keep receiving a nullPointerException, and I can't seem to figure out why. Any and all help is appreciated. Here's my get() method: public V get(Coord<X,Y> key) throws IllegalArgumentException { checkKey(key); Position<Entry<Coord<X, Y>, V>> p = treeSearch(tree.root(), key); if(tree.isExternal(p)) { return null; } return p.getElement().getValue(); } Now, my homework file says that this should be almost identical to this get method(also in the homework file): public V get(K key) throws IllegalArgumentException { checkKey(key); // may throw IllegalArgumentException Position<Entry<K,V>> p = treeSearch(root(), key); rebalanceAccess(p); // hook for balanced tree subclasses if (isExternal(p)) return null; // unsuccessful search return p.getElement().getValue(); // match found } with some exceptions for the types. In the test cases, it makes a temporary tree with random integers as an entry's value, and these: assertEquals(null, m.get(new Coord<>(0,2))); assertEquals(null, m.get(new Coord<>(-6,-5))); assertEquals((int)3, (int)m.get(new Coord<>(-5,-6))); assertEquals((int)6, (int)m.get(new Coord<>(7,7))); assertEquals((int)0, (int)m.get(new Coord<>(0,0))); would always return a nullPointerException for my get() method, whereas if used on the example, it would return the key's value.
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?
If Voldemort made all the Horcruxes so he can return with the help of those, and Harry is a horcrux made by accident, even though they destroyed all of the Horcruxes, Harry is still alive, so, while Harry lives, isn't there another chanse for Voldemort to come back?
Harry was never a Horcrux of Voldemort I have heard this line on SE a lot & also vaguely read about that discussion. My question is if Harry was not Voldemort's Horcrux & if all the other 6 (5 inanimate objects & Nagini) were destroyed beyond repair & Harry tries to Avada Kedavra Voldemort, would he die? What would happen to Voldemort's soul inside Harry. I've asked this question keeping in mind Harry isn't a technical Horcrux but only a part of Voldemort's soul is in him. So can Voldemort resurrect from this soul? If its a duplicate, please mention the relevant discussion link in the comments
Which of these sentences is more grammatical? "I'm not as good as him." "I'm not as good as he is."
I have a few questions on terminology, first, actually, as having the right terminology may have enabled me to answer this question on my own. What is the terminology for such constructs, "as [adjective] as [noun]"? ( seems to label them adjective-based similes—is that correct?) Is the [noun] considered a subject, a direct object, or some other kind of an object? I feel that [noun] was actually meant to be a complete sentence on its own, e.g. "She is as wonderful as they [are wonderful]," but for convenience we drop repetitive words—is that an accurate view? If so, then, are sentences like "She's as tall as me" actually ungrammatical? Yet, it seems awkward to say, "She's as tall as I." Is that purely due to a shift in speaking norms?
In my data, I have some items that a customers purchase. I need to predict the customers behavior with different items. But in the test set, there are some items that are not present in the training set, how can I deal with these? Thank you.
Suppose in a regression analysis in R, I have a factor type independent variable with 3 levels in my train dataset. But in the test data set that same factor variable has 5 levels. Therefore I can not predict the response values for test dataset. What should be done in this case?
My document is in French. I added appendices to the document, appendices use \chapter{}, hence I would like that these chapters to be names "Annexe" (which is the French word for "Appendice" in table of content. But I my current document I don't manage to do that. I expect it has to do with the cutomization of my table of content. Which I want to keep as well. working example: %Preamble \documentclass[a4paper,french,oneside,openright]{book} \usepackage[french]{babel} \usepackage{hyperref} \hypersetup{ colorlinks=true, linkcolor=blue, filecolor=magenta, urlcolor=cyan } \usepackage{lastpage} \usepackage{lipsum} \usepackage{tocloft,calc} \renewcommand{\cftchappresnum}{Chapitre } \AtBeginDocument{\addtolength\cftchapnumwidth{\widthof{\bfseries Chapitre }}} \usepackage{datetime} \usepackage[toc]{appendix} \begin{document} \tableofcontents \part{main} \chapter{Lorem ipsum} \lipsum[1-2] \renewcommand{\appendixname}{Annexe} \renewcommand{\appendixtocname}{Annexe} \renewcommand{\appendixpagename}{Annexe} \part{appendices} \begin{appendices} \chapter{Some appendice} \lipsum[1-2] \chapter{Some appendice} \lipsum[1-2] \end{appendices} \end{document} I know that this question has been closed and pointing to but that didn't help me at all. Another answer is marked as solutions under this question. That one helped me solve the issue.
I have searched for something to resolve a problem that has shown up here: I have tried the code from that thread. But I got an issue, that is, it adds the \chaptername even for appendix chapters: Chapter 1. aaaaa .... Chapter Appendix A How can I resolve it?
I know that polynomial (in a single variable) over any field has at most $n$ roots where $n$ is degree of the polynomial and in $\mathbb C$ it has exactly $n$ roots. Now if coefficients are in any ring not a field, then any $n$ degree can have more than $n$ roots may have more roots, example $x^2=I_2$ in $M_2(\mathbb R)$ has $4$ roots \begin{bmatrix}1&0\\0&1\end{bmatrix} \begin{bmatrix}-1&0\\0&1\end{bmatrix}\begin{bmatrix}-1&0\\0&-1\end{bmatrix} \begin{bmatrix}1&0\\0&-1\end{bmatrix} Now my question is whether there exists a ring in which a finite degree polynomial has infinitely many roots.
Can a non-zero polynomial in one variable have infinitely many roots ? Can a non-zero polynomial in one variable have uncountably many roots ? Motivation: over $\mathbb Z/12\mathbb Z$, $X^2-4$ has 4 roots. When it comes to polynomials with coefficients over an integral domain, the answer is clearly negative (in that case, a polynomial can't have more roots than its degree). What happens with a ring that has zero divisors ?
At which point of hook execution is the currently activated theme's functions.php file loaded?
So like WP must load series of files from, index.php -> ... -> wp-header.php -> ... ->functions.php ...and so on upon execution. Also there must be a similar flowchart for functions callings, conditionals and such during the execution. Is such a flowchart(s) available anywhere?
I am using Ubuntu 18.04/18.10. How do I turn the snap to full screen feature OFF? This is a most annoying feature of OS these days. I run 2 screens and it is most annoying when moving to the other screen. I have turned off this function in Windows, but cannot find any function or selector to do likewise in 18.04/18.10. Thank you in advance
When I move a window close to the top, it snaps to maximum size. I am using Ubuntu 18.04, GNOME 3.28.2. How do I disable that? I searched about six months ago, no way to disable back then. 1/5/19 Yes, solved! Thank you! These two worked on my Ubuntu 18.04 gsettings set org.gnome.mutter edge-tiling false dconf-editor These did not work GNOME Tweaks (disable "Edge Tiling" not available) gsettings set org.gnome.shell.overrides edge-tiling false Thank you Kulfy, Hamza Saeed, vanadium, PRATAP.
When I am in views UI and I edit an option a modal box appears. I edit some seetings then press save and am displayed with something like: [{"command":"settings","settings":{"basePath":"/","pathPrefix":"","ajaxPageState":{"theme":"bartik","theme_token":"SUIsCUisas2D3yeSiBkGNwaXtTMtlVVXouHWgoffCYA"}},"merge":true},{"command":"viewsDismissForm"},{"command":"viewsShowButtons"},{"command":"viewsTriggerPreview"},{"command":"insert","method":"html","selector":"#views-tab-block","data":"\u003Cdiv id=\u0022edit-display-settings-details\u0022\u003E\u003Cdiv id=\u0022edit-display-settings-top\u0022 class=\u0022views-ui-display-tab-actions views-ui-display-tab-bucket clearfix\u0022\u003E\u003Cdiv class=\u0022ctools-no-js ctools-button ctools-dropbutton\u0022\u003E\u003Cdiv class=\u0022ctools-link\u0022\u003E\u003Ca href=\u0022#\u0022 class=\u0022ctools-twisty ctools-text\u0022\u003Eopen\u003C/a\u003E\u003C/div\u003E\u003Cdiv class=\u0022ctools-content\u0022\u003E\u003Cul class=\u0022horizontal right actions\u0022\u003E\u003Cli class=\u0022duplicate ... What could be going wrong?
I'm using Drupal v7.22 and whenever I try to Modify the Display on views, and press the 'Add and configure' button on adding a field, or any button that sends data to the server, the page reloads and I just get a long JSON String returned in Chrome, or IE will try to download the return... Sometimes it'll accept my change, but more often than not, it won't. It was doing this on 7.21 and then I updated to 7.22 and it stopped for a day or two, now it's doing it again. I am extremely new to Drupal, but I am a quick learner and most things are going smoothly. What did I break and how can I fix it?
When I type the command: sudo apt-get update, I got the error below: Err:12 http://ppa.launchpad.net/freyja-dev/unity-tweak-tool-daily/ubuntu focal Release 404 Not Found [IP: 91.189.95.85 80] E: The repository 'http://ppa.launchpad.net/freyja-dev/unity-tweak-tool-daily/ubuntu focal Release' does not have a Release file. Here is a full output of my command: I would like to ask how to solve it. I am a novice and ask for help.
When updating, I get the following error message: W: The repository 'http://ppa.launchpad.net/mc3man/trusty-media/ubuntu xenial Release' does not have a Release file. Here, I find another statement on this error: This recommends removing certain PPAs; and, I'm not sure if I should do that since it might mean not getting the updates that I need. Is this what I should do?
Something that is infinitely dense does not need to grow in size since they can pack an infinite amount of matter in a single point. So the fact that black holes grow in size means they are not infinitely dense right?
How do scientists calculate that density? What data do they have to calculate that?
I have created this bash function to recursively find a file. ff() { find . -type f -name '$1' } However, it returns no results. When I execute the command directly on the commandline, I do get results. I am not sure why it behaves differently, as shown below. mattr@kiva-mattr:~/src/protocol$ ff *.so mattr@kiva-mattr:~/src/protocol$ find . -type f -name '*.so' ./identity_wallet_service/resources/libindystrgpostgres.so Why does my function not work as expected? I am using MacOS and bash shell. Thnx Matt
Sometimes I see shell scripts use all of these different ways of quoting some text: "...", '...', $'...', and $"...". Why are there so many different kinds of quote being used? Do they behave differently or affect what I can do inside them?
I have the following SQL script: CREATE temporary table if not EXISTS the_values ( key SERIAL, value INTEGER NULL ); insert into the_values(value) values (null),(1),(null),(2),(3),(4),(5),(6),(10),(null),(null); select * from the_values where value not in (1,2,3,4,5,6,10); And I noticed that the query: select * from the_values where value not in (1,2,3,4,5,6,10); Does not return the rows having value NULL, and that caught my attention. Therefore, I want to know why that happens. I am interested more about the technical aspect of this phenomenon rather that the obvious solution: select * from the_values where value not in (1,2,3,4,5,6,10) or value IS NULL;
I had a query (for Postgres and Informix) with a NOT IN clause containing a subquery that in some cases returned NULL values, causing that clause (and the entire query) to fail to return anything. What's the best way to understand this? I thought of NULL as something without a value, and therefore wasn't expecting the query to fail, but obviously that's not the correct way to think of NULL.
My customer's schematic uses a 0 ohm resistor for connecting analog(AGND) and digital (DGND). I think it is for testing, current measurement , fuse, jumper, test point etc but is there another reason?
This is related to another question I've just posted (), regarding the battery charger described in the , which one day I hope to build. On page 40, there's a schematic showing the MCU connections (picture below). Marked in red is a 0Ω resistor that is puzzling me. I suspect that it is just a wire jumper linking AGND and GND. But I don't understand why there's a jumper there. My questions: What does the jumper represent? Why are AGND and GND separated like that?
Recently got a new pc, put the HDD from old pc into new one, reinstalled Steam however I want to use the library from old pc on new one but keep it on external. New pc has a SSD which I do not want to fill up so going to put everything going to the external. Any ideas please?
I uninstalled and re-installed steam. I didn't uninstall my games, and they still exist on my hard drive (I checked). I have an SSD and a HDD, and to save space I install programs (including steam) to C:\Program Files (x86)\Steam drive (SSD) and games to D:\Games\SteamApps (HDD). How to I let steam know the programs are installed there?
I have created a content type called "Design" in which there are 3 fields. When creating this content type I want to hide the label of fields. How would I do that?
Is there a way to hide the field label when rendering a custom field in Drupal 7? In my node template I have: <?php print render($content['field_image']); ?> Which gives me: <div class="field field-name-field-image field-type-image field-label-above"> <div class="field-label">Image: </div> <div class="field-items"> <div class="field-item even"> <img typeof="foaf:Image" src="http://site.com/sites/default/files/image.jpg" alt=""> </div> </div> </div> I'd like to not have the <div class="field-label">Image: </div>. Is there a way to get rid of this other than in the CSS or manually creating the markup? I've tried unset($content['field_image']['#title']), but that gives me <div class="field-label">: </div>.
They supposedly have a 40,000 km (about a 25,000 mile) range, but over the years people have been transported to far greater distances. In the reboot Star Trek (2009) as example, Scotty and Kirk are shown to beam aboard Enterprise while it's traveling at warp, light years away. How can this be?
By "range of operation" of the transporter, I mean "distance up to which it could transport" or "distance from which it could transport something to its own location". The range of operation would have increased with time without a doubt but I want to know the average range at any period. It'll be better if you provide full stats of all times.
I was reading on wikipedia about In the Precise definition part it says it can form close loops but Kelvin–Stokes theorem it's written it cannot be closed loops. (My teacher too told me that they never form close loops) Please point out Where I'm being wrong? I am asking about when can they form close loops? That question states Why can't electrostatic field lines form closed loops?
My physics textbook says "Electrostatic field lines do not form closed loops. This is a consequence of the conservative nature of electric field." But I can't quite understand this. Can anyone elaborate?
I would like to know if it is possible to update my Samsung Galaxy S3, which is in 4.3 Jelly Bean, to 5.0-lollipop. And in this case, I would like to know : If it is a good idea ; Will my phone support it ; What benefits it might bring me if it is possible. I also would like to know the best way to proceed, to update my phone. Thank you in advance. Edit : I have a friend that has the same phone, and his phone updated itself. Why not mine?
This Community Wiki question is designed to be the "canonical question" for questions asking how to upgrade one's device to a new Android version. I want to get a newer version of the OS for my Android device. How can I do that? See also:
Some edges look sharp, but I haven't made them sharp. Auto Smooth - 57.3° (the same issue with any value) After applying the baked normal maps from Substance painter in blender, the model looks like this: In Substance painter: Material nodes: Wireframe and sharpen edges in blue:
I'm having a small issue with visible seams on normal maps. The map was painted on Substance Painter and has no weirdness around seams. When I plug it into a Normal Map node set to Tangent Space this happens: (it's a horse underside) When I set the map to Blender Object Space the seams become nearly invisible, as they should be, but the shadows also looks awful. What can be done to minimize the issue? I need to be able to use maps on tangent space. Moving the seams or hiding them under other stuff isn't always feasible.
Navigating the page, with my browser maximized at my 1280x1024 px screen (this is not critical - the point is the full contents just fit the viewport, no horizontal scroll bar visible), when one clicks on the rounded rectangles (collapsed wrappers) on the right border, they expand towards the right, which is not very satisfactory. See screenshots, before and after clicking over "User experience" site. I'm not sure if this qualifies as a design bug, but anyway.
Since I am a regular Stack Overflow follower, I came across this and was shocked a bit regarding the design and user experience perspective. Attaching picture 1 - it states that I can click any site and view a synopsis about it. Clear!!! Attaching Picture 2 - you can see that when I clicked Webmasters, the design wants me to scroll horizontally to view all information and basically it hides information. It would be nice, if it did something like below :
Prove that $1+4+9+16+...+n^2= \frac{1}{6}n(n+1)(2n+1)$,
I am just starting into calculus and I have a question about the following statement I encountered while learning about definite integrals: $$\sum_{k=1}^n k^2 = \frac{n(n+1)(2n+1)}{6}$$ I really have no idea why this statement is true. Can someone please explain why this is true and if possible show how to arrive at one given the other?
are formatted beginning with bitcoin: followed by a bitcoin address and optionally more information. On my Mac, the Bitcoin-QT program is the default one to open when I click such links. I wish to change it to the Electrum client. My question is - where in MacOS are the uri handlers defined? How can I change this to open my program of choice?
Some applications will signal to the OS that they can open special link type, such as ssh:// or github-mac://. They get automatically opened for such links by the web browser (or when using open in a terminal). If I have multiple such applications, how can I set which one should be the default? For example, both GitHub Desktop and SourceTree can handle github-mac://. When I installed GitHub Desktop, it became the default handler for these links. How can I set SourceTree as the default handler without uninstalling GitHub Desktop?
So my Eclipse works fine, it compiles everything I need. Now I just wrote code but it's not running it, it just doesn't do anything. I've tested Eclipse with other code and it works fine, so there is something wrong with my code, but I'm not sure what. I am trying to complete Project Euler's 4th challenge: A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99. Find the largest palindrome made from the product of two 3-digit numbers. Here's my code: package me.practice; public class Main{ public static void main(String[] args) { int palindrome = 0; for(int i = 0; i < 900; i++) { int num = (100 + i) * 999; String numString = Integer.toString(num); String numString_reverse = new StringBuilder(numString).reverse().toString(); if(numString == numString_reverse) { palindrome = Integer.parseInt(numString); System.out.println(palindrome); break; } } } } Edit: I've also tried to run it on Netbeans and it doesn't work, so Eclipse is fine.
I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug. Is == bad? When should it and should it not be used? What's the difference?
I've been working on creating an alarm app to run a music track that the user selects. So, after the user selects the track, it is converted from Uri to String by ".toString" method to be able to receive this Uri from a broadcast receiver so that it can be used in MediaPlayer.create(); after converting it back to Uri Uri.parse(String track); The problem comes when i try to play this it doesn't work although when I tested this in another activity it worked fine and I checked the uri.getPath() it tells me the path of the track so the problem is not because Uri object is empty. public class AlarmTrigger extends Activity { String trackPath; Uri trackUri; MediaPlayer mediaPlayer; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_alarm_trigger); trackPath = getIntent().getExtras().getString("Track path"); //getIntent from BroadcastReceiver class trackUri = Uri.parse(trackPath); Toast.makeText(this, trackUri.getPath(),Toast.LENGTH_SHORT).show(); // it works fine AlarmGoes(); } public void AlarmGoes(){ MediaPlayer mediaPlayer = MediaPlayer.create(this,trackUri); mediaPlayer.start(); } } The stack-trace: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.amr.mineapps.myapplication/com.amr.mineapps.awarm.AlarmTrigger}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.net.Uri.getScheme()' on a null object reference at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2747) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2808) at android.app.ActivityThread.-wrap12(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1541) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:165) at android.app.ActivityThread.main(ActivityThread.java:6375) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:912) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:802) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.net.Uri.getScheme()' on a null object reference at android.media.MediaPlayer.setDataSource(MediaPlayer.java:1004) at android.media.MediaPlayer.setDataSource(MediaPlayer.java:983) at android.media.MediaPlayer.create(MediaPlayer.java:890) at android.media.MediaPlayer.create(MediaPlayer.java:867) at android.media.MediaPlayer.create(MediaPlayer.java:846) at com.amr.mineapps.awarm.AlarmTrigger.onCreate(AlarmTrigger.java:40) at android.app.Activity.performCreate(Activity.java:6845) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2700) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2808)  at android.app.ActivityThread.-wrap12(ActivityThread.java)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1541)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:165)  at android.app.ActivityThread.main(ActivityThread.java:6375)  at java.lang.reflect.Method.invoke(Native Method)
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've one checkbox field Completed. which is update by using apex class. I've created one checkbox field as Record Locked when this field is checked true then; user unable to edit the record. i've to update Record Locked field automatically when i write validation and check for the Record Locked is true; The problem is when i try to check Record Locked to true then validation also fire. How can we do. Please Suggest
I have situation here, where I want to lock all the fields and buttons on a quote__c (custom object) where the status of the quote is changed to 'Sent' so that nothing can be editable on the quote. Any ideas how to do this?
I found a little Winter Bash hat presentation bug (code name: TrumpHairLift). Of a run of a code snippet, the hat of the answering user doubles and lifts off. See this little animated GIF image I made from a screencast: It was on by Jamiec for the OP .
It seems like there is a bug that is causing a duplicate hat to appear when I expand info, like pressing "(more)" on a suggested edit. This bug does not seem to be specific to the suggested edits review queue though, as others have reported seeing this bug in other places, like code snippet expansion. Steps to repro: Put on a hat. Navigate to one of your own suggested edits. (You can just also open the Suggested Edits review queue and go to a random suggestion, but there is no guarantee any of those users will be wearing a hat.) Click the "(more)" button to expand the top box. What should happen: Hat should shift down with the rest of the content. What happens: All the content shifts down, but a duplicate hat remains in the initial place. Before expansion: After expansion with duplicate hat:
I'm confused with the concept of tension in strings/rope. I have read that tension is an electrostatic force and is created due to the attractive forces by the particles. I can easily make out that when two equal forces are acting at the two ends of an ideal rope the tension is equal to that applied force, but, what happens when two unequal forces say F1 and F2 are acting at the two ends of the wire, why does the tension produced in the wire lies between the values of F1 and F2? More specifically if we consider any arbitrary particle on the string won't there be unequal forces at the two ends of the particle(i.e. F1 and F2). According to me, the tension should be the result of the two unequal forces. Seeking an answer which involves an explanation of the phenomena in the atomic scale.
Consider a massless rope with pulling forces applied at each end. How do we decide if tension is constant or not in a rope? Consider a few example scenarios: For example, if there is a knot in the rope the tension is not constant throughout (why?. Similarly, if the rope is hung over a cylindrical pulley of a non-negligible radius, the tension is not constant (why?). If there isn't anything touching the rope, for example, 2 people tugging on the rope at each end, the tension is constant (why?).
I want to change the opening page when I connecting using ssh this is what I have now : Welcome to Ubuntu 15.10 (GNU/Linux 4.2.0-42-generic x86_64) Documentation: Last login: Tue Nov 29 13:43:00 2016 from 10.0.0.123 where do I change it someone wrote to change /etc/motd but I don't this file so waht do I need to change? Thanks ,
So the default Ubuntu SSH banner has some cool stuff, mainly that it shows the packages that can be updated and whatnot. So I want to preserve those values, while customizing the rest of it. I've already seen that I can point sshd_config to the file that would contain the text. I'm just unclear what commands will produce the update text. For the record, what I'm talking about is this: 0 packages can be updated. 0 updates are security updates. Help would be appreciated. Thanks so much.
I am trying to change the value of player_score, cpu_score, and ties which were created outside the function determineWinner but I get an error such as this: UnboundLocalError: local variable 'cpu_score' referenced before assignment. I have deleted the other assignments (player_score=player_score+1 and ties=ties+1) and added the print ("Player Score",player_score) to test the program. I don't understand is why print ("Player Score",player_score) outputs the value assigned outside of the function but cpu_score=cpu_score+1 yields the "referenced before assignment" error. Also showRolls does what it is supposed to. It seems that the functions can read the values of the variables assigned outside of the functions but can not change the values. Why is that? import random def showRolls(): print("Player 1 roll:",player_roll) print("CPU roll:",cpu_roll) def determineWinner(): if player_roll > cpu_roll: print("Player wins!") print ("Player Score",player_score) elif cpu_roll > player_roll: print("CPU wins!") cpu_score=cpu_score+1 else: print("It's a tie.") #-----------------------MAIN PROGRAM------------------------------------ player_score=0 cpu_score=0 ties=0 player_roll = random.randint(1,6) cpu_roll = random.randint(1,6) showRolls() determineWinner()
The following code works as expected in both Python 2.5 and 3.0: a, b, c = (1, 2, 3) print(a, b, c) def test(): print(a) print(b) print(c) # (A) #c+=1 # (B) test() However, when I uncomment line (B), I get an UnboundLocalError: 'c' not assigned at line (A). The values of a and b are printed correctly. This has me completely baffled for two reasons: Why is there a runtime error thrown at line (A) because of a later statement on line (B)? Why are variables a and b printed as expected, while c raises an error? The only explanation I can come up with is that a local variable c is created by the assignment c+=1, which takes precedent over the "global" variable c even before the local variable is created. Of course, it doesn't make sense for a variable to "steal" scope before it exists. Could someone please explain this behavior?
I am in the process of writing some unit tests. In particular I want to test some private methods. So far the I have come up with using. #define private public But I am not happy with this as it will destroy all encapsulation from the point of view of the unit test. What methods do you use to unit-test private methods.
How do I unit test (using xUnit) a class that has internal private methods, fields or nested classes? Or a function that is made private by having (static in C/C++) or is in a private () namespace? It seems bad to change the access modifier for a method or function just to be able to run a test.
I lost my Android phone Vivo 1713 (v5s) recently. I don't know its IMEI number. How do I get it?
I had a Nexus S but lost it or it was stolen. I need to find it's IMEI. I don't have the box or documentation either. I've checked exif data from photos taken with the phone. What other potential sources are there for it's IMEI?
I want to show the number of nodes and comments of the author in the author's comment. I try to put in template : function MYTHEME_get_user_comments_count($uid) { $query = db_select('comment', 'c'); $query->condition('uid',$uid,'='); $query->addExpression('COUNT(cid)', 'comments_count'); $result = $query->execute(); if ($record = $result->fetchAssoc()) return $record['comments_count']; return 0; } And in comment.tpl : <?php print MYTHEME_get_user_comments_count(['comments_count'], $comment->uid); ?> But it doesn't work. Where have I forgery? Is this the right way?
I want to show the information of the author in his comment. By default it shows the name and the picture, I want to add: The number of node and created comments The number of obtained . What code should I use to achieve this?
Background In Control Panel > Programs > Programs and Features > Installed Updates one can view all updates, sorting them by date installed. However, these updates are grouped by program before being sorted; meaning there's no simple way to find all updates installed in the last day; rather you have to look at the top few items of each program and make a note of these details. My reason for doing this is sometimes an update to one component may affect another (e.g. .net framework, windows security, or adobe acrobat update could affect various parts of internet explorer's functionality; seeing all updates may give useful clues). Question Is there any way to remove the grouping by program from the Windows Installed Updates table? Research So Far I've searched Google, Technet and here, but no luck so far. I've also tried removing the program column in the hope this removed the grouping - again no luck.
Windows 8.1 "installed updates" is one of two confusingly similar screens that let you view installed updates. It is the only non-useless one, because you can actually uninstall from this one. However it seems that there is some mandatory category groups that can not be removed, like "Microsoft Windows" and "Microsoft Visual Studio 2010", and so on. Hundreds of these categories. Clicking on the "installed on" column only sorts items within their existing groups, making the sort feature useless for finding what was installed on what day, as you now have to consult each of 200 "group" sections and you can only sort INSIDE the groups. How do I turn off this "grouping" feature within Installed Updates, or otherwise see the most recently installed updates, by date, across all the categories or groups? There is an Organize button, which is tantalizing, but the Organize button contains no way to hide the category names. How can I see the most recent day (today, yesterday, 3 days ago) that any update was installed regardless of categories that they are sorted permanently into? Known Workaround: Use the otherwise worthless "View update history" window instead. (Review your windows update history). Then obtain a piece of paper and a pen, and write down the meaningless 10 digit KB number, then go find the meaningless 10 digit number in the other screen, and remove it.
I was using $ characters to mean, well, "dollars" in a question on Economics SE and it caused the rendered text to go all screwy. I briefly reviewed the help text but could not zero in on the meaning of that character as markdown. Finally just "escaped" the character with backslash and got on with things. But what does $ mean in Markdown? Does it have a special function on all SE sites, or only some? (I've been on Stack Overflow and EL&U for a long time and never run across this problem.)
I want to write something basic like "10 $US" but sometimes it makes the text look weird. It changes the font and writes italic text. And sometimes it will insert a newline. For example in my . How can I safely insert a dollar sign?
Show that the matrices $$\left[\begin{matrix}1&0&0\\ 0&1&0\\ 0&0&1\end{matrix}\right], \left[\begin{matrix}1&0&0\\ 0&0&1\\ 0&1&0\end{matrix}\right], \left[\begin{matrix}0&1&0\\ 1&0&0\\ 0&0&1\end{matrix}\right], \left[\begin{matrix}0&0&1\\ 1&0&0\\ 0&1&0\end{matrix}\right], \left[\begin{matrix}0&0&1\\ 0&1&0\\ 1&0&0\end{matrix}\right], \left[\begin{matrix}0&1&0\\ 0&0&1\\ 1&0&0\end{matrix}\right]$$ form a group. Find an isomorphic of G with a more familiar group of order 6. How do i prove that matrices are groups? would i find the det? or let a matrice be called A and assume things and try and prove it?
I'm asked to show that $G=GL_2(\Bbb Z/2\Bbb Z)$ is isomorphic to $S_3$. I have few ideas but I don't manage to put them all together in order to obtain a satisying answer. I first tried using Cayley's theorem ($G$ is isomorphic to a subgroup of $S_6$), and I also noticed that $\operatorname{Card}(G)=\operatorname{Card}(S3)=6$ & that they're both non-abelian group. Is this enough to say that considering $S_3$ is a subgroup of $S_6$ with the same cardinality than $G$, it has to be isomorphic to it ? Could anyone give me some elements to get a more rigorous proof or lead me to an other path to show this statement ? Thanks in advance
Inside a multi-gang box I have a hard time working with the 12-gauge wire. Is it ok to connect them with a wire nut to a 14-gauge and then connect to the switches. The box has switches to light, heater, humidifier. The circuit breaker is 20 amps. The current wiring is 12 gauge everywhere it seems. This is in a small bathroom in TX.
I’ve used 12 gauge wire and 20 amp breakers in my basement. They go into a shallow box and the 12 gauge is difficult to work with. Can I drop to 14 gauge in the receptacle boxes and pigtail the connection ?
I have a variable data that contains some key-value pairs like this: var data = { "1": 127, "2": 236, "3": 348 } router.delete('/values/:id', function(req, res, next){ var id = req.params.id; }) How can I delete the key-value pair that has a key equal to the id variable?
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" };
The First Hokage sealed the shadow clone jutsu . If this is true, how was Kiba able to learn it?
While the Kage Bunshin no Jutsu seems to be taught, the Tajuu Kage Bunshin no Jutsu is sealed, so nobody can learn the jutsu. Does that mean that there's a difference between these jutsus, aside from the number of Kage Bunshin created? Or, why was the Tajuu Kage Bunshin no Jutsu sealed away? If there's no other difference, everybody could use this without reading the sealed scroll.
Suppose that R is a ring with unity, $a, b \in R$ and that neither a nor b is a zero divisor. If ab unit, then a and b are units. I know that a ring with unity means that $$\exists 1_{R} \in R:\forall a \in R: 1_{R}a = a = a1_{R}.$$ For an element $a \in R$ to be a zero divisor we must have $a \neq 0_{R}$ and there must exist an element $\hat{a} \neq 0_{R}$ such that $a \hat{a} = 0_{R}$ or $\hat{a}a = 0_{R}$. Therefore, the meaning of not a zero divisor would be that given $a \neq 0_{R}$ we must have for every $\hat{a} \neq 0_{R}$ that $a\hat{a} \neq 0_{R}$ and $\hat{a}a \neq 0_{R}$. Similarly, for b we then have $b\hat{b} \neq 0_{R}$ and $\hat{b}b \neq 0_{R}$. For $ab$ to be a unit there exists $(ab)^{-1} \in R$ such that $(ab)^{-1}ab = 1_{R} = ab(ab)^{-1}$. Now, I have to show that $\exists a^{-1}, b^{-1} \in R$ such that $a^{-1}a = 1_{R} = aa^{-1}$ and $b^{-1}b = 1_{R} = bb^{-1}$. I have no starting point thus far so any hint(s) are greatly appreciated.
Suppose $R$ is a ring with no zero divisors and with identity $1_R$ not equal to $0_R$. Suppose that $a,b$ are in $R$ and that $ab$ is a unit. Prove that $b$ is a unit. My thoughts: I know a unit is basically a unit that (for this example) would mean $abu = 1_R$ for some nonzero $u$ in $R$. I am really stuck after that. Not seeing a clear path to manipulate the variables to prove b is a unit by itself.
I am new on coding just need find out if it is possible to get methods name and print using console.write. Here I have sample class and I want to grab "myName" so I can use it to print. using System; namespace Tests { class Class1 { public void myName() { Console.Write(myName); } } }
Like the title says: Can reflection give you the name of the currently executing method. I'm inclined to guess not, because of the Heisenberg problem. How do you call a method that will tell you the current method without changing what the current method is? But I'm hoping someone can prove me wrong there. Update: Part 2: Could this be used to look inside code for a property as well? Part 3: What would the performance be like? Final Result I learned about MethodBase.GetCurrentMethod(). I also learned that not only can I create a stack trace, I can create only the exact frame I need if I want. To use this inside a property, just take a .Substring(4) to remove the 'set_' or 'get_'.
Is there built in functionality for the Watch 3 to track my sleep patterns? Is there anything that figures out sleep cycles and duration, and tracks heart rate at the same time for a prelimnary analysis?
I want to use an Apple Watch 2 to track my sleep. In order to achieve this I will need to wear the Apple Watch during sleep, which creates an issue around battery usage. So my thinking is that I can put the watch on charge twice daily on most days: in the morning while getting ready for work and again at night while getting ready for bed. By doing this I estimate the battery will have enough power to keep the watch going 24/7 on most days. Obviously this means I need a sleep tracking app to do the tracking. My requirements are: It must be highly efficient in terms of battery usage It can track sleep while the watch is in Airplane mode It can synchronise data with the iOS Health app on my iPhone It must be able to provide a summary of my sleep on the Apple Watch itself NOTES: I do not mind paying for the App if doing so results in me getting a much better product I am open to using 3rd party devices if it means the quality of tracking/measurements are much higher While not a requirement, if the app also supports syncing data with other HealthKit apps that would be a plus I did consider posting this in the community, but it didn't seem to have the appropriate tags.
I just switched from Chrome to Firefox and I was wondering if I can get my bookmarks out of Chrome and into Firefox somehow. Is it possible to export to some standard format and import into Firefox? Thanks
I was a Windows user for last 5 years but wanted to switch into Ubuntu World. I saved too many (around 100) bookmarks into chrome while using Windows. Now I want to import those bookmarks into Ubuntu browser (Firefox). How can I achieve this?
I'm trying to make a simple 3d game in Processing but I've run into a problem. I tried to make an array to keep track of my environment objects and to make it easier to modify. However, when I try to run the program, it won't work. Main code: //arrays BoxCl[] envArr; void setup() { size(640, 360, P3D); envArr[0] = new BoxCl(1,1,-1,1); //it shows the error here envArr[envArr.length] = new BoxCl(2,1,-1,1); } void draw() { background(0); camera(mouseX, height/2, (height/2) / tan(PI/6), width/2, height/2, 0, 0, 1, 0); Update(); Draw(); } void Update(){ } void Draw(){ for(BoxCl i : envArr){ i.Draw(); } } BoxCl Class: class BoxCl{ float x, y, z; int s; BoxCl(float x, float y, float z, int size){ this.x = x; this.y = y; this.z = z; this.s = size; } void Draw(){ translate(scale*x, scale*y, scale*z); stroke(255); fill(255); box(s * scale); translate(scale*-x, scale*-y, scale*-z); } } I've tried looking it up () but I think I'm too inexperienced to understand what I am supposed to do. Please help. edit: I am aware that a variable/array/object should be defined before being used. But how do I define the envArr in a way that it can still change? (i.e. increase or decrease in size when I have to create or delete an object)
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?
Since TQQQ is 3x the leverage of QQQ, so the conventional wisdom is: When TQQQ drops 34%, then it is all "wiped out" (meaning a $100 investment will go to $0 now). And TQQQ itself is also all wiped out. However, let's say, I bought TQQQ when QQQ was at $217, and now QQQ is at $330. So let's say, if some day, QQQ drops from $330 to $217, which is dropping 34%, should my investment in TQQQ get all wiped out? However, I can also claim that, QQQ went up and then down along that roller coaster, but my TQQQ should just go to my original purchase price. Or making it more drastic: I bought TQQQ on Monday, and Tuesday, QQQ went up from $217 to $330, and Wednesday, QQQ went from $330 to $217 -- dropping 34%, then my TQQQ should go back to the price of Monday only. However, if Tom bought TQQQ on Tuesday when QQQ was $330, and then Wednesday, QQQ went from $330 to $217, then by (1) above, shouldn't the invest in TQQQ get all wiped out? (and shouldn't TQQQ itself be completely wiped out?) Or what if on Tuesday, when QQQ is $330, I sold all my TQQQ and get $N, and use that $N to buy back TQQQ (that is like, as if I did nothing really), but then by (1) above and like Tom, my investment in TQQQ should be wiped out, but by (2) above, my investment in TQQQ should just go back to the price I bought on Monday. So these two points are contradictory. How does it work?
What happens to the price of the triple-leveraged ETF if the S&P 500 loses more than one-third of its value (i.e., the return is below -33 1/3%)? Does it mean the value is equal to zero?
I made an application with Mono, and I want it is always running. If my application stopped, I need it to automatically start again. Does anyone have solution that would help me? Also, how do I start an application at startup?
I need to run a bash script at boot-time as superuser in Xubuntu. I don't know where to start. I have to do something described in a Arch Linux guide. That guide says exactly: Add following at the end of the file : /etc/rc.sysinit # Do my action /etc/rc.d/do_my_action /bin/dmesg >| /var/log/dmesg.log But I do not have /etc/rc.sysinit and /etc/rc.d/ in Xubuntu. I'm sure there are equivalent ones, right?
I have installed a font, and now I wish to remove it, but I am not sure exactly how. I installed it by opening the .TTF file and clicking the "Install" button. But there is no uninstall button, and no obvious way of uninstalling a font installed in that way. So my question is really obvious, how do I uninstall a font installed in that way?
There are a lot of extra fonts that all seem to look alike and just annoy me in the drop down list. Is there anyway I can erase them from the system?
I have a mathematical expression, I try to write it in multiple line. I tried: multline, equation + split, align .. . $\text{max} \left \{frac{1}{2}2x^{2}(2A+6Bx^{-4})+x(2Ax-2Bx^{-3}+\frac{1}{3}-4(Ax^{2}+Bx^{-2}+\frac{1} {3}x+1)+x+4,Ax^{2}+Bx^{-2}+\frac{1}{3}x-Ax^{2}-Bx^{-2}-\frac{1}{3}x-1 \right\}$ Could you please help me?
I have a multi-line equation that I want to have matching sized parentheses. The advice I read online was to use \left( equation \right. \\ left. rest-of-equation \right) . However, this syntax leaves first half of the equation unaware of what is in the second half. For example, if you include a square root term after the break, the second parenthesis will be larger than the opening parenthesis. When you are using the aligned environment to split a long equation this can look somewhat offputting. Compare the top equation to the bottom one. The parentheses match in size for the bottom equation, but the left hand parentheses for the top one is noticeably smaller. Top Code: \begin{aligned}[t] \gamma_{\text{u}} + \frac{1}{108} \left(57\gamma_{\text{er}} \right. &+ 38\gamma_{\text{se}}\\ & {}\pm \left.\sqrt{2601 \gamma_{\text{er}}^2 + 3648 \gamma_{\text{er}}\gamma_{\text{se}} + 1444 \gamma_{\text{se}}^2} \right) \end{aligned} Bottom Code: \begin{aligned}[t] \gamma_{\text{u}} + \frac{1}{16} \left(9\gamma_{\text{er}} + 6\gamma_{\text{se}} \pm \sqrt{49 \gamma_{\text{er}}^2 + 76 \gamma_{\text{er}}\gamma_{\text{se}} + 36 \gamma_{\text{se}}^2} \right) \end{aligned}
I'm currently reading the book 'An Introduction to Statistical Learning with application in R(ISLR)', it is very helpful for learning the applications of statistical model, but less complement of theoreotical content or mathematical proof/derivation of formulas. I'm often confused with some conclusion/formulas provided in that book without theoretical explanation. Does anyone can give me some resources or books that emphasizes on theoretical aspect of statistical learning? Or other statistical learning book with theoretical problems is OK as well.
Every textbook I've seen so far describes ML algorithms and how to implement them. Is there also a textbook that builds theorems and proofs for the behaviour of those algorithms? e.g. stating that under conditions $x,y,z$, gradient descent will always lead to $A,B,C$?