body1
stringlengths 20
4.1k
| body2
stringlengths 23
4.09k
|
---|---|
Find $\lim_{n\to \infty} \sum_{k=1}^n \frac{k}{n^2+k^2}$ Since $\frac{k}{n^2+k^2}\leq \frac{k}{k^2+k^2}=\frac{1}{2k}$, then $\sum_{k=1}^n \frac{k}{n^2+k^2}\leq \sum_{k=1}^n \frac{1}{2k}=\frac{1}{2} \sum_{k=1}^n\frac{1}{k}$. Now we send $n$ to infinity, then since $\sum_{k=1}^\infty \frac{1}{k}$ is harmonic, $\lim_{n\to \infty} \sum_{k=1}^n \frac{k}{n^2+k^2}$ doesn't exist. I wonder if my thinking is right.
|
How to find the value of $\lim_{n\to\infty}S(n)$, where $S(n)$ is given by $$S(n)=\displaystyle\sum_{k=1}^{n} \dfrac{k}{n^2+k^2}$$ is unable to calculate it. This is a question from a questions booklet, and the options for the answer are-- $\begin{align} &A) \dfrac{\pi}{2} \\ &B) \log 2 \\ &C) \dfrac{\pi}{4} \\ &D) \dfrac{1}{2} \log 2 \end{align}$
|
I get this error when trying to compile: `error: invalid use of void expression I get this error at the penultimate line: queueDump(f, q, printToken(f, e)); and I don't understand why. I'm trying to code the function printToken that prints the token pointed by e void queueDump(FILE *f, Queue *q, void(*dumpfunction)(FILE *f, void *e)) { fprintf(f, "(%d) -- ", q->size); for (InternalQueue *c=q->head; c != NULL; c = c->next) dumpfunction(f, c->value); } void printToken(FILE *f, void *e) { Queue *q; if (!f) { printf("Erreur d'ouverture du fichier\n"); exit(1); } fprintf(f, "Infix : "); queueDump(f, q, printToken(f, e)); fclose(f); }
|
I want to create a function that performs a function passed by parameter on a set of data. How do you pass a function as a parameter in C?
|
The gross NPA ratio as of end Dec. was 13 % as compared with 8 % a year earlier . What would be the difference if I wrote compared to in this sentence? Please explain the use of compare to and compared with.
|
Is only one of them correct? Are they used in different situations? Or are they interchangeable?
|
I'm just someone who enjoys photography, but I'm not a photographer. I don't know a lot, so please try and keep things simple. I've been using a Fujifilm Finepix S9200, a bridge camera with a 24-1200mm lens (50x zoom), but only a 1/2.3" sensor. It's too cumbersome for travel, so I'm looking for something lightweight, most likely a point and shoot. Some of what I enjoy photographing are faces: children, statuary, etc. I've never needed to go to the end of my lens, but I've easily used 3/4 of my lens capability. If I get a camera with a 35x zoom, will that be sufficient for what I want to shoot?
|
I need to purchase my first ever lens. So far I've only used lenses that were built into a camera. This specific lens is for the BlackMagic Deign Pocket Cinema Camera (a video only camera, but one that uses photography lenses). I would prefer this to be a prime lens. I have tried to find the exact way to calculate the focal length of the lens I need but I have not been able to find a good resource to make this simple enough for my limited optics knowledge. Can you please explain a simple way to calculate the focal length of a lens given the following inputs as an example: I would prefer a simplified mathematical explanation so that I may use it to make similar determinations in the future using a "" method. I have . Using that method, I came up with: Required lens focal length = 7.02mm sensor height x (77in / 36in) = 15mm Is that correct?
|
The following bash permits of running the commands 1,2,3 in all the folders that has names included in the file "list.txt" #!/bin/bash cat list.txt | while read i do command1 & command2 & command3 & done The commands 1,2,3 in the code are running together in all the folders that has names included in the file "list.txt" . How can the commands run one by one in all the folders (i.e. when the first command finish the second command start and so on...). I tried to use "wait" between the commands but it didn't work! The solution suggested here didn't work well! I am looking for another solution
|
I have parent folder "parent". Inside this folder I have subfolders, and a file named "names.txt". this file includes the names of these subfolders as follow: Parent_folder folder1 folder2 folder3 folder4 . . . . names.txt The content of the file "names.txt" is as follow: folder1 folder2 folder3 folder4 . . . Inside every folder I have images and I want to apply consecutively 10 scripts on every image ( every script must finish it is job inside every folder, then the second script must be run). These scripts have different names and they are exist in one folder. I set an environment by sourcing a file then I can call these scripts by its name from terminal .At the same time I want to apply this process on all the folders at once. i.e. when script #1 is running, I want it to be running on all the folders at the same time. When it is done and script #2 will start. I want it to start in all the folders at once and so on... In order to achieve this I wrote the following code: #!/bin/bash path=PATH/TO/THE/PARENT/FOLDER for i in $(cat $path/names.txt); do { script#1 } & { script#2 } & . . . done This code is not working efficiently as all the commands are running at once. I want the commands to run on all the folders at once but consecutively. What I am doing wrong?
|
I have defeated most of the bosses on IOS or Mobile Terraria, but still haven’t found the bulb. I would really want to know how to find it on mobile.
|
I can't find any plantera bulbs even though I'm in hardmode. I'm playing Terraria on Android.
|
I want to place the labeling under a layer. In QGIS 2.2 apparently the label appears automatically at the top. Can someone help me. (see attachment) example:
|
I didn't find any answer to this question. In this post it is said that labels are by default on top of everything else: . But it was for 2.2, and years went by since then so maybe now there is the possibility... So I would like labels of a layer to appear under symbols of another layer. For now I get a result like you can see below. The blue squares with blue content is a personnalized symbol (linked to a database), and this is the main information to be displayed. The greyish number is a cadastre reference, which need to appear, but not so prominently. I also have sometimes some other labels on the same space, which I also would like to appear under the blue box. Does anyone know a way to do so directly in QGIS ?
|
Is there a proper way to get the id of a particular answer without using the built-in DevTools of the browser? Like for example, I want to refer that specific answer in some post, so when someone clicks the link, it will directly land them on that answer. If this feature did not exist yet, I think this feature will be helpful.
|
I didn't see anything different whether or not to permallink to a question.
|
how to recover the lost Data and Windows 10 after installing Ubuntu Desktop 14.10
|
I have a Toshiba satellite A-200 laptop with a Vista OS on it with 4 NTFS partitions (C:) Vista (D:) Entertainment (E:) Work (F:) Sources and I wanted to start using Ubuntu instead. So I tried it first from the live CD and everything was OK and all the partitions were shown and working and so I decided to install Ubuntu to replace Vista on the (C:) drive. After I did that I can no longer find my folders and files on the (D:), (E:), (F:) partitions and the only file system that is shown is one 198 GB although my HDD is 320 GB. I can't access the lost data on the remaining 120 GB which I hope is still there and not totally lost I am now working from the live CD but I am unable to install testdisk. Can I recover the Vista partitions by the product recovery CD to get my laptop back to the factory settings? Can I recover the NTFS partitions using a recovery program for Windows or will that make the problem worse? I need these data badly as I don't have a backup for them.
|
The interval between to numbers $[a,b]$ includes all the real numbers between and include $a$ and $b$. Is there a similar notation for a discrete interval, lets say for $\{a,a+1,a+2,\cdots,b-2, b-1, b\}$?
|
The well-known notation for continuous intervals is $[a,b]$. But what's the case for discrete intervals? Actually they are sets of finite elements $\left\{a, a+1, ..., b-1, b\right\}$ or infinite elements $\left\{0, 1, 2, ...\right\}$. Is there any special notation or common practice for discrete intervals?
|
I wonder what font is used for the title and sections of this document : I really like it and want to use it. Any example of templates that use it ? 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.
|
public class ExamPreparationDemo { public static int[] arrayDivisionByD2(int[] numbers) { for(int i = 0; i < numbers.length; i++) numbers[i] = numbers[i]/2; return numbers; } public static void main(String[] args) { int[] numbers = {3,8,9,10}; int[] numbers2 = arrayArrayDivisionBy2(numbers); System.out.println(Arrays.toString(numbers)); System.out.println(Arrays.toString(numbers2)); // My Question: When I run my program, I see "1,4,4,5" "1,4,4,5". But why did my variable 'numbers' didn't stay the same? I.e "3,8,9,10"? They both changed while I only wanted "numbers2" to change. Please help.
|
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?
|
About a year back i bought a USB from Asda that of which the manufacture is unknown. i made it a bootable USB for kali linux and done the install to a separate USB. i decide to format it as i could use it for other things, so i use admin EaseUS to wipe it, while later it fails so i unplug it an plug it back in. Next thing i know i try to open it in files and it says "Please insert disk" ive had a look in disk management it comes up as: " Disk 1 Removable (E:) No media " By this point i don't know what do do so... can u guys help?
|
I have a USB flash drive which is no longer recognized by my computer. Windows Disk Management and DiskPart report No Media with no storage space (0 bytes) on the drive and I cannot partition or format the drive: If the drive appears in Windows Explorer, trying to access it returns an error message indicating that there is no disk inserted, such as the following: Please insert a disk into drive X:. Various disk partitioning and data recovery utilities don't recognize the drive or only give a generic name for the drive and cannot access the contents of the drive. What can I do? How do I recover data from the drive? This question comes up often and the answers are usually the same. This post is meant to provide a definitive, canonical answer for this problem. Feel free to edit the answer to add additional details.
|
Running Ubuntu GNOME 16.04 with Gnome version 3.20.4. Since the upgrade, Chrome doesn't seem to keep me logged in on a bunch of sites. Weirdly enough, not all websites are affected. For example, I stay logged in on reddit, but I have to manually login on twitch after every reboot. Login info for affected sites is still saved and available, I can still fill the login fields with autocorrect. I assume it has something to do with the OS' key management, but I never really understood that system, so I'm kinda at a loss here. Edit: Some people have marked this question as an "exact duplicate" of a similar question, but it isn't, because: 1) The other user is getting logged out of all website logins and his Chrome account. I am only getting logged out from some website logins, and I do stay logged in on my Chrome account. 2) I've already tried the solution from the other thread and it didn't work for me.
|
If I reboot Ubuntu, then I need to log on each site and into Google Chrome account. What is the reason? My system is Ubuntu 16.04 and Google Chrome 53.0.2785.101 (64-bit).
|
I am getting Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException while running applet launched via JNLP. My applet code is package com.oprs.common; import java.awt.BorderLayout; import java.awt.Container; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.net.MalformedURLException; import java.net.URL; import javax.jnlp.*; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import org.jfree.util.Log; /** * * @date Aug 29, 2012 11:33:16 AM * @version 1.0 */ public class OprsJNLP { /** * @param args */ static BasicService basicService = null; public static void main(String[] args) { JFrame frame = new JFrame("OPRS"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JLabel label = new JLabel(); Container content = frame.getContentPane(); content.add(label,BorderLayout.CENTER); String message = "Download OPRS Application"; label.setText(message); try { basicService = (BasicService)ServiceManager.lookup("javax.jnlp.BasicService"); } catch (UnavailableServiceException e) { Log.error("service not available", e); } JButton button = new JButton("http://google.com/"); ActionListener listener = new ActionListener() { public void actionPerformed(ActionEvent event) { URL url; try { url = new URL(event.getActionCommand()); basicService.showDocument(url); } catch (MalformedURLException e) { e.printStackTrace(); } } }; button.addActionListener(listener); content.add(button, BorderLayout.SOUTH); frame.pack(); frame.show(); } } I tried to debug and found that basicService is returning null always. In place of google.com i tried with the other url's but still getting the same error. The line basicService.showDocument(url); is where it throws null pointer because my basicService is null. Can some one point out where exactly i am going wrong ? Including my .jnlp <?xml version='1.0' encoding='UTF-8' ?> <jnlp spec='1.0' codebase='http://localhost:9999/' href='oprs.jnlp'> <information> <title>OPRS</title> <vendor>OPRS</vendor> <description kind='one-line'> OPRS WEB START </description> <shortcut online='false'> <desktop/> </shortcut> </information> <resources> <j2se version='1.4+' /> <jar href='oprs.jar' main='true' /> </resources> <application-desc main-class='com.oprs.OprsJNLP' /> </jnlp>
|
What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them? What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?
|
Is the L'Hopital's rule true when using limits on $\mathbb{C}$ (the complex field)? I don't know if it is only valid using the real numbers $\mathbb{R}$... is that the case?
|
I have a question about something I'm wondering about. I've read somewhere that L'Hopitals rule can also be applied to complex functions, when they are analytic. So if have for instance: $$ \lim_{z \rightarrow 0} \frac{\log(1+z)}{z} \stackrel{?}{=} \lim_{z \rightarrow 0} \frac{1}{(1+z)} = 1 $$ Now i'm wondering if this is correct? Also if we take $|z|<1$, is it then correct? Thanks,
|
I read this story in the late 60s/early 70s. It’s about a lone astronaut who lands on a planet (I think) and sees plants, like in a garden but each plant is minutely different than the ones around it. Then he stumbles upon a workshop/lab and some sort of written record that he deciphers, which tells him that human beings are a failed experiment due to be terminated by the owner of the lab, which I assumed to be God or some kind of supreme being.
|
Can anyone offer any help with this..? I read it at school around 1976 but cannot remember the title nor the author. Thank you in advance! A lone astronaut called - I think- Steve is stranded on a distant planet when his ship runs low on fuel. His only companion is - again I think - a parrot. The fuel his ship uses is a filament or wire which is kept on a spool. On exploring the locale he has landed in he discovers a huge building half-buried in a mountainside. He enters the building and discovers it is a museum filled with thousands of glass cases containing preserved specimens of various life forms as well as machines. There is a robot curator that does repairs and, as the astronaut finds out, prepares cases for new exhibits. On analysing the wire in one of the machines he discovers that is suitable as fuel for his ship so he winds a length of it onto his ships spool and leaves the planet just ahead of the robot collecting him and his parrot as museum exhibits...
|
What do we call a matrix whose columns are orthogonal, such as $\begin{bmatrix}3 & 0 & 0 \\ 0 & 0 & 2 \\ 0 & 1 & 0\end{bmatrix}$? Is there a special name for it? I tried searching to no avail.
|
Is there a name for a matrix whose rows (or columns) are non-zero orthogonal vectors ? It seems to me that "orthogonal matrix" would be a good name, but this is already taken -- it refers to a matrix whose rows (or columns) form an orthonormal set of vectors.
|
My program basically takes an int studentID from a file and outputs it to a new file, but the problem is when the ID is entered as "00000" it is stored and prints as "0". Is there an easy way to keep the leading zeros when printing it?
|
How can I format my output in C++? In other words, what is the C++ equivalent to the use of printf like this: printf("%05d", zipCode); I know I could just use printf in C++, but I would prefer the output operator <<. Would you just use the following? std::cout << "ZIP code: " << sprintf("%05d", zipCode) << std::endl;
|
Related questions: . Dictionary aids: - - Right after a new user registers for this site (and/or related ones), such user is quite limited in what he/she can do on these sites. I think I understand why. Such user cannot comment anywhere because the required privilege was not earned yet. So such user needs to start "doing things on SE" to "earn" the required (eg 50) points somehow. But with all imposed limitations for such user, it is quite frustrating. Here are some examples of what it is like to be a : If such user finds a question and wants to ask a related question, then he/she typically wonders about one or more of these possible questions (pretty sure there are other questions ...): Should I post an answer? Am I actually allowed (already) to post an answer (maybe it requires a privilege I do not have yet)? I want to answer but I don't know for sure how to do actually so (and I want to avoid making a bad first impression). If I post an answer it might not comply with the guidelines (I want to prevent being perceived as not following them, as illustrated also by the rather scary ""). I don't know what could happen (I'm too new to realise / predict the possible consequences, due to lack of experience with how this community typically reacts). Comments are disabled (see above), so that's not an option 'yet'. Sure there is a badge awarded for 'visiting' the ( ...), but what does that really mean? How about making that specific batch (way) more difficult for it to be rewarded? Note to myself: did anybody ever file a about that? Thanks for suggesting visiting the help center as a possible (partial?) remedy. So it appears that if such user doesn't 'answer' the question, he/she will not get any closer to being able to get out of what appears to be a newbie loop. My Question: How can such user get more information, or just suggest something to the original poster (Note: often abbreviated as OP-er, whereas OP=Original Post ...)? Credits to all participants for teaching/suggesting me (sometimes quite challenging ...), Especially to "James", a real SE "mentor". Start 'lurking' via his profile page to learn 'AbitMORE' and consider voting (up!) any of his impressive questions, and answers. Notes to myself (haven't found a feature, or earned some privilege, to make it invisible ...): I'm the OP of this question, and " learned some other lesson" recently about the "power" that an OP seems to have regarding some hidden feature that is NOT documented (yet) in the official help pages ... at least I have not found such documentation yet. Todos: File a about it (or is it a ?) ... What are "my" options if I would want to "overrule" the voting to consider this question as a duplicate (I do not question that anymore, but just want to learn about such options). If I can't figure it out, I'll probably "ask" people like ... James! What's a 'catch 22' ? I do know what "lesson 101" is ... that doesn't help of course. It's tough to be a non-native-english SE-er ... awel, "merci mes amis"!
|
I have been reading Stack Exchange for years - mostly not logged in, and have never posted (this is my first). I'm simply not very talkative, and very good at googling. Recently a few occasions have come up when I've wanted to comment on a question. I wanted either to ask for, or provide, clarification which did not warrant a new answer. How do I gain enough reputation to comment without: asking questions which have already been answered or that I can figure out on my own, or posting my comment like as an answer (i.e. being rude)?
|
I've noticed in virtually all examples I've seen that locks on instances are used as follows public class Foo { readonly object locker = new Object(); public void DoSomething() { lock(locker) { //... } } public void DoSomethingElse() { lock(locker) { //... } } } This is very useful when multiple threads might have access to the same instance and you want its methods to be atomic relative to each other. In my experiments, it would work just as well however if I did a lock(this) rather than having the locker object. Is there something I'm missing or is that perfectly fine?
|
The says that public class SomeObject { public void SomeOperation() { lock(this) { //Access instance variables } } } is "a problem if the instance can be accessed publicly". I'm wondering why? Is it because the lock will be held longer than necessary? Or is there some more insidious reason?
|
Hypothetical situation: Player A has one creature and player B has also one creature. Now the player A casts a black spell to destroy the creature and targeting player's B creature. If creature B gets protections from black does the player A need to target the only possible target left in the game and that is his creature? What if the creature B would be returned to hand instead? Is it the same?
|
When you have a card like which reads "Exile Target Creature with power 3 or less", as I understand it, it becomes untargetable if the opponent's creature power increases thanks to a pump spell like . But what if the Disregard is already on the stack and targeting; and they respond with Brute Strength? I'm pretty sure (and my opponent with Brute Strength was certain) that it won't exile the creature, but I don't know which rule states this, and there's no gatherer ruling on the spell.
|
I’m getting towards the end of a long project and am required to write a dissertation (Bachelor of Engineering) and we have been advised that it’s a good idea to include an acknowledgements page¹. What I’m wondering is: Is it considered a requirement to thank your academic supervisor, regardless of whether they actually helped? My supervisor was not particularly helpful and I ended up not bothering to ask them questions about half way through the project. Is it considered poor form to leave them out of the acknowledgements? My original question was similar to a asking about whether they should publish a PhD Thesis without acknowledgements due to difficulties with supervisors. My question is slightly different in that I would like to include an acknowledgements page to thank family and friends etc. This would make it more obvious that the supervisor has been left off the list of people who have been acknowledged. ¹ The guidance provided says: It is common courtesy that you acknowledge assistance received whilst undertaking the project and preparing the dissertation. You should consider carefully all forms of assistance received and these may encompass academic, technical, secretarial, administrative and personal assistance (e.g. family and friends). A set of simple statements is usually appropriate and adequate acknowledgement should not normally exceed one page.
|
During the process of writing my PhD thesis, I was close to falling out with my adviser, the advice I received from other staff at the lab (including the director) was unhelpful at best. I have since made up with my adviser and have successfully defended the thesis. I now have to publish my thesis. The department says that one can include acknowledgements. All of the theses I have seen in my lab and in my department feature acknowledgements. Due to this special situation, I don't quite feel that acknowledgements are called for. Yes, my adviser helped during the first half of the project but then almost completely reverted his stance. In terms of contribution, it is my opinion that he comes out at 0%. I do not want to address any of the issues in the acknowledgements. I do not think that this is the right place. Likewise, I do not feel like thanking any of the involved people. Therefore, I would just leave out the acknowledgements completely. In academia, is this considered worse than lukewarm acknowledgements? Should I actually care about the acknowledgement, because others do?
|
I'm currently taking a class called Foundations of Geometry. We started with the stereographic projection and carried onward through fractional linear transformations, and now we are working with the Poincaré Disk Model. We've been finding things like non-Euclidean lines, circles with their non-Euclidean centers and non-Euclidean distances, delving into hyperbolic trigonometry. We don't use a textbook though, the professor just wrote up his own notes, and while good, they're restricted to just our 10 quarter class, and we're just studying one of the non-Euclidean geometries. So I was wondering if anyone had suggestions on some books that may cover more of the hyperbolic geometry or perhaps some elliptic, or any others in general. Thanks! =D
|
I'm researching non-Euclidean geometry. Now I am looking for a good source for it. Please suggest me something.Thanks.
|
I'm doing my first application on Android, it consists of a "To do Task". My problem is when I want to check the text of my TextView, which contains the date (array of strings), with the date on which the information is saved. This if I do to run the check never works. // Write date in Array SimpleDateFormat formatdate = new SimpleDateFormat("dd-MM-yyyy", Locale.getDefault()); Calendar calendar = new GregorianCalendar(); String[] date = new String[6]; for(int i = 0; i < 6;i++){ calendar.add(Calendar.DATE , 1); date[i] = formatdate.format(calendar.getTime()); } tvdate2.setText(date[0]); // 16-03-2021 ... // When clicking on the button, it checks and then displays the corresponding information btn2.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { String test ="16-03-2021"; if (tvdate2.getText().toString() == test){ testing.setText("It works!!"); } } });
|
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'd like to get the id of the clicked link with jQuery. Why does this return Undefined instead? test = function(e) { alert($(e).attr('id')); return false; } $('.bleu').click(test) <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <a href="" class="bleu" id="h12">azeaze12</a> <a href="" class="bleu" id="h13">azeaze13</a> <a href="" class="bleu" id="h14">azeaze14</a>
|
Is there any way to get the ID of the element that fires an event? I'm thinking something like: $(document).ready(function() { $("a").click(function() { var test = caller.id; alert(test.val()); }); }); <script type="text/javascript" src="starterkit/jquery.js"></script> <form class="item" id="aaa"> <input class="title"></input> </form> <form class="item" id="bbb"> <input class="title"></input> </form> Except of course that the var test should contain the id "aaa", if the event is fired from the first form, and "bbb", if the event is fired from the second form.
|
If for some $\alpha , \beta \in \mathbb{R}$ , the integration formula $\int_{0}^{2} p(x) dx = p(\alpha) + p(\beta)$ , holds for all polynomials $p(x)$ of degree atmost $3$, then the valueof $3(\alpha - \beta)^2 = ?$. How to approach this question? i thought of taking Polynomial as $x^3$ and i am getting the answer but is there any formal way of doing it without explicitly substituting any polynomial of degree atmost $3$ ?. Any suggestion , hints , solution ?
|
Let $f$ be a polynomial of degree $n$ at most $3$ such that there exists some $\alpha,\beta$ satisfying $\int_0^2 f(x)dx=f(\alpha) +f(\beta)$ for all such $f$. Find the value of $3(\alpha-\beta)^2$ Attempt: We need to find the value of $3(\alpha-\beta)^2$. Now, this expression reminds of the function $f(x) = (x-\beta)^3$. Differentiating this function at $x=\alpha$ will give us the desired result. Hence, we just need to know the derivative of $k(x)=(x-\beta)^3$ at every point. However, I am unable to move forward with this intuition. Could anyone please help me to move ahead in this problem. Thank you very much for your help in this regard.
|
I tried to simulate a 400 meters race using multithreading concept.In this application totally 5 groups are created and they are named by country names,each group should have 2 players.First player is allowed to run for the first 200 meters followed by the next player in the group and the winner group has to be announced.Since i am a beginner in multithreading concept i tried to implement the first 200 meters process without concerning the next 200 meters process.But running the code doesnt print anything on the console.please help me to get through this... RelayDemo.java public class RelayDemo implements Runnable { public void race() { for(int i=0;i<200;i++) { if(Thread.currentThread().getName()=="rakesh"||Thread.currentThread().getName()=="nathan"||Thread.currentThread().getName()=="max"||Thread.currentThread().getName()=="villiers"||Thread.currentThread().getName()=="decapro") { System.out.println("The distance covered by"+Thread.currentThread().getName()+"is "+i); } } } public void run() { this.race(); } } ExcecuteRelay.java public class ExcecuteRelay { public static void main(String[] args) { RelayDemo r=new RelayDemo(); ThreadGroup t1=new ThreadGroup("india"); ThreadGroup t2=new ThreadGroup("australia"); ThreadGroup t3=new ThreadGroup("usa"); ThreadGroup t4=new ThreadGroup("africa"); ThreadGroup t5=new ThreadGroup("france"); Thread r1=new Thread(t1,r,"rakesh"); Thread r2=new Thread(t1,r,"kishore"); Thread r3=new Thread(t2,r,"nathan"); Thread r4=new Thread(t2,r,"johnson"); Thread r5=new Thread(t3,r,"max"); Thread r6=new Thread(t3,r,"tim"); Thread r7=new Thread(t4,r,"villiers"); Thread r8=new Thread(t4,r,"duminy"); Thread r9=new Thread(t5,r,"decapro"); Thread r10=new Thread(t5,r,"lues"); r1.start(); r2.start(); r3.start(); r4.start(); r5.start(); r6.start(); r7.start(); r8.start(); r9.start(); r10.start(); // TODO Auto-generated method stub } }
|
I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug. Is == bad? When should it and should it not be used? What's the difference?
|
I have been a DM for 35 years, and now we are embarking on 5th ed. I am playing a 1st level Barbarian. Due to Ideals and Bonds and stuff, I am letting other party members get the “kill” on stuff I have done basically all the damage to. The DM is only awarding XP to the final “kill shot” which means I am no XP. That would be fine if he was awarding me Inspiration, but he’s not... Is there any guidance for DMs that I can show him that says I should get some of the XP for doing most of the damage to an opponent?
|
At this point, I am unclear as to how to handle encounter XP. Does each surviving party member receive a proportional share, or the full amount? That is, assume a 4-character party had completed an encounter worth 400 XP. Would each party member receive 100 XP, or 400 XP?
|
This is related to Lightning component framework. Though, I have passed challenge (till 4), however result is not as expected. I am passing boatTypeId as a parameter from helper-onSearch to apex method-getBoats(). getBoats() return list of boats having the same boatTypeId. Below is my helper and the apex class. ({ onSearch : function(component, event, helper) { // console.log('In Helper'); var action=component.get('c.getBoats'); var btypeId =component.get("v.boatTypeId"); console.log('BoatSearchResult helper boattypeId '+btypeId); action.setParam({"boatTypeId" :btypeId}); action.setCallback(this,function(response) { if(response.getState() === 'SUCCESS') { console.log('response from server'+ response.getReturnValue()); var boatslist = response.getReturnValue(); console.log('Number of Boats returned'+boatslist.length); component.set("v.boats",boatslist); } else { console.log('Error caught in !!!'); } }); $A.enqueueAction(action); } }) public with sharing class BoatSearchResults { @Auraenabled public static List<Boat__c> getBoats(string boatTypeId) { if(boatTypeId != '') { system.debug(boatTypeId); system.debug('Hello again'); return ([Select Id, BoatType__c , Contact__r.Name, Name, picture__c from Boat__c Where BoatType__c = :boatTypeId]); // return ([SELECT Id, BoatType__c, picture__c, Name,contact__r.Name from Boat__c]); } else { system.debug('Hello again2'); return ([SELECT Id, BoatType__c, picture__c, Name,contact__r.Name from Boat__c]); } } } Couple of issues here, I find here: boatTypeId passed in the getBoats() is always null If boatTypeId is null , then else part of getBoats() should be executed, but if part of the method is executed all the times. (Maybe I am missing basics of SOQL here) Can someone point me in the right direction?
|
I am unable to pass parameter from the lightning controller to the apex class. Whenever I use debug the passed value seems null. JavaScript Controller add : function(cmp,event,helper) { event.target.parentNode.style.display = 'none'; document.getElementById("cartdiv").style.display = 'block'; var selectedAccount =event.target.id; var act = cmp.get("c.Cartveg"); act.setParams({"s":selectedAccount}); act.setParams({"cartlist" : cmp.get("v.cart")}); act.setCallback(this,function(a){ cmp.set("v.cartitem",a.getReturnValue()); }); $A.enqueueAction(act); cmp.set("v.whichButton", selectedAccount); } Apex Class @AuraEnabled public static List<Vegetable__c> Cartveg(string s,List<Vegetable__c> cartlist) { system.debug(s); List<Vegetable__c> clist= [SELECT Id, Name , Price__c , img__c FROM Vegetable__c where Name =:s]; clist.addAll(cartlist); system.debug(clist); return clist; } Value of s is null. Please help
|
I know that since $\Bbb Z$ is commutative and unital $\langle 7\rangle$ is just the polynomials whose coefficients are all in $7\Bbb Z$. I know that since $\Bbb Z[x]$ is commutative that in order to show $\langle 7\rangle$ is a prime ideal show: $ab \in \langle 7\rangle$ implies $a \in \langle 7\rangle$ or $b \in \langle 7\rangle$ for all a,b in $\Bbb Z[x]$. I have calculated what form ab is using Cauchy product. I now have stated each coefficient is in $7\Bbb Z$ but Im finding it hard to show how this requires either a or b lies in $\langle 7\rangle$
|
Let $\mathbb{Z}[X]$ be the ring of polynomials in one variable over $\Bbb Z$. My question: Is every prime ideal of $\mathbb{Z}[X]$ one of following types? If yes, how would you prove this? $(0)$. $(f(X))$, where $f(X)$ is an irreducible polynomial. $(p)$, where $p$ is a prime number. $(p, f(X))$, where $p$ is a prime number and $f(X)$ is an irreducible polynomial modulo $p$.
|
The typeface is the same as the one here: I have copied the image from that post here. Thanks in advance.
|
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.
|
How would gravitons be detected indirectly or directly, in space or on earth? And what experiments are going on to find gravitons?
|
How would one look for and confirm existence of a graviton? Someone was speaking to me about perhaps one day discovering the graviton, but to me it seems unlikely, although I'm young and essentially quite naive, so am coming to you physicists to ask What actually is the likelihood of finding it? How would we find it?
|
Why python restrict us to use hashable as dict key? How this mechanism works?
|
Does anyone know how the built in dictionary type for python is implemented? My understanding is that it is some sort of hash table, but I haven't been able to find any sort of definitive answer.
|
I know that there are similar questions here, but I still don't understand everything. I wrote 4 almost identical sentences below with a place for an article marked as "...". Please tell me what are correct articles here. I know that these sentences can be rewritten without articles and with keeping the same sense, but I am interested in these particular examples. It is not a homework or something like that by the way. We must keep it at ... higher angle. We must keep it at ... high angle. You must drive at ... high speed. You must drive at ... higher speed.
|
I can’t for the life of me figure out where to use a and where to use the — and where there is no article at all. Is there a simple rule of thumb to memorize? The standard rule you always hear: “If a person knows which item you are talking about then use "the" . . . doesn’t clear things up for me, as I have no idea whether or not they know.
|
I am often doing some cleanup in hard drives and I always want to know the size of each Folder in a directory in Explorer. Each time i need to run a dir to know the folder size. I noticed that there is that option in windows explorer but why does the size of thoses folders is never showing up? Thanks for your help
|
How can I visualize which folders and files are taking up all of the space on my hard drive? I'm getting some conflicting reports on the size of hard drive contents. Namely what is and isn't there and what folders are actually using the space. I need to know which of the files or folders the culprits behind all this hidden bloat. Also there should be a print option to get it on paper.
|
My understanding for a long time was that basically never to use ==, since it doesn't respect type and can end up causing undesired results. I just read this post about the general comparison but wasn't sure if everyone has the same opinion as me. Here is the scenario which I encountered: Original code $state = (intval($state) === TIMESHEET_STATE_UNLOCKED) ? 'unlock' : 'lock'; We had found that this line was invalid, since our constant TIMESHEET_STATE_UNLOCKED was a boolean and $state was the string '0' or '1'. We could fix this in one of two ways: $state = (intval($state) === intval(TIMESHEET_STATE_UNLOCKED)) ? 'unlock' : 'lock'; OR $state = ($state == intval(TIMESHEET_STATE_UNLOCKED)) ? 'unlock' : 'lock'; My first inclination was to former but I'm not so sure anymore.
|
What is the difference between == and ===? How exactly does the loosely == comparison work? How exactly does the strict === comparison work? What would be some useful examples?
|
I have 2500 mAh on the battery and 3.7 V normal voltage and I get 55 watts for the pack in DC, then after changing my voltage to 120 AC, how can I calculate the wattage? I mean multiply the 120 V ac with same DC 2500 mAh on the battery? point is does it change? the mAh on the battery ?
|
let me say if I have a pack of lithium batteries connected in series and parallels, and i want to connect it to an Inverter, BUT...BEFORE I connect it to inverter, lets say it gives out 12 volts "hypothetically" some informations like 3.7 volt batteries, and 2500 mAh, lets say then the pack gives 12 volts in DC and hypothetically again I calculate it ((still in DC)) is ..... W = V* Amp ... then it means wattage = 11.1 V * 5 Ah which is 55.5 W. then we got 55.5 watts, THEN....after we want to change the dc into ac it gives you 120 volts "please hypothetically" just answer me this, ARE the Wattage And Ampere are remains the same as DC? what would it be the result after AC?
|
I would like to create a line with text below it as it can be seen often in contracts: Ideally, that line would have a fillable element over it. Minimal Working Example The best I could come up (which is much better than I've expected as I started writing this question!) is: \documentclass[a4paper]{scrartcl} \usepackage[utf8]{inputenc} % this is needed for umlauts \usepackage[ngerman]{babel} % this is needed for umlauts \usepackage[T1]{fontenc} % this is needed for correct output of umlauts in pdf \usepackage[margin=2.5cm]{geometry} %layout \usepackage{csquotes} % nice quotes \usepackage{parskip} % I don't want indentation \begin{document} \section{Untermietvertrag} Im Folgenden wird ein Untermietvertrag zwischen (nachfolgend \enquote{Hauptmieter} genannt)\\ \line(1,0){250}\\ \vspace{-0.3cm} {\scriptsize Name, Anschrift}\\ und (nachfolgend \enquote{Untermieter} genannt)\\ \line(1,0){250}\\ \vspace{-0.3cm} {\scriptsize Name, Anschrift}\\ geschlossen. \end{document} which renders to This solution does not have fillable form elements at the over the lines. Is there probably a package that helps when you want to write a contract? Or a document class?
|
I'm trying to create a signature and date line in a document. I need the date line to always be in the same spot on the page no matter what name is under the signature line, such as: ---------------------- ---------------------- Representative Date ---------------------- ---------------------- Program Manager Date Here is the code I currently have: \makebox[2.5in]{\hrulefill} \hspace {1.0in}\makebox[2.5in]{\hrulefill} \\ User Representative \makebox[2.5in][r]{Date} \\ \vspace{.2in} \makebox[2.5in]{\hrulefill} \hspace {1.0in}\makebox[2.5in]{\hrulefill} \\ Program Manager \makebox[2.5in][r]{Date} \ I want to be able to change the names, such as change Program Manager to Joe Foo and have the word 'Date' stay in the exact place. Any help would be greatly appreciated. I'm still a newbie at TeX so please forgive my ignorance.
|
My project: I want to develop a library that would solve equations. For example: Given input "3x+5=-1" I would like the output x=6 Why? Just for fun, I am learning and am interested in this topic. What do I already have: I have already written a lexer and parser from scratch. So I am able to compute "3+6*3/(2^3)" etc. What exactly do I want to do: Given my written lexer and parser (the process uses Reverse Polish Notation which I have researched how to do myself) I would like to expand it with variable recognition and then calculation of those variables. Basically solving linear equations. My question: Where do I even start on implementing variables or solving equations. I would like to make it work for any linear equation. Just some resources or tips which I can expand upon myself. As this is a learning experience, external libraries are not a solution. What I would like to do in the future: If I manage to conquer this problem I would like to expand the thing with equation simplification, quadratic equations etc. How do I approach this? What kind of object structure would I need?
|
I need to programmatically solve a system of linear equations in C, Objective C, or (if needed) C++. Here's an example of the equations: -44.3940 = a * 50.0 + b * 37.0 + tx -45.3049 = a * 43.0 + b * 39.0 + tx -44.9594 = a * 52.0 + b * 41.0 + tx From this, I'd like to get the best approximation for a, b, and tx.
|
I'm really in a bad situation here. I uninstalled and purged all instances of Wine in my system, including the .wine directory, and proceeded to install the latest Wine Stable 4. However, after the setup, I went to access my Documents folder, and other folders where I had data, and everything was empty, including the Trash, Downloads, etc. My Thunderbird and Firefox were all set to default, meaning I had a profile that was like it's first time use and completely empty. Please help me to find a way to restore all of the data in my profile regarding settings and documents, files, images, etc. I totally blew it, and now I realized that Ubuntu doesn't have a built-in System Restore feature. Any and all assistance you can offer will be greatly appreciated. @ThomasWard: I ran these commands to uninstall Wine: sudo apt-get purge wine wine-* AND sudo apt-get autoremove --purg. All my data from the Documents, Downloads, Pictures, Music, etc is gone. It's like a brand new profile -- blank -- Is there a way to restore the profile using the /etc/skel/ "skeleton" directory? (I was advised to append the @ to your name to ensure you receive notice of my response) @K7AAY -- I don't believe another user was created. I went to logoff, and when I was prompted to logon, my same username was displaying for me to login. I used the same password and let me in. I also changed between the different Ubuntu Desktop options, but the same situation -- all data was gone. From a Post no longer available as of today, Dec 20, 2019 Actually, there are few things in Ubuntu et al. that will allow you to roll-back changes. Brief below: /var/backups/dpkg.status.*: this directory keeps a set of log of the last system state prior to an install as follows; /var/backups/dpkg.status.0 is the most recent log prior to a state change (e.g. package install/remove/update ...etc); /var/backups/dpkg.status.?.gz are compressed, archived versions of the logs at various points in time, rotated monthly. /var/lib/dpkg/status: this is the current state of installed packages. Manually backing this up, or providing a logrotate script in /etc/logrotate.d will ensure schedule snapshots of your system state to your liking. Roll-back: the corner stone is your previous state /var/backups/dpkg.status.0. Here is a brief step-wise procedure to restore previous package state (note brief and not exhaustive). a. cp /var/backups/dpkg.status /var/lib/dpkg/status (will revert back the package state one version back). b. dpkg -l | grep ii (will give you a list of supposedly installed packages based on the rolled-back /var/lib/dpkg/status file achieved in step a. above). c. dpkg -l | grep ii | awk '{print "apt-get --reinstall -y install", $2}' > /tmp/reinstall && sh /tmp/reinstall (will create a simple one-liner shell script and runs that to reinstall packages determined to have been on the system prior to an apt-get operation) d. apt-get --reinstall install ucf (will take care of sanitising /etc config files et. al) e. Repeat step c. if/as necessary Is this still relevant although the old post was from 8yrs ago? Output from History ersalabert@ersalabert-Lenovo-ideapad-320-15IKB-Touch:~$ history 1 wget -nc https://dl.winehq.org/wine-builds/winehq.key 2 sudo apt-key add winehq.key 3 sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ cosmic main' 4 nordvpn c 5 sudo apt-get purge wine wine-* 6 sudo apt-get autoremove --purge 7 rm -rf ~/ .wine/ 8 rm -rf ~/.wine/ 9 rm -rf ~/.local/share/applications/wine* 10 sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main' 11 sudo apt install --install-recommends winehq-stable 12 wine --version 13 winecfg 14 sudo apt autoremove wine-devel wine-devel-amd64 wine-devel-i386 winehq-devel winetricks 15 sudo apt-get remove --autoremove wine-*
|
Okay, so I was trying to uninstall a program called Kodi. I ran the following commands in terminal: sudo apt-get update sudo apt-get remove kodi* sudo apt-get purge kodi* I was reading it on this site: So, the next thing it says to do is this: rm -r ~/.kodi/ After this, I'm not sure what the terminal output was, something about the command not being able to do that because of something. Then, Ubuntu welcome pops up, just like when you first install it. I went to desktop, it was empty, all my files gone. I restarted the PC, only to come to realize that it's a fresh installation of Ubuntu. Can someone explain what the heck is going on?
|
I named $\gcd(a,m) = d$ and $\gcd(ab,m) = d' $ So I know that $d\mid a$, $d\mid m $ and $d'\mid ab $ , $d' \mid m$ But I can't use the transitive property of divisibility here. How can I prove that $d \mid d'$?
|
So far I have that $a|b$ implies $b=ax$ for some x in the integers and $c|d$ implies that $d=cy$ for some y in the integers. From here I can see that $gcd(a,c)|gcd(b,d)$ is logically equivalent to $gcd(a,c)|gcd(ax,cy)$ but I am not sure where to go from there.
|
Why is v.v accessible if MyTest is not a parent-class of Val? public class MyTest { public static void main (String args []) { ValX v = new ValX (); System.out.println ("A: " + v.v); // is working, why? } } public class ValX extends Val { } public class Val { protected float v = 11; } EDIT I learned about the visibility of proteced within the package. Thats the reason. thanks! Is there a way I can make v only visible to parent-classes without moving it to another package?
|
In Java, are there clear rules on when to use each of access modifiers, namely the default (package private), public, protected and private, while making class and interface and dealing with inheritance?
|
What this code does: It generates dates based on a single day that is grabbed before ($date). It counts always up one week. E.g. If your start date ($date) is 07.04.2019 it will generate the dates for $final_amount times. So, if the start of the date is 07.04.2019 and $final_amount is: 5 it will output: 07.04.2019` (handled in separate code, as the first day is excluded in code!) 14.04.2019 21.04.2019 28.04.2019 05.04.2019 The issue with my code: I need to skip the date if it falls into a holiday. So if e.g. 21.04.2019 is a holiday, it should be skipped and replaced with a new date one week later. It should always have the amount $final_amount even if one ore more dates are laying on a holiday. I have no Idea how this could be accomplished, as I am relatively new to PHP. setlocale(LC_TIME, "de_DE"); //only necessary if the locale isn't already set $date = new DateTime(helper('com://site/ohanah.date.format', array( 'date' => $event->start, 'format' => 'Y-m-d H:i', 'timezone' => 'UTC' ))); $date_scn = new DateTime(helper('com://site/ohanah.date.format', array( 'date' => $event->end, 'format' => 'H:i', 'timezone' => 'UTC' ))); $cnt = 2; // start the termin to count at two as the first one is already defined above $raw_ticket_type = $event->ticket_types->name; $filter_numbers = array_filter(preg_split('/\D/', $raw_ticket_type)); $filtered_numbers = reset($filter_numbers); $first_occurence = substr($filtered_numbers[0], 0, 1); $final_amount = $first_occurence - 1; // subtract 1 from $first_occurence as it is always one more for ($i = 0; $i < $final_amount; $i++) { // loop $date->add(new DateInterval('P1W')); //add one week $formatted_time = utf8_encode(strftime("%A, %d. %B %Y, %H:%M", $date->getTimestamp())); $formatted_time_scnpart = utf8_encode(strftime("%H:%M", $date_scn->getTimestamp())); // This is the modal echo '<div class="termin-layout"><span class="termin-number-text">' . $cnt++ . '. ' . 'Termin' . '</span> <span class="termin-date">' . $formatted_time . ' - ' . $formatted_time_scnpart . '</span></div>'; } echo '</div></div></div>';
|
I have a loop that is doing some error checking in my PHP code. Originally it looked something like this... foreach($results as $result) { if (!$condition) { $halt = true; ErrorHandler::addErrorToStack('Unexpected result.'); } doSomething(); } if (!$halt) { // do what I want cos I know there was no error } This works all well and good, but it is still looping through despite after one error it needn't. Is there a way to escape the loop?
|
In Google chrome when I start typing in a text box I get auto completion for things I have use din the past, this however is only for the current letter. Is there a way I can see all of the auto complete data Google Chrome has for this text box?
|
I know how to delete saved form data in Chrome, but I'd like to be able to see all of the entries stored for fields. When I type a into a form, I get a list of a few items that I have typed before in that field which begin with a. I would like to see a complete list, though.
|
I have a form where I have a password field. When the users submits the form, all the fields including the passwords are clearly visible in the url when they passes through the URL to another php page. Is there any way to avoid this ? I dont want the password to be visible.
|
What's the difference when using GET or POST method? Which one is more secure? What are (dis)advantages of each of them? ()
|
In Yugioh, you start out with a five card hand. You have a 40-60 card deck. I run a 60 card Exodia deck, and twice I have drawn all five pieces of Exodia in my starting hand. For those who don’t play, having all five pieces in your hand at one time causes you to immediately win the game. I would like to know what the actual odds of that happening once, let alone twice.
|
In Yu-Gi-Oh!, there are some cards that allow to the duelist to win a duel automatically. In this case, I'm focusing my question on . To win a duel using Exodia, you must have the five cards (parts of Exodia) in your hand. These cards are (in no particular order): I'm wondering: How to calculate the probability to get all cards of Exodia The Forbidden One based on: Parts of Exodia taken from the Deck during each Draw Phase with no additional card effects. A Yu-Gi-Oh! deck has: 40 cards in total (35 monster, spell, trap cards and 5 Exodia cards). There are only five Exodia cards (no copies). Draw one card per turn. I posted a about this subject. The accepted answer should have a to of the . I'm looking for a detailed answer that explains how to make those calculations and the obtained results .
|
I have my Nikon D7500 set to Manual Mode. I can change the shutter speed and it maintains the setting. When I change the aperture, the setting is not maintained and varies depending on the zoom of the lens. How do I stop the aperture from changing when in Manual Mode?
|
I am new to the photography field, there are few things which I am not able to understand. I am playing around with my Nikon D90 along with its kit lens (18-105mm). While reading about Depth of preview, the author asks to do some basic exercise to better understand DOF, like this: set your aperture to smallest number f/2.8, f/3.5, f/4 with 70mm or longer lens. When I tried to set aperture to f/3.5, and tried to change focal length, my camera is setting aperture automatically in every possible mode (which I know of). It is changing aperture in the following fashion: 1. 18-24 ----> 3.4 to 4 2. 18-35 ----> 4.5 3. 18-50 ----> 5 4. 18-105 ---> 5.6 But if i set my aperture to 5.6 or higher, it does not change when I change the focal length of my camera. I know I am not doing some basic thing right, but I'm still not sure why this is happening. Can some one help me to understand this?
|
i have a problem with this code, because in the RTL simulation, the output Cookie appears as StX. I don't know why this is happening since i don't know verilog well. Can someone help me? module dispenser( CLOCK, SReset, SBCD, Cookie, valor, reciba ); //Port declaration input CLOCK; input SReset; input [3:0] valor; output reg reciba; output reg [3:0] SBCD; output reg Cookie = 0; always @(*) if( valor >= 4'b1000) begin Cookie = 1; SBCD = valor - 4'b1000; reciba = 1; end else begin Cookie = 0; SBCD = valor; reciba =0 ; end endmodule and this is my testbench `timescale 1 ns/ 1 ns module vendingMachine_tst(); //Parameters parameter TCK = 20; // clock period in ns parameter CLK_FREQ = 1000000000 / TCK; // Frequenzy in HZ //general purpose register reg eachvec; //Internal wire and reg declaration reg [3:0] TB_Un_US; reg [3:0] TB_Dos_US; reg [3:0] TB_Cinco_US; reg TB_Clock; wire [3:0] TB_SBDC; wire TB_Cookie; vendingMachine vM1( .Un_US(TB_Un_US), .Dos_US(TB_Dos_US), .Cinco_US(TB_Cinco_US), .SBCD(TB_SBDC), .Cookie(TB_Cookie), .CLOCK(TB_Clock) ); initial begin // code that executes only once // insert code here --> begin TB_Clock <= 0; // --> end $display("Running testbench"); end always // optional sensitivity list // @(event1 or event2 or .... eventn) #(TCK/2) TB_Clock <= ~ TB_Clock; initial begin // code executes for every event on sensitivity list //Caso 1: El cliente entrega justo el precio de la galleta #0 TB_Un_US <= 4'b0001; #6000 TB_Dos_US <= 4'b0010; #60000 TB_Cinco_US <= 4'b0101; //El cliente supera el precio de la galleta // #0 TB_Un_US <= 4'b0001; // #60 TB_Un_US <= 4'b0001; // #600 TB_Cinco_US <= 4'b0101; // #6000 TB_Dos_US <= 4'b0010; // // ////El cliente no completa el precio de la galleta // // #0 TB_Dos_US <= 4'b0010; // #6000 TB_Un_US <= 4'b0001; // #600000 TB_Un_US <= 4'b0001; #(TCK*300000) $finish ; #(TCK*300000) $finish ; @eachvec; // --> end end endmodule
|
i want to make a counter that increases by the value of its inputs, but i did the testbench and the output is undetermined, xxxx. Can someone tell me if there is something wrong in this code? //Count module count(clk, rst, val, coin ); //Declaración entradas y salidas input clk, rst; input [3:0] coin; output [3:0] val; reg [3:0] val; reg [3:0] nval; always @(posedge clk, negedge rst) if(rst == 0) val <= 4'b0000; else val <= nval; always @(val) nval <= val + coin ; endmodule
|
It , but I can't seem to find it for the life of me on the new Stack Overflow Jobs site.
|
There used to be an option to convert my stackoverflow careers profile to a PDF file, which is a great feature. However, I can no longer find an option to do this. Was it removed?
|
I recently discovered that the singular "band" can go together with plural verbs. "band goes on tour" gets 11,700 results on google while "band go on tour" gets 31,900 results. What's going on here?
|
I'd say Microsoft have a way of bending the rules and I know that McLaren have won the championship. While this sounds strange, I believe it is correct English (sorry, I'm not native). But when it's a small company, would you still use it this way? Is a company always plural, or are small companies singular? I.e., would you say Bakery Johnson makes fine bread or Bakery Johnson make fine bread? Is it My book seller, Woody's, have moved or is it has moved?
|
i had these weird noise on my render i had changed render settings even every object material, and it's not solved Maybe anyone can help?
|
Since the Denoise feature was added to Blender I only use the default setting with it and it really does the work. But sometimes the denoise is noticable on some of my renders. How can I overcome the blurred effect? Denoising for me is a big help because my system is quite aged.
|
I am interested in finding all the questions I asked over the entire SE network that I don't yet have accepted an answer for. I have seen that there is another question for individual SE sites that recommends using the search functionality (), but I have 43 different websites that I've asked at least 1 question on (and there are probably others with even more profiles), so that doesn't really scale. Is there a global search option somewhere? Or another way to see all my unaccepted questions?
|
I mean to get back them, really I do. So, how can I view all my unaccepted questions across the Stack Exchange network? , but the stackexchange.com search doesn't work the same way (it searches for the text). Is there any way to do this?
|
tree and ls can distinct file types by coloring filenames differently. tree and ls often output a long list of files (including directories), so I pipe the stdout output to less. But less doesn't preserve the colors. How can we make it show colors, or some alternative ways? Just saw the linked list, but piping to less -R or less -r doesn't work. My OS is Ubuntu 12.04. less is Version 444: 09 Jun 2011.
|
I get colored tree using tree -C but when I pipe it to less I get results like this: tree public/ -C | less How can I have colors in less in this case?
|
In the Java world, is there any standard or convention for naming variables that have conflicts with the language itself? For example, a variable/parameter of type Class can't be named class. I've seen clazz used, but in my opinion that is a bit obnoxious; however, if that is the norm I can join that bandwagon. C# has the ability to prefix an @ in front of a variable so @class is valid, but to my knowledge Java has no such equivalent.
|
Is there any tricky way to use Java reserved words as variable, method, class, interface, package, or enum constant names?
|
How to calculate the age of the user inside a SQL query. Be aware I splitted the database into the fields: birthday, birthmonth and birthyear. I created a to show what I mean. CREATE TABLE IF NOT EXISTS `user_profile` ( `user_id` int(11) NOT NULL AUTO_INCREMENT, `user_birthday` tinyint(4) NOT NULL, `user_birthmonth` tinyint(4) NOT NULL, `user_birthyear` smallint(6) NOT NULL, PRIMARY KEY (`user_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; INSERT INTO `user_profile` (user_birthday, user_birthmonth, user_birthyear) VALUES (31, 12, 1990)
|
What would be the best way to calculate someone's age in years, months, and days in T-SQL (SQL Server 2000)? The datediff function doesn't handle year boundaries well, plus getting the months and days separate will be a bear. I know I can do it on the client side relatively easily, but I'd like to have it done in my .
|
Above on the left is what my current table of contents looks like in a paper I'm writing and I really wish I could indent subsections like I showed on the right side (which I admittedly just did in Paint by moving them all over 16px, which seems like the ideal amount). Would anyone know how I could incorporate this into my paper? Here is the smallest MWE I could manage: \documentclass[10pt,article]{amsart} \begin{document} \tableofcontents \section{Section A} \subsection{Subsection (16px Indent)} \subsection{Subsection (16px Indent)} \section{Section B} \subsection{Subsection (16px Indent)} \subsection{Subsection (16px Indent)} \end{document}
|
I used AMS LaTeX template with gsm-l package to write my teacher's book. The table of content that produced has the following form: in which 1, 2, 3.... are sections and 3.1, 3.2, 4.1, 4.2,.... are the subsection. I want to indent the subsection with respect to the section, like this (it's ok without dots, though):
|
I have been going through the questions on iteration through lists of unequal lengths, like this , but I have been unable to find one which addresses my exact requirements. I have two lists of unequal lengths: list_1 = ["dog", "cat"] list_2 = ["girl", "boy", "man", "woman"] if I want to iterate through the lists of different lengths, I can use itertools zip-longest function as follows for pet, human in zip_longest(list_1, list_2): print(pet, human) The output I get is as follows: dog girl cat boy None man None woman Question: What would I do if I wanted the iterator to output the following: dog girl dog boy dog man dog woman cat girl cat boy cat man cat woman That, is in the iteration, I want to "combine" each element of list_1 to each element of list_2. What would I do?
|
How can I get the Cartesian product (every possible combination of values) from a group of lists? Input: somelists = [ [1, 2, 3], ['a', 'b'], [4, 5] ] Desired output: [(1, 'a', 4), (1, 'a', 5), (1, 'b', 4), (1, 'b', 5), (2, 'a', 4), (2, 'a', 5) ...]
|
Does jQuery make any version-to-version compatibility guarantees? For example following or do you just have to read the release notes every time? Note: I have seen that ask how good compatibility has actually been. This question is strictly about the promises made by the project.
|
We have had issues with Mootools not being very backward compatible specifically in the area of drag and drop functionality. I was wondering if anyone has had any similar problems with jQuery not being backward compatible. We are starting to use it quite heavily and are thinking about upgrading to a newer version to start using several plugins that require it. Will we have any issues if we get rid of the older version?
|
I have this query( the parameters of the query are given by input: both table and name and password are string given by text field. //... ResultSet rs = st.executeQuery("select * " + "from `"+ table + "` " + "where Name='" + name + "' " + " and Password='" + password + "'"); and after this i don't understand why i can't enter in this if: else if (table=="products"){ // ... } and therefore I can not go along with the program
|
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?
|
Wikipedia says that it is a idealized or physical device that implements the Boolean function. By this definition I tend to think every digital circuits (say a counter or encoder) as a logic gate. But it also says that "Logic circuits include such devices as multiplexers, registers, arithmetic logic units (ALUs), and computer memory, all the way up through complete microprocessors, which may contain more than 100 million gates". So according to this every complex digital circuit is not an logic gate but they are made up of logic gates. Then I confused by the definition of logic gates. If multiplexer is not a logic gate then I tend to think XOR gate also not as logic gate. Can anyone explain this?
|
So from what I understand transistors are one of the most important electronic elements for computers because of TTL (Transistors-Transistors Logic). Is this true? If so, how exactly does this work? I have heard the terms "logic gate" and "logic block" tossed around.
|
Whenever I zoom out there would be a black screen constantly following me. The more it zooms out the more I cant see my model
|
I have created a simple model here When rendering it the end of it is cut off How can I get the camera to render a longer distance?
|
You probably know both "Householder" and "Eigendecomposition", but do you really know how it works geometrically? I got stuck in question asks me to provide the eigen decomposition of householder operator H=I-2ww* where ‖w‖=1, geometrically! I know that the eigen-values are [-1, 1 ...1] but I cannot understand about the eigen-vectors and in particular I cannot depict the solution, geometrically! Can anybody possibly help me to understand it through drawing a geometrical interpretation? Thanks
|
Define the eigen decomposition of householder operator $H=I-2ww^*$ where $\vert\!\vert w\vert\!\vert=1$, geometrically! I know that the eigen-values are $[-1, 1 \dots 1]$ but I cannot understand about the eigen-vectors and in particular I cannot depict the solution, geometrically! Can anybody possibly help me to understand it through drawing a geometrical interpretation? Thanks alot
|
According to , the following estimator of the standard deviation $$s=\sqrt{\frac{1}{n-1}\sum_{k=1}^n(x_i-\bar{x})^2}$$ for a normal variable, verifies $E[s]=C_4(n) \sigma$, where $$ C_4(n) = \sqrt{\frac{2}{n-1}}\cdot\frac{\Gamma(\frac{n}{2})}{\Gamma(\frac{n-1}{2})}=1 - \frac{1}{4n} - \frac{7}{32n^2} - \frac{19}{128n^3} + O(n^{-4}) $$ Therefore we have an unbiased estimator for the standard deviation of a normal variable, $$\hat{\sigma}_\text{unbiased} = \frac{1}{C_4(n)} \sqrt{\frac{1}{n-1}\sum_{k=1}^n(x_i-\bar{x})^2}$$ How could you prove this?
|
According to the Wikipedia article on the sample SD $$s = \sqrt{\frac{1}{n-1} \sum_{i=1}^n (x_i - \overline{x})^2}$$ is a biased estimator of the SD of the population. It states that $E(\sqrt{s^2}) \neq \sqrt{E(s^2)}$. NB. Random variables are independent and each $x_{i} \sim N(\mu,\sigma^{2})$ My question is two-fold: What is the proof of the biasedness? How does one compute the expectation of the sample standard deviation My knowledge of maths/stats is only intermediate.
|
I've been handed some off the shelf meshes to use and I'm finding a number of them have really dirty geometry which is causing an issue with rendering them in (three.js). Screen shot of the geometry mesh can be seen here: actual mesh can be downloaded here The problem is when using THREE.SmoothShading the bad geometry shows up. Is there a tool that can fix a mesh so the polys are equally spaced etc?
|
I have a mesh with tons of ngons, non-manfold stuff, poles, and a decent amount of tris. Should I just give up on the mesh, or can I somehow rescue it?
|
Yesterday I made my flash drive Ubuntu bootable using Rufus. The operation of making it bootable was successful but when I ejected the flash drive from that computer it stopped working. It is not showing up in the Boot Menu or My Computer or Disk Management in any computer. I can only see the flash drive in the Device Manager as Unknown USB Device(Device Descriptor Request Failed). Is there any way to fix my flash drive?
|
I have a USB flash drive which is no longer recognized by my computer. Windows Disk Management and DiskPart report No Media with no storage space (0 bytes) on the drive and I cannot partition or format the drive: If the drive appears in Windows Explorer, trying to access it returns an error message indicating that there is no disk inserted, such as the following: Please insert a disk into drive X:. Various disk partitioning and data recovery utilities don't recognize the drive or only give a generic name for the drive and cannot access the contents of the drive. What can I do? How do I recover data from the drive? This question comes up often and the answers are usually the same. This post is meant to provide a definitive, canonical answer for this problem. Feel free to edit the answer to add additional details.
|
I'm looking for recommendations on how best to abbreviate the following demographic income range: 1 below 3,000,000 Japanese yen (JPY) 2 between 3,000,000 and 4,999,999 JPY 3 between 5,000,000 JPY and 7,999,999 JPY 4 8,000,000 JPY and above Would it be correct to rewrite as: 1 below 3M JPY 2 between 3M and 4.9M JPY 3 between 5M and 7.9M JPY 4 8M JPY and above Should the M for million be in caps or lower case, and should there be a space between the number and the m?
|
When specifying a range of values that have a unit of measure associated with them, what is the best practice for where to include the unit of measure? 1lb - 20lb Or 1 - 20lb And how would this apply when using metric prefixes? 1KΩ - 20MΩ Or 1K - 20MΩ
|
im trying to rig the character of Lol Ahri in Blender 2.9, i want her to walk and wave. I downloaded the object(ahri), and used the basic human armature. But when i try to parent the model with the rig, it shows me the error "Bone Heat Weighting: failed to find solution for one or more bones". I tried to use automatic weigths So i started looking for solutions, this is what i tried: MERGE BY DISTANCE (or remove doubles), scaled up, decimate geometry, delete loose, remove all modifiers, any of the bones are showing off, just using a single bone, changed the merge distance to 0.002, and placed the root bone at the center of the model. the link to the project is: if you could help me i would be very grateful :)
|
Here it goes again, the rigging error. I have a model that has a mirror modifier already applied and a subsurface and displace modifier (not applied) in my model. So when I try to parent my model to my armature it gets the bone heat error message, but before I applied the mirror modifier it worked, although the bones only work on the left side and the right side didn't work at all. Solutions I have tried: Remove doubles (doesn't work) Recalculate (doesn't work either) Remove all modifiers (no luck) Place the root bone at the center of the model (still get the error) Apply the subsurface modifier and parent them (no result) Apply the decimate planar modifier (this works, but the decimate modifier destroys my seam marked on my model, which causes my displace modifier to not function well because I baked my displace map with another model that has a multiresolution level of four). blender file: I have the unapplied mirror modifier model in layer 3 and applied mirror modifier model in layer 1.
|
I installed Ubuntu 20.04 on my DELL G3 (now upgraded to 20.04.2). Everything worked fine, but after installing my graphics card driver (460) the background became fuzzy (Nvidia 1650Ti). I downloaded the driver through Additional Drivers. It was using Nouveau before. Laptop Specifications: Dell G 3 (2019) NVIDIA (1650 Ti) 460 driver Ubuntu (20.04.2) After turning on I have to change the wallpaper to remove those fuzzy things. I have tried using wallpaper with less / more memory but there was no change. Also tried changing resolution, but no change. Sometimes even font appear distorted in the same way. Please suggest proper solutions. Wallpaper without distortion (after changing wallper to default): Wallpaper after restarting laptop:
|
I have recently upgraded Ubuntu 19.10 to latest LTS Ubuntu 20.04. After updating, I get serious artifacts on my screen. Every time I reboot (or log-in), my screen is fuzzy or scrambled (picture attached): This is temporary. The fuzzy screen goes away when I change the background. But it reappears the moment I reboot or log back in. I have Intel HD Graphics 520 (Skylake GT2). The output of lspci -nn |grep -E 'VGA|Display' is: 00:02.0 VGA compatible controller [0300]: Intel Corporation Skylake GT2 [HD Graphics 520] [8086:1916] (rev 07) Update: On enabling Wayland in Ubuntu 20.04 and logging in to, these artifacts are however cured. This is okay for now, but I am not sure about Wayland as I have not yet used it before. Is there a way to correct the graphic issue with normal Ubuntu startup?
|
I was sitting on my chair in office when my cell phone rung. Somebody was calling me, so there was a caller tune which was played. But then I realized my speakers were producing strange sound when my phone was ringing. My friend said It was because of disturbance produced by radiowaves. But even he was not sure why it happened. Do anybody know the possible cause that made speakers make strange noise. It only happens when there is a call or message on my cell phone, not when I play any song etc on phone
|
Once I had kept my cellphone near a computer speaker. After some time, a call came over my phone. Strangely, the speaker started humming and beeping till I received it. Why did the speaker started humming when the call came?
|
I make frequent use of Win+L, which will lock my computer and prompt me to enter my password to unlock it. This is to prevent other (mischevious) people from doing anything while I am away. However, it is still possible to mess with the computer in this locked state. One can access the Ease of Access Center from the lock screen, which looks like this: (Click image to enlarge) They can then turn on Narrator (read everything), Magnifier (magnify the area around your cursor), High Contrast (make the colors of the UI strange), On-Screen Keyboard (open up an annoying keyboard in a window), Sticky Keys (ctrl, alt, win, etc. "stick" so you can press one at a time), and Filter Keys (ignore keys pressed multiple times in a row). These settings are quite annoying by themselves, and activating all of them at once is even more so. Is there any way to completely lock the computer, so that the only possible action is to enter a password?
|
Question refers to Windows 7 Professional 64-bit. When I lock my computer I don't want people to be able to mess about with it, so would like the Ease of Access button (in the bottom left corner of the logon screen) to either be removed or disabled. Does anybody know how to do this? Thank you for your help :-)
|
I was working through the lab on ridge regression and LASSO in ISLR and I came across a strange behavior in the cv.glmnet function. When I followed the lab as written I got the following set.seed(1) train <- sample(1:nrow(x), nrow(x)/2) test <- (-train) y.test <- y[test] set.seed(1) cv.out <- cv.glmnet(x[train,], y[train], lambda=grid, alpha=0) plot(cv.out) bestlam <- cv.out$lambda.min bestlam [1] 231.013 For my own benefit I tried it using a different seed (8675309) and got back a different result. Any combination of setting the seeds resulted in different answers. I am assuming this has to do with how the 10-folds are changed with the different seeds, however the different lambda.min can vary so much I am concerned the package might not be stable. Am I missing something?
|
I am using cv.glmnet to find predictors. The setup I use is as follows: lassoResults<-cv.glmnet(x=countDiffs,y=responseDiffs,alpha=1,nfolds=cvfold) bestlambda<-lassoResults$lambda.min results<-predict(lassoResults,s=bestlambda,type="coefficients") choicePred<-rownames(results)[which(results !=0)] To make sure the results are reproducible I set.seed(1). The results are highly variable. I ran the exact same code 100 times to see how variable the results were. In the 98/100 runs had one particular predictor always selected (sometimes just on its own); other predictors were selected (co-efficient was non-zero) usually 50/100 times. So it tells me that each time the cross-validation is running it's going to probably select a different best lambda, because of the initial randomization of the folds matter. Others have seen this problem () but there isn't a suggested solution. I am thinking that maybe that one which shows up 98/100 is probably pretty highly correlated to all the others? The results do stabilize if I just run LOOCV ($\text{fold-size} = n$), but I am curious why they are so variable when $\text{nfold} < n$.
|
I have a problem regarding the size conversion from the legend elements tab an the actual legend.
|
After I did styling my vector data set to be classified by graduated circle and categorized by type, it appears beautifully consistent in the map canvas as shown below: But when I create a print map layout and after adding the map, I add the legend and it come out ugly inconsistent like this: So, I would like to ask for help to make the legend in the map print layout consistent as the legend shown in layer panel. I use the latest version QGIS 3.10.2 64bit.
|
There is always an injection between $V^* \otimes V^*$ and $(V \otimes V)^*$ given by $$ f(v^* \otimes w^*)(x \otimes y)=v^*(x)w^*(y), $$ where $x,y \in V$. I've been given to understand that in infinite dimension it is not surjective. Does anybody can explain me why it is the case? Does anybody have a concrete and simple example where $V^* \otimes V^*$ is not isomorphic to $(V \otimes V)^*$ Edit. This problem is involved in basic theory of Hopf Algebra since the fact that in infinite dimension $V^* \otimes V^*$ is only a proper subset of $(V \otimes V)^*$ is the key point for which the dual of a co-algebra is an algebra, but in general the dual of an algebra is not a co-algebra. Second Edit The answer given doesn't seem to answer my question as the answer of Mariano does. So even if the question may seem a duplicate, the answer is not. And as Hardmath notes "the proposed duplicate does not restrict to the tensor product of a vector space with itself, and indeed the answer given there involves one factor being the dual of the other factor. It doesn't address the problem here."
|
Let $V$ and $W$ be vector spaces (say over the reals). There is a linear injection $V^* \otimes W^* \to (V \otimes W)^*$ which sends $\sum_i f_i \otimes g_i \in V^* \otimes W^*$ to the unique functional in $(V \otimes W)^*$ sending $v \otimes w \mapsto \sum_i f_i(v) \cdot g_i(w)$ for all $(v,w) \in V \times W$. In the finite dimensional case it is easy to see this is an isomorphism by comparing dimensions on both sides. I'm aware that this is not an isomorphism in the infinite-dimensional case (see Relation with the dual space in the on tensor products) but I must admit that I'm not sure why. Cardinal arithmetic does not seem help here and, even if it did, I would be much happier to see an explicit example of a functional in $(V \otimes W)^*$ outside the range of this map. I'm having trouble cooking one up myself. Added: Let me elaborate on my comment about cardinal arithmetic. Suppose that $X$ and $Y$ are infinite dimensional vector spaces over a field $k$. I'm confident that $\dim (X \otimes Y) = \dim X \cdot \dim Y$ holds. It is clear that $|X^*| = |k|^{\dim X}$ since we may identify a functional on $X$ with a function from a basis for $X$ to $k$. Also I think I've convinced myself that if $\dim X \geq |k|$ then in fact $|X| = \dim X$ ie. the cardinality and dimension of a vector space agree when the dimension is larger than the cardinality of the ground field. Consequently, assuming say that $|k| \leq \dim X \leq \dim Y$ it seems we have $$ \dim(X \otimes Y)^* = |k|^{ \dim X \cdot \dim Y} = |k|^{ \dim Y} = \dim Y^* = \dim X^* \cdot \dim Y^* = \dim (X^* \otimes Y^*)$$ which implies that in fact $(X \otimes Y)^*$ and $X^* \otimes Y^*$ are isomorphic but, rather frustratingly, the obvious map does not do the job. Did I make a mistake here? If not, is it generally true (ie without making assumptions about $|k|$) that there exists some isomorphism $(X \otimes Y)^* \to X^* \otimes Y^*$?
|
In my job we are not guaranteed to keep using the same computer forever. Also, I need to keep the files at arm's reach when traveling. This is screaming a "cloud" solution, but here in Brazil mobile connectivity is still an issue, and relying on company networks there is always the firewall and network policy issue, so cloud is no-go. So I started using a 16GB flash drive to store all my personal and work documents. But I am afraid someday the thumb drive will die on me and I will lose everything. Also I have a hard time when I forget it at home and can't access my files. So I am looking for some utility/script that will run on my home and work computers and whenever I connect the thumb drive, it detects it as my thumb-drive and synchronizes with folders on the computer, kinda like rsync. These are the needed features: Securely recognizes the thumb-drive (using a special "key" file or volume serial numbers) Update only modified files (no dumb-copying, as it's several GB) If a file was modified on both on the thumb-drive and the computer, ask for which one to keep. I may choose which folders to sync (do not want to sync the music folder, for example) Non-annoying operation, just ask for a decision on conflicts if needed (but a progress indicator would be nice). Desirable but not required, are syncing being done automatically before removal (instead of at insertion). Is there a ready-made Windows tool for this job? This could be pulled out with a batch file but I wanna know if there is something on the market already. Thanks! Update for future viewers.. SyncToy is very good, but has the flaw of needing Administrator account for installation. I needed to sync with na old XP work computer, with limited permissions. I've settled for Unison . It is a command-line app, but matches all my requirements, and does not need to be installed.
|
I know there is a similar topic on syncing between computers, but I'm looking for an application to run on one computer that will sync a "document/file" folder with a folder on my secondary/external USB drive. What would be the best solution? I know I could use Dropbox & Live Mesh, but they use up bandwith which isn't very good when I drop in a lot of large files. I'm running Windows 7, but I assume any solution for Windows Vista would work just fine.
|
Suppose I have two files named a.txt and b.txt. Is there any way to use all the contents of file a.txt to use as patterns for grep command if I want to search in file b.txt? General format of grep is: grep 'pattern' 'filename'
|
I have a couple of big text files and in the file UNIQS.txt I have a list of strings to grep from another file. The code I use is grep -f UNIQS.txt EEP_VSL.uniqs.sam > UNIQ_templates.sam which does nothing - the file generated is empty. But when I do grep -F -f UNIQS.txt EEP_VSL.uniqs.sam > UNIQ_templates.sam it works correctly. This confuses me because I didn't think grep would interpret the entries in UNIQS.txt as regexp patterns without quotes and slashes and so on being in the file (which there aren't). Is it the case in general that if you are getting the patterns from a file then it will automatically think that they are regexp patterns? Edit: In the UNIQS.txt file, there are newline separated strings of the form HWI-ST365:215:D0GH0ACXX:2:1101:10034:186783 (called template names) and the file EEP_VSL... tab separated columns, with about 14 columns and the first column is the template name, so basically I want to extract the line corresponding to each template in the file.
|
I'm not really sure on how to go about solving this problem... Consider the initial value problem. $$y' (x) = \frac{1}{2}(-x + \sqrt{x^2 + 4y})$$ $$y(2) = -1$$ $a)$ Show that $y(x) = 1-x$ and $y(x) = -\frac{x^2}{4}$ are two solutions to the above IVP.
|
Prove that the solutions $y_1$ and $y_2$ for the initial value problem $y'=$${-x+\sqrt{(x^2+4y)}}\over 2$ , $y(2)=-1$ are: $y_1=1-x$ $y_2={{-x^2}\over 4}$ And explain why the two solutions not contradiction with the theory of existence and uniqueness. ( sorry I don't speak English well ) My answer: For the initial condition : $y_1=1-x$ Satisfy the initial condition $y(2)=-1$ $y_1=1-2=-1$ And Satisfy the differential equation ${y_1}^{\prime}=-1$ ${{-x+\sqrt{x^2+4y}}\over 2}={{-x+\sqrt{x^2+4(1-x)}}\over 2}$ $={{-x+\sqrt{(x-2)^2}}\over 2}$ $={{-x+x-2}\over 2}=-1$ L.h.s.=R.h.s. $y^{\prime}={{-x+\sqrt{x^2+4y}}\over 2}$ Also $y_2$ Satisfy the initial condition $y_2={{-x^2}\over4}={-4\over4}=-1$ And satisfy the differential equation. $y_2^{\prime}={-x\over 2}$ ${{-x+\sqrt{x^2+4y}}\over 2}={{-x+\sqrt{x^2+4({-x^2\over 4})}}\over 2}={-x\over 2}$ And for second part of exercise: ${\partial f\over \partial y}={1\over \sqrt{x^2+4y}}$ and this not defined when $x=2, \ y=-1$ So $f(x,y)$ no satisfy lipshtize condition in any rectangular has (2,-1), Lipshtize condition including uniqueness of solution, so no contradict with the existence and uniqueness. True ? If this also wrong I well be delet it , I answered by the same way of my teacher :(
|
Consider an Angular app with many user inputs over screens A, B and C. Screen C needs valid inputs from A and B; B from A only; and A is independent. Suppose while on screen B the user enters invalid inputs. Question: What navigation should I support for B in this case? My current thinking is to disallow navigation to C due to data validity issues. But what about navigating back to B? On the one hand, there are no validity issues, and the user may want to look up screen A to help with screen B inputs. On the other hand, this would complicate the app's state management. An alternative is to disallow such navigation, possibly with an option to restore the last valid inputs at B. As I lack experience in UX, I'd appreciate answers to help me with this trade-off.
|
Scenario: User makes a series of entries in text fields on a page that requires apply/cancel buttons. Invalid entries are flagged with an error icon and hover-over tooltips that explain the validation error. The "apply" button remains disabled until all fields are valid; users cannot apply invalid entries BUT the user is still able to navigate away to another page of the software, at which point they receive a dirty flag notification: "You have changed some settings blah blah, would you like to apply them before leaving this page? (Apply/Don't Apply/Cancel)" Problem: How do we handle the case where the user clicks "Apply" in the dirty flag dialog while they still have invalid entries? Considered solutions: After they click "apply", they receive an error dialog stating "Some settings are invalid, could not apply" and the invalid entries are rejected, reverting the fields to their previously saved states. After user closes error dialog, they move to their destination page. We include a message in the dirty flag dialog along the lines of "Only valid entries will be applied, invalid entries will be reverted to last state." When the user clicks "apply" in the dialog, they move to the destination page and only valid entries are applied Before the dirty flag dialog even appears, the user receives a notification dialog stating "Some entries are invalid, please fix before continuing." They fix the invalid fields and try to leave the page again, at which point they encounter the dirty flag dialog. We're in a conundrum about which solution is the most elegant. This whole situation is awkward to begin with, considering the few cases where a user would try to leave a page without applying their changes... But yeah, which of these, or others, would best be the most appropriate solution for us?
|
Dumbledore said that Harry must die, and Voldemort himself must do it. If that were to happen, and Harry was to actually permanently die, how would Voldemort be killed?
|
‘So the boy ... the boy must die?’ asked Snape, quite calmly. ‘And Voldemort himself must do it, Severus. That is essential.’ Deathly Hallows - page 551 - UK Hardcover - chapter 33, The Prince's Tale Dumbledore tells Snape it is 'essential' that Voldemort be the one to kill Harry, I'm assuming in order for the piece of Voldemort's soul in Harry to be properly killed as well. But why? Hermione destroyed the Hufflepuff cup; Ron destroyed the Slytherin locket; Neville killed Nagini; Harry destroyed the diadem and Tom Riddle's diary. So the Horcruxes were not immune to destruction at the hand of someone other than Voldemort. And as it ended up, Harry himself wasn't even a Horcrux, but rather just an unknowing host to a parasitic bit of Voldemort's soul. Why was it 'essential' that Voldemort be the one to kill Harry in order for the piece of Voldemort's soul to die?
|
I am sure that this has been discussed many times and the answer may be trivial. But I was confronted with the following issue and could not give a satisfactory answer: $$1=(-1^{6})^{\frac{1}{2}}=-1^{6\cdot\frac{1}{2}} = -1^{\frac{1}{2}\cdot 6}=(-1^{\frac{1}{2}})^6 = (\sqrt{-1})^6.$$ On the left handside of the chain, we have $1$, and on the right handside, we have the square root of a negative number, which is not defined with real numbers. Also moving towards complex numbers does not seem to help, as $$(\sqrt{-1})^6 = (\sqrt{i^2})^6 = i^6 = (i^2)^3 = (-1)^3 = -1.$$ Where is the mistake or the step that is not allowed?
|
I know there is something wrong with this but I don't know where. It's some kind of a math fallacy and it is driving me crazy. Here it is: $$-1= (-1)^3 = (-1)^{6/2} = \sqrt{(-1)^6}= 1?$$
|
I have a page that lists posts grouped by category. Here is the current code: <?php $cats = get_terms('category'); foreach ($cats as $cat) { $cat_id= $cat->term_id; echo "<h2>".$cat->name."</h2>"; $custom_query = new WP_Query( array( 'cat' => $cat_id, 'post_type' => 'my_post_type', 'posts_per_page' => -1, 'orderby' => 'title', 'order' => 'ASC' ) ); ?> <ul> <?php if ($custom_query->have_posts()) : while ($custom_query->have_posts()) : $custom_query->the_post(); ?> <li><a href="<?php the_permalink();?>"><?php the_title(); ?></a></li> <?php endwhile; endif; ?> </ul> <?php } ?> Is there a more efficient way to do this without so many queries? I found this related question: . However, I'm not sure how to implement Milo's suggestion or if it would be applicable.
|
I am looking for a solution that allows me to print the following: Cat 1 Cat 2 Cat 3 Post 1 Post 1 Post 1 Post 2 Post 2 Post 2 Post 3 Post 3 Post 4 EDIT I am looking for something that will only require one database query! So if you have a foreach in your code followed by a new WP_Query then that is not what I am looking for (I am planning to put this onto my website's homepage).
|
If you have 2 mirrors over for each other placed exactly so they face each other perfectly, and then use a laser light pen as the source into one of the mirrors so it bounces to the other mirror and back again: Would the laser light line continue to exist between the 2 mirrors if the source of the laser stopped? If so, how long could the laser light continue to be between the mirrors without a source? Would it just continue existing between the mirrors using itself as the source or is this not possible for light? Note: It doesn't have to be only 2 mirrors. It could be any amount of mirrors if that would change the outcome.
|
As written in the title it's a somewhat rhetoric question, so let me be more clear. Let's say I have two mirrors facing each other. They are perfectly aligned and perfectly reflective. I'm looking through one of them (using the one-sided mirror effect) and see what seems to be infinite reflections. If I look closely at the vanishing point, I obviously can't see very well what goes on there, because the reflections are too small. My question is, are there other limitations? a) If I look close enough to the vanishing point, is there a point at which the light would have to travel too much distance to reach me that no photon would actually make it? b) If I start looking immediately after turning on the light, it should take a tiny amount of time until all the reflections are created, i.e., it takes time for light to do all the back and forth trips it takes to create the very small images. How good a microscope (telescope?) would I need to be able to see the image being created? That is, to look at a spot and see nothing, and then some epsilon of time later see an image appear.
|
Hello ladies and gentleman, I'm trying to figure out how this circuit works : I was thinking it is a kind of charge controler where Rx is the load. Any help would be pleased
|
I have used the above simple circuit for a constant source where \$V_{\text{in}} = -5\$V, \$R_{\text{in}} = 390\Omega\$, \$R_f\$ is the load which ranges from \$110\$ to \$170\Omega\$....would using this circuit for a constant current source for the load be recommended? As current $$i = -\frac{V_{\text{in}}}{R_{\text{in}}}$$ $$V_{\text{out}} = -V_{\text{in}}\frac{Rf}{R_{\text{in}}}$$ so it should serve as a constant current source, but while browsing the Internet for a constant current source I typically found these sorts of circuits: Is there a compulsion to include the transistor in my circuit? If yes, why wouldn't my circuit serve the purpose for producing a constant current?
|
My system is booting from the USB drive the problem is that after booting it shows the menu to select an option. And on selecting any option it leads to a blank screen. I am trying to boot Ubuntu 18.04 from a USB live stick. I waited for about half an hour too after selecting install Ubuntu option, but it's not working. I have Dell Vostro 3568 8GB RAM, i5 7gen with AMD Radeon. I have made the live USB from startup disk creator which is preinstalled in Ubuntu.
|
I have HP G56 laptop and it originally came with Windows 7 which microsoft updated to windows 10 for free. I did clean install and so i don't have option to go back to windows 7. I want to try Ubuntu as after upgrading to windows 10, my laptop runs slow. I have created bootable USB several times but can't make my laptop to boot. I saw tutorials and already setup bios to boot from USB first and also turnoff fast boot from power option. I can however use other USB for windows 10 that i have and that works but not from Ubuntu USB
|
I prepared a Windows 7 ISO file, bootable pendrive by using DISKS. Here's my system configuration. Currently Ubuntu is running on my system (only one OS) When I am trying to install the Windows 7 using a penddrive, it is showing no device is found. But am able to view the pendrive data/details once I'm logged into the system. Is this problem due to partition issues? Please give some guidance/suggestions on how to install Windows 7.
|
I'd like to create a Windows bootable USB stick, but I don't have a Windows machine with me at the moment to do so. How could I achieve the same using Ubuntu?
|
I did: $$105 = 4*26+1\\ 1 = 105*1-4*26$$ So the inverse should be 5 as it is $\equiv 1 \pmod 4$ but it's 1. Why?
|
I did: $$gcd(84,5) = \\ 84 = 5*16+4 \\ 5=4*1+1$$ $$4 = 84-5*16 \\ 1 = 5-4*1 \\ 1 = 5-(84-5*16)\\ 1 = 17*5-1*84$$ So the answer should be $1$ but it's 4, what went wrong?
|
I have tried to understand what is causing my getTeamId() method in my entity return null, but I can't seem to crack the code. I have attached my adapter class, entity class and the exception thrown. Entity Class TeamEntity @SerializedName("idTeam") private String teamId; public String getTeamId() { return teamId; } public void setTeamId(String teamId) { this.teamId = teamId; } And in my adapter class I have the following, it says team is null do i need to add something to it? public class MatchAdapter extends RecyclerView.Adapter<MatchAdapter.ViewHolder> { private Context context; private TeamEntity team; private List<MatchEntity> matchList; public MatchAdapter(Context context, TeamEntity teamEntity) { this.context = context; this.team = teamEntity; matchList = new ArrayList<>(); } public void setList(List<MatchEntity> matchList) { this.matchList.addAll(matchList); Collections.sort(this.matchList); //date order notifyDataSetChanged(); } public void updateMatch(MatchEntity match) { matchList.set(matchList.indexOf(match), match); notifyItemChanged(matchList.indexOf(match)); } @NonNull @Override public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.display_match_items, parent, false); return new ViewHolder(view); } @Override public void onBindViewHolder(@NonNull ViewHolder holder, int position) { MatchEntity match = matchList.get(position); holder.bind(match); } @Override public int getItemCount() { return matchList.size(); } @Override public void onBindViewHolder(@NonNull ViewHolder holder, int position) { MatchEntity match = matchList.get(position); holder.bind(match); } void bind(MatchEntity match) { String homeTeam = match.getHomeTeam() != null ? match.getHomeTeam() : ""; if (team.getTeamId().equals(match.getIdGuestTeam())) { homeTextView.setText(homeTeam); } else { homeTextView.setText(guestTeam); } // Stack Trace java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.sportsapp.data.room.entities.TeamEntity.getTeamId()' on a null object reference at com.sportsapp.presentation.ui.adapters.MatchAdapter$ViewHolder.bind(MatchAdapter.java:118) at com.sportsapp.presentation.ui.adapters.MatchAdapter.onBindViewHolder(MatchAdapter.java:59) at com.sportsapp.presentation.ui.adapters.MatchAdapter.onBindViewHolder(MatchAdapter.java:27)
|
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?
|
Which one is correct way of asking question? a ) From which site you downloaded this file ? Or b) From which site did you download this file ? Similarly, a) From where you got my number? And b) From Where did you get my number?
|
What is the difference between the two following sentences? 1) Where did you save that file? And 2) Where you saved that file ?
|
I'm writing a for loop to iterate through the array and find the index of the employee with the social security number of 123456789. Why do I keep getting a NullPointerException? .getSocSecNum() returns a String empnew[21] = Empthe1; String temp = "123456789" for(int i = 0; i < empnew.length - 1; i++){ if(empnew[i].getSocSecNum().compareTo(temp) == 0){ System.out.println("the location of the employee is " + i); } } I want it to output "the location of the employee is 21" but all I get is a NullPointerException
|
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?
|
recently I upgraded my Ubuntu to 21.04 using dev channel: sudo do-release-upgrade -d (it was because I was curious of 21.04 and couldn't use -c flag because of ) where: -d, --devel-release If using the latest supported release, upgrade to the development release Now I wonder, am I using dev version of Ubuntu from now on? I would like to eventually use stable version of 21.04. How do I do that?
|
Update appear to have been updated recently (as of writing this the last update appears to have taken place on 3rd of June) to include the following statement: The -d switch is necessary to upgrade from Ubuntu 18.04 LTS as upgrades have not yet been enabled and will only be enabled after the first point release of 20.04 LTS. Also note that . TLDR (as of 15 Aug 2020): is the canonical tracking document for the first Focal Fossa point-release (20.04.1). It’s a live document. The Ubuntu release team will be updating it as we work on releasing 20.04.1. […] Upgrades from 18.04 to 20.04.1 are still disabled as we are working through a few upgrade blockers Edit The answers (so far) do not answer the question. The question is pretty simple. Ubuntu.com points to a "FinalRelease", which turns out to be a "Development Release", see evidence below. I'm not asking how and when to upgrade. I'm pointing out what seems to me to be an apparent inconcistency (in semantics, linguistics, logic) in the way Ubuntu names or labels its releases. From an answer to the question I'd except someone to pick up and acknowledge this inconsistency. An answer could start with a "Yes, ..." or a "No, ...", for starters. (Moreover, a good answer could distinguish between the release being in dev stage and/or the upgrade process (e.g. from LTS to LTS) being in dev stage, if appropriate.) This question, as I see it, is not a duplicate. Futher, I think it is a question which deserves a non-patronizing answer. Thanks. indicates that today (23rd April 2020) the new Ubuntu 20.04 LTS is to be released. See "condensed screenshot" here: Indeed, it seems that that's what happened, see and : However, when following the instructions to upgrade (from 18.04 LTS to 20.04 LTS) found and elsewhere (edit: actually , too!), even prior to the July point release, I'm a bit confused to see that the instruction is to use update-manager -d which also points to the "Development Release" (see screenshot below) rather than the "FinalRelease" (see screenshot and link above). Is the "Final Release" (which I'm after) the/a "Development Release"? Why isn't it called something like "Production Release" or "Final Release"? When will it no longer be referred to as "Development Release"? In July? I'm confused :(
|
Find all integer solutions of the equation $a^2+ b^2 + c^2=a^2 b^2$. This is one of the questions we presented in one session to contest preparation PUTNAM. It turns out that I can't get from the problem. Could someone just give me a hint? (Please, don't give me the answer. Simply, an argument that can help me advance in the problem or theorem might suffice.)
|
I am unfamiliar with this type of problem. How does one solve this and under what category of math does this fall under. Find the integral solutions for $x^2+y^2+z^2=x^2y^2$
|
Below is the extract from my book. There is a car with four wheel drive system and during acceleration, the engine causes the tires to push backward on the road surface. This push produces frictional forces $\vec{f}$ that act on each tire in the forward direction. The net external force $\vec{F}$ from the road, which is the sum of these frictional forces accelerates the car, increasing its kinetic energy. Here the author says frictional force produce acceleration. How can a frictional force produce acceleration in the car? The only possible explanation I can think that cause the car to moves forward in this case is when the tire pushes the road in backward direction and the friction force is the reaction force acting as mentioned in Newton's Third law.
|
When a car's engine injects fuel into the cylinder chambers, the reaction creates a force that generates rotational momentum to the shaft and over the transmission, it translates that power to the wheels, right? But, something's bothering me, how does the car actually move, is it dependent on the force of friction? Wheels have a contact with the road in one exact point and when the drive gets to rotate them, a force is exerted on the road in the direction of movement and there is friction that is counteracting it. Is the key to get a car properly moving to have the drive force equal or less than the force of friction to keep that point locked to the ground and use the rolling of the wheel for translational displacement ie. moving forward? If it's bigger than the force of friction, that would cause the wheels to spin in place? Am I completely off or am I getting something right? If there's a knowledgeable person on this topic, I'd greatly appreciate some insight, perhaps even a bigger response with some basic vehicle physics.
|
In Terraria, I am trying to get all of the Music Boxes. But, my luck has not led me to a Solar Eclipse. Is there a way to increase the chance of one happening?
|
Is any way to improve the chances of a solar eclipse happening (apart from killing the mechanical bosses). Basically I want to get broken hero swords to be able to forge the terra blade...
|
In a Google Sheet, I have multiple tables containing a list of dates. I want to create a single (sorted) list containing all the dates and the table they came from. Table foo: 1.1.19 3.1.19 Table bar: 2.1.19 4.1.19 Result: 1.1.19 foo 2.1.19 bar 3.1.19 foo 4.1.19 bar Is this somehow possible with regular formulas or do I need to switch to custom functions here?
|
I have two columns such as: a 1 b 2 c and I need to combine them like: a 1 a 2 b 1 b 2 c 1 c 2 Is it possible with a formula?
|
Can anyone tell me the maximum number of logical as well as the maximum number of physical processors supported in the latest release of Ubuntu? In the documentation online, I've found the 8 processor support for 32 bit, and 256 processors for 64 bit, but it is unclear whether it is referring to logical or physical processors. Thanks
|
I think this is kernel dependent and probably will change over time depending on the kernel a release uses, correct me if wrong I'd like to know two things for all the currently supported Ubuntu releases: How many maximum CPUs can Ubuntu handle (by default) at the same time with a standard desktop kernel? Is that count different from a server kernel and 32bit/64bit systems? Where can I find that information on my system?
|
Following I'm trying to get AMD Catalyst drivers installed using this command: sudo apt-get install fglrx fglrx-amdcccle But I'm getting... kayl669@kayl669-pc:/usr/share/ati$ sudo apt-get install fglrx fglrx-amdcccle Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies. fglrx : Depends: xorg-video-abi-11 but it is not installable or xorg-video-abi-12 but it is not installable or xorg-video-abi-13 but it is not installable or xorg-video-abi-14 but it is not installable or xorg-video-abi-15 E: Unable to correct problems, you have held broken packages. Being very new to Ubuntu I'm meeting a lot of frustration when trying to install things where it seems that there are dependencies which won't install for this reason. Perhaps somebody could suggest a general procedure to follow to get past this type of issue. What is the problem in general terms - a conflict or corruption? I'm actually using Lubuntu and my goal is to get a dual-monitors setup working. What should I try next in this instance? Thanks
|
When I run sudo apt-get install fglrx, I get the following output: Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help resolve the situation: The following packages have unmet dependencies: fglrx : Depends: xorg-video-abi-11 but it is not installable or xorg-video-abi-12 but it is not installable or xorg-video-abi-13 but it is not installable or xorg-video-abi-14 but it is not installable or xorg-video-abi-15 E: Unable to correct problems, you have held broken packages. Unfortunately I am used to working on windows servers and am not familiar with Ubuntu.
|
It suffices to show that any proper subspace M of X is closed, since if M is not proper the result is trivial. I am unsure how to approach this proof. Contradiction seems a little messy, as supposing M is not closed implies M is i.) open or ii.) neither closed nor open. Any help would be much appreciated.
|
I know that probably this question has already been answered, but I'd like to present my attempt of solution. Let $(E,\|\cdot\|)$ be a normed vector space and let $F\subseteq E$ be a finite-dimensional subspace. Suppose that $\dim_{\mathbb{R}} F=n$. First of all I proved the following lemma. Lemma 1 Every finite-dimensional normed vector space is complete. Then, I noticed that $(F,\|\cdot\|_{F})$ is a finite-dimensional normed vector space, where $\|\cdot\|_{F}$ is the induced norm. So, $F$ is complete by Lemma 1. Lemma 2 If $(E,\|\cdot\|)$ is a normed vector space such that $\dim_{\mathbb{R}}{E}=n$, then $E$ is algebraically and topologically isomorphic to $\mathbb{R}^{n}$. By Lemma 2, I can view $F$ as a complete subspace of $\mathbb{R}^n$ and, since $\mathbb{R}^n$ is itself complete, I can conclude that $F$ is closed. Here I used the fact that every complete subspace of a complete space is closed. Is there something wrong?
|
My first question. I have searched "effect size" and followed the links on "similar questions". There may well be a wealth of relevant info there, or even the answer; my problem is that the discussion is way over my level of understanding. Apologies if that means this is in some way duplicate. I'll try to describe what I'm trying to work out. If the answer is already floating around, it'd be wonderful if someone could point me at it and dumb it down into language that a stats layman can follow! I've got data about the population of England, carved up into Local Authority areas (i.e. geographically) - there are 127 rows of info. For each row, I have: the size of the population of interest (over 60s) a score 1-5 for deprivation a categorization of policy 1, 2 or 3. (1 is "no policy"; 2 is "accessible for free"; 3 is "pay for access") a frequency rate of an occurrence/100,000 of the population of interest. So a record might be: Bristol; 2; 1; 1,300 Happy to post all 127 rows if helpful! Some excellent help elsewhere has got me to the point where I know that the groups by policy are significantly different (p<0.01). So policy makes a difference. This used ANOVA (but not by me!). I also know that deprivation correlates somewhat with frequency (R^2=0.25 apparently) What I'm trying to get is how much of the total variation in the whole dataset is accounted for by policy, how much by deprivation, and how much by other factors as yet unspecified. I want to be able to say "Group 1 is different to group 2 and group 3, and the policy accounts for X% of the overall variation, whilst deprivation accounts for Y%". My knowledge is very limited. I can calculate weighted means...but I'm not even clear if my standard deviation calculations are right, because the populations are all different sizes. I'd be very grateful for any help you might be able to offer, but it will need to be at a "add/subtract" level of complexity - I don't have the foundation tools to follow anything sophisticated unless it's broken down to basics. Thanks again
|
I have just read a paper in which the authors carried out a multiple regression with two predictors. The overall r-squared value was 0.65. They provided a table which split the r-squared between the two predictors. The table looked like this: rsquared beta df pvalue whole model 0.65 NA 2, 9 0.008 predictor 1 0.38 1.01 1, 10 0.002 predictor 2 0.27 0.65 1, 10 0.030 In this model, ran in R using the mtcars dataset, the overall r-squared value is 0.76. summary(lm(mpg ~ drat + wt, mtcars)) Call: lm(formula = mpg ~ drat + wt, data = mtcars) Residuals: Min 1Q Median 3Q Max -5.4159 -2.0452 0.0136 1.7704 6.7466 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 30.290 7.318 4.139 0.000274 *** drat 1.442 1.459 0.989 0.330854 wt -4.783 0.797 -6.001 1.59e-06 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 3.047 on 29 degrees of freedom Multiple R-squared: 0.7609, Adjusted R-squared: 0.7444 F-statistic: 46.14 on 2 and 29 DF, p-value: 9.761e-10 How can I split the r-squared value between the two predictor variables?
|
For a list ["foo", "bar", "baz"] and an item in the list "bar", how do I get the index and values for the other two items only knowing that "bar" is in the list? In other words, how do I obtain the index & value for the item before and the item after "bar"?
|
Given a list ["foo", "bar", "baz"] and an item in the list "bar", how do I get its index (1) in Python?
|
So I just saw TFA and was just wondering this about starkiller. How did it maintain orbit after destroying its Sun? I don't think that destroying a planets sun would be very good for it.
|
In Star Wars: The Force Awakens, once the Starkiller Base has depleted the star it is drawing power from, is it supposed to travel to another star where it can draw more power? Or is it non-mobile and supposed to fire a few, limited shots only? Or can it somehow reuse the star it is drawing power from, even after it has been depleted? Its name suggests that it will "kill" or completely deplete the star it is drawing power from, but I haven't noticed an indication in the film that the Starkiller Base can travel to other stars.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.