body1
stringlengths 20
4.1k
| body2
stringlengths 23
4.09k
|
---|---|
In trying to understand the y values of a normal distribution plot I use this code: %reset -f import numpy as np from scipy.stats import norm import matplotlib.pyplot as plt data = [10,10,20,40,50,60,70,80,90,100] # Fit a normal distribution to the data: mu, std = norm.fit(data) # Plot the histogram. plt.hist(data, bins=10, density=True, alpha=0.6, color='g') # Plot the PDF. xmin, xmax = plt.xlim() x = np.linspace(xmin, xmax, 100) p = norm.pdf(x, mu, std) plt.plot(x, p, 'k', linewidth=2) title = "Fit results: mu = %.2f, std = %.2f" % (mu, std) plt.title(title) plt.show() to generate this plot: The data is the age in years of people in a group: [10,10,20,40,50,60,70,80,90,100] How to interpret the y values of the generated pdf plot? For instance, how should the bar with play approx equal to 0.027 be interpreted? I've read various posts such as : But can't find information that details an interpretation of the y axis values of the plot. Is 0.027 the probability the age is in the range from 0 to approx 20 ? | On the , there is this line: $p(\mathrm{height}|\mathrm{male}) = 1.5789$ (A probability distribution over 1 is OK. It is the area under the bell curve that is equal to 1.) How can a value $>1$ be OK? I thought all probability values were expressed in the range $0 \leq p \leq 1$. Furthermore, given that it is possible to have such a value, how is that value obtained in the example shown on the page? |
I'm sorry for the silly question, but I have a doubt. Given two positive real numbers $x,y$ and taking $0<r<1$, is it true that $$ (x+y)^r \le x^r+y^r? $$ In all the examples I considered, this turns out to be true. Moreover, to try to give a proof, does it suffices to prove that the function $f(z)=(1+z)^r-1-z^r$ is non-positive when $z \in (0,1]$ (i.e. taking $x>y$ and dividing by $x$? | How to prove for $s<1$$$|a+b|^s\le|a|^s+|b|^s$$ I tried to prove $|a+b|\le (|a|^s+|b|^s)^{\frac{1}{s}}$, but $\frac{1}{s}$ may not be integer, so I do not know how to expand it if it is not integer. Is it the right way to prove it by trying to expand it using binomial expansion? How to prove it? Thanks! |
I'm having a similar problem to the following post . The model is built with Deep Neural Network library in Matlab by Masayuki Tanaka. The library is designed for classification. However, I've managed to change the last layer's transfer function to linear, so that the Deep Belief Network performs regression instead. I'm pretty sure the feed-forward and back propagation is performed correctly. The model has 2 inputs, 4 hidden layers with 500, 200, 100, 10 units per layer, respectively, and 1 output. The activation of the hidden layers are sigmoid The data is simply a sin function generated by matlab's sind, you may consider the input as a time series where the 2 features are sin value at t1 and sin value at t2, and I would like to predict sin value at t3 inputdata = [sind(1:1000); sind(2:1001)]; //1000*2 matrix outputdata = [sind(3:1002)]; //1000*1 matrix By default, inuptdata is between -1 and 1, and not 0 to 1, I'm assuming the DBN is fine with it. Note that I'm not interested in testing the data with LSTM yet, but with DBN instead. I would appreciate a hint on what I may be doing wrong, as the model always outputs the mean 0.50 - 0.55. I've tested with fewer layers, and it seemed to predict correctly, but with more than 3 or 4 layers, the model predicts the mean (constant value). Could it be because of some large/small values of hidden layers when back propagating? I'm really lost, I spent so much time on this.. Thank you for your time. | I'm training a neural network but the training loss doesn't decrease. How can I fix this? I'm not asking about overfitting or regularization. I'm asking about how to solve the problem where my network's performance doesn't improve on the training set. This question is intentionally general so that other questions about how to train a neural network can be closed as a duplicate of this one, with the attitude that "if you give a man a fish you feed him for a day, but if you teach a man to fish, you can feed him for the rest of his life." See this Meta thread for a discussion: If your neural network does not generalize well, see: |
Which sentence is more grammatically correct: Jack’s predilection toward competitive sports resulted in him becoming a great tennis player. or Jack's predilection toward competitive sports resulted in his becoming a great tennis player. | I assume that the following sentences are grammatically correct: He resents your being more popular than he is. Most of the members paid their dues without my asking them. They objected to the youngest girl's being given the command position. What do you think about his buying such an expensive car? We were all sorry about Jane's losing her parents like that. I'm still getting used to this possessive gerund structure. It sounded so weird to me at first. Is the structure used in both formal and informal contexts? Are there any alternative structures that result in the same meaning and are more frequently used? (Examples taken from ) |
I wouldn't be surprised if this has already been asked, but I couldn't find it anywhere. I know that you don't gain or lose rep for questions or answers that you set to community wiki. But does it cost you rep to downvote someone else's cw post? | Some questions and answers are marked Community Wiki and are owned by a community wiki user: (In fact, this very question is one of them) Why have Community Wiki posts? How do Community Wiki posts work? How does a post become a Community Wiki post? How can the Community Wiki status be removed from a post? How can I find Community Wiki posts? |
On a Chrome or other Chromium browser (Brave, Kiwi..) on Android When I click "add to home screen" from the Brave/Chrome menu, on some sites the icon that is added does not open website but instead opens a custom app created for the website (so called "PWA"). I want to create a simple website link that opens the website in a browser (so I can use search / see the url from the address bar and so on). How can I do that with Brave or Chrome? | I'm using Chrome and Firefox on Android 10. I need to add a link to my home screen and I can't find a way to add the specific link. I know that I can do the following: Go to the URL Tap the overflow (3-dot) menu Add to home screen However, if I navigate to a specific URL within some sites, like Weather Underground () and follow the above process, it doesn't add the specific URL, it adds www.wunderground.com and doesn't seem to give me any way to edit that URL to reference the specific subpage (e.g. www.wunderground.com/my/specific/url). Why, and how to solve this? |
I have been trying to install Ubuntu 12.04 on my system since tomorrow, I know there newer versions of Ubuntu available, but still I want to install this version only. I'm repeatedly getting the same error when I try to install Ubuntu on my system. I checked the md5 hash of the ISO file i downloaded but it is correct. I'm installing Ubuntu from my USB drive. Please help me out, I need an OS to be installed on my PC. Because I don't have one. | I tried to use the usb-creator.exe from Ubuntu 10.10 desktop i386 ISO image and it does create an USB stick that doesn't boot. When I try to boot from it I get: Operating System not found. I try to do this from Windows 7 x64. I'm not looking to create a live Ubuntu media, only an installation USB disk. I repeated the process several times and I even tried to reformat the USB drive (FAT32), no success yet. The USB stick is a 8GB one. |
I tried installing any script from the Package Manager of latest version of MikTeX but when you try any script, the package manager crashes. I have tried it with and without the admin mode. Moreover, I tried it on different Windows 7 systems, but didn't work on any. Do you guys also currently experiencing it with MikTeX 2.9? Thank you. | Whenever I try to install some package from MiKTeX Package Manager, the packet manager crashes. Why would this be happening? Problem signature: Problem Event Name: APPCRASH Application Name: mpm_mfc.exe Application Version: 2.9.4196.0 Application Timestamp: 4e3327b8 Fault Module Name: MiKTeX209-core.dll Fault Module Version: 2.9.4792.0 Fault Module Timestamp: 511beb86 Exception Code: c0000005 Exception Offset: 0008b354 OS Version: 6.1.7601.2.1.0.256.48 Locale ID: 1033 Additional Information 1: 0a9e Additional Information 2: 0a9e372d3b4ad19135b953a78882e789 Additional Information 3: 0a9e Additional Information 4: 0a9e372d3b4ad19135b953a78882e789 |
I have a freshly installed Ubuntu 16.04 and I don't have the ON/OFF button in the gnome extensions site. I have no horizontal ribbons. Everything is installed as far as i know. Do you have any ideas about this? | How do I install GNOME Shell extensions? Is it possible to update, remove and manage the extensions? |
This problem and the regular aspect ratios for non-Meta emails were tested in both Chrome and Firefox on my Mac. So I got this email about Meta automatically, and the aspect ratio is very, very off: This problem only applies to Meta emails, that I know of; , , and don't have this problem. | The logo of the site where the bounty question is asked appears to be distorted in comparison to the text, when reading the mail: Same issue in landscape orientation. |
Let's say there exists a stock X that I believe will soon embark on a general downward trend. I am interested in shorting X and decide to sell some quantity of X. I see my short position as being a long term view of the stock. This is not generally the case where one holds a short position in a stock. I understand that if my view of the stock also become the general market view of the same stock that there may be many people wanting to hold short positions of X. How would this affect me? To summarize: Is there a time limit by which I need to cover a short position? If the answer to the above is no, what are the downsides to holding a short position for a longer time frame? | If I short sell stocks of a company but do not close my position by buying them back, what will happen? I realize it is a bad thing, but what exactly? I will need to pay a penalty? |
When people use plural nouns after the word "there's", for example: There's too many numbers. it makes me a bit frustrated. I try to correct it by using "There are," but it still happens sometimes to me (the "there's" situation). Do you think that there are is the correct usage option? People usually use there's, as I said. | It seems I put a Bounty assigned by outside party, two lengthy, reference-citing answers, one "-1" (awarded the bounty), one "-2", two others scored "0" and "-2" respectively, the answers suggesting one or the other is correct, 73 comments and no consensus so far - and me, as the asker, lost without a clue what to think of the answers anymore - this is no longer "Learners' Level" question, so I thought I'd bring it here and hear what the experts have to say. Original question: Plurality of verb depending on plurality of list elements An edit was suggested to my sentence. There was were an orange, some grapes, two apples and a small pile of cherries on the plate. In my native language plurality of the verb always follows plurality of the first element on the list. There were an orange,... sounds awkward to me, no matter what follows up. My simple solution was reordering: There were some grapes, an orange, two apples and a small pile of cherries on the plate. But that's not the first time I faced this situation and I'd like to know what the rules of grammar say about that - was my editor overzealous or am I trying to copy rules of my language that don't apply in English? Someone linked a for negatives, where the situation is more clear-cut ("There is no..."). Same applies to connection with "or" apparently, per accepted answer there. Still, nothing for "and". It seems there is a consensus that in that if the verb goes after the list, it will be plural. an orange, some grapes, two apples and a small pile of cherries were on the plate. There doesn't seem to be clear consensus for: On the plate { was | were } an orange, some grapes, two apples and a small pile of cherries Adding more to the confusion is the abbreviated form: "There's" One last note. In North America, at least, there is a widespread use of using a singular form like "there is" and "there was", without regard for the subject item or items, and this "there is" is often shortened to "there's": There's three apples on the table! Could you please clarify this mess? |
For this question I'm talking about things like flaming/ flaming burst or icy burst/ frost brand, shocking burst, brilliant energy, thundering, and so on. I'm excluding properties that deal with alignment issues, harm a specific type of creature, dance/ defend, increases distance, returns it to you if thrown, etc. Also, I'm wanting to know how these interact with the item's price (for instance some will say +3 price, so does that mean that it counts as a +3 weapon, even if it doesn't state it does?) RAW is good, but tested houserules work just as well. | If I wanted my party's spellcaster to enhance/enchant a weapon or piece of armor, is there a limit to the number enhancements it can have on it? I haven't read anywhere that there is a limit, but putting an unlimited number on them seems OP. I also remember the game Neverwinter Nights 2 limited you to 4, but it didn't follow the rules 100%. |
I have a C: drive where I have Windows 7 64 bit installed and I used to have a D: drive on which I installed Paint.NET. This D: drive doesn't exist any longer. When I go to Control Panel\Programs\Programs and Features I still see the entry for Paint.NET, but I get an error after attempting to uninstall it: "The folder path contains an invalid character." I'm assuming that his is the result of the D: drive not existing any longer. The reason I'm asking this question is because I get a fatal error when trying to install the newest version of Paint.NET. How can I uninstall the registry entries (and other residual files) of the previous instance of Paint.NET without using any untrusted 3rd party tool? | Could anyone tell me how to uninstall programs that their installation had a problem and therefore their uninstall doesn't work? I removed all their references in the registry and their folder on the hdd but still don't know how to get rid of them completely from Add/Remove Programs list. Thanks |
Let n $\in \mathbb{N}$. Is there a field K such that $\overline{K}$/ K is a extension of degree n? Here $\overline{K}$ implies algebraic closure. (Note that for n = 2 we have K = $\mathbb{R}$). | Let $\mathbb R$ be the field of real numbers. Its algebraic closure, the field $\mathbb C$, is a finite extension of $\mathbb R$, which has degree 2. Are there other examples of fields (not algebraic closed) such that its algebraic closure is a finite extension? |
For example if somebody becomes president they are surely feeling happy, but at the same time probably anxious. Is there one word for that? | I've been trying to think of an adjective that expresses having two (or perhaps more) conflicting emotions or opinions simultaneously. Can anyone think of one? |
I 'm trying to install latest nvidia drivers (352) but it doesn't work. I tryed following: sudo add-apt-repository ppa:xorg-edgers/ppa sudo apt-get update sudo apt-get install nvidia-352 When I tipe the last command I get Reading package lists... Done Building dependency tree Reading state information... Done Unable to locate package nvidia-352 What I'm doing wrong? Why xorg edgers doesn't work | Having found a lot of different questions on Ask Ubuntu regarding NVIDIA graphics drivers installation generating various issues and problems on Ubuntu systems - I do want to know: What do Ubuntu users have to care about when installing the NVIDIA graphics drivers? Explanation: Being aware that this topic already has many good questions and answers it actually always stays up-to-date. One example : Many new notebooks come with hybrid graphics and Optimus support so they depend on proprietary NVIDIA drivers being installed to function properly but most of all existing posts point to which doesn't provide the drivers anymore since ubuntu was introduced, so many old answers are mostly obsolete or wrong. |
[tl;dr] Why is apache redirecting https that has gone through rewrite engine to http I have a site that is redirecting some pages (only ones that have been through rewrites) from https to http. Including rewrite log on the ssl config does not show anything, no rewrite etc. the redirect is happening before it gets to php, so there cant be any header() calls doing it. I have checked anyway and its not the case. (its in house software, simple 4 file php app) Searching google is tricky, as all I can find is tutorials on redirecting http->https :( version Server Version: Apache/2.2.22 (Debian) PHP/5.5.14-1~dotdeb.1 mod_ssl/2.2.22 OpenSSL/1.0.1e Server Built: Jun 16 2014 03:51:14 Apache config below, remove actual ips etc. <VirtualHost <ip>:80> ServerName <domain>.co.uk DocumentRoot <root> php_value include_path .:<root>/include php_value auto_prepend_file <root>/include/header.php php_value auto_append_file <root>/include/footer.php Include <path>/secure.rewrite.conf Include <path>/rewrite.conf </VirtualHost> <VirtualHost <ip>:443> ServerName <domain>.co.uk DocumentRoot <root> php_value include_path .:<root>/include php_value auto_prepend_file <root>/include/header.php php_value auto_append_file <root>/include/footer.php Include <path>/rewrite.conf Include <path>ssl.conf SSLCertificateKeyFile <cert>.key SSLCertificateFile <cert>.crt SSLCertificateChainFile <cert>.ca-bundle </VirtualHost> secure.rewrite.conf RewriteEngine On RewriteCond %{SERVER_PORT} ^80 RewriteRule ^/login https://%{HTTP_HOST}%{REQUEST_URI} [L,R] rewrite.conf RewriteRule ^/dir/forgot_password/(.*) /dir/forgot_details.php?hash=$1 [L,QSA] RewriteRule ^/dir/forgot_password /dir/forgot_details.php [L,QSA] RewriteRule ^/dir/login /dir/login.php [L,QSA] RewriteRule ^/dir/logout /dir/login.php?logout=1 [L,QSA] RewriteRule ^/dir/settings /dir/settings.php [L,QSA] RewriteRule ^/dir/(PO|EC)\.([A-Za-z0-9\.]+)/despatchnote/print /dir/despatch_note.php?encore_id=$1\.$2&print=1 [L,QSA] RewriteRule ^/dir/(PO|EC)\.([A-Za-z0-9\.]+)/despatchnote /dir/despatch_note.php?encore_id=$1\.$2 [L,QSA] RewriteRule ^/dir/(PO|EC)\.([A-Za-z0-9\.]+)/print /dir/view.php?encore_id=$1\.$2&print=1 [L,QSA] RewriteRule ^/dir/(PO|EC)\.([A-Za-z0-9\.]+)/action /dir/view.php?encore_id=$1\.$2&action=1 [L,QSA] RewriteRule ^/dir/(PO|EC)\.([A-Za-z0-9\.]+) /dir/view.php?encore_id=$1\.$2 [L,QSA] RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f RewriteRule ^ <root>/webroot/index.php [L] ssl.conf SSLEngine on <Directory /public/*/htdocs> SSLRequireSSL </Directory> SSLProtocol all -SSLv2 -SSLv3 SSLCipherSuite "EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH+aRSA+RC4 EECDH EDH+aRSA 3DES RC4 !aNULL !eNULL !LOW !MD5 !EXP !PSK !SRP !DSS +3DES 3DES +RC4 RC4" SSLHonorCipherOrder on SSLCompression off | This is a about Apache's mod_rewrite. Changing a request URL or redirecting users to a different URL than the one they originally requested is done using mod_rewrite. This includes such things as: Changing HTTP to HTTPS (or the other way around) Changing a request to a page which no longer exist to a new replacement. Modifying a URL format (such as ?id=3433 to /id/3433 ) Presenting a different page based on the browser, based on the referrer, based on anything possible under the moon and sun. Anything you want to mess around with URL Everything You Ever Wanted to Know about Mod_Rewrite Rules but Were Afraid to Ask! How can I become an expert at writing mod_rewrite rules? What is the fundamental format and structure of mod_rewrite rules? What form/flavor of regular expressions do I need to have a solid grasp of? What are the most common mistakes/pitfalls when writing rewrite rules? What is a good method for testing and verifying mod_rewrite rules? Are there SEO or performance implications of mod_rewrite rules I should be aware of? Are there common situations where mod_rewrite might seem like the right tool for the job but isn't? What are some common examples? A place to test your rules The web site is a great place to play around with your rules and test them. It even shows the debug output so you can see what matched and what did not. |
I am currently working on a function that takes the sum of different values in a multidimensional array. I have the following code: cidSum() { for(let arr in this._cid) { console.log(this._cid[arr][1]); this._cidSum += this._cid[arr][1]; console.log(this._cidSum); } } Initial values of this._cid and this._cidSum: this._cidSum = 0; this._cid = [["PENNY", 1.01], ["NICKEL", 2.05], ["DIME", 3.1], ["QUARTER", 4.25], ["ONE", 90], ["FIVE", 55], ["TEN", 20], ["TWENTY", 60], ["ONE HUNDRED", 100]]; The results of the console logs where the first line is always the amount to be summed and the next line the new value after taking the sum. 1.01 1.01 2.05 3.0599999999999996 3.1 6.16 4.25 10.41 90 100.41 55 155.41 20 175.41 60 235.41 100 335.40999999999997 My problem is with 3.0599999999999996 and 335.40999999999997. 1) What is causing these numbers to deviate from one or two decimals as they are always summed by one or two decimals? 2) Is there an efficient way to solve this (currently I would use math.round). Thank you for your help, Tom | Consider the following code: 0.1 + 0.2 == 0.3 -> false 0.1 + 0.2 -> 0.30000000000000004 Why do these inaccuracies happen? |
I want to specify voltage across the electrolytic capacitor in Orcad but there seems to be no way to this. I'm using C_elect part and the panel to choose the value is below: I've tried this formats but none of them worked: 1u 16 1uF 16V | I have a polarized capacitor like below. it's 1uF and 16V. the schematic in Orcad is like this: How can I specify that 16V voltage? |
Assume the following model is the beginning of a car-like thing. Now we want to begin adding the windows and roof. I want them to form a nice smooth curve on the edges, and came up with the following solution: I create a bezier curve, align it as good as i can with the help of orthographic camera. then i extruded it to get the following: After that I convert the curve to a mesh, join it with the car mesh and run "merge vertices by distance" to join the "alignment points". This looks so messy and it actually is. Now i have much n-gons, and it only gets a bigger mess when i add the missing faces. How can I do such things in a better way? What is best practice here? | I need to round the edges of this object. The bottom edges are going to be rounded in conjunction with another object, so, I guess, this should be left out right now. I tried using the bevel tool (and a bevel modifier) on an edge (series of Blender edges), but I got the problems you see on the images. When selecting all edges, the bevel doesn't know any limit and isn't applied symmetrically. When selecting only the edges shown (or only the other ones), I can't proceed with the rest of the bevel, and strange little artifacts appear. FYI: The top surface is derived from an icosphere. Without the subdivision shown above, a stair comes into existence (bad): Whole object: |
Determinant of the following $n \times n$ matrix: $$\begin{pmatrix} 2\cos \theta& 1 & 0 & \ldots & \ldots & 0 \\ 1 & 2\cos \theta & 1 & \ddots & & \vdots \\ 0 & 1& 2\cos \theta & \ddots & \ddots & \vdots \\ \vdots & \ddots & \ddots & \ddots & \ddots & 0 \\ \vdots & & \ddots & \ddots & 2\cos \theta & 1 \\ 0 & \ldots & \ldots & 0 & 1 & 2\cos \theta\\ \end{pmatrix}.$$ Letting given matrix determinant as $D_n$, I find a relation $D_n-2\cos \theta D_{n-1}+D_{n-2}=0$, but after that how I calculate $D_n?$ Please help. | How to show that the determinant of the following $(n\times n)$ matrix $$\begin{pmatrix} 5 & 2 & 0 & 0 & 0 & \cdots & 0 \\ 2 & 5 & 2 & 0 & 0 & \cdots & 0 \\ 0 & 2 & 5 & 2 & 0 & \cdots & 0 \\ \vdots & \vdots& \vdots& \vdots & \vdots & \vdots & \vdots \\ 0 & \cdots & \cdots & 0 & 2 & 5 & 2 \\ 0 & \cdots & \cdots & \cdots & \cdots & 2 & 5 \end{pmatrix}$$ is equal to $\frac13(4^{n+1}-1)$? More generally: How does one compute the determinant of the following (where the three diagonals are constant)? $$M_n(a,b,c) = \begin{pmatrix} a & b & 0 & 0 & 0 & \cdots & 0 \\ c & a & b & 0 & 0 & \cdots & 0 \\ 0 & c & a & b & 0 & \cdots & 0 \\ \vdots & \vdots& \vdots& \vdots & \vdots& \vdots & \vdots \\ 0 & \cdots & \cdots & 0 & c & a & b \\ 0 & \cdots & \cdots & \cdots & \cdots & c & a \end{pmatrix}$$ Here $a,b,c$ can be taken to be real numbers, or complex numbers. In other words, the matrix $M_n(a,b,c) = (m_{ij})_{1 \le i,j \le n}$ is such that $$m_{ij} = \begin{cases} a & i = j, \\ b & i = j - 1, \\ c & i = j + 1, \\ 0 & \text{otherwise.} \end{cases}$$ There does not seem to be an easy pattern to use induction: the matrix is not a diagonal of the type $M = \bigl(\begin{smallmatrix} A & C \\ 0 & B \end{smallmatrix}\bigr)$ (where we could use $\det(M) = \det(A) \det(B)$ for the induction step), and there are no lines or columns with only one nonzero entry, so gets complicated quickly. Is there a general pattern that one could use? Or is the answer only known on a case-by-case basis? It's possible to compute the determinant by hand for small $n$: $$\begin{align} \det(M_1(a,b,c)) & = \begin{vmatrix} a \end{vmatrix} = a \\ \det(M_2(a,b,c)) & = \begin{vmatrix} a & b \\ c & a \end{vmatrix} = a^2 - bc \\ \det(M_3(a,b,c)) & = \begin{vmatrix} a & b & 0 \\ c & a & b \\ 0 & c & a \end{vmatrix} = a^3 - 2abc \end{align}$$ But there is no readily apparent pattern and the computation becomes very difficult when $n$ gets large. |
I have a fairly straightforward question about defining exponentiation in rings: Given any element $a \in R$ of any ring $R$, what is $a^0$ defined as? Is it the additive identity or the multiplicative identity (if it exists)? In the context of groups we define $a^0 = e$ for whatever the identity of that one operation is. But in the context of rings, $a^n$ would refer to the ring product, so I would assume $a^0$ to be the multiplicative identity, but this doesn't always exist. Is there any convention, or is it simply left undefined/context dependent? Edit: In regards to being a duplicate of the $0^0$ question, I had already read through both the question and some answers, but I thought this was a 'fairly separate' question. In particular, this is about rings in general, and while there is a relationship, most of the discussion in the other question pertains explicitly to $\mathbb{R}$. For example discussion of non-integer powers, and limits as a motivating value for the definition, and the fact $\mathbb{R}$ has unity. | I have been a witness to many a discussion about numbers to the power of zero, but I have never really been sold on any claims or explanations. This is a three part question, the parts are as follows... 1) Why does $n^{0}=1$ when $n\neq 0$? How does that get defined? 2) What is $0^{0}$? Is it undefined? If so, why does it not equal 1? 3) What is the equation that defines exponents? I can easily write a small program to do it (see below), but what about in equation format? I just want a little discussion about numbers to the power of zero, for some clarification. Code for Exponents: (pseudo-code/Ruby) def int find_exp (int x, int n){ int total = 1; n.times{total*=x} return total; } |
Why does this give me september 30 rather than oct 1? var dob = new Date("1999-10-01") console.log(dob.toString()) | I have a web page with three dropdowns for day, month and year. If I use the JavaScript Date constructor that takes numbers, then I get a Date object for my current timezone: new Date(xiYear, xiMonth, xiDate) Give the correct date, but it thinks that date is GMT+01:00 due to daylight savings time. The problem here is that I then pass this Date to an Ajax method and when the date is deserialised on the server it has been converted to GMT and so lost an hour which moves the day back by one. Now I could just pass the day, month, and year individually into the Ajax method, but it seems that there ought to be a better way. The accepted answer pointed me in the right direction, however just using setUTCHours() by itself changed: Apr 5th 00:00 GMT+01:00 to Apr 4th 23:00 GMT+01:00 I then also had to set the UTC date, month and year to end up with Apr 5th 01:00 GMT+01:00 which is what I wanted. |
QUESTION : Let $a,b$ be positive integers such that $a\mid b^2 , b^2\mid a^3 , a^3\mid b^4 \ldots$.....so on, then prove that $a=b$ This is what I tried: Say $a≠b$ rather than $a>b≥1$ $$\exists k :a^{k-1}>b^k$$ Then: $$a^{k-1}>b^k$$ $$\left(\frac{a}{b}\right)^k>a$$ $$k>\log_{\left(\frac{a}{b}\right)}a$$ I am struck after this. I don't know what to do next (even I don't know what I have done is right or wrong). What to do next? I apologise for asking a same question which exist but I didn't understand that(due to limit). | The following is a well known problem If $a|b^2; b^2|a^3; a^3|b^4; ....$ then $a=b$. I started with $a$ is a prime $p$ and the conclusion immediately holds. So I was comparing powers of primes but can't get anything useful. Please help. |
I am trying to call a future method from my scheduled apex but it is giving this error message Scheduled class global class Scheduledbacthfuture Implements Schedulable{ public Interface IScheduleDispached{ void execute(SchedulableContext sc); } global void execute(SchedulableContext sc){ Type targetType = Type.forName('HANDLERNAME'); if(targetType != null){ IScheduleDispached obj = (IScheduleDispached)targetType.newInstance(); obj.execute(sc); } } } Handler public class HANDLERNAME implements Scheduledbacthfuture.IScheduleDispached { public void execute(SchedulableContext sc) { //Call your Future Method Here List<User> newusers = [Select Id,CFS_Activation_Date__c from user where (Profile.Name='CTCT Solution Provider (Login Based)'OR Profile.Name='CTCT Solution Provider (Named)')AND lmscons__Cornerstone_ID__c=NULL AND lmscons__CFS_Status__c='Not CFS user']; if(newusers.size()>0) System.debug(newusers.size()+' new users found will give them license in a sometime'); if(newusers.size()>0) { UserHandler.convertListToSet(newusers); // lmscons.ConsumerUserWebservice.CreateConsumerUsers(newusers, false); } } } FATAL_ERROR System.CalloutException: Callout from scheduled Apex not supported. | i have created a schedulable class which has to trigger a batch job. The run method for the batch class will get list of data to process from a webservice callout. Now, i got the exception below. Any suggestions please. System.CalloutException: Callout from scheduled Apex not supported. global class scheduledDeltaBatchable implements Schedulable { global void execute(SchedulableContext sc) { ID batchprocessid = BatchUpsertSAPCustomerMasterBPSync.run(SAPServices.GetSAPCustomerMasterBPSync('Delta')); } } |
Well, as a Webdeveloper, german language sucks. I have a from. In the head, there is at the first place: <meta charset="utf-8"> I also checked the header. The following is set: Content-Type:text/html; charset=UTF-8 In php.ini my default-charset is: default_charset="utf-8" The problem is in HTML/PHP because when I write Umlauts (äöü) directly in the database, PHP gets the right string, when I var_dump it. On the other side when I fill out the textarea and send the form, the var_dump for the POST-Parameter has everytime 2 questionmarks instead of the Umlauts. ä -> ?? How can I fix it? | I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1. Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur? This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2. |
Also duplicate of Basically, what I am trying to do is : struct A { virtual ~A() {} virtual int bar() = 0; }; struct B { int bar() {return 1;} }; struct C { int bar() {return 2;} }; struct D { template <class T> static int foo() { T a; return a.bar(); } }; template<class T, class U> int callFoo() { return T::foo<U> (); ///error: expected primary-expression before '>' token } int main(int argc, char** argv) { std::cout << D::foo<B>() << std::endl; //This works of course std::cout << D::foo<C>() << std::endl; //This works of course std::cout << callFoo<D,B>() << std::endl; std::cout << callFoo<D,C>() << std::endl; } How can I call a templated static method of a class which is parameter template of my function? | In templates, where and why do I have to put typename and template on dependent names? What exactly are dependent names anyway? I have the following code: template <typename T, typename Tail> // Tail will be a UnionNode too. struct UnionNode : public Tail { // ... template<typename U> struct inUnion { // Q: where to add typename/template here? typedef Tail::inUnion<U> dummy; }; template< > struct inUnion<T> { }; }; template <typename T> // For the last node Tn. struct UnionNode<T, void> { // ... template<typename U> struct inUnion { char fail[ -2 + (sizeof(U)%2) ]; // Cannot be instantiated for any U }; template< > struct inUnion<T> { }; }; The problem I have is in the typedef Tail::inUnion<U> dummy line. I'm fairly certain that inUnion is a dependent name, and VC++ is quite right in choking on it. I also know that I should be able to add template somewhere to tell the compiler that inUnion is a template-id. But where exactly? And should it then assume that inUnion is a class template, i.e. inUnion<U> names a type and not a function? |
I've built a website were I can enter data into an SQL database using php. The problem is when the user enter's an apostrophe the function crashes (SQL reasons). I think a work around would be to sanitise the script or use majic quotes in my php function (which I've attached at the end). I'm new to php and totally lost if this is the correct approach. If any one can point me in the right direction I'd really appreciate it. Allan PHP function; function insert_wisha($wisherID, $description, $duedate, $Location, $Time, $Price, $Details) { $description = $this->real_escape_string($description); if ($this->format_date_for_sql($duedate) == null) { $this->query("INSERT INTO wishes (wisher_id, description, Location, Time, Price, Details)" . " VALUES (" . $wisherID . ", '" . $description . "' ,'" . $Location . "', '" . $Time . "' , '" . $Price . "', '" . $Details . "')"); } else $this->query("INSERT INTO wishes (wisher_id, description, due_date, Location, Time, Price, Details)" . " VALUES (" . $wisherID . ", '" . $description . "', " . $this->format_date_for_sql($duedate) . ", '" . $Location . "', '" . $Time . "', '" . $Price . "','" . $Details . "')"); } | If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example: $unsafe_variable = $_POST['user_input']; mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')"); That's because the user can input something like value'); DROP TABLE table;--, and the query becomes: INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--') What can be done to prevent this from happening? |
Currently I am studying time series MA(q) $$X_t -\mu= \epsilon_t + \theta_1\epsilon_{t-1} + \theta_2 \epsilon_{t-2} + ... + \theta_q \epsilon_q$$ where $\theta_1,...,\theta_q$ are parameters and $\epsilon_t$ is a white noise with mean $0$ and constant variance. I have been puzzling on how to compute $\epsilon_t.$ Are they just residuals? This illustrated how to compute $\epsilon_t$ in $MA(1)$ model. But I do not see how the same technique can be carried forward to $MA(q)$ model. | This is a basic question on Box-Jenkins MA models. As I understand, an MA model is basically a linear regression of time-series values $Y$ against previous error terms $e_t,..., e_{t-n}$. That is, the observation $Y$ is first regressed against its previous values $Y_{t-1}, ..., Y_{t-n}$ and then one or more $Y - \hat{Y}$ values are used as the error terms for the MA model. But how are the error terms calculated in an ARIMA(0, 0, 2) model? If the MA model is used without an autoregressive part and thus no estimated value, how can I possibly have an error term? |
My 2-year-old son is eating small black stones when he is playing outside. We were really shocked he considered those as "chips", and he tries to bite the stones and swallows them very often. Now we are not allowing him to play outside because we were really scared whether it will hurt his stomach. Could any one please let us know how to stop this habit? How can we make him understand a "stone" is different from what he is thinking, and he's not allowed to eat it? | My 1.5-year-old has recently started putting small stones (the size of hazelnuts) in her mouth when we are outdoors, which of course can be very dangerous. I have tried everything I could think of to prevent any unfortunate accidents: reacted quickly to take the stone out with a finger - it worked the first few times, but now she keeps her mouth tight and tries to escape (which in turn worries me because she could accidentally choke while she struggles) in a serious tone told her to spit the stone in normal voice tone told her that mommy doesn't want her to put stones in her mouth asked her if she was hungry and offered her something to eat (the idea being: you put stuff in your mouth if you want to eat them) tried to distract her / ignore her action She sees it as a game and laughs and runs around with the stone in her mouth. This happens almost every time we are outdoors playing, which is every day. If I do manage to take the stone out, she would put in another one 30 seconds later. My question is: how to best handle this situation? Both in terms of prevention (if possible), and once she has the stone in her mouth. Note: she is generally not putting other things in her mouth that are not edible. Before this "stone game", she had a "let's taste the sand" phase, which was far less dangerous. |
I will be travelling from Katmandu to Istanbul with a 5 hour stopover in Delhi is a transit visa required.I have British passport and will not be leaving international airport. | I have read a lot on this subject on the Lonely Planet forum and it looks like the staff on ground can transfer your bags through the Delhi airport if you have a connecting flight without you having to go out to check them in again and therefore needing a visa. I refer of course to the situation when you go with 2 different airlines, because otherwise the luggage is transfered automatically. I posted a and mentioned it briefly there, however I think this subject deserves a separate question and a detailed answer. Does it depend on the type on an airline? I have read that Jet is no problem, what about AirIndia and IndiGo? And what about the incoming flight to Delhi from Europe or USA, do they all can hand over you luggage to the Indian airlines and pick it up again on the way home? Do you have to contact them before and explain your situation? Or check in your luggage directly to your desired destination? |
It is defined as $i^2 = -1$ then we can say $i=\pm \sqrt{-1}$ Then is true that $i$ can be equal to $ -\sqrt{-1}$ | So I am about halfway through complex analysis (using Churchill amd Brown's book) right now. I began thinking some more about the nature and behavior of $i$ and ran into some confusion. I have seen the definition of $i$ in two different forms; $i = \sqrt{-1} $ and $i^2 = -1$. Now I know that these two statements are not equivalent, so I am confused as to which is the 'correct' definition. I see quite frequently that the first form is a common mistake, but then again Wolfram Math World says otherwise. So my questions are: What is the 'correct' definition of $i$ and why? Or are both definitions correct and you can view the first one as a principal branch? It seems that if we are treating $i$ as the number with the property $i^2 = -1$, it is implied that we are treating $i$ as a concept and not necessarily as a "quantity"? If we are indeed treating $i$ as a concept rather than a "quantity", how would things such as $i^i$ and other equations/expressions involving $i$ be viewed? How would such an equation have value if we treat $i$ like a concept? I've checked around on the various imaginary number posts on this site, so please don't mark this as a duplicate. My questions are different than those that have already been asked. |
Aragorn is a Dunedain and Arwen is an Elf who has the power of immortality. Will their kids have the power of immortality ? | Elrond (who was 50% Elven) lived well over 6,000 years before departing Middle-earth. Because of his distant Elven lineage Aragorn lived over 200 years before he died. As a 3/4 Elf Arwen was immortal and lived for 2901 years before dying of grief (after the death of Aragon). Their son Eldarion would have been at least 37.5% elven. Should he expect his lifespan to be somewhere between Arwen's and Aragorn's? Or does he have enough Elven blood to live forever? |
Are there any alternatives for Visual Studio on Ubuntu? I searched on Google and I could not find anything. | I have been developing in the windows space with Visual Studio for a while now with work, but I have also been using Ubuntu for a while and am keen to get into some software development for linux. I should also note. I am not looking for .NET and I am aware of mono. I am also familiar with c++ development and some python, so the language isn't so much relevant as the "all in one" aspect. I was interested to know if there is a useful all in one code/debug/design(gui) IDE similar to something like Visual Studio but for linux? |
It is clear that if a frictional force must exist on an object that rolls without slipping, it must a static frictional force because the contact point of the object with the ground does not move. I know that if a ball rolls on a flat surface, once it begins rolling without slipping, the frictional force is 0. I am confused, however, about the case when a ball rolls down a ramp. For the condition of rolling without slipping to hold, there must be a frictional force on the ball up the ramp. I am confused about where this frictional force comes from if the part of the ball touching the ramp isn't actually moving. It doesn't seem to make physical sense because from the ramp's perspective, it is touching a stationary object and thus there shouldn't be a frictional force. Help?? | Suppose a wheel is rolling smoothly on a horizontal plane i.e., it is rolling without slipping. Now let's take the two cases of the horizontal plane: It has friction It is frictionless In the first case, as of my knowledge friction doesn't come into play when there is no slipping. So, will the wheel roll forever? If it comes to rest is the answer friction? If not what brings it to rest? In the second case, there is no friction. So, here also will the wheel roll forever? And if it comes to rest what brings it to rest? |
This is a question I picked up from Royden's. Let $f$ be an increasing function on an open interval $I$. For $x_0\in I$ show that $f$ is continuous at $x_0$ if and only if there there exists two sequences {$a_n$}, {$b_n$} in $I$ such that $\forall n$, $a_n<x_0<b_n$, $\lim_{n\to \infty}[f(b_n)-f(a_n)]=0$ This is my attempt for the forward implication. Suppose $f$ continuous at $x_0$ and that for each pairs of sequences {$a_n$}, {$b_n$} in $I$, $\lim_{n\to \infty}[f(b_n)-f(a_n)]\neq 0$. Then there exists some $\epsilon>0$ such that for each $N\in \mathbb{N}$ , there exists a $n>N$ such that $|f(b_n)-f(a_n)|\geq \epsilon$. Also, there exists a $\delta_1>0$ such that $|f(b_n)-f(x_0)|<{\epsilon\over 2}$ and there exists a $\delta_2>0$ such that $|f(a_n)-f(x_0)|<{\epsilon\over 2}$ whenever $|b_n-x_0|<\delta_1$ and $|a_n-x_0|<\delta_2$. Notice that $$|f(b_n)-f(a_n)|=|f(b_n)-f(x_0)+f(x_0)-f(a_n)|\leq |f(b_n)-f(x_0)|+|f(x_0)-f(a_n)|<\epsilon$$ whenever $|b_n-x_0|<\delta$ and $|a_n-x_0|<\delta$ where $\delta=$max{$\delta_1,\delta_2$}. We have arrived at a contradiction. Is this idea correct? | I want to show that if $f:(a,b)\to \mathbb R$ is a strictly monotone function and if $x_0\in (a,b)$ such that there exist two sequences $(a_n)$ and $(b_n)$ with $a_n<x_0<b_n$ and $\lim\limits_{n\to \infty}(f(b_n)-f(a_n))=0$, then $f$ is continuous at $x_0$. By monotonicity we can say that $\lim\limits_{n\to \infty}f(a_n)=f(x_0)=\lim\limits_{n\to \infty}f(b_n)$. Let $(x_n)$ be a sequence in $(a,b)$ such that $x_n\to x$. Here I got stuck. How to show that $f(x_n)\to f(x_0)$? Please help! |
This is my first installation of Ubuntu (18.10), and the first thing I noticed is that sound quality of any media is very bad (compared to Windows). Most noticeable is absence of normalization of sound levels, watching movies without that becomes real pain, speech is silent, sound effects are loud and vice versa. In windows sound normalization is achieved by checking the check box, is there any similar way to do it in Ubuntu? Without getting PhD in console typing, because all the posts I found on this topic are too complicated (assumed that some things are obvious, whereas even opening a file to edit in Ubuntu is a challenge for me, so such posts are not useful). A manual for absolute beginners how to do this crucial thing could be very useful for many people. | As a Laptop user, I'm sure that a lot of people, even the ones using Netbooks would have already gone through this problem. Especially when listening to podcasts, and using it as an example, the sound might have loud moments and quiet moments, one person speaking loud and the other speaking very quiet in the same episode. Thereby, I always wanted the sound to be compressed system-wide, and I just noted the other day, that in Windows, some Realtek drivers already offer this function. We have already a pulseaudio plugin for equalization system-wide, and although it still has problems like not letting us change its values and listen the change in real time, or cracking the sound while changing pulse volume, I do love it and use it. Now I'm just missing something to keep the sound around 0db (or near the volume level you're using) as a leveler plugin for pulseaudio. Any suggestion? |
I saw this sentence in a newspaper cartoon: Not only are you dysfunctional — you appear to be completely spineless as well. Is the verb are in the right position? | I have seen this construction quite often: Online ads have been around since the dawn of the Web, but only in recent years have they become the rapturous life dream of Silicon Valley. What is the rule there?. When your sentence doesn't start with pronoun + verb, invert them as verb + pronoun?. I know it sounds awkward but is it possible (grammatically correct) to use something similar to: Online ads have been around since the dawn of the Web, but only in recent years they have become... And in any case, does this only work with have (or has)? Maybe it works fine with 'had' but I can't think of an example right now. |
I've learned a little about . According to words on Internet, it says that the position and the velocity of an object cannot both be measured exactly at the same time. And there are some examples like: Any attempt to measure precisely the velocity of a subatomic particle, such as an electron, will knock it about in an unpredictable way, so that a simultaneous measurement of its position has no validity. This has been bothering me for a long time: If the uncertainty is cauesed by measuring instruments, then we can't say that particles (or everything) themselves are uncertain. So can I say the world is actually certain, and the reason why it looks uncertain is we can't predict exactly? | In many physics divulgation books I've read, this seems to be a commonly accepted point of view (I'm making this quote up, as I don't remember the exact words, but this should give you an idea): is not a result of our lack of proper measurement tools. The fact that we can't precisely know both the position and momentum of an elementary particle is, indeed, a property of the particle itself. It is an intrinsic property of the Universe we live in. Then this video came out: (skip to , if you're already familiar with the uncertainty principle). So, correct me if I'm wrong, what we may claim according to the video is: the only way to measure an elementary particle is to make it interact with another elementary particle: it is therefore incorrect to say that an elementary particle doesn't have a well defined momentum/position before we make our measurement. We cannot access this data (momentum/position) without changing it, therefore it is correct to say that our ignorance about this data is not an intrinsic property of the Universe (but, rather, an important limit of how we can measure it). Please tell me how can both of the highlighted paragraphs be true or how they should be corrected. |
We all are used to think that the lowest base for numeral system is 10 2. But is it possible to do math in unary system? I found the funny section in MS windows registry: If you want to add monospace font to console font set, you must create entry wich name is filled with exact numbers of '0'. Is that example of unary numeral system? But i have no idea how to write 'zero' or negaitve numbers in such a numeral system. | In the decimal system: $...-3, -2, -1, 0, 1, 2, 3...$ In the binary system: $...-11, -10, -1, 0, 1, 10, 11...$ In the unary system: $-111, -11, -1, \text{ ??? }, 1, 11, 111...$ I was only able to find a related question but none with an answer so far: |
Xubuntu 18.10 So the other day I went to run TeamViewer and found it was gone. So I tried to re-install it and this happens: $ sudo apt install teamviewer Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: teamviewer : Depends: libqt5qml5 (>= 5.5) but it is not going to be installed or qt56-teamviewer but it is not going to be installed Depends: libqt5quick5 (>= 5.5) but it is not going to be installed or qt56-teamviewer but it is not going to be installed Depends: libqt5webkit5 (>= 5.5) but it is not going to be installed or qt56-teamviewer but it is not going to be installed Depends: qml-module-qtquick2 (>= 5.5) but it is not going to be installed or qt56-teamviewer but it is not going to be installed Depends: qml-module-qtquick-controls (>= 5.5) but it is not going to be installed or qt56-teamviewer but it is not going to be installed Depends: qml-module-qtquick-dialogs (>= 5.5) but it is not going to be installed or qt56-teamviewer but it is not going to be installed Depends: qml-module-qtquick-window2 (>= 5.5) but it is not going to be installed or qt56-teamviewer but it is not going to be installed Depends: qml-module-qtquick-layouts (>= 5.5) but it is not going to be installed or qt56-teamviewer but it is not going to be installed E: Unable to correct problems, you have held broken packages. I've tried a few things: $ sudo apt-get install -f Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded. I've also tried Synaptic to install qt56-teamviewer, but that fails too and just says it's "broken". I suspect a non-standard PPA repository, but any useful way to determine which one so I just fix this problem without causing other problems (such as blowing away the entire sources.list and replacing with default)? I noticed a lot of the sources have bionic in them even though I'm on cosmic. Should I change all references to bionic to cosmic instead? -----------edits below--------- $ apt-cache policy qt56-teamviewer libqt5qml5 teamviewer qt56-teamviewer: Installed: (none) Candidate: 5.6.3.0 Version table: 5.6.3.0 500 500 http://linux.teamviewer.com/deb stable/main amd64 Packages libqt5qml5: Installed: (none) Candidate: 5.9.5-0ubuntu1.1 Version table: 5.9.5-0ubuntu1.1 500 500 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages 5.9.5-0ubuntu1 500 500 http://us.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages teamviewer: Installed: (none) Candidate: 14.2.2558 Version table: 14.2.2558 500 500 http://linux.teamviewer.com/deb stable/main amd64 Packages 14.1.18533 500 500 http://linux.teamviewer.com/deb stable/main amd64 Packages 100 /var/lib/dpkg/status 14.1.9025 500 500 http://linux.teamviewer.com/deb stable/main amd64 Packages 14.1.3399 500 500 http://linux.teamviewer.com/deb stable/main amd64 Packages 14.0.14470 500 500 http://linux.teamviewer.com/deb stable/main amd64 Packages 13.2.26559 500 500 http://linux.teamviewer.com/deb stable/main amd64 Packages 13.2.13582 500 500 http://linux.teamviewer.com/deb stable/main amd64 Packages | There are now errors when updating and I cannot install most software due to a corrupted /etc/apt/sources.list file. Is there a copy I can download to replace it? The file would be for Ubuntu 12.04 (Final Beta) in the United States. |
Would someone give a good list of the equipment, tools, supplies, etc., I would need to take up carpet and padding that is glued to the concrete floor. Thank you. | I have a 12x15' sun room that currently has carpet over concrete. I pulled a 3' section of carpet and the entire floor has adhesive. Can I remove this using a liquid chemical or do I need a machine? The house was build in '96 so I'm assuming there's no harmful chemicals existing on the floor to worry about. I plan to tile over the concrete when finished. |
I'm currently trying to do a basic "minecraft style" game. I know how difficult it is to create a game like this, that's why I juste want to do the base of a game like this. I did a class which creates one block face, another one which handles the creation of the whole block (All the faces), and a Chunk class which stores and renders all blocks. My chunks are 16x1x16 sized (Just 1 layer of blocks). I did a first optimisation step : I removed all faces that aren't visibles (If two blocks are sided, I don't add the two sided faces). And another optimisation with the frustrum. One chunk rendered Removing invisble faces With one chunk rendered, framerates are good, but above 4-5 chunks rendered, framerates are becoming low. I don't know how to optimise more. I heard about VertexBuffers and IndexBuffers, but I don't know how to add them, because I have a lots of Blocks, in a lots of chunks. And maybe, in the future, how manage that if I want to destroy/place blocks ? So my question is : How I can optimise the game ? Thank you ! (Excuse my english, i'm a French guy eheh) | I'm writing my own clone of Minecraft (also written in Java). It works great right now. With a viewing distance of 40 meters I can easily hit 60 FPS on my MacBook Pro 8,1. (Intel i5 + Intel HD Graphics 3000). But if I put the viewing distance on 70 meters, I only reach 15-25 FPS. In the real Minecraft, I can put the viewing disntance on far (= 256m) without a problem. So my question is what should I do to make my game better? The optimisations I implemented: Only keep local chunks in memory (depending on the player's viewing distance) Frustum culling (First on the chunks, then on the blocks) Only drawing really visible faces of the blocks Using lists per chunk that contain the visible blocks. Chunks that become visible will add itself to this list. If they become invisible, they are automatically removed from this list. Blocks become (in)visible by building or destroying a neighbour block. Using lists per chunk that contain the updating blocks. Same mechanism as the visible block lists. Use nearly no new statements inside the game loop. (My game runs about 20 seconds until the Garbage Collector is invoked) I'm using OpenGL call lists at the moment. (glNewList(), glEndList(), glCallList()) for each side of a kind of block. Currently I'm even not using any sort of lighting system. I heard already about VBO's. But I don't know exactly what it is. However, I'll do some research about them. Will they improve performance? Before implementing VBO's, I want to try to use glCallLists() and pass a list of call lists. Instead using thousand times glCallList(). (I want to try this, because I think that the real MineCraft doesn't use VBO's. Correct?) Are there other tricks to improve performance? VisualVM profiling showed me this (profiling for only 33 frames, with a viewing distance of 70 meters): Profiling with 40 meters (246 frames): Note: I'm synchronising a lot of methods and code blocks, because I'm generating chunks in another thread. I think that acquiring a lock for an object is a performance issue when doing this much in a game loop (of course, I'm talking about the time when there is only the game loop and no new chunks are generated). Is this right? Edit: After removing some synchronised blocks and some other little improvements. The performance is already much better. Here are my new profiling results with 70 meters: I think it is pretty clear that selectVisibleBlocks is the issue here. Thanks in advance! Martijn Update: After some extra improvements (like using for loops in stead of for each, buffering variables outside loops, etc...), I now can run viewing distance 60 pretty good. I think I'm going to implement VBO's as soon as possible. PS: All source code is available on GitHub: |
On what basis is each chromosome given a number? There appears to me to be no visible ordering between each pair. Is there any reason other than differentiation? | What were the criteria devised for the numbering convention employed in human chromosomes? When was it fixed? Correct me if I am wrong; it appears that chromosome pairs 1 to 22 were originally ordered in terms of perceived structural size, which ended up fitting neatly with the quantity of base pairs (but not with the quantity of genes). The sex chromosomes in turn were arbitrarily assigned as "pair 23". Is this sound? Thanks in advance. |
I need help making getting multiple buttons to change color when clicked and go back to the previous color when clicked a second time. Here is my code: <!DOCTYPE html> <html> <head> <style> .choices{ background-color:#F0F3F4; padding:15px 32px; display:inline-block; font-size:16px; font-family:century gothic; font-weight:bold; margin:6px 4px; cursor:pointer; border-radius:12px; border:2px solid #5D6D7E; } .choices:hover{ background:#D0D3D4; } </style> <script> </script> </head> <body> <div> <button class="choices" type="button" id="button" >Grapes</button> <button class="choices" type="button" id="button">Bananas</button> <button class="choices" type="button" id="button">Strawberries</button> <button class="choices" type="button" id="button">Apples</button> </body> </html> I'm not super experienced with javascript so I think I just need help figuring out how I can use javascript to solve the problem. | How can I change the class of an HTML element in response to an onclick or any other events using JavaScript? |
I am trying to make a simple python script that starts a subprocess and monitors its standard output. Here is a snippet from the code: process = subprocess.Popen([path_to_exe, os.path.join(temp_dir,temp_file)], stdout=subprocess.PIPE) while True: output=process.stdout.readline() print "test" The problem is that the script hangs on output=process.stdout.readline() and that the line print "test" only executes after the subprocess is terminated. Is there a way to read standard output and print it without having to wait for the subprocess to terminate? The subprocess which I am starting is a Windows binary for which I do not have the source code. I have found several similar questions, but the answers are only applicable on Linux or in case I have the source of the suprocess I am starting. | I'm using the to start a subprocess and connect to its output stream (standard output). I want to be able to execute non-blocking reads on its standard output. Is there a way to make .readline non-blocking or to check if there is data on the stream before I invoke .readline? I'd like this to be portable or at least work under Windows and Linux. Here is how I do it for now (it's blocking on the .readline if no data is available): p = subprocess.Popen('myprogram.exe', stdout = subprocess.PIPE) output_str = p.stdout.readline() |
I started downloading about 1gb from a colleague, and received 750mb in about 8 hours. The command I used was $ scp dev@dev_server:/home/dev/trainingVM/Centos7VMa_app_zxTmw457.ova What command could I use next, so that the remainder would download in under 3 hours, not 10? | I am trying to fetch a log file which is repeatedly updated. I want that updated file, but don't want to download the entire file again and again from the remote system via SCP. Any idea to achieve this in minimal network usage? |
Solder masks can be had in many different colors. I have personally gotten white, black, red, and blue. But green is, by far, the most prevalent color on printed circuit boards, and the default at every fab house I've seen. Why green? | Green is the most common circuit-board color because it has become an industry standard. What I'm interested in is How the traditional "PCB Green" become a standard in the first place? Were there any interesting historical reasons for the initial choice, or was it just a product of what one particularly successful company was doing that became the de-facto standard? |
My Apache 2.2 is running on port "8080" I want to call my site url http://www.example.in:8080/abc/xyz.html/index.php (xyz.html is a folder) as .... http://www.example.in:8080/abc/xyz.html Can any one help me with the .htaccess for this.. | This is a about Apache's mod_rewrite. Changing a request URL or redirecting users to a different URL than the one they originally requested is done using mod_rewrite. This includes such things as: Changing HTTP to HTTPS (or the other way around) Changing a request to a page which no longer exist to a new replacement. Modifying a URL format (such as ?id=3433 to /id/3433 ) Presenting a different page based on the browser, based on the referrer, based on anything possible under the moon and sun. Anything you want to mess around with URL Everything You Ever Wanted to Know about Mod_Rewrite Rules but Were Afraid to Ask! How can I become an expert at writing mod_rewrite rules? What is the fundamental format and structure of mod_rewrite rules? What form/flavor of regular expressions do I need to have a solid grasp of? What are the most common mistakes/pitfalls when writing rewrite rules? What is a good method for testing and verifying mod_rewrite rules? Are there SEO or performance implications of mod_rewrite rules I should be aware of? Are there common situations where mod_rewrite might seem like the right tool for the job but isn't? What are some common examples? A place to test your rules The web site is a great place to play around with your rules and test them. It even shows the debug output so you can see what matched and what did not. |
Given $m \in \mathbb{Z}$, let $m\mathbb{Z}$ denote the set of integer multiples of $m$, i.e. $m\mathbb{Z} := \{mk\mid k \in \mathbb{Z}\}$. Now let $a,b \in \mathbb{Z}$ with $a,b$ not both $0$. Prove that $a\mathbb{Z} \cap b\mathbb{Z} = \operatorname{lcm}(a,b)\mathbb{Z}$. I am trying to write a proof for this, but I am unsure of what method to use. Also I am confused by $mk\mid k$, because wouldn't $m=1$ for this to be true. | The question is Prove that $a\mathbb{Z}\cap b\mathbb{Z}=[a,b]\mathbb{Z}$. Hint:First prove $b\mid a \Leftrightarrow a\mathbb Z\le b\mathbb Z$ and then prove $a\mathbb Z+b\mathbb Z=(a,b)\mathbb Z$ I managed to prove $b\mid a\Leftrightarrow a\mathbb Z\le b\mathbb Z$. About the next claim: From the first statement ($b\mid a...$) it follows that since $(a,b)\mid a$ and $(a,b)\mid b, a\mathbb Z+b\mathbb Z\le(a,b)\mathbb Z$. My problem is proving the opposite side (a.k.a $a\mathbb Z+b\mathbb Z\ge(a,b)\mathbb Z$). How can I do so and how can I proceed from $(a,b)$ to $[a,b]$? |
In Adventurer's League, can the spell Booming Blade be casted using an improvised weapon (a shield)? | Green-Flame Blade: As part of the action used to cast this spell, you must make a melee attack with a weapon against one creature within the spell's range, otherwise the spell fails. This states that so long as the attack is a melee attack made with a weapon, you may use this cantrip and apply its affects. I realize improvised weapon has weapon in the name, and is under the weapons category, but it would also mean that I can use a mug as an improvised weapon with Booming Blade. I see no reason why this would not work, but I'm still curious to see how others may interpret this. |
Suppose I have a list [1,2,3,4,5]. Now I want to pass the elements of this list, starting from 3rd element to a method. i.e. i want to invoke: myfunction([3,4,5]) How can I do this in python. tried passing mylist[2], but it doesn't quite work this way it seems. | I need a good explanation (references are a plus) on Python's slice notation. To me, this notation needs a bit of picking up. It looks extremely powerful, but I haven't quite got my head around it. |
I have to prove that for $a,b>2$, $a,b\in \Bbb{N}$ that $2^a+1$ is never divisible by $2^b-1$. The method I used is by taking cases, first of them being $b>a$. Now since $b>a$ implies $2^b-1>2^a+1$. That would mean that $2^a+1$ is never divisible by $2^b-1$. For the case $a=b=k$, I wrote $2^k=2n$. So the questions reduces down to the fact that $2n+1$ is not divisble by $2n-1$. Now if you look at the sequence formed by $2n+1$ and $2n-1$ for different values of $n$ it is a sequence of odd numbers(i.e $1,3,5,\cdots$).Now given any value of $n$ the number $2n+1$ gives a number in the sequence whose preceding number is given by $2n-1$. Now given two consecutive odd numbers(By consecutive I mean in this arithmetic progression $(1,3,5,\cdots$)) there gcd is always one and hence not divisible. But I do not know how to do it for the case $a>b$ | Let $a,b>2$ be positive integers. We need to show that $2^a +1$ is not divisible by $2^b-1$. Could any one give me hint? |
Iam asking about the verb have when using it as possessing matter. I know the verb (has) comes with he,she,it and the verb (have) comes with I, you, we, they. Now,why we say; he has a car, and we say in the question, does he have a car? My question why not say, does he has a car? Also, which sentence is correct? Does he has the responsibility of the accident. Does he have the responsibility of the accident | Generally we use "hads* with he , she , and it. So which one is correct to say ? Does this phone has / have xyz function ? Does his father has / have a car ? |
Let $ a \in \mathbb{N}$, $ b \in \mathbb{N}_0 $, $ r \in \mathbb{N}_0 $, $ q\in \mathbb{N} $ and $ b \leq a$ so that $$a = bq + r $$with $$ 0 \leq r \lt b$$ Proof: Let $ D = \{d \in \mathbb{Z} \vert ~ d \mid a \text{ and } d \mid b \}$ and Let $ D' = \{d \in \mathbb{Z} \vert ~ d \mid b \text{ and } d \mid r \}$ Let $ x \in D $, so that $x \mid a$ and $x \mid b$: $$ a = bq +r $$ $$ a - bq = r $$ So $x \mid a-bq=r$ so $x \mid r$ Let $$ x \in D', $$ so that $x \mid b$ and $x \mid r$: $$ a = bq +r $$ So $x \mid b$ and $x \mid r$ but also $x \mid a$ and since $$ a \in D$$ $$ \gcd(a,b) = \gcd(b,r)$$ Any critique? Did i proved it somehow in a correct way? If not, could you show me what i did wrong or how to do it properly? Thanks in advance! | Given: $a = qb + r$. Then it holds that $\gcd(a,b)=\gcd(b,r)$. That doesn't sound logical to me. Why is this so? Addendum by LePressentiment on 11/29/2013: (in the interest of and averting a duplicate) What's the intuition behind this result? I only recognise the proof and examples solely due to algebraic properties and formal definitions; I'd like to apprehend the result naturally. |
I have a client who is on a sugar detox/diet. She can't eat any bread because all the bread companies added sugar. Why do bread companies add sugar to their breads? | My recipe says 1 tablespoon of sugar per loaf. This seems like too small an amount for flavor. The recipe is as follows: 3 cups flour 1 teaspoon salt 2 teaspoons active-dry yeast 1 tablespoon sugar 2 tablespoons oil 1 cup water knead, wait 1 hr, knead again, wait 1.25 hr, bake for 30min @ 350 Is this for flavor, or is there another purpose? |
I would just like to know how to upgrade Xubuntu 18.04 to Xubuntu 20.04 Thank you Thank you | What are the different ways I can use to upgrade Ubuntu from one release to another? |
I m holing a passport of Indian. I m traveling to Russia but my flight from Mumbai to Tokyo, Tokyo to Haneda, Haneda to Kansai. Kansai to Vladivostok. I have a airport change at Tokyo. Can I require a transit visa of Japan. | I'm arriving from New Delhi, India (Indian passport) with JAL at Narita on 11th July at 07:30 and departing for San Francisco with JAL at 00:05 on 12th July from Haneda. Do I need a transit visa as I'll be switching airports and spending a few hours at JAL City Haneda Airport Hotel? Previously I had connecting flights from Narita to San Francisco and obtained shore passes to relax at Narita Nikko Hotel. Now I'm travelling with my elderly Mom and do not want complications at Narita immigration or later in the day while going from Narita Airport to Haneda airport. Please advise. |
Here is Prob. 2.10 in the book Vector Analysis and Cartesian Tensors by D. E. Bourne and P. C. Kendall, 3rd edition: Show that the four points with position vectors $$ \mathbf{r}_1, \mathbf{r}_2, \frac{r_2}{r_1} \mathbf{r}_1, \frac{r_1}{r_2} \mathbf{r}_2, $$ where $\mathbf{r}_1 \neq \mathbf{0}$ and $\mathbf{r}_2 \neq \mathbf{0}$, lie on a circle. My Attempt: Relative to a rectangular cartesian coordinate system $Oxyz$, let $\mathbf{r}_1 = \left( a_1, b_1, c_1 \right)$ and $\mathbf{r}_2 = \left( a_2, b_2, c_2 \right)$, where $$ a_1^2 + b_1^2 + c_1^2 > 0 \qquad \mbox{ and } \qquad a_2^2 + b_2^2 + c_2^2 > 0, $$ and as $\mathbf{r}_1, \mathbf{r}_2, \frac{r_2}{r_1} \mathbf{r}_1, \frac{r_1}{r_2} \mathbf{r}_2$ constitute four points on the circle, so we must also have $$ a_1^2 + b_1^2 + c_1^2 \neq a_2^2 + b_2^2 + c_2^2. $$ As a circle is a plane figure, so we can also assume without any loss of generality that both $\mathbf{r}_1$ and $\mathbf{r}_2$ lie in the $xy$-plane so that $c_1 = c_2 = 0$. Therefore we obtain $$ a_1^2+ b_1^2 > 0 \qquad \mbox{ and } \qquad a_2^2 + b_2^2 > 0, $$ and also $$ a_1^2+ b_1^2 \neq a_2^2 + b_2^2. $$ Let $x^2 + y^2 + 2gx + 2fy + c = 0$, $z = 0$ be the required circle. Then substituting the coordinates of the heads of the four vectors we obtain $$ \begin{align} 2a_1 g + 2 b_1 f + c &= - \left( a_1^2+ b_1^2 \right), \\ 2a_2 g + 2 b_2 f + c &= - \left( a_2^2+ b_2^2 \right), \\ 2 \sqrt{ a_2^2+ b_2^2} a_1 g + 2 \sqrt{ a_2^2+ b_2^2} b_1 f + c &= a_2^2 + b_2^2, \\ 2 \sqrt{ a_1^2 + b_1^2 } a_2 g + 2 \sqrt{ a_1^2 + b_1^2} b_2 f + c &= a_1^2 + b_1^2. \end{align} $$ Is what I have done so far correct? If so, then what next? How to proceed from here? Or, is there a more direct solution? | I'm stuck on problem 2.10 from Vector Analysis and Cartesian Tensors by Kendall: Show that the four points with position vectors $\vec{r_1}$, $\vec{r_2}$, $\frac{r_2}{r_1}\vec{r_1}$, $\frac{r_1}{r_2}\vec{r_2}$ , where $r_1\neq0$ and $r_2\neq0$, lie on a circle. I tried supposing that there exists some vector $\vec{d}$ which gives the position of the circle centre and then trying to prove that the distance from each point to this centre is equal. But I just arrive at the condition that $\hat{r_1}=\hat{r_2}$. Any suggestions for another strategy, am I just messing something along the way? |
The problem requires you to prove: $x^2 + xy + y^2 > 0$ assuming that $x$ and $y$ are not both zero I made use of a property proven earlier ($x^3 - y^3) = (x-y)(x^2 + xy + y^2)$) and rewrote $x^2 + xy + y^2$ as $\dfrac{x^3 - y^3}{x-y}$. Then I simply tested for the three cases $x = y, x > y, x < y$ For the last two, it's easy to show that the condition holds. But when I consider $x = y$ then the statement that I got evaluates to zero, which is clearly not greater than zero, even though the statement $x^2 + xy + y^2$ should not be zero. Edit: One stupid mistake. $x = y$ is undefined as it requires division by zero. What do I do from here? | Can't quite finish this proof: Prove that if $x$ and $y$ are not both $0$ then $ x^2 +xy +y^2> 0$ $ x^2 +xy +y^2 +xy -xy> 0$ $ (x +y)^2 -xy> 0$ Without loss of generality define $x\geq y$ Firstly the case where $y<0$ and $x>0$ is trivial as both $ (x +y)^2$ and $-(xy) >0$. I want to say by transitivity as each are >0 that there sum must be ${}> 0$ can I do that? The second trivial case is $y=0$ as we simply have $ x^2 >0 $ where $x>0$. Lastly we have define $c= x+y$ since both $x$ and $y$ must have the same sign we know $|c|>x$ since $x\geq y$ we know that $ x^2 \geq xy$ finally since $ |c|^2 = c^2$ $ \forall c \in \mathbb{R} $ We have $ c^2 >x^2 \geq xy$ hence $c^2 -xy >0$ I feel like I have all the pieces but it doesn't feel finished how do I fix it? Edit: I am really glad i asked this question love the variety of different good answers no idea what a discriminant is but im going to go look that up. I wanted to give the accepted answer to Edward as he actually answered my question but Anurag s proof was just so much better then my attempt. ^^ |
Clearly, droids are programmed with, or given, a male or female gender. The majority of droid characters are clearly, and definitely, given a male identity and consistently referred to as 'he.' However, TC-14 certainly seemed to be female, plus the server droid in the diner in Episode II and I'm sure there are more. Is this a part of their programming? Is there a difference between the body of TC-14 and C-3PO for example which makes them have a gender? Could C-3PO be reprogrammed as female, and would this be complicated or more like changing the voice on a sat nav/GPS system? Is it determined by their owner when purchased or first activated? (These questions are to prompt an answer to the overall one - I don't think I'm really asking multiple questions here). | Inspired by question. Are droids in the Star Wars universe referred to with gendered pronouns (i.e. he or she), or are they referred to as objects (i.e. it)? |
Ubuntu.com instructions say to press F12 or F10 or look for a brief message after switching on but none of these are applicable; laptop just goes to Windows. When I try to open Ubuntu from the USB, it wants to know which Windows app to open it with, none of which work. I have also installed something called Rufus under some weird instructions on this same site, but it just opens something called Hex Editor which shows the Ubuntu thingy as a page full of incomprehensible numbers. I've been at this for hours and it's doing my head in - can't even get past go. I'm not a computer geek but I would've thought Ubuntu a tad more user-friendly after reading all the hype. | This question is asked often in Ask Ubuntu, sometimes with few hints about the situation. Please provide a list of possible reasons to help troubleshoot the problem. |
Say i am training a neural network and have 10 samples with 4 variables each and 1 label assigned to each observation. What does it mean to say that the samples are independent and identically distributed? I know what IID variables are. And i have read statements such as "Because we usually assume that our samples are independent and identically distributed, the likelihood over all of our examples decomposes into a product over the likelihoods of individual examples: text omitted". What exactly does it mean for the samples (here 4 variables and 1 class label) to be iid? | I have been facing hard time understanding meaning of "random sample" as well as "iid random variable". I tried to find out the meaning from several sources, but just got more and more confused. I am posting here what I tried and got to know: Degroot's Probability & Statistics says: Random Samples / i.i.d. / Sample Size : Consider a given probability distribution on the real line that can be represented by either a p.f. or a p.d.f. $f$. It is said that $n$ random variables $X_1 , . . . , X_n$ form a random sample from this distribution if these random variables are independent and the marginal p.f. or p.d.f. of each of them is $f$. Such random variables are also said to be independent and identically distributed, abbreviated i.i.d. We refer to the number n of random variables as the sample size. But one of the other statistics book I have says: In a Random Sampling, we guarantee that every individual unit in the population gets an equal chance(probability) of being selected. So, I have a feeling that i.i.d.s are elements that construct random sample, and the procedure to have random sample is random sampling. Am I right? P.S.: I am very confused about this topic, so I will appreciate elaborate reply. Thanks. |
I have a field at a grid containing date/time and I need to know the difference between that and the current date/time. What could be the best way of doing so? The dates are stored like "2011-02-07 15:13:06". | I'm creating an application which lets you define events with a time frame. I want to automatically fill in the end date when the user selects or changes the start date. I can't quite figure out, however, how to get the difference between the two times, and then how to create a new end Date using that difference. |
Say I have an enum defined like so: [Flags] public enum LogLevel { None = 1, Pages = 2, Methods = 4, Exception =8 } and a class like: public static class Log { public static LogLevel Level = LogLevel.Methods | LogLevel.Pages; public static void EnterPage([CallerFilePath]string filePath = "") { if (Level == //What value here to check if Level includes Pages?) { //Log } } What value do I need to equate Level to to check whether the enum includes Pages? | From time to time I see an enum like the following: [Flags] public enum Options { None = 0, Option1 = 1, Option2 = 2, Option3 = 4, Option4 = 8 } I don't understand what exactly the [Flags] attribute does. Anyone have a good explanation or example they could post? |
I have used ModernCV template to write resumes, Beamer to prepare presentations. Likewise, is there any standard Latex template for writing Statement of Purpose (SOP) or Research Proposal? | I am trying, loosely based on to make a template for my Statement of Purpose. How could I remove the empty extra line between the horizontal rule and the text? Moreover, how could be the first letter be of larger font in the title? Any other suggestion is more than welcomed. \documentclass{article} \usepackage[left=1in,right=1in,top=1in,bottom=1in]{geometry} \newcommand{\HRule}{\rule{\linewidth}{0.5mm}} \newcommand{\Hrule}{\rule{\linewidth}{0.3mm}} \makeatletter% since there's an at-sign (@) in the command name \renewcommand{\@maketitle}{ \parindent=0pt% don't indent paragraphs in the title block \begin{center} \MakeUppercase{\Large \bf \@title} \HRule% \end{center}% \textit{\@author \hfill \@date} \par } \makeatother% resets the meaning of the at-sign (@) \title{Statement of Purpose} \author{name} \date{Ph.D. Applicant} \begin{document} \maketitle% prints the title block Emergency medicine has always been a passion of mine\ldots \end{document} |
I have object's API Name How can I get Object's Label ? I am trying this Map<String, Schema.SObjectType> schemaMap = Schema.getGlobalDescribe(); Schema.SObjectType schemaObj = schemaMap.get(SObjApiName); | Im working in a site, And I need to present many fields to be filled and the page, so accoding to a selecction before, I have all the field but I have the Api Name, and the object name, but, With this api object field name, how can I get the label???? Example. I have "Student__c", I need to present "Student" to the user. Thanks a lot for ur help! Ok, thanks for ur answuers but I think I did not explain well this situation. I have a list of string, where I have the information but in Api's name. I present this fields in a table, so the user is filling the fields but with an inputText and not with an inputfield!.. So, in this moment, I dont know what is the label of each field. My question basically, if by means of a query I could know the label of a field, if I know the api field name and the object name.. My question is if there is a way to consult this info!... I know if I have the object is enough using an inputfield, But I cant do that. Neither set the label with HTML directly 'cause this is something dynamic. Anyone knows how can I know, or consult, I guess by means of a query, how to get this label names??? |
Since most lower voltage zener diodes operate at 5ma and require a resistor to provide it, what happens when you add a small resistance load across the zener and there is no longer 5ma for the zener to keep the voltage regulated ? In other words, how can it work as a regulator for a low resistance load ? How would you do this ? Thank you. | I wonder why a Zener diode is worse than linear voltage regulator. Some of the posts online mentioned that because of the power dissipating problem. Zener diodes keep consuming a large amount of current while the load may just need a very little amount of current. If I understand correctly, this phenomenon will happen only when the Zener diode is connected with the load in parallel. What if I connected my Zener diode with my load in series? Also, someone said that linear voltage regulators (e.g. LM7805) are not good voltage regulators as the power dissipated in them is much higher than that in switching voltage regulators. In my understanding, the power dissipated in a linear voltage regulator can be calculated by dropout voltage x current = power converted to heat. Regarding these 2 points, other than a linear voltage regulator can handler a wider current range, what is the benefit of choosing a linear voltage regulator over a Zener diode? |
Recently I installed Ubuntu next to Windows 10 and when I try to connect it to wifi it says "wifi adapter not found". For every solution I've seen it says I need ethernet (I'm using USB ethernet through my phone, I don't know if that is a problem). I have secure boot disabled and when I go to Additional Drivers it says that there are no additional drivers found. If I enter the command lspci -knn | grep Net -A3; rfkill list I get 03:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8821CE 802.11ac PCIe Wireless Network Adapter [10ec:c821] Subsystem: Hewlett-Packard Company RTL8821CE 802.11ac PCIe Wireless Network Adapter [103c:831a] 0: hci0: Bluetooth Soft blocked: no Hard blocked: no | I'm trying to install drivers for my Wifi on my HP All-in-one desktop. I've been told to show the output of the command "sudo lshw -C network" so here it is: *-network description: Ethernet interface product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller vendor: Realtek Semiconductor Co., Ltd physical id: 0 bus info: pci@0000:01:00.0 logical name: enp1s0 version: 15 serial: 48:ba:4e:5c:06:5f size: 100Mbit/s capacity: 1Gbit/s width: 64 bits clock: 33MHz capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl8168h-2_0.0.2 02/26/15 ip=192.168.1.21 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s resources: ire:31 import:e000(size=256) memory: fea04000-fea04fff memory:fea00000-fea03fff *-network UNCLAIMED description: Network controller product: Realtek Semiconductor Co., Ltd. vendor: Realtek Semiconductor Co., Ltd. physical id: 0 bus info: pci@0000:02:00.0 version: 00 width: 64 bits clock: 33MHz capabilities: pm msi pciexpress cap_list configuration: latency=0 resources: import:d000(size=256) memory:fe900000-fe90ffff Output from "lspci -nnk | grep -A2 0280": 02:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8821CE 802.11ac PCIe Wireless Network Adapter [10ec:c821] Subsystem: Hewlett-Packard Company RTL8821CE 802.11ac PCIe Wireless Network Adapter [103c:831a] 03:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5229 PCI Express Card Reader [10ec:5229] (rev 01) |
When talking with a mathematics teacher the other day, we discussed these axioms in the context of proving tautologies with semantic tableaux: $(p\to(q\to p))$ $((p\to(q\to r))\to((p\to q)\to(p\to r)))$ $((\lnot p\to\lnot q)\to(q\to p))$ We wondered if it was possible to show that $\neg(\neg A) \rightarrow A$ from these axioms (along with MP), but it did not seem obvious how to do so and yet this fact is not included as an axiom. Is it provable from the axioms or is this fact simply unprovable in this version of PL? | I'm very new to classical propositional logic, and my lecturer is using a system with the following axioms: A1. X→(Y→X) A2. (X→(Y→Z))→((X→Y)→(X→Z)) A3. (¬Y→¬X)→(X→Y) Use uniform substitution and Modes Ponens (MP) as rule of inference. Deduction Theorem also allowed. I'd like to deduce the following: (a) X, Y ⊢ ¬(X→(¬Y)) (conjunction, but expressed in terms of NOT and IMPLIES) (b) X→((X→Y)→Y) (c) (X→Y)→(((¬Y)→X)→Y) (d) (((¬Y)→X)→Y)→(X→Y) Remark: The last two are to show that the axiom (A3) can be replaced with a different axiom: B3. (¬Y→¬X)→(((¬Y)→X)→Y). Solution: Bram28 proves (b) and (c) below. I demonstrate (a) and (d). (d) is alright; first, I claim that X, ((¬Y→X)→Y) ⊢ Y. Axiom (A1) gives ⊢X→(¬Y→X) so that ((¬Y→X)→Y)⊢X→Y by Hypothetical Syllogism (HS), which Bram28 shows to be valid. Now that we have ((¬Y→X)→Y)⊢X→Y just apply the deduction theorem to get what we want: ⊢((¬Y→X)→Y)→(X→Y). (a) is slightly trickier. Axiom (A1) gives ⊢ Y→(X→Y) so that X, Y ⊢ (X→Y). Next, by part (b), we have as a theorem that ⊢X→((X→¬Y)→¬Y). Therefore X, Y ⊢(X→¬Y)→¬Y. But ⊢(¬¬(X→¬Y))→(X→¬Y) by DN Elim, which Bram28 shows to be valid. By HS, X, Y ⊢(¬¬(X→¬Y))→¬Y. By Axiom (A3) and MP, X, Y ⊢(Y→¬(X→¬Y)). Also, rather trivially X, Y ⊢Y. Finally by MP we conclude X, Y ⊢¬(X→¬Y) as required. |
QUESTION EDITED: I have 10 different patients, who have undergone heart procedures and we have collected some measurements of cardiac electrical activity from the same region of all ten hearts. Due to a number of reasons, the data collected from each region comprises a different number of points/measurements. This has been analysed by proprietary software and we have been given only three values for each patient. The mean (electrical conduction velocity in cm/sec), the SD and the number of points that were used by the software to calculate this mean/SD (n) for each patient. Mean SD n I have NOT been provided with the individual values associated with each point for each patient, only the those three numbers. The number of points for each patient varies quite a bit - some are 47, some are 17 so as an example, the first two patients have the following: Patient 1 Mean = 2.5cm/s SD = 0.8 n = 47 Patient 2 Mean = 3.5cm/s SD = 1.5 n = 17 and so on for all 10 patients Is there a way I can find (a) MEAN of the MEANS and (b)appropriate SD for the mean of the means WITHOUT needing the individual values of each point? I think I understand how to find a weighted mean: Multiple each mean by n of that patient/cumulative n of all 10 patients and then add them all together (as in this example ) That should (I think) provide me with an overall mean of the conduction velocity of this region of the heart from these 10 patients. But how do I then calculate the SD of this mean of means for when we want to present this data in a medical journal? I would imagine it wouldn't work exactly the same way as a weighted mean? | I'm calculating the covariance of a distribution in parallel and I need to combine the distributed results into on singular Gaussian. How do I combine the two? Linearly interpolating between the two almost works, if they are similarly distributed and sized. provides a forumla at the bottom for combination but it doesn't seem right; two identically distributed distributions should have the same covariance, but the formula at the bottom of the page doubles the covariance. Is there a way to combine two matrices? |
This is part of a homework problem. I think I've got it right, but it isn't fitting into the next step, so wanted to check this one. Question: What is $E(e^{rX^2})$ when $X$ is $N(0,\sigma^2)$? My answer: $E(e^{rX^2})=\int_{-\infty}^{\infty}{\frac{1}{\sqrt{2\pi\sigma^2}}e^{-\frac{1}{2}\frac{x^2}{\sigma^2}}}e^{rx^2}dx=\frac{1}{\sqrt{2\pi\sigma^2}}\int_{-\infty}^{\infty}{e^{-x^2(\frac{1}{2\sigma^2}-r)}}dx$ The term inside the integral is just the main part of the formula for a cdf for a normal distribution with standard deviation $\gamma$ where $\frac{1}{2\gamma^2}=\frac{1}{2\sigma^2}-r=\frac{1-2r\sigma^2}{2\sigma^2}$ so it has area $\frac{\sqrt{2\pi\sigma^2}}{\sqrt{1-2r\sigma^2}}$ So, overall: $E(e^{rX^2})=\frac{1}{\sqrt{2\pi\sigma^2}}\frac{\sqrt{2\pi\sigma^2}}{\sqrt{1-2r\sigma^2}}=\frac{1}{\sqrt{1-2r\sigma^2}}$ Is this right? | Given a known Gaussian distribution, $X \sim \mathcal N(\mu_x, \sigma_x^2)$, how does one determine the the distribution of $Y$ if $Y = X^2$? |
I have a simple two class program in java and the main class doesont want to create an object of the nameProcessor class I tried everything I know but I am still a dumb begginer public class Main { public static void Main() { // initialise instance variables String name="Andy"; System.out.println("That name is "+name.length()+" letters long"); System.out.println("The first letter is "+name.substring(0,1)); nameProcessor np1 = new nameProcessor(name); if (np1.nameChecker()==false) System.out.println("That is a nice name."); else System.out.println("That is a wierd name."); } } public class nameProcessor { private String userName; private String letters; private String letter; private boolean give; public nameProcessor(String name) { // initialise instance variables String userName=name; String letters="XYZWxyzw"; String letter=""; boolean give=false; } public boolean nameChecker() { give=false; for(int i=0;i<userName.length();i++){ letter=letters.substring(i,i+1); if (userName.indexOf(letter)!=-1){ give=true; } } return give; } } //Some correct outputs would be //Andy->That is a nice name //XXX->that is a wierd name //just any string containing XYZWxyzw should return true | 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? |
When I try to open Google Chrome, I get this: [2922:2958:0913/051621.681319:FATAL:nss_util.cc(632)] NSS_versionCheck("3.26") failed. NSS >= 3.26 is required. Please upgrade to the latest NSS Aborted (core dumped) What should I do? | I upgraded to Chrome 61.0.3163 via ppa on Ubuntu 16.04 but it won't launch because NSS out of date. Launching Chrome in terminal gives: NSS >= 3.26 is required. Please upgrade to the latest NSS, and if you still get this error, contact your distribution maintainer. Running sudo apt-get install libnss3 gives libnss3 is already the newest version (2:3.21-1ubuntu4) Should I try to get a newer version of libnss that's not in the repository? I downgraded my version of Chrome for now. Edit: apt-cache policy libnss3 libnss3: Installed: 2:3.21-1ubuntu4 Candidate: 2:3.21-1ubuntu4 Version table: *** 2:3.21-1ubuntu4 500 500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages 100 /var/lib/dpkg/status cat /etc/apt/sources.list # deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to # newer versions of the distribution. deb http://us.archive.ubuntu.com/ubuntu/ xenial main restricted # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main restricted ## Major bug fix updates produced after the final release of the ## distribution. # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team, and may not be under a free licence. Please satisfy yourself as to ## your rights to use the software. Also, please note that software in ## universe WILL NOT receive any review or updates from the Ubuntu security ## team. deb http://us.archive.ubuntu.com/ubuntu/ xenial universe # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial universe # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates universe ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team, and may not be under a free licence. Please satisfy yourself as to ## your rights to use the software. Also, please note that software in ## multiverse WILL NOT receive any review or updates from the Ubuntu ## security team. deb http://us.archive.ubuntu.com/ubuntu/ xenial multiverse # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial multiverse # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse ## N.B. software from this repository may not have been tested as ## extensively as that contained in the main release, although it includes ## newer versions of some applications which may provide useful features. ## Also, please note that software in backports WILL NOT receive any review ## or updates from the Ubuntu security team. # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse ## Uncomment the following two lines to add software from Canonical's ## 'partner' repository. ## This software is not part of Ubuntu, but is offered by Canonical and the ## respective vendors as a service to Ubuntu users. deb http://archive.canonical.com/ubuntu xenial partner deb-src http://archive.canonical.com/ubuntu xenial partner # deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted # deb-src http://security.ubuntu.com/ubuntu xenial-security universe # deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse |
Does trample ability have any effect during a fight between two creatures out of combat? I'll explain better. When any card or effect allows two creatures to fight each other - for example, when a is summoned by paying its kicker cost - it is good to clarify how the various creatures' abilities still have an effect. The question is this: -"Does trample ability have any effect during or after a fight between two creatures out of combat?". I give an example. If two creatures are invited to fight each other, let's say a and a , after the fight ended normally with the Mammoth's victory, the fact that there are two points left that the Mammoth could deal with the trample ability, does it have any relevance in a case like this? That is,following the same example: does the Mammoth's controller have the chance of dealing them to the opponent? | The text for says: {1}{G}, {T} : Target creature you control fights another target creature. (Each deals damage equal to its power to the other.) Does this have anything to do with combat? Or is it just direct damage between two creatures? For example, can one of the creatures have defender? Or what if one of them is tapped? I've been assuming it is more like the damage dealt by a . Also: are the two creatures then “tapped” until their next untap step? ie: could you use Ulenvald Tracker to make two creatures fight in your pre-combat step, then enter the combat phase with a creature who just “fought” untapped? Could you make two creatures fight who are both tapped? |
I am running this with the IP address of the same machine: $ nmap -p0-65535 192.168.1.198 Starting Nmap 7.60 ( https://nmap.org ) at 2019-03-20 10:13 EDT Nmap scan report for olive.fios-router.home (192.168.1.198) Host is up (0.00049s latency). Not shown: 65526 closed ports PORT STATE SERVICE 22/tcp open ssh 111/tcp open rpcbind 139/tcp open netbios-ssn 445/tcp open microsoft-ds 2049/tcp open nfs 5900/tcp filtered vnc 41441/tcp open unknown 43877/tcp open unknown 44847/tcp open unknown 55309/tcp open unknown Does "open" mean "listening"? Why can't the following lsof report some open port's information? Thanks. $ sudo lsof -i :2049 $ sudo lsof -i tcp:2049 $ | I have a process which listen to 2 ports : 45136/tcp and 37208/udp (actually I assume it is the same process). But netstat doesn't return any pid : netstat -antlp | grep 45136 tcp 0 0 0.0.0.0:45136 0.0.0.0:* LISTEN - Same result with "grep 37208". I tried lsof too : lsof -i TCP:45136 But it doesn't return anything. It's a new installation of squeeze and I really don't know what could be this process. Any idea ? ANSWER Thanks to your comments I found out what it was. I deinstalled nfs-server nfs-common (after a dkpg --get-selections | grep nfs search) and the unknown process disapeared. Strange though that kernel processes aren't marked in any way. Thanks again to both of you. ;) |
I am currently considering a sum $$\sum_{r=0}^{n}{\binom{n}{r} (-1)^{r} (1-\frac{r}{n})^{n}}$$ but have no thoughtful ideas how to start. Maybe it's worth noticing that $$\sum_{r=0}^{n}{\binom{n}{n-r}(-1)^{r}(1-\frac{r}{n})^{n}} = \sum_{r=0}^{n}{\binom{n}{r} (-1)^{r} (1-\frac{r}{n})^{n}}$$ and apply to the first one the convolution rule, but this doesn't seem productive enough. Are there any hints that might help? Would be grateful to recieve any. | The successive difference of powers of integers leads to factorial of that power. Here's the formula: $$\sum_{r=0}^{n}\binom{n}{r}(-1)^r(n-r)^n=n!$$ Can anyone give a proof of this result? Note: The original question was to prove the more general $$\sum_{r=0}^{n}\binom{n}{r}(-1)^r(l-r)^n=n!$$ for an integer $l$, which some of the answers address. |
I have a newly reformatted PC and I just finished installing all the programs, drivers and hardware applications (like samsung magician, Logitech gaming software, etc) that I needed. I work with 2 monitors and tons of windows opened (I'm programming) Now one strange behavior that I'm getting annoyed is sometimes, the window focus randomly changes. I'm not sure what program has been doing this and I don't want to uninstall programs 1 by 1 to catch the offending program (since this was not happening on the previous OS installation given the same programs and startup, the only difference is everything is updated in the new OS format). I haven't timed it yet, but it happens approx once every 20min Same thing happens to games, randomly going out of full-screen. (I know samsung magician has this behavior before, but I tried to remove it on startup and games still randomly goes out of full-screen) I would like to know if there's an elegant solution to catch what program/driver/hardware application is doing this because it's getting annoying. I'm using windows 8.1 fully updated, I formatted my pc to upgrade from win 8.1 also (but probably around 1 year behind on updates) since I usually reformat a windows OS every 1.5 years. | A background process/program steals focus from my currently active application. It disturbs me a lot when I type in an app or control an app using keyboard or play online flash games in full-screen. I want to remove this program from my PC, but I'm unable to detect it. I've analyzed all processes & scanned for viruses. All things are right from this side. I don't want to change focus behavior using registry tweak. Please, help me detecting that app.. |
How to show that $3^x+4^x=5^x$ has only one solution? Thanks in advice. | I would like to prove that the equation $ 3^x+4^x=5^x $ has only one real solution ($x=2$) I tried to study the function $ f(x)=5^x-4^x-3^x $ (in order to use the intermediate value theorem) but I am not able to find the sign of $ f'(x)= \ln(5)\times5^x-\ln(4)\times4^x-\ln(3)\times3^x $ and I can't see any other method to solve this exercise... |
$f:\mathbb R\rightarrow \mathbb R$ has both a left limit and a right limit at each point of $\mathbb R.$ Then the number of discontinuities of $f$ is what $?$ Now the Greatest Integer Function is one such function and has countable infinite discontinuities. Any continuous function also has both limits at each point and they are same and number of discontinuity is $0.$ So , is there a function with both limits at each point that has number of discontinuities uncountable $?$ Is that possible $?$ | I know that Dirichlet function has uncountable many discontinuities. I think they are removable, because the discontinuities can be removed by redefining the function values of the rational numbers as 0. So Dirichlet function is a function that has uncountable many removable discontinuities, then my question is can we construct a function with uncountable many jump discontinuities? If not, how do we prove it is impossible? Thank you. An odd but similar question is can we have a function that has uncountable many infinite discontinuities? |
When I touch with my bare finger the oscilloscope probe I get a perfect sine ac wave 155V peak to peak!. This is my first oscilloscope and I don't know if this is a normal glitch. Do I have a faulty one? | it once happened that when I touched the positive terminal of the Oscilloscope input probes letting its negative terminal open, I observed sinusoidal voltage signals with 0.5V peak to peak and of frequency nearly 50Hz. I don't understand the exact cause for these signals. When I touched the other, negative terminal output signal reached zero with a very little noise...(with the positive terminal connected to the body..) Is it because the power lines near the place I observed these are 50Hz and those induced a potential difference across me with respect to the supply ground which is also the ground of Oscilloscope... or something else.. When I touched a wire or a resistor with positive terminal of Oscilloscope.. there was no change in the Output.. Its because the equivalent model of our body includes capacitance and inductance with resistance.. If so then actually how we are being induced with such voltage signal..? Actually the discontinuity in signal is because of the difference between the frequency of actual signal and sampling frequency of my camera. |
I want to create a math operator that is an integral with a square (\square) stack onto it such that the integral is still formated the way that the operator \int is. How do I do this? | Good Afternoon all, I am trying to typeset a symbol that I have been using to represent the integral of a regulated function. This symbol is the standard integral symbol, with the letter "R" superimposed on it. I have tried using \mathllap, \mathclap and \mathrlap (as suggested ), however none of these have managed to give the desired effect. When I tried doing it without the limits of integration, it got close to working, however then I was unable to have the limits to the right hand side of the symbol: \mathop{\mathrlap{\int}R}_a^b f Any help would be greatly appreciated, thank you in advance! Minimal Example: \documentclass{article} \usepackage{amsmath,mathtools} \begin{document} Take the regulated function $f$, we want to compare the Riemann integral, $\int_a^b f$ to the regulated integral $\mathop{\mathrlap{\int}R}_a^b f$ by taking sequences of step functions. We will prove that $$ \mathop{\mathrlap{\int}R}_a^b f = \int_a^b f $$ \end{document} |
In the model, I test the influence of promotional display d and product category categ on demand lnunits. d and categ are both categorical with 3 and 8 values, respectively. The interaction terms are quite hard to interpret because I keep hearing mixed opinions. One of the struggles is to understand what is the reference point for those interactions. Please keep in mind that I have other variables in my model like price and coupon. Here is the Stata output. Many thanks. ------------------------------------------------------------------------------ lnunits | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- d_1 | .538603 .0131227 41.04 0.000 .512883 .5643231 d_2 | .5951712 .018547 32.09 0.000 .5588198 .6315227 categ_2 | .2278076 .0028202 80.78 0.000 .2222801 .2333351 categ_3 | .1023514 .0032537 31.46 0.000 .0959742 .1087285 categ_4 | .1399831 .0037105 37.73 0.000 .1327107 .1472555 categ_5 | .1444258 .0034629 41.71 0.000 .1376388 .1512129 categ_6 | .160837 .0069592 23.11 0.000 .1471972 .1744768 categ_7 | -.0247559 .0048092 -5.15 0.000 -.0341817 -.0153302 categ_8 | -.0537664 .0053687 -10.01 0.000 -.0642889 -.0432439 d_1*categ_2 | -.0192817 .0140681 -1.37 0.170 -.0468547 .0082912 d_1*categ_3 | -.1128736 .0149039 -7.57 0.000 -.1420847 -.0836624 d_1*categ_4 | -.1781499 .0144119 -12.36 0.000 -.2063967 -.1499031 d_1*categ_5 | -.0292207 .014499 -2.02 0.044 -.0576382 -.0008032 d_1*categ_6 | -.3774382 .0322873 -11.69 0.000 -.44072 -.3141563 d_1*categ_7 | -.4808987 .0447347 -10.75 0.000 -.5685771 -.3932202 d_1*categ_8 | -.3655917 .0294069 -12.43 0.000 -.4232283 -.3079551 d_2*categ_2 | -.0491836 .019872 -2.48 0.013 -.088132 -.0102353 d_2*categ_3 | -.1950968 .0215043 -9.07 0.000 -.2372445 -.152949 d_2*categ_4 | -.2917762 .0201624 -14.47 0.000 -.3312938 -.2522586 d_2*categ_5 | -.0425442 .0208411 -2.04 0.041 -.083392 -.0016964 d_2*categ_6 | -.4628832 .0433818 -10.67 0.000 -.5479099 -.3778565 d_2*categ_7 | -.582086 .0540387 -10.77 0.000 -.688 -.4761721 d_2*categ_8 | -.424297 .0363369 -11.68 0.000 -.4955161 -.353078 _cons | 1.923285 .008153 235.90 0.000 1.907306 1.939265 -- Can you please help me with interpreting, say, d_1*categ_2 | -.0192817 .0140681 -1.37 0.170 -.0468547 .0082912 Is the effect being measured with respect to d_0*categ_1 or d_0*categ_2 or d_1*categ_1 ? | I have two two-level categorical variables, IV1 and IV2. I want to fit a linear model in R and find out the simple effect of IV1 on the DV at each level of IV2, separately. I'm not interested in the overall effect of IV1. Is it correct to sum-code IV1, dummy-code IV2, and fit this model: lm(DV ~ IV1 * IV2, data=dat) Then interpret the main effect of IV1 as the effect of IV1 on DV at the reference level of IV2. |
The function sequence $f_n=nx^{n-1}$ tends to zero for all $x \in [0,1)$. Why is the above limit not equal to $0$? Can you show it with Lebesgue's convergence theorems? | Let $s_n$ be a sequence defined as given below for $n \geq 1$. Then find out $\lim\limits_{n \to \infty} s_n$. \begin{align} s_n = \int\limits_0^1 \frac{nx^{n-1}}{1+x} dx \end{align} I have written a solution of my own, but I would like to know it is completely correct, and also I would like if people post more alternative solutions. |
I saw the following sentence: Sally, who I saw in town yesterday, is a friend of my sister. But I think it should use whom instead of who, since Sally is the guy I saw, so why not use whom? | I can never figure out whether I should use who and whom. Most people use who for both colloquially, but some people say this is not correct. What’s the rule for using who and whom correctly? |
Could anyone recommend introductory books on Green's functions with applications in the framework of classical electrodynamics? | For a physics major, what are the best books/references on Greens functions for self-studying? My mathematical background is on the level of Mathematical Methods in the physical sciences by Mary Boas. |
I'm trying to create a nature scene with some plants which require alpha-masked images for the leaves. But whenever I UV unwrap them, the objects get coloured pink. | I made a character, and its one of my first times texturing, and I saved my character into a new folder, and when I came back to the model ALL the textures were pink, I used to know what to do, but I stopped texturing, how do I bring my textures back? |
Via the webpage, to activate this package, I need to click on the button "Available on Chrome". I would like to install/active this package via the terminal command line. How can I do so? | I want to install chrome extensions in chrome browser through Terminal instead of doing in GUI. Is there any way to install the extensions from Terminal? |
How I can invest in Stack Exchange Inc. and in the idea behind the Stack Exchange? Maybe in form of shares? | Joel Spolsky has just posted where he talks about seeking venture capital for Stack Overflow. If instead they opted to seek shareholders from the StackOverflow community along the lines of the , but at a larger scale, would you be interested? I'm asking this because I suspect there might be enough fanatics willing to invest $500 or so in a product they love to raise a considerable sum. People also often talk about the motivation for high rep users. It seems to me having an actual stake in the product might be a decent incentive (especially if you also get a gold badge for buying shares). |
I have A Pentium Dual Core 2.50 Ghz and having 2GB DDR2 ram and 512 MB Nvidia 8 Series graphic card. Will Ubuntu 13.04 run on my system faster than Windows 7. Would I be able to run 64 Ubuntu on my PC? | The Ubuntu 13.04 32-bit desktop system requirements. What are they? |
In fact I want to have a two columns nomenclature in order, but when I write them in order in the result they are not in the order, I have already read the nomencl package : sort by order of appearance, and I have applied the same structure but the problem remains the same. even when I use \nomencalure[order]{symbol}{meaning}. Here is the code: \immediate\write18{makeindex \jobname.nlo -s nomencl.ist -o \jobname.nls} \documentclass[preprint,12pt,3p,numbers,sort,compress]{elsarticle} \usepackage{multicol} \usepackage{framed} \usepackage{nomencl} \makenomenclature \setlength{\nomitemsep}{-\parskip} \begin{document} \section{Introduction} \label{sec1} BLABLABLABLABLABALABABLABLABLABLAB\par LABALABABLABLABLABLABLABALABABLABLAB\par LABLABLABALABABLABLABLABLABLABALABA \begin{framed} \nomenclature[01]{$x_{1}$}{parameter1} \nomenclature[02]{$x_{2}$}{parameter2} \nomenclature[03]{$x_{3}$}{parameter3} \nomenclature[04]{$x_{4}$}{parameter4} \nomenclature[05]{$x_{5}$}{parameter5} \nomenclature[06]{$x_{6}$}{parameter6} \nomenclature[07]{$x_{7}$}{parameter7} \nomenclature[08]{$x_{8}$}{parameter8} \nomenclature[09]{$x_{9}$}{parameter9} \nomenclature[10]{$x_{10}$}{parameter10} \nomenclature[11]{$\delta$}{parameter11} \nomenclature[12]{$\theta$}{parameter12} \nomenclature[13]{$\omega$}{parameter13} \begin{multicols}{2} \printnomenclature[1.9cm] \end{multicols} \end{framed} \end{document} | In the nomencl package, how can I make the symbols print by order of appearance in the LaTeX code? |
If, in local system, an accelerated system is completely physically equivalent to a system inside a gravitational field. Acceleration results in an increase in speed. Right? What happens when the accelerated "elevator" accelerates to the point where its speed hits (or exceeds?) the speed of light? Does it stop at the speed of light? Is that a possible way to distinguish between the two different forces? Or does something else happen? | I don't have a lot of knowledge of special relativity and associated topics; some of the few things I know are that "all motion is relative" (that is, there is no 'stationary reference frame'), and the speed of light in vacuum ($c \simeq 3 \cdot 10^8~\mathrm{m~s^{-1}}$) is the absolute asymptotic speed limit (asymptotic meaning that you can never equal it, only get arbitrarily close). What escapes me is how those concepts work together - to my naive understanding, an object would never move in its own reference frame (and so would never reach $c$). What reference frame is $c$ measured against? (Is it measured against a reference frame?) Or am I looking at this the wrong way? |
My Code (Javascript): var num = 0; function change(){ var num = 10; } change(); document.write(num); The result should be 10 but it is showing 0. Why? If the code is wrong, what is the correct way to do this? | What is the scope of variables in javascript? Do they have the same scope inside as opposed to outside a function? Or does it even matter? Also, where are the variables stored if they are defined globally? |
The Error is that: String which doesn't == withdraw, whatever i put, it will just say, deposit. i want to be able to use both (withdraw) & (Deposit). import java.util.Scanner; public class BasicClasses { public static void main(String[] args) { System.out.println("Welcome to First National Bank (FNB)"); Scanner Key = new Scanner(System.in); String Question = Key.nextLine(); BasicClasses flix = new BasicClasses(); System.out.print(" | Withdraw | or | Deposit | [ "); Scanner Key1 = new Scanner(System.in); String Which = Key.nextLine(); if(Which == "withdraw") { System.out.println("|Withdraw| - | How much do you Want to Withdraw?"); } else { System.out.println("|Deposit| - | How much will you be Depositing?"); } } } | 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 minimized my terminal after doing a repo sync. I cant find it on any desktop now! Please help. | I just installed 11.10 and found that once I minimize the terminal window, I can't bring it back. All other Windows are getting minimized to the Unity launcher and I can relaunch them from there. If I go to the launcher and click on terminal a new terminal session is created and the old one is lost completely. This is the first time I am facing such a problem and all my previous installations of 11. 10 didn't throw up any such behaviors. Any suggestions? |
I hope the picture is clear enough, I've found a worm like insect like the one below a little while ago in my shower, and today I found another one. I've never seen something like this. I would say it is slightly bigger than a centimeter. Location: Netherlands Why do they come in my shower ? | I am in Portugal (Lisbon) at the moment, and when leaving my room late at night (12 pm ~ 04 am) I usually face about 4 of these arthropods in the corridors: (For reference, the "line" in the image is a standard separation on the floor. This particular example of the animal is a little smaller than a nail.) They seem to have quite variable sizes and walk primarily on ground. Also, as implicit above, they seem to be active primarily during the late night. (I don't see them much often, if at all, during the morning/afternoon.) They can be quite fast, but if left unharmed do not move much. They also appear to take shelter inside the walls. From what I searched, it seems possible that they are centipedes. I've seen sites saying that they are useful to keep other less pleasant animals at bay. My questions are: What are those animals, and should I leave them be or not? |
I have some problems with aligning text to the center: .list { width: 100%; height: 100%; } .row { vertical-align: middle; width: 100%; height: 30px; text-align: center; } .name { display: block; float: left; width: 30%; } .message { display: block; float: left; width: 70%; } <div class="list"> <div class="row"> <div class="name">Ben</div> <div class="message">Hello world</div> </div> <div class="row"> <div class="name">Tom</div> <div class="message">Hello world</div> </div> <div class="row"> <div class="name">NoName</div> <div class="message">Hello world</div> </div> What I would like to achieve is to get list of names and messages, where each name and message are in one row. But currently, where I am trying to align text in row it doesn't work. Any ideas? | I have a div with two images and an h1. All of them need to be vertically aligned within the div, next to each other. One of the images needs to be absolute positioned within the div. What is the CSS needed for this to work on all common browsers? <div id="header"> <img src=".." ></img> <h1>testing...</h1> <img src="..."></img> </div> |
How could dictionaries whose values are lists be merged in Python, so that all of the keys are moved into one dictionary, and all the elements of each list moved into a single list for each key? For example, with these dictionaries: x = {'a': [2], 'b': [2]} y = {'b': [11], 'c': [11]} ... the result of the merging should be like this: {'a': [2], 'b': [2, 11], 'c': [11]} How could this be done with any number of dictionaries, not just two? | I have two Python dictionaries, and I want to write a single expression that returns these two dictionaries, merged (i.e. taking the union). The update() method would be what I need, if it returned its result instead of modifying a dictionary in-place. >>> x = {'a': 1, 'b': 2} >>> y = {'b': 10, 'c': 11} >>> z = x.update(y) >>> print(z) None >>> x {'a': 1, 'b': 10, 'c': 11} How can I get that final merged dictionary in z, not x? (To be extra-clear, the last-one-wins conflict-handling of dict.update() is what I'm looking for as well.) |
I am trying to make this simple function: private void getID(){ for(int i=0;i<crops.size();i++){ ID.add(i); } } where cropps.size() is the size of a bitmaparraylist which i've made. People told me that these function fail because you can get the argument null. But how can i get null if i don't fill in any arguments... I've also tried to make the input of the function an Arraylist of integers but this failed as wel. On my Oncreate method i use getID() after i made the crops so that isn't the error as well. So i'm kind of confused here and help would be much appreciated. Kees | 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? |