body1
stringlengths
20
4.1k
body2
stringlengths
23
4.09k
I'm trying to install Wine, but Synaptic shows that the package is broken. I tried installing it using the terminal, but it shows this: The following packages have unmet dependencies: winehq-stable : Depends: wine-stable (= 6.0.0~focal-1) E: Unable to correct problems, you have held broken packages. I tried running these commands: sudo apt-add-repository --remove 'deb https://dl.winehq.org/wine-builds/ubuntu/ cosmic main' sudo apt update sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main' sudo apt update sudo apt install --install-recommends winehq-stable but they didn't fix the problem. What can I do?
After upgrading from 10.04 to 12.04 I am trying to install different packages. For instance ia32-libs and skype (4.0). When trying to install these, I am getting the 'Unable to correct problems, you have held broken packages' error message. Output of commands: sudo apt-get install -f Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. After running this: sudo dpkg --configure -a foo@foo:~$ sudo apt-get install -f Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
I'm working with Jasper for PDF generation and have a template that is used to generate more or less the same document with different number of columns. Thus, in some cases I need to control the width of columns explicitly by setting predefined column width. Is there a possibility in Jasper-Framework that enables tags like in following example. <jr:column width="$P{CALL_PARAMETER}" uuid="735c1cbc-08d0-11eb-adc1-0242ac120002"> The goal is to pass CALL_PARAMETER to Jasper at some point of time and not to hardcode into template. Similar code results at runtime exception.
I have some Jasper reports which are displayed in HTML format. I would like the width of the columns in the HTML tables to automatically resize to fit the content of the widest cell (in that column), such that all the data is displayed. Currently this does not happen because the HTML generated by Jasper specifies fixed widths for the <table> and some <td> elements, e.g. <td style="width: 20px; height: 17px;"> <span style="font-family: Arial; font-size: 11px;">foo-bar-baz@examp</span> </td> I can't simply remove all these width properties (using JavaScript), because (as shown in the HTML above) any data that would be hidden when using these widths is not even returned to the client-side Cheers, Don
sorry if the title is badly worded but I wasn't sure how to word it. My question is this: I have a lot of things before \begin{document} in my latex file, maybe like 180 lines of setting up commands and use packages. I was wondering if I could put all the code above the line \begin{document} into a package and import that in so I can save lines. Thanks
Since I am using (almost) the same set up for my tex documents, I wonder if there is a way to create a preamble with my default packages and to recall it anytime I want to create a tex document. If yes, how I can call this "default" preamble? Thanks in advance
I have two DataTables with the same structure as each other. There are two columns in these tables ID and LIST. One table is populated from an internal database and other table is populated by a webservice call to a vendor's database. Both Tables have close to 2 million records. I am trying to compare the two tables to figure out where that are matches so I can figure out which records that I need to synchronize. Table 1 Table 2 ACTION -------- -------- ------ ID LIST ID LIST -- ---- -- ---- 1 ABC 1 ABC No Change 1 BCD Add To Table 2 (1,BCD) 2 ABC 2 ABC No Change 2 2 BCD Delete From Table 2 (2,BCD) Leave (2,ABC) 3 BCD Delete From Table 2 (3,BCD) With the data provided. I have come up with the following LINQ queries Dim t1_DistinctIDs As System.Collections.Generic.IList(Of String) = (From r In ds.Tables("t1").AsEnumerable Select r.Field(Of String)("ID")).Distinct.ToList Dim t2_DistinctIDs As System.Collections.Generic.IList(Of String) = (From r In ds.Tables("t2").AsEnumerable Select r.Field(Of String)("ID")).Distinct.ToList 'Records to Delete from Table 2 Because They Don't Exist In Table 1 Dim IDsToDelete As Array = (From r In ds.Tables("t2").AsEnumerable() Where Not t1_DistinctIDs.Contains(r.Field(Of String)("ENTITY_ID"))).ToArray 'Get All ID & LIST in Table 1 Dim t1_AllItems As Array = (From r In ds.Tables("t1").AsEnumerable Select New With { .ID = r.Field(Of String)("ID"), .LIST = r.Field(Of String)("LIST") } ).ToArray 'Find All Records In Table 1 That Do Not Exist In Table 2 Dim ListToAdd As Array = (From r In ds.Tables("t2").AsEnumerable() Join l In t1_AllItems On r.Field(Of String)("ID") Equals l.ID _ And r.Field(Of String)("LIST") Equals l.LIST _ Select New With { .ID = r.Field(Of String)("ID"), .NAME = r.Field(Of String)("LIST") } ).ToArray This is what I would do if I were using T-SQL. DECLARE @T1 AS TABLE ( ID INT, LIST VARCHAR(10) ) DECLARE @T2 AS TABLE ( ID INT, LIST VARCHAR(10) ) INSERT INTO @T1(ID,LIST) VALUES (1,'ABC') INSERT INTO @T1(ID,LIST) VALUES (1,'BCD') INSERT INTO @T1(ID,LIST) VALUES (2,'ABC') INSERT INTO @T2(ID,LIST) VALUES (1,'ABC') INSERT INTO @T2(ID,LIST) VALUES (2,'ABC') INSERT INTO @T2(ID,LIST) VALUES (2,'BCD') INSERT INTO @T2(ID,LIST) VALUES (3,'BCD') SELECT t1.ID, t1.LIST FROM @T1 t1 LEFT JOIN @T2 t2 ON t1.ID = t2.ID AND t1.LIST = t2.LIST WHERE t2.ID IS NULL I am trying to figure out how to do a Left Join where t2.ID IS NULL in LINQ.
I'm having some trouble figuring out how to use more than one left outer join using LINQ to SQL. I understand how to use one left outer join. I'm using VB.NET. Below is my SQL syntax. T-SQL SELECT o.OrderNumber, v.VendorName, s.StatusName FROM Orders o LEFT OUTER JOIN Vendors v ON v.Id = o.VendorId LEFT OUTER JOIN Status s ON s.Id = o.StatusId WHERE o.OrderNumber >= 100000 AND o.OrderNumber <= 200000
Seriously, it randomly appears on certain files but I have no idea how I made it happen and can't find the answer anywhere online. I really like using it to explore my scenes and would be really appreciate it if I could find out how to bring it up. Because it's not an option to add as a workspace for some reason, and it's driving me crazy. Please help.
I'm stuck in full screen in the node editor. Escape isn't working, and I have no menus and no idea how to leave except to quit Blender and reopen the program.
I'm reading and I have a problem with a piece of math in part related to gradient descent analysis. Article's author analyzes the gradient descent on the simplest nontrivial problem: quadratic form with $A$ being symmetric and invertible: $$ f(w) = \frac{1}{2} w^TAw - b^Tw, \quad w \in \mathbb{R}^n. $$ The problem has optimal solution at $w^* = A^{-1}b$. We approach it though using gradient descent: $$ w^{k+1} = w^k - \alpha (Aw^k - b). $$ If we change the basis for $w^k = Qx^k + w^*$, where $Q$ is the matrix of $A$'s eigenvectors ($A = Q \Lambda Q^T$), we soon realize that: $$ w^k - w^* = Qx^k = \sum_i^n x_i^0 (1 - \alpha \lambda_i)^k q_i. $$ So we get the error at $k$-th iteration of gradient descent. Then, in Decomposing the Error section, the author visualizes how error components contribute to the loss. To do so he writes the contributions of each eigenspace's error to the loss: $$ f(w^k) - f(w^*) = \sum(1 - \alpha \lambda_i)^{2k} \lambda_i [x_i^0]^2. $$ How did he get that? I tried using least squares, so I assumed $d=w^k - w^*$ and took the norm ($d^Td)$ but I did get: $$ \sum(1 - \alpha \lambda_i)^{2k} [x_i^0]^2 [q_i]^2. $$ Do I even approach it in the right way?
I'm reading , a post from the new distill journal. I'll paraphrase the main equations leading to the part which confuses me, the post describes the intuition in more detail. The gradient descent algorithm is given by the following iterative process $$w^{k+1} = w^k-\alpha \nabla f(w^k)$$ where $w^k$ is the value of iteration $k$, the learning rate is $\alpha$ and $\nabla f(w)$ is the gradient of the function $f$ evaluated at $w$. The function $f$ you wish to minimize. Gradient descent with momentum is given by adding "memory" to the descent, this is described by the pair of equations: \begin{align} z^{k+1} &= \beta z^k + \nabla f(w^k) \\ w^{k+1} &= w^k - \alpha z^{k+1} \end{align} In the next section "First Steps: Gradient Descent" the author considers a convex quadratic function $$f(w) = \frac12w^TAw-b^Tw, \quad w \in \mathbb{R}^n, A \in \mathbb{R}^{n,n}$$ which has gradient $$\nabla f(w) = Aw-b$$ If we assume $A$ is symmetric and invertable then $f$ has optimal solution $w^\star = A^{-1}b$. If we were to use gradient descent then we would iterate towards this optimal solution in the following way \begin{align} w^{k+1} &= w^k - \alpha \nabla f(w) \\ &= w^k - \alpha (Aw^k -b) \end{align} Then the article goes on to say "There is a very natural space to view gradient descent where all the dimensions act independently — the eigenvectors of $A$". I think this makes sense, although my intuition is kind of fuzzy. Every symmetric matrix $A$ has an eigenvalue decomposition where $$A = Q\text{diag}(\lambda_1,\ldots,\lambda_n)Q^T.$$ Where $\lambda_1 > \ldots > \lambda_n$ and $Q$ is the vector with the corresponding eigenvectors as columns (right?). This next part is where I don't understand what is going on: If we perform a change of basis, $x^k = Q^T(w^k - w^\star)$, the iterations break apart, becoming: \begin{align} x_i^{k+1} &= x_i^k - \alpha \lambda_i x_i^k \\ &=(1-\alpha\lambda_i)x_i^k &= (1- \alpha\lambda_i)^{k+1}x_i^0 \end{align} Moving back to our original space $w$, we can see that $$w^k - w^\star = Qx^k = \sum\limits_{i}^n = x_i^0(1-\alpha\lambda_i)^kq_i$$ What is going on here? Where is the motivation of taking $w^k - w^\star$ into the eigendomain? What is $x^k$? Why are we now looking at invidual elements of the vector? I tried to follow the caculations through, but $x^{k+1}$ depends on $w^{k+1}$ which depends on $z^k$, which I thought we were trying to eliminate. My question is can someone expand on these few steps with some intuition and calculations? Thanks.
I see both does the same thing and both end me up in the same directory.So is it really the same or there is a difference? Also doing su and su - makes me root user in both the cases.So how is it even benficial?
What is the difference between the following commands: su sudo -s sudo -i sudo bash I know for su I need to know the root password, and for sudo I have to be in the sudoers file, but once executed what is difference? I know there is a difference between su and sudo -s because my home directory is /root after I execute su, but my home directory is still /home/myname after sudo -s. But I suspect this is just a symptom of an underlying difference that I'm missing.
Can I get access to my webcam data, like a real digital recording system?
What software is available for using webcams or ways of checking if my webcam is working correctly after installing Ubuntu.
I want to pick all the elements inside the ul tag and push it in an array using javascript.How should I do that? <ul id="sortable1" class="connectedSortable"> <li class="ui-state-default">Item 1</li> <li class="ui-state-default">Item 2</li> <li class="ui-state-default">Item 3</li> <li class="ui-state-default">Item 4</li> <li class="ui-state-default">Item 5</li> </ul>
I have a structure like this: <ul> <li>text1</li> <li>text2</li> <li>text3</li> </ul> How do I use javascript or jQuery to get the text as an array? ['text1', 'text2', 'text3'] My plan after this is to assemble it into a string, probably using .join(', '), and get it in a format like this: '"text1", "text2", "text3"'
Recently I was been posted with this question: Why is 1. I don't know who is he. (grammatically incorrect) 2. I don't know who he is. (grammatically correct) Even as a native English speaker, I could not give the person asking this question a definite answer or explanation. Please enlighten me on this. Thanks!
Lets consider the following: The book doesn't explain, "What's the wisdom behind education?" Changing this to an indirect question becomes the following: The book doesn't explain what the wisdom behind education is. Now, I found many instances on Google where structures like this weren't really converted to indirect questions. For example: The book doesn't explain what's the wisdom behind education. "[She] doesn't say what's really on her mind." Edit: And consider the following: What's the logic behind it. (a) I wonder what's the logic behind it vs. (b)I wonder what the logic behind it is. (a) sounds better but why? And are these constructions acceptable?
Straight from the qsort manual it says: If two members compare as equal, their order in the sorted array is undefined. However, I want qsort to leave the ordering unchanged on equality. That is to say, leave the ordering of two elements as they are in the original array if they have the same value used for ordering. I'm not sure how to do this using qsort. I would rather not use an alternative sorting library/ roll my own. Thanks -- edit: now I know the distinction between stable and unstable sorts I realise this is a duplicate.
I'm assuming that the good old qsort function in stdlib is not stable, because the man page doesn't say anything about it. This is the function I'm talking about: #include <stdlib.h> void qsort(void *base, size_t nmemb, size_t size, int(*compar)(const void *, const void *)); I assume that if I change my comparison function to also include the address of that which I'm comparing, it will be stable. Is that correct? Eg: int compareFoos( const void* pA, const void *pB ) { Foo *pFooA = (Foo*) pA; Foo *pFooB = (Foo*) pB; if( pFooA->id < pFooB->id ) { return -1; } else if( pFooA->id > pFooB->id ) { return 1; } else if( pA < pB ) { return -1; } else if( pB > pA ) { return 1; } else { return 0; } }
Let $A$ be an orthogonal matrix, i.e. $A^T=A^{-1}$. Prove that $A(x\times{y})=\det(A)(Ax\times{Ay})$. I know that orthogonal matrices preserve distance, angles and orthogonality of vectors and I have tried using this idea in conjunction with the formula $|x\times{y}|=|x||y|sin\theta(x,y)$. (Side-question: How do we know orthogonal matrices preserve distances, angles and orthogonalit of vectors?)
How can one prove the following identity of the cross product? $$(M a)\times (M b)=\det(M) (M^{\rm T})^{-1}(a\times b)$$ $a$ and $b$ are 3-vectors, and $M$ is an invertible real $3 \times 3$ matrix.
im bulding a student management system using php and codeigniter. After running a webapp vulnerability scanner i got a critical error on 'stid' paremiter is vulnerable to blind sql injection. This paremiter is used when a student create account, so the sytem take this student id and pass it to the database to see if its alreday exist or not. To make sure it's not false alarm i also uses sqlmap and also it detect this blind sql injection and dump out my databases. Here below is the place where i belive there is a problem. I'll appreciate any suggetion to mitigate this problem. Thanks function student_status(){ $input = $this->input->post(); $message = array(); switch($input['content']) { case 'studentid': $user = new User(); $user->where("registration_number_id",$input['stid'])->get(); if($user->result_count()){ $message['error'] = true; $message['message'] = 'User Already has an account'; }else{ $student = new StudentInfo(); $student->where('registration_number',$input['stid'])->get(); $this->commondata = $student->get_basic_info($input['stid']);
If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example: $unsafe_variable = $_POST['user_input']; mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')"); That's because the user can input something like value'); DROP TABLE table;--, and the query becomes: INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--') What can be done to prevent this from happening?
Anyone know how to GPU render in this mac MacBook Pro (13-inch, 2017, Two Thunderbolt 3 ports) 2,3 GHz Intel Core i5 Intel Iris Plus Graphics 640 1536 MB I would appreciate any information
I was wondering if there now (as of Blender 2.78c) a way to use GPU rendering on an Intel Iris Pro Graphics Card. I tried to get it to work, and successfully got the GPU to show up in the System User preferences, and in the render tab, but when I try to actually render something, the message at the top says LOADING RENDER KERNELS (MAY TAKE A FEW MINUTES THE FIRST TIME). However, it seems to take more than a few minutes. This message never goes away and I need to force quit blender to stop it. Any way to properly do it?
An interesting question came up last night. Player X is 4th lvl cleric and 1st lvl monk. Produce flame can be thrown for d8 of damage. Its damage increases to 2d8 at 5th lvl. Does this mean at 5th lvl overall or at 5th lvl of the specific class. We ruled that the damage won't increase until he is a 5th lvl cleric since its a cleric spell. If there's an official ruling for this its eluding me and I apologize! ;-)
Cantrips seem to be the only type of spell that cares only about your class level. However, in the multiclassing section they are not mentioned, does this mean that cantrips use your character level, instead of your class level? Does this mean a Warlock 2 / Fighter 15 can cast an Eldritch Blast with 4 beams just like a level 17 Warlock?
Thanks everybody for your enthusiasm for my previous questions. Now I have an additional question pertaining to a particular section of English grammar: "number shifts" For example: The problem with this plan is all of the permits we could have to file before starting the project. It is obvious that neither the word "is" or "are" is consistent with the noun each of them refers to. Therefore, how can I solve this dilemma? After a moment of thinking the solution, I got exhausted; therefore, I decided to get rid of this kind of confusion by changing the whole sentence into a somewhat new one: Filling all of the permits required by this plans will probably delay the project. However, I was still not satisfied with my attempt. So, can somebody give me some advice on how to tackle this kind of situation? Should I change the form of the sentence without changing its meaning or is there a correct way using the word "is" or "are"? If I needed to adhere to the latter approach, what would I essentially do to avoid the mismatch between "noun" and "verb"? Once again, thanks for any help! Best regards
In my , I provided the following, problematic, wording (especially bold italic), and I need help to better understand this issue so I can fix my answer:1 The thing is the books. (Reduced form of Sentence 2.a) Fundamentally, Sentence 2.a (the so-called "correct" answer), is grammatically defective. Recall there is another grammatical rule: the subject and subject's complement should match in number. A clarification is needed here. I am not suggesting here, in this EL&U question, that there is any such singular grammatical rule as indicated in the quote above. The quote continues as follows: The reduced sentence makes the disagreement between the subject's and complement's plurality obvious. What is one to do? Language is linear and we know "The thing is X" is better than "The thing are X", so we go with the former, which is the subject-verb agreement rule. But what is "the books" then? It must be thought of as a collective noun, even if it doesn't look or feel like one. Forcing something to be a collective noun is related to the idea of notional agreement. Others noted that grammatically defective is too strongly worded. There is no such "grammatical rule" for subject/complement agreement. Please help me understand/improve upon my line of thought here. I'm stating that Sentence 2.1 presents a fundamental "conflict" or "error" (however one might define error) at some level (morphological, syntax, grammatical, semantic): The thing is the books. (Or, "The thing is the objects.") Based on the "obvious" morphosyntactic plurality conflict, the above sentence feels so wrong that I think many native speakers would think it "simply" grammatically incorrect. However, @F.E. gives counter examples: And here are some more grammatical examples, where the number of subject and predicative complement don't agree: "They were a problem to us all", "That so-called work of art is simply four pieces of driftwood glued together" (CGEL, page 254-5). As CGEL says: "What is required is semantic compatibility, not syntactic agreement . . .". There are more examples on page 512: "The only thing we need now is some new curtains", "The major asset of the team is its world-class opening bowlers", "Our neighbors are a nuisance", "This gadget is five different tools in one". I think all the examples given above can be explained as notional agreement. Question 1: If we explain this phenomena in terms of notional vs syntactic agreement, where does "grammatically correct/incorrect" fit in? Question 2: Can a simple sentence such as "The thing is the objects." be grammatically incorrect while more complex sentences such as "The thing is four pieces of driftwood glued together." be grammatically correct? (The answer, in my mind, must be no; this is my conundrum.) Question 3: Would it be better to say that Sentence 2.a has a low level of (linguistic) ? Question 4: How about a low level of and that it's semantically difficult to be (linguistically) ? Question 5: Do we simply draw a hard line and say "The thing is the objects." is 100% grammatically correct? I didn't particularly like this option based on intuitive notions of "grammatically correct". 1. Please help me and be kind; I'm trying to improve my understanding. I'm looking for cool, objective advice on how to look at this. I numbered my questions so they can be easily referenced, if desired. My preference is the final answer would sufficiently answer all the questions, but of course that can be done explicitly or implicitly.
I'm pretty new to java and I am trying to to convert this string array with hexadecimal values into an int array. I have no clue how to do it. import java.io.*; import java.util.*; public class cruzD_OSpgm2 { public static void fileReader() { ArrayList<String> ramChipList = new ArrayList<String>(); try { BufferedReader br = new BufferedReader(new FileReader("RAMerrors")); String sCurrentLine; while ((sCurrentLine = br.readLine()) !=null) { ramChipList.add(sCurrentLine); } } catch (IOException e) { e.printStackTrace(); } String[] ramChip = new String[ramChipList.size()]; ramChip = ramChipList.toArray(ramChip); } public static void main(String[] args) { fileReader(); } } here are the 4 hex values ABCDEFABC 1A00D0000 7A0EDF301 3CDAEFFAD
I am looking for a way to convert a long string (from a dump), that represents hex values into a byte array. I couldn't have phrased it better than the person that posted . But to keep it original, I'll phrase it my own way: suppose I have a string "00A0BF" that I would like interpreted as the byte[] {0x00,0xA0,0xBf} what should I do? I am a Java novice and ended up using BigInteger and watching out for leading hex zeros. But I think it is ugly and I am sure I am missing something simple.
I'm improving posts on Stack Overflow. I don't know why, but quite often someone votes to reject my suggested edit as "too minor" when I improved every issue in the post! I cannot improve more if everything is improved. Do you think that I think it is not. People who checking suggested edits should be more clever!
OK, this question has been asked over and over, and I am still unsure. I am just trying to find the thin line between a substantial and minor edit. I find myself making edits for grammar and poor formatting, that I can see some reviewers find minor and others do not. I have also noticed some users with high rep, or moderators will make the similar edits: If I have edited your post with an edit summary of “ARGH”... ... or some variation thereof, then you probably used “it’s” when the correct word was, in fact, “its”. Can anyone provide a definitive way to establish whether or not one should proceed to edit? It seems to be more a matter of opinion rather than an objective delineation.
I have been doing some image processing on my computer using . Specifically, I am running a 5x5 median filter on imagery. I can specify the number of processes that occur simultaneously within the Erdas batch command window. I have been observing unusual behavior when I specify 16 simultaneous processes, which lead me to double check the number of processors on the machine. I used the following command prompt command to assess the number of processors: wmic cpu > cpu.txt Which yielded (in part): Number of Cores: 8 Number of Logical Processors: 16 How does the number of cores differ from the number of logical processors in the context of software like Erdas imagine where the user can specify the number of simultaneous processes? I am trying to determine if I should be specifying 8 or 16 simultaneous processes to maximize efficiency.
I am confused by the difference between "Cores" and "Processors". A lot of the computers are 2-cores, 4-cores. Does this mean that they have one processor with 2 or 4 cores on that single processor? Also, for intel core i5, it seems that there are 4 CPUs in the task manager, are they referring to 4 core on a processors, or 4 processors with one core each, or 2 cores on 2 processors?
I see the link: Get the weekly newsletter! In it, you'll get: * The week's top questions and answers * Important community announcements * Questions that need answers When I click it, it doesn't let me choose the tags/filters. I only want C, C++, valgrind, and some other tags (I don't want Java, Python, etc.). How to subscribe for FILTERED weekly newsletter? And how to make it not WEEKLY but bi-weekly or monthly?
Stack Overflow is huge and varied. Wouldn't it be great if I could just subscribe to a newsletter with a list of my favorite tags? If I love dealing with , I think it would make sense for my version of the newsletter to focus more on Android questions. Or, if I sign up for the newsletter, but don't own a Mac, it would be nice if I my newsletter would focus on the part of the site I do follow (i.e., iOS). So I would like to suggest that the newsletters for each site (optionally) take into account the user's favorited and ignored tags for that site. I know that you can receive emails about specific filters, but I don't think that's a good solution for users who already receive the newsletter. Most of the questions it highlights cover topics that I have no interest in. It would be much better if I could filter out all the noise and get down to my likely favorites.
I know we can try and count the number of ways that they can add to 20, however this is much easier when there is only 2 or 3 dice. I believe there is a way to do this using combinations but I am not sure. I thought it was a stars and bars, so I wrote out 20 like -> 1 + 1 + 1 + 1 |+ 1 + 1 + 1 + 1| + 1 + 1 + 1 + 1 + 1 + 1 |+ 1 + 1 + 1 |+ 1 + 1 + 1 Which makes a 20 choose 4, however, this is over counting as each block of 1's can't be greater than 6 or less than 1. Thanks for your help
I am trying to identify the general case algorithm for counting the different ways dice can add to a given number. For instance, there are with two 6-dice. I've spent quite a bit of time working on this (for a while my friend and I were using Figurate numbers, as the early items in the series match up) but at this point I'm tired and stumped, and would love some assistance. So far we've got something to this effect (apologies for the feeble attempt at mathematical notation - I usually reside on StackOverflow): count(x): x = min(x,n*m-x+n) if x = n 1 else some sort of (recursive?) operation The first line simplifies the problem to just the lower numbers - where the count is increasing. Then, if we're looking for the count of the minimum possible (which is also now the max because of the previous line) there is only one way to do that so it is 1, no matter the n or m.
I have a string like price: string price= "5000000"; but i want to know, how can i change it (in c#) to something like this: "5,000,000" because it's very better and user friendly.
I want to add a comma in the thousands place for a number. String.Format()?
I have an input voltage of 12V from my power supply and i need 6V to feed into the ESP8622. I was giving it all the 12V but the wifi module becomes increasingly hot with time and so i decided to have a limited voltage feed into it. Am not getting it to fire up however. It still stays blank. I tested providing the 6V from the power supply and got positive results. My resistors are both 100 ohms and when i probe the interconnection rail of the resistors on the breadboard, i can see that 6V is there. But when i feed the link into the ESP8266, it doesn't light up. It only does when the 6V are coming from the power supply. Here is a pic of my circuit
I'm making a voltmeter for the college senior project, and the problem is that voltage divider should equally split 17V into two 9V(nominal value of the batteries. As of now, an actual voltage is 8.5V and eventually will go down as the batteries die, so don't freak out too much by my round errors.) sources, but as soon as I connect Arduino board to the circuit, voltage( across the resistor it's connected to) drops to 2-3 Volts. Which is apparently enough to power the micro controller, but not enough to light the display up. (it's also enough to use the other resistor as a space heater with 14 Volts across it). Please feel free to look at the schematic of the device provided above. (either models, or specs of the components are written on the schematic) Now I'll explain the design thoroughly: The idea is to use piezoelectric element (thin laminated flexible piezoelectric beam), place it into a fluid flow (air) and rectify the outgoing AC signal with a full wave bridge. The next step is to amplify the signal, because it has very low magnitude and arduino analog pin can't register it without amplification. Amplifier needs at least +-7V supply, so it's provided to it from the two 9V batteries, that are connected to a voltage divider. Therefore, the virtual ground of the circuit is in between the two batteries. At the same time I want the arduino board (Actually it's not arduino, it's arduino compatible board dubbed Pro Micro 5V) to be powered from the same two batteries. The whole thing works fine from USB, but from the batteries it works as it pleases! Here are the design constraints of the device: The entire device shall hang somewhere in a remote location, so it has to be powered from an autonomous power supply (two 9V batteries in my solution). The device should be as light, and as small, as possible. (solutions like adding another battery are not desirable). Arduino board have to have 5V on it to light the display. Additionally I'd like to learn why micro controller has variable input resistance and what it depends on. I've tried to figure out what is the resistance across the arduino's ground and RAW by assuming that the resistor of the voltage divider and the arduino are connected in parralel. In three different setups I've got the arduino's resistance to be equal to 221.93, 527.73 and 743.4 Ohm. As I understand, the board has some kind of reducer at the voltage input that prevents the board from burning at supplied voltages above 5V and below 12V, but why it drops the supplied voltage from 8V to 2-3V?
I'm looking for relative values here. For example, if it takes a person about 40 hours to complete only the story for the average Final Fantasy, then how long, in comparison, would the Final Fantasy XI story take? In other words, how much longer is the FF-XI storyline completion compared to Final Fantasy storylines? This does not include expansion packs or downloadable content.
I'm going down my huge backlog of unplayed Steam games and I'm thinking the best way to tackle the list is to go through the shortest games first and then concentrate on the 20+ hour ones. I'm wondering if there's a website or something else that has an estimated amount of gameplay time for games. Is there anything like that?
When connecting to a server, is there a way to keep the SSH console open once disconnected? Or is there a program that does that, and that lets me connect back into where I left? This situation can happen for instance if I start a simple manual backup using cp from towards that takes +1h. I may not be able to wait and have to close the connection, but I still want my command to finish and I may even login later and check the result message. My current method achieving this, is to login to the a desktop installed on server using VNC. Open terminals remain open and I can let them run something, log off, and come back later and just continue where I where I stopped. Is that possible within the command line so that I am not dependent on the remote desktop?
Let's say I launch a bunch of processes from a ssh session. Is it possible to terminate the ssh session while keeping those processes running on the remote machine?
I not a US citizen and don't have a Social Security Number but will be traveling to the US for three months, bringing cash. Do any banks offer tourists a checking account with debit card, so I can deposit my cash and not have to pay in cash all the time? I prefer checking accounts with the lowest fees obviously: lowest balance needed to be free, no transaction fees, low fees on depositing etc.
I am travelling to the US on vacation. I would like to open a bank account, probably a free checking account so that I can purchase tickets & rent hotels online. How do I go about this? Is it easy to open a free checking account in the US?
Assume someone's name ends with x. If we want to refer to one of his belongings, should we say ---x's or ---x'es? The problem here is that if the pronunciation follows spelling.
1) Alex's house 2) Alex' house When the noun ends with the letter 's' or 'x', do I need to put 's' after an apostrophe or not? I remember I read some rules related to this in my school grammar book, but now I've forgotten it.
The goto answer to that question is that the electron is a pointlike particle and cannot spin. The electron is not pointlike though. It is described by a wavefunction. One can prepare the wavefunction to describe a very small electron, but not a point-like electron. Is there a genuine answer to the problem?
I often hear about subatomic particles having a property called "spin" but also that it doesn't actually relate to spinning about an axis like you would think. Which particles have spin? What does spin mean if not an actual spinning motion?
I'm a complete beginner and not sure where to go with this proof of Euclid's lemma. Any help would be greatly appreciated. If $m$ is a positive integer and a prime number $p$ is a factor of $m^2,$ then $p$ is a factor of $m.$ So far I have: Since we know that $m$ is a positive integer, then $m^2$ must also be positive. We also know that $p$ is positive integer, since it is a prime number. So $m^2 = p*k$ where $k$ is positive since both $m^2$ and $p$ are positive. Therefore, $k$ is greater than or equal to $1.$ ...?
The proof is already given in the textbook but I tried other way around. Proof by contradiction: Let's assume that $p$ doesn't divide $a$ and $p$ doesn't divide $b$, but $p$ divides $ab$. So $\gcd(p,a)=1$ and $\gcd(p,b)=1$. Given that we can construct linear combinations $sp+ta=1$ together with $up+wb=1$. Multiplying the left and the right sides of the equations we get $spup+spwb+taup+tawb=1$ or $p(sup+swb+tau)+ab(tw)=1 \implies \gcd(p,ab)=1$. This is a contradiction. Is it rigorous and sound proof?
Let $\{u,v\}$ be a linearly independent set in $\Bbb R^3$. Show that the plane $\{su+tv\mid s,t \in\Bbb R\}$ through the origin in $\Bbb R^3$ is equal to the null space of some element of $(\Bbb R^3)^{*}$. (Where $(R^3)^*$ is the dual space of $R^3$). Can we define a linear functional, say $L:R^3 \rightarrow R^2$?
Let $\{u,v\}$ be a linearly independent set in $\Bbb R^3$. Show that the plane $\{su+tv|s,t \in\Bbb R\}$ through the origin in $\Bbb R^3$ is equal to the null space of some element of $(\Bbb R^3)^{*}$. Attempt: We are supposed to prove that $su+tv=ker(g)=0$ for some $g \in (R^3)^{*}$. And I am stuck now. I want to argue algebraically. I know that $g= g(s) g_1+ g(t) g_2 $for $g_1, g_2$ being basis for g. Then from definition of kernel we have $g(s)=g(s) g_1 (s) +g(s) g_2 (s)=0 \rightarrow g(s)=0$ and $g(t)=g(s) g_1 (t) +g(s) g_2 (t)=0 \rightarrow g(t)=0$ So we have $su+tv=0=g(s)=g(t)$ I am not sure if that makes sense.
How can we think about entropy in these situations? To my knowledge all of these structures are born out of gravitational interaction. However, it would seem that the formation of these more organized structures conceptually violates the second law of thermodynamics. Is this dilemma arisen from my flawed understanding of thermodynamics or are these structures actually in a way defying an increase in entropy?
Please forgive: I am a layman when it comes to physics and cosmology, and have tried finding an answer to this that I can understand, with no luck. As I understand it, the solar system evolved from a massive molecular cloud. To me, this seems to break the second law of thermodynamics, as I think it suggests order from disorder. I know there must be something wrong with my logic, but am really stuck. Can anyone explain this one in layman's terms? (Posting to both "Astronomy" and "Physics", as it seems to overlap these subjects)
I got a new laptop and gave my dad my old one but he never changed the user so now he logs in using my password on my user. The problem is any changes I make to my laptop reflect on to his. I'd just like to peacefully change my wallpaper. Both laptops run windows 10. Thank you in advance for your help.
I was happily using local account on my Windows 8/8.1 machine. Was. Today I wanted to install some app from Windows Store. I wanted to assess some UX scenario in it. To do so I had to sign in using my Microsoft account. So I did. Not only I signed into Windows Store, but Windows also quickly connected my local account with Microsoft's one and somehow changing it for an online one. I've realised that when I restarted my machine and I had to logon using my Microsoft account credentials rather than my previous local ones. What I tried I found on the net, that I can disconnect my Microsoft account from my user account. I followed these simple steps: Open Charms > Settings > Change PC Settings > Accounts > Your account > Disconnect Windows asked me for my current Microsoft account password (for obvious reasons) and I clicked Next It then asked me to provide local account credentials that I want to use from now on My username was already pre-filled with my previous name (I'm not sure whether this has to do with previous local account username as it's the same as Display name on my Windows account). So I entered my local account password twice and my password hint as required and clicked Next. Error Windows is already using that name. Please enter a different user name. I've read on the net that if I did provide a different user name I'd end up with a new local account which is not what I want here as I don't want to loose all my account related data. How should I revert to my local account without risking my profile data? Should I try providing a new username and verify whether my old account's data is persisted or is that too much risk and I should take some other steps?
We are writing a bash script which basically does the job of python dictionary. Below is the code siffet we are using and the expected output. #!/bin/bash declare -A serviceTag serviceTag["source"]="ccr" declare -A services services+=( ["dataservice"]="latest" ) serviceTag+=( ["services"]=services ) echo "$serviceTag" The expected output is {"source":"ccr","services":{"datasetvice":"latest"}} But what we are getting is ccrservices Can somebody help us in what mistake we are doing here and how can we achieve this using bash and its code? Regards, Kanthu
Is there a way to print an entire array ([key]=value) without looping over all elements? Assume I have created an array with some elements: declare -A array array=([a1]=1 [a2]=2 ... [b1]=bbb ... [f500]=abcdef) I can print back the entire array with for i in "${!array[@]}" do echo "${i}=${array[$i]}" done However, it seems bash already knows how to get all array elements in one "go" - both keys ${!array[@]} and values ${array[@]}. Is there a way to make bash print this info without the loop? Edit: typeset -p array does that! However I can't remove both prefix and suffix in a single substitution: a="$(typeset -p array)" b="${a##*(}" c="${b%% )*}" Is there a cleaner way to get/print only the key=value portion of the output?
Assume for this thought experiment that there exists a material which has negligible rest mass density and arbitrarily high stiffness. We build a tower out of this material, on the equator. The tip of this tower will spin faster as the tower is made taller. When this tower reaches a hight of about $4\times10^{12}m$, the tip will be moving at the speed of light (circumference of 1 light-day). The mass density is negligible, so the angular velocity of the earth-tower is hardly changed during construction. Without considering relativity, if we build the tower a bit higher, the tip will exceed $c$. So, considering relativity, what's stopping us using this hypothetical material to build such a tower?
Imagine a bar spinning like a helicopter propeller, At $\omega$ rad/s because the extremes of the bar goes at speed $$V = \omega * r$$ then we can reach near $c$ (speed of light) applying some finite amount of energy just doing $$\omega = V / r$$ The bar should be long, low density, strong to minimize the amount of energy needed For example a $2000\,\mathrm{m}$ bar $$\omega = 300 000 \frac{\mathrm{rad}}{\mathrm{s}} = 2864789\,\mathrm{rpm}$$ (a dental drill can commonly rotate at $400000\,\mathrm{rpm}$) $V$ (with dental drill) = 14% of speed of light. Then I say this experiment can be really made and bar extremes could approach $c$. What do you say? EDIT: Our planet is orbiting at sun and it's orbiting milky way, and who knows what else, then any Earth point have a speed of 500 km/s or more agains CMB. I wonder if we are orbiting something at that speed then there would be detectable relativist effect in different direction of measurements, simply extending a long bar or any directional mass in different galactic directions we should measure mass change due to relativity, simply because $V = \omega * r$ What do you think?
I just wanted to experiment with some integers and assigned the value "0013" to an integer a. When I print the value to the output console I get "11". What causes this? Why I do not get 13 ? int b = 0013; System.out.println(b);
This prints 83 System.out.println(0123) However this prints 123 System.out.println(123) Why does it work that way?
I am really getting frustrated trying to solve the grub rescue prompt. I understand that I deleted the partition that Ubuntu was on, and therefore, I deleted the config files for grub--causing the current mess. But I do not have a backup Windows CD--Dell never sent me one, so the procedure of using Windows Repair is unlikely for me. At this point, I would like to just format the entire harddrive, all partitions, go back to a clean slate. Aftewards, I will reinstall Ubuntu without having to worry about the complications of a "dual boot" until I can at least start up an OS when I turn on my PC. How can I do this? EDIT: I tried booting up with a USB and run DBAN--but it failed.
I have installed bootable ubuntu on hard disks but now I can not format them with Disk Utility program. When I try to format it says "One or more partitions are busy on /dev/sdb" for both hard disks. Is there any way to format these drives? EDIT: With "Disk Utility" program when I select one of the hard drives It shows 3 volumes; 99 MB FAT 111 GB EXT4 9 GB UNKNOWN I can not format this unknown volume. With Gparted program, It doesn't shows Unknown volume only shows 111GB EXT4.
So can someone explain to me that what will happen if they did this and how much overhead will this cause, to have a seperate process for the kernel part of the virtual memory, and make a context switch when a process needs to access it? is it even possible? and how often do normal user processes even need to jump in the kernel? do all the base functions like printf and scanf all end up in the kernel part of memory to execute their low level stuff? I'm asking this because of the meltdown vulnerability, considering if it was implemented this way, then we would be safe from that attack
I found a similar question but still it doesn't answer my questions First off, considering user processes don't have access to this part and I guess if they try to access it, it would lead to an error, then why even include this part in the user process virtual space? Can you guys give me a real life scenario of this part being essential and useful? Also, one more question is I always thought the kernel part of memory is dynamic, meaning it might grow for example when we use dynamic libraries in our programs, so is it true? If so, then how can the OS determine how big the size of kernel is in the virtual space of our processes? And when our kernel in physical memory grows or changes, does the same effect happens in the kernel part of virtual memory for all the processes? Is the mapping of this virtual kernel to real kernel a one to one mapping?
I want to access and change the text which shows the current status of the process via python plugin.Can this be done and how?
Is there any way to show our custom message in Qgis Status bar using python? Just like in arcgis IApplication.statusbar.message(0) = "Please wait..." like that is there any option to show progressbar in Qgis like IApplication.progressbar.show()
hi I tried to install network spoofer but it gives me this error and not only with this app but also with others it knows how to solve I already have the root
I searched in lots of websites/forums but did not find a solution for this problem, and this site is last chance, this is problem: This problem have several other users too. my phone is Galaxy S7 Edge , exynos, Oreo 8.0 (Stock ROM), rooted with magisk latest version. root works well in other applications. In pentesting applications like csploit, Network Spoofer, WifiKill and others root works well(grants permission) but when start using options of app(for example, arp spoofing, network sniffer, MITM, etc) drops same error: [ERROR] Unable to retrieve local hardware address libnet ( ioctl: Permission denied ) what to do? Can this issue fixed? or exactly which permission is it? Also one interesting thing, when I installed old version of WifiKill app it worked - killed wifi connection.
Over on , I'm getting close to a bronze badge in the tag: However, when trying to track this badge, it doesn't show up in the selection screen! Since the game was released recently, I don't believe the tag was created much more than a month or two ago. Does a tag need to be created for a certain amount of time before it can be tracked? If not, why is the tag not appearing in the Tag Selection screen?
What are badges? How do users get badges? How can users get tag badges? Can badges be lost/revoked/taken away after they are awarded? If so, how and when? How can I suggest a new badge? For more information, see "" and the in the .
Hi Im trying to make something similar to the image above, How can I color front and back with two different colors? Thank you!
How could a one-sided material be achieved with the Cycles renderer? I would like to create a plane that is completely transparent from one side, and a mirror from the other side. It would be cool if Cycles/Blender simple supported backface culling like the game engine. But I guess it doesn't? How could something like that done with nodes?
I'm new to Blender. I've been trying to follow BlenderGuru's donut tutorial but I can't seem to add sprinkles. The particles are stuck inside the icing and I'm not sure how to get them on the surface.
I am a beginner to Blender and watching . At 8:46 is when my problem occurs, because my sprinkles are appearing beneath the icing.
As the title states, I'm supposed to prove for distinct primes $p_1,p_2 >2$ the primes dividing $2^{p_1}-1$ and $2^{p_2}-1$ are distinct. The Wikipedia page on states that #6: if $m$ and $n$ are natural numbers then $m$ and $n$ are coprime if and only if $2^m-1$ and $2^n-1$ are coprime, the only one without proof. I believe I have to prove the forward $(\Longrightarrow)$ direction. edit: this was my own work for a homework question, and I was mainly wondering if the proof was okay. there is no proof directly provided on Wikipedia, and I didn’t find the links to the proof the clearest either. this was the clearest proof to me at the time and wanted someone else’s feedback because I couldn’t believe my proof was right. My attempt at a proof (I use $a,b$ instead of $p_1,p_2$ or $m,n$): Suppose $(a,b)=1$ and $(2^a - 1, 2^b -1) = d$. Since $(a,b)=1$ there exist $x,y \in \mathbb{Z}$ s.t. $ax+by=1$. Since $a,b > 2$, $x$ and $y$ cannot both be greater than zero, otherwise $ax+by > 2+2 >1$. Neither can $x$ or $y$ be equal to zero, otherwise $x$ or $y$ would $\not\in\mathbb{Z}$, or $ax+by=0\not=1$. Neither can $x$ and $y$ be less than zero, otherwise then $ax+by <0<1$. Thus one of $x$ or $y$ must be positive, while the other negative. Suppose $ax>0$ then $by<0$, then $d|2^{ax}-1$ and $d|2^{-by}-1$ since $$2^{ax}-1 = (2^a -1)((2^a)^{x-1}+(2^a)^{x-2}+\cdots+1)$$ $$2^{-by}-1 = (2^b -1)((2^b)^{-y-1}+(2^b)^{-y-2}+\cdots+1)$$ and $d|2^a -1$ and $d|2^b -1$ by definition. Then $2^{ax} - 1 = d\alpha$ and $2^{-by} -1 = d\beta$ and then $2^{ax}-2^{-by} = 2^{-by}(2^{ax+by}-1)=2^{-by}(2^1-1)=2^{-by} = d(\alpha -\beta)$ thus $d|2^{-by}$ and $d$ must be a power of $2$. But $d|2^a-1$ where $2^a-1$ is odd, and the only odd power of $2$ is $2^0=1$, hence $d=1$. If $(a,b)=1$ then $(2^a -1 ,2^b-1)=d=1$. Is my proof rigorous or am I missing something?
For all $a, m, n \in \mathbb{Z}^+$, $$\gcd(a^n - 1, a^m - 1) = a^{\gcd(n, m)} - 1$$
Everyone keeps telling me that such apk has never been published by Google. Is that so? I need to put Google Play Store on a Chinese mobile, but I cant root nor flash it with a custom recovery ROM. I wanted to use the Open Gapps zip but all of those require custom recovery. Any ideas? Thanks a lot in advance!
I have recently installed a custom ROM and cannot find the Play Store. It seems like all apps that belong to Google are missing. How can I install the Google Apps Package (Play Store, ...) on my Android device?
I'm having a hard time trying to comprehend this. How do I even start on proving the shape?
I know that matrix multiplication in general is not commutative. So, in general: $A, B \in \mathbb{R}^{n \times n}: A \cdot B \neq B \cdot A$ But for some matrices, this equations holds, e.g. A = Identity or A = Null-matrix $\forall B \in \mathbb{R}^{n \times n}$. I think I remember that a group of special matrices (was it $O(n)$, the ?) exist, for which matrix multiplication is commutative. For which matrices $A, B \in \mathbb{R}^{n \times n}$ is $A\cdot B = B \cdot A$?
I am using this block of code for mannual logout but i want automatic logout after 5 minutes of inactivity on website. How to do that? Thanks <?php session_start(); error_reporting(E_ALL); ini_set('display_errors', '1'); session_destroy(); if(!session_is_registered('username')) { header("location: logout_msg.html"); } else { print "<h2>Could not log you out, sorry the system encountered an error.</h2>"; } exit(); ?>
I need to keep a session alive for 30 minutes and then destroy it.
I am writing a mathematical essay and would like to focus on the concept of infinity. I am not sure of any real life applications of infinity to write about or some way to narrow down the topics. Does anyone have any ideas on ways to focus the essay on a section of the topic infinity.
I know what you're thinking: "of course it has, for example, it can be used to tell you how many times you can go around a circle". But that isn't really true, now is it? You'd be dead or the world would go under long before an infinite amount of loops had been reached. Are there any practical applications for the concept of infinity? Is it a useful concept in maths at all? I know that Donald E. Knuth has argued that for all practical purposes, a very, very large number has the same effect as infinity, in his book "Things a Computer Scientist Rarely Talks About" (can't remember the exact quote, nor find it online, unfortunately). Examples are appreciated.
Im Trying To Learn How To Animate Movement with Armatures but all i can seem to do is move the armatures and not the actual mesh.
Let's say I'm really new to Blender, and have just barely figured out what keyframes are for. Explain a Blender skeleton to me like I'm five. Do I need to use it, and how exactly does it connect to the rest of the model?
Can someone tell me what font they used to typeset the following equations? (Math font) Thanks!
Is it possible to identify the font used in a specific document/picture? Answers to this question should identify: Possible methods to do this (perhaps one answer per method) and adequately describe how to use it (as opposed to merely stating it); Ways of finding the identified fonts, if possible (free or not); and Any prerequisites associated with the method used, if required (for example, "In order to use method X, your document has to be in format Y"). This question is meant as an FAQ, based on an . Its aim is to facilitate the community with the general procedures involved in font identification. Similar cases are solved on a per-usage basis on 's tag.
I'm trying to cut a circle into a cube (as pictured) and the boolean modifier with the sphere is deforming the face of the cube. This is the second boolean modifier (the first being for the speaker cone below). Any idea why this is happening and how I can fix it?
I am trying to slice up my models using the Boolean modifier. After applying the modifier on my smooth mesh, I get the expected result, a flat dissection to separate my mesh into two. The problem lies in how I can resolve the visual "jaggered" edge that separates my (smooth) mesh exterior from the flat dissection face. Is it possible to achieve a smooth-to-flat variation without this artifact? I tried to alter a mixture of the two but end up with artifacts, or unwanted blocky flat mesh faces around the dissection edge of my mesh.
I am using this code to disable cache in php but this code is not working on any browser. Please somebody help me, I don't want to save php web page in cache memory header('cache-control: no-cache,no-store,must-revalidate'); header('pragma: no-cache'); header('expires: 0');
We are developing a Flash site with PHP. the problem is that it storing the cache , but we have to disable the cache using JavaScript or PHP. How can I disable caching?
Considering I have two files - abc.py and xyz.py abc.py contains the following code - li = [1, 2, 3, 4] dt = {'m':1, 'n':4, 'o':9} I want to read the file abc.py and use the python variables in xyz.py just like how we import using from abc import li, dt. The path to abc.py (say, path/to/abc.py) will be provided and I want to import the contents and use it in xyz.py just like python variables. The following code provides the content in a string format, while I can do some coding and get the job done but I want to generalize and look for a better approach to this. Also note, I find using abc.json a better option but due to some reasons I cannot use it for my purpose. with open(path, "r") as f: s = f.read() print(s)
How can I load a Python module given its full path? Note that the file can be anywhere in the filesystem, as it is a configuration option.
I have an animation on a couple of slides in my PowerPoint 2010 presentation. I would like to print the slides in the "post-animation form" (i.e. in the state the slide finishes when the animation is done) but instead I am getting an "initial-state" for each object on the slide. Is there a way to either print or save-to-PDF the slides in the post-animated form, except for removing the animation? Thank you very much.
I have PowerPoint slides with visual effects on them, so each line appears after clicking on the screen in the presentation. When I convert them to PDF the slides are mostly empty and only some titles are in them and the lines that had the visual effect don't appear. They come out looking like this: How can I convert them to PDF properly, without having to go through all of the slides (there are like 200 of them) and removing each effect?
I am trying to prove that if $a>1$ $x,y>0$, and there is $b$ such that $\frac{1}{a} + \frac{1}{b} = 1$ then xy $\leq \frac{x^a}{a} + \frac{y^b}{b}$ I have made several attempts, but I get to no answer. Is there any inequality that needs to be shown before?
OK guys I have this problem: For $x,y,p,q>0$ and $ \frac {1} {p} + \frac {1}{q}=1 $ prove that $ xy \leq\frac{x^p}{p} + \frac{y^q}{q}$ It says I should use Jensen's inequality, but I can't figure out how to apply it in this case. Any ideas about the solution?
I want to listen to online videos with my mobile phone in my pocket, but there is always something to touch the screen and interrupt the stream. The only solution I know is to download and save the broadcast or video on my phone before listening to it with a video player app which can be screen locked. The issue is that I don't want to download any YouTube video before listening to it, so I'd like to find a way that can keep screen locked while playing a video.
The stock YouTube app (here on 2.1-eclair, but applies to all android versions) stops playing when I minimised, switched to another application or even when I lock the phone. And when I resume it restart downloading the clip from the beginning. Is there any way that I can play YouTube clips in the background? Note, I only the audio to continue playing.
I use simple plane object with black material and put a point light above the plane. THe result is when using eevee , the light reflection is way to bright. (see the attachment : top image is cycle, bottom image is eevee). Is this my graphic card or any setting that i need to change ? Thanks
I get different lightning render with the same scene camera setup. Cycles render (both experimental and supported feature set) gets weaker lightning and needs more energy. How can I get the same lightning and reflection setup with EEVEE and Cycles?
Does $30$ always divide $n^5-n$ where $n \in \mathbb{Z^+}$ ?
How can I prove that prove $n^5 - n$ is divisible by $30$? I took $n^5 - n$ and got $n(n-1)(n+1)(n^2+1)$ Now, $n(n-1)(n+1)$ is divisible by $6$. Next I need to show that $n(n-1)(n+1)(n^2+1)$ is divisible by $5$. My guess is using Fermat's little theorem but I don't know how.
I've been asked to message staff regarding being disassociated with a post, but now I'm here, I can't see a way of messaging staff directly through the account only via email. How do I contact staff through the account rather than email?
About two months ago, I tried to contact the Stack Overflow team using the email address provided on the Contact Us page. I have not heard back. Is there an alternate contact address?
I would like to change the color of some SVG pictures and then save them as PNG images. I have installed GIMP. I am running Ubuntu 14.04. How can I do that?
I am looking for an application which can do the following: Resize one or more images Compress images Rotate and flip images Rename multiple images using a progressive number or a prefix/suffix Convert an entire PDF file to a bunch images Extract an image from a Windows .ico file Convert images to DPX, EXR, GIF, JPEG, JPEG-2000, PDF, PhotoCD, PNG, Postscript, SVG, TIFF, and other formats I am running Ubuntu GNOME 15.10 with GNOME 3.18.
Function For Selecting data in Database helper: public List<Question> slectQuestionsC(String tab_name) { List<Question> quesList = new ArrayList<Question>(); // Select All Query SQLiteDatabase db = this.getReadableDatabase(); String selectQuery = "SELECT * FROM " + tab_name ; try { Cursor cursor = db.rawQuery(selectQuery, null); if(cursor != null){ cursor.moveToFirst(); } // looping through all rows and adding to list if (cursor.moveToFirst()) { if (cursor.getCount() > 0) { do { Question Quiz = new Question(); Quiz.setID(cursor.getInt(0)); Quiz.setQUESTION(cursor.getString(1)); Quiz.setOPT1(cursor.getString(2)); Quiz.setOPT2(cursor.getString(3)); Quiz.setOPT3(cursor.getString(4)); Quiz.setOPT4(cursor.getString(5)); Quiz.setANSWER(cursor.getString(6)); Quiz.setHINT(cursor.getString(7)); quesList.add(Quiz); } while (cursor.moveToNext()); } } } catch (Exception e) { e.printStackTrace(); } return quesList; } I have called this function in main activity like this but it only return first value of the table but i want it to return whole values of table so I can save it to the list!: Question currentQ; List<Question> quesList; int qid = 0; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); db.Open(); quesList = db.slectQuestionsC(tab_name); currentQ = quesList.get(qid); setQuestionView(); next.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { int ansID = options.getCheckedRadioButtonId(); RadioButton rb_ans = (RadioButton)findViewById(ansID); String answer = rb_ans.getText().toString(); Log.d("yourans", currentQ.getANSWER()+" "+answer); if(currentQ.getANSWER().equals(answer)) { scoreT++; Log.d("score", "Your score"+scoreT); } if (qid < 6) { try { currentQ=quesList.get(qid); setQuestionView(); } catch (Throwable e) { e.printStackTrace(); Toast("Exception" + e.toString()); } } else { qid = 1; Intent intent = new Intent(CustomQuizActivity.this, Quiz_End.class); Bundle b = new Bundle(); b.putInt("score", scoreT); //Your score intent.putExtras(b); //Put your score to your next Intent startActivity(intent); } } }); Here is a function for setting question view! private void setQuestionView() { question_no.setText("Question #" + qid); question_text.setText(currentQ.getQUESTION()); op1.setText(currentQ.getOPT1()); op2.setText(currentQ.getOPT2()); op3.setText(currentQ.getOPT3()); op4.setText(currentQ.getOPT4()); qid++; }
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?
$$\sum_{n=0}^{\infty } \left ( \frac{1}{n\cdot(n+1)\cdot(n+2)))} \right)$$ I've tried all of the tests but I couldn't solve this. Does it converges? What is the sum if it converges?
I got this question in my maths paper Test the condition for convergence of $$\sum_{n=1}^\infty \frac{1}{n(n+1)(n+2)}$$ and find the sum if it exists. I managed to show that the series converges but I was unable to find the sum. Any help/hint will go a long way. Thank you.
I know that have been asked on this forum but, as far as I can see, none of them addressed the problem of patterns being in different lines. Namely, given a text file ( one ) ( two ) ( three ) four How may I delete everything that is between each '(' and ')' pair, even when the elements of the pair are on different lines? The desired result is () () () four
I have a requirement like i have to remove the strings or numbers between two Parenthesis in a file. I used sed command but it is working on a single line. My opening Parenthesis is in one line and the closing parenthesis is in other line. How can i do it? I tried this command using sed: sed -e 's/([^()]*)//g' but this works only when My opening and closing parenthesis are on the same line. For Example:- Input file: select a ,b ,c FROM ABCD (select e ,f ,g ,h FROM XYZ) Output should be: select a ,b ,c FROM ABCD
Let $f$ a continuous function on all $\mathbb R$. How can I prove that if $f\circ f\circ f=id$, then $f=id$ ? I really have no idea.
Let $f:\mathbb{R}\to \mathbb{R}$ be a continuous function such that $f^3(x)=f\circ f\circ f(x)=x$ for all $x$. How can I prove $f$ is the identity function?
what would be the suitable phrase for something that is bad but is also a solution for the problem? for example if I say internet has brought cyberterrorism but is also very useful for countering terrorism.
Take this scenario: a tool has a specific feature that could be regarded as an invaluable benefit for. However, this feature, if used in opposite direction may be counterproductive. In other words, the strength point may be the weakness point. For example, feature X of a security mechanism could be leveraged to break that if used maliciously. So, what's the word/phrase to describe this feature? I think it should be something other than Achilles heel.
My rear disc brake is attached to a bracket, which is attached to the frame. This bracket is held by two bolts that each have a clip on them: The clips are clamped around the bolts, and can easily be twisted around the bolt (without the bolt moving). What are they for?
I boughtt a Shimano SM-MA-R160 Disc Brake Mount Adaptor for my bike. It came with these black plastic things in the lower right corner of the photo below. I have a bunch and don't know what are they used for: What are those plastic thingies called? What are they used for? How are they applied? How important are they?
After an update from 16.04 to 16.10 a transitional package for nvidia-361 driver start giving an error. This is the message (some data is translated to EN from BG): Preparation for the unpacking of nvidia-352_361.45.11-0ubuntu4_amd64.deb ... Failed to stop var-lib-snapd-lib-gl.mount: Unit var-lib-snapd-lib-gl.mount not loaded. dpkg: warning: under process old pre-removal script returned error status out of 5 dpkg: trying script from the new package instead ... dpkg: error processing archive /tmp/apt-dpkg-install-9wUQ2T/8-nvidia-352_361.45.11-0ubuntu4_amd64.deb (--unpack): no script in the new version of the package - I surrender (or something like it) Failed to get unit file state for var-lib-snapd-lib-gl.mount: No such file or directory var-lib-snapd-lib-gl.mount is a disabled or a static unit, not starting it. Error in the process: /tmp/apt-dpkg-install-9wUQ2T/8-nvidia-352_361.45.11-0ubuntu4_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1) EDIT: Seems i forgot some data (added in the prevous text): Preparation for the unpacking of nvidia-352_361.45.11-0ubuntu4_amd64.deb ... Failed to stop var-lib-snapd-lib-gl.mount: Unit var-lib-snapd-lib-gl.mount not loaded. dpkg: warning: under process old pre-removal script returned error status out of 5
I am using the ppa. I got an update dialogue today which stated that I can update my nvidia driver to 367.18 (~gpu16.04.6). I started the update just like every time, but it failed with Failed to get unit file state for var-lib-snapd-lib-gl.mount After rebooting, my graphics driver was broken and I was forced to go into recovery mode. As usually when my Nvidia driver breaks, I just uninstall it with sudo apt purge nvidia* to reinstall it clean afterwards. Doing this in recovery mode uninstalled all except the nvidia-opencl-icd-367 package which failed with the error above. Trying to manually uninstall this package ends with these errors: Update @20160605 - Solution: Following Videonauth's answer below solves the issue. Please go through all the steps and make sure to reboot after removing everything of NVIDIA via sudo apt purge nvidia* succeeded without issues and after reinstalling the driver via sudo apt install nvidia-367. This shall get your driver working again. If this does not help, try to manually remove all old xorg configs sudo rm /etc/X11/xorg.conf* && sudo rm /etc/X11/xorg.conf and reinstall the driver again sudo apt install nvidia-367 --reinstall. If this still does not let you log back in (Typical error: Logins screen --> password has been entered, enter pressed --> goes back to login screen) try completely removing your Nvidia driver again from by switching into text console from the logscreen with Ctrl+Alt+F1, login with you account name and password, donwload the appropriate driver for your graphics card from within console, stop lightdm: sudo service lightdm Install Nvidia's binary driver using sudo ./NVIDIA-VERSION... and reboot system: sudo reboot now System: Ubuntu 16.04 64bit Linux 4.4.0-22
I want read a large dblp.xml file in c# because its a huge file, which can not load into memory. I query to take some data from this huge file. how can i read/get it. <phdthesis mdate="2012-04-18" key="phd/tw/Chang2008"> <author>Fengming Chang</author> <title>Learning accuracy from limited data: </title> <year>2008</year> <school>Tainan, National Cheng Kung Univ.</school> <pages>1-67</pages> <isbn>978-3-8364-8603-3</isbn> <note type="dnb">http://d-nb.info/989267156</note> </phdthesis> How can i read from a huge xml file using c# not loading all xml file in memory?
I'm writing a GIS client tool in C# to retrieve "features" in a GML-based XML schema (sample below) from a server. Extracts are limited to 100,000 features. I guestimate that the largest extract.xml might get up around 150 megabytes, so obviously DOM parsers are out I've been trying to decide between and generated bindings --OR-- and a hand-crafted object graph. Or maybe there's a better way which I haven't considered yet? Like XLINQ, or ???? Please can anybody guide me? Especially with regards to the memory efficiency of any given approach. If not I'll have to "prototype" both solutions and profile them side-by-side. I'm a bit of a raw prawn in .NET. Any guidance would be greatly appreciated. Thanking you. Keith. Sample XML - upto 100,000 of them, of upto 234,600 coords per feature. <feature featId="27168306" fType="vegetation" fTypeId="1129" fClass="vegetation" gType="Polygon" ID="0" cLockNr="51598" metadataId="51599" mdFileId="NRM/TIS/VEGETATION/9543_22_v3" dataScale="25000"> <MultiGeometry> <geometryMember> <Polygon> <outerBoundaryIs> <LinearRing> <coordinates>153.505004,-27.42196 153.505044,-27.422015 153.503992 .... 172 coordinates omitted to save space ... 153.505004,-27.42196</coordinates> </LinearRing> </outerBoundaryIs> </Polygon> </geometryMember> </MultiGeometry> </feature>
$$\lim_{n\to\infty}\frac{1^n+2^n+\cdots+(n-1)^n}{n^n}$$ I have found that the sequence is increasing as $n$ increases. I guess that the answer should be $\frac{1}{1-e}$.
I remember that a couple of years ago a friend showed me and some other people the following expression: $$\lim_{n\to \infty}\frac{1^n+2^n+\cdots+(n-1)^n}{n^n}.$$ As shown below, I can prove that this limit exists by the monotone convergence theorem. I also remember that my friend gave a very dubious "proof" that the value of the limit is $\frac{1}{e-1}$. I cannot remember the details of the proof, but I am fairly certain that it made the common error of treating $n$ as a variable in some places at some times and as a constant in other places at other times. Nevertheless, numerical analysis suggests that the value my friend gave was correct, even if his methods were flawed. My question is then: What is the value of this limit and how do we prove it rigorously? (Also, for bonus points, What might my friend's original proof have been and what exactly was his error, if any?) I give my convergence proof below in two parts. In both parts, I define the sequence $a_n$ by $a_n=\frac{1^n+2^n+\cdots+(n-1)^n}{n^n}$ for all integers $n\ge 2$. First, I prove that $a_n$ is bounded above by $1$. Second, I prove that $a_n$ is increasing. (1) The sequence $a_n$ satisfies $a_n<1$ for all $n\ge 2$. Note that $a_n<1$ is equivalent to $1^n+2^n+\cdots+(n-1)^n<n^n$. I prove this second statement by induction. Observe that $1^2=1<4=2^2$. Now suppose that $1^n+2^n+\cdots+(n-1)^n<n^n$ for some integer $n\ge 2$. Then $$1^{n+1}+2^{n+1}+\cdots+(n-1)^{n+1}+n^{n+1}\le(n-1)(1^n+2^n+\cdots+(n-1)^n)+n^{n+1}<(n-1)n^n+n^{n+1}<(n+1)n^n+n^{n+1}\le n^{n+1}+(n+1)n^n+\binom{n+1}{2}n^{n-1}+\cdots+1=(n+1)^{n+1}.$$ (2) The sequence $a_n$ is increasing for all $n\ge 2$. We must first prove the following preliminary proposition. (I'm not sure if "lemma" is appropriate for this.) (2a) For all integers $n\ge 2$ and $2\le k\le n$, $\left(\frac{k-1}{k}\right)^n\le\left(\frac{k}{k+1}\right)^{n+1}$. We observe that $k^2-1\le kn$, so upon division by $k(k^2-1)$, we get $\frac{1}{k}\le\frac{n}{k^2-1}$. By , we may find: $$\frac{k+1}{k}\le 1+\frac{n}{k^2-1}\le\left(1+\frac{1}{k^2-1}\right)^n=\left(\frac{k^2}{k^2-1}\right)^n.$$ A little multiplication and we arrive at $\left(\frac{k-1}{k}\right)^n\le\left(\frac{k}{k+1}\right)^{n+1}$. We may now first apply this to see that $\left(\frac{n-1}{n}\right)^n\le\left(\frac{n}{n+1}\right)^{n+1}$. Then we suppose that for some integer $2\le k\le n$, we have $\left(\frac{k}{n}\right)^n\le\left(\frac{k+1}{n+1}\right)^{n+1}$. Then: $$\left(\frac{k-1}{n}\right)^n=\left(\frac{k}{n}\right)^n\left(\frac{k-1}{k}\right)^n\le\left(\frac{k+1}{n+1}\right)^{n+1}\left(\frac{k}{k+1}\right)^{n+1}=\left(\frac{k}{n+1}\right)^{n+1}.$$ By backwards (finite) induction from $n$, we have that $\left(\frac{k}{n}\right)^n\le\left(\frac{k+1}{n+1}\right)^{n+1}$ for all integers $1\le k\le n$, so: $$a_n=\left(\frac{1}{n}\right)^n+\left(\frac{2}{n}\right)^n+\cdots+\left(\frac{n-1}{n}\right)^n\le\left(\frac{2}{n+1}\right)^{n+1}+\left(\frac{3}{n+1}\right)^{n+1}+\cdots+\left(\frac{n}{n+1}\right)^{n+1}<\left(\frac{1}{n+1}\right)^{n+1}+\left(\frac{2}{n+1}\right)^{n+1}+\left(\frac{3}{n+1}\right)^{n+1}+\cdots+\left(\frac{n}{n+1}\right)^{n+1}=a_{n+1}.$$ (In fact, this proves that $a_n$ is strictly increasing.) By the monotone convergence theorem, $a_n$ converges. I should note that I am not especially well-practiced in proving these sorts of inequalities, so I may have given a significantly more complicated proof than necessary. If this is the case, feel free to explain in a comment or in your answer. I'd love to get a better grip on these inequalities in addition to finding out what the limit is. Thanks!
After can see/hear, can the bare infinitive be used? e.g., I could see John get on the bus. We can say "I could see John getting on the bus," but is it possible to say "I could see John get on the bus." This is in response to Roguemue's comment that this is a replicant of a post. Roguermue's suggested post is about the verb hear + personal pronoun: this post is about the modal + can + see/hear + infinitive without to. To go on further, as posted down below, it was my assumption that the construction is okay, but Swan, Practical English Usage, wrote that it's an invalid construction "After can see/hear only the -ing structure is used. I could see John getting on the bus. (NOT J could see John get ... ) These structures can be used after passive forms of hear and see. In this case, the infinitive has to." (Practical English Usage, 242, pg. 222) I am looking to either confirm Swan's usage rule or to find opposing evidence.
"Heard me [infinitive]" vs. "heard me [present participle]" At that time, you wouldn't have heard me talk about it. At that time, you wouldn't have heard me talking about it. At that time, you wouldn't have heard me condemn it. At that time, you wouldn't have heard me condemning it. Which one of the above sentences are incorrect and why?
Sometime in 1976 I read part of a book and never finished it. The book or short story involved the following. Multi-dimensional worlds. Possibly multiple duplicate worlds. Our world causes conflict by sending things to another dimension, unknowingly causing damage. The other dimension then retaliates. I remember something about damage to some kind of theater. Any ideas who the author could be and the work's name?
In the 1960s I read book--an older children's book, I think--which I loved, and still remember, roughly. I have no idea what the title is or who the author is, and I'm wondering if anyone knows this one: Scientists had invented a device which they didn't fully understand, and which had puzzling effects. For example, when a pencil was put into the machine, it disappeared, and then reappeared inside out: The lead was on the outside. When people went into the machine, they came back dead, having died from fright. Finally they sent a very open-minded person into the machine. She was an artist, I think. She was able to return alive, and described an alternate universe in which geometry was very different. I distinctly remember that there were supposedly square triangles or four-sided triangles--or was it three-sided squares? (This is, of course, a literally contradictory claim, but I didn't see the matter as clearly then.) Thanks!
When there is a clan war, what happens in the case of a tie? Does it default to some of the stats used to describe the clan war? or does it have like a deathmatch?
In Clash of Clans there was an update on 9/16 adding a Tie-breaker into the wars, can anybody explain in detail how this mechanism works?
I'm writing some code for educational purposes and I'd like to be able to print these memory usage values out from a windows console program written in C++.
What is the win32 API function for private bytes (the ones you can see in perfmon). I'd like to avoid the .NET API
I need to keep ssh'ing into many-different Linux boxes (Ubuntu mostly) and every time I miss my basic aliases. Is there a way to setup aliases etc while opening an interactive ssh a machine without tinkering with remote machines's .bashrc/.bash_profile? Following would just execute the alias commands in a non-interactive shell on remote machine and terminate the session (as expected): kashyap@Laptop$ ssh [email protected] "alias c=clear; alias p=pwd; alias l='ls -altr' I would love it if I could select a file from local machine to be executed as init script on remote, but willing to settle for less. E.g. ssh usr@remote --init-script=/local/my_init_script_for_ssh_sessions
Probably it is a weird thing I would like to achieve but: I would like to SSH to a remote host and then execute some bash commands like "alias" automatically to use them afterwards in an interactive mode. The remote host does not allow the personal environment. Is this possible? Would "expect" do it? Or is there any other way to achieve this? Basically I would like to have my bashrc without modifying any files on the remote host.
Consider the expression $a\sin\theta+b\cos\theta$. This expression consists of a combination of sine and cosine trigonometric functions which makes analysing it difficult. How can this expression be converted to an expression consisting of only sine or cosine functions?
I don't understand this. These identities are given in the online notes for MIT's 18.01 calculus class. It's related to taking the sum of two trig functions and transforming them into a single trig function. I can use the formulas to do this, but I am having trouble finding anything on the internet to use a proof for my understanding. Thanks for any responses! EDITED (added after the first answer): Sorry, the identity goes like this: $A\sin{k(x-c)}=a\sin{kx}+b\cos{kx}$ , with the relationships $a=A\cos{kc}$ , $b=-A\sin{kc}$ , $A=\sqrt{a^2+b^2}$ , and $\tan{kc}=-b/a$
I installed Ubuntu 12.04 in my laptop. Now I want to remove Ubuntu and I install Windows 7. But when I restart my system after keeping Windows 7 DVD it is not booting. What should I do to get rid of this problem? I have tried to modify many options, but none of them had worked out?
I have absolutely no experience with Linux, and I desperately need to get my computer back up and running again with Windows. How do I remove Ubuntu and reinstall Windows? Editor's note: many of the answers are about removing Ubuntu from dual-boot but keeping Windows (which is a bit complicated), while other answers are about removing Ubuntu from single-boot (which is easy: basically just format the disk while installing Windows). The question as written is ambiguous between dual-boot or single-boot.
Do physicists need the idea of 'cause' or 'causation' to do physics? Does it appear in physics, either in theory, answered , or in experiment? In a way analogous to how names and mathematics do. If not, then it seems like a folk concept which exists only to help us learn physics or be inspired by it.
I was reading by Pedro Domingos and towards the end of the paper he makes this statement: "Many researchers believe that causality is only a convenient fiction. For example, there is no notion of causality in physical laws. Whether or not causality really exists is a deep philosophical question with no definitive answer in sight..." I was surprised by this statement because apart from Heisenberg's uncertainty principle, everything else (that I know of) in physics seems to operate under the assumption of . If you have an equation that describes a definitive outcome as the result of some input factors, then it is describing a causal relationship, is it not?
I was wondering if it is possible to change Blender's interface color? The dark version is the default Are there setting that would allow you to change to something lighter?
I just downloaded blender and its very bright. I want it darker. How can I change the color of it?
I have a lot of files to process and I need to replace their original names with this format in bash: 00000000000001_1.jpg 00000000000002_1.jpg 00000000000003_1.jpg and so on
How to rename file as below AS1100801000002.RAW7AGS AS1100801001008.RAW7AH4 AS1100801002001.RAW7AH9 AS1100801003002.RAW7AHE AS1100801004009.RAW7AHT AS1100801005002.RAW7AHY AS1100801010002.RAW7AJ3 to new name AS1.txt AS2.txt AS3.txt AS4.txt AS5.txt AS6.txt AS7.txt
in this code Why this prints >> 0 8 instead of >> 5 8 . The method doIt() changes the number of Person p which is already allocated, but the int x is already allocated and is not changed in doIt(). Can anyone give me an theoretic explanation? I'm trying to understand how it works. Thanks. class Person{ int number=0; } class Student extends Person { int studentNumber; } public class Prog{ public void doIt(int x, Person p) { x=5; p.number=8; } public static void main(String[] args) { Prog p = new Prog(); p.test(); } public void test() { int x=0; Person p = new Person(); doIt(x,p); System.out.println(x); System.out.println(p.number); } }
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?
I have to create a lottery "ticket" design and generate 1000 print cards with a different number on every single picture. Is there any quick way of doing that using Photoshop?
Looking to create a 100 images that would have their appropriate numbers written on them. Since I`ll be most likely making changes to the template in the future I figured it would be better to automate it somehow. Is there a simple solution to this problem?
if $p$ is prime and $a\in \mathbb Z$ such that $p\nmid a$, Show that the set $$ R=\{0,a,2a,3a,...,(p-1)a\}$$ Is a complete residue system modulo $p$. This problem is from my textbook. My attempt: I think that the best way to prove it it's by contradiction, so let $x,y \in R$ such that : $$x\ne y, x\equiv y \pmod p$$ and we gonna prove that it's impossible that $x,y\in R$ and $x\equiv y \pmod p$... But I don't know how to do it.
let $p$ be a prime and let $a$ be an integer not divisible by $p$, that is $(a,p)=1$. Then $\{a,2a,3a,...,pa\}$ is a complete residue system modulo $p$. Since $p\nmid a$, $p\nmid\{a,2a,3a,...,(p-1)a\}$ Since $p|p$, $p|\{pa\}$ which is exactly one element in the set and is therefore a complete residue system. Wondering if this is an acceptable proof to this theorem.
Is there a difference between I didn't use to do that and I used to not to do that For example, I don't use to read books when I was a child. Would both be correct? Is the second even correct grammatically?
What is the negative form of "I used to be"? I often hear "I didn't used to be" but that sounds awfully wrong in my ears.
System specs: 80GB HDD 2GB RAM.
My laptop is filled with viruses and Windows XP is just becoming impossible to work with. I've been interested in Ubuntu for a while, so, would I be able to use something like Debian to clear my HDD and OS and then install Ubuntu and start fresh?
I have a list of news from a database. When I start the page all the news titles appear in a list and when I click on them the content of that specific news will show up in a div below. I'm getting the initial news list like this (this is php code from the index.php file that runs on startup) $sql = "SELECT title FROM `news`"; $result = mysqli_query($GLOBALS['conn'], $sql); if (mysqli_num_rows($result) > 0) { echo "<div id = 'list'>"; echo "<p id = 'text'> All News: </p>"; echo "<ul id ='news_list'>"; while($row = mysqli_fetch_assoc($result)) { echo "<li><a href='#'>" . $row["title"] . "</a></li>"; } echo "</ul> </div>"; } } And in my script.js I have a function that will show a specific news content when I click on one $( "#news_list li" ).click(function() { //do something }); This works, however I want to sort those news based off a category and view only those specific news instead (instead of all of them). So my script.js function would look something like $( ".category" ).click(function() { var hash = $(this).text(); //name of the news $("#news_list").empty(); // ul of news list $.post("get_news_by_category.php",{ajax: true, hash:hash},function(data, status){ var news = ""; for (var i = 0; i < data.length; i++) { if (data.charAt(i) != "$"){ news = news + data.charAt(i); } else{ $( "#news_list" ).append("<li><a href='#'>" + news + "</a></li>"); news = ""; } } }); $("#text").text('News by ' + hash); And my get_news_by_category.php looks something like this $sql = "SELECT title FROM news WHERE category = '" . $_POST['hash'] . "'"; $result = mysqli_query($GLOBALS['conn'], $sql); if (mysqli_num_rows($result) > 0) { while($row = mysqli_fetch_assoc($result)) { echo $row["title"]; echo "$"; } } I get the new list with the desired news, but I no longer can click on them. I can only click the news from the initial list, however if I try to click on a news from the list after I filter it, that won't work and I have no idea why. Hope I've made myself clear. I would love some input on what I'm doing wrong EDIT: I can't thank CBroe and Just a Student enough for the fast response. The solution was using $('#list').on('click', 'li', function() instead of my old click function and that actually worked.
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 recently bought a new laptop and need to transfer data from my old desktop computer. Both the computers run Ubuntu (Gnome version). Is there a way I can take a normal LAN cable and connect the two computers together and transfer the files? Because the other option is to copy it first on an external hard disk and then to the hard disk of the new computer. That could be time consuming as I do not even have a 1TB external hard disk. And no, I do not have a WIFI network.
I have two laptops running Ubuntu 12.04. Both connect to the same WIFI network to access internet. How do I connect them to each other so that I can access files on one from another and vice versa? Also, how do I manage the user permissions, etc. on them?
Is there a simple way to sort a comma separated list alphabetically in LaTeX? I tried to write a macro (\sortlist{World, Hello} → "Hello, World") using the l3sort documentation example but it completely failed. \ExplSyntaxOn \def\@sortlist{} \newcommand{\sortlist}[1]{ \clist_set:Nn \l_foo_clist {#1} \clist_sort:Nn \l_foo_clist{ \int_compare:nNnTF { ##1 } > { ##2 } { \sort_return_swapped: } { \sort_return_same: } } \def\@sortlist{\l_foo_clist} } \ExplSyntaxOff Is there something like \str_compare to make a string comparison or can l3sort actually only be used for numerical values? Edit: wasn't really helpful for me or rather I wasn't able to solve my problem thereby.
Using receipt of "" I elaborated the following code for my needs: \documentclass{book} ... \usepackage{expl3} \begin{document} \newcommand{\PrintAnswer}[1]{% \InputIfFileExists{#1}{\refstepcounter{subsection}}{\typeout{*** #1 not found ***}}} \ExplSyntaxOn \cs_new:Nn\PrintAnswerList:n{ \clist_set:Nx\l_csv_clist{#1} \clist_map_inline:Nn\l_csv_clist{ \typeout{**** Printing ##1.ans} \ExplSyntaxOff \PrintAnswer{##1.ans} \ExplSyntaxOn } } \PrintAnswerList:n{\inputfiles} \ExplSyntaxOff \end{document} It is intended for conditional compilation of a textbook, every chapter of which (eg, 01.tex, 02.tex) writes answers to problems to the file named after the name of the chapter source file, (eg, 01.ans, 02.ans etc). Near the end of the book these files are read in by the macro \PrintAnswer. Usually, I compile only few chapters using the following trick to keep desired chapters in \inputfiles macro: \typein[\inputfiles]{^^JEnter filename(s) for \protect\includeonly:} All that works fine, but I was forced to switch off experimental syntax before \PrintAnswer{##1.ans} because otherwise answer files are not processed correctly (in particular, LaTeX complains that the commands for greek letters are not defined and hyphenation is broken). Therefore my question is How can one rewrite the above code using user-level LaTeX3 commands? I found \SplitList command in xparse package. Can it help?
A tag badge criterion says Earned X upvotes for at least Y answers in the Z tag . How can I track this?
It would be nice if for each badge to have some indication as to how close you are to earning that badge. Any chance of this being introduced?
Working on my answer to I've found that the distribution of a number of consecutive \bullet (or \cdot) is different if the number is even or odd. Space between two last elements in an even list is shorter. Why? How could it be corrected? \documentclass{article} \usepackage{pgffor} \newcommand{\mydots}[1]{$\foreach\i in {1,...,#1}{\bullet}$} \begin{document} \foreach\i in {1,...,15} {\noindent\mydots{\i}\\} \end{document}
The spacing between the 3rd and 4th stars is non-existent. Anyone know what's up? \documentclass[11pt]{article} \usepackage{amsmath} \begin{document} \begin{gather*} \star\star\star\star \\ \star\star\star\,\star \\ \star\star\star\star\star \end{gather*} \end{document}
This was a case of me finding this in the process of doing research for my question, but I figured I'd post it. Somehow, the subject of came up in a conversation at work, and I mentioned that, as a teenager, I associated that name with robots because of something I'd read where robotic cats were named that, and it got me to wondering what piece of fiction it was. The main character had one, and it was a bit of a security blanket for her, originally given as a therapy pet, but which she continued to cling to as she became an adult. There's a scene that sticks out in my memory where she felt abandoned (I can't remember if she actually was), and it had her tightly hugging the "pooka", crying into its fur as it purred to try to console her. I think there was mention of having to replace its synthetic fur frequently because her constant handling of it was leaving it threadbare.
I remember the cover of the first book in the 3 or 4 book series has a picture of a beautiful white/silver haired young girl in a blue dress. The story is about children who are identified as gifted teleporters being trained to "shift" loads of whatever between planets....could be food and provisions, or personnel carriers etc. They have to have someone to "throw" and someone to "catch" and set down at the other end. Would love to read it again.
I discovered two items with different levels. They have identical names, symbols, and descriptions in my backpack: Why are the levels different? Are the items identical? If there is a difference, what is it?
I notice that most weapons other than the original weapons have a level above 1. Can this number be different from player to player (or even item to item in the backpack of one player) for the same item? If so, does it have any effect in game?
For quite a while I have wanted to grow a selection of fresh herbs in my kitchen. I have managed to set up that works wonderfully growing my most used herbs but now I’m running into questions about how to use them, particularly herbs like thyme that have small leaves and woody or fibrous stems. I prefer to include the herbs into whatever I’m cooking rather than use a bouquet garni. But picking individual leaves from a plant such as thyme is incredibly work intensive and not really worth the time involved. Is there a more efficient way to harvest these sorts of leaves? This question has been linked to a similar question, which is fine, but I believe that Stephie’s answer here is more complete & helpful than any given for the linked question about oregano.
While making my manicotti tonight, I received a painful reminder that the stuffing isn't actually the most tedious part of the process - it's pulling all the tiny leaves off the oregano stems. It seems as though the oregano I'm able to buy here is not fully grown; it's been like this for as long as I can remember. Obviously the stems are stiff, and bitter, and generally no good to throw in the mix, at least not with any of the recipes I use. So I really need to get the leaves off the stems, and with this oregano, it's a painful process. I've tried obvious routes, like "stripping" the leaves off the stems with my hands or a knife, but it doesn't really work. The stems are too hardy, and if I strip them hard enough to get the leaves off then I usually end up stripping the stem with it. And laying the stems flat on a cutting board and trying to chop the leaves off directly is almost impossible; the leaves are so tiny and irregularly distributed that it ends up taking longer than just pulling the things apart with my hands. Am I missing something obvious? Is there a way to prepare these oregano leaves that's more fun than watching paint dry?
I know next to nothing about electric engineering, so I got the Arduino Uno R3 and a bunch of LEDs to play around with and hopefully learn something. I have no idea about the proper terminology or anything here, so bear with me ... When I connect an LED to a normal pin, it works fine. When I connect it to 5V or 3.3V with a 220 ohm, it works fine. Without the resistor, the LED gets cooked. My question is, why does it work with the digitals without resistance and not the 3.3V or 5V? Are they hooked up to onboard resistors? What is their output? And finally, where can I learn more about my shiny new microcontroller without diagrams that I can't make head or tail of? Edit: I think this is different from the related question I noted in my comment, but tell me if I should remove it anyway.
I'm just trying out Arduino Uno for the first time with 2 blinking LEDs on a breadboard. All the tutorials on the Internet seem to use a resistor. I do know the function of resistors, but does it really matter here? These LEDs are working just fine without a resistor.
I can’t find the answer to how to select an existing node through the script and apply the already added image without a GUI. I have a ready-made script that opens a prepared blender file with saved materials, makes an import of the SVG curve and performs manipulations by adding these materials. In one of the materials I need to change one picture. I found a code that can add a node with a new picture import bpy bpy.data.images.load("D:/temp/1.png", check_existing=True) mat = bpy.context.view_layer.objects.active.active_material tex = bpy.data.images.get('1.png') image_node = mat.node_tree.nodes.new('ShaderNodeTexImage') image_node.image = tex This code created a new unconnected node and it needs to be connected to three other nodes. But I need only assign an already linked picture to the already connected node.
I am trying to assign an image texture to an Image Texture node in 2.80. Very simple script - I'm just starting to learn how this stuff works. This is what I have. It creates an image and and IT node, but it doesn't assign the one to other. Can anybody help? I've searched around, but can't find it in another question. import bpy #create blank image bpy.ops.image.new(name="TestImg", width=1024, height=1024) #add image texture to object, to hold baked lighting mat = bpy.context.view_layer.objects.active.active_material image_node = mat.node_tree.nodes.new('ShaderNodeTexImage') #assign image to image texture node image_node.image = "TestImg" Thanks in advance.
I'm new to this site and I'm searching for the help. I'm trying to plot an adsorption isotherm described with specific equation. I used pgfplots package with following commands: \documentclass{article} \usepackage{pgfplots} \begin{document} \begin{tikzpicture}[baseline] \begin{axis}[ ymin=0, ymax=100, xmin=0, xmax=105, ]% \addplot[violet,domain=0:100,samples=999]{((38.25708798*23.0303696*(x/41.77116184))/(1-(x/41.77116184)))*((1-(2.76389715+1)*((x/41.77116184)^2.76389715)+2.76389715*((x/41.77116184)^(2.76389715+1)))/(1+((23.0303696-1)*(x/41.77116184))-23.0303696*((x/41.77116184)^(2.76389715+1))))}; \end{axis} \end{tikzpicture} \end{document} which leads to the: The plotted isotherm has an error shape, because the plotted isotherm should be: Am I missing something, or is it a bug of the PGFPlots package?
I am trying to plot the function 1/x^2 but the result is obviously wrong, here is how it looks like here is the code \begin{center} \begin{tikzpicture} \begin{axis}[ %xlabel=$x$, %ylabel={$f(x) = x^2 - x +4$} ] \addplot[blue] {1/(x^2)}; \end{axis} \end{tikzpicture} \end{center} Any suggestions on how to fix this?
I've got a problem with looping a scanner, wich should return EVERY string given as an input unless String != "end". Here is what I've done so far private static String fetchString() { Scanner scanner = new Scanner(System.in); String stringElement = ""; System.out.println("Write a string"); while(scanner.hasNextLine()) { stringElement = scanner.next(); if(stringElement == "end") { break; } } return stringElement; } result: Write a string abc abc abc end end Loop, somehow, doesn't understand if(stringElement == "end"), it still wants new word. I can't get it. Where am I making a mistake?
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 often see html elements with an onchange attribute that specifies javascript as the language, e.g.: onchange="javascript:updateModel()" It still works if I remove javascript: onchange="updateModel()" Is it safe to remove it? Are there some browsers (maybe older versions) that need it?
AFAIK, you never need to specify the protocol in an onclick: onclick="javascript:myFunction()" Bad onclick="myFunction()" Good Today I noticed in on Google Anallytics that they are using it: <a href="http://www.example.com" onClick="javascript: pageTracker._trackPageview('/outgoing/example.com');"> Is this example just plain wrong, or is there ever a reason to specify javascript: in anything other than a href?
I have been walking around the nether but I don't seem to find any fortresses? What's a tip to find them faster?
I have a few questions about the nether and nether fortresses: How do you find Fortress in the Nether world? I spend many hours searching, all of them ended with death. I still couldn't find any Nether Fortresses. I am starting to doubt whether they even exist or not. Is Nether world almost limitless in size, like overworld, or is it limited in size? Is there only 1 Fortress in Nether world or are there many?
I would love some help to write a shell script that will return the list of files skipped by my git repository. There is an example code below %> bash git_ignore.sh | cat -e .DS_Store$ mywork.c~$ Thank you.
I am getting my feet wet with Git and have the following issue: My project source tree: / | +--src/ +----refs/ +----... | +--vendor/ +----... I have code (currently MEF) in my vendor branch that I will compile there and then move the references into /src/refs which is where the project picks them up from. My issue is that I have my .gitignore set to ignore *.dll and *.pdb. I can do a git add -f bar.dll to force the addition of the ignored file which is ok, the problem is I can not figure out to list what files exist that are ignored. I want to list the ignored files to make sure that I don't forget to add them. I have read the man page on git ls-files and can not make it work. It seems to me that git ls-files --exclude-standard -i should do what I want. What am I missing?
I am kind of new to Ubuntu. I have an i7-7700 with z270 motherboard and hd630 graphics. I have 2 LG 24mp68vq displays. I have connected one of them with a VGA cable and when I try to connect the second one with HDMI, neither of them shows any picture.
I'm running Ubuntu 12.04 on a Lenovo x61s Thinkpad. As the screen's rather small and I want to do some video editing, I thought I'd plug in a monitor and use that. The monitor is Relisys JM777 (quite old). When I plug it into my other computer, which is running Windows 7, it immediately mirrors the display; but when plugged into the Lenovo the monitor screen remains blank. The graphics card on the Lenovo is a "VGA compatible controller" according to SysInfo. Anybody got any suggestions for getting this monitor to work? I'm quite new to Linux.
I am performing deviance goodness-of-fit test on my model (used negative binomial regression), and the R summary() table of my model gives the following: Call: glm.nb(formula = topPagesCount ~ DB_LEGAL_STATUS_CODE_V2 + BCORP_INDUSTRY_DENSITY + DENSE_MSA + DENSE_MSA * BCORP_INDUSTRY_DENSITY, data = greatDF, control = glm.control(maxit = 100), init.theta = 0.2103980872, link = log) Deviance Residuals: Min 1Q Median 3Q Max -1.9154 -1.2815 -0.7786 -0.2994 2.3033 Coefficients: Estimate Std. Error z value Pr(>|z|) ( Intercept) 4.4117492 0.4566746 9.661 < 2e-16 *** DB_LEGAL_STATUS_CODE_V212 -0.6420125 0.3006310 -2.136 0.03272 * BCORP_INDUSTRY_DENSITY 0.0067614 0.0092156 0.734 0.46314 DENSE_MSA 0.0311327 0.0104588 2.977 0.00291 ** BCORP_INDUSTRY_DENSITY:DENSE_MSA -0.0006298 0.0002075 -3.035 0.00241 ** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 (Dispersion parameter for Negative Binomial(0.2104) family taken to be 1) Null deviance: 393.12 on 304 degrees of freedom Residual deviance: 362.31 on 300 degrees of freedom AIC: 2794.2 Number of Fisher Scoring iterations: 1 Theta: 0.2104 Std. Err.: 0.0158 2 x log-likelihood: -2782.1530 the dispersion parameter of 0.2104 is getting me little confused...is it supposed to be a good thing? or is this a bad thing? thank you
I conducted a glm.nb by glm1<-glm.nb(x~factor(group)) with group being a categorial and x being a metrical variable. When I try to get the summary of the results, I get slightly different results, depending on if I use summary() or summary.glm. summary(glm1) gives me ... Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) 0.1044 0.1519 0.687 0.4921 factor(gruppe)2 0.1580 0.2117 0.746 0.4555 factor(gruppe)3 0.3531 0.2085 1.693 0.0904 . --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 (Dispersion parameter for Negative Binomial(0.7109) family taken to be 1) whereas summary.glm(glm1) gives me ... Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 0.1044 0.1481 0.705 0.4817 factor(gruppe)2 0.1580 0.2065 0.765 0.4447 factor(gruppe)3 0.3531 0.2033 1.737 0.0835 . --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 (Dispersion parameter for Negative Binomial(0.7109) family taken to be 0.9509067) I understand the meaning of the dispersion parameter, but not of the line (Dispersion parameter for Negative Binomial(0.7109) family taken to be 0.9509067). In the handbook it says, it would be the estimated dispersion, but it seems to be a bad estimate, as 0.95 is not close to 0.7109, or is the estimated dispersion something different than the estimated dispersion parameter? I guess, I have to set the dispersion in the summary.nb(x, dispersion=) to something, but I'm not sure, if I have to set the dispersion to 1 (which will yield the same result as summary() or if I should insert an estimate of the dispersion parameter, in this case leading to summary.nb(glm1, dispersion=0.7109) or something else? Or am I fine with just using the summary(glm1)?