body1
stringlengths 20
4.1k
| body2
stringlengths 23
4.09k
|
---|---|
How to print values in console (like System.out.println() in java) using scriplet in javascript while a function is called ? if i used System.out.println("test") in scriplet the values is getting printed while a jsp form is loading but i want it to print only when a java script is called. | Im running a ASP.NET Site where I have problems to find some JavaScript Errors just with manual testing. Is there a possibility to catch all JavaScript Errors on the Clientside and log them on the Server i.e. in the EventLog (via Webservice or something like that)? |
I tried this: for(i = 0; i < 5; i++){ for(j = i + 1; j < 5; j++){ break(2); } alert(1); } only to get: SyntaxError: missing ; before statement So, how would I break a nested loop in JavaScript? | What's the best way to break from nested loops in Javascript? //Write the links to the page. for (var x = 0; x < Args.length; x++) { for (var Heading in Navigation.Headings) { for (var Item in Navigation.Headings[Heading]) { if (Args[x] == Navigation.Headings[Heading][Item].Name) { document.write("<a href=\"" + Navigation.Headings[Heading][Item].URL + "\">" + Navigation.Headings[Heading][Item].Name + "</a> : "); break; // <---HERE, I need to break out of two loops. } } } } |
Hi Is Google Cloud Mumbai (Asia-South1) facing issues due to COVID situation in Mumbai ? I am unable to create a new Compute Instance or start my old instance in all of the zones in Asia-South1 Mumbai region for over a month now in Zone A,B or C. I keep getting "Not Enough Resources available in this Zone". I am trying to create a 8GB RAM - 4 VCPU on E2 Platform instance with Cent OS 7 & 20GB SSD Disk space. I have waited for almost one month now and still no resolution of this issue. If this doesn't resolve soon it will cause a huge problem for my company from our clients. Kindly help please ! | This is a about a temporary shortage of available resources in Google Cloud services. I'm a Brazilian user of Google Cloud's Compute Engine for a while and I managed to use it fine for quite some months. Unfortunately, in the last one month or so, I've been facing difficulties starting my instances (around 9 AM) due to the problem "the zone does not have enough resources available to fulfill the request". At the start, it happened once or twice and then I was able to start my instance. But now it's almost impossible to start it even after dozens of attempts! Following the message's suggestion, I tried to create other instances in southamerica-east1-a nd c (mine was in b) only to find out the same problem happening there. The impression I get from this is that Google has saturated their physical capacities in South America and are doing nothing to increase it. So what can I do about it? I can't move my server to the USA or something because it's ping sensitive (stock market applications) and, as someone still using the free trial period, I certainly won't start paying for GC if Google may handle me a product I can't use and will take weeks or months to fix. |
Imagine that we could weigh antimatter on a scale. Would it have a negative or positive weight. EDIT: I see a similar question, but it dates from 2014. It mentions some experiments to be carried out. Any conclusive stuff? | I know that the gravitational interaction of antimatter is expected to be the same as normal matter. But my question is, has it ever been experimentally validated? I think it would not be a trivial experiment, because electromagnetic effects have to be eliminated, so neutral particles would be needed. Maybe diamagnetically trapped antihidrogen atoms could be examined as to which direction they fall? |
I have updated my wallpaper recently and now when I restart my computer or logout, my old wallpaper still shows (blurred, obviously) on the login screen. When I login, my new wallpaper is there. Is there a way to fix this? Unfortunately this possible duplicate does not address my issue: This is not after updating to Mojave OS. I have not updated to it. So I do not have a "Mojave.heic" | I just updated to macOS Mojave, and immediately noticed a couple of things: My custom login screen wallpaper is gone. When you click on a user's name in the login screen, it switches to their personal background (their usual wallpaper for the first space on the primary monitor). I assumed it had just overwritten my cached image file. But when I went to replace it, nothing happened. It turns out that com.apple.desktop.admin.png is gone entirely! Right after taking that screenshot, I decided to poke into Desktop Pictures and found my personal login screen background, which looks promising. It contains one other folder, which Β probablyΒ (edit:Β confirmed) contains the login screen background of my administrator account. |
Is there a list of packages that are installed on a fresh install? I know, there is the other question But that doesn't show, what will be the output of dpkg --get-selections | grep -v deinstall | cut -f 1 right after a fresh install of Ubuntu desktop? I would like to compare the resulting remaining list with the packages I have installed at the moment, so I can find out, what changed on the system since install. | I am developing an offline installer for all versions of Ubuntu, and I need Ubuntu's default installed packages list. Is there a way to get this information from any server (web server)? Any script to fetch any Ubuntu version's default installed packages list. I will give the Ubuntu version, and the script will fetch the packages list. Note: I need at least a server address. I can write a script for this. |
Consider the following function: $f(x_1, \dots, x_n) = p_1 \log x_1 + \dots + p_n\log x_n$ subject to the constraint that $\sum_i p_i = \sum_i x_i = 1$. It is also known that $p_i \in [0,1]$ and $x_i \in [0,1]$. I need to prove formally that the function has global maximum when $\frac{p_1}{x_1} = \dots = \frac{p_n}{x_n}$, i.e, $x_i = p_i$ gives the global maximum. I can prove this formally for two variables by using the standard first and second derivative test (eliminate one of the variables). I can also verify empirically that $x_i = p_i$ is the global maximum of this function when $n > 2$ but want to prove this formally. Is there a suitable technique for multivariate functions that I can use? | Okay, this is my another try on the question which I unfortunately mis-stated and actually asked for a problem different than the one I have to solve. I wish to show that given the constraints $0 < a_i, b_j < 1$ and $\sum_{i=1}^{n} a_i = \sum_{i=1}^{n} b_i = 1$ we have the following inequality: $$\sum a_i \ln(b_i) \leq \sum a_i \ln(a_i)$$ The problem arose when I was trying to compute some topological pressures and $a_i, b_j$ are actually measures of some sets, but this inequality (if, hopefully, true) is purely algebraic. Can anyone provide some suggestions? |
This on increased frequency of urination in biology displays in the biology main page as shown below. As clearly seen, the post says modified by Good Gravy. However on opening the post, I could find no modification by Good Gravy. The revision history of the question shows nothing. What was modified? How was it done? Is that a bug? | . The has no sign of the user sharth The also does not have any sign of related activity I would like to know why the user's name is associated with the question. At least why their display name shows up as having modified the question timeline activity. Possible reason that I can think of is that, . Is this the reason? Is there a way (for normal users), to look for such details, other than looking at the user activity and the question's revision history. |
The following Python code: def foo(): t = [] for i in range(1, 3): def bar(): return i * i t.append(bar) return t for f in foo(): print(f()) Outputs: 4 4. Why isn't the first call output 1? I thought the closure bar() could save the current value of i. BTW, the almost equivalent Lua code: function foo() local t = {} for i = 1, 2 do local bar = function() return i * i end table.insert(t, bar) end return t end for _, f in ipairs(foo()) do print(f()) end Outputs 1 4 as what I expected. | While I was investigating a problem I had with lexical closures in Javascript code, I came along this problem in Python: flist = [] for i in xrange(3): def func(x): return x * i flist.append(func) for f in flist: print f(2) Note that this example mindfully avoids lambda. It prints "4 4 4", which is surprising. I'd expect "0 2 4". This equivalent Perl code does it right: my @flist = (); foreach my $i (0 .. 2) { push(@flist, sub {$i * $_[0]}); } foreach my $f (@flist) { print $f->(2), "\n"; } "0 2 4" is printed. Can you please explain the difference ? Update: The problem is not with i being global. This displays the same behavior: flist = [] def outer(): for i in xrange(3): def inner(x): return x * i flist.append(inner) outer() #~ print i # commented because it causes an error for f in flist: print f(2) As the commented line shows, i is unknown at that point. Still, it prints "4 4 4". |
I recently installed Ubuntu along with Windows 10. It is working perfectly till today. But I updated my Ubuntu 16.04 form Software Updater and restarted my system. After restarting I am getting following Error while opening other disk drives (named 136 GB Volume). Please notice that I am able to access these drives(NTFS partitioned) before updating the system but now it is showing error. Now I am having access to Computer drive only (that is EXT4). Please help me to solve this issue. As I am new to Ubuntu. Thanks! | Whenever I boot Ubuntu, I get a message that it cannot mount my windows partition, and I can choose to either wait, skip or manually mount. When I try to enter my Windows partition through Nautilus I get a message saying that this partition is hibernated and that I need to enter the file system and properly close it, something I have done with no problem so I don't know why this happens. Here's my partition table, if any more data is needed please let me know. Device Boot Start End Blocks Id System /dev/sda1 2048 20000767 9999360 83 Linux /dev/sda2 20002814 478001151 228999169 5 Extended /dev/sda3 * 478001152 622532607 72265728 7 HPFS/NTFS/exFAT /dev/sda4 622532608 625141759 1304576 82 Linux swap / Solaris /dev/sda5 20002816 478001151 228999168 83 Linux |
My cleric and wizard were both stuck in glue in recent combat, and a third PC was down. Instead of rolling to free themselves, they opted to fight from where they were. Once the combat was "over", i.e. all beasts were felled, did they need to still roll "in turn" to free themselves and heal the dying PC or could they have "rolled free" on their own and healed him? I am a new DM and my Husband is an old school D&D person - not that familiar with 5e but knows the old rules well. we disagreed on this, and I'm curious what you all think. Thanks! In reading , the writer states combat continues until all things "combat related" are dealt with, which would mean turns continue in order, including saves from glue trap and death saves. If this is correct, then I suppose my question is answered, but I would like someone to clarify. I do not find anything in the PH discussion of combat that specifies when it ends. | Imagine that a PC gets reduced to 0 hit points during a battle. The battle continues for a couple more rounds and they roll their death saves, one success and one failure (not sure if this part of the question is relevant). Then the rest of the party defeats the last enemy and battle is over. Now what? Does the downed PC keep rolling death saves until they strike 3 one way or the other? Does everyone else repeatedly roll for Medicine to stabalise the dying PC? Or (as we've been ruling it) they are just assumed to become stabilised because combat is over (I'm fairly certain this probably isn't RAW or RAI though). I've looked through the PHB and I've only managed to find descriptions of being stabilised during combat, not after it. Ideally I'd like a rule quoted (or a tweet or something) to point to where such a thing is outlined in the rules, if it is written anywhere. |
I have wrote a java programme to download a file from FTP server. I need to check are there any corruptions after download the file. so i decided to check md5 of the file before and after download. I need to know how can i generate the md5 hash of this file, before it downloading ? | I am looking to use Java to get the MD5 checksum of a file. I was really surprised but I haven't been able to find anything that shows how to get the MD5 checksum of a file. How is it done? |
What is the purpose of the Using block in C#? How is it different from a local variable? | User answered the wonderful question by mentioning the using keyword. Can you elaborate on that? What are the uses of using? |
I am learning statistics mainly from a book : Elements de statistique, from three author of the Brussels University. 5th Edition On the PCA chapter, however, I need to read from other sources, especially to understand how to describe what the axis represents from individual and variable analysis. I then read the whole courses that can be found everywhere over the Internet. And I have a trouble. My book wrotes : La droite qui ajuste le mieux le nuage N* des individus est celle autour de laquelle l'inertie de N* est minimale. (The line that adjusts the best the cloud N* of individuals is the one around which the inertia of N* is minimal). And the problem is : almost all other sources I can read are searching for the maximal inertia to find the best axes. I can't figure my book could be wrong (on it's 5th edition such a bug would had been found), so what is it trying to explain to me ? And why do I find the contrary elsewhere ? | In today's pattern recognition class my professor talked about PCA, eigenvectors and eigenvalues. I understood the mathematics of it. If I'm asked to find eigenvalues etc. I'll do it correctly like a machine. But I didn't understand it. I didn't get the purpose of it. I didn't get the feel of it. I strongly believe in the following quote: You do not really understand something unless you can explain it to your grandmother. -- Albert Einstein Well, I can't explain these concepts to a layman or grandma. Why PCA, eigenvectors & eigenvalues? What was the need for these concepts? How would you explain these to a layman? |
How do I work out the distance Venus travels in one orbit mathematically? I know the parametric equations for its ellipse but I need to work out the total distance travelled in its orbital period. | I want to determine the length of an arc from the ellipse in the picture below: How can I determine the length of $d$? |
There is currently a user doing a large number of retags, and has currently suggested over 100 tag edits in the last few hours (about one every 30-45 seconds). I appreciate enthusiasm, and correctly tagging things, but isn't this going a bit overboard? Assuming the edits are all valid, is it really such a good idea to allow this? For one thing, it's annoying to have a stream of questions all bumped up to the top of the Active queue for over an hour, and the Suggested Edit queue has been sitting at 40+ items for the same time period, but is it really hurting anything either? | I'm throwing this feature request out in response to the following two questions. The current system for suggested edits seems to work perfectly fine in all cases but one: when a user (or group of users) decides to search for possible typos and edit posts en masse. I entirely agree with . I do not believe it is possible to fix all the issues that might exist in the posts this way. If you don't have edit privileges, you're causing work for users. Now, nobody minds this, unless you're not fixing all the issues in a post and it's clear there's no thought going into the process at all. Editing bumps things to the SO home page. Again, nobody minds and this is by design, but if you're fixing one tiny issue, is that a reason to bump 100 questions to the home page? I'd say if you're fixing all the issues with a post - including flagging what should be flagged, closing what should be closed etc - great. If you're not, you're bumping a whole lot of stuff... There are a few more issues to consider, as well. Even though a single user can (theoretically) suggest an unlimited number of edits, reviewers are limited in the number of edits that they can accept or reject per day. Most behavior on the Stack Exchange network is rate-limited: why shouldn't suggested edits be, as well? A single user's suggested edits can take up a disproportionate amount of the reviewers' time. I therefore propose placing a limit on the rate of each user's suggested edits. There are a number of ways we could do this. Limit the number of suggested edits per user per dayβto approximately 100? This is a high enough threshold for any reasonable number of daily edits, and besides, after 100 suggested edits get approved there's no rep in it for the editor anyway. Limit the number of suggested edits per user per hour. Limit the number of outstanding (unreviewed) edits per user at any given time. I personally like the last solution because it would encourage people to spend more time on each suggested edit and it would optimize for the valuable resource that is being spent on each suggested edit: reviewers' time. |
When setting sql_mode="" in /etc/mysql/my.cnf server leaves this variable in it default value: mysql> show variables like 'sql_mode'; +-------------------+------------------------------------------------------------------------+ | Variable_name | Value | +-------------------+------------------------------------------------------------------------+ | sql_mode | STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION | +-------------------+------------------------------------------------------------------------+ However, if i set it manually in mysql shell: set global sql_mode=""; server sets it as desired - to empty value. Till next server restart, when server sets this variable to default value again. Tried in single and double quotes - no matter. No errors in error log. No other default configuration files of mysql loaded What's wrong? Why? | After upgrading MySQL from 5.5 to 5.6, some our app face to problem and need set sql_mode to blank to solve this issue. I added sql_mode = '' to my.cnf but there was no effect on the mysql setting. How do I keep the sql_mode blank ? |
when I open Ubuntu Software Updater, and click the "Upgrade..." button, the window closes and no further events take place. | I am currently using Ubuntu 10.04. I know there is a 10.10 release, but can I upgrade directly to 11.04? Could you walk me through the steps please? |
Yesterday I got sucked into a bingewatch of Computerphile's and Numberphile's videos on youtube. In particular I ended up watching some on Ackermann's function. While I knew already this function (and the effect it can have on mathematicians if ), I did not know that it was designed to be computable only through recursion (or, at least, that is what claims). The thing is that in a is shown that you can the results can be computed through exponentiation, and says that it is really easy to write doen the result using Knuth's up-arrow notation. So here's lie my problem: [stretching for a moment the imagination and assuming that all integers are representable into a computer, avoiding the risk of overflows, that are outside the scope of this question] if it can be represented through Knuth's up-arrow notation, can't a program that does not use recursion be written to compute the value? Is it any different for the original Ackermann's function? (the one that Wikipedia says it has 3 arguments instead of 2) | I am reading the wikipedia page on ackermann's function, And I am having trouble understanding WHY ackermann's function is an example of a function which is not primitive recursive. I understand that the ackermann function terminates, and thus is a total function. So why is it not primitive recursive? The only information that i can find on the wikipedia page is [Ackermann's function] grows faster than any primitive recursive function and is therefore not primitive recursive Which isn't a good example of why it is not primitive recursive. Could anyone explain to me how exactly ackermann's function is NOT primitive recursive please? |
User Groups: user 1 creates users 2,3,4. user 2 creates users 5,6,7. user 6 creates users 8,9,10,...etc finally, user 1 can manage all users. and 6 can manage 8,9,10. I am planned to store like this, user - created_by 2 - 1 3 - 1 4 - 1 5 - 2 is this correct way of store data in MySQL database? anybody can help me to improve this database structure. Thank you. | Assume you have a flat table that stores an ordered tree hierarchy: Id Name ParentId Order 1 'Node 1' 0 10 2 'Node 1.1' 1 10 3 'Node 2' 0 20 4 'Node 1.1.1' 2 10 5 'Node 2.1' 3 10 6 'Node 1.2' 1 20 Here's a diagram, where we have [id] Name. Root node 0 is fictional. [0] ROOT / \ [1] Node 1 [3] Node 2 / \ \ [2] Node 1.1 [6] Node 1.2 [5] Node 2.1 / [4] Node 1.1.1 What minimalistic approach would you use to output that to HTML (or text, for that matter) as a correctly ordered, correctly indented tree? Assume further you only have basic data structures (arrays and hashmaps), no fancy objects with parent/children references, no ORM, no framework, just your two hands. The table is represented as a result set, which can be accessed randomly. Pseudo code or plain English is okay, this is purely a conceptional question. Bonus question: Is there a fundamentally better way to store a tree structure like this in a RDBMS? EDITS AND ADDITIONS To answer one commenter's ('s) question: A root node is not necessary, because it is never going to be displayed anyway. ParentId = 0 is the convention to express "these are top level". The Order column defines how nodes with the same parent are going to be sorted. The "result set" I spoke of can be pictured as an array of hashmaps (to stay in that terminology). For my example was meant to be already there. Some answers go the extra mile and construct it first, but thats okay. The tree can be arbitrarily deep. Each node can have N children. I did not exactly have a "millions of entries" tree in mind, though. Don't mistake my choice of node naming ('Node 1.1.1') for something to rely on. The nodes could equally well be called 'Frank' or 'Bob', no naming structure is implied, this was merely to make it readable. I have posted my own solution so you guys can pull it to pieces. |
Find the number of bijective function $g(n):\mathbb{N}\to \mathbb{N}$ such that it's satisfies $\sum_{n=1}^{\infty} \frac{g(n)}{n^2}<\infty$ I think there is no such bijective function exists , suppose $g(n)=n$ then $\frac{g(n)}{n^2}=\frac{n}{n^2}=\frac{1}{n}$ , but $\sum_{n=1}^{\infty}\frac{1}{n} $ is diverges . Now again $\sum_{n=1}^{\infty}\frac{1}{n} $ is converges if we omit the term $n$ whose last entries is $9$. But then don't understand how to construct such bijective function .(source:: ) This question is came in TIFR GS-2021 . | Let $f:\mathbb{N^*}\to\mathbb{N^*}$ an injective function. Show that the following infinite series $$\sum_{i=1}^{\infty}\frac{f(n)}{n^2}$$ is divergent. I am supposed to deal with this using the rearrangement inequality. But I don't know how!Could some explain this to me step by step? I really want to understand... |
I want to know how to prove this inequality by mathematical induction: $a_k's$ are nonnegative numbers. Prove that$$a_1a_2\cdots a_n\leq \left(\frac{a_1+a_2+\cdots+a_n}{n}\right)^n.$$ In the inductive step, I tried using the inequality $ab\leq \frac{k}{k+1}a^\frac{k+1}{k}+\frac{1}{k+1}b^{k+1}$ but I got over estimate of what I was looking for. Is there a better way of proving this by induction? | The arithmetic - geometric mean inequality states that $$\frac{x_1+ \ldots + x_n}{n} \geq \sqrt[n]{x_1 \cdots x_n}$$ I'm looking for some original proofs of this inequality. I can find the usual proofs on the internet but I was wondering if someone knew a proof that is unexpected in some way. e.g. can you link the theorem to some famous theorem, can you find a non-trivial geometric proof (I can find some of those), proofs that use theory that doesn't link to this inequality at first sight (e.g. differential equations β¦)? Induction, backward induction, use of Jensen inequality, swapping terms, use of Lagrange multiplier, proof using thermodynamics (yeah, I know, it's rather some physical argument that this theorem might be true, not really a proof), convexity, β¦ are some of the proofs I know. |
I have 2 bash scripts: tmp/a.sh #!/bin/bash cd frontend yarn install yarn build docker-compose build docker-compose up -d b.sh #!/bin/bash ./tmp/a.sh I want to launch a.sh from b.sh but when ls runs, it prints directory of b.sh(parent process). How do I preserve its path when a.sh runs? | How do I get the path of the directory in which a script is located, inside that script? I want to use a Bash script as a launcher for another application. I want to change the working directory to the one where the Bash script is located, so I can operate on the files in that directory, like so: $ ./application |
As you can see, the image is overhanging the edge of the box. This is also easy to see in editing and creating: Here you can see that the dotted lines are blocked by the image going over it. | A B C D E F I don't even know. It just seemed weird. Yes, I understand I could just avoid doing something like that. But the problem already exists with a single level. Consider having 2 images in a post. Both exceed the maximum width of a post. One is nested in a list. Key to this issue is that my original images were much larger. They were automatically resized. Image List I think it looks weird. |
I'm playing Clash of Clans on my device. I had linked it to my Gmail account in the beginning. Because of storage issues, I disabled my Google Play. But I proceeded with the game. Now when I try signing in using my Gmail account, it asks whether to replace the existing present village with the one that had been saved before disabling Google Play. Is there a way to load my existing village into it? Or is there a way to load my existing village to a new Gmail account on the same device? | I downloaded Clash of Clans to my iPad (iOS 7) this past weekend and started playing. Of course, after a couple of hours I realized I made some newbie mistakes that are fatal to my future success. I wanted to restart, but it seems the only way to do so is to reset the device which I really would like to avoid. After some Googling I tried the option of logging out of Game Center and logging in with a different Apple ID. But, sadly, CoC re-launched back into the existing game. Is there any way I can start over? Or at least start a new game under a different account on the same device? |
The obvious solution of Lattitude & Longitude doesn't work because it generates points more densely near the poles, and the other thing I came up with (Pick a random point in the unit cube, if it's in the unit sphere map it to the surface, and restart if it's outside) doesn't always find a point within a fixed number of tries. | How do I generate $1000$ points $\left(x, y, z\right)$ and make sure they land on a sphere whose center is $\left(0, 0, 0\right)$ and its diameter is $20$ ?. Simply, how do I manipulate a point's coordinates so that the point lies on the sphere's "surface" ?. |
How can I instruct python to generate an output file which keeps the color formatting specified in the main script? I am working on the WRDS Cloud and I am using a shell file to execute a python script. The Cloud returns an output file which I can download and open like it is a txt file. However, this does not keep the color formatting that I specified in my original code. I have tried to use different formatting packages in my python script but the result is always the same: the color is not displayed in the output file. I would really need to see the color because I use it to highlight some particular messages that represent warnings or errors. Therefore, I assume the only way around this is to instruct my python script to generate a different type of output, but I cannot figure out how. my python script looks like this: from colorama import * init() print(Fore.MAGENTA + 'Warning: The query failed' + Fore.RESET) the output file looks like this (with no magenta color): Warning: The query failed | How can I output colored text to the terminal in Python? |
I've been told to use AddGeometryColumn to properly add a column with correct/preferred SRID. however I wonder if it's possible to fix/change the current column instead of adding a new? If there's no other way but to use this function should I remove the previous column? Thanks a ton. | While importing my shapefile data to PostGIS, I did not select the proper Projection. How do I now change the SRID of the data, without transforming the Coordinates? |
In what scenario do we need to implement Singleton Class in javascript as below var Singleton = (function () { var instance; function createInstance() { var object = new Object("I am the instance"); return object; } return { getInstance: function () { if (!instance) { instance = createInstance(); } return instance; } }; })(); function run() { var instance1 = Singleton.getInstance(); var instance2 = Singleton.getInstance(); alert("Same instance? " + (instance1 === instance2)); } | The glorified global variable - becomes a gloried global class. Some say breaking object-oriented design. Give me scenarios, other than the good old logger where it makes sense to use the singleton. |
I was asked to define a non-perfect square. Now obviously, the first definition that comes to mind is a square that has a root that is not an integer. However, in the examples, 0.25 was considered a perfect square. And the square itself + its root were both not integers. Is it that all non-perfect squares have irrational roots, e.g. $\sqrt{2}$? | It is well known that $\sqrt{2}$ is irrational, and by modifying the proof (replacing 'even' with 'divisible by $3$'), one can prove that $\sqrt{3}$ is irrational, as well. On the other hand, clearly $\sqrt{n^2} = n$ for any positive integer $n$. It seems that any positive integer has a square root that is either an integer or irrational number. How do we prove that if $a \in \mathbb N$, then $\sqrt a$ is an integer or an irrational number? I also notice that I can modify the proof that $\sqrt{2}$ is irrational to prove that $\sqrt[3]{2}, \sqrt[4]{2}, \cdots$ are all irrational. This suggests we can extend the previous result to other radicals. Can we extend 1? That is, can we show that for any $a, b \in \mathbb{N}$, $a^{1/b}$ is either an integer or irrational? |
I've found a lot of examples on how to use precompiled headers for MSVC, but I can't seem to find any examples using clang. From this SO post I can see the clang commands but I'm wondering how they translate into cmake: to create pre-compiled header include all the headers you don't change > > into Query.h and use: clang -cc1 Query.h -emit-pch -o Query.h.pch to use the pre-compiled header type: clang -cc1 -include-pch Query.h.pch Query.cpp -shared -o libquery.so; Query.cpp needs to include Query.h Edit: Using clang 6 and cmake 3.11.2 | I have seen a few (old) posts on the 'net about hacking together some support for pre-compiled headers in CMake. They all seem a bit all-over the place and everyone has their own way of doing it. What is the best way of doing it currently? |
THEE Apple, THEE Engine, THEE Imbecile, THEE Orange, THEE uncle and THA...for all [most] words beginning with consonants | I've been told that when "the" is proceeded by a vowel sound, like "apple" or "hour", it's pronounced as "thee" and not as "thu". But after listening to a couple of songs, I noticed that sometimes this "rule" is not followed. Take for example the two Katy Perry's songs, "Roar" and "The one that got away". In the first she sings "I got thee eye of thu tiger", but in the second she sings "Thu one that got away". I don't know if it was sang this way to better suit the song melody (I understand nothing about those techniques), but I got confused. What's the correct pronunciation? Thanks in advance. |
Does anyone know the add_action() hook to use immediately after a user is successfully authenticated. Hook Test based on @mmm's answer I ran this test from my mu-plugins.php file: function check_for_superAdmin() { if ( is_super_admin() ) { echo 'I\'m a Super Admin !'; exit; } } add_action( 'wp_login', 'check_for_superAdmin' ); the check_for_superAdmin() function works but the is_super_admin() function does not. I may need to pass a parameter in there. Checking.... | I am writing a plugin that fetches some extended user info from a remote service and I need it to execute its function each time a user logs in. Is there a hook that gets fired after login that I can add an action to? |
Is it possible to get a secure random number generator from a secure hash function this way First choose a natural number $n$ as seed, then if we are looking to generate random numbers from $0$ to $F$ (in hex), the first in the sequence is the last digit in the hash of $n$, the second in the sequence is the last digit in the hash of $n+1$, and so on. Does this make a secure PRNG. | I was just looking at some , specifically at Hash_DRBG. I read briefly through the algorithm, and even though it is not overly complex, it still seems unnecessary to me. I asked myself how I would implement a (cryptographically secure) PRNG on top of a Hash algorithm (SHA256 or SHA512), what came up is: Idea one: Obviously this can only provide half the "strength" of the hash Initialization: state = hash(seed); Iteration: output = first_half_of(state); state = hash(state); Reseeding: state = hash(state || new_seed) Idea Two: Maybe with a separate counter Initialization: state = hash(seed); Iteration: output = hash(state); ++state; Reseeding: state = hash(state || new_seed) Now, these two "schemes" seem safe to me, I'm a complete crypto noob though. The point is that I don't think that I'm the first one to think of these very basic PRNGs, and I'd like to understand the reason for NIST not to choose something similar in their recommendations. Do these PRNGs have some (obvious?) weaknesses? (If not, is there something known about after how many iterations they should be reseeded?) |
It's easy to use prime factorization to show: If $m\mid n^2$ then $\gcd(m,n^2/m)\mid n$. Can anybody find some other proof - perhaps a simple reduction of some sort? Maybe solving $m^2x + n^2y=mn$, for example? I suppose the result would follow if you could prove that $\gcd(m^2,n^2)=\gcd(m,n)^2$, since $\gcd(m,n)^2\mid mn$ since $\gcd(m,n)\mid m$ and $\gcd(m,n)\mid n$. That result doesn't even need $m\mid n^2$. | How to prove $\gcd(a^2, b^2) = (\gcd(a, b))^2$? My attempt: Let $\gcd(a, b) = d$. Then $d|a$ and $d|b$ then $d^2|a^2$ and $d^2|b^2$. i.e $d^2$ divides $a^2 ~~\&~~ b^2$. |
Given any really large number $x$, such as the busy beaver number $x=BB(BB(99))$, can we construct a proposition such that we know it has a proof or a disproof, but we also know the shortest such proof or disproof is longer then $x$ symbols? | Given any positive integer $n$, is there a way to quickly construct a statement $S$, such that the shortest proof of $S$, if it exists, must have length at least $n$? And such that one out of $S$ or not $S$, is provable. And question 2: If S, then a proof of S must have length atleast n. If not S, then a proof of not S must have length atleast n. Edit: I had in mind that the number of symbols in S be of the same order as the number of symbols required to specify n. |
Let $A$, and $B$ be commuting $n\times n$ matrices, i.e. $A.B = B.A$. Let \begin{equation} \exp(A) = \sum_{i=0}^\infty\frac{1}{i!} A^i \end{equation} show that $\exp(A+B) = \exp(A).\exp(B)$. Edit: To those who choose to vote for closing of this question and similar ones as being a duplicate. I think the relative timing of the two questions are actually important! When there are two duplicate questions, I think it makes highly more sense to check the relative timings of the two questions and in general, tend to vote to closing of the question which is asked after (Interestingly, for this question, the duplicate is asked 5 years later than this one). Please note that if their research was done properly or the StackExchenge's duplicate detection worked perfectly at the time, they would not have been even able to post. Now by unnecessarily closing well attended questions of earlier contributors (here me) I am wondering what behavior is actually being rewarded? | This question comes from an exam in my functional analysis class. Suppose $X$ is a Banach space, and $T \in B(X,X)$ is a bounded linear operator on $X$. For any non-negative integer $n$, let $$S_n=\sum_{k=0}^n \frac{1}{k!} T^k$$ where $T^k$ is the composition of $T$ with itself $k$ times and $T^0=I$. We can show that for any integer $k>0$, $\Vert T^k \Vert \le \Vert T \Vert ^k$. Then we can show that $S_n \in B(X,X)$ and there is some $S \in B(X,X)$ such that $S_n \to S$. We write $S = e^T$ for this operator. Finally, We were asked to show that $e^T$ has an inverse, and that it is $e^{-T}$. My thought is to prove the following claim first: if $A,B \in B(X,X)$ and $AB = BA$, then $e^A e^B = e^{A+B}$. If the claim is true, it follows that $e^T e^{-T}=I$. The claim can be proven provided that the product series can be computed with the Cauchy rule. $$e^Ae^B=\sum_{i=0}^{\infty}\frac{A^i}{i!}\sum_{j=0}^{\infty}\frac{B^j}{j!}=\sum_{k=0}^{\infty}\sum_{l=0}^{k}\frac{A^lB^{k-l}}{l!(k-l)!}$$ $$=\sum_{k=0}^{\infty}\frac{1}{k!}\sum_{l=0}^{k}\frac{k!}{l!(k-l)!}A^lB^{k-l}= \sum_{k=0}^{\infty}\frac{1}{k!}(A+B)^k= e^{A+B}$$ But why can the product series be summed in the Cauchy way? I know for real-number series, by Cauchy's theorem, if $\sum_{n=1}^{\infty} a_n$ and $\sum_{n=1}^{\infty} b_n$ are absolutely convergent to $A$ and $B$, respectively, then we can add $a_i b_j$ in any way, and the resulting series will converge to $AB$. Does this proposition still hold for commutable operators? (It would be greatly appreciated if ideas of proof or reference is suggested.) |
I've been looking into the getrusage function, which I see a prototype for within the file /include/linux/resource.h. I've tried to trace the directives to find where the actual function is, but I haven't found it. Does anyone know where it is? | I am trying to understand how a function, say mkdir, works by looking at the kernel source. This is an attempt to understand the kernel internals and navigate between various functions. I know mkdir is defined in sys/stat.h. I found the prototype: /* Create a new directory named PATH, with permission bits MODE. */ extern int mkdir (__const char *__path, __mode_t __mode) __THROW __nonnull ((1)); Now I need to see in which C file this function is implemented. From the source directory, I tried ack "int mkdir" which displayed security/inode.c 103:static int mkdir(struct inode *dir, struct dentry *dentry, int mode) tools/perf/util/util.c 4:int mkdir_p(char *path, mode_t mode) tools/perf/util/util.h 259:int mkdir_p(char *path, mode_t mode); But none of them matches the definition in sys/stat.h. Questions Which file has the mkdir implementation? With a function definition like the above, how can I find out which file has the implementation? Is there any pattern which the kernel follows in defining and implementing methods? NOTE: I am using kernel . |
My minecraft game has been crashing alot lately, and i dont kow why. It also happens with other games and i frequently get blue screen errors. I believe it is a hardware problem but does The error i usually get it "exception_access_violation" but i sometimes get "exception_illegal_instructuion" A few things: My system can run minecraft, i used to be able to play Minecraft with no issues at an amazing frame rate (usually 90 to 160) I have updated my Intel Graphics drivers to the latest one and even tested the previous version I have the latest version of the Minecraft launcher I have the latest version of Java installed | I go to the Minecraft menu and click on singleplayer to test out the 1.9 update. I made a new world (no mods), it said downloading terrain and then it crashes every time (I've tried about 20 times now). Has anyone else experienced similar issues and know what the fix may be? Here is the launcher log: Completely ignored arguments: [--nativeLauncherVersion, 301] [00:35:12] [Client thread/INFO]: Setting user: Teddy_Cromwell [00:35:12] [Client thread/INFO]: (Session ID is <censored>) [00:35:14] [Client thread/INFO]: LWJGL Version: 2.9.4 [00:35:14] [Client thread/WARN]: Removed selected resource pack resources (no region and battle music).zip because it's no longer compatible [00:35:14] [Client thread/INFO]: Reloading ResourceManager: Default [00:35:15] [Sound Library Loader/INFO]: Starting up SoundSystem... [00:35:16] [Thread-5/INFO]: Initializing LWJGL OpenAL [00:35:16] [Thread-5/INFO]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) [00:35:16] [Thread-5/INFO]: OpenAL initialized. [00:35:16] [Sound Library Loader/INFO]: Sound engine started [00:35:18] [Client thread/INFO]: Created: 1024x512 textures-atlas [00:35:26] [Server thread/INFO]: Starting integrated minecraft server version 1.9 [00:35:26] [Server thread/INFO]: Generating keypair [00:35:27] [Server thread/INFO]: Preparing start region for level 0 [00:35:28] [Server thread/INFO]: Preparing spawn area: 5% [00:35:29] [Server thread/INFO]: Preparing spawn area: 8% [00:35:30] [Server thread/INFO]: Preparing spawn area: 15% [00:35:31] [Server thread/INFO]: Preparing spawn area: 21% [00:35:32] [Server thread/INFO]: Preparing spawn area: 27% [00:35:33] [Server thread/INFO]: Preparing spawn area: 34% [00:35:34] [Server thread/INFO]: Preparing spawn area: 42% [00:35:35] [Server thread/INFO]: Preparing spawn area: 48% [00:35:36] [Server thread/INFO]: Preparing spawn area: 56% [00:35:37] [Server thread/INFO]: Preparing spawn area: 66% [00:35:38] [Server thread/INFO]: Preparing spawn area: 74% [00:35:39] [Server thread/INFO]: Preparing spawn area: 81% [00:35:40] [Server thread/INFO]: Preparing spawn area: 91% [00:35:41] [Server thread/INFO]: Preparing spawn area: 98% [00:35:42] [Server thread/INFO]: Teddy_Cromwell[local:E:6d7525a7] logged in with entity id 301 at (244.5, 69.0, 244.5) [00:35:42] [Server thread/INFO]: Teddy_Cromwell joined the game # # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007fffcf6e6b37, pid=15456, tid=12424 # # JRE version: Java(TM) SE Runtime Environment (8.0_25-b18) (build 1.8.0_25-b18) # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.25-b02 mixed mode windows-amd64 compressed oops) # Problematic frame: # C [ig8icd64.dll+0x16b37] # # Failed to write core dump. Minidumps are not enabled by default on client versions of Windows # # An error report file with more information is saved as: # C:\Users\Connor\AppData\Roaming\.minecraft\hs_err_pid15456.log # # If you would like to submit a bug report, please visit: # http://bugreport.sun.com/bugreport/crash.jsp # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug. # AL lib: (EE) alc_cleanup: 1 device not closed Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release |
Fix some compact $n-1$ dimensional manifold $M$ without boundary embedded in $\mathbb{R}^n$. For any unit vector $v\in \mathbb{R}^n$, does there exist a point $p\in M$ at which the unit normal vector is $v$? I think the result holds if $n=2$, because the only compact $1$-dimensional manifolds embedded in $\mathbb{R}^2$ are diffeomorphic to the circle, so should achieve all unit normals. Intuitively, it seems reasonable that this should hold for $n=3$ as well. This feels like it's just basic geometry and there should be a proof for it around somewhere, but I haven't found it yet. I think an equivalent question goes something like: if the level set $S=f^{-1}(y)$ of a differentiable function $f:\mathbb{R}^n\to \mathbb{R}$ is non-empty and 'finite' in some sense, does $\frac{\nabla f}{\left|\left|\nabla f\right|\right|}$ achieve all values of the unit sphere $\mathbb{S}^{n-1}$ on $S$? | Let $M$ be a closed, orientable, and bounded surface in $\mathbb{R}^3$. (a) Prove that the Gauss map on $M$ is surjective. (b) Let $K_+(p) = \max \{0, K(p)\}$. Show that $$ \int K_+dA \ge 4\pi. $$ in the area of $M$. Do not use the Gauss-Bonnet Theorem to prove this. |
I managed to setup the SVG package so it would successfully import an SVG file. Here is the full config: \RequirePackage[width=\textwidth]{svg} % In my custom package \PassOptionsToPackage{svgpath={uml/}}{svg} % In the file I then include the SVG file (uml/uml.svg) with: \includesvg{uml} This works with no errors or warnings. However, the original SVG file looked like this: (Sorry this is awful, but you can't upload SVG files directly). Notice the arrows on the top-left. Here is the resulting file: I'm fine with that, except that the three arrows on the top-left disappeared from some reason. When reading the doc I found the lastpage option, however it is to fix a bug in Inkscape 0.91, and I'm running 0.92.1 r15371. The SVG file was generated with UMLet (but that cannot be the problem, the first picture is after the generation). However, the missing arrows are the first I added when creating the diagram, that seems a bit too big of a coincidence -- however I don't know how SVG works so I don't really know if that has an influence or not. | | Minimal working example: \documentclass{book} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[width=\textwidth]{svg} \begin{document} \includesvg{animaux} \end{document} You need to add the file uml.svg in the same folder. | I have a lot of svg images I want to include in a TeX-File. So far I didn't have problems using the \usepackage{svg} with \includesvg. However recently I've added a few more layers to the svg-files and now a lot of stuff is missing. The resulting svg-tex.pdf files now have up to 61 pages and if I look into the svg-tex.pdf_tex files with texmaker I found the culprit: it only goes up to 50 pages: \put(0,0){\includegraphics[width=\unitlength,page=50]{Sym_9999_svg-tex.pdf}}% Putting the pages in manually like: \put(0,0){\includegraphics[width=\unitlength,**page=51**]{Sym_9999_svg-tex.pdf}}% does work, but would be very time inefficient (I have 100+ svg images) additionally the layers don't have the correct sequence and cover up text sometimes. Does anyone have a solution for this problem? If I open up the svg-image it shows up just fine. One possibility would be to just export the svgs in one pdf file without the text as extra latex file, but this way I can't add formulas in Tex-Form. |
An orphan is a child whose parents have died. Is there a single English word to describe a parent who has lost all their children? If not, what is the most clear and concise description for this condition? | Is there a word that describes a parent whose child has died? Along the lines of "orphan", "widow", and "widower", is there a single word for a parent who has lost a child (of any age)? |
Is there any practical difference in doing this: @techreport{Key, author = "Sanchez, E.J.", ... } instead of doing this: @techreport{Key, author = {Sanchez, E.J.}, ... } | I see in some examples each field in a BibTeX entry is given within "", while in others it is given within {}. For example, @Book{Torre2008, author = "Joe Torre and Tom Verducci", publisher = "Doubleday", title = "The Yankee Years", year = 2008, isbn = "0385527403" } @PROCEEDINGS {conference:06, editor = {First Editor and Second Editor}, title = {Proceedings of the Xth Conference on XYZ}, booktitle = {Proceedings of the Xth Conference on XYZ}, year = {2006}, month = oct, } What are the differences between the two? Which one should I use? |
I'm trying to understand the difference between sets and proper classes. I found this . I'm having trouble in understand the following at page 115: It basically says that if a set of all cardinal numbers exist, then it has a cardinal number $k$. Then $k$ must be bigger than all cardinal numbers in the set of which it is the cardinal number, that is, the set of all cardinal numbers. Why $k$ must be bigger? As I know, cardinal numbers are numbers related to sizes of sets. There's nothing about size in this definition. | What is the easiest way to prove (if possible, without using ordinals etc. as my current math understanding of set theory counts only cardinals, and countable & uncountable sets) that the number of cardinalities that exists is not countable (that is, can't be put into bijection with $\mathbb{N}$)? What exactly does it mean that the set of all cardinals is so big that it's not even a set, but a class? Where does contradiction that does not allow it to be a set arise? I have read , but am not quite sure how #20 leads up to that conclusion. I have taken a look at the following topics: But still can't quite find/understand the answer. |
I'm a Kenyan college student currently in the United States on an F1 Visa but I would like to go to Germany to visit my family in the summer of next year, can I apply for a German Visa in the USA ? | I'm a citizen of country A who would like to apply for a Schengen visa at a consulate in country B. When is this possible? |
I figured it out but I do have a follow up question... I answered my own question. If you have images or footage loaded into the Video Sequence Editor, it will only render the frames from that footage. There may be a way to circumvent this, but I don't know how to do that. At any rate, the frame I wanted to render was past the footage, so it rendered a blank frame. As far as I know, I have to get the footage out of the Video Sequencer in order to render the scene. I found this answer when I went to find a backup of this file and the backup file opened to the Video Sequencing preset and I remembered this little tick. If someone knows how to circumvent this problem so I don't have to delete the footage, that would be great. Original post: I looked around to see if this question has already been asked and one fellow had the exact same issue, but was scolded for being too vague and the question was closed. I could understand his question and know his predicament and can only hope I can be specific enough here to ask the same question. I have a good bit of time invested in this blend file and I hope I won't have to redo it. So, here's the situation: 1) I have a blend file with a lot of objects, materials, and textures, including two character rigs. I have a blocking run saved in the Action Editor of the Dopesheet and would like to render one of the key frames from it to act as a reference in another scene I'm setting up. 2) I have tried to render a single image file from this scene a) by selecting the Render Image selection from the Render menu in the 3D Viewport, b) by clicking the Image Render icon in the Render tab of the Object Properties window, and 3) by hitting the F12 button on my Macbook keyboard. None of these produce the result I'm looking for: a single image of the keyframe from the scene in this file. 3) I have tried to render the single image in versions 2.661 and 2.71 of Blender as indicated in #2 and have achieved no different result. 4) The problem seems only to be with this file and no others that I checked. 5) I closed all applications on my computer and rebooted. No change with this file. 6) I have not had this issue with this file before. I do not have this issue with other files with the same scene (i.e., as described above with multiple objects, etc. -- same scene, shots are in different blend files) 7) The result I get (see link below for screenshot) the gray and white checkerboard that shows while an image is rendering. The Screen I get when I try to render a single image file () 8) Recently, I read a post in Blenderguru that made suggestions about changing settings in the Light Paths and Performance tabs to reduce render times. I made these changes in this particular file and other files. I have not had this same problem in the other files. In those files I can render the image with no problem. See link below for screenshot. Light Path and Performance tabs in the Render Panel of the Object Properties window. () 9) I recently installed Blender 2.71. I still have 2.661, so I tried the files in both versions of Blender. My other files will render, but the one in question won't. I get the result explained above. I have also tried to render it in the Blender Internal Engine -- same result. 10) I have tried to look over settings in the Render panel of the Object Properties window and in the User Preferences. I am not an expert user of Blender or a computer programmer, so most of the options are Greek to me. If I accidentally changed settings, I don't know which ones those would be. 11) If I can't find a solution, I will have to redo the 5 hours of blocking I already put into this, a scene I am quite happy with. I've tried to be thorough and specific. If I haven't been, so be it. I really appreciate it if someone knows what I could do to fix this or has any suggestions. | Blender is rendering an older version of my project, not the most recent one. I have made it using the Blender Render but it does not want to render in cycles either. A black and grey screen is rendered as if everything is transparent. Checked general camera, lighting and compute devises in case I messed something up but I can't find anything. All my textures and objects look normal, does anybody know what is wrong or what to check? Ok added link: |
Let be D a unique factorization domain, k in D and $x=kd $ with $d$ a gcd of $a, b$ and $y$ a gcd of $ka, kb$ prove that x and y are associates; x divides y and y divides x. My attempt: x=kd and a=dr, b=ds hence ka=kdr, kb=kds so ka=xr, kb=xs hence x divides y because y is gcd of ka and kb. How to prove that y divides x? | I'm trying to prove that $(ma, mb) = $|$m$|$(a, b)$ , where $(ma, mb)$ is the greatest common divisor between $ma$ and $mb$. My thoughts: If $(ma, mb) = d$ , then $d$|$ma$ and $d$|$mb$ β $d$|$max + mby$ β $d$|$m(ax+by)$. This implies that $d$|$m$ or $d$|$(ax+by)$. This is the same as $d$|$m$ or $d$|$a$ and $d$|$b$, so $d$|$m$ or $d$|$(a,b)$. This is the same as $d$|$m|$ or $d|(a,b)$, so $d$|$|m|(a,b)$. I don't know what to do. |
I have an icon: Windows says that the size of the file is 575 byte, while size on disk is 4 096 byte which is about 7 times more. Can somebody explain why so? | Looking at the properties for a Windows file I get two attributes, βSizeβ and βSize on disk,β and "Size on disk" is always larger. What do these two metrics mean? |
According to my limited knowledge of Hawking radiation, there is an "explosion" when the black hole fully radiates away. What is this explosion? Is it in the form of EM radiation only, or something else as well? Is it even a traditional explosion? What does this explosion affect? If a black hole exploded in downtown Manhattan, for example, what would happen? How would you calculate this explosion's strength? For example, if the black hole started at $x$ kg, how would you calculate the strength of this explosion (preferably in a unit like 'kilograms of TNT' to contrast against other kinds of explosions.) | Reading about I understood that black holes lose energy over time - which is logical in some way (otherwise they would be there forever and heat death would never technically happen) But - how exactly does it "evaporate"? What happens when it no longer contains enough mass within it's ? Does it explode somehow? Transforms into "regular matter"? Simply vanishes over time? Or? |
I bought some prime trimmed beef brisket on March 9 with a sell by date of Mar. 12. It was kept in the frig in its foam/plastic wrap container until Mar.16. There was some odor when I opened it up and put it up to my nose. I washed it off and cut away some meat and scraped it off. Not much odor anymore. It had reached room temp for a short period of time before I did this and then I wrapped it and froze it. Is it likely safe to eat? No children or immune compromised people will eat it and it will be thoroughly cooked first. | How do I know if a given food or ingredient I have is still good, or if I should discard it? How can I best preserve a food or ingredient? This broad question is intended as a "general reference" question to quickly answer many how long will food keep for? questions. Please feel free to edit this question to expand and clarify as needed. |
I've imported a model from an .obj file. It imports fine, and I can see all the separate mesh objects that make up the model. But when I look at their object properties, all the transforms are the same for each mesh. I'm not really sure how that happened or what's going on; I wouldn't mind, but I'm exporting it via fbx to import into a game and it's screwing that process up somehow. Is there some local/global coordinate distinction I'm missing somewhere? | So, I'm working creating a lamp... yes, newbie here. After modeling for a bit, I noticed that my point of origin was no longer the center of my object: How to I reset an object origin point to the center of it's geometry? |
Show that AB-BA = I is impossible for n x n matrices of real or complex numbers. Can someone help me with this problem? | The following question is from Artin's Algebra. If $A$ and $B$ are two square matrices with real entries, show that $AB-BA=I$ has no solutions. I have no idea on how to tackle this question. I tried block multiplication, but it didn't appear to work. |
I would like to install both Ubuntu and Windows on the same PC. I would like to use Ubuntu as my primary OS, and have Windows available to run things that only run on Windows. I would like to start fresh on both OSs and I have no data that I need to keep. I also would like to have it so that when I boot, I can choose which OS to run, without having to go into the BIOS/UEFI settings. Is this possible? Available storage I have a 1TB spinning hard drive I have a Samsung EVO 850 SSD hard drive (500GB) I have a Samsung EVO 950 M.2 SSD hard drive (500GB) Ideally each OS will reside on it's own SSD but I am not sure if I can avoid going into the BIOS to pick an OS that way, so if it needs to be on the same SSD with a partition then so be it. I would like the 1TB HDD to be visible to both OSs for general purpose usage. So the questions are How do I do this? (admittedly a broad question) Do I put both OSs on the same SSD or on different SSDs? Which OS do I install first? I noticed that when I installed Windows 10 on the M.2 SSD a few days ago, I had to disconnect all other hard drives or Windows got confused. Maybe the easiest way to do this is to disconnect all drives except the M.2, install Windows using the whole SSD. Then run the Ubuntu installer (without reconnecting the the rest of the drives) and adjust the partition and let the installer do it's thing. Hopefully nothing will get confused when I reconnect the drives again. As an aside, ever since installing Windows on the M.2 (EVO 950), the previous installation of Ubuntu (which resides on the EVO 850) now boots to a purple blank screen. And the trick does not resolve the issue. Advice please. | I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS. Should I do it with Wubi, or through the Live USB/DVD? What steps do I need to take to correctly install Ubuntu? |
In various places (see quotes below) it says that the likelihood is "proportional to a probablility". Which probability is it proportional to? In the context of Bayes theorem, it is not proportional to the posterior probability, unless the prior is constant. If we denote the likelihood as $P(B|A)$ viewed as a function of $A$ with $B$ fixed, this is also not proportional to $P(B|A)$ viewed as a function of $B$ with $A$ fixed. I give an example below. If the likelihood is proportional to a normalized form of itself, then ok, but that seems like a very trivial statement! That this question is related to another recent question, but it is different. That other question disputes the quotes, asking how can likelihood be related to the probability $P(B|A)$ using a single constant of proportionality. This question accepts the quotes but asks for clarification to identify which probability is the one that is mentioned in the quotes. This is self study, and of course I understand that one or more of my assertions in these questions must be wrong. It is just my way of explaining my incorrect understanding that leads to the question. QUOTES "likelihood is proportional to a probability" A similar statement is in the book Think Bayes: "likelihood doesn't need to compute a probability, it only has to compute something proportional to probability" EXAMPLE: $P(B|A)$ as a likelihood is not proportional to $P(B|A)$ as a probability density A simple case, a PMF that is parameterized only by a single parameter $M$. It assigns probabilities to integer values, and the parameter translates the PMF on the integer axis. Here is the PMF for the fixed parameter value M=5: $$ \begin{align*} & P(X=5|M=5) = .5 \\ & P(X=6|M=5) = .3 \\ & P(X=7|M=5) = .2 \\ \end{align*} $$ (and other values zero). And the PMF for parameter value M=6: $$ \begin{align*} & P(X=5|M=6) = 0 \\ & P(X=6|M=6) = .5 \\ & P(X=7|M=6) = .3 \\ & P(X=8|M=6) = .2 \\ \end{align*} $$ More generically, the PMF is like P(X=M)=0.5, P(X=M+1)=.3, P(X=M+2)=.2, zero otherwise. Now consider the likelihood form of this, where the data is given as the fixed value X=5 and the parameter $M$ varies: $$ \begin{align*} & P(X=5|M=3) = .2 \\ & P(X=5|M=4) = .3 \\ & P(X=5|M=5) = .5 \\ \end{align*}] $$ So in the PMF case the shape is (.5,.3,.2), whereas in the likelihood case the shape is (.2,.3,.5). There is no single constant of proportionality that relates these. | In various places it says that the likelihood (e.g. in the Bayes formula) is "proportional to a probablility". For example "likelihood is proportional to a probability" A similar statement is in the book Think Bayes, "likelihood doesn't need to compute a probability, it only has to compute something proportional to probability" Lastly, in a crossvalidated discussion there is a more specific statement "the likelihood function is proportional to the probability of the observed data." I am not sure if that is correct or not. Notation, $P(A|B) = P(B|A) P(A) / P(B)$. The likelihood is $P(B|A)$. The question: If I am understanding however, the likelihood is proportional to a different probability for each value of $A$. That is, there is no single constant $c$ such that the likelihood is equal to some version of the probability $P(B)$, i.e. this statement is false $$ P(B) = c \cdot P(B|A) $$ Rather, it would have to be $$ P(B) = c(A) \cdot P(B|A) $$ meaning that the constant of proportionality $c$ varies with each choice of $A$. Is this true? If so, it seems to me that saying likelihood is proportional to a probability is vacuous. You can always make something "proportional to" something else if the proportionality is a function rather than a constant. This question is somewhat related to these previous questions about likelihood, which I have read, however I believe this is a different question (albeit maybe one that could be "derived from" the answers to other questions, buy someone smarter than me!) EDIT: Maybe another way of asking the question is this: if the likelihood is proportional to a probability, which probability is it proportional to? Is it the probability $P(B|A)$ regarded as a function of B with A held fixed, or is it the marginal probability P(B), or is it some other (generic) probability? EDIT: here is an attempt at an example: A Normal distribution is parameterized by mean and variance. Let's pick something simpler,a PMF that is parameterized only by a single parameter $M$. It assigns probabilities to integer values, and the parameter translates the PMF on the integer axis. Here is the PMF for the parameter value M=5: $$ \begin{align*} & P(X=5|M=5) = .5 \\ & P(X=6|M=5) = .3 \\ & P(X=7|M=5) = .2 \\ \end{align*} $$ And the PMF for parameter value M=6: $$ \begin{align*} & P(X=5|M=6) = 0 \\ & P(X=6|M=6) = .5 \\ & P(X=7|M=6) = .3 \\ & P(X=8|M=6) = .2 \\ \end{align*} $$ More generically, the PMF is like P(X=M)=0.5, P(X=M+1)=.3, P(X=M+2)=.2, zero otherwise. Now consider the likelihood form of this, where the data is given as the fixed value X=5 and the parameter $M$ is what varies: $$ \begin{align*} & P(X=5|M=3) = .2 \\ & P(X=5|M=4) = .3 \\ & P(X=5|M=5) = .5 \\ \end{align*} $$ So in the PMF case the shape is (.5,.3,.2), whereas in the likelihood case the shape is (.2,.3,.5). There is no single constant that can make these equal. What is my mistake? |
I ofc allready searched but can't find anything that works, even htmlentities is't working: index.php: <head> <meta charset="utf-8"> </head> <form action="upload.php" method="post" enctype="multipart/form-data" accept-charset="UTF-8"> titel: <input style="width: 300px; margin-left: 104px;" type="text" name="titel"> <input type="submit" value="UPLOAD"> </form> and upload.php: <head> <meta charset="utf-8"> </head> <?php if(isset($_POST['titel'])) { $con = mysqli_connect("localhost","trhdrth","fhrth","trhdrth"); $titel = mysqli_real_escape_string($con, $_POST['titel']); mysqli_query($con, "INSERT INTO artikel (titel) VALUES ('" . $titel . "')"); } ?> When titel is blablabla then everything i working but when it's ΡΠΌΠ΅ΡΠ½ΡΠ΅ then it' not working How to do it right? | 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. |
I'm looking for a book trilogy I started reading over 15 years ago where the main character was a ~15yr old boy that hadn't found his magic yet (magic was prevalent throughout the world), but he was getting by with mimicing the effects of magic via technology which was a banned school of magic (I think the school was called death magic or dead magic). If I recall correctly he runs off after being discovered by his mother practicing said magic (moving a boulder using a simple fulcrum/lever combo). | I have a vague recollection of a book I devoured while in college; it was from the late 80's or early 90's. I remember that there were two 'classes' of mages, the ones who could harvest magical energy from the environment and supply that power to the other 'class' of mages. The main character learned that he could reverse the flow and sap the other mage of his/her power. I also seem to remember that there was a lot of technological warfare and travel to the planets moon(s)? |
I would like to cite the following @article{ott2015, author = "Ott, Dennis and de Vries, Mark", title = "Right Dislocation as Deletion", journal = "Natural Language and Linguistic Theory", volume = "34", number = "2", pages = "641-690", year = "2015", DOI = "http://dx.doi.org/10.1007/s11049-015-9307.7", keywords = "ott15" } I use biber. But citing \cite{ott2015} gives me this: Ott and de Vries 2015 References Ott, Dennis and Mark de Vries (2015). βRight Dislocation as Deletionβ. In: Natural Language and Linguistic Theory 34.2, pp. 641β690. doi: . org/10.1007/s11049-015-9307.7. Any author whose name is not the first is sorted as "Firstname Lastname" instead of "Lastname, Firstname", even though LaTeX clearly recognizes which one is the last name and which one is the first name. Help? | With biblatex and verbose-trad2 style, I would like to reverse the order of the last name and the first name for inline references. The default behavior is: John DOE, Title, place : publisher, year for inline references (in my case, in a footnote with footcite command) and: DOE, John, Title, place : publisher, year in the bibliography at the end of the document. I would like to have both inline and final references in the following format (similar to the bibiography style). DOE, John, Title, place : publisher, year P-S : There are some close questions (like ) but only about the final bibliography (and no inline references). \DeclareNameAlias{sortname}{last-first} works only for the ending references (not inline ones). |
I ran into a situation like this: if(true,false) { cout<<"A"; } else { cout<<"B"; } Actually it writes out B. How does this statement works? Accordint to my observation always the last value counts. But then what is the point of this? Thanks | How does the comma operator work in C++? For instance, if I do: a = b, c; Does a end up equaling b or c? (Yes, I know this is easy to test - just documenting on here for someone to find the answer quickly.) Update: This question has exposed a nuance when using the comma operator. Just to document this: a = b, c; // a is set to the value of b! a = (b, c); // a is set to the value of c! This question was actually inspired by a typo in code. What was intended to be a = b; c = d; Turned into a = b, // <- Note comma typo! c = d; |
Find the derivative of $\sin_d x,$ if $\sin_d x$ is the sine of $x$ where $x$ is taken to be in degrees. please help me out solving this math question | I'm trying to show that the derivative of $\sin\theta$ is equal to $\pi/180 \cos\theta$ if $\theta$ is measured in degrees. The main idea is that we need to convert $\theta$ to radians to be able to apply the identity $d/dx \sin x = \cos x $. So we need to express $ \sin \theta$ as $$ \sin_{deg} \theta = \sin(\pi \theta /180), $$ where $\sin_{deg}$ is the $\sin$ function that takes degrees as input. Then applying the chain rule yields $$ d/d\theta [ \sin(\pi\theta/180)] = \cos(\pi \theta/180) \pi/180 = \frac{\pi}{180}\cos_{deg}\theta. $$ Is this derivation formally correct? |
what is the best way to bind a dropdown at client side using JQuery | As the question says, how do I add a new option to a DropDownList using jQuery? Thanks |
I want to write this: $ {\text{\huge N}}\limits_{i<k} $ and have it produce output comparable to this: $ \sum\limits_{i<k} $ That is, I want a sum with limits underneath it, but I want it with a capital nu instead of a capital sigma. My proposed approach doesn't work though. How does one get \limits on a custom operator? | I would like to create a new "big operator", by which I mean something like the Ξ£ character used for summations. I know about the \DeclareMathOperator* command, which creates an operator whose superscripts and subscripts are written directly above and below the operator. Here is an example of that. \documentclass{article} \usepackage{amsmath} \usepackage{amsfonts} \DeclareMathOperator*{\foo}{\maltese} \begin{document} \[ \foo_{i=3}^{6}(f^2(i)) \] \end{document} However, I would like to make my operator "big". I tried this: \DeclareMathOperator*{\foo}{\text{\Large $\maltese$}} but that feels like a bit of a hack. Besides, the operator is too high, and needs moving down a tad to align it properly with its operand. So, what's the proper way to do this? How, for instance, is the \sum operator defined? |
i have this code: try { String mode = readFile("fullScreen" , "0"); if(mode == "fullScreen"){ fullScreenBox.setSelected(true); }else{ fullScreenBox.setSelected(false); System.out.println(mode); } } catch (URISyntaxException e) { // TODO Auto-generated catch block e.printStackTrace(); } the code Reads a File with name "fullScreen" if its not exists returns "0" i set an if statement. The file inside right "fullScreen" and i have a println over there to check it and indeed i get the word "fullScreen" but the program do the nagitave action. what should be the error. The problem is that i'm using the readFile and also if statements with other files in the same folder and works fine. | I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug. Is == bad? When should it and should it not be used? What's the difference? |
This is the scenario: Package 1 has Public class Machine which has a protected variable protected int speed=3; I have another package , Package 2 ,which has Public class Car which is a child of Machine class and we also have a Public class Apple which has the main method. My question is : why speed is accesible from within Car class method/constructor but not from the instance of Car class created from main method present in Appple class. I am new in java please help ... | In Java, are there clear rules on when to use each of access modifiers, namely the default (package private), public, protected and private, while making class and interface and dealing with inheritance? |
I applied for a UK Standard Visitor visa a couple of months ago and was refused because I did not submit bank statements from the sponsor who had provided me with funds as pocket money/gift. Now, I have to apply for a PLAB visa in February, 2016. I intend to do that on the basis of my bank statements only with no help from a sponsor. What I need to know is, will the ECO ask for proof of the origin of the previous funds or just consider the statements that I shall provide with my PLAB visa application? | This post originates from a discussion at . I applied for a UK Standard Visitor visa for attending a competition, with my father funding the visit. They refused my visa saying: There is no evidence of the source of these funds. You have provided electricity bills but no evidence of your father's employment or income. However, when I submitted the visa application I didn't find any article about explaining unusual transactions or the occupation of the person funding my travel. Are these hidden requirements or buried somewhere where I didn't look? |
I'm trying to solve So far I've done the first part, evaluating the summation ; where a is just n. I'm not sure where to go from here or what it even means deduce the second summation. I understand that the summation of simply $$\sum\limits_{k=0}^n\cos(kx)$$ is derived from looking at the real part of $$\sum_{k=0}^n{\rm e}^{ikx} $$I'm guessing they want me to see how the second summation in the question is defined by 'playing around' with the original? | I am being asked to prove that $$\sum\limits_{k=0}^{n}\cos(kx)=\frac{1}{2}+\frac{\sin(\frac{2n+1}{2}x)}{2\sin(x/2)}$$ I have some progress made, but I am stuck and could use some help. What I did: It holds that $$\sum\limits_{k=0}^{n}\cos(kx)=\sum\limits_{k=0}^{n}Re(\cos(kx))=\sum\limits_{k=0}^{n}Re(\cos(x)^{k})=Re(\sum\limits_{k=0}^{n}\cos(x)^{k})=Re\left(\cos(0)\cdot\frac{\cos(x)^{n}-1}{\cos(x)-1}\right)=Re\left(\frac{\cos(x)^{n}-1}{\cos(x)-1}\right) $$ For any $z_{1},z_{2}\in\mathbb{C}$ we have it that if $z_{1}=a+bi,z_{2}=c+di$ then $$\frac{z_{1}}{z_{2}}=\frac{z_{1}\overline{z2}}{|z_{2}|^{2}}=\frac{(a+bi)(c-di)}{|z_{2}|^{2}}=\frac{ac-bd+i(bc-ad)}{|z_{2}|^{2}}$$ hence $$Re\left(\frac{z_{1}}{z_{2}}\right)=\frac{Re(z_{1})Re(z_{2})-Im(z_{1})Im(z_{2})}{|z_{2}|^{2}}$$ Thus, $$Re\left(\frac{\cos(x)^{n}-1}{\cos(x)-1}\right)=\frac{(\cos(nx)-1)(\cos(x)-1)-\sin(nx)\sin(x)}{(\cos(x)-1)^{2}+\sin^{2}(x)}=\frac{\cos(nx)\cos(x)-\cos(nx)-\cos(x)+1-\sin(nx)\sin(x)}{\cos^{2}(x)-2\cos(x)+1+\sin^{2}(x)}=\frac{\cos(nx)\cos(x)-\cos(nx)-\cos(x)+1-\sin(nx)\sin(x)}{-2\cos(x)+2}=\frac{\cos(nx)\cos(x)-\cos(nx)-\cos(x)+1-\sin(nx)\sin(x)}{-2(\cos(x)-1)}= \frac{=\cos(nx)\cos(x)-\cos(nx)-\cos(x)+1-\sin(nx)\sin(x)}{-2(-2\cdot\sin^{2}(x/2))}=\frac{\cos(nx)\cos(x)-\cos(nx)-\cos(x)+1-\sin(nx)\sin(x)}{4\sin^{2}(x/2)}=\frac{\cos(nx)\cos(x)-\cos(nx)-\cos(x)+1-\sin(nx)\sin(x)}{4\sin^{2}(x/2)}=\frac{\cos(x(n+1))-\cos(nx)-\cos(x)+1}{4\sin^{2}(x/2)} $$ This is the part where I am stuck, I would appriciate any help or hint on how to continue. Edit: Given the corrections by AndrΓ© I get: $$(\cos(nx+x)-1)(\cos(x)-1)+\sin(nx+x)\sin(x)=\cos(nx+x)\cos(x)-\cos(nx)-\cos(x)+1+\sin(nx+x)\sin(x)$$ so $$\cos(nx+x)\cos(x)+\sin(nx+x)\sin(x)=\cos(xn+x-x)-\cos(nx)=0$$ Edit 2: I found anoter mistake in the above, I will try to correct Edit 3: When multiplying correctly the above it works out :-) |
I want a tool that offers tail-like functionality for large files. (which are in a remote server and mounted on my system, for what that matters). I am aware of but I am having issues with auto reload on Ubuntu 16.04.01 as I describe . Incorporation of custom coloring schemes is also needed. I would like to avoid terminal based solutions such as multiline and | Could you recommend a GUI application with powerful log watching capabilities? Generally it would work as tail -f in GUI, but on top of that following features would be very useful: filtering out some lines based on (regular) expressions coloring some lines based on (regular) expressions interactive search saveable configuration easily applicable to different files notifications based on (regular) expressions A similar tool on Windows is and its paid version - |
I had a problem with booting windows 10 because I've changed the bootmgr path using : bcdedit /set {bootmgr} newpath after rebooting it said that the boot sector is corrupted. Using Linux I can enter to the windows EFI partition and see the bootmgr file, but unfortunately the file is in binary (I've used a hex editor to open it). Is it possible to replace it with another bootmgr file ? if so from where to download it else is it possible to change the path using a hex editor ? P.S : I've already used the windows rescue CD to run command and fix it from there but it doesn't work | NVIDIA drivers upgrade crashed my Windows 7 installation, so I'm working to undo the damage. What I can do: I can boot Windows install from the USB drive, and I can boot the . Although automated Windows repair fails, I can get to command prompt when I boot Windows install from USB drive, and I can see my drive and all my data. What I cannot do: I cannot boot into Windows - I get this message: Windows failed to start. A recent hardware or software change might be the cause. To fix the problem: 1. Insert Windows CD and run a repair your computer option. File: /Boot/BCD Status: 0xc000000f Info: an error occurred while attempting to read the boot configuration data. It seems that something is wrong with my /Boot/BCD, so I'm trying to recreate it from scratch. I've tried all the methods detailed (including Windows repair which fails), and I'm left with the last one (near the bottom of that page). When I type the following command as in the tutorial: bcdedit.exe /import c:\boot\bcd.temp ...it fails with the following error: The store import operation has failed. The requested system device cannot be found. Many Google results say that I must use diskpart to set my partition active, however it's already set as active. Also, when I try this: bcdedit /enum It fails with similar message: The boot configuration data store could not be opened. The requested system device cannot be found. Does anyone know what does that error message mean, and what is the requested system device? I'd like to avoid having to reinstall Windows since all the files on disk seem to be fine. |
There are numerous questions/answers on which equation-type environment to use under which circumstances. For a single-line equation, various people have expressed a preference of equation over gather (even in the amsart class or using amsmath) because they deem it simpler or because they feel that equation should be used for single-line equations because gather is intended for multi-line equations. I get all that. My question is: are there any typographical advantages of using equation over gather in the single-line case, i.e. are there examples in which gather produces undesired spacing or other problems when equation works well? \documentclass{amsart} \begin{document} \noindent This equation \begin{equation} x =y \end{equation} looks the same to me as this equation: \begin{gather} x=y \end{gather} Doesn't it? \end{document} EDIT: ok, in light of David Carlisle's comment, let me ask a follow-up question. What would be the easiest way of changing LaTeX's behavior to potentially use the shortdisplayskip feature in multi-line equations, also? (I'm not asking whether or not you think this is desirable.) | I am typesetting a physics document, and sometimes I need to type equations of several lines while in most cases I only need to type one-line formula. So is it OK if I always use align environment instead of switching between align and equation What are their differences? |
I have written a method deleteProject(Project project) in Administrator.java which sets the project to null. After this I tried to write a test method which calls the deleteProject(Project project)-method and checks if the Object project == null. This is not the case. I have put 3 system.out.println(project) into the methods. If you look at the output the project is set to null in the deleteProject(Project project), but for some reason it still printed in AdministratorTest. I can't figure out why project doesn't stay null. AdministratorTest.java @Before public void setUp() throws Exception { admin1 = new Administrator("Sponge", "Bob", "Squarepants", "Spongy"); project = admin1.createProject(new VersionID(2, 3), "ProjectX", "Secret", new Date(93, 10, 17)); } @After public void tearDown() throws Exception { admin1 = null; project = null; } @Test public void testDeleteProject() { assertEquals("2.3", project.getVersion().toString()); assertEquals("ProjectX", project.getName()); assertEquals("Secret", project.getDescription()); assertEquals("Wed Nov 17 00:00:00 CET 1993", project.getStartDate().toString()); admin1.deleteProject(project); System.out.println(project); assertNull(project); } Administrator.java public void deleteProject(Project project) { System.out.println(project); project = null; System.out.println(project); } Output model.Project@6d5380c2 null model.Project@6d5380c2 | I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation? |
Can someone tell me how to get past this image in the terminal. | After a recent update, ttf-mscorefonts-installer prompted me to accept its license agreement. βββββββββββββββββββ€ Configuring ttf-mscorefonts-installer βββββββββββββββββββ β β β TrueType core fonts for the Web EULA β β END-USER LICENSE AGREEMENT FOR MICROSOFT SOFTWARE β β IMPORTANT-READ CAREFULLY: This Microsoft End-User License Agreement β ("EULA") is a legal agreement between you (either an individual or a β single entity) and Microsoft Corporation for the Microsoft software β accompanying this EULA, which includes computer software and may include β associated media, printed materials, and "on-line" or electronic β documentation ("SOFTWARE PRODUCT" or "SOFTWARE"). By exercising your β rights to make and use copies of the SOFTWARE PRODUCT, you agree to be β bound by the terms of this EULA. If you do not agree to the terms of β this EULA, you may not use the SOFTWARE PRODUCT. β β <Ok> β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ Screenshot: For some reason my terminal will not allow me to accept, or for some reason I am pressing the wrong hotkey... I've tried every letter on the keyboard and Enter among others... I'm sure there is a very simple and obvious solution to this. I've also just tried to remove the package completely however the terminal states that due to the package not being correctly installed, I should reinstall the package before removing it. Very frustrating! Essentially, because I cannot successfully install this package, I can't really ever upgrade my system because I always have to end up terminating the terminal with the license agreement (thus the upgrade fails). |
I couldn't find a way to change this in an upgrade friendly way, and I know I mustn't touch the core! I need to change the value 'number' to 10 in wp-includes/default-widgets.php wp_tag_cloud( apply_filters('widget_tag_cloud_args', array('taxonomy' => $current_taxonomy, 'number' => 10) ) ); How can I do this without changing the core? | By default, the WordPress tag cloud widget has a set amount of 45 tags to display. This can be seen in the wp-includes/category-template.php file. By default, the WooCommerce plugin which I have installed, and it's products tag cloud widget also resembles this. How do I modify this amount from within my wp-content/themes/functions.php file, to display for example, only 15 product tags? Here is what I have so far, but it is not working. function custom_tag_cloud_widget($args) { $args['smallest'] = 8; //smallest tag $args['largest'] = 22; //largest tag $args['number'] = 15; //adding a 0 will display all tags $args['unit'] = 'pt'; //tag font unit return $args; } add_filter( 'widget_tag_cloud_args', 'custom_tag_cloud_widget' ); When changing the number within the core wp-includes.php/category-template.php file to 15 however, it does work. Obviously, I don't wish to edit any core files and am looking for an alternative solution. Thanks. |
"Dates & Times" for Brazil are lower case while other locations it is title case. I am using Ubuntu 18.04. Where should I report this issue? I still don't have an answer. Many languages have Month/Week names with Title case. It happens that for Portuguese (Brazil) Pt-Br they are in a lower case like shown in the image below. Do you know where I can place a bug report about that? | I found a problem with an application on Ubuntu. Questions : How do I best report the issue? What sort of information should I provide? |
I want to open files using Windows applications in Linux Subsystem. E.g. call the atom command to open Atom installed in Windows. How would I do this? | I got the latest update from Windows that adds bash, and I was trying to script the execution of an Android emulator through this; however the Path variables of Windows are not taken into account for bash. Plus I tried executing adb manually and I got: andtest@DESKTOP:/mnt/c/Android/sdk/platform-tools$ exec ./adb.exe bash: /mnt/c/Android/sdk/platform-tools/adb.exe: cannot execute binary file: Exec format error Is there something I'm missing here? I want to use this Windows computer as a test server for Android. |
This is with OSX. When I run this in a terminal scottcarlson$ sudo dd if=Downloads/CentOS-7-x86_64-Everything-1511.iso of=/dev/disk2 2> Desktop/out.txt and then this in another tail -f Desktop/out.txt it only updates the log when I press Ctlt in the first terminal with the dd. Is this because of the nature of dd? I don't know exactly how it writes to devices, but could it be too demanding for the process to take a break and write to the log? | I've not used dd all that much, but so far it's not failed me yet. Right now, I've had a dd going for over 12 hours - I'm writing an image back to the disk it came from - and I'm getting a little worried, as I was able to dd from the disk to the image in about 7 hours. I'm running OSX 10.6.6 on a MacBook with a Core 2 Duo at 2.1ghz/core with 4gb RAM. I'm reading from a .dmg on a 7200rpm hard drive (the boot drive), and I'm writing to a 7200rpm drive connected over a SATA-to-USB connector. I left the blocksize at default, and the image is about 160gb. EDIT: And, after 14 hours of pure stress, the dd worked perfectly after all. Next time, though, I'm going to run it through pv and track it with strace. Thanks to everyone for all your help. |
Pauli's exclusion principle tells us (in an informal language) that each and every electron in an atom is unique. When I searched for a derivation , I got nil everywhere (even the wiki site says only that it's equivalent to anti-symmetry of wave functions with respect to exchange). However the concept of anti-symmetric wave functions is itself another aspect of the principle. So , my question is straight : can we derive the principle theoretically? As I know , in mathematics uniqueness can indeed be proved rigorously by logic and reasoning, and this gives me a hope that the principle can be derived from sounder mathematical principles. Any suggestions are welcome. | "No theoretical proof of the Pauli's Exclusion Principle can be given as yet and for the present it must be regarded as something empirical added to and regulating the vector atom model." I've found it in Atomic & Nuclear Physics by N. Subrahmanyam & Brij Lal. My question is "What was the motivation behind Pauli's Exclusion Principle? Is that just an ad-hoc intuitive attempt of Pauli to explain the Zeeman effect or it was derived on the basis of mathematics? If mathematical then how? " |
I want to replace Windows 8.1 that came with my laptop with Ubuntu 14.04. I keep getting a black screen with this line: SYSLINUX 4.07 EDD 2013-07-25 Copyright (C) 1994-2013 H. Peter Anvin et al Things I did before: turned off fast boot disabled secure boot switched to Legacy instead of UEFI (even though a tutorial I found said this isn't really needed anymore, I still did anyway because I read it from the laptop's user guide: "If you need to install a legacy operating system, such as Windows (that is, any operating system before Windows 8), Linux or Dos, etc on your computer, you must change the boot mode to Legacy support." I chose to load from USB. and then that SYSLINUX 4.77 EDD.... appears I tried to install using the same USB on an old Lenovo S10-3. It worked. Though that S10-3 runs Lubuntu. Still it's probably safe to say that it's not the USB that has problems, right? Thanks for any help. I can't wait to have Ubuntu :) edit: This might be useful info. The USB is 16GB X-Stor Fat32. I used YUMI. | I am trying to install linux on my laptop, a Toshiba Satellite C6550-S5200. I did it once but something happened so I removed it then I had to destroy all data on hard drive so now I have nothing on it. Well I got a iso file burned to a CD and to a flash drive. With the flash drive I get. SYSLINUX 4.06 EDD 4.06-pre7 Copyright (C) 1994-2012 H. Peter Anvin et al With the CD it will start booting it but somewhere loading it up, the dots turn all orange and stay that way and my CD drive turns quiet. Oh and some more info the images work because I tried loading them up on another pc and it worked just fine. I manage to get the CD to boot I just had to let me pc boot up first then insert the CD and have it boot the CD then. Once I get done installing ubuntu it works fine but I have to leave the PC on 24/7 for if I turn it off the PC will freeze 5-10 seconds after booting back up no matter how I install it. |
What do you think about puting regulators lm75xx in series in order to get less heat loss as possible : 9v-- to 5v-- to 3.3v , to get 3.3v from 12v supply? The idea is to not using a switching regulation or lm317 regulation direct regulator | I'm new in electronics. I want provide 9V (VVD9) and 5V (VCC) for my electronic board including power mosfets (IRF 3205), high power LED (14V-3.5A), micro-controller (at-mega16), and etc. I use this strategy to provide those voltages for aforementioned elements as depicted below: For more details I provide the main part of circuit as shown below. The circuit provides strobe (5Hz-2%duty cycle) for LEDs and a Camera: I have two questions: Is using that strategy (shown in first image) good? As depicted in first image, input voltage is 24V. I Also use it for high power LEDs (in second image). Is there any side effect? (for example, voltage drops when LEDs are pulsing). Any help or suggestion will be appreciated. |
Runing echo "zyc.txt" | openssl dgst -sha512 (stdin)= 11aa472bf4c97ffb1fae06a3f7175127da084c5dfb840038ee308b37136330e5b6a56cc053c62881f10aec88948d8addb1d4844496cdb08e4067b4fd4601330e or echo "zyc.txt" | sha512sum 11aa472bf4c97ffb1fae06a3f7175127da084c5dfb840038ee308b37136330e5b6a56cc053c62881f10aec88948d8addb1d4844496cdb08e4067b4fd4601330e Output is wrong, hash should be DDD2379F9A1ADF4F0AFA0BEFAFDB070FB942D4D4E0331A31D43494149307221E5E699DA2A08F59144B0ED415DEA6F920CF3DAB8CA0B740D874564D83B9B6F815 Here is info on my computer Linux MobileSpace 4.14.0-3-amd64 #1 SMP Debian 4.14.17-1 (2018-02-14) x86_64 GNU/Linux sha512sum --version sha512sum (GNU coreutils) 8.28 Copyright (C) 2017 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by Ulrich Drepper, Scott Miller, and David Madore. Is this a bug or am I doing it wrong? | I want to find the md5 hash of the string "a", but running echo "a" | md5sum gives me another hash than what I get if I search the internet (for example using or ). Running echo "a" | md5sum gives me "60b725f10c9c85c70d97880dfe8191b3", but it should be "0cc175b9c0f1b6a831c399e269772661". If I make a reverse hash lookup for "60b725f10c9c85c70d97880dfe8191b3", I do however get "a". |
I am working on industrial output data and running a lot of tests for it, before I proceed to make an ARIMA model for it. Before I do that, I need to decide whether or not to "log" the data. I am having trouble spotting whether the data is growing exponentially or not. And even if it's not - it's logical to assume that industrial growth has constant growth and its variance goes up with time. Bottom line - would you advise to log the data in general (not just for ARIMA) when I do things like seasonally adjust it and smooth it, etc. | With the below dataset, I have a series which needs transforming. Easy enough. However, how do you decide which of the SQRT or LOG transformations is better? And how do you draw that conclusion? x<-c(75800,54700,85000,74600,103900,82000,77000,103600,62900,60700,58800,134800,81200,47700,76200,81900,95400,85400,84400,103400,63000,65500,59200,128000,74400,57100,75600,88300,111100,95000,91500,111400,73700,72800,64900,146300,83100,66200,101700,100100,120100,100200,97000,120600,88400,83500,73200,141800,87700,82700,106000,103900,121000,98800,96900,115400,87500,86500,81800,135300,88900,77100,109000,104000,113000,99000,104500,109400,92900,88700,90500,140200,91700,78800,114700,100700,113300,122800,117900,122200,102900,85300,92800,143800,88400,75400,111200,96300,114600,108300,113400,116600,103400,87300,88200,149800,90100,78800,108900,126300,122000,125100,119600,148800,114600,101600,108800,174100,101100,89900,126800,126400,141400,144700,132800,149000,124200,101500,106100,168100,104200,79900,126100,121600,139500,143100,144100,154500,129500,109800,116200,171100,106700,85500,132500,133700,135600,149400,157700,144500,165400,122700,113700,175000,113200,94400,138600,132400,129200,165700,153300,141900,170300,127800,124100,206700,131700,112700,170900,153000,146700,197800,173800,165400,201700,147000,144200,244900,146700,124400,168600,193400,167900,209800,198400,184300,214300,156200,154900,251200,127900,125100,171500,167000,163900,200900,188900,168000,203100,169800,171900,241300,141400,140600,172200,192900,178700,204600,222900,179900,229900,173100,174600,265400,147600,140800,171900,189900,185100,218400,207100,178800,228800,176900,170300,251500,149900,150300,192000,185100,184500,228800,219000,180000,241500,184300,174600,264500,166100,151900,194600,214600,201700,229400,233600,197500,254600,194000,201100,279500,175800,167200,235900,207400,215900,261800,236800,222400,281500,214100,218200,295000,194400,180200,250400,212700,251300,280200,249300,240000,304200,236900,232500,300700,207300,196900,246600,262500,272800,282300,271100,265600,313500,268000,256500,318100,232700,198500,268900,244300,262400,289200,286600,281100,330700,262000,244300,309300,246900,211800,263100,307700,284900,303800,296900,290400,356200,283700,274500,378300,263100,226900,283800,299900,296000,327600,313500,291700,333000,246500,227400,333200,239500,218600,283500,267900,294500,318600,318700,283400,351600,268400,251100,365100,249100,216400,245500,232100,236300,275600,296500,296900,354300,277900,287200,420200,299700,268200,329700,353600,356200,396500,379500,349100,437900,350600,338600,509100,342300,288800,378400,371200,395800,450000,414100,387600,486600,355300,358800,526800,346300,295600,361500,415300,402900,484100,412700,395800,491300,391000,374900,569200,369500,314900,422500,436400,439700,509200,461700,449500,560600,435000,429900,633400,417900,365700,459200,466500,488500,531500,483500,485400,575700,458000,433500,642600,409600,363100,430100,503900,500400,557400,565500,526700,628900,547700,520400,731200,494400,416800,558700,537100,556200,686700,616600,582600,725800,577700,552100,806700,554200,455000,532600,693000,619400,727100,684700) y<-ts(x,frequency=12, start=c(1976,1)) #Transforming the data to log or sqrt and plotting it log.y<-log(y) plot(log.y) sqrt.y<-sqrt(y) plot(sqrt.y) |
I am trying to draw a Moore machine with TikZ. This is what I have so far: \documentclass{minimal} \usepackage{tikz} \usetikzlibrary{arrows,automata,positioning} \begin{document} \begin{tikzpicture}[>=latex',shorten >=1pt,node distance=3cm,on grid,auto] \node[state,initial] (q0-e) {$q_0/\epsilon$}; \node[state] (q0-1) [below right=of q0-e] {$q_0'/1$}; \node[state] (q1-0) [above right=of q0-1] {$q_1/0$}; \node[state] (q2-1) [below right=of q1-0] {$q_2/1$}; \node[state,accepting] (q3-0) [below left=of q0-1] {$q_3/0$}; \node[state,accepting] (q3-1) [below right=of q0-1] {$q_3'/1$}; \path[->] (q0-e) edge node {a} (q1-0); \path[->] (q0-e) edge node {b} (q3-0); \path[->] (q0-1) edge node {a} (q1-0); \path[->] (q0-1) edge [bend right] node {b} (q3-0); \path[->] (q1-0) edge [bend left=90,looseness=2.5] node {a} (q3-1); \path[->] (q1-0) edge node {b} (q2-1); \path[->] (q2-1) edge node {a} (q0-1); \path[->] (q2-1) edge node {b} (q3-1); \path[->] (q3-0) edge node {a} (q3-1); \path[->] (q3-0) edge [bend right] node {b} (q0-1); \path[->] (q3-1) edge [loop below] node {a} (q3-1); \path[->] (q3-1) edge node {b} (q0-1); \end{tikzpicture} \end{document} And it produces the automaton below: But I would like to have the edge from $q_1/0$ to $q_3'/1$ to pass "outside" the automaton, like shown by the red line of the following picture: Can anyone show how to achieve that? Thanks. | Using Tikzpicture, I have the following automata: \documentclass{article} \usepackage{tikz} \begin{document} \usetikzlibrary{positioning,arrows,automata} \begin{center} \begin{tikzpicture}[>=stealth',shorten >=1pt,node distance=2cm,on grid,initial/.style={}] \node[state,initial] (a0) {}; \node[state] (a1) [right =of a0] {}; \node[state] (a2) [right =of a1] {}; \node[state] (a3) [above =of a2] {}; \node[state] (a4) [below =of a0] {}; \node[state] (a6) [right =of a4] {}; \node[state] (a7) [right =of a2] {}; \node[state] (a8) [right =of a7] {}; \node[state] (a9) [right =of a8] {}; \node[state] (a5) [above =of a9] {}; \node[state] (b0) [right =of a6] {}; \node[state] (b1) [right =of b0] {}; \node[state] (b2) [right =of b1] {}; \node[state] (b3) [right =of b2] {}; \node[state] (b4) [right =of a9] {}; \tikzset{every node/.style={fill=white}} \tikzset{mystyle/.style={->,double=red}} \path (a4) edge [mystyle] node {$0$} (a6) (a2) edge [mystyle] node {$0$} (a7) (b0) edge [mystyle] node {$0$} (b1); \tikzset{mystyle/.style={->,double=blue}} \path (a3) edge [mystyle] node {$1$} (a5) (a8) edge [mystyle] node {$1$} (a9) (b2) edge [mystyle] node {$1$} (b3); \tikzset{mystyle/.style={->,double=yellow}} \path (a0) edge [mystyle] node {$\varepsilon$} (a1) (a1) edge [mystyle] node {$\varepsilon$} (a2) (a1) edge [mystyle] node {$\varepsilon$} (a3) (a1) edge [mystyle] node {$\varepsilon$} (a4) (a6) edge [mystyle] node {$\varepsilon$} (b0) (a7) edge [mystyle] node {$\varepsilon$} (a8) (b1) edge [mystyle] node {$\varepsilon$} (b2) (a9) edge [mystyle] node {$\varepsilon$} (b4) (a5) edge [mystyle] node {$\varepsilon$} (b4) (b3) edge [mystyle] node {$\varepsilon$} (b4); \end{tikzpicture} \end{center} \end{document} Now, I want to add a yellow epsilon arrow from the node on the far left (a0) to the node on the far right (b4). However, I have absolutely no idea how to do this without the arrow cutting through the rest of the automata. Can I get some help here? |
I'm trying to import a background image, and it shows the file name, but it does not show up. I put it in Ortho view but it still wouldn't show. I tried with lots of images just to make sure the image was corrupted or something. Any ideas? | How do I put a backdrop behind the model that I am creating so that I can compare the picture to the model while editing? |
A $100Γ100$ grid is colored with four colors. There are exactly 25 blocks of each color in every row and column. Prove that there exists an intersection between two rows and columns such that all four intersecting blocks have different colors. I am trying to prove this using invariance. But I don't know how to proceed. I also don't know if this is the correct approach so any ideas is appreciated:) | We have a $100\times100$ board divided into $10^4$ unit squares. These squares are coloured with four colours so that every row and every column has $25$ squares of each colour. Prove that there are $2$ rows and $2$ columns such that their $4$ intersections are painted with different colors. My attempt: I first counted number of pairs $\mathcal P$ $(r_1,r_2)$ such that $r_1,r_2$ belongs to same row, but different in colour. This can be done in $$\binom 42\times25\times 25$$ ways. So, in $100$ rows, this number is $$100\times\binom 42\times25\times 25$$ Now, we can find a pair of columns in $$\binom{100}2$$ ways. So, by Pigeonhole Principle, we can find at least a pair of columns containing $$\left\lceil\frac{100\times\binom 42\times25\times 25}{\binom{100}2}\right\rceil\\=\left\lceil\frac{100\times75\times 50}{50\times99}\right\rceil\\=76$$ of those pairs $\mathcal P$. But unable to proceed anymore. And this approach too seems misleading, because in every pair of columns, we can always find $\binom42\times25\times25$ pairs from $\mathcal P$. So, this approach makes no sense, I think. What should be correct approach? And also, "if we pour $nk+1$ objects into $n$ urns, then there is an urn with $k+1$ objects", can this concept be plugged in this question? |
With two lists of different sizes: numbers=[1,2,3,4,5] cities=['LA','NY','SF'] I need to get this: result={1:'LA', 2:'NY', 3:'SF'} I thought of doing it with: result={number:cities[numbers.index(number)] for number in numbers if numbers.index(number)<len(cities)} But this one-liner gets kind of long. I wonder if there is an alternative way of achieving the same goal. EDITED LATER: There were multiple suggestions made to use zip: dict(zip(cities, numbers)) While it is a definitely a simpler syntax than list comprehension I've used I wonder which would be faster to execute? | Imagine that you have the following list. keys = ['name', 'age', 'food'] values = ['Monty', 42, 'spam'] What is the simplest way to produce the following dictionary? a_dict = {'name': 'Monty', 'age': 42, 'food': 'spam'} |
I have a weird problem. My IDE says everthing about my code is alright but when I try to run it, it says an error has occured and the program doesn't run. I've read through the code again but I simply don't know what to do to get it working. I'm hoping you could help me out with this issue. Thanks in advance. package twobuttons; import java.awt.FlowLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JOptionPane; public class TwoButtons extends JFrame implements ActionListener { JButton button1; JButton button2; JLabel label; public static void main(String[] args){ new TwoButtons(); } public TwoButtons(){ this.setTitle("Dos botones"); this.setSize(400,400); this.setDefaultCloseOperation(EXIT_ON_CLOSE); this.setLayout(new FlowLayout()); button1.setText("hola"); button1.addActionListener(this); button1.setActionCommand("hola"); button2.setText("Te odio."); button2.addActionListener(this); button2.setActionCommand("Te odio."); button1.add(this); button2.add(this); this.setVisible(true); } @Override public void actionPerformed(ActionEvent e) { String command= e.getActionCommand(); if (e.getActionCommand().equals("hola")){ JOptionPane.showMessageDialog(this.getComponent(0), "Espero que tengas un buen dΓa"); } else { JOptionPane.showMessageDialog(this.getComponent(0), "Odio mi vida"); } }} And the error I get is: Exception in thread "main" java.lang.NullPointerException at twobuttons.TwoButtons.<init>(TwoButtons.java:28) at twobuttons.TwoButtons.main(TwoButtons.java:18) C:\Users\Juan\Desktop\Informatik 12\TwoButtons\nbproject\build-impl.xml:1040: The following error occurred while executing this line: C:\Users\Juan\Desktop\Informatik 12\TwoButtons\nbproject\build-impl.xml:805: Java returned: 1 BUILD FAILED (total time: 1 second) | What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them? What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely? |
I don't really know the official name of what I've made but it can't be the first time this has been made, so apologizes up front for not knowing every term. My question, is a table as outlined below normalized? pk fk description 1 1 domains 2 1 people 3 1 cars 4 2 tom 5 2 smith 6 3 vmw 7 2 betty 8 3 ford The main 'rule' this table confuses me about is A table should store only data for a single type of entity. It stores domain information, but it stores multiple domains' information. A example use for this table, fetch the domain of people. select * from domains where fk = 2 which returns pk fk description 4 2 tom 5 2 smith 7 2 betty The fk is the 'domain' the item is in, which is the pk of the domain. This is what to me is self-defining because this table defines which domains it contains. | We process a routine data feed from a client who just refactored their database from a form that seems familiar (one row per entity, one column per attribute) to one that seems unfamiliar to me (one row per entity per attribute): Before: one column per attribute ID Ht_cm wt_kg Age_yr ... 1 190 82 43 ... 2 170 60 22 ... 3 205 90 51 ... After: one column for all attributes ID Metric Value 1 Ht_cm 190 1 Wt_kg 82 1 Age_yr 43 1 ... 2 Ht_cm 170 2 Wt_kg 60 2 Age_yr 22 2 ... 3 Ht_cm 205 3 Wt_kg 90 3 Age_yr 51 3 ... Is there a name for this database structure? What are the relative advantages? The old way seems easier to place validity constraints on specific attributes (non-null, non-negative, etc.) and easier to calculate averages. But I can see how it might be easier to add new attributes without refactoring the database. Is this a standard/preferred way of structuring data? |
In Bash, when I do: foo="*" echo $foo It expands * to the contents of the current folder. How do I make sure it just prints a literal *? The same, by the way, happens with a regular echo "$foo", it prints the contents of the current folder. | Or, an introductory guide to robust filename handling and other string passing in shell scripts. I wrote a shell script which works well most of the time. But it chokes on some inputs (e.g. on some file names). I encountered a problem such as the following: I have a file name containing a space hello world, and it was treated as two separate files hello and world. I have an input line with two consecutive spaces and they shrank to one in the input. Leading and trailing whitespace disappears from input lines. Sometimes, when the input contains one of the characters \[*?, they are replaced by some text which is is actually the name of files. There is an apostrophe ' (or a double quote ") in the input and things got weird after that point. There is a backslash in the input (or: I am using Cygwin and some of my file names have Windows-style \ separators). What is going on and how do I fix it? |
In measure theory, there are set classes, rings, fields, etc. Does it have something to do with that of abstract algebra? | I've done some search in Internet and other sources about this question. Why the name ring to this particular object? Just curiosity. Thanks. |
I'm using the command \pagestype{myheadings} to make sure that the page header contains nothing else that the page number. However, I can't manage to make the page number of the first page of chapter to be displayed up in the page corner. Here is a sample code of what I'm doing so far: \documentclass[12pt,a4paper]{book} \usepackage[T1]{fontenc} \usepackage[french]{babel} \pagestyle{myheadings} \title{Test book} \author{Someone} \date{\today} \usepackage{lipsum} \begin{document} \sloppy \maketitle \chapter{First chapter} \lipsum[1-100] \backmatter \tableofcontents \end{document} Best rgards! | I am working on a long document in LaTeX with documentclass book. I need the page number to always be in the upper right corner of each page, even if that page is the first page of a chapter (right now on 1st pages of chapters, the page number is bottom-centered, on all other pages it's top-right). I control the position of the page number with fancyhdr: \usepackage{fancyhdr} \pagestyle{fancy} \lhead{} \chead{} \rhead{\thepage} \lfoot{} \cfoot{} \rfoot{} \renewcommand{\headrulewidth}{0pt} Also, I don't know if the problem is related but my chapters do not start from the top of the page. There is a white area, then comes chapter X, then a newline with the chapter line. What I also want is the chapter to start from the top of the page. The main question here is how I can get the page number to always appear in the upper right corner, I mention the thing with the chapter title position only in case that might be related. |
I edited a question and made a typo on the revision's title itself. When trying to edit this revision to fix this typo in the revision's title, the update is not applied when clicking on Save Edits button. I am not sure about filling a bug report here, do not hesitate to point it out if I am mistaken. | It often occurs to me to add an edit summary to a question-edit immediately after submitting the edit, especially if the changes aren't obvious (formatting etc.). So I: Click "edit" again. Fill in the summary Click on "Save Edits". The 'edit' (no actual change has been made to the title/body/tags) is accepted, but the summary doesn't show up, i.e. it is silently rejected. I don't think it should work this way because the summary has been added by the original editor within the original edit's edit-window. In fact if I remember correctly, it to used to work as expected earlier; so perhaps this is a recent change. |
problem is that: apt-get install default-jre E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it? before that i 've already run update command it was ok but at last i got this type of message: E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it? | I get this error when trying to use apt-get: E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/) is another process using it? How can I fix this? |
Take this function from demofunc(){ local variable="hellow" echo $variable } val=$(demofunc) echo $val and be able to use the information inside of a C# application. For my specific case I'm trying to return the 'pointed to' filepath of a symlink, which I can get to echo, but can't figure out how to actually use that data. I've tried this with a process, but I get a blank value: Process compiler = new Process(); using (compiler) { compiler.StartInfo.FileName = "/bin/bash"; compiler.StartInfo.Arguments = $"Output=$(readlink {symlink} | less; echo $Output)"; compiler.StartInfo.UseShellExecute = false; compiler.StartInfo.RedirectStandardOutput = true; compiler.Start(); var line = compiler.StandardOutput.ReadLine(); Console.WriteLine("LINE, this is OUTPUT: " + line); Console.WriteLine("Symlink:" + symlink); } | How do I invoke a console application from my .NET application and capture all the output generated in the console? (Remember, I don't want to save the information first in a file and then relist as I would love to receive it as live.) |
Many sources define vectors to be geometric objects that have length and direction. I don't think this is rigorous enough a definition because I have learnt from other sources that there are other things besides vectors which have direction and magnitude. Also, a physics book that I use says that having length and direction is a necessary condition but not sufficient as vectors also need to satisfy the laws of vector addition. Is a vector simply an arrow in space? Is there a reason as to why so many physical quantities are vectors? These are some questions I hope to be able to answer once I know what a vector actually is. So it would be great if you could shed some light on these questions too. | What is basically a vector ? I am not a starter in learning vectors , have used them in physics and mathematics and done with 1st year of my BS in physics . But what is a vector basically ? Is it anything that has direction and magnitude ? or is it something that obeys vector laws , but this statement seems kind of circular ? How can we go about doing geometry using vectors ? and represent shapes in euclidean geometry using vectors ? |
Is it possible to install Ubuntu Raring Ringtail 13.04 without CD or USB? | So basically as it stands I have a laptop which has no cd/dvd drive, and I don't have a usb drive. The laptop has windows 7 installed with ubuntu 11.04 installed through wubi. What I want to do is remove windows completely, and make ubuntu the only OS installed on the system. Is there a way to do this without re-installing ubuntu? (i.e. can I take my wubi install away from windows?) or is there a way to from inside ubuntu have it run the ubuntu iso somehow so I can just wipe the system and install it fresh? (even if it means I need to have an e.g. 2gb partition just for the image to reside in). |
I'm using HP Pavilion g6 running Windows 7, I would like to uninstall windows and replace it with Ubuntu. I know the installer has an option, there are virtually no mportant files on Windows 7, I just want to know if any risks will stop the PC booting. EDIT: No, I cannot run alongside Windows 7 alongside, the only other option is "Inside" Windows 7. I don't want Windows 7. | My laptop is filled with viruses and Windows XP is just becoming impossible to work with. I've been interested in Ubuntu for a while, so, would I be able to use something like Debian to clear my HDD and OS and then install Ubuntu and start fresh? |
Iβm not sure if this is the right place to ask but Iβve been unable to figure out what exactly this is. Itβs an effect, seemingly unintentional, that makes people and things have orange blurs around them, making them look like their souls are leaving their bodies or something (haha). I say itβs from βoldβ cameras because the instances Iβve seen them had been captured in the year 2005. My best guess is that this is caused by the people moving around too much and the camera lagging on their previous position, or some other processing error. Iβve attached some photos of a Flyleaf concert that hopefully demonstrate what I mean. | I've heard this term of "dragging the shutter". What does this mean and why would I use it? |
Does $U(A)$ and $A^{\mu}_{\nu}$ commute ? $A^{\mu}_{\nu}$ is the constant matrix that satisfies $\eta_{\nu\mu}A^{\mu}_{\rho}A^{\nu}_{\sigma}=\eta_{\rho\sigma}$, where $\eta_{\mu\nu}$ is the metric tensor with signature -1, 1, 1, 1 and $U(A)$ is the unitary operator associated with Lorentz transformation. (The Quantum Theory of Fields, Vol I, Weinberg, Chapter 2) | Every time I run into a commutator of two observables such as $[\hat{X},\hat{Y}]$, with $\hat{X}$ and $\hat{Y}$ being two operators from different state spaces: $\hat{X}\in\xi_{x}\land\hat{Y}\in\xi_{y}$; it is said that their commutator equals zero because each operator acts on its own subspace. Could someone give the proof for that statement? Thank you. |
How to avoid italic for "th"? in the early 20$^{th}$ century How to avoid italic font and just "20th"? | What is the easiest way to superscript text outside of math mode? For example, let's say I want to write the $n^{th}$ element, but without the math mode's automatic italicization of the th. And what if I still want the n to be in math mode, but the th outside? |
Where to find a description, with proofs, of all one side ideals of the ring of matrices over field? | What are the left and right ideals of matrix ring? How about the two sided ideals? |
What is the idea behind Pauli s exclusion principle? Why should an electron or any particle having non integral spin obey this principle? | Suppose we have an atom. It is commonly said that because of the PEP, two electrons can't be in the ground state unless they have opposite spins, because no two electrons can have the same wavefunction. What bugs me is that spin up and spin down aren't the only possible spin states. There's a whole continuum of linear combinations of them, and as far as I can tell the PEP wouldn't exclude the possibility of having lots of electrons, all sharing the same spatial wavefunction but with different combinations of $\mid\uparrow \rangle$ and $\mid\downarrow\rangle$. Why doesn't this happen? |
I found somewhere in book echo (int) ((0.1 + 0.7) * 10); output is : 7 echo ((0.1 + 0.7) * 10); output : 8 why both out are different ? I think answer should be 8 | Consider the following code: 0.1 + 0.2 == 0.3 -> false 0.1 + 0.2 -> 0.30000000000000004 Why do these inaccuracies happen? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.