body1
stringlengths 20
4.1k
| body2
stringlengths 23
4.09k
|
---|---|
I just started to open for myself programming in python. I know how to find factors for example of 30. I will get [1,2,3,5,6,10,15,30]. But I need this output 30 = 2 * 3 * 5. Thank you in advance! | Here's the very dumb way: def divisorGenerator(n): for i in xrange(1,n/2+1): if n%i == 0: yield i yield n The result I'd like to get is similar to this one, but I'd like a smarter algorithm (this one it's too much slow and dumb :-) I can find prime factors and their multiplicity fast enough. I've an generator that generates factor in this way: (factor1, multiplicity1) (factor2, multiplicity2) (factor3, multiplicity3) and so on... i.e. the output of for i in factorGenerator(100): print i is: (2, 2) (5, 2) I don't know how much is this useful for what I want to do (I coded it for other problems), anyway I'd like a smarter way to make for i in divisorGen(100): print i output this: 1 2 4 5 10 20 25 50 100 UPDATE: Many thanks to Greg Hewgill and his "smart way" :) Calculating all divisors of 100000000 took 0.01s with his way against the 39s that the dumb way took on my machine, very cool :D UPDATE 2: Stop saying this is a duplicate of post. Calculating the number of divisor of a given number doesn't need to calculate all the divisors. It's a different problem, if you think it's not then look for "Divisor function" on wikipedia. Read the questions and the answer before posting, if you do not understand what is the topic just don't add not useful and already given answers. |
We know there are differences between the books and the movies (the Battle of Hogwarts, etc.). Which version is considered canon? Also, if the books are canon in cases of contradiction, are things that don't contradict the books, but do include details that are not in the book, such as hermione being white in the movies, canon? | There are many different Harry Potter works including: books short stories movies card games video games toys amusement parks web content Which ones are considered to be canon? |
Just a curiosity in this book of an high school with the title The powers with exponent rational the $$\large \color{red}{a^{\frac mn}=\sqrt[n]{a^m}}, \quad a\geq 0$$ is given like a definition. I don't remember if there was a proof. But is there one or should we give it as a definition? | The way that I was taught it in 8th grade algebra, a number raised to a fractional exponent, i.e. $a^\frac x y$ is equivalent to the denominatorth root of the number raised to the numerator, i.e. $\sqrt[y]{a^x}$. So what happens when you raise a number to an irrational number? Obviously it is not so simple to break it down like above. Does an irrational exponent still have a well formed meaning? The only example that comes to mind is Euler's identity, but that seems likes a pretty exceptional case. What about in general? |
Why does the velocity of air flowing over the top surface of aerofoil increase, when there is no contraction in area over the top? | I understand the common explanation of lift, which describes the airflow over the top of the wing as moving faster than the air below the wing. However, I don't quite understand why the air moves faster. I've read some explanations citing a circulation effect among others, but haven't found a good, clear explanation for the exact cause. Can someone help me out? |
Hi to everyone and thanks in advance for your time reading this question. Im kinda new on this SEO stuff and there is something that I can't figure out how it works despite all the readings that I did. I've developed a new website which allows users to add recommendations for every kind of bussiness, places, professionals, etc, so other people can see if travel to X place is worth it for example. From what I've read so far (and from what I've understood, which are actually two different things haha) its important to make user and search engines friendly URLs and have proper keywords, title and h1 tags. (I've read this post and a few more) That's not a problem because I can do that on server-side code, but what I actually don't understand is how Google shows pages that collect info from databases on his search results. Lets put an example just to detail this a little bit more. If we go to Google and search for "abercruz paginas amarillas" google show us a link that send us to a page from "paginasamarillas.com" which has all the details about that store. Instead if we go to Google and type, "abercruz yousug" (which is my page) nothing shows up. I know that it could take a few days to Google to index my page but I don't understand HOW could Google "search" into my database (or page, or whatever) to end with the correct URL which shows the details of that Commerce If someone could explain me that or help me a little bit understanding how to rank content that is generated from a database I will very grateful. Thanks again! | I have a very stupid question. I developed a website that has only one page at the public html directory(index.php). all content are dynamically loaded as different pages. How can i SEO my pages for google? i mean like the what we type in this site are .............i believe stored in database and search engine find these pages like any static pages... Just a little tip would be appreciable.......! |
I have an array of an object called storing, some of the object's attribute (skuID) is the same with some of the other storing with different (storingID), how do i make my array distinct depending on their (skuID)? Storing(string storingID, skuID, storageID, price, expiry) I have tried this but it doesn't work: List<storing> storingAll = (List<storing>)Session["storingAll"]; List<storing> displayedStoring = storingAll.Distinct().ToArray(); | I am playing with LINQ to learn about it, but I can't figure out how to use Distinct when I do not have a simple list (a simple list of integers is pretty easy to do, this is not the question). What I if want to use on a list of an Object on one or more properties of the object? Example: If an object is Person, with Property Id. How can I get all Person and use Distinct on them with the property Id of the object? Person1: Id=1, Name="Test1" Person2: Id=1, Name="Test1" Person3: Id=2, Name="Test2" How can I get just Person1 and Person3? Is that possible? If it's not possible with LINQ, what would be the best way to have a list of Person depending on some of its properties in .NET 3.5? |
Is there any way to derive Stirlings formula that only requires some undergraduate knowledge of calculus, real analysis and perhaps some identitets involving the gamma function, maybe Wallis product, and things along those lines? If not, and I know this is a rather vague question, what is the simplest but still sufficiently rigorous way of deriving it? I had a look at but the comments seems quite messy. Wikipedia was not particularly helpful either since I have not learned about Laplace's method, Bernoulli numbers or the trapezoidal rule. | Suppose we want to show that $$ n! \sim \sqrt{2 \pi} n^{n+(1/2)}e^{-n}$$ Instead we could show that $$\lim_{n \to \infty} \frac{n!}{n^{n+(1/2)}e^{-n}} = C$$ where $C$ is a constant. Maybe $C = \sqrt{2 \pi}$. What is a good way of doing this? Could we use ? Or maybe take the log of both sides (e.g., compute the limit of the log of the quantity)? So for example do the following $$\lim_{n \to \infty} \log \left[\frac{n!}{n^{n+(1/2)}e^{-n}} \right] = \log C$$ |
I'm new at Linux and I just download Ubuntu 12.04 LTS. I found a spot that showed me how join my Windows Active Directory. It has me add couple lines into the 'hosts' but I'm not able to edit the file because I do not have the permission. I'm not the owner. I use chmod with it rwx and still it will not let edit the file. How do you change the permission? Thanks | I can't seem to edit and save config files in the root system (eg: /etc/dhcp/dhcpd.config); it just says "permission denied" or the save option is blocked in the text editor. I'm pretty sure I'm a root user, but how do I make sure? If I am a root user, how do I fix this? |
today I was learning about list slicing in python, and I have a question about the rules by which python "operates/slices" these lists. How is it possible that I don't get an error message when clearly the range is wrong? li=[1,2,3,4,5,6] li[1:12:1] [2,3,4,5,6] | I need a good explanation (references are a plus) on Python's slice notation. To me, this notation needs a bit of picking up. It looks extremely powerful, but I haven't quite got my head around it. |
Suppose $q$ is a prime power, $r$ is some positive integer. We can construct the field $\mathbb{F}_q$ where there are $q-1$ non-zero elements. The relation $x\sim y \iff y \text { is a (non-zero) scalar multiple of } x$ in the set of nonzero vectors $\mathbb{F}_q^r-\{0\}$ is an equivalence, and $cx=c'x \iff c=c'$ by cancellation law in $\mathbb{F}_q$. Therefore there are equally sized equivalence classes and there are $\frac{q^r -1}{q-1}$ of them, which is an integer. Now is there a way in elementary arithmetic showing that $\frac{q^r -1}{q-1}$ is an integer? | Prove that for all natural number $x$ and $n$, $x^n - 1$ is divisible by $x-1$. So here's my thoughts: it is true for $n=1$, then I want to prove that it is also true for $n-1$ then I use long division, I get: $x^n -1 = x(x^{n-1} -1 ) + (x-1)$ so the left side is divisible by $x-1$ by hypothesis, what about the right side? |
I bought my canon 700D a month ago. Now, I want to do some macro photography, but I do not want to purchase any expensive lens for this at least at this stage. I came to know about some accessories like extension tubes, which are not very expensive but claim to provide the required magnification. Are they really useful? Are there any other accessories( not expensive ), that I can use for macro photography? | I am a photography newbie and have only a 18 - 135mm canon kit lens at my disposal. I wanted to take macro shots but can't really afford a macro lens right now. One very optimistic goal of mine is to capture a single snow flake this winter. Is there any cheap(er) way to take macro shots? Also, any specific advice from anyone one how to go about photographing a single snow flake. |
I have downloaded the ISO from the website and have burned a DVD disc. I now want to load UBUNTU onto my PC and do not know how to proceed, please help. | I would like to see a full how-to guide on how to install Ubuntu. |
I'm trying to convert a hex string into a byte array to test a SHA2-224 using the test vector from NIST. See: h**ps://csrc.nist.gov/CSRC/media/Projects/Cryptographic-Standards-and-Guidelines/documents/examples/SHA2_Additional.pdf The code appears to be correct when testing a string using (Encoding.UTF8.GetBytes) and even correct when testing a hex byte using (StringToByteArrayFastest) to convert. However, when I use the C style hex (0xe5e09924) the results are not as expected. It's only when I removed the 0x (e5e09924) and convert the hex to a byte array that I receive the expected results. public static string ComputeSha224Test1(string strHex) { // WORKS // #2) 4 bytes 0xe5e09924 // fd19e746 90d29146 7ce59f07 7df31163 8f1c3a46 e510d0e4 9a67062d // Sha224Digest hash224Test = new Sha224Digest(); // Convert to hex byte to test NIST vector byte[] byte3 = StringToByteArrayFastest(strHex); // Encode string for hashing //byte[] byte3 = Encoding.UTF8.GetBytes(strHex); hash224Test.BlockUpdate(byte3, 0, byte3.Length); byte[] result = new byte[hash224Test.GetDigestSize()]; hash224Test.DoFinal(result, 0); String Hash = BitConverter.ToString(result).Replace("-", "").ToUpper(); return Hash; // } Is there any way to convert a C style hex into a C# style hex? I got the (StringToByteArrayFastest) code from () and I'm using Visual Studio 2015. Thank you. | Can we convert a hex string to a byte array using a built-in function in C# or do I have to make a custom method for this? |
I'm using biblatex to print my bibliography at the end of my thesis but unfortunately nothing is printed at the end (not even a blank page). Here's an example of what I'm using: \documentclass[12pt]{report} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[english]{babel} \usepackage[a4paper, width=150mm, top=25mm, bottom=25mm, bindingoffset=6mm]{geometry} \usepackage{biblatex} \addbibresource{references.bib} \begin{document} I'm goint to cite the first reference with \cite{einstein}. \printbibliography \end{document} Here's what my .bib file looks like: @article{einstein, author = "Albert Einstein", title = "{Zur Elektrodynamik bewegter K{\"o}rper}. ({German}) [{On} the electrodynamics of moving bodies]", journal = "Annalen der Physik", volume = "322", number = "10", pages = "891--921", year = "1905", DOI = "http://dx.doi.org/10.1002/andp.19053221004", keywords = "physics" } @book{dirac, title={The Principles of Quantum Mechanics}, author={Paul Adrien Maurice Dirac}, isbn={9780198520115}, series={International series of monographs on physics}, year={1981}, publisher={Clarendon Press}, keywords = {physics} } EDIT: What might be the problem? | I've browsed the forums and found a number of posts that have addressed this issue, but none of the solutions seem to work for me. I have the following script that I just copied from the bibtex home page to get familiar with it. Instead of the citation number I get a question mark. I compile using Latex+Bibtex+Latex+Latex+PDFLatex+ViewPDF just as has been previously suggested and the problem persists. \documentclass[11pt]{article} \usepackage{cite} \begin{document} \title{My Article} \author{Nobody Jr.} \date{Today} \maketitle Blablabla said Nobody ~\cite{Nobody06}. \bibliography{mybib} \bibliographystyle{plain} \end{document} My bibliography (Bib.bbl) @misc{ Nobody06, author = "Nobody Jr", title = "My Article", year = "2006" } Looking at previous posts one thing that is concerning is that my .bbl looks empty as shown below. Further, I don't have a .blg \begin{thebibliography}{} \end{thebibliography} |
The filter mechanism (item_filter) below returns fresh html-content (product_data) via an ajax function (load_resorts). In this freshly loaded html content is (also) a class which -when clicked- should trigger a function (via class myresort). <span class="myresort badge" data-src="549">+add</span> The myresort click function works for the default loaded resorts (on page load), but not for the ones loaded via ajax. I have used a bind function. $('.item_filter').on('click', function(event) { $('.product-data').html('<div id="loaderpro" style="" ></div>'); sure = multiple_values('sure'); country = multiple_values('country'); altitude = multiple_values('altitude'); level = multiple_values('level'); size = multiple_values('size'); price = multiple_values('price'); offpiste = multiple_values('offpiste'); family = multiple_values('family'); apresski = multiple_values('apresski'); load_resorts($("#snow1").val(), $("#snow2").val()); }); function load_resorts(ssnow, esnow) { $.ajax({ url: "ajax.php", type: 'post', data:{sure:sure,country:country,altitude:altitude,level:level,offpiste:offpiste,family:family,apresski:apresski,size:size,price:price,ssnow:ssnow,esnow:esnow,filter_order:filter_order}, success: function(result) { $('.product-data').fadeIn('slow').html(result); } }); } $('span.myresort').on('click', function(event) { var myres = $(this).attr('data-src'); $.ajax({ type: 'POST', url: '/v4/ajax/myresorts.php', data: { myresort: myres }, success: function(msg) { $('#myresorts').fadeOut(800, function() { if ($('*[data-src="' + myres + '"]').hasClass('loveit')) { $('*[data-src="' + myres + '"]').removeClass('loveit'); $('*[data-src="' + myres + '"]').html('+add').fadeIn().delay(1000); } else { $('*[data-src="' + myres + '"]').addClass('loveit'); $('*[data-src="' + myres + '"]').html('-remove').fadeIn().delay(1000); } $('#myresorts').html(msg).fadeIn().delay(1500); }); } }); }); | I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off. This happens on page ready and works just fine. The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound. I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option. |
I've a dataset for binary classification. I tried various algorithms using Weka. Then I noticed that if I change the seed of the random number generator I get different classification accuracy results. For example in one run I get 65% and in another run I get 72% accuracy. In all runs I use 10-fold cross validation. Is this variation in accuracy results normal? Or any idea on what might be the cause of the variation? Thanks | I'm training a neural network for a particular problem which can be predicted with 100% accuracy. However, the problem is that results tend to vary between 99% and 100% even if I train 10 different networks and take the average. I was reading around and found that it was due to random weights initialized every time the program ran. Is it okay to set the random seed to 1 and then train 10 different networks and take the average? This will result in less variation and easy model selection. |
— Yeah, just that simple question. It's too easy to consume a lot of RAM in brain-dead mod_XxX (say, mod_php) application, so I'm just wondering what does Apache allow to do as countermeasure. | I'm currently using a Joyent Accelerator to host my webapps, and it's working fine, however I need to reduce costs so I'm downgrading my current plan and that imposes some new memory limits (256M rss, 512M swap). I wasn't too far over them yesterday, but after restarting Apache several times today, I'm now 411M rss, 721M swap (prstat -Z -s cpu). Searching in Server Fault only gives me lots of ways and specific tools to monitor the server, but no advice on how to reduce/optimize it's memory usage. I've also seen , but I don't think it's good for this particular (or may I say generic?) situation. The server is running Solaris on a shared CPU, and I'm using a Apache + MySQL + PHP stack. I'm interested in knowing the steps one can take to troubleshot this and solve the issues. However, I'm also running out of time to lower my memory foot print and downgrade the plan before the current ends, so anything that can make magic and save the day is welcome as well :) |
(Hint: Use the Schröder-Bernstein theorem.) I know I need to find two injective functions but I'm yet to find something that makes sense. | Prove that the interval $(0, 1)$ and the Cartesian product $(0, 1) \times (0, 1)$ have the same cardinality using the SB theorem? Also how does one find a bijection on $f:(0, \infty) \to (0,1)$ such that they have the same cardiniality? |
I'd like to prove the following statement: Given a well-ordered ring $A\neq \emptyset$ with identity $I$ and a homomorphism $\phi: \mathbb{Z}\to A$ such that $\phi(n) = nI$, then the set $$\left\{ a\in A: 0<a<I \right\}$$ is empty. If $\phi$ was surjective (or bijective), then this would obviously be true. (So, I suspect that that's the case.) But, how could I then prove that? | Though I've seen several cool axiomizations of $\mathbb{R}$, I've never seen any at all for $\mathbb{Z}$. My initial guess was that $\mathbb{Z}$ would be a ordered ring which is "weakly" well-ordered in the sense that any subset with a lower bound has a minimal element. However, after seeing of a discrete ordered ring, I'm less sure. I made that guess under the impression that the fundamental characteristic of $\mathbb{Z}$ is that every nonzero element has exactly one representation of the form $\pm (1+1+\dots+1)$, but that seems to be shared by every DOR. Presumably, this definition wouldn't exist if every instance of it was isomorphic to $\mathbb{Z}$, so can someone give me an example of another discrete ordered ring? More to the point, what is a sufficient characterization of $\mathbb{Z}$? (and a proof sketch of uniqueness would be nice) I'm aware that $\mathbb{Z}$ is pretty easily constructible from $\mathbb{N}$, but I want to use this for a seminar and given the audience I am expecting, I would rather not deal with Peano. (And I guess it feels like cheating to say "$\mathbb{N}$ is a well-ordered rig") |
I realise this has been asked a few times, but I am wondering how do I find out if I can post / my "rating" before I get the error? I can find my Stack Overflow profile. Tonight I've got the above message & cannot post a new question to Stack Overflow. (I found / find it hard to find questions I know how to answer :) Though I've found one good query now I answered. Hopefully the person thinks my answer is good. EDIT: I know I find many similar queries in meta.stackechange, but I can't find a general answer re reading your profile, etc. | If you are reading this, you may have been affected by one of our post quality bans. If so, it is important that you to understand what has happened and how to regain the permissions that you lost. While trying to ask a question, one could see: We are no longer accepting questions from this account. See to learn more. Likewise, for answers: We are no longer accepting answers from this account. See to learn more. Why am I getting this message? Are deleted posts taken into account too? Is a question/answer ban the same as a suspension? How do I avoid getting a question ban? How long do I have to wait before I can post again? What can I do to release the ban? How can I reactivate my account? Can I simply create a new account? I'll just ask somewhere else on the SE network, and they'll migrate my question to the correct site! Will a ban on one Stack Exchange site affect my standing on other sites in the network? Does this apply to meta sites too? My account is in good standing. Why am I still blocked? |
I am trying to prove that the automorphisms of the Klein four-group is isomorphic to $S_3$. The first insight is the Klein group is an abelian group of four elements, three of which are order $2$, and must be mapped to other elements of order $2$, and the identity must of course be mapped to itself. So any automorphism "permutes" the non-identity elements. So there are exactly $3! = 6$ of them, matching the number of elements of $S_3$. Then if I call those non-identity maps $f_2, f_2, \ldots, f_6$, I can naturally map them to $S_3$. For example, if the non-identity elements of the Klein group are $a$, $b$, $c$, I can regard these as $1$, $2$, and $3$ (I believe the labelling doesn't matter) and if I swapped $a$ and $b$ and fixed $c$, I can regard this as the transposition $(12)$. By repeating this, I get a natural bijection of sets. I don't know how to "prove" it's a bijection other than to observe the mapping and that it hits everything in $S_3$ exactly once. I don't know, in particular, how to prove that this is a homomorphism, other than by checking every possible pair of isomorphisms, which is a bit laborious. I assume there is a better, cleaner way to do it. UPDATE: After working on this problem more, I have an updated attempt. It's incomplete, but I think it makes some progress. We realize the Klein 4-group as $V = \{e, a, b, c\}$, where $a,b,c$ are the non-identity elements, each of which has order $2$. Any automorphism $f$ of $V$ must send elements of order $2$ to elements of order $2$, so necessarily it must permute the elements $a,b,c$. I claim that such a permutation is necessarily an automorphism. We observe that the Klein four-group has the property that if we multiply two non-identity elements, we get the third. Since $f$ maps from $V$ to $V$ bijectively, it is also the case that when $f(g)f(g') = f(g'')$, where $g$ and $g'$ are distinct elements and $g''$ is the third. That is, for any $g \neq g' \neq e$, we have \begin{align*} f(gg') = f(g'') = f(g)f(g''). \end{align*} If we take an arbitrary $g \in V$ and then consider multiplying with the identity $e$, we have \begin{align*} f(ge) = f(g) = e f(g) = f(e) f(g), \end{align*} since $f(e) = e$. This proves that $h$ is a homomorphism, and since it is bijective by definition, it is an automorphism. Since every automorphism must send elements of order $2$ to elements of order $2$ and there are exactly $3! = 6$ permutations of $\{a,b,c\}$, there are exactly six elements of Aut(G). An automorphism is, therefore, uniquely determined on how it permutes the elements ${a,b,c}$, giving a natural bijective map to $S_3$, relabelling these non-identity elements as $1,2,3$. I call $e$ the identity permutation and $f_{abc}$ as the automorphism that maps ${a,b,c} \to {a,b,c}$ (i.e., the identity map) and so forth. The map is: \begin{align*} & f_{a,b,c} \longmapsto e & & \text{both have order $1$} \\ & f_{a,c,b} \longmapsto (23) & & \text{both have order $2$} \\ & f_{b,a,c} \longmapsto (12) & & \text{both have order $2$} \\ & f_{c,b,a} \longmapsto (13) & & \text{both have order $2$} \\ & f_{b,c,a} \longmapsto (123) & & \text{both have order $3$} \\ & f_{c,a,b} \longmapsto (132) & & \text{both have order $3$} \end{align*} This is clearly a bijection of sets: every permutation in $S_3$ was hit exactly once. I still do not know how to show that this is a homomorphism. I constructed the map so that it preserved the order of elements, but is that enough? I could check that $\varphi(xy) = \varphi(x) \varphi(y)$ for each pair, but there must be a way to do it that I'm missing. | This is most likely a lack of understanding of wording on my part. I was considerind the Klein 4-group as the set of four permutations: the identity permutation, and three other permutations of four elements, where each of those is made up of two transposes, (i.e., 1 $\rightarrow$ 2, 2 $\rightarrow$ 1 and 3 $\rightarrow$ 4, 4 $\rightarrow$ 3) taken over the three possible such combinations of four elements. Here, then, is my question. I am assuming (?) that Aut(G) in this case is the set of permutations of the four elements of the Klein 4-group - or the three non-identity ones for the purpose of showing isomorphic to $S_3$. If this is the case, what does it mean to have a permutation of these three permutations that I mentioned above? As always, thanks for your help. |
You can read in my about my struggle with this part. I made a milestone just now, increasing Indirect clamp will remove the fireflies, however the shadows are now too opaque. Render with Indirect Clamp to 0, lots of fireflies and denoise distort: same settings except I changed Image to Denoiser instead of Noisy image to Denoiser node, still distorted but more detail seem intact: Render with Indirect clamp set to 2.0, shadow too opaque: Render with Indirect clamp set to 5.0, this is the best result I got so far but I still feel is nowhere near the ideal result: This is Andrew's cup in the tutorial, the lighting I am aiming for: Am I focusing too much on Indirect clamp? Are there other settings I should attempt to play around with? I am using Blender 2.92.0 with my GPU Radeon RX 5700 here is my blender file: If you attempt to render my file please let me know if any settings are local that I need to change, or if they are per blender file. | I feel I am nearing completion of the tutorial but am still having gaps in knowledge on how to render light properly. 2.92.0 blender file: Overview layout: Lamp: 128 sample before denoise: 128 sample after denoise: 1024 sample 1080p 100% render before denoise: 1024 sample 1080p 100% render after denoise: I've been trying different Light paths, but I honestly don't understand the extent of how they interact with each other. I haven't seen any example of what those numbers should be in the tutorial either, if someone knows please let me know. but it is now again a little bit too opaque, dunno when that happened. :D Not too sure what I am missing out so any suggestions would be lovely! Thank you in advance |
Please help. There is a problem I have tried to resolve for some time now. I want to come up with a pattern where i have a table with advertisements on a web platform. These advertisements shall be owned either by individual users (accounts) or by an entity which represents a group of users (accounts) the members of which have permissions on the advertisement. There shall also be a manager of the advertisement. When the advertisement is owned by a group, the accounts dont matter and the info for the group shall be displayed. My problem is that I always come with anti patterns for this schema. Can you suggest me something? Your help will be highly appreciated. | I'm using PostgreSQL with as my ORM. I have one type, User. The second type is Group, which can have any number of users associated with it through a GroupMemberships table. Users can also own any number of Groups. My third type, Playlist, can belong to either a User OR a group. What would be the best way to design a schema for this type so that it can have either one type of owner or the either? My first pass I created both associations, but only populated one at a time. This could possibly work, but seems hacky and makes queries difficult. Additional information Here are my responses to the clarification requests posted by MDCCL via comments: (1) If a Playlist is owned by a given Group, one can say that this Playlist is related to one-to-many Users, as long as they are Members of such Group, right? I believe this is technically true, but this one-to-many association does not exist explicitly. (2) So, is it possible for a specific Playlist to be owned by one-to-many Groups at the same time? No, it should not be possible for a Playlist to be owned by one-to-many Groups. (3) Is it possible for a particular Playlist to be owned by one-to-many Groups and, at the same time, by one-to-many Users who are not Members of such Group? No, because as in (2) a one-to-many from Playlist to Group should not exist. Additionally, if a Playlist is owned by a Group it is not owned by a User, and vice versa. Only one owner at a time. (4) What are the properties used to uniquely identify a Group, a User and a Playlist? They each have a surrogate primary key (id), as well as a natural key (though not primary). These are slug for Group and Playlist, and username for User. (5) Could a particular Playlist suffer an Owner change? Although I don't plan on this being a feature (at least initially), I suppose this could hypothetically occur. (6) What’s the meaning of the Group.Slug and Playlist.Slug attributes? Are their values stable enough to be defined as primary keys or do they change very often? The values of these two properties, along with User.Username must be unique, correct? These slugs are unique, lowercase, hyphenated versions of their respective entity's title. For example, a group with the title 'Test Group' would have the slug 'test-group'. Duplicates are appended with incremental integers. This would change any time their title changes. I believe that means they wouldn't make great primary keys? Yes, slugs and usernames are unique in their respective tables. |
i started learning Java some days ago. I have some experience with C++ and this is why I'm used to pointers, which would make this much easier. so now my question. Let's say I have the following Code: public class Main { public static void main(String[] args) { int variable1=2, variable2=2; input(variable1, variable2); System.out.println(variable1 + " " + variable2); // this should output "1 3" on the console } private static void input(int variable1, int variable2) { System.out.println(variable1 + " " + variable2); // this will output "2 2" on the console variable1 = 1; variable2 = 3; } } So the function input() takes the Variables from main and outputs them (correctly). But how can I transfer the changed Variables back to the main function? | 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? |
My question is why the following code prints 1 instead of 500; When the callback is invoked and it doesnt find the variable count, doesnt it first looked at the context of func1 ? function func1(cb){ let count = 500 cb() } let count = 1 function func2() { console.log(count); } func1(func2) | What is the scope of variables in javascript? Do they have the same scope inside as opposed to outside a function? Or does it even matter? Also, where are the variables stored if they are defined globally? |
I was wondering how to create a symbolic link in Ubuntu (12.04 LTS). I've done this before but this time it is a little different. This command worked before. user@desktop:/media/backup/folder$ ln -sv file.ods /home/user/file.ods The last time I I created a file from my backup drive [harddisk]. Now I would like to create a symbolic link to a file present on a fileserver. This is a virtual machine and probably a network connection to it is required. The fileserver (networkshare) is mounted at /media/fileserver. I did try to use the same command as mentioned above, however, it create an empty file when opened it askes to be deleted because it is empty and useless. When I do the command from above, it does not work. So, can someone help me out here? | I am installing p4v in /opt, but /usr/bin is on my path. Is it possible to create a soft or symbolic link for p4v from /opt to /usr/bin, so I can just type "p4v" since /usr/bin is in my path? |
My problem is that I don't know how to include \section*{Some Title} in \rightmark. Currently \rightmark is working fine for all types of pages e.g. list of figures, list of tables, table of content etc. But when there is a page wiith \section*{Some Title}, \rightmark is empty. Any suggestions how to solve my problem? MWE: \documentclass[a4paper,listof=totoc,bibliography=totoc]{scratcl} \usepackage[headsepline,automark]{scrlayer-scrpage} \clearpairofpagestyles \ihead{Musterhausarbeit\\ \rightmark{} \\ \markboth{#1}{#1}} \ofoot{\thepage} \renewcommand*{\titlepagestyle}{empty} \addtokomafont{section}{\clearpage} \begin{document} \tableofcontents \newpage \listoffigures \newpage \listoftables \newpage \section*{Some title} \addcontentsline{toc}{section}{Some title} \newpage \section{Some more title} \end{document} | I use \usepackage{fancyhdr} then \pagestyle{headings} and I want \section*{name of the section} in my headings. How to do it? |
The black part of this image is the outline of the State of Georgia, and the orange part is a line that is meant to have the effect of orbiting the state. I would like to make this illusion, but I don't know how to get the tail end that is meant to look like it is going behind the black outline of the State. What do I do, because playing around in Illustrator CS6, I can only get the entire orbital behind the state, not just the two tail ends. Thanks | Let say I have 3 shapes in illustrator: A, B and C. I would like A to overlap B, B to overlap C and C to overlap A. How can I do that? |
I would like to understand why the sum and product of algebraic integers are algebraic integers. For algebraic numbers (not integers) there is the wonderful website which uses only basic linear algebra. A short version of that is in this MSE-answer: My Question: Can this method or something similar be used for algebraic integers? | We know that the set $\mathbb{A}$ of algebraic numbers is a field. But there is a constructive proof of this statement? I.e. : given a sum (or a product) of numbers of the form $\sqrt[n]{q}$ with $ q \in \mathbb{Q}$ we can find a polynomial in $x$, with rational coefficients, that has as solution this sum (or product)? I've find that such a proof can be given using the resultant of the polynomials that have as roots the given numbers, but, as far as I know, the resultant is a number, so how can we find a polynomial? I would appreciate an example: e.g. how to find the rational polynomial that has root $ \sqrt{2}+\sqrt[3]{3}$. |
I got this problem from my textbook, not school. I tried various methods but was unable to solve the problem. Let $\alpha$ and $\beta$ be the roots of the polynomial $x^2-3x+1$. I need to find the value of $$ \frac{\alpha^{2014}+\beta^{2014}+\alpha^{2016}+\beta^{2016}}{\alpha^{2015}+\beta^{2015}}$$ | We have a polynomial $x^2 + 3x + 1$. There are 2 zeroes of it, $\alpha$ and $\beta$ Now, what we need to find out is(What I couldn't) is as follows: $$ \alpha^{2016} + \beta^{2016} + \alpha^{2014} + \beta^{2014} \over \alpha^{2015} + \beta^{2015}$$ Any ideas on how to do it? Thanks a lot! -bone |
I am US citizen traveling to Hong Kong via Beijing. Below are my flights details Landing in Beijing Friday, 2 October 2015, 08:50:31 Departure to HK Monday, 5 October 2015, 12:00:00 So my total duration is 3 days, 3 hours, 9 minutes and 29 seconds If I count total number of hours based on the flight times I am over 3 hours 10 minutes. I would like to know if I will run into any issues at the airport? Based on the Wiki posted on the I should be fine as the 72 hours count begins at the following day. Can anyone please share their experience? | I have a 75 hour trip to Beijing (PEK) coming up in October. I shall enter at PEK on a flight from London, arriving at 0930 and continue onwards by air to Hong Kong three days later at 1230, and I shall be travelling on an ordinary British passport. I understand that the 72 hour transit visa on arrival actually begins the midnight after my arrival (and not immediately after arrival). Visa required, except for Holders of British passports endorsed British Citizen holding confirmed onward airline tickets to a third country, if arriving in and departing from the same city: - at Beijing (PEK), Chengdu (CTU), Chongqing (CKG), Dalian (DLC), Guangzhou (CAN), Hangzhou (HGH), Shanghai Hongqiao (SHA), Shanghai Pudong (PVG), Tianjin (TSN), Wuhan (WUH), Xi'an (XIY) or Xiamen (XMN) for a max. transit time of 72 hours, starting from 00:01 on the day following the day of entry. - at Guilin (KWL), Harbin (HRB), Kunming (KMG) or Shenyang (SHE) for a max. transit time of 72 hours; However, although several non-official sources substantiate this distinction, I cannot find any official confirmation of this. Does anyone have any experience in doing this kind of transit? |
public class DayAdapter extends BaseAdapter { private Context mContext; private Day[] mDays; public DayAdapter(Context context, Day[] days) { mContext = context; mDays = days; } @Override public int getCount() { return mDays.length; } @Override public Object getItem(int i) { return mDays[i]; } @Override public long getItemId(int i) { return 0; } @Override public View getView(int i, View view, ViewGroup viewGroup) { ViewHolder holder; if(view==null){ view = LayoutInflater.from(mContext).inflate(R.layout.daily_list_item, null); holder = new ViewHolder(); holder.iconImageView = (ImageView) view.findViewById(R.id.iconImageView); holder.dayLabel = (TextView) view.findViewById(R.id.dayNameLabel); holder.temperatureLabel = (TextView) view.findViewById(R.id.temperatureLabel); view.setTag(holder); }else{ holder = (ViewHolder) view.getTag(); } Day day = mDays[i]; holder.dayLabel.setText(day.getDayOfTheWeek()); holder.temperatureLabel.setText(day.getMaxTemperature()+""); holder.iconImageView.setImageResource(day.getIconId()); return view; } private static class ViewHolder{ ImageView iconImageView; TextView temperatureLabel; TextView dayLabel; } } I get the exception: FATAL EXCEPTION: main java.lang.NullPointerException at app.com.example.tmrovsky.czywgdynipada.Adapters.DayAdapter.getView(DayAdapter.java:62) I don't know where there is an error during setting these three: holder.dayLabel.setText(day.getDayOfTheWeek()); and so on. I tried to debug and there is no null value(it's correctly Tueasday). Any ideas, my brothers? :) | 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 am trying to center a graph made with pgfplots with \centering. If I put \centering within a group to limit its scope, the graph does not get centered. If I don't limit the scope of \centering, then everything gets centered. \documentclass{minimal} \usepackage{pgfplots} \begin{document} This text should not be centered, but the graph should be. % \begingroup \centering \begin{tikzpicture} \begin{axis} \addplot coordinates { (0, 0) (1, 1)}; \end{axis} \end{tikzpicture} % \endgroup This text should not be centered. \end{document} | Why does the use of \begingroup, \endgroup negate the effect of centering in the MWE? The MWE below yields a left aligned figure (not desired), with subsequent text on the left (desired): But if I remove the \begingroup, \endgroup, then things work as desired as far as the \centering goes, but then the subsequent text is also centered? Question: I thought the entire purpose of grouping was to localize the effect. So, what is the subtlety of grouping that results in this behavior? How do I keep the grouping, yet also have the centering? I would like to ensure that any settings that are changed via the inserted figure are kept local to that figure. Code: \documentclass{article} \usepackage{showframe} \usepackage{pgfplots} %\usepackage{filecontents}% Commented to prevent overwriting myFig.tex \begin{filecontents*}{myFig.tex} \def\YLabel{$f(x) = x^2 - x +4$} \begin{tikzpicture} \begin{axis}[ xlabel=$x$, ylabel=\YLabel] \addplot {x^2 - x +4}; \end{axis} \end{tikzpicture} \end{filecontents*} \newcommand*{\InsertFigure}[1]{% \IfFileExists{#1}{% \begingroup% \centering% \input{#1}% \endgroup% }{}% }% \begin{document} \InsertFigure{myFig.tex} \textbf{Text on left.} \end{document} |
My article has two authors. The first one is the only corresponding author. Hence my LaTeX code for the authors is: \documentclass[preprint,12pt]{elsarticle} \journal{elsarticle} \begin{document} \begin{frontmatter} \title{Title} \author{AuthorOne\corref{TheOnlyCorrespondingAuthor}} \ead{authorone@gmail.com} \author{AuthorTwo} \ead{authortwo@gmail.com} \cortext[TheOnlyCorrespondingAuthor]{Corresponding author} \end{frontmatter} \end{document} The output is as follows: However, as the above clips show, LaTeX automatically adds the asterisk to the last author. Why? Can anyone solve the problem? You'd better not to change the based setting in the original elsarticle.cls LaTeX template. | I believe I have followed the template exactly but as this following MWE shows I am getting an asterisk on both authors and not just the corresponding author. Do I have something in the wrong order somewhere? \documentclass[preprint,12pt]{elsarticle} \begin{document} \begin{frontmatter} \title{Title} \author{Author One\corref{cor1}\fnref{fn1}} \ead{email@uni.edu} \cortext[cor1]{Corresponding author} \fntext[fn1]{Student} \author{Author Two\fnref{fn2}} \ead{email2@uni.edu} \fntext[fn2]{Lecturer} \address{Address Here} \begin{abstract} Abstract abstract abstract \end{abstract} \end{frontmatter} \section{Section1} Start typing... \end{document} Thanks |
If $x$ is the cosine of the angle between the vectors $a$ and $b$, $y$ is the cosine of the angle between the vectors $a$ and $p$, and $z$ is the cosine of the angle between the vectors $b$ and $p$, can we write $z$ in terms of $x$, $y$ and the magnitudes of $a$, $b$, and $p$? That is, no dot products should appear in the relation. All vectors are in $4$-dimensional Euclidean space. | If the cosine of the angle between the vectors $a$ and $b$ is $x$ and the cosine of the angle between the vectors $a$ and $p$ is $y$, then, if we call $z$ the cosine of the angle between the vectors $b$ and $p$, can we write $z$ in terms of $x$ and $y$? All vectors are in $4$-dimensional Euclidean space. |
I am citing a figure from paper. I inserted \cite{..} in the caption of the figure. The figure is referenced as [1], although it is in middle of the document. \documentclass[12pt,a4paper]{report} \setcounter{tocdepth}{5} \setcounter{secnumdepth}{5} %\renewcommand{\algorithmicforall}{\textbf{for each}} \usepackage{graphicx} \usepackage{indentfirst} \usepackage{hyperref} \usepackage{color,soul} \usepackage{amsmath} \usepackage{algorithm} %\usepackage{algorithmic} \usepackage{algcompatible} \usepackage{booktabs} \usepackage{caption} \usepackage{tikz} \usepackage[english]{babel} \usepackage{natbib} \usepackage[final]{pdfpages} %for embedding another pdf \usepackage{setspace} \captionsetup[table]{skip=10pt} \definecolor{lightblue}{rgb}{.80,.85,1} \sethlcolor{lightblue} \usepackage{verbatim} \usepackage{parskip} \usepackage{enumitem} \begin{document} %\renewcommand\bibname{References} %Renames "Bibliography" to "References" on ref page %include other pages \input{chapters/title.tex} \input{chapters/certificate.tex} %\input{./declaration.tex} %\input{./dedication.tex} %\input{./acknowledgement.tex} %\input{./abstract.tex} \pagenumbering{roman} %numbering before main content starts \tableofcontents \listoffigures \listoftables \newpage \pagenumbering{arabic} %reset numbering to normal for the main content \chapter{Introduction} \input{chapters/Chapter1.tex} \chapter{Literature Review} \input{chapters/Chapter2.tex} \chapter{Techniques Used} \input{chapters/Chapter3.tex} \begin{comment} \input{./chapter_4.tex} \input{./chapter_5.tex} %\input{./appendix.tex} %\input{./references.bib} %\mbox{} %\nocite{*} %\bibliographystyle{ieeetr} %\printbibliography \end{comment} \newpage %\addbibresource{reference.bib} %\renewcommand{\thepage}{} \bibliography{reference} \bibliographystyle{unsrt} \end{document} | When using the \cite command in figure captions and the ieeetr bibliography style, then BibTeX numbers the citations as appearing earlier than they do in reality (i.e. the first citation in the document ends up being [42]). Is there any way to get BibTeX to ignore the \listoffigures section when numbering? |
I'm looking to find the instillation date of an app I had on my old phone. I've tried looking on the play store however it only shows be previous paid purchases. I've also tried using a android emulator on my pc to view Google Play Games achievements, as it appeared it used to show you the time those achievements are unlocked, however checking it now just shows the achievements and not the times. EDIT: To clarify the app is no longer installed, hence all answers in the other question are worthless as this is not the same question, as these only answer the question to when the app was installed on the current device, not when they were installed on another phone but are still linked to the account. | Is there a Play Store log file? Or should I be looking where apps are installed on the phone for time/date stamps? |
I've more than two XML Document (generated through for loop, based on certain criteria) and want to store them in an array (if possible). For example: XmlDocument[] xmlDoc = {"xmlDoc1", "xmlDoc2"}; Is it possible to do so? If not, any suggestions? | Probably a really simple one this - I'm starting out with C# and need to add values to an array, for example: int[] terms; for(int runs = 0; runs < 400; runs++) { terms[] = runs; } For those who have used PHP, here's what I'm trying to do in C#: $arr = array(); for ($i = 0; $i < 10; $i++) { $arr[] = $i; } |
I am able to derive $$\sin^{-1}x+\sin^{-1}y=\sin^{-1}\left(x \sqrt{1-y^2}+y\sqrt{1-x^2}\right)$$ as follows. Let $$z=\sin^{-1}{x}+\sin^{-1}y.$$ Now if $z \in \left[-\frac{\pi}{2}, \frac{\pi}{2}\right]$ taking $\sin$ on both sides we get $$\sin z=x \sqrt{1-y^2}+y\sqrt{1-x^2}.$$ Now taking $\sin^{-1}$ on both sides we get $$\sin^{-1}(\sin z)=\sin^{-1}\left(x \sqrt{1-y^2}+y\sqrt{1-x^2}\right).$$ But in $\left[-\frac{\pi}{2},\frac{\pi}{2}\right]$ we have $\sin^{-1}(\sin z)=z.$ Hence $$z=\sin^{-1}\left(x \sqrt{1-y^2}+y\sqrt{1-x^2}\right)$$ but my book gave this is valid for $x^2+y^2 \le 1$ or $x^2+y^2 \gt 1$ when $xy \gt 0$. Can I know why? | It is known that the following holds good: $$ \arcsin x + \arcsin y =\begin{cases} \arcsin( x\sqrt{1-y^2} + y\sqrt{1-x^2}) \;\;;x^2+y^2 \le 1 \;\text{ or }\; x^2+y^2 > 1, xy< 0\\ \pi - \arcsin( x\sqrt{1-y^2} + y\sqrt{1-x^2}) \;\;;x^2+y^2 > 1, 0< x,y \le 1\\ -\pi - \arcsin( x\sqrt{1-y^2} + y\sqrt{1-x^2}) \;\;;x^2+y^2 > 1, -1< x,y \le 0 \end{cases} $$ But I couldn't find a proof for the above. I tried to prove this myself, but failed. I have no clue how to bring in $x\sqrt{1-y^2} + y\sqrt{1-y^2}$ from the conditions like $x^2 + y^2 < 1$. Please understand that I don't have any problem in getting the 'crux' part of the RHS : $ \arcsin( x\sqrt{1-y^2} + y\sqrt{1-x^2}) $. I face trouble only in checking the range of that 'crux' under the given conditions. |
EDIT: One note I forgot to add is that I"m using Vmware to run ubuntu. I'm assuming that may be causing the problem? New to Ubuntu (and Linux) and I'm having trouble installing Cuda 9.0. During installation via the command sudo sh cuda_9.0.176_384.81_linux.run I'm getting this error: The driver installation is unable to locate the kernel source. Please make sure that the kernel source packages are installed and set up correctly. If you know that the kernel source packages are installed and set up correctly, you may pass the location of the kernel source with the '--kernel-source-path' flag First I was getting X server is still running error and by following the steps below, that error is replaced with the above error. These are the steps I took to get rid of the X server is still running error Hit CTRL+ALT+F1 and login using your credentials. kill your current X server session by typing sudo service lightdm stop or sudo stop lightdm Enter runlevel 3 (or 5) by typing sudo init 3 (or sudo init 5) and install your .run file. However, during step 3, when I try to install the file, I get unable to locate kernel source error. The file that I'm trying to run is cuda_0.0.176_384.81_linux.run which is in my home folder. During installation: I hit yes for everything (drivers, CUDA toolkit, CUDA samples) etc. In the end I get a summary that looks something like this: Driver: Installation failed XXXX : Installation skipped XXXX: Installation skipped How can I fix this installation error? $ uname -r 4.10.0-37-generic $ dpkg-query -l linux-headers-\* Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-==============-============-============-================================= un linux-headers- <none> <none> (no description available) ii linux-headers- 4.10.0-28.32 all Header files related to Linux ker ii linux-headers- 4.10.0-28.32 amd64 Linux kernel headers for version ii linux-headers- 4.10.0-37.41 all Header files related to Linux ker ii linux-headers- 4.10.0-37.41 amd64 Linux kernel headers for version ii linux-headers- 4.10.0.37.39 amd64 Generic Linux kernel headers EDIT: My question is different from the possible duplicate question because the other question doesn't have any references to the error I'm getting: The driver installation is unable to locate the kernel source. Please make sure that the kernel source packages are installed and set up correctly. If you know that the kernel source packages are installed and set up correctly, you may pass the location of the kernel source with the '--kernel-source-path' flag I've already tried the marked solution from . | For TensorFlow I would like to install CUDA. How do I do that on Ubuntu 16.04? |
public class DataFactory { class SYNOP implements IDataSources {} class WRF implements IDataSources {} public abstract class Factory { public abstract IDataSources CreateModel(); } public class SYNOPFactory extends Factory { @Override public IDataSources CreateModel() { return new SYNOP(); } } public class WRFFactory extends Factory { @Override public IDataSources CreateModel() { return new WRF(); } } public static void main(String[] args) { Factory factory = new WRFFactory(); } } And i got message error like this: No enclosing instance of type DataFactory is accessible. Must qualify the allocation with an enclosing instance of type DataFactory (e.g. x.new A() where x is an instance of DataFactory). What did i do wrong? Regards | What is the main difference between an inner class and a static nested class in Java? Does design / implementation play a role in choosing one of these? |
Any hint to prove $$ \sqrt{x+y} \le \sqrt{x} + \sqrt{y}, \qquad \forall x,y \ge 0 $$ | How do I prove $\sqrt{x + y} \le \sqrt{x} + \sqrt{y}$? for $x, y$ positive? This should be easy, but I'm not seeing how. A hint would be appreciated. |
I have spent the past 4 days trying to get Ubuntu and Windows 7 on my computer and every time it boots straight into Ubuntu. I have looked through most of the threads and tried Windows first, Ubuntu first, partitioning the drive, reinstall grub with boot - repair, pretty much every tutorial I can find, I only have one USB drive to boot off of, so this is very time consuming. I have to download the iso file and create a bootable USB everytime I install an OS and it's all for nothing because there is no boot menu. If anyone can help it would be greatly appreciated | After trying (and failing) to install better ATI drivers in 11.10, I've somehow lost my grub menu at boot time. The screen does change to the familiar purple colour, but instead of a list of boot options it's just blank solid colour, and then disappears quickly and boots into the default entry normally. How can I get the bootloader back? I've tried sudo update-grub and also various different combinations of resolutions and colour depths in startupmanager application with no success (640x480, 1024x768, 1600x1200, 16 bits, 8 bits, 10 second delay, 7 second delay, 2 second delay...) edit: I have already tried holding down Shift during bootup and it does not seem to change the behaviour. I get the message "GRUB Loading" in the terminal, but then the place where the grub menu normally appears I get a solid blank magenta screen for a while. Here are the contents of /etc/default/grub # If you change this file, run 'update-grub' afterwards to update # /boot/grub/grub.cfg. # For full documentation of the options in this file, see: # info -f grub -n 'Simple configuration' GRUB_DEFAULT=0 GRUB_HIDDEN_TIMEOUT=0 GRUB_HIDDEN_TIMEOUT_QUIET=true GRUB_TIMEOUT=10 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX=" vga=798 splash" # Uncomment to enable BadRAM filtering, modify to suit your needs # This works with Linux (no patch required) and with any kernel that obtains # the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...) #GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef" # Uncomment to disable graphical terminal (grub-pc only) #GRUB_TERMINAL=console # The resolution used on graphical terminal # note that you can use only modes which your graphic card supports via VBE # you can see them in real GRUB with the command `vbeinfo' #GRUB_GFXMODE=640x480 # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux #GRUB_DISABLE_LINUX_UUID=true # Uncomment to disable generation of recovery mode menu entries #GRUB_DISABLE_RECOVERY="true" # Uncomment to get a beep at grub start #GRUB_INIT_TUNE="480 440 1" |
In Linux use use AND Operators and it is represented by (&). In commands we can either use (&&) or (;). So, does a semi Colon (;) is also called an AND Operator? | What is the difference between echo "Hello " ; echo "world" and echo "Hello " && echo "world" Both seems to run the two commands after each other. |
I am studying the textbook Introduction to Probability Models by Sheldon Ross. In Section 3.6 page 151 (10th edition), the author uses the Dirichlet distribution to deduct the coefficient of a "uniform" distribution. The "uniform" distribution is $$f(p_1,p_2,\cdots,p_m) = \left\{\begin{array}{rl} c, & 0\leq p_i \leq 1, i = 1,\cdots, m, \sum_1^mp_i=1 \\ 0, & \text{otherwise} \end{array} \right.$$ So I check the wikipedia page about Dirichlet distribution. Among all the material I find out that "uniform" distribution (with constraint on the sum of variables) follows a symmetric Dirichlet distribution with $\alpha$'s become identical. $$f(x_1,\dots, x_{K-1}; \alpha) = \frac{\Gamma(\alpha K)}{\Gamma(\alpha)^K} \prod_{i=1}^K x_i^{\alpha - 1}$$ Thus it gives me the result as the author indicate $c=(m-1)!$. The question is, to me, how to get the coefficient without referring to the Dirichlet distribution or get the coefficient given the kernel of the Dirichlet distribution, of course with the constraint that $\sum x_i = 1$. I find out a post in the same site, which is to . Part of the solution can answer this question. However, it maybe of some value to help others search on this topic, so I decide not to remove the post. Since that version is a little bit hard to understand, Can you give a more plain explanation? | Let $X_1,\dots,X_{k+1}$ be mutually independent random variables, each having a gamma distribution with parameters $\alpha_i,i=1,2,\dots,k+1$ show that $Y_i=\frac{X_i}{X_1+\cdots+X_{k+1}},i=1,\dots,k$, have a joint ditribution as $\text{Dirichlet}(\alpha_1,\alpha_2,\dots,\alpha_k;\alpha_{k+1})$ Joint pdf of $(X_1,\dots,X_{k+1})=\frac{e^{-\sum_{i=1}^{k+1}x_i}x_1^{\alpha_1-1}\dots x_{k+1}^{\alpha_{k+1}-1}}{\Gamma(\alpha_1)\Gamma(\alpha_2)\dots \Gamma(\alpha_{k+1})}$.Then to find joint pdf of $(Y_1,\dots,Y_{k+1})$ I can not find jacobian i.e.$J(\frac{x_1,\dots,x_{k+1}}{y_1,\dots,y_{k+1}})$ |
I read but it's still not clear to me if I can offer a bounty to a community wiki answer? | It's possible to offer and award bounties of reputation on questions. What is a bounty? How can I find questions that have a bounty attached? How do I start a bounty? When can I start a bounty? Why is the system requiring me to choose a bounty amount that's higher than the minimum? Can I use Markdown formatting in the bounty remarks? Can I edit the remark? How long is the bounty period? How do I award a bounty? Can I award a bounty to my own answer? Can I award a bounty to an old answer? If I offer a bounty on someone else's question, can I award the bounty to their answer? After awarding the bounty, can I remove it or move it to another answer at a later time? What happens if there's no answer after the bounty period? What happens if I feel my question is still unanswered? What is automatic awarding? Are bounty awards exempt from the 200 points/day reputation limit? How does Community Wiki mode affect bounties? How does user deletion or post dissociation affect bounties? Can I award a bounty to an answer from a deleted user or one where the author was dissociated? Can I offer a second bounty after the first one has expired? Can I raise my bounty? What happens if a bounty question is closed or deleted? Why can't I vote to close or migrate a bounty question? What happens if I delete my account while I have an active bounty? Do I keep an awarded bounty when I delete my answer? What happens if a question where I awarded a bounty later gets deleted or migrated? Can I cancel my bounty? Can I affect / divide / share part of my bounty to two (or more) users? How many outstanding bounties can a single user have? See also: in the Help Center |
came out on December 7th 2015 and as a beginning Python coder I would like to try the very latest version on my Ubuntu installation. At the moment Wily Werewolf 15.10 ships version 3.4 and there are some great improvements in the newest version. I am currently running Wily Werewolf and I would be keen to hear some methods to update Python to 3.5.1. | How can I install a different version of Python using apt-get? Obviously I realise I can install using the source tar ball, however I would prefer not to install from source and instead use the package manager, as that's what it's there for. Surely somewhere reputable builds .deb files for the latest Python releases (why python.org don't is beyond me) that I can reference. What do I need to do to reference them and what issues might it create when upgrading to the next version? If there is no way except for building from source, is there a (pseudo) package that I can can install that will provide all of the dependencies needed without having to find and install each individually? So that I don't get: The necessary bits to build these optional modules were not found: _bz2 _curses _curses_panel _dbm _gdbm _lzma _sqlite3 _ssl _tkinter readline zlib |
I have a very lengthy string (length is also not fixed) I want to extract a substring lying between 'email' and '@gmail.com' Suppose it is xhxjcndjcnkjcnd cjkjcdckjncx email:substring@gmail.comjndhcjkdhcnchjdccb djc I want to extract the 'substring' in the String.. Can I do this using regular expression , using sed tool.? | Given a filename in the form someletters_12345_moreleters.ext, I want to extract the 5 digits and put them into a variable. So to emphasize the point, I have a filename with x number of characters then a five digit sequence surrounded by a single underscore on either side then another set of x number of characters. I want to take the 5 digit number and put that into a variable. I am very interested in the number of different ways that this can be accomplished. |
I am trying to understand the origin of the plus/cross-sign aberrations commonly seen for point sources in astronomical images, even ones created with professional-grade, high-quality optics. The one in the image below clearly has some chromatic dependence but its pattern tells me it's not purely chromatic aberration. I can't understand what physical cause gives rise to this particular pattern so commonly. Thanks. | Very often when viewing pictures of the cosmos taken by telescopes, one can observe that larger/brighter stars do not appear precisely as points/circles on the image. Indeed, the brighter the light from star, the more we see this effect of four perpendicular rays "shooting" out from the star. (Taken from .) My question is: what are the optics responsible for this effect? I would suppose that both the hazy glow around the stars and the rays shooting outwards are optical effects created by the camera/imaging device, but really can't surmise any more than that. (The fact that the rays are all aligned supports this, for one.) A proper justification, in terms of (geometrical?) optics for both the glow and the rays would be much appreciated. Here are a few other examples of such images: |
I'm customizing switch-to-workspace settings using dconf write /org/gnome/desktop/wm/keybindings/switch-to-workspace-N "['<Alt>5']" N 11 works but N 14 doesn't. How could I have this shortcut? | I'm trying to make a quicklist on the Workspace Switcher launcher that allows for quick switching to a certain workspace. (My friend sometimes uses my computer and just doesn't enjoy keyboard shortcuts, so I want to help him out.) So is there a command one could type in a terminal that would force a certain workspace to be focused on? |
From home page, choose a favorite tag. the list of questions tagged to it will be displayed-> try editing the favorite tags, script error is thrown. User has to go to the home page to edit the tags again. | Which browsers are officially supported by Stack Exchange? Also, what else is needed in order to use every feature of the site? |
Folks, I have received my phd from a university ranked 60 in usnews and had one year of post doc work after. Right now I am a non tenure track teaching professor at a wellknown university. Eversince I was student I had a dream of being in MIT, Stanford, Caltech or UC berkley. However, since I was neither genius nor rich, I was not able to do this. I even had a phd admission from USC but since it was partially funded I was not able to attend. Anyways, now that I am done with everything, I am still thinking of doing another phd in the above mentioned universities. But, I do not want to leave my current position since I really enjoy teaching and do not want to risk my future for just a dream. A solution I come up is to get a phd while I am working and this is only possible if the above universities are offering online phds. My field is civil engineering and due to my research area I am also interested in applied math. So far I was not able to find any top rank university that offers civil eng. or math completely online. I can get a phd in math from the university that I am teaching with a tuition waver but it is not really what i want. The best university for online math is University of Washington. But university of Washington is not a top rank university and I do not know if it is worth my time and money. Any suggestions highly appreciated. And please do not call me a loser for trying to get a second phd. :D Regards, Jason Ray | I am studying a combined bachelor of engineering (electrical) and bachelor of mathematics; I just started this year and will graduate in 2018. The reason why I am doing double degrees and not a single degree is because I love both electrical engineering and mathematics and I could not ignore any of them. So with this in mind, I am thinking of doing two PhDs when I graduate (one in electrical engineering and one in mathematics). Is this a good path or I should concentrate on only one of them? |
The Lorentz transformation is linear in $x,y,z,t$. Are there are any non linear space transformations that leaves the speed of light constant in all inertial frames? The possibility being that space or matter might not transform in a simple homogeneous way. Such a transformation which leaves the Maxwell equations invariant I imagine is unlikely. | In almost all proofs I've seen of the Lorentz transformations one starts on the assumption that the required transformations are linear. I'm wondering if there is a way to prove the linearity: Prove that any spacetime transformation $\left(y^0,y^1,y^2,y^3\right)\leftrightarrow \left(x^0,x^1,x^2,x^3\right)$ that preserves intervals, that is, such that $$\left(dy^0\right)^2-\left(dy^1\right)^2-\left(dy^2\right)^2-\left(dy^3\right)^2=\left(dx^0\right)^2-\left(dx^1\right)^2-\left(dx^2\right)^2-\left(dx^3\right)^2$$ is linear (assuming that the origins of both coordinates coincide). That is, show that $\frac{\partial y^i}{\partial x^j}=L_j^i$ is constant throughout spacetime (that is, show that $\frac{\partial L_j^i}{\partial x^k}=0$). Thus far all I've been able to prove is that $g_{ij}L_p^iL_q^j=g_{pq}$ (where $g_{ij}$ is the metric tensor of special relativity) and that $\frac{\partial L_j^i}{\partial x^k}=\frac{\partial L_k^i}{\partial x^j}$. Any further ideas? |
“London will remain a major financial center,” he said. “At the margin there will some shift to other financial centers in Europe.” If not, what does it mean? source: | The results show Singapore’s growing business clout, driven in part by an expanding financial and insurance industry, which makes up about 13 percent of the economy. “London will remain a major financial center,” he said. “At the margin there will some shift to other financial centers in Europe.” source: |
I am just curious to know the direct and precise to prove the identities (1) $$\cos(A+B)=\cos A \cos B-\sin A \sin B$$ and (2) $$\sin(A+B)=\sin A \cos B+ \cos A \sin B$$ I tried to come up with right-angled triangles but I failed to connect them and get some logic out. Thank's in advance. | The "" formulas often come in handy, but it's not immediately obvious that they would be true. \begin{align} \sin(\alpha \pm \beta) &= \sin \alpha \cos \beta \pm \cos \alpha \sin \beta \\ \cos(\alpha \pm \beta) &= \cos \alpha \cos \beta \mp \sin \alpha \sin \beta \end{align} So what I want to know is, How can I prove that these formulas are correct? More importantly, how can I understand these formulas intuitively? Ideally, I'm looking for answers that make no reference to Calculus, or to , although such answers are still encouraged, for completeness. |
In the simple linear regression model, $\hat{b}$ is the sum of independent normally distributed random variables . Is it false because it talks about $\hat{b}$ and not $b$? because in the simple regression model the equation is $y=a+bx+e$ and not $y=\hat{b}x+a$ | In the simple linear regression model, $\hat{\beta}$ is the sum of independent normally distributed random variables. Is it false because in linear regression there is $\beta$ and not $\hat{\beta}$? |
Let $A, B\subset M$. Prove the following statement: $A\subset B \iff A^c\cup B = M$ M is universal set and $A^c$ is complement of A. I can kind a solve this using bunch of reasoning but in no real way using set laws or using arbitrary elements to prove that $A^c\cup B \subset M$ and $M\subset A^c\cup B$. I'm pretty sure its very trivial but I'm just looking for a very formal way to prove. | I need to prove the following letting A and B be subsets of a universal set U. $$A\cup B = U \iff A^c\subset B$$ It just isn't straight forward to me. |
Let $G'$ be the commutator subgroup of $G$. Prove that if $H$ is a subgroup of $G$ and $G'\subset H$, then $H$ is normal in $G$. I do not know how to prove it. I have tried different ways but all of them were unsuccessful. However, I know that $G'$ is normal in $G$ and quotient group $G/G'$ is abelian. Can anyone demonstrate how to solve that problem. | Question: Let G be a group and let G' be the subgroup of G generated by the set $S=\left \{ x^{-1}y^{-1}xy \mid x,y \in G \right \}$ $\space$ Prove that G' is normal in G. Solved $\space$ Prove that G/G' is abelian. Solved $\space$ Prove that if H is a subgroup of G and G' is a subgroup of H, then H is a normal subgroup of G. I cannot even begin to start on this question. Any hint is appreciated. |
I know that the net electric field inside a conductor is zero due to field made by induced charges. But , IS IT NECESSARY ? what i mean is that what would happen if the net electric field inside a conductor was not zero . ( what would happen if the electrons are not in equilibrium inside a conductor? ) | My textbook says the field inside a conductor must be zero in order for the system to be equilibrium and therefore there must be no excess charge inside. Their proof: 1) Place a gaussian surface inside the conductor. Since the system is at equilibrium, all points on the surface must have an electric field of zero. 2) Therefore the net flux is zero, implying the charge inside is zero. 3) If there is no charge inside, all excess charge must lie on the surface. My problem: "Since the system is at equilibrium, all points on the surface must have an electric field of zero." Why? Consider an conductor with no excess charge. To simplify things, say the conductor consists of a 100 free electrons and a 100 ions of charge 1$e^+$. The conductor is neutral and at equilibrium. Now consider the field on one specific electron. There a total of 99 other electrons and 100 ions. So there would be a net field acting on that specific electron. So even though the system is at equilibrium, the net field on the individual particles is non-zero. So a system can be at equilibrium, even if the net field inside is non-zero. What am I misunderstanding? Another example: Consider a system consisting of one electron and one proton. If nothing is holding them back they will attract each other until they touch. After they touch, the force acting on them is still non-zero, yet they wouldn't accelerate. |
I am trying to exclude multiple lakes and reservoirs from a Supervised landscape classification but at the moment I have not found a way to do this. So far I have used the following workflows: 1.Draw a polygon -> Clip -> Extract by mask) generates the opposite result. 2.Draw a polygon -> "Raster to Polygon" -> Reclassify -> Set Null, but the reclassification removes RGB symbology Details: I am using an Multiband High resolution Raster image I am working on the latest version of ARCmap for Desktop I would like to retain the RGB Composite symbology | Which tool do I use in ArcGIS 10.1 for Desktop to exclude areas covered by vector polygon layers from a raster layer? I want to keep portions of the raster layers that exclude the portions covered by the vector layer. |
Say we have a battery at a fixed voltage of $V$ charging a capacitor with capacitance $C$. When the capacitor is fully charged, the energy stored in it will be $\frac{1}{2}QV$, where $V$ is the final voltage of the capacitor (and the voltage of the battery). However, I'm a little confused as to the work the battery does... To me, it seems that if the battery pushed $Q$ onto the capacitor, and the voltage of the battery is $V$, it must've done $QV$ of work, which means that the energy stored in the capacitor only accounts for half of it. Where did the rest of the work the battery did go? | For a simple circuit with a battery supplying a voltage $V$ to a capacitor, let us assume that the charge on the capacitor is $Q$. Now, the work done by the battery or the energy supplied is given by the relation: $$W=QV$$ But the energy stored in the capacitor is given by: $$U = \tfrac12 QV$$ The value of $Q$ as well as that of $V$ should be the same in both the equations. Now my question is, where is the other half of the energy that the battery supplied? |
n=0; ((n++));echo "ret=$?;n=$n;" ((n++));echo "ret=$?;n=$n;" ((n++));echo "ret=$?;n=$n;" from n=1 on, ((n++)) works correctly, only when n=0, ((n++)) return error, and I am using a trap '' ERR that is causing trouble with that is it some bug? | Try it: $ a=0 $ let a++ $ echo $? 1 # Did the world just go mad? $ echo $a 1 # Yes, it did. $ let a++ $ echo $? 0 # We have normality. $ echo $a 2 Contrast with this: $ b=0 $ let b+=1 $ echo $? 0 And this (from ): $ c=0 $ let ++c $ echo $? 0 What is going on here? $ bash --version GNU bash, version 4.1.5(1)-release (x86_64-pc-linux-gnu) |
I would like to do something like this: \immediate\write18{git log -1 --pretty=format:"%h-%ad" --date=short > /tmp/temp.dat } however, xelatex cannot proceed because the % means comment out if I do this: \immediate\write18{git log -1 --pretty=format:"\%h-\%ad" --date=short > /tmp/temp.dat } The call is actually: git log -1 --pretty=format:"\%h-\%ad" --date=short > /tmp/temp.dat which will have extra \ in it. How can I let the shell command use % instead of \% ? | How can I write % into an auxiliary file? % will not work, because LaTeX thinks that I start a comment with it (in the main file, not in the auxiliary file!), and \% will write \% into the file. How can it be accomplished? \documentclass{article} \begin{document} \newwrite\outfile \immediate\openout\outfile=example.dat \immediate\write\outfile{%}% will not work, of course, but neither \% \immediate\closeout\outfile \end{document} |
Suppose s="mrunal" I want to print run for that I am doing print(s[1:4]) But in python why print(s[1:3]) is not available. Simply I want to tell that why end in slicing is not that index which we want as last character? s="mrunal" index 0 = "m" index 1 = "r" index 2 = "u" index 3 = "n" index 4 = "a" index 5 = "l" here index for "n" is 3. Why end index is not same as s[1:3]? Why it is not inclusive? why it uses exclusive? | I need a good explanation (references are a plus) on Python's slice notation. To me, this notation needs a bit of picking up. It looks extremely powerful, but I haven't quite got my head around it. |
I have a red-hat system with its root and non-root users. I have to create n new root-like users and m new non-root users. Basically I have to clone the 2 kind of users already present on the server. The purpose is to give to each person able accessing to the server their unique credentials. Someone can act as root, someone else can act as a non-root user. I considered it different than giving root power to another user, because I have to create new root-like users. | How to Give all the powers Of Root account to another user account? With full command and detail. |
So for more context you can look at my last post, but I feel like I went about asking the question all wrong. What I'm given is one input on one line: month day eg April 11 What I need to do is, based on the month and day given, determine the season. So I need to first get the String inputMonth; and get the int inputDay; from the single string providing both. I am conveniently provided with the months and days of the seasons which resulted in me writing the following: //I know that the inputDay is wrong inputMonth = scnr.next(); inputDay = scnr.nextInt(); if( ((inputMonth == "March") || (inputMonth == "march")) && ((inputDay >= 20) && (inputDay <= 31))){ System.out.println("Spring"); } else if( ((inputMonth == "April") || (inputMonth == "april")) && ((inputDay >= 1) && (inputDay <= 30))){ System.out.println("Spring"); } else if( ((inputMonth == "May") || (inputMonth == "may")) && ((inputDay >= 1) && (inputDay <= 31))){ System.out.println("Spring"); } else if( ((inputMonth == "June") || (inputMonth == "june")) && ((inputDay >= 1) && (inputDay <= 20))){ System.out.println("Spring"); } else if( ((inputMonth == "June") || (inputMonth == "june")) && ((inputDay >= 21) && (inputDay <= 30))){ System.out.println("Summer"); } else if( ((inputMonth == "July") || (inputMonth == "july")) && ((inputDay >= 1) && (inputDay <= 31))){ System.out.println("Summer"); } else if( ((inputMonth == "August") || (inputMonth == "august")) && ((inputDay >= 1) && (inputDay <= 31))){ System.out.println("Summer"); } else if( ((inputMonth == "September") || (inputMonth == "september")) && ((inputDay >= 1) && (inputDay <= 21))){ System.out.println("Summer"); } else if( ((inputMonth == "September") || (inputMonth == "september")) && ((inputDay >= 22) && (inputDay <= 30))){ System.out.println("Autumn"); } else if( ((inputMonth == "October") || (inputMonth == "october")) && ((inputDay >= 1) && (inputDay <= 31))){ System.out.println("Autumn"); } else if( ((inputMonth == "November") || (inputMonth == "november")) && ((inputDay >= 22) && (inputDay <= 30))){ System.out.println("Autumn"); } else if( ((inputMonth == "December") || (inputMonth == "december")) && ((inputDay >= 1) && (inputDay <= 20))){ System.out.println("Autumn"); } else if( ((inputMonth == "December") || (inputMonth == "december")) && ((inputDay >= 21) && (inputDay <= 31))){ System.out.println("Winter"); } else if( ((inputMonth == "January") || (inputMonth == "january")) && ((inputDay >= 1) && (inputDay <= 31))){ System.out.println("Winter"); } else if( ((inputMonth == "February") || (inputMonth == "february")) && ((inputDay >= 1) && (inputDay <= 29))){ System.out.println("Winter"); } else if( ((inputMonth == "March") || (inputMonth == "march")) && ((inputDay >= 1) && (inputDay <= 19))){ System.out.println("Winter"); } else{ System.out.println("Invalid"); } My issue is that I can't figure out how to determine the month and the day separately from that one input. Whenever I run this I always end up getting "Invalid". Some people on my last post were showing different ways to go about this but to be honest I'm not familiar with arrays yet (That's next lesson). Thanks in advance guys. | I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug. Is == bad? When should it and should it not be used? What's the difference? |
I have a specific port number with me and want to check if it is active or not. I tried: netstat -an | grep $portnum Is this correct? | How to check the opened/closed ports on my computer? I used netstat -a on command line. Does the port status "LISTENING" indicate that the port is open? Is any port, that is not shown in the output, closed? |
This question is more for curiosity than knowledge, but it might still be useful to know. Is it possible to obtain automatic question bans on meta sites besides Meta Stack Exchange? If so, how much lower is the threshold? I ask because downvotes on Meta have little effect overall and can indicate disagreement, so I would imagine that implementing a question ban system on a meta site would be hard to implement. | Somewhere I heard the automatic question ban on Meta is set lower than on the main site. But looking at the profile of it looks like there is absolutely no automatic ban on meta. Is this intended behaviour? |
I need to show my website with a "theme" when in header's requests is present a particular key/value. In Drupal 7 I do this via themekey, but this module does not exist in Drupal 8. Are there alternatives, or other ways to do this? | I need to switch themes based on URL paths and content types. I would have used ThemeKey, but it's not in a ready state. What are people using in Drupal 8 to do these things? |
Can someone tell me what is the name of this one? Then I can check a little more about it. | I used to see these insects frequently in Chennai and Bangalore (South India). I just would like to know if this is a kind of . The lovebug as mentioned in the Wikipedia page is, however, different in appearance, although they too are walking as pairs. Why are they always walking as attached pairs? It also seems to me that the bigger one drives the motion and decides the direction. Is that true? |
I have an old "stereo" movie as a mp4 file. The sound is only in the left channel, the right channel is silent. I'd like to use ffmpeg to copy the video stream : ffmpeg -hide_banner -i video.mp4 -c:v copy ... and convert the audio to mono by selecting only the left channel : -map_channel 0.1.0 -map_channel -1 But that didn't change anything :-( What is the correct ffmpeg command line for that ? Is it also possible to do that whithout re-encoding ? | How can I use ffmpeg to isolate one channel from an audio file? I have a stereo audio file, and I need the output to be the contents of the right channel in a mono audio file. While I'm sure it's fairly easy to do, I can't figure it out. Thanks for the help! |
I installed QGIS 3 as instructed and the Vector processing tab is missing. I did uninstall all previous versions and Python. | I installed QGIS 3.0.0 on a PC with French as default language. After changing the language of QGIS to English, the 'Vector' menu is empty and there is a French 'Vecteur' menu. Any ideas how to fix this? I cannot change the system language. |
I went to (deleted, so 10K+ only) and pressed the "undelete" link. As you can see in the following screenshots, there are discrepancies in what it tells me about how many votes are needed to undelete the post. First, it says 1 more vote is needed. Then it says there are 22 votes remaining. I am not sure if this is supposed to be the number of undelete votes I have left or the number of votes still required to undelete the post. Apparently, even though earlier my vote was the only one needed to undelete the post, now yet another vote is required. (Also note the minor pluralization bug; it reads better as "1 more vote from another user" instead of "1 more vote from other users".) What's going on here? How many undelete votes would this question actually need to be undeleted? Side note: I don't really care much about whether or not this post should be undeleted; I clicked through just to document the discrepancy. | Normally, it takes three votes to delete. It still does, though the mouseover tip for a question with one delete vote cast on it already appears to be stuck at '1' And then after casting a delete vote on it: And if I've cast the first delete vote: The above examples are from P.SE, and while I don't have the privs to verify this being the situation on other sites, this has been confirmed on at least SO and is likely network wide. Child meta dups: SO: |
Let $f : \mathbb{R} \to \mathbb{R}$ and $g : \mathbb{R} \to \mathbb{R}$ be continuous functions. Suppose that $D ⊆ \mathbb{R}$, and that $D$ is dense in $\mathbb{R}$. Suppose that $f(x) = g(x)$ for every $x ∈ D$. Prove that $f(x) = g(x)$ for every $x ∈ \mathbb{R}$. Any tips for where I can start here? I'm pulling up blanks for this. EDIT: there is a very similar question asked, but I have no idea what a metric space is so the whole thing didn't mean a ton to me unfortunately. | Let $f: X \rightarrow Y $ and $g:X \rightarrow Y$ continuous functions and $(X,d_X),(Y,d_Y)$ metric space. Let $E$ by a dense subset in $X$. Prove that $f(E)$ is a dense subset in $f(X)$. If $f(p)=g(p)$ for all $p\in E$, prove that $f(x)=g(x)$ for all $x\in X$. My attempt: since $E \subset X \Rightarrow f(E)\subset f(X)$ and from the dense property we have $f(X) \subset f(\overline{E})$ and since $f$ is continuous, $f(X) \subset f(\overline{E}) \subset \overline{f(E)}$. Then, $f(E)$ is dense in $f(X)$. Suppose that $f(p)=g(p), \; \forall p \in E$. Hence, we have $$d_{Y}(f(x),g(x)) \leq d_{Y}(f(x),f(p)) + d_{Y}(f(p),g(x)) = d_{Y}(f(x),f(p)) + d_{Y}(g(p),g(x)).$$ By the fact that $f,g$ are continuous, there exist a $\delta_1$ and $\delta_2$ such that $$d_X(x,p) < \delta_1 \qquad d_X(x,p) < \delta_2$$ implies $$d_{Y}(f(x),f(p))<\epsilon /2 \qquad d_{Y}(g(p),g(x)) < \epsilon /2.$$ for all $\epsilon >0.$ Is this correct? |
Currently each site has it's own reputation rating which shows either expertise or trust in a particular user. This rating is useful for a number of things first of all it gives a number of rights to users second of all it allows us to place bounties and thirdly it shows an "expertise" number of how good a particular user is in a particular subject. The fact that each site offers it's own reputation does however have some consequences: I'm unable to offer bounties on different sites, I have quite a bit of reputation built up on Game Dev however I often find myself with problems on Stack Overflow, this means that I cannot use my hard earned reputation on Game Dev to help me resolve my problems (they would be off topic there). Reputation represents trust, currently many privileges are bound to your level of reputation, this mean that a user can be trusted with full moderator rights on one site yet only have 101 reputation on another not even allowing him to review users first posts. The solution: make a single global tracker of all reputation displayed besides the current reputation meter on each site, this global reputation can be used as an alternative supply of reputation for bounties at a lower exchange rate (say 2 reputation for each point offered in bounty and can be used to unlock a number of privileges (but not all)). This would mean that a user who is very well known and in high regards on one website can actually do more then a user who spend a single afternoon on a particular website. | Here's one to get shot down: How about letting bounties to be set using the reputation gained through the use of another site? So, for instance, I'm a programmer with a high Stack Overflow rep who hates using computers. Wouldn't it be useful for me to be able to exchange some of my excess Stack Overflow credit to incentivise a question on Super User? Or perhaps I'd like to highlight a question on Meta Stack Overflow, but I don't spend my time there. |
Assume that $f:[a,b]\to [c,d]$ is a Riemann integrable bijective function. Is $f^{-1}$ also Riemann integrable? I think it's true. I have tried to find a counterexample but failed since bijective is so strong. But I don't know where should I started with. | If $f \colon [a,b] \rightarrow [c,d]$ is a bijection, $f\in \mathcal{R}$ and $f^{-1}$ exists, then prove or disprove that $f^{-1} \in \mathcal{R} [c,d]$. Remark: I tried to use integration by parts to find $\int_{c}^{d} f^{-1}$ and to prove that was the right limit of Riemann sum, but failed. But I think this idea might be useful. |
Kate is registered as default application for *.html-files. This has the unwanted effect that html files as well as http-URLs are opened in Kate instead of Firefox. The strange thing now is that when I move Kate down in this list and press the Apply-button, after a second or so it appears again at the top of the list. I tried also with sudo, but it had the same effect. I could uninstall Kate and everything went back to normal. But as soon as I've re-installed Kate URLs are getting opened by Kate again. How can I change the priority of the applications here? | In the last few days, Kate took over opening HTML links and files. I want to get it back to Firefox, so I opened System Settings, went into Applications -> File Associations, found the text/html setting, and moved Kate below my browsers. Imagine my surprise when, after clicking Apply, Kate jumped back up to the top! Also, opening a link through xdg-open still launches Kate. That's not supposed to happen, right? Is this a bug? Or is there something else I need to do? Environment: Kubuntu 15.10 (current on updates) Kate 15.08.2 |
I made a simple , However, not everything is centered in the middle on every device. I'm not sure is this is just happening to me or if I didn't do something correctly. This is what it looks like on my This is what it looks like on my This is the snippet - try opening the on your phone. Thanks body{ margin: 0; padding: 0; background: #262626; font-family: Futura, Futura-Medium, "Futura Medium", "Century Gothic", CenturyGothic, "Apple Gothic", AppleGothic, "URW Gothic L", "Avant Garde", sans-serif; font-style : italic; text-align: center; -webkit-animation-direction: normal; -webkit-animation-duration: 22s; -webkit-animation-iteration-count: infinite; -webkit-animation-name: text; -webkit-animation-timing-function: ease; } h1{ font-size: 100px; } .main{ position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) } ul{ display: flex; position: absolute; left: 50%; top: 70%; transform: translate(-50%, 0) } ul li{ list-style: none; } ul li a{ transition: .5s; width: 80px; height: 80px; text-align: center; line-height: 80px; font-size: 35px; display: block; -webkit-animation-direction: normal; -webkit-animation-duration: 22s; -webkit-animation-iteration-count: infinite; -webkit-animation-name: text; -webkit-animation-timing-function: ease; } ul li a:hover{ font-size: 45px; } #particles-js{ background-size: cover; height: 100%; width: 100%; position: fixed; z-index: -1; } #date{ position: absolute; font-size: 25px; } @-webkit-keyframes text{ 0% {color: #39f;} 15% {color: #8bc5d1;} 30% {color: #f8cb4a;} 45% {color: #95b850;} 60% {color: #944893;} 75% {color: #c71f00;} 90% {color: #bdb280;} 100% {color: #39f;} } <!doctype html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <script src="https://code.jquery.com/jquery-3.3.1.js"></script> <link href="styles.css" rel="stylesheet" type="text/css"> <link rel="import" href="particles.html"> <link rel="import" href="title.html"> <link rel="import" href="dateCount.html"> <link rel="icon" href="logo.png"> <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css" integrity="sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU" crossorigin="anonymous"> </head> <body> <div id="particles-js"> <div class="main"> <h1 id="date"></h1> <h1>kaszam</h1> <ul> <li><a href="https://www.instagram.com/kaszamaksym/?hl=en" target="_blank"><i class="fab fa-instagram"></i></a></li> <li><a href="https://www.snapchat.com/add/maksymkasza" target="_blank"><i class="fab fa-snapchat-ghost"></i></a></li> <li><a href="https://www.facebook.com/maksym.kasza.1" target="_blank"><i class="fab fa-facebook-square"></i></a></li> <li><a href="info.html"><i class="fas fa-info-circle"></i></a></li> </ul> </div> </div> </body> </html> | I want to center a div vertically with CSS. I don't want tables or JavaScript, but only pure CSS. I found some solutions, but all of them are missing Internet Explorer 6 support. <body> <div>Div to be aligned vertically</div> </body> How can I center a div vertically in all major browsers, including Internet Explorer 6? |
This is Metabase Related Question. I know how to cross join in PostgreSQL. I have multiple staging databases to store raw data in postgreSQL. All databases are in same host. Now I want to join multiple databases for analysis in Metabase. I saw before create a raw query first I need to select database. Is there any way around for this ? | I'm going to guess that the answer is "no" based on the below error message (and ), but is there anyway to perform a cross-database query using PostgreSQL? databaseA=# select * from databaseB.public.someTableName; ERROR: cross-database references are not implemented: "databaseB.public.someTableName" I'm working with some data that is partitioned across two databases although data is really shared between the two (userid columns in one database come from the users table in the other database). I have no idea why these are two separate databases instead of schema, but c'est la vie... |
Hello everyone I'm working with an app and I'm consuming rest api using retrofit2. I have a list of companies that I need to show using recyclerview. I have followed a lot of resources and tutorials but none helped me. In the logcat session I have an error: java.lang.NullPointerException: Attempt to invoke interface method 'int java.util.List.size()' on a null object reference in my adapter.... in this line : @Override public int getItemCount() { return companies.size(); } Here is my code: my adapter private List<Company> companies; private Context context; public CompanyAdapter(List<Company> companies, Context context) { this.companies = companies; this.context = context; } @NonNull @Override public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int i) { View view = LayoutInflater.from(parent.getContext()) .inflate(R.layout.row_companies, parent, false); return new ViewHolder(view); } @Override public void onBindViewHolder(@NonNull ViewHolder viewHolder, int position) { Company comp = companies.get(position); viewHolder.compName.setText(comp.getName()); viewHolder.compDesc.setText(comp.getDescription()); viewHolder.compNipt.setText(comp.getNipt()); } @Override public int getItemCount() { return companies.size(); } public class ViewHolder extends RecyclerView.ViewHolder { public TextView compName, compDesc, compNipt; public ViewHolder(@NonNull View itemView) { super(itemView); compName = (TextView) itemView.findViewById(R.id.tvCompanyName); compDesc = (TextView) itemView.findViewById(R.id.tvCompanyDescription); compNipt = (TextView) itemView.findViewById(R.id.tvCompanyNipt); } } and my activity private RecyclerView recyclerView; private RecyclerView.Adapter adapter; private List<Company> companies; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_companies_list); RecyclerView recyclerView = (RecyclerView) findViewById(R.id.companies_list); recyclerView.setHasFixedSize(true); recyclerView.setLayoutManager(new LinearLayoutManager(this)); adapter = new CompanyAdapter(companies, this); recyclerView.setAdapter(adapter); } What I'm doing wrong... Any help is appreciated! | 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? |
My environment variables are correct? What is the correct way to use them in Ubuntu? I put them at the end of .bashrc file or edit the end of /etc/environment to able to use the $JAVA_HOME and $M2_HOME configuration and on my user? $JAVA_HOME JAVA_HOME="/usr/lib/jvm/java-8-oracle/" CLASSPATH="JAVA_HOME/lib/:$CLASSPATH" PATH="$JAVA_HOME/bin/:$PATH" $M2_HOME M2_HOME="/usr/share/maven/" M2="$M2_HOME/bin" PATH="$M2:$PATH" PATH=$M2:$PATH | What are correct places for: Global environment variables meant to affect all users? User-specific environment variables? |
Is there a possibilty in Salesforce from trigger beforeInsert how to stop the insert in the database table. | I want to check whether a certain criteria is met or not using a trigger before inserting a record. if it meets the criteria, i insert the record, but if it does not i want to display an error message that it doesn't meet the criteria. how do i do it? Please help if anyone knows. |
New to Ubuntu but highly interested, I have a problem with 14.04 in locating the terminal for command lines? As an alternative to GNOME Terminal, which I assumed would have been installed, I have tried to download GUAKE Terminal but am prevented by a repetitive error message indicating that the download 'requires the installation of untrusted packages' for which I have the options of ('OK' or 'Repair'). Activation of either has no effect on subsequent repeats, always linked to my hitting the installation button. | What is a terminal? How do I open a terminal window? How do I use the terminal? |
The goal of my program is pretty simple. It is to display an integer that adds two to itself every second. Since, some of the answers get updated by latest methods, I have tried many, alas, none of them work. I have tried Timer, Handler the while loop, executor etc. With timer I get Timer-0 error, Executor runs only once, and Handler wants me to declare the auto-incremented variable to be Final. I do want the number to be incremented for an hour or endlessly if possible. I am showing one of the options I have tried here. public class stats extends AppCompatActivity { TextView textView2; TextView textView1; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_stats); textView2 = findViewById(R.id.textView2); final int total = 30000; // the total number //... //when you want to start the counting start the thread bellow. new Thread(new Runnable() { int counter = 0; public void run() { while (counter < total) { try { Thread.sleep(1000); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } textView1.post(new Runnable() { public void run() { textView1 = findViewById(R.id.textView1); textView1.setText("" + counter); } }); counter += 2; } } }).start(); } and here is the error java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.widget.TextView.post(java.lang.Runnable)' on a null object reference. Now, this error is for the line textView1.post(New runnable) Could there be a more simpler approach to the problem? | 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 noticed that, as far as I can tell, the "Trilogy" Stack Exchange sites, are the only ones that display non-Stack Exchange ads (i.e. ads for other Stack Exchanges or the iOS and Android apps), like the following (from Stack Overflow): Stack Exchange's Business Model According to Jeff's answer in , besides generating revenue from job listings and candidate search, Stack Exchange also makes money through ads: Traditional, but respectful (e.g. no animation or flash or pop-anything) display advertising on SO, SF, and to a lesser extent SU. If such is the case, then why don't any of the other exchanges also display ads? The exchange is the (beating out Server Fault), and yet it displays no ads (as far as I could tell), and I would have thought that would be a perfect site for displaying game ads, and yet it doesn't. Does Stack Exchange have any plans to display ads on these sites in the future? | StackOverflow, ServerFault, and Superuser have ads. (I only see them when I'm not on my own computer where firefox and chrome AdBlock extension is not installed). The new SE 2.0 websites do not seem to have ads. Will this continue for the next couple of years? I would like to know because ads could be a factor in decisions on whether to migrate existing SE 1.0 communities to SE 2.0 or to use an alternative Q&A platform. There are free-software clones of Stack Exchange (Shapado, possibly others...). I know 1 community (Cheminformatics) that uses a clone and 1 (Bioinformatics) that is considering switching to a free platform. The clones have all the essential features but Stack Exchange software quality and quantity is in the lead. |
I want to create a folder using this Timestamp: %DATE:/=-%_%TIME::=-% My Robocopy command is : ROBOCOPY "%BUILD_SOURCESDIRECTORY%\sourcefolder\" "\\server\destination\%date:/=-%_%time::=-%" /V but it is not working, getting an error: 2020-04-07T03:53:21.7269608Z ##[error]Process completed with exit code 1. 2020-04-07T03:53:21.7292925Z ##[debug]System.Exception: Process completed with exit code 1. at Microsoft.VisualStudio.Services.Agent.Worker.Handlers.ProcessHandler.RunAsync() at Microsoft.VisualStudio.Services.Agent.Worker.TaskRunner.RunAsync() at Microsoft.VisualStudio.Services.Agent.Worker.StepsRunner.RunStepAsync(IStep step, CancellationToken jobCancellationToken) Note: I referred to the below link but I want to create a folder with date and time.in this link only date stamp mentioned. if anyone has an idea about, please let me know. | Update: Now that it's 2016 I'd use PowerShell for this unless there's a really compelling backwards-compatible reason for it, particularly because of the regional settings issue with using date. See @npocmaka's What's a Windows command line statement(s) I can use to get the current datetime in a format that I can put into a filename? I want to have a .bat file that zips up a directory into an archive with the current date and time as part of the name, for example, Code_2008-10-14_2257.zip. Is there any easy way I can do this, independent of the regional settings of the machine? I don't really mind about the date format, ideally it'd be yyyy-mm-dd, but anything simple is fine. So far I've got this, which on my machine gives me Tue_10_14_2008_230050_91: rem Get the datetime in a format that can go in a filename. set _my_datetime=%date%_%time% set _my_datetime=%_my_datetime: =_% set _my_datetime=%_my_datetime::=% set _my_datetime=%_my_datetime:/=_% set _my_datetime=%_my_datetime:.=_% rem Now use the timestamp by in a new ZIP file name. "d:\Program Files\7-Zip\7z.exe" a -r Code_%_my_datetime%.zip Code I can live with this, but it seems a bit clunky. Ideally it'd be briefer and have the format mentioned earlier. I'm using Windows Server 2003 and Windows XP Professional. I don't want to install additional utilities to achieve this (although I realise there are some that will do nice date formatting). |
Prove that the eigenvalues for a square Nilpotent matrix A can only be $0$. Definition of nilpotent A $^n$=$0$ n is a positive whole integer | I need to prove that: if a linear operator $\phi : V \rightarrow V$ on a vector space is nilpotent, then its only eigenvalue is $0$. I know how to prove that this for a nilpotent matrix, but I'm not sure in the case of an operator. How would I be able to relate $\phi$ to a matrix? Note: A nilpotent operator $\phi$ has been defined as an operator that satisfies $\phi^{n} = 0$ for some $n \geq 1$. |
why does the message "some data failed to reconstruct" come up when i solve camera motion? Im working on a gaming montage, so what i did was use the dolly camera from Call of Duty Black ops 2 to create a cinematicand recorded it using a Hauppage. Now i followed the tutorial from blender guru and at the part of adjusting focal length and sensory width i did not know what to do because the dolly camera is not an actual real camera with camera specs. | I added tracks and stuff, but then when I tried to solve motion track, there was a error that said: Some Data Failed to Reconstruct and it also said to look into the console for details, which I did. This is what the console said: By my understanding, my video is 372 frames long, and Blender is cutting the footage at 318 for some reason. Here is the image of the scene: Why? Here are links to and also . Also the next morning I did a camera solve, but then most of the frames went red. |
i do not understand the difference of future perect tense and future perect continous in a sentence or paragraph because the time signal of both tense are same. Namely by, before, and when. sometimes I got problem to do homework that determine use future perect tense and future perect continous in sentence. can you tell me the difference of each sentence? | What is the difference in meaning and / or use between: I will have worked here for two years by this time next year. and I will have been working here for two years by this time next year. This is often a point of confusion for students and even 'experts' alike. There could be a number of reasons why a speaker chooses to use either construction: The rest of the conversation was talking about the future using one form or the other, and to maintain consistency, or even because the speaker had been 'primed' by preceding language The attitude of the speaker reflects their attitude. The use of the progressive could indicate that the speaker feels it's more of a temporary solution. So, is there a difference in meaning and use? Which one of the above (1 or 2) is more likely? Or is there a third I've not considered? |
This question may look silly for some but I want to understand the concept behind, I have a single property(i.e TestNumber) within a TestClass. public class TestClass { private uint testNumber=0; public uint TestNumber { get { return testNumber; } set { testNumber = value; } } public TestClass () { TestNumber = 0; // or testNumber = 0; } } Now, if I want to set or get the value of the property outside the class, I can simply do the following, TestClass tc = new TestClass (); tc.TestNumber = 10; but my question is if I want to access this property within the same class, I have two options either I can use testNumber = 0; or TestNumber = 0;, so which one is correct & why? Thanks! | In C#, what makes a field different from a property, and when should a field be used instead of a property? |
I have free space on the disk but I can't add that space to the ubuntu partition, gparted doesn't let me resize the ubuntu partition at all. I'm running the livecd 14.04 LTS, my ubuntu version is 15.04 gparted screen shot Edit: sda1 and sda2 are the windows partition sda3 is my data partition I want to shrink my data partition (sda3) by around 50gb and add that 50gb to my ubuntu partition (runnning low on space frequently) I can't add that free space to the sda4 Current state: Solved: The free spaces must be next to the partition you want to resize, and all the partitions must not be mounted, even the swap partition (select swapoff) | Previously, I have installed Windows 7 on my 320 GB laptop with three partitions 173, 84 and 63 GB each. The 63 GB partition was where the Windows was installed. The rest were for file containers. Now I changed my OS to Ubuntu 12.04 LTS. I installed Ubuntu by replacing the entire Windows 7 on the 63 GB partition. The rest of the partitions remain as an NTFS Windows partition and I can still access them both (the 173 and 84 GB partitions). Now I want to change the two partitions of Windows into an Ubuntu format partitions plus most importantly, I want to extend the 63 GB partition to more than a 100 GB because at the moment I am running out of disk space. Whenever I try to install any application, especially using wine, it always complains for a shortage of disk space. How do I do the extending activity before I entirely format my laptop again and lose all the important files on my partitions? |
I think I read it during a battle of the books event in Alaska in the 1999-2002 range. The story is about a kid who finds a house where everything is wonderful and perfect, and morning is always spring, noon is summer, afternoon is autumn and nighttime is winter. Every night they all open presents like its Christmas and its just perfect. All the kids speak of Mr./Ms ____ who runs the house but none of the kids have ever seen them. I remember a pair of quotes where the protagonist realizes that "Mr. __ WAS the house!" and then later, when there ends up a war as some of the kids try to escape, the house itself starts to attack them with the phrase, "The house became Mr. ___". Eventually some of the kids escape and find out they have been missing for years. As many years as they had days in the house. And one girl turned into a fish... I think, my memory on that bit is super vague. | I was a child of ~9-10 years old when I read this back in the early to mid-nineties. The book revolves around a boy who is taken to a home for children. Strange things begin to happen and the boy realizes that the home has a dark side. I honestly remember very little (except for the fact that I enjoyed it), but I do remember a demonic twist to the story (not necessarily a religious bent though.) I recall gargoyle like creatures and that the children at the home began to disappear. I believe that they would reappear later, though seemingly they had been brainwashed. That's really all that I recall, I hope it's enough to spark someone's memory. |
What is Post Secondary Education? Does it include only PhD (or) any degree lower than PhD? | When I go to university for four years and study, e.g., law or medicine, do I earn an undergraduate degree? And do I have to go to university for another two years or so to get a graduate degree? Also, is it the same university then, or do I have to go somewhere else? And do you have to get a graduate degree? I’m really confused by the American academic system. |
I have the mannequin duplication glitch on 4 of my mannequins at my manor and have been trying to fix it for days. I’ve been trying to follow these steps I found other people use but it doesn’t work for me? Every time I leave my house the loading screen is only black with fog. I’m not sure how to get a loading screen that has pictures and I am desperate. 1) Put 2 of each item that you have been duping into the mannequin's inventory, nothing else. Also, make sure you don't have any more than 4 of each in your own inventory. 2) Leave and re-enter, making sure that when you leave the house, the loading screen shows an image instead of just a black, smoky screen. This ensures that the house (im)properly reloads. 3) Activate the mannequin, and remove one of each item from it's inventory. Without exiting the menu, go to your items and put each one back. WARNING: If you have 6 or more items in your own inventory at this time, it will ask you how many you want to place, and this will cause failure. This is why you can't have more than 4 to begin with. 4) Leave and re-enter, again, making sure that the loading screen shows an image when you leave. NOTE: This is why I like the Riften house, as it's easy to remember which door you went through last, and you can just use the other one. 5) Activate the mannequin, and remove all the items from it's inventory, leaving it naked. 6) Leave and re-enter one last time. Again, be sure it reloads the right way. When you go to your mannequin it should still be naked, and will have stopped duping items. | I looked around but cannot seem to find anything that actually answers the question of how I can stop the mannequins in my house from duplicating everything I put on them. I had Cicero's armor on a stand and ended up switching it with Miraak's armor, but when I go inside my house it will sometimes spawns Cicero's armor and I have like... 3 sets of them. All I want to know is how to fix this glitch, so I can use the mannequins as they are intended, for displaying my valuable armors. Just so you know I am on Xbox 1 and have the Special Edition. |
I imported makehuman model with stockings to Blender, cut the stockings and made socks out of them. My problem is that the legs are coming out of the socks in some of the animation frames. For now, I am making the socks really large so the knee would not stick out, but this is not the solution I wish to move forward with. I posted the picture showing the problem and the .blend file here: | Starting with a prefab model of t-shirt I tried to scale it to fit better but the result isn't satisfying. Some parts of the models mesh become visible. Is there any option or modifier that could add some spacing between body and cloth, or should I try to tweak loop-cuts manually? |
I would like to send an email to all users immediately after they signup that requires them to click a link inside that email to "activate" their email address. Ideally each user account would have a status showing whether this had been completed or not. Can anyone recommend a way for me to accomplish this? | I have set up the registration form using this chunk of code: wp_create_user($username, $password, $email); Note that i have did all kinds of validation before use this code. The registration is working fine now. But it register and activate the user account immediately after the form get submitted. What i want is confirming the email of a user before they can use the account. User have to check there email account and click the confirmation link and user account get registered/active. |
I'm looking at the on Mobius group. But I didn't get if this group is isomorphic to $PSL(2, \mathbb{C})$ or to $PGL(2, \mathbb{C})$ | $PGL(n, F)$ and $PSL(n, F)$ are equal if and only if every element of $F$ has an $nth$ root in $F$.($F$ is finite field) I can show that if $PGL(n, F)=PSL(n, F)$ then $|F|$ have to be even.I have not any idea how to deal with it. any suggestions ? |
In the past, our company had only one domain (www.domain_old.com) which obviously was the main domain. Now we have bought a new domain (www.domain_new.com), which we'd like to be the main domain from now on (i.e., for all the webpages, subdomains, emails, etc...). In other words: www.domain_old.com --> www.domain_new.com Answers to similar questions on this site suggest using a 301 redirect, so I assume that's the best option. Our website uses DirectAdmin and WordPress; how can I add a 301 redirect for the old_domain to the new_domain using these? | Firstly, I want to redirect an old domain to a new domain, (old site to new site). The old site has good ranking on Google, now if I redirect the site, I want to retain this site on the Google rankings and want to develop the new site's SEO. What would be the best redirect to use? When a Googlebot re-crawls the old site after its been redirected, would the search results still show the keywords and source code on the original old site (as the page is still on the old server)? the new sites will have near identical /products.html pages and contact us pages etc. Will these all be automatically forwarded? What is ideally the best way to preserve the old site as well as redirect users that go on the old site straight to the new site, i was thinking of using some sort of CSS code which can blank out the page, or add a new layer or white to it, so the keywords remain? |
I was trying to upgrade from Ubuntu 14.04LTS to Ubuntu 16.04LTS, however there was some issue with my internet connection and the software update tool had to abort the download. Now, I have changed my mind and want to wait for some more time before I attempt the upgrade. I wanted to cleanup the files/packages that were downloaded during the unsuccessful attempt. Could someone please guide me where does Ubuntu store those files/packages? | I support a laptop running Ubuntu in another state (so I don't have physical access to it). It is an EeePC with two internal drives: a 4GB flash drive with the root fs, and a larger (~12GB) drive with the /home partition on it (and plenty of free space). The user tried to upgrade to 11.10, and the upgrade failed because the root partition doesn't have enough free space to perform the upgrade. I remember running into a similar problem on a laptop once before, which just had one physical drive but a poorly-thought-out partition scheme; I think I just symlinked a directory from a too-small rootfs partition to a larger partition. In this case, I think the best solution is to bind-mount whatever directory Ubuntu wants to use to store its downloaded files to the larger drive. What directory (or directories) is the important one that needs to be 'moved' to the larger drive? If I can get away with just bind-mounting one directory, do I just need to do it once, at the beginning of the installation, or do I need to add the bind-mount to the fstab (i.e. because the files are still needed after reboot, so the bind-mount needs to be persistent)? Is there an easier or better way to accomplish the upgrade? (Neither a fresh install nor a repartition is an option right now) |
I have a script on a linux server which connects to a URL refines the data and returns a text file with multiple links, please see below: Script: #!/bin/bash /usr/bin/curl -k -s URL | cut --characters=44-51 | sort --unique | sed -n -E 's|^AP(.+)$|http://ap\1.ztb.icb.commerzbank.com:1025/|p' >> testOutput.txt Output: http://APrandomnumber.com:1025/ http://APrandomnumber.com:1025/ http://APrandomnumber.com:1025/ http://APrandomnumber.com:1025/ http://APrandomnumber.com:1025/ http://APrandomnumber.com:1025/ http://APrandomnumber.com:1025/ I want to now be able to curl each of these URL's from the text file generated by the script and return a true or false depending on whether it was able to connect to them or not. | I want to run a java command once for every match of ls | grep pattern -. In this case, I think I could do find pattern -exec java MyProg '{}' \; but I'm curious about the general case - is there an easy way to say "run a command once for every line of standard input"? (In fish or bash.) |