body1
stringlengths
20
4.1k
body2
stringlengths
23
4.09k
Season 5 Spoiler alert!!! In season 5 ending, the son of harpes revolted and attempted to assasinate Dany, luckily her dragon drogon came to her rescue, maybe it sensed her trouble, maybe its a coincidence, it doesn't really listen to her. David Benioff said that Dany and Drogon shares a deep connection and that Drogon can sense when Dany is in peril, But it didn't come when Dany was surrounded by Dothraki horde.
In S05E09 "", and her advisors find themselves surrounded in the arena by The Sons of the Harpy, vastly out-numbered. The situation looks pretty grim, when all of a sudden a dragon's roar is heard, and her missing dragon shows up to defend Dany & her friends. After he is wounded by the Sons, Dany climbs onto his back and flies off. This scene played out differently in the books. In the book, the dragon was drawn to the arena early on, attracted to the sounds of battle & the smell of blood. Once he landed, he was pretty much out of control - breathing fire at everyone and everything, including Dany herself. She ultimately had to use a whip on him, and flew away with him as much to save everyone else as anything. Within the context of the show, how did Drogon know that Dany needed him, and how did he know who to attack? I haven't seen all of Season 5 yet so I'm assuming maybe I missed something.
I am implementing a simple singly linked list in Javascript. class Node { constructor(data) { this.data = data; this.next = null; } } class LinkedList { constructor() { this.head = null; } } I initially wrote an appendNode method like so: appendNode(data) { const node = new Node(data); let curr = this.head; if (curr) { while (curr.next) curr = curr.next; curr.next = node; } else curr = node; } This does not work, head is never set, the LinkedList does not get built out with repeated calls to appendNode. Rewriting appendNode like so: appendNode(data) { const node = new Node(data); if (this.head) { let curr = this.head; while (curr.next) curr = curr.next; curr.next = node; } else this.head = node; } Does work. I suspect this has something to do with how Javascript handles object references, but searching around for other implementations of LinkedList in JS or the technical details of JS object references has borne no fruit.
The primitive types (number, string, etc.) are passed by value, but objects are unknown, because they can be both passed-by-value (in case we consider that a variable holding an object is in fact a reference to the object) and passed-by-reference (when we consider that the variable to the object holds the object itself). Although it doesn't really matter at the end, I want to know what is the correct way to present the arguments passing conventions. Is there an excerpt from JavaScript specification, which defines what should be the semantics regarding this?
Given $n$, how to construct $n$ points on a plane s.t. any 3 points are not on a line, and the distance between any 2 points is an integer? Below is how to do it for $n=6$ here ABC is the 3,4,5 triangle.
How many points can one can place in $\mathbb{R}^n$, with the requirement that no $n+1$ points lie in the same $\mathbb{R}^{n-1}$-plane, and the euclidean distance between every two points is an integer?
Whats the best method in having multiple domains online with the same content so that it does not affect SEO. Say a www.domain.com and www.domain.com.au. The *.com.au domain has significant SEO history and the *.com domain is brand new and currently only has a 301 redirect to the .com.au domain. Would I just put a copy of the same website up on both domains or will a redirect from one domain to the other do the trick? What would be the best method to go about this?
Lets say I have a domain already, for example www.automobile4u.com (not mine), with a website fully running and all. The title of my "Website" says: <title>Used cars - buy and sell your used cars here</title> Also, lets say I have fully SEO the website so when people searching for the term buy used cars, I end up on the second or first page. Now, I want to end up higher, so I go to the google adwords page where you can check how many searches are made on specific terms. Lets say the term "used cars" has 20 million searches each month. Here comes the question, could I just go and buy that domain with the search terms adress, in this case www.usedcars.com and make a redirect to my original page, and this way when people search for "used cars", my newly bought domain name comes up redirecting people to my original website (www.automobile4u.com)? The reason I believe this benefits me is because it seems search engines first of all check website adresses matching the search, so the query "used cars" would automatically bring www.usedcars.com to the first result right? What are the downsides for this? I already know about google spiders not liking redirects, but there are many methods of redirecting... Is this a good idea generally?
I have the following Parameters in a shell script #!/bin/bash DOCKER_REGISTRY=gcr.io GCP_PROJECT=sample ELASTICSEARCH_VERSION=:7.3.1 When i run this command the parameters are all replaced correctly ELASTICSEARCH_IMAGE=$DOCKER_REGISTRY/$GCP_PROJECT/elasticsearch$ELASTICSEARCH_VERSION echo $ELASTICSEARCH_IMAGE gcr.io/sample/elasticsearch:7.3.1 I need to replace the ELASTICSEARCH_IMAGE on a kubernetes deployment file containers: - image: {{ELASTICSEARCH}} name: elasticsearch So when i run the below command it is not replaced. The issue is because of "/". I tried various sed command but not able to resolve it YAML_CONTENT=cat "app-search-application.yaml.template" | sed "s/{{ELASTICSEARCH_IMAGE}}/$ELASTICSEARCH_IMAGE/g" My intension is to dynamically change the image on kubernetes yaml file with the sed command.
In my bash script I have an external (received from user) string, which I should use in sed pattern. REPLACE="<funny characters here>" sed "s/KEYWORD/$REPLACE/g" How can I escape the $REPLACE string so it would be safely accepted by sed as a literal replacement? NOTE: The KEYWORD is a dumb substring with no matches etc. It is not supplied by user.
Assuming we have this circuit: – Schematic created using Assuming D1 is a silicon diode and D3 is a germanium diode,Will D1 be turned on so the VAB = Vfd1 or not? I know that if we didnt have the resistor D1 would not turn on but now i am unsure.I also know that if we had a resistor ,with a smaller resistance than R1, in series with D1 both would turn on. [] I assumed that D1 conducts and found the current 0.003A.But I assumed D1 conducts it may not what should I do from here?
If we have this circuit: The diode with the lowest forward voltage drop will conduct and turn on while the other will turn off and not conduct current. If I have this circuit: Assuming the 2 diodes have the same voltage drop, R1 can be considered to be in parallel to R2 and that's how we solve those circuits. However in the same case, what if the 2 diodes have different forward voltage drops? Say Vd1>Vd2 which assumption should I take into account?
I just noticed Google Maps new feature. It allows the user to get approximate drive times for a specific date and time using average traffic conditions. This is a feature which . It allows the user to choose to depart at a specific time or arrive at a specific time. In the later case it recommends a time for the user to leave. The drive time is given as a possible range of times (see the screencap below). My question is; how is this range of times defined? Is it the minimum to maximum range, the 90% confidence interval, or perhaps the 25th to 75th percentile?
I have this planned in Google Maps as a rough plot for travel times to 4 locations from Tokyo Tower, it's by no means finished. Now I am well aware that there are other factors such was road works, traffic conditions, rest stops, etc. but would the travel times listed on Google Maps be an accurate estimate? i.e. From Tokyo Tower to Hachiman Shrine, can I expect it to take at least 14 h 28 min on a perfect non-interrupted drive with the route Google Maps suggests?
I was wondering if i could start a .sh from a .jar file. I think i would go something like this: start "test.sh" but that did not work.
It is quite simple to run a Unix command from Java. Runtime.getRuntime().exec(myCommand); But is it possible to run a Unix shell script from Java code? If yes, would it be a good practice to run a shell script from within Java code?
I'm trying to make a program in Godot where the player can put a bunch of images into a folder, and when the button is pressed, have the image appear as a sprite on the screen. With the current code, the directory for the image is printed when the button is pressed, but the image sprite simply does not appear. No error messages come up either, so I'm stumped as to what the problem is. Here is the code: extends Button func _pressed(): var cards_order = [] #creates the array var path = "assets/cards/" #defines a path var dir = Directory.new() #creates a directory dir.open(path) #sets the directory to the defined path dir.list_dir_begin() #begins listing the directory while true: var file_name = dir.get_next() #sets the var "file_name" to the next entry in the directory if file_name == "": #break the while loop when get_next() returns "" break elif !file_name.begins_with(".") && !file_name.ends_with(".import"): #get_next() returns a string so this can be used to load the images into an array. Also stops .import files from being added cards_order.append(load(path + file_name)) #loads the next file into the array dir.list_dir_end() randomize() #changes the randomization cards_order.shuffle() #shuffles the array var card_sprite = cards_order.front() #sets card_sprite as the first item in the array print(card_sprite.get_path()) $"/root/CardSprite".texture = load(card_sprite.get_path()) Any help with this would be greatly appreciated!
I am seeking possibility to switch character textures for game, even after I have compiled and built the binary. For example I have a troll with a Sprite from "/assets/texture1.png" Now after the game has been released, I can change this sprite. Currently I have found this method func _ready(): var texture = load("res://textures/troll1.png") sprite.texture = texture But after the export, when I change the troll1.png, the texture in the game remains the same.
Whenever I boot my Windows 8 computer, my default browser (Chrome, though this happened while IE was my default browser) opens up and automatically opens the homepage. What's causing this and how can I prevent this from happening?
My Windows 8 Laptop will open Bing in IE by itself. It makes a request to: which then directs to Changed default browsers from IE to Chrome and see the same behavior in Chrome. My initial thought was spyware, but the Microsoft URL made me think otherwise. I then confirmed that it happens on brand new installs for others at my company. It happens (seemlingly) randomly, and without any interaction from me. I can reproduce the issue by disabling my network connection and resuming from sleep mode.
I did this function so that the form button enables when the inputs are different from empty, but I don't know how to do so that in the #email ID the input, in addition to being different from empty, must necessarily contain the character '"@" or the strings "@ gmail.com", "@ hotmail.com". This is the function $(function () { $('#button').attr('disabled', true); $('#textarea, #email, #name').change(function () { if ($('#name').val() != '' && $('#email').val() != '' && $('#textarea').val() != '') { $('#button').attr('disabled', false); } else { $('#button').attr('disabled', true); } }); }); This is the HTML <form id="contact-form" method="POST" action="forms/contact-form-handler.php"> <span class="asterisco">*</span><input name="name" id="name" type="text" class="form-control" placeholder="Nombre" required> <br> <span class="asterisco">*</span><input name="email" id="email" type="email" class="form-control" placeholder="Dirección de correo electrónico" required> <br> <span class="asterisco">*</span><textarea style="resize: none;" id="textarea" name="message" class="form-control" placeholder="Mensaje" row="4" required></textarea> <span class="texto-asterisco">Las celdas marcadas con * son obligatorias.</span> <br> <div id="button-container"> <button type="submit" id="button" disabled="disabled"></button> </div> </form>
Is there a regular expression to validate an email address in JavaScript?
I'm really stuck on this problem. I couldn't find an injection or bijection from $\mathbb{N}^\mathbb{N}$ to $2^\mathbb{N}$ in order to apple Schroder-Bernstein. Can anyone help me out with this? Thanks.
My motivation for asking this question is that a classmate of mine asked me some kind of question that made me think of this one. I can't recall his exact question because he is kind of messy (both when talking about math and when thinking about math). I'm kind of stuck though. I feel like the set $A^{\mathbb{N}} = \{f: \mathbb{N} \rightarrow A, f \text{ is a function} \}$ should have the same cardinality as the power set of A, if A is infinite. On the other hand, in this , it is stated that the sequences with real coefficients have the same cardinality as the reals. It's easy to see that $A^{\mathbb{N}} \subseteq P(A)$, but (obviously) I got stuck on the other inclusion. Is there any general result that says anything else? References would be appreciated. EDIT To clarify the intetion of this question: I want to know if there are any general results on the cardinality of $A^{\mathbb{N}}$ other that it is strictly less than that of the power set of A. Also, I was aware that the other inclusion isn't true in general (as the post on here I linked to gave a counterexample), but thanks for pointing out why too. :)
I have no idea whether this is known or not and I couldn't find anything related on Google. While I was studying , I come up with this idea $1+n!=m^{2} $ for some $n,m\in\mathbb{N}$ $1+4!=5^{2}$ $1+5!=11^{2}$ $1+?!=?^{2}$ and the question is what is the next number? Wolfram Alpha gave me this interesting graph: Thanks in advance for your interest.
One observes that \begin{equation*} 4!+1 =25=5^{2},~5!+1=121=11^{2} \end{equation*} is a perfect square. Similarly for $n=7$ also we see that $n!+1$ is a perfect square. So one can ask the truth of this question: Is $n!+1$ a perfect square for infinitely many $n$? If yes, then how to prove.
Is it possible to duplicate the default left side Unity panel and have another one on the right? I have multiple applications that I want to lock to the launcher and I don't like continuously scrolling to the end of the left panel. I know a simpler alternative would be to simply use the main Unity launcher fixed on the top, but I was just curious to know if multiple side panels was possible.
Is it possible to have 2 unity launchers? One on the Left and one on the Right. In my thoughts, the Left one (The Default) would have the normal stuff that i use everyday. The Right side would have additional stuff that i might use like wine programs or to show the recent documents. Just some ideas to my reason to having 2 panels. Is it possible/optional?
This feels wrong in my brain, so I think it's a new change... If the tag list is short, the line showing last modification and the user+rep loses its right-justification (red), but if the tag list is long enough to cause a linewrap, it is properly right-justified (green). This happens here on MSE as well as the main page of Physics.SE and Physics Meta. I suspect it is global, but I haven't looked at any other sites. This is Firefox 89.0 (64 bit) on Windows 10, and I haven't tried other browsers or OSes.
In the (homepage), the asked/modified X mins ago text was left-aligned next to the tags. Previously the text was right-aligned. Seems some alignment issue introduced on that page recently. Screenshot for reference: Configuration Version Operating System Windows 10 Pro Mozilla Firefox 89.0 (64-bit) Google Chrome 91.0.4472.101 (Official Build) (64-bit) Update: I see the same alignment issue in all other Stack Exchange site's "Top Questions" page too.
The principle of conservation of energy says that all energy in a system will remain the same. It can just be transformed. The universe contains a huge amount of energy, but where did it come from? I know there isn't that ONE answer, but I'm curious as to what the thoughts and theories about this question are.
In popular science books and articles, I keep running into the claim that the total energy of the Universe is zero, "because the positive energy of matter is cancelled out by the negative energy of the gravitational field". But I can't find anything concrete to substantiate this claim. As a first check, I did a calculation to compute the gravitational potential energy of a sphere of uniform density of radius $R$ using Newton's Laws and threw in $E=mc^2$ for energy of the sphere, and it was by no means obvious that the answer is zero! So, my questions: What is the basis for the claim – does one require General Relativity, or can one get it from Newtonian gravity? What conditions do you require in the model, in order for this to work? Could someone please refer me to a good paper about this?
I've wondered what is the logic behind choosing these designs and descriptions for the hats of Winter Bash 2017?
Inspired by a , here's a list of the 'etymology' for the hats. For pictures and a list of criteria, see instead. The list is a community wiki; feel free to edit it if you have more information about a hat. If you like to do some research, most hats have been featured in earlier editions, so you might be able to find more information in old Meta Stack Exchange questions.
I was looking for an exercise book on Discrete Math like SAT questions. In particular I want questions on Logic Set Theroy Relations (I.e., $R\subset A\times A$) Functions Combinatorics I did not find anything like SAT questions but only "open" questions.
I am going to a Computer Science Course in University next year. I heard that Discrete Mathematics is whats required for Comp Sci so, I am looking for resources/books that I can read to get started with. I picked up . I find that some things are alittle hard to understand still. I have also looked at some videos from , I find the videos easy to understand. Except that I don't really know where am I supposed to start 1st. I am on algebra now, but can someone tell me whats the sequence I should go from here, eg. topics/playlists? An you know, for maths, there must be alot of practice. So where can I find lots of practice questions? Schaum's Outline of Discrete Mathematics has quite little practice questions.
I've found a way to do what I want which is, But I'm wondering if there's a way I can get this down to one line. I have a list of list of lists of strings, as compared to a lists of numbers (for which there's an answer: [Sum of list of lists; returns sum list) Example List: list = [['T=-40F A=0K', 'T=-15F A=0K', 'T=59F A=0K', 'T=98F A=0K', 'T=120F A=0K'], ['T=-40F A=10K','T=-15F A=10K','T=59F A=10K','T=98F A=10K','T=120F A=10K']] Example Output: ['T=-40F A=0K', 'T=-15F A=0K', 'T=59F A=0K', 'T=98F A=0K', 'T=120F A=0K', 'T=-40F A=10K', 'T=-15F A=10K', 'T=59F A=10K', 'T=98F A=10K', 'T=120F A=10K'] I can join these with this method: new = [] for i in [['T=%.0fF A=%.0fK'%(t,a)for t in TEMP] for a in ALT]: new = new + i Anyone got anything? As for the application im adding a legend to a matplotlib plot This would be really easy, and an awesome feature with sum(list)
Is there a simple way to flatten a list of iterables with a list comprehension, or failing that, what would you all consider to be the best way to flatten a shallow list like this, balancing performance and readability? I tried to flatten such a list with a nested list comprehension, like this: [image for image in menuitem for menuitem in list_of_menuitems] But I get in trouble of the NameError variety there, because the name 'menuitem' is not defined. After googling and looking around on Stack Overflow, I got the desired results with a reduce statement: reduce(list.__add__, map(lambda x: list(x), list_of_menuitems)) But this method is fairly unreadable because I need that list(x) call there because x is a Django QuerySet object. Conclusion: Thanks to everyone who contributed to this question. Here is a summary of what I learned. I'm also making this a community wiki in case others want to add to or correct these observations. My original reduce statement is redundant and is better written this way: >>> reduce(list.__add__, (list(mi) for mi in list_of_menuitems)) This is the correct syntax for a nested list comprehension (Brilliant summary !): >>> [image for mi in list_of_menuitems for image in mi] But neither of these methods are as efficient as using itertools.chain: >>> from itertools import chain >>> list(chain(*list_of_menuitems)) And as @cdleary notes, it's probably better style to avoid * operator magic by using chain.from_iterable like so: >>> chain = itertools.chain.from_iterable([[1,2],[3],[5,89],[],[6]]) >>> print(list(chain)) >>> [1, 2, 3, 5, 89, 6]
I trying to get info in database and sending for an object called Question. When i got null in database and send it to the field of the object.. I suppose that field will be "null", cause the field is an String. But i tried all ways to verify it and i cant... I tried: Question a = new Question(); a.setAnswer(database.getAnswer(id)); // Way 1 if(a.getAnswer() == null) { Log.d("Way 1", "successfully"); } // Way 2 if(a.getAnswer() == "null") { Log.d("Way 2", "successfully"); } //Way 3 if(a.getAnswer().equals(null)) { Log.d("Way 3", "successfully"); } // Way 4 if(a.getAnswer().equals("")) { Log.d("Way 4", "successfully"); } But I didn't got result... I put in log to log my Question.getAnswer() too: And here's the result: D/Here == >: null
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 created a method that takes a List as an input, brewMethod.getmMethodBrewPours() and depending on the users preference, the method returns those variables as they are or multiplied by a number. I store the returned value as a new variable, brewPours. The issue is, not only is this method returning new values to be stored, but it's also changing the values of the original variable. Why is this being changed, and what should I do to prevent it? Code that calls method: // Custom class storing sets of data brewMethod = i.getParcelableExtra("brew_method"); //logs original packaged values for (int j = 0; j < brewMethod.getmMethodBrewPours().size(); j++) { Log.v("Original pour value #: " + j + ": ", brewMethod.getmMethodBrewPours() .get(j).toString()); } //changes values based on users preference brewPours = replacePours(brewMethod.getmMethodBrewPours()); //report the values again of the original packed values, but they are changed for some reason for (int k = 0; k < brewMethod.getmMethodBrewPours().size(); k++) { Log.v("New value on Original pour value #: " + k + ": ", brewMethod.getmMethodBrewPours() .get(k).toString()); } //log the values of the new variable brewPours for (int l = 0; l < brewPours.size(); l++) { Log.v("Value for new variable brewPours pour # " + l + ": ", brewPours.get(l).toString()); } Code of the method: public List<Integer> replacePours(List<Integer> waterPours) { SharedPreferences pref = getSharedPreferences("preferences", MODE_PRIVATE); Integer newServingSize = pref.getInt("pref_key_serving_size", 1); if (newServingSize == 2) { for (int i = 0; i < waterPours.size(); i++) { newPour = waterPours.get(i) * 2; waterPours.set(i, newPour); } } return waterPours; } Output: 06-19 16:50:34.474 30159-30159/com.brewguide.android.coffeebrewguide V/Original pour value #: 0:: 60 06-19 16:50:34.474 30159-30159/com.brewguide.android.coffeebrewguide V/Original pour value #: 1:: 200 06-19 16:50:34.474 30159-30159/com.brewguide.android.coffeebrewguide V/Original pour value #: 2:: 300 06-19 16:50:34.474 30159-30159/com.brewguide.android.coffeebrewguide V/Original pour value #: 3:: 380 06-19 16:50:34.475 30159-30159/com.brewguide.android.coffeebrewguide V/New value on Original pour value #: 0:: 120 06-19 16:50:34.475 30159-30159/com.brewguide.android.coffeebrewguide V/New value on Original pour value #: 1:: 400 06-19 16:50:34.475 30159-30159/com.brewguide.android.coffeebrewguide V/New value on Original pour value #: 2:: 600 06-19 16:50:34.475 30159-30159/com.brewguide.android.coffeebrewguide V/New value on Original pour value #: 3:: 760 06-19 16:50:34.475 30159-30159/com.brewguide.android.coffeebrewguide V/Value for new variable brewPours pour # 0:: 120 06-19 16:50:34.475 30159-30159/com.brewguide.android.coffeebrewguide V/Value for new variable brewPours pour # 1:: 400 06-19 16:50:34.475 30159-30159/com.brewguide.android.coffeebrewguide V/Value for new variable brewPours pour # 2:: 600 06-19 16:50:34.475 30159-30159/com.brewguide.android.coffeebrewguide V/Value for new variable brewPours pour # 3:: 760 Edit: I adjusted the method's code following the advice from @Vampire and got the results I was looking for. Below is my adjusted code, thanks! public List<Integer> replacePours(List<Integer> waterPours) { List<Integer> returnedPours = new ArrayList<>(); SharedPreferences pref = getSharedPreferences("preferences", MODE_PRIVATE); Integer newServingSize = pref.getInt("pref_key_serving_size", 1); if (newServingSize == 2) { for (int i = 0; i < waterPours.size(); i++) { int newPour = waterPours.get(i) * 2; returnedPours.add(newPour); } } return returnedPours; }
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?
Quantum mechanics is governed by Schrodinger's equation: $$\hat{H}\psi=i\hbar\partial_t \psi$$ It seems that Hamiltonian acts on wave functions like a time derivative. Just out of curiosity, is there any Hamiltonian that contains time derivatives, either first order or second order?
In the time-dependent Schrodinger equation, $ H\Psi = i\hbar\frac{\partial}{\partial t}\Psi,$ the Hamiltonian operator is given by $$\displaystyle H = -\frac{\hbar^2}{2m}\nabla^2+V.$$ Why can't we consider $\displaystyle i\hbar\frac{\partial}{\partial t}$ as an operator for the Hamiltonian as well? My answer (which I am not sure about) is the following: $\displaystyle H\Psi = i\hbar\frac{\partial}{\partial t}\Psi$ is not an equation for defining $H$. This situation is similar to $\displaystyle F=ma$. Newton's second law is not an equation for defining $F$; $F$ must be provided independently. Is my reasoning (and the analogy) correct, or is the answer deeper than that?
Is it possible to hide window decorations or at least the title bar in Gnome 3.10? I found an extension called "Maximus", but when I try to install it (and Gnome asks whether I want to download it and install), nothing happens.
(Ubuntu 13.04 with GNOME Shell, upgraded, GNOME version 3.8) Recently, I upgraded Ubuntu to 13.04. the default desktop is gnome-shell. Except Nautilus, other software border doesn't disappear when I make them to be maximized. I checked the problem for these software: LibreOffice Firefox Rhythmbox thunderbird GNOME-Terminal On the other hand there are three bars on maximized mode: GNOME Shell panel Title-bar for software which contains - + x (minimise, maximise, close) buttons. Software menu-bar Number "2" is extra. Is a package missing?
as far as I noticed always people in physics have a predefined assumption that frequency is constant. whereas we know that the c is the outcom of product of wavelength and frequency. we have different wavelength and frequency iv whit light. the energy depends on both of them wavelength and frequency. if you consider the speed of light as a global constant parameter then both attribute of that must have that properties. but we know when light passes through a glass for example; it loses energy as we can measure the changes in temperature of glass that is increased. then I think the change of speed of light is because of interaction between light as an electromagnetic wave and fields inside the material would occure and frequency and wavelength both would change by 1 divided on square root of $n$ or refracting index. by the way we lose the speed but when the light enters the air again it behaves as before then we have the same speed. you van not measure the speed at the boundary condition as speed needs distance and time to be measured. then why we must suppose frequency is constant?
What determines the color of light -- is it the wavelength of the light or the frequency? (i.e. If you put light through a medium other than air, in order to keep its color the same, which one would you need to keep constant: the wavelength or the frequency?)
Example input: A0021,,Outside state ambulance serv,I,,0,0,, A4217,,"Sterile water/saline, 500 ml",X,, A4672,,"Drainage ext line, dialysis",X,, Example output after first sed command sed -i 's/("[^,])[,]([^"]")/\1\2/g' file.csv : A0021,,Outside state ambulance serv,I,,0,0,, A4217,,"Sterile water/saline, 500 ml",X,, A4672,,"Drainage ext line dialysis",X,, Desired output after the last command: A0021,,,I,,0,0,, A4217,,,X,, A4672,,,X,, The third column has been giving me issues in a project and the easiest solution is to simply delete it, as it is not necessary. The commas should remain, it should just have empty contents. I was thinking that I would need to develop a sed command to remove the commas contained within quotes before the command to delete the third column, as I would imagine that the easiest way to do this would be to count the commas and then delete everything between the 2nd and 3rd comma. this is the sed command I am using the delete the commas inside of the quotes before I proceed with clearing the 3rd column's contents
I have a CSV file, in.csv, which has an integer array column: 1,2,4,"{100,200,300}",,1 1,2,4,"{100,200,300,400,500}",,2 1,2,4,"{100,200,300,600.900,1200,1500}",1,3 I want to have an output file, out.csv, like: 1,2,4,,1 1,2,4,,2 1,2,4,1,3 I tried: cut -d , -f4 -- complement in.csv > out.csv But it did not work out. (I also have the fifth column which has value for third row but not for others).
public class Sample { public void M1(Bx b1, Bx b2) { Bx temp = b1; b1 = b2; b2 = temp; } } public class Bx { public int number; public Bx(int newNumber) { newNumber = number; } if i ran something like : public static void main(String[] args) { Sample s = new Sample(); Bx a = new Bx(10); Bx b = new Bx(5); s.M1(a,b); System.out.println(a.number + " " + b.number); } the values dont switch. The values for a.number and b.number is still their original values. Can anyone please tell me why. Thank you :)
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?
If I have a market research with population of 100 individuals: 10 spend less than 10 dollars in clothing 20 spend between 10 - 20 dollars in clothing 30 spend between 20 - 100 dollars in clothing the remaining do not spend at clothing. How do I calculate to arithmetic average and standard deviation of the data?
I have a dataset of sample observations, stored as counts within range bins. e.g.: min/max count 40/44 1 45/49 2 50/54 3 55/59 4 70/74 1 Now, finding an estimate of the average from this is pretty straight forward. Simply use the mean (or median) of each range bin as the observation and the count as a weight and find the weighted average: $$\bar{x}^* = \frac{1}{\sum_{i=1}^N w_i} \sum_{i=1}^N w_ix_i$$ For my test case, this gives me 53.82. My question now is, what's the correct method of finding the standard deviation (or variance)? Through my searching, I've found several answers, but I'm unsure which, if any, is actually appropriate for my dataset. I was able to find the following formula both and . $$s^{2*} = \frac{ \sum_{i=1}^N w_i (x_i - \bar{x}^*)^2 }{ \frac{(M-1)}{M} \sum_{i=1}^N w_i }$$ Which gives a standard deviation of 8.35 for my test case. However, the Wikipedia article on gives both the formula: $$s^{2*} = \frac{ \sum_{i=1}^N w_i}{(\sum_{i=1}^N w_i)^2 - \sum_{i=1}^N w_i^2} \sum_{i=1}^N w_i(x_i-\bar{x}^*)^2$$ and $$s^{2*} = \frac{1}{(\sum_{i=1}^N w_i) - 1} \sum_{i=1}^N w_i(x_i-\bar{x}^*)^2$$ Which give standard deviations of 8.66 and 7.83, respectively, for my test case. Update Thanks to @whuber who suggested looking into Sheppard's Corrections, and your helpful comments related to them. Unfortunately, I'm having a difficult time understanding the resources I can find about it (and I can't find any good examples). To recap though, I understand that the following is a biased estimate of variance: $$s^{2*} = \frac{1}{\sum_{i=1}^N w_i} \sum_{i=1}^N w_i(x_i-\bar{x}^*)^2$$ I also understand that most standard corrections for the bias are for direct random samples of a normal distribution. Therefore, I see two potential issues for me: These are binned random samples (which, I'm pretty sure, is where Sheppard's Corrections come in.) It's unknown whether or not the data is for a normal distribution (thus I'm assuming not, which, I'm pretty sure, invalidates Sheppard's Corrections.) So, my updated question is; What's the appropriate method for handling the bias imposed by the "simple" weighted standard deviation/variance formula on a non-normal distribution? Most specifically with regards to binned data. Note: I'm using the following terms: $s^{2*}$ is the weighted variance $N$ is the number of observations. (i.e. the number of bins) $M$ is the number of nonzero weights. (i.e. the number of bins with counts) $w_i$ are the weights (i.e. the counts) $x_i$ are the observations. (i.e. the bin means) $\bar{x}^*$ is the weighted mean.
I have an iPhone X, with a camera specs of: Wide-angle: ƒ/1.8 aperture Telephoto: ƒ/2.4 aperture Why does the phone need software to produce Portrait Mode image (image with background blur / bokeh)? With my SLR camera, shooting with f2.4 and definitely f1.8 apertures are more than enough for a blurred background.
It has been mentioned at that a larger sensor results in images with a shallower depth of field. Example image: I understand how sensor size would relate to, for example, field of view, but the relationship with depth of field does not seem straightforward. It actually seems contradictory - I have more wells on my sensor, and I am able to focus on less number of points. What is the reason for this effect?
Let's suppose that my dataset in a classification problem looks like that: class A: 50000 observations class B: 2000 observations class C: 800 observations class D: 200 observations These are some ways which I considered to deal with this imbalanced dataset: I reject straight away oversampling because it usually makes the model overfit (in the minority classes) by a lot. Secondly, if I run the classifier with the data like that then it will be overclassifying documents in class A so I reject this method too. Another approach is to do undersampling and reduce class A to let's say 4000 documents (where I tested it and it gives the best results so far). However, in this way I am losing quite a lot of information. So I am wondering if building multiple classifiers with 4000 documents each for class A (different at each time) is a better solution (although I think that this approach resembles quite a lot the oversampling approach which I rejected). What do you think of method (4) comparing to method (3)?
I am trying to classify images to more then a 100 classes, of different sizes ranged from 300 to 4000 (mean size 1500 with std 600). I am using a pretty standard CNN where the last layer outputs a vector of length number of classes, and using pytorch's loss function CrossEntropyLoss. I tried to use $weights = \frac{max(sizes)}{sizes}$ for the cross entropy loss which improved the unweighted version, not by much. I also thought about duplicating images such that all classes ends up to be of the same size as the larges one. Is there any standard way of handling this sort of imbalance?
I met my partner when she was 6 months pregnant. I took my daughter on as my own. I have and will always be her dad. She is now 10 years old and three years ago we lost her mam so it is me who is raising her on my own. How do I and when do I tell her that I am not her biological father?.
My son is going on 5 and starting to learn a lot about how we're created. I've been with my husband for 10 years, but nearly 6 years ago I had no other choice but to move 1000 miles away and after trying the long distance thing it didn't work so we split up. I ended up going through a rough patch and started dating an abusive jerk. After a year I was pregnant. He threatened me trying to force me to have an abortion and I refused. His grandmother was chief of police and he scared me into moving back to Florida. Eventually, when I was 4 months along in my pregnancy my husband and I picked up right where we left off. He loved me so much and accepted our son as if he was his own and has done an amazing job at raising him. He enrolled in college while I was pregnant, got us a house and went above and beyond to care for us both (as after giving birth I became very ill due to rare brain and spine conditions). I've always tried to do right by my son. Since day one, even while with my husband, I tried to keep the sperm donor involved. But he wanted no part of his son. My husband stepped up when the biological father refused. The biological father would pretend that he cared, only to tell me he never cared about him anyway and was just trying to manipulate me into stopping child support (which I did anyway after the first year: I felt it wasn't right to take his money when my son had a dad who loved, supported and wanted him from the beginning). This is a very long story so I'll try and make it not so much of a novel. The sperm donor has made it very clear he wants nothing ever to do with my son. My husband has been Dad since the moment my son entered this world. I've always planned to tell my son as early as possible. I think now, or in a few years, it won't be as hard on him compared to us telling him when he's a teen and who knows how he'd handle it. I just don't know what to do. We have an extremely happy loving family. My son adores his dad. We never argue, we have a very happy non-dysfunctional marriage. I just feel we have a very special family. But I refuse to lie to my son. What if we wait and someone else maliciously tells him? Or if, when he's older and finds out, he spirals out of control? I'm so confused, I just want to do the right thing and desperately need advice. Especially from others who have been through similar circumstances. We're planning on meeting with therapists and I guess child development specialists, if someone could also point me in the right direction for what type of doctor is best suited in this situation. Also my son is very happy. He has a wonderful life and I feel as if he would do fine, knowing how much he loves his dad and just beginning to really grasp the concept of life. I don't think it would change anything for him, if that makes sense. I've been worrying over this for 5 years and really need some answers!
I'm trying to write a script that accepts a parameter ($1) with backslashes and I want my script to echo the parameter ($1) exactly with the backslashes entered back. e.g. $ ./tst \\abc\def\ghi\jkl\lmn\ \\abc\def\ghi\jkl\lmn\ My tst script at present looks like this; #!/bin/bash echo $1 When I run my script it returns; \abcdefghijkllmn I want it to return: \\abc\def\ghi\jkl\lmn\ Exactly what I entered. I've even tried echo -E $1 but that made no difference. Any suggestions I could achieve my desirable returned output from my script would be very much appreciated.
Or, an introductory guide to robust filename handling and other string passing in shell scripts. I wrote a shell script which works well most of the time. But it chokes on some inputs (e.g. on some file names). I encountered a problem such as the following: I have a file name containing a space hello world, and it was treated as two separate files hello and world. I have an input line with two consecutive spaces and they shrank to one in the input. Leading and trailing whitespace disappears from input lines. Sometimes, when the input contains one of the characters \[*?, they are replaced by some text which is is actually the name of files. There is an apostrophe ' (or a double quote ") in the input and things got weird after that point. There is a backslash in the input (or: I am using Cygwin and some of my file names have Windows-style \ separators). What is going on and how do I fix it?
I am having trouble formalizing the answer to this question. Any help would be appreciated. Is it true that for every continuous function $f:[0,2] \to \mathbb{R}$ such as $f(0)=f(2)$, $\exists x \in [0,1]:f(x)=f(x+1)$? If the function is periodic of degree one this seems true to me. I tried proving by contradiction, supposing that $\forall x \in [0,1], f(x) \neq f(x+1)$, but I couldn't get any further.
Proof that if continuous function on $[0, 2]$ and $f(0) = f(2)$, then for some $x: f(x) = f(x - 1)$
I want to include several listings in my document with sections. I also want each listing to have labels like Listing 2.1 where 2 is section number and 1 is number of given listing within that section. So far I was able to produce this code: \documentclass[a4paper]{article} \usepackage{listings} \lstset{frame=Trbl,numbers=left} \begin{document} \renewcommand{\thelstlisting}{\thesection.\arabic{lstlisting}} \section{Introduction} First listing is numbered properly. \begin{lstlisting}[caption=First listing] Lorem Ipsum \end{lstlisting} Second is correct too. \begin{lstlisting}[caption=Second listing] Dolor sit Amet \end{lstlisting} So far, all listings in one section are correct. \section{First problem} When a new section begins, the counter doesn't get reset. \begin{lstlisting}[caption=First listing in second section] consectetur adispicing elit \end{lstlisting} \end{document} But this produces the following result: How can I reset the counter after the beginning of each section?
Some document elements (e.g., figures in the book class) are numbered per chapter (figure 1.1, 1.2, 2.1, ...). How can I achieve continuous numbering (figure 1, 2, 3, ...)? And vice versa: Some document elements (e.g., figures in the article class) are numbered continuously. How can I achieve per-section numbering? \documentclass{book}% for "vice versa" variant, replace `book` with `article` \begin{document} \chapter{foo}% for "vice versa" variant, replace `\chapter` with `\section` \begin{figure} \centering \rule{1cm}{1cm}% placeholder for graphic \caption{A figure} \end{figure} \end{document} Bonus question: Is it possible to adjust the numbering of the sectioning headings themselves? Can I, e.g., switch from per-chapter to continuous numbering of sections in the book class?
I have a question that I have no idea how to start: $$\int_{0}^{1} \frac{x-1}{\ln x}dx$$ So in one of my classes, I learned a technique called parametric integration. But I have no idea how to use the technique with this question. Any hints/help would be great!
/A problem from the 2012 MIT Integration Bee is $$ \int_0^1\frac{x^7-1}{\log(x)}\mathrm dx $$ The answer is $\log(8)$. Wolfram Alpha gives an indefinite form in terms of the logarithmic integral function, but times out doing the computation. Is there a way to do it by hand?
This seems counterintuitive to the vertical nature of Stack Exchange itself, but I cannot manage to browse to meta.stackexchange.com: I get redirected to meta.stackoverflow.com, instead. This is also despite the fact that these URLs resolve to separate IP addresses... ; <<>> DiG 9.7.3-P3 <<>> meta.stackexchange.com meta.stackexchange.com. 3421 IN A 64.34.80.165 ; <<>> DiG 9.7.3-P3 <<>> meta.stackoverflow.com meta.stackoverflow.com. 684 IN A 64.34.119.12 Am I being dumb somehow, or is this "the way it is"? If so, why?
Historically this site, , has been the place to ask questions about not just Stack Overflow, but the functioning of the entire Stack Exchange (2.0) network, including Area 51 and stackexchange.com and careers. (Yes, there was a , but that dealt with the old legacy Stack Exchange 1.0 sites. It was deprecated a while ago, and currently redirects here.) Now that we've gotten many, many months under our belt from the SE 1.0 days, I think it's time that we gave Stack Overflow its own, true per-site meta, and moved the higher level network meta discussions to meta.stackexchange.com. Over time, it's begun to bug me more and more that requests for Stack Overflow, the site, kind of get buried here on meta.stackoverflow under the avalanche of network issues. Retag requests, synonym requests, things truly specific to Stack Overflow, the site, not the network. This is unfair to our vastly largest and flagship Q&A site, and it's unfair to the Stack Overflow users to mix their requests in with network level concerns. It's also odd that Stack Overflow is the only network site without a proper, dedicated per-site meta, where its meta has its own reputation system not tied to the parent site in any way. This is mostly a quirk of history more than anything else, and I believe it is now an appropriate time to split into two sites: , a proper per-site meta for Stack Overflow with integrated rep , a global network meta with its own reputation system Yes, this will be painful. But I believe it is a good, necessary, and healthy step both for the future of the network and the future of Stack Overflow. Some things to discuss: which questions should be migrated from here to meta.so? Obviously site-specific things like the retag-requests, and perhaps questions with the tag. Anything that is 100% wholly specific to Stack Overflow and not generalizable to the rest of the network should be moved over. This may be a pretty small, narrow list of questions, and that's OK. Should we do some meta spring cleaning in our transition? Which questions / tags should be blown away as no longer relevant, referring to ancient versions of Stack Overflow or issues that have long since ceased to exist and aren't instructive for any future visitors? Your meta reps will generally be unaffected, except insofar as we delete for spring cleaning, or move site-specific things to meta.so. We still plan to have a distinct reputation system for the new meta.se site, just like here. I do not have a timeline for this change, that is up to Jarrod and David to decide. It may be months away. However, we feel pretty strongly that this is something that we need to do to clean things up and pave the way for the future -- so I expect it will happen in the next few months, giving us lots of time to decide how we want to do it, per the above. Update .
Hopefully this is an easy question for the collected knowledge here. I have an old Dell Inspiron mini 10 with a Atom Z530 CPU. I am interested in installing ubuntu on it to run Kodi. Due to it being 6 years old, would it be able to run the current version of ubuntu? If it can, I'm looking at upping the RAM from 1Gb to 2Gb and installing a solid-state harddrive if it can handle that.
For a given hardware configuration, how do I find out if Ubuntu will run on it? What considerations should I take into account when choosing an Ubuntu version and such as: with a lighter desktop than the usual Gnome and Unity with the even lighter LXDE desktop Obviously Ubuntu does not run on some processor architectures. So how do I go about choosing the right version and derivate. How can I find out the minmal system requirements?
I get the Y is for Canadian airports, but while YVR comes from Vancouver, YOW for Ottawa for example I don't see what UL can relate to. Is it just a meaningless acronym ? Edit: I'm not asking why they start with Y, that seems a convention, but rather what does the UL relate to
In my flying experience (passenger), I've gotten used to seeing 3 letter airport codes. AKL = Auckland. LHR = London Heathrow. LGW = London Gatwick. LAX = Los Angeles. Generally, they seem to make sense - some sort of logic flow is applied to the name. Which brings me to Canada. What bemuses me is when I see Canadian airports - they (so far) all seem to start with Y. YVR = Vancouver. YYZ = Toronto. YEG = Edmonton. And so on. VR is sort of an abbreviation for Vancouver, I guess, and Edmonton at least starts with an E, but I can't explain the Toronto one. And where the Y comes from I have no idea. Can anyone explain why they start with a Y, historically?
I'm a physic student of Italy. I'm moving my first steps in this beautiful world, and as every new entry, my simple and stupid questions are sometimes not so simply resolved. I'm trying to know the why planets aren't falling on each other, like the moon on the earth. I thought it could be explained with the Lennard Jones potential, which says us there is a $r_0$ that before or after the potential is repulsive and attractive. But I read that this potential is designed for the atomic model. Could I extend this concept also for planets? I tried to think to the uniform circular motion, where the centripetal force constantly modify the velocity direction: so the body would escape (also for the planet) but is redirected every time. Through this example I imagined that the moon is trying to escape as the body in the circular motion but is constantly redirected. This could work, but I think this is not correct because, according to Einstein theory, the spacetime near Earth should be curved and constantly pull the moon toward Earth. This means it should be a collision. But collision doesn't happen, so according to my last theory, it should exists a force opposite to the gravitational one that should make all radiant forces null. I think the best reason is about Lennard Jones potential.
Why doesn't the Moon fall onto the Earth? For that matter, why doesn't anything rotating a larger body ever fall onto the larger body?
I have seen several similar questions on SO, but not exactly what I'm looking for. I want to use a variable in my regEx so that when I call it, I can easily pass in a number. Here's the hard coded regEx: 'mywonderfullString'.match(/.{1,3}/g) Here's what I need: 'mywonderfullString'.match(/.{1,variableHERE}/g) So when I call the regEx, I would do something like 'mywonderfullString'.match(/.{1,3}/g) I've seen some examples using the replace regEx, but I can't seem to my example working.
I would like to create a String.replaceAll() method in JavaScript and I'm thinking that using a regex would be most terse way to do it. However, I can't figure out how to pass a variable in to a regex. I can do this already which will replace all the instances of "B" with "A". "ABABAB".replace(/B/g, "A"); But I want to do something like this: String.prototype.replaceAll = function(replaceThis, withThis) { this.replace(/replaceThis/g, withThis); }; But obviously this will only replace the text "replaceThis"...so how do I pass this variable in to my regex string?
In my language, there is an expression for this - you can touch the tip of your nose normally, or you can move your hand behind your neck, across it, then touch the tip of the nose from the opposite side. I can't translate this to a concise and acceptable phrase/idiom, and the descriptive version loses its sheen in the verbose explanation. So what's a good phrase in English for this? I've heard of some close versions like: three right turns to make a left two steps forward, one step back (although this is usually in the context of progress) But they don't quite get the same feeling across.
For an example, I'll quote C.S. Lewis' The Voyage of the Dawn Treader: One day the cat got into the dairy and twenty of them were at work moving all the milk out; no one thought of moving the cat. Is there an idiom for this type of situation?
The Damage Resistances for a 5E Imp are: Cold; Bludgeoning, Piercing, and Slashing from Nonmagical Attacks that aren't Silvered Would this Imp be resistant to damage from a Mace of Warning? You could argue "Yes" because any Weapon of Warning should be considered a magical weapon, and therefore the damage it deals is considered magical. You could argue "No", with a liberal interpretation of the resistances, because the mace is not silvered.
I'm sure your first thought is, that's perfectly clear. Unfortunately my group who aren't normally rules lawyers disagree. Party encounters a (MM p.211). It has: Damage Immunities: bludgeoning, piercing, and slashing from nonmagical attacks not made with silvered weapons. My reading of that is if the weapon has to be magical and silvered to hurt it. So a +1 silver dagger will hurt it, but a +1 regular dagger or a +0 silver dagger won't. The group's interpretation was that all three of those weapons would hurt and only a +0 regular dagger would be ineffective. I would also note my interpretation would mean something like blade barrier would also not harm it since you could argue they're magical blades but nothing indicates that they're silvered. This also appears to be the same wording for some undead so I'm not looking for a lycanthrope specific interpretation but something general for every time that wording is used. Thanks in advance.
Why is the salt not more than 8 ~ 16 characters long? Also, why in most cases is it in the front or end of the password, and not in different positions? Is this to make it harder for the breaker? Or is it useless?
Any at all will obviously help when salting and hashing a user's password. Are there any best practices for how long the salt should be? I'll be storing the salt in my user table, so I would like the best tradeoff between storage size and security. Is a random 10 character salt enough? Or do I need something longer?
If I can't find the studs and I'm putting up shelves in my closet which is drywall,would it hold better if I used some kind of glue in the hole before I screw in the screw,??
WARNING: I'm not the greatest handyman. I bought a TV mount the other day, expecting to hang my heavy 40" TV above the fireplace. However, the instructions specifically say to first screw the mount into the studs in the wall. Unfortunately, I don't seem to have any (according to my brand-new seemingly-functional stud finder). Installing studs into the wall is not an option, and the TV is relatively heavy. My question is: What other options do I have? Could plugs possibly do the trick?
I'm making a minigame in which I'm adding a slowness factor when your health gets low. I'm trying to give Slowness I to anyone with less than 7 hearts and Slowness II to people with less than 4 hearts. The effect would disappear if your health was regenerated. Actually, I don't know where to even start. I made an objective scoreboard with health of every player using /scoreboard objectives add HealthBar health HealthBar, so what next?
I have a command that simply turns grass into dirt when a player stands on it. execute @p ~ ~ ~ detect ~ ~-1 ~ grass 0 setblock ~ ~-1 ~ dirt Is there any way to make this not happen when the player's health is full? (It may not involve any comparators, only command blocks as I am using a single command block generator, therefore it will come with a constant clock as well.)
Common atoms formed when the universe finally got cool enough for electrons to bind with atomic nuclei around the year 380,000. From what I understand this shift in state from plasma to discrete atoms allowed light to escape. How does this event relate to the baby pictures that we have of the universe? Is this the same light that escaped? Does that mean the light was all in the microwave spectrum? If so, how is it that we can still detect it today?
Where exactly does CMB come from. I've seen it in documentaries as a huge sphere with Earth in the middle. But if all this radiation was ejected from the start of the universe some time after the big bang; why can we see it? Surely the radiation should be travelling away from us? Just like every galaxy is?
I would like to think of "state of an object" as, classically, the simultaneous knowledge of its position, momentum, rotational angular momentum, orbital angular momentum, kinetic energy, etc. In quantum mechanics, "state of an object" would be simultaneous knowledge of the probability distributions of all the observables. But we are typically taught that "state" is a vector, sometimes is represented by a wave function if we are talking about its position and momentum in space sometimes is just an abstract vector if we are talking about spin. This definition of state does not seem to agree with what I want a state to be. But is the following true? Suppose a state induces a probability distribution for each observables, be it position, momentum, kinetic energy, spin, etc. There is no other state that induces the same probability distributions of observables. (if two states differ by a scalar multiple, they are considered the same) In particular, if two wave functions induces the same probability distributions of position and momentum, are they the same wave function? If two wave functions $f,g$ have such properties, then their probability amplitude are equal that $\lvert f(x)\rvert^2=\lvert g(x)\rvert^2$, meaning $f(x)=e^{i\theta(x)}g(x)$ for some real-valued function $\theta$. I believe $\theta$ may have to be a constant function if $f,g$ induces the same probability distributions of momentum. By the same arguments, their Fourier transform are related by $\hat f(k)=e^{i\phi(k)}\hat g(k)$. This should lead to $$\int_{-\infty}^{\infty}e^{i\theta(x)}g(x)e^{-ikx}dx=\int_{-\infty}^{\infty}e^{i\phi(k)}g(x)e^{-ikx}dx.$$Not sure how that is helpful.
Consider a "wavefunction" $\psi(x)$, which has a Fourier transform $\tilde \psi(p)$ Suppose that we know, for each $x$, $|\psi(x)|^2$, and that we know, for each $p$, $|\tilde \psi(p)|^2$. Have we enough information to reconstruct the "wavefunction" $\psi(x)$, that is, obtain the phase of the "wavefunction" for all $x$ (up to a global phase, we are only interesting to the relative phases between the $x$)?
I think I can conclude $f '$ is bounded implied by $f$ and $f''$ are both bounded straightly, but I'm stuck with proving $f'$ is bounded in this specific term. Can somebody help me?
I am trying to prove that if a function $f:\mathbb{R} \to \mathbb{R}$ is bounded and the second derivative $f''$ is bounded, then the first derivative $f'$ is also bounded. My hint is to use Taylor's theorem. I know for any $x$ and $y$, $f(y) = f(x) + f'(x)(y-x) + \frac{1}{2} f''(c)(y-x)^2,$ is the Taylor approximation where $c$ is some point in between $x$ and $y$. From this I get $$f'(x)(y-x) = f(y) - f(x) - \frac{1}{2}f''(c)(y-x)^2.$$ If $|f(x)| < C$ and $|f''(x)| < D$ are bounds, then $$|f'(x)| < \frac{|f(x)| + |f(y)|}{|y-x|} + \frac{1}{2} |f''(c)| |y-x| < \frac{2C}{|x-y|}+ \frac{D}{2}|x-y|.$$ I seem to be stuck at this point because both terms can be unbounded depending on $x$ and $y$. Thank you for any help.
Thank you for your help! functions.php function excerpt($limit) { $excerpt = explode(' ', get_the_excerpt(), $limit); if (count($excerpt)>=$limit) { array_pop($excerpt); $excerpt = implode(" ",$excerpt); } else { $excerpt = implode(" ",$excerpt); } $excerpt = preg_replace('`[[^]]*]`','',$excerpt); return $excerpt; } index.php <div class="post excerpt <?php echo (++$j % 2 == 0) ? 'last' : ''; ?>">
I have code in functions.php: function string_limit_words($string, $word_limit) { $words = explode(' ', $string, ($word_limit + 1)); if(count($words) > $word_limit) array_pop($words); return implode(' ', $words); } but i need to limit excerpt in number of characters, could you help me with that?
I need a way to monitor the accumulated total number of bytes written to the disk by a process via the terminal. I've looked around quite a bit, and found several answers either saying to use pv, or iotop. However, pv is not installed on macOS out-of-the-box, and the version of iotop installed on macOS lacks the -a accumulated switch. On top of that iotop requires SIP be disabled in newer versions of macOS, meaning it won't work with an out-of-the-box Mac. I need a method using tools built into macOS, they can require root access, they cannot require any non-stock macOS dependencies, e.g. Macports/Brew based software. Preferably in the stock version of Bash.
I have the same question this, but for macOS. There is a GUI solution with Activity Monitor. Any command line alternative? I use latest macOS Sierra.
From the , I need to check whether my computer is capable by using the command: lspci | grep -i nvidia but for my Thinkpad, this returns nothing. The document further says If you do not see any settings, update the PCI hardware database that Linux maintains by entering update-pciids (generally found in /sbin) at the command line and rerun the previous lspci command. I just don't understand what this means, who can tell me what to do next? Ps, this is my computer: OS: Ubuntu 18.04 LTS x86_64 Host: 4291RF4 ThinkPad X220 Kernel: 4.15.0-24-generic Uptime: 2 hours, 18 mins Packages: 3252 Shell: bash 4.4.19 Resolution: 1366x768 DE: Xfce WM: Xfwm4 WM Theme: Greybird Theme: Greybird [GTK2], Radiance [G Icons: Elementary-xfce-darker [GTK2 Terminal: terminator CPU: Intel i3-2310M (4) @ 2.100GHz GPU: Intel Sandybridge Mobile Memory: 2265MiB / 7859MiB
How can I know from the terminal or something whether my hardware supports CUDA?
I would like to know if an Echo, created by the Manifest Echo ability of an Echo Knight, can move through the space of another creatures (hostile or not)? I know characters cannot normally move through an enemy's space, and can move through an ally's space with some movement cost. But based on multiple unofficial , an Echo itself is not considered a creature, and instead is listed as an "image" and an "object" . It is also worth noting that and Echo "...occupies its space", per the subclass description, and thus I'm not sure how to rule it. This question relates directly to, ""
I've always been certain that the echo created by an Echo Knight fighter using their 3rd-level feature Manifest Echo is not defined in game terms as a creature, since the description of the echo never explicitly tells it is a creature. But the presence of people believing the echo to be a creature in lieu of the fact that it is immune to all conditions and might make saving throws (game characteristics typically associated with creatures only) brought this doubt to my mind. from Jeremy Crawford implies it is just an image and not a creature, further confirming that the feature should tell you, but implies that the echo is an object whilst the feature doesn't explicitly say so. (Included for reference and insight, since tweets are not eligible as official ruling) Is the echo a creature?
Why it doesn't allow me to resize my partition? I want to create separate partition for windows (7) but no idea how. /:
Previously, I have installed Windows 7 on my 320 GB laptop with three partitions 173, 84 and 63 GB each. The 63 GB partition was where the Windows was installed. The rest were for file containers. Now I changed my OS to Ubuntu 12.04 LTS. I installed Ubuntu by replacing the entire Windows 7 on the 63 GB partition. The rest of the partitions remain as an NTFS Windows partition and I can still access them both (the 173 and 84 GB partitions). Now I want to change the two partitions of Windows into an Ubuntu format partitions plus most importantly, I want to extend the 63 GB partition to more than a 100 GB because at the moment I am running out of disk space. Whenever I try to install any application, especially using wine, it always complains for a shortage of disk space. How do I do the extending activity before I entirely format my laptop again and lose all the important files on my partitions?
In k-fold crossvalidation, data is divided in k folds, then k-1 folds are taken for training and 1 fold is taken for validation. This process is repeated k times, taking a different fold for validation each time, so we end with k different models and k different results (although the results should be very similar if everything is OK) This is very useful to have an idea of the average performance of a classifier. Some validation folds may contain outliers which will give extreme results, but repeating for different validation sets solves this problem. Now my question: At the end I want a final model which is the one that I'll use to get the final results on the testing set, and the one that I'll end up using in production. Since in k-fold crossval I trained k different models, which one to I use as my "final" model? The one with better results? Do I train again a model this time using both train and validation sets as training? How can I go from a crossvalidation to a final model?
When performing k-fold cross validation, I understand that you obtain the accuracy metrics by pointing all the folds except one at that one fold and make predictions, and then repeat this process $k$ times. You can then run accuracy metrics on all of your instances (precision, recall, % classified correctly), which ought to be the same as if you calculated them each time and then averaged the result (correct me if I'm wrong). The end result you want is a final model. Do you average the models obtained to make your set of $k$ predictions to end up with the model that has the accuracy metrics obtained by the above method?
I've completed all the side quests and main quests for the guild but still haven't received the achievement for returning the thieves guild to its former glory. When I try to speak to Brynjolf he just keeps saying "sorry lad I've got important things to do" Any ideas how I can get this achievement?
One of the achievements for the Thieves Guild says "Restore the Thieves Guild to its former glory." Brynjolf doesn't say anything to me, I can't seem to find Karliah, and as far as I can tell, I am finished with the plotline quests for the Thieves Guild. All I have left available are repeatable quests from Vex and Delvin. How can I get this achievement?
I want to use different password to logging into desktop from what I can use for sudo -s or sudo -s -u root on terminal/bash. And also I don't want any additional users with different desktops(like windows). And I also don't want this to use to be able to even browse system folders and should only be able to play media and browse internet. Is there a way I can do this? I am using Ubuntu 20.04.1 with GNOME 3.36.4.
How can I give a user one password for normal usage when logging in, and another password for system administration and sudo access? I want one user to have two passwords.
The website www.itztechgadget.com isn't getting indexed at all. When I check about it in Websmater Tools, it shows 0 pages indexed. I'm not getting why is this problem happening. Googlebot fetches and submits it to be indexed but none of website's pages are indexed.
It's been sometime and Google has yet to index my site. How can I get Google to index my website?
This is a basic question. Is there a difference in doing def foo(*args, **kwargs): """standard function that accepts variable length.""" # do something foo(v1...vn, nv1=nv1...nvn=nvn) def foo(arg, kwargs): """convention, call with tuple and dict.""" # do something mytuple = (v1, ..vn) mydict = {nv1=nv1, ...nvn=nvn} foo(mytuple, mydict) I could do the same thing with both, except that the later has a weird convention of creating a tuple and dictionary. But basically is there a difference? I can solve the same computational problem of handling infinite things because dict and tuple can take care of that for me anyway? Is this more of an idiomatic part of Python i.e a good Syntactic Sugar for things that you do anyway? I.e function is going to handle this for you! PS: Not sure of so many downvotes though I agree this is a copy of and probably it should be corrected in the duplicate information. And that question has recieved upvotes. So am I being downvotes for not being able to find that?
In the following method definitions, what does the * and ** do for param2? def foo(param1, *param2): def bar(param1, **param2):
I came from Java where it's not allowed to decrease access modifiers in derived classes. For instnace, the following is not compile in Java: public class A{ public void foo(){ } } public class B extends A{ @Override private void foo(){ } //compile-error } But, in C++ it's fine: struct A { A(){ } virtual ~A(){ } A(A&&){ } public: virtual void bar(){ std::cout << "A" << std::endl; } }; struct B : public A{ private: virtual void bar(){ std::cout << "B" << std::endl; } }; int main() { A *a = new B; a -> bar(); //prints B } Where might it be useful? Moreover, is it safe to do so?
Is there is any reason to make the permissions on an overridden C++ virtual function different from the base class? Is there any danger in doing so? For example: class base { public: virtual int foo(double) = 0; } class child : public base { private: virtual int foo(double); } The says that it is a bad idea, but doesn't say why. I have seen this idiom in some code and I believe that the author was attempting to make the class final, based on an assumption that it is not possible to override a private member function. However, shows an example of overriding private functions. Of course recommends against doing so. My concrete questions: Is there any technical problem with using a different permission for virtual methods in derived classes vs base class? Is there any legitimate reason to do so?
My bank statement has a description column which tells me where I spent the money or where I got it from. Based on this information I fill a column manually to be able to catagroize these expenses - all the transactions of client A, all the transactions of amazon. this is based on me reading the description and finding a keyword. Can I automate this process. I tried with a extremely long formula - if(search("amazon",a1),"Amazon"), elseif(search ........ It's too complex and prone to errors. There would be around 20-30 catagories.
I have en excel file with expenses(the amount of money spent is in one column), and in next column I have short description that is mostly made of multiple words. I want to "simplify" the description and assign a single word or two to each description, which would be in another column next to it. The problem is that the description is not "unified", for example I can have strings like "business lunch","business dinner at restaurant XXX", "coffee with journalists" etc., and I would like to assign these description "food" label. There are also different categories that follow similar pattern. My idea was to create another table(on different sheet) - in one column I have keywords like "coffee","lunch","dinner" and in column next to them I labels that I want to have assigned, which is "food". I used vlookup function with approximate match, but it returns me incorrect results. For some reason the order of words in list seem to affect the results, and even though there is partial match(exact in one word of the string) the vlookup ignores it and returns something else. For example I have "parking at hotel xxx" and in table I have "parking"-"travel expenses" pair, the vlookup returns "food" label. Can you help me solve this problem? (is there different approach that you would suggest?)
I have two tables in the same database with matching email fields and they can easily be compared with 'inner join' - the first table is 'table1'. The second is Table2 the active users table in a membership site, for example using email as a common field SELECT * FROM TABLE1 INNER JOIN users ON TABLE1.email = TABLE2.email This query will give me ALL the users in the list that appear in both lists. What I'm looking for is the 'difference' i.e. the 'inverse' Namely, all the users in Table 2 that do NOT appear in Table 1 What is the MySQL syntax?
I've got the following two tables (in MySQL): Phone_book +----+------+--------------+ | id | name | phone_number | +----+------+--------------+ | 1 | John | 111111111111 | +----+------+--------------+ | 2 | Jane | 222222222222 | +----+------+--------------+ Call +----+------+--------------+ | id | date | phone_number | +----+------+--------------+ | 1 | 0945 | 111111111111 | +----+------+--------------+ | 2 | 0950 | 222222222222 | +----+------+--------------+ | 3 | 1045 | 333333333333 | +----+------+--------------+ How do I find out which calls were made by people whose phone_number is not in the Phone_book? The desired output would be: Call +----+------+--------------+ | id | date | phone_number | +----+------+--------------+ | 3 | 1045 | 333333333333 | +----+------+--------------+
For $a \in Z$, let $p(a)$ be the sum of the digits of $2^a$. For instance, $2^5 =32$ and $p(5)=3+2$. For what values of $a$ is $p(a)=p(a+1)$. How do I go about doing this? I know that the last digits of $2^a$ end in 2,4,6, or 8. I tried writing equations to represent the digits but nothing is working so far.
For $n\in\mathbb{N}^*$ we note $s(n)$ the sum of the digits of $2^n$. For example $s(4)=7$ because $2^4=16$. Is it possible to find an integer $n$ such that $s(n)=s(n+1)$?
Let $x,y$ be positive reals such that $x+y=2$. Prove that : $x^3y^3(x^3+y^3) \leq 2$ Source : INMO 2002 My attempt : I started with the left side of the inequality to be proved. $x^3y^3(x^3+y^3) = x^3y^3(x+y)(x^2+y^2-xy) = 2 x^3y^3(x^2+y^2+2xy-3xy)$ $=2x^3y^3(4-3xy)$ How to proceed ? Do I have to some AM-GM or Cauchy-Schwarz on particular set of values ?
If $x,y$ are positive reals such that $x+y = 2$ show that $x^3y^3(x^3+y^3) \leq 2$. I thought about working backwards on this one. We can try to prove that $x^3y^3(x^3+y^3) \leq 2$ is true by first realizing that $x^3+y^3 = (x+y)(x^2-xy+y^2)$ and substituting in for $x+y = 2$. We then get $x^3y^3(x^2-xy+y^2) \leq 1$. How do I prove this is true?
Prove $$0\leqq x^{2}+ y^{2}- 2\,x^{2}y^{2}+ 2\,xy\sqrt{1- x^{2}}\sqrt{1- y^{2}}\leqq 1 \tag{1}$$ with $$\left | x \right |,\,\left | y \right |\leqq 1 \tag{2}$$ My normal work $$\begin{cases} \left | x \right |\leqq 1 \Rightarrow -\,1\leqq x\leqq 1 \Rightarrow x\equiv \cos\alpha\,(\,0\leqq \alpha\leqq \pi\,) \\ \left | y \right |\leqq 1 \Rightarrow -\,1\leqq y\leqq 1 \Rightarrow y\equiv \cos\beta\,(\,0\leqq \beta\leqq \pi\,) \\ P\equiv x^{2}+ y^{2}- 2\,x^{2}y^{2}+ 2\,xy\sqrt{1- x^{2}}\sqrt{1- y^{2}} \end{cases}$$ $$\Rightarrow P= \cos^{\,2}\alpha+ \cos^{\,2}\beta- 2\,\cos^{\,2}\alpha\cos^{\,2}\beta+ 2\,\cos\alpha\cos\beta\sqrt{1- \cos^{\,2}\alpha}\sqrt{1- \cos^{\,2}\beta}$$ Otherwise $$\begin{cases} \sqrt{1- \cos^{\,2}\alpha}= \left | \sin\alpha \right |= \sin\alpha\,(\,\because\,0\leqq \alpha\leqq \pi\,) \\ \sqrt{1- \cos^{\,2}\beta}= \left | \sin\beta \right |= \sin\beta\,(\,\because\,0\leqq \alpha\leqq \pi\,) \end{cases}\begin{cases} \cos^{\,2}\alpha= 1- \sin^{\,2}\alpha \\ \cos^{\,2}\beta= 1- \sin^{\,2}\beta \end{cases}$$ $$P= \cos^{\,2}\alpha+ \cos^{\,2}\beta- 2\,\cos^{\,2}\alpha\cos^{\,2}\beta+ 2\,\cos\alpha\cos\beta\sin\alpha\sin\beta$$ The equality condition is $$\alpha+ \beta= \frac{\pi}{2},\,3\,\frac{\pi}{2}$$ I tried to solve the trigonometric equation of $$\begin{cases} \cos^{\,2}\alpha+ \cos^{\,2}\beta- 2\,\cos^{\,2}\alpha\cos^{\,2}\beta+ 2\,\cos\alpha\cos\beta\sin\alpha\sin\beta= 1 \\ \cos^{\,2}\alpha+ \cos^{\,2}\beta- 2\,\cos^{\,2}\alpha\cos^{\,2}\beta+ 2\,\cos\alpha\cos\beta\sin\alpha\sin\beta= 0 \end{cases}$$ but without success. I need to the help! Thanks! Little idea How about using vector? $$\begin{cases} \vec{a}= (\,a_{\,1},\,a_{\,2}\,) \\ \vec{b}= (\,b_{\,1},\,b_{\,2}\,) \end{cases}$$ $$\Rightarrow \left [ \,0\leqq (\,\vec{a}\,.\,\vec{b}\,)^{\,2}\leqq \left | \vec{a} \right |^{\,2}\left | \vec{b} \right |^{\,2}= 1\Leftrightarrow 0\leqq (\,a_{\,1}b_{\,1}+ a_{\,2}b_{\,2}\,)^{\,2}\leqq (\,a_{\,1}^{\,2}+ a_{\,2}^{\,2}\,)(\,b_{\,1}^{\,2}+ b_{\,2}^{\,2}\,)= 1\right ]$$ I can't continue!
I would appreciate if somebody could help me with the following problem Let $|x|\leq1, |y|\leq 1$. Show that $$ 0 \leq x^{2}+y^{2} -2x^{2} y^{2}+2xy \sqrt{1-x^{2}} \sqrt{1-y^{2}} \leq 1 $$
A similar question was asked here, and closed as a duplicate, but none of the referenced questions answered the actual question posed, I'm asking it again. I have a similar situation with a Macbook Air 2013 running Cataline 10.15.5. Having read and applied the suggestions in those referenced questions, I'm left with the same issue here. Note the 33gb of "Other" in the last line. It appears that the "Other" doesn't appear in the file-browser under documents. Effectively, a quarter of my disk is "dark matter" which I can't identify, and thus either use or remove. I've run First Aid on the disk in recovery mode, and that didn't find any issues.
Every few days I get notices on my MacBook that it's running or run out of hard drive space. Curiously, restarting the computer will enable me to recover gigabytes of space (this past time, it was able to recover about 2.2GB). However, I can't identify anything in my personal activity that consumed that space. It's possible that it's a rogue iTunes podcast or a huge software update that my Mac is automatically downloading - would either of these reclaim the space upon a restart? One possibility that I can think of is that FileVault has some sort of disk leak, allocating but not freeing files. Does this make sense? Is there a tool that I can run to determine where this space is going? Assuming it is FileVault, should I try to disable it? What's the best way to turn of FileVault on a nearly full computer?
I have four Dictionary , two are (dictionary within Dictionary), declaration shown below Dictionary<string, Dictionary<string, string>> dict_set = new Dictionary<string, Dictionary<string, string>>(); Dictionary<string, Dictionary<string, string>> dict_Reset = new Dictionary<string, Dictionary<string, string>>(); Dictionary<string, string> set_value = new Dictionary<string, string>(); Dictionary<string, string> Reset_value = new Dictionary<string, string>(); I want to first add elements in dictionary set_vlaue and Reset_value. once the values are added then i am adding these dictionaries to other two dictionaries as shown below. dict_set.Add(condiName, set_value); dict_Reset.Add(condiName, Reset_value); set_value.Clear(); Reset_value.Clear(); the values are getting added , but after adding set_value and reset_value dictionaries , i want to clear these two dictionaries set_value and reset_value,but problem occurs that when set_value and reset_value are cleared the data from dict_set and dict_reset is also cleared.. can any one help me , to how to create deep copy of dictionaries in this case...
I've got a generic dictionary Dictionary<string, T> that I would like to essentially make a Clone() of ..any suggestions.
I need the twisted framework (Python) for a qgis plugin on Windows 7. I installed it with the pip installer. When I want to start the plugin it doesn't find twisted. When I start a python interpreter in the cmd.exe twisted can be imported. this is my path variable: C:\Python27\Lib\site-packages;C:\BIN;C:\Python27\Scripts;C:\Python27; twisted is installed inside C:\Python27\Lib\site-packages How should I install a python package when I want to use it inside QGIS?
How can I use 3rd party libraries on QGIS plugins on Windows? I've developed a plugin that uses rasterio and numpy for a customer, but he's having problems installing rasterio and numpy. Actually rasterio and numpy were installed in it's main system Python (C:\Python27), but I need QGIS Python to recognize it.
Will anything go wrong??? I'm so scared... I can't even sleep anymore.. It was a phone call telling me about some kind of benefit I gave out my name, address, phone number, DOB, and email address and nothing else Will I be OK??? I'm so scared help me
Updated question because old one was embarassing: I saw a spam email from "PayPal" and I didn't realize that it was a phishing attempt. I gave the phishing site my name, telephone number, and email. What could he do with them? Old question: Well, I saw a spam email, but I didn't realize that it's really a scam at first. I gave him my telephone number, address, and name. What would he do with them? Could he ruin ALL of my reputation with it?
I am new to the selenium automation world, Getting java.lang.NullPointerException error which trying to call the function to take a screenshot in a test method on Selenium. I am pretty sure I have missed initialize or return the driver somewhere. below is the code. baseTest class where I am initializing the webdriver public class baseTest { public Properties objProp = new Properties(); FileInputStream readProp; { try { readProp = new FileInputStream("C:\\Users\\kiran\\IdeaProjects\\SelProject2\\src\\test\\java\\appDetails.properties"); objProp.load(readProp); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } protected WebDriver driver; @BeforeClass public void beforeSuite() { System.setProperty(objProp.getProperty("browser"),objProp.getProperty("driverPath")); driver = new ChromeDriver(); driver.manage().window().maximize(); driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS); driver.get(objProp.getProperty("URL")); } @AfterSuite public void afterSuite() { if(null != driver) { driver.close(); driver.quit(); } } public WebDriver getDriver() { return driver; } } All my tests extends the baseTest function link shown below public class loginFunction extends baseTest { guruLoginPage objLogin; guruHomePage objHome; takeScreenshot objSS = new takeScreenshot(driver); //readExcel readObj; @Test public void performLogin() throws IOException, InterruptedException { objLogin = new guruLoginPage(driver); String loginPageTitle = objLogin.getTitle(); Assert.assertTrue(loginPageTitle.contains("Demo Site")); objSS.screenshot(); objLogin.loginAction(objProp.getProperty("appUsername"), objProp.getProperty("appPassword")); Thread.sleep(2000); objHome = new guruHomePage(driver); Assert.assertTrue(objHome.validateLogin().contains("Manger Id : mngr242657")); Thread.sleep(2000); objSS.screenshot(); } } when i write this piece of code in the loginfunction, it works fine, but when i am trying to optimize and put it in a separate class and call the method I am getting java.lang.NullPointerException error public class takeScreenshot{ WebDriver driver; public takeScreenshot(WebDriver driver) { this.driver=driver; PageFactory.initElements(driver,this); } public void screenshot() throws IOException { String fileSuffix = DateTime.now().toString("yyyy-dd-MM-HH-mm-ss"); TakesScreenshot ss = ((TakesScreenshot)this.driver); File srcFile = ss.getScreenshotAs(OutputType.FILE); FileUtils.copyFile(srcFile,new File("C:\\Users\\kiran\\IdeaProjects\\SelProject2\\src\\test\\java\\Screenshots\\"+fileSuffix+".jpg")); } }
What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them? What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?
I have a very specific command I'd like anyone to be able to run. For the sake of example, let's pretend the command is ip addr flush dev foo0. I found and . Unless I'm misunderstanding something, I think it's exactly what I need. echo "ip addr flush dev vboxnet0" > script.sh chmod +x script.sh chmod +s script.sh sudo chown root script.sh sudo chgrp root script.sh But then, ./script.sh Failed to send flush request: Operation not permitted Why?
I have a simple shutdown script which i want to run as root shutdown -h +30; echo "succesfull"; I have followed these answer, to make my script root. first I run this command sudo chown root.root $HOME/test/test.sh sudo chmod 4755 $HOME/test/test.sh and then made changes in sudoers sudo visudo added this command after this line %sudo ALL=(ALL:ALL) ALL eka ALL=(ALL) NOPASSWD: $HOME/test/test.sh But when i executed my script its showing this error shutdown: Need to be root succesfull
I followed this tutorial () for an expandable list view, in which I enter different shop names, categorized by the part of town they are located: But there is obviously no need to have the same group several times (which is the case for Neukölln for example). Here is what I tried to do: SparseArray<Groups> groups = new SparseArray<Groups>(); DatabaseHandler db = new DatabaseHandler(this) ; List<Shop> shops = db.getAllShops(); Groups group = null ; String str = "null" ; int i = 0 ; for (Shop shop : shops){ // if current shop's district differs from district of the shop of the last iteration if ( shop.getDistrict() != str ) { // making sure that empty group is not appended into groups in the first iteration if (group != null) { groups.append(i, group); i++; } // saving the district of the current shop str = shop.getDistrict(); // creating a new group named after the current district group = new Groups(str); } // adding shop name to the current district group.subitems.add(shop.getName()) ; } // after last iteration the last group needs to be appended to the groups groups.append(i, group); I hope you can understand the basic idea of my code. I sure it has to work out, because I went through it on paper and in theory it works. My first idea was that those if-statements are responsible, but I have no clue how to repair this.
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 just been asked to review a few questions for closing that don’t seem to have any close votes, e.g.
I've just been offered the wonderful opportunity to review . ... but on closer inspection ? Is this (e.g I'm assuming this post did previous have a close vote, but has now aged away in ways I don't understand), or should questions with no active close votes be removed from the queue. p.s. If it's , please expect my asking for this not to be the case ;).
Only by being forced to defend an idea against the doubts and contrasting views of others does one really discover the value of that idea. What is the function of "does" in that sentence?
I have seen this construction quite often: Online ads have been around since the dawn of the Web, but only in recent years have they become the rapturous life dream of Silicon Valley. What is the rule there?. When your sentence doesn't start with pronoun + verb, invert them as verb + pronoun?. I know it sounds awkward but is it possible (grammatically correct) to use something similar to: Online ads have been around since the dawn of the Web, but only in recent years they have become... And in any case, does this only work with have (or has)? Maybe it works fine with 'had' but I can't think of an example right now.
My setup is as follows: Windows 10 Pro with one real (integrated) NIC enabled. The latest available Bonjour for Windows is installed Two virtual machines running Linux One other Windows laptop on the network Let's call the Linux VMs A and B, and the two Windows devices X and Y. X is the VM host. A can ping and connect to B, B can ping and connect to A. X cannot connect to A or B, neither A or B can ping or connect to X. Y can connect to A and B and vice-versa. This is not a firewall issue as nothing changes when the Windows Firewall is completely disabled on X.
Up until a few hours ago, my VirtualBox setup worked perfectly, Windows 10 Host, Ubuntu 15.04 Server and Linux Mint 17.2 guests. Both guests set to bridged networking mode and every device on my home network could talk with every other one (guests with the router, host with the guests etc.). My router/modem is a , issued by my ISP, with its default DHCP settings and no additional settings like client isolation etc. set. Without any deliberate change in configurations, suddenly the communication between my host machine and the guest machines does not work anymore. They can still both talk with everything else and have working IPs. None of my machines or network equipment block pings. I already reinstalled my VirtualBox and spun up a new Ubuntu 15.04 Server VM, but with no different results. The communication does work with the Host-Only network setting, but I would much prefer bridged mode, to be able to access the machine from other ones easily as well and I cannot fathom why it suddenly would stop working. What could be the reason for this behaviour and are there any ways to fix it?
After the 'great recalc', do migrated questions and answers, and comments, and flags, and votes et al now count for reputation points on the destination site? This wasn't made completely clear in the blog post...
When a question is migrated, is the reputation earned by its author on the original site subtracted from the author's total? What about votes? Badges? Do the same rules apply to the question's answers?
There's two notions of equivalent polynomials floating around, one saying that $f = g$ iff they're equivalent as maps, and the other saying $f = g$ iff they're equal on each coefficient when written in standard form. I'm interested in polynomials over a finite field, irreducible polynomials and factoring so what type of equivalence should I use? For instance if we take map equivalence, then there are only a finite number of polynomials. And that makes a huge difference! Please explain when it's okay to use what.
In the following I'm going to call a polynomial expression an element of a suitable algebraic structure (for example a ring, since it has an addition and a multiplication) that has the form $a_{n}x^{n}+\cdots+a_{1}x+a_{0}$, where $x$ is some fixed element of said structure, a polynomial function a function of the form $x\mapsto a_{n}x^{n}+\cdots+a_{1}x+a_{0}$ (where the same algebraic considerations as above apply) a polynomial an element of the form $a_{n}X^{n}+\cdots+a_{1}X+a_{0}$ with indeterminates $X$ (these can be formalized, if we are in a ring, with strings of $0$s and a $1$). Note that when we are very rigorous/formal, polynomial expressions and polynomials are something different (although in daily life we often use them synonymously). Polynomial functions and expressions are also different from each other although in this case the relationship is a closer one, since every polynomials expression can be interpreted as a polynomial function evaluated at a certain point (thus "polynomial functions" are something more general than "polynomial expressions"). My question is: Why do we use polynomials ? It seems to me that every piece of mathematics I have encountered so far, one could replace every occurrence of polynomials with polynomial expressions/functions without any major change in the rest of the proof/theorem/definition etc. The only reasons that I can see to use polynomials are the following two:$$ $$ 1. After one makes the idea precise that one can plug "suitable" elements into polynomials (which may lie a ring containing the ring in which the coefficients live in), one can save time in certain setting, by handling the "plugging of suitable elements into polynomials" more elegantly: For example in case of the theorem of Cayley-Hamilton, which in its "polynomial function" version would look like: Let $A$ be an $n\times n$ matrix over $K$, whose characteristic polynomial (function) is $x\mapsto a_{n}x^{n}+\cdots+a_{1}x+a_{0}$. Then $$ a_{n}A^{n}+\cdots+a_{1}A+a_{0}I=0. $$ whereas the "polynomial" version looks more elegant: Let $A$ be an $n\times n$ matrix over $K$, whose characteristic polynomial is $p_{A}\in K\left[X\right]$. Then $$ p_{A}\left(A\right)=0. $$ 2. The only thing that polynomials can "do", but algebraic expressions/functions can't, is to be different, when the algebraic expressions/functions are the same (i.e. there's a theorem that tells us that the mapping of polynomials to polynomials expressions/functions isn't injective, if the field is finite). Maybe this small difference makes a big enough difference to consider polynomials after all, but as I said, I haven't encountered any situation in which this difference could manifest itself. (I'm guessing that maybe cryptography or higher number theory really needs polynomials and not just polynomial expressions/functions. Since I don't know anything about these subjects, I would be very happy with an example of a theorem (whose content isn't merely technical as it is the case with the theorem above) involving polynomials, where these absolutely cannot be replaced by polynomial expressions/functions. Conversely I would also be happy with an authoritative statement from someone knowledgeable that indeed we could dispense of polynomials, if we wanted to.)
\documentclass{article} \usepackage{amsmath} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \begin{document} \begin{align} \hat{\alpha} &= \begin{cases} \tan^{-1}\frac{\hat{\alpha_1}}{\hat{\alpha_2}}, \, &\text{if } \hat{\alpha_1}>0 \, \hat{\alpha_2}>0 \\ \tan^{-1}\frac{\hat{\alpha_1}}{\hat{\alpha_2}}+\pi, \, &\text{if } \hat{\alpha_1}<0 \\ \tan^{-1}\frac{\hat{\alpha_1}}{\hat{\alpha_2}}+2\pi, \, &\text{if }\hat{\alpha_2}<0 \, \hat{\alpha_1} >0 \\ \text{undefined}, & \hat{\alpha_2}=0 \, \hat{\alpha_1}=0 \end{cases} \end{align} \end{document} I need to numbering of this cases but when i put align code , the file not compiling because \par .... what is wrong please help me i attempt every probability to solve this
$$\hat{\alpha} = \begin{cases} \tan^{-1}\frac{\hat{\alpha_1}}{\hat{\alpha_2}}, \, if \hat{\alpha_1}>0 \, \hat{\alpha_2}>0 \\ \tan^{-1}\frac{\hat{\alpha_1}}{\hat{\alpha_2}}+\pi, \, if \hat{\alpha_1}<0\\ \tan^{-1}\frac{\hat{\alpha_1}}{\hat{\alpha_2}}+2\pi, \, if \hat{\alpha_2}<0 \, \hat{\alpha_1} >0 \\ undefined, \hat{\alpha_2}=0 \, \hat{\alpha_1}=0 \\ \end{cases}$$ This message appears Paragraph ended before \cases was complete <to be read again> \par What does it mean? how i can write in latex programme
I have a dataset with lots Y=0 and few Y=1. I have to run logistic regression, so I'm using a retrospective sample in order to get a more balanced sample. Could someone give me some references that explain which are the problems arising when I use logistic regression in an unbalanced sample? I kwow that the main problems are instability of estimated coefficients and poor predictive power of the model, but I need some references.
Okay, so I think I have a decent enough sample, taking into account the 20:1 rule of thumb: a fairly large sample (N=374) for a total of 7 candidate predictor variables. My problem is the following: whatever set of predictor variables I use, the classifications never get better than a specificity of 100% and a sensitivity of 0%. However unsatisfactory, this could actually be the best possible result, given the set of candidate predictor variables (from which I can't deviate). But, I couldn't help but think I could do better, so I noticed that the categories of the dependent variable were quite unevenly balanced, almost 4:1. Could a more balanced subsample improve classifications?
I have downloaded 18.04.3 to a USB drive and cannot get it to install. What do I do after downloading? I am running an older version of Ubuntu
This is the third time I've tried to install Ubuntu Server 14.04.03 64-bit on the same laptop, and each time it caused different problems. Each time I wrote the same iso image to a USB flash drive by using a different application and OS. Universal USB Installer (pendrivelinux.com) from Windows WinImage writer from Windows built-in image writer from Linux Mint 17.2 The iso image is the same in all three cases, the USB flash drive is the same, and the laptop is the same. However each time the installation of Ubuntu gave me different installation options. For example, the last time I installed Ubuntu, it didn't show all the packages to choose while installing (Basic Ubuntu server, etc.).
I'm not sure if this type of matrix has a name, but I feel as if there's a trick to finding the eigenvalues that i'm missing: $$ a \in R $$ $$ M = \begin{bmatrix} 1 + a & 1 & 1 \\[0.3em] 1 & 1 + a & 1 \\[0.3em] 1 & 1 & 1+ a \end{bmatrix}$$
I have been working on this problem for a couple hours and am completely stuck. Any help would be greatly appreciated. Let $A$ be the $n \times n$ matrix which has zeros on the main diagonal and ones everywhere else. Find the eigenvalues and eigenvectors of $A$.
So basically before Ubuntu 13.04 I was running 12.10. I had Windows Boot Loader the default. If I chose to boot to Ubuntu, it would go into grub, but grub was set to 0 seconds so it would basically skip grub and just go straight into ubuntu. Now, after upgrading, Grub is back. I used EasyBCD to get everything correct on the Windows side but now I cannot figure out for my life how to get grub to appear AFTER Windows Boot Loader. I tried to go into the grub config and change the default to 4, which is the line where Windows is on. All that did was highlight Windows on start instead of going straight into the Windows Boot Loader first. I also tried to use Boot Repair to change "OS to boot to by default" to Windows, which also did not work. Can someone please help me get it back to how it was? I've been trying for hours.
As noted by many people, Windows 8's UEFI requirements might will won't get in the way of installing Linux (or whatever), as the replacement bootloader will also need to be signed somehow. Some systems All systems will let you disable the signature requirement, but the feature might be hidden to disable or you might not be willing to give up on the benefits of a secure bootloader. Is it necessary to replace the bootloader in the first place? To keep ourselves to software that's gone golden, how can I install Ubuntu 11.04 using Windows 7's own bootloader?
I have a very bad undergraduate academic record -- I failed or didn't attend the end semester exams for many courses (15 courses, to be exact!), and I had to clear these later on, towards the end of my course. Admissions to graduate courses in my country (India) are based on entrance examinations (and not your profile or UG record) -- which I've cleared and I'll be going to one of the best universities in my country. I wish to do a PhD, and I want to keep options in the US or UK open. I intend to study well in my masters and get good scores, and, going by what I've done in the past couple of years, I think I'll be a lot more disciplined in my masters. My only worry is: will my undergraduate record be a bottleneck no matter how hard I try in my masters? Should I just go into the industry after my masters? I really want to do a PhD! My overall undergrad GPA is bad (2.72), with, as I've said, 15 "backlogs" (exams that I didn't attend or failed, and cleared later on). However, during the last 3 semesters, I took no backlogs and I averaged above 3. During the final two semesters, I averaged 3.2 and in the final semester I got a 3.4.
When applying to a PhD program in the US, how does the admissions process work? If an applicant is weak in a particular area, is it possible to offset that by being strong in a different area? Note that this question originated from this . Please feel free to edit the question to improve it.
The workout that $\Delta K.E.$ is less than zero is attached. But where does this energy go. It is transformed back to rotational KE if moment of inertia decreases. How would you account for the change in Kinetic energy?
I know this question is asked here a lot, but I just had to ask this to finalise the concept. When a system lets say a rod of length $L$ and mass $M$ is rotating with angular speed $omega_1$ its initial angular momentum is $L1 = (1/12)ML^2\omega_1$ and its initial kinetic energy is $KE = (1/24)ML^2{\omega_1}^2$. Now after some time the rod is folded in half its angular momentum kept conserved i.e. without applying any external force or torque, its new angular velocity becomes $\omega_2 = 4\omega_1$ and its new kinetic energy becomes $KE_2 = (1/6)ML^2{\omega_1}^2$. This is 4 times the original kinetic energy when no external force works, since the rod is folded, you can even say melted and formed into a smaller and denser rod, it has not undergone compression/expansion of any sort but still there is change in kinetic energy. The most sense I could make out of this was that all the particles while rotating felt a centripetal force and the particles of half of the rod under this force went in its direction and did some work which appears as the change in kinetic energy. I have written the same and a proof as an answer . Now if I am write in my concept where did this energy come from, tension was providing the centripetal force but no work was done against tension as the rod was folded in half not compressed. If I am wrong then where did the energy come from? Extra: I also tried the analogy of this question in translatory motion, suppose there is body of mass $m$ moving with velocity $v$ suddenly, its mass becomes $m/2$ then its velocity becomes $2v$ and its KE becomes $4KE_1$ there is no need to explain the energy conservation here since mass suddenly does not disappear into thin air, however moment of inertia can be changed and hence the question. Addendum : Since folding the rod seems to bring about unnecessary questions about ways of folding, you can imagine that if rod was melted and formed into a longer rod all the while the system was rotating and angular momentum conserved, then new length becomes $2L$ new angular velocity becomes ${\omega_1}/4$ and new KE becomes $(1/96)ML^2{\omega_1}^2$. This time the energy becomes ${1/4}^{th}$ of the initial, where did this energy go to ? Certainly movement against centripetal force takes place, but since there is no extension in existing rod, energy can not be stored as spring energy in it, or so I think.
Which is better? "You" vs. "Yourself" (referring to God) "Draw us close to You." or "Draw us close to Yourself." "Bring us back to You." or "Bring us back to Yourself."
I'm confused by why people use the following: It's up to yourself. Rather than: It's up to you. Another example of this would be: Please feel free to contact ourselves if you have any problems. Rather than: Please feel free to contact us if you have any problems. Are both of these correct? Is there any reason for using the former?
I want to show that on a geodesic we have for a particle $$\nabla_mT^{mn}=0$$ where $$T^{mn}=\frac{m}{\sqrt{-g}}\int d\tau~ u^mu^n\delta^4(x-x(\tau)).$$ So I found $$\nabla_mT^{mn} =\partial_mT^{mn}+\Gamma^m_{ml}T^{ln}+\Gamma^m_{ml}T^{ln}\\ \partial_m\left(\frac{m}{\sqrt{-g}}\int d\tau ~u^mu^n\delta^4(x-x(\tau))\right) =\frac{m}{\sqrt{-g}} \times \\ \int d\tau \left[(\partial_mu^m)u^n\delta^4(x-x(\tau))+ u^m(\partial_mu^n)\delta^4(x-x(\tau))+u^m u^n \partial_m\delta^4(x-x(\tau))\right]$$ How do I continue from here? I know that I will eventually need to use the geodesic equation and the $\delta^4(x-x(\tau))$ term will cancel stuff. But how do I use these things here?
I am stuck with an exercise in Sean Carroll's Spacetime and Geometry (Chapter 4, Exercise 3). The goal is to show that the continuity of the energy-momentum tensor, i.e. \begin{equation} \nabla_\mu T^{\mu\nu}=0\tag{1} \end{equation} is equivalent to the geodesic equation in the case of a free particle. The energy-momentum tensor of a free particle with mass $m$ moving along its worldline $x^\mu (\tau )$ is \begin{equation} T^{\mu\nu}(y^\sigma)=m\int d \tau \frac{\delta^{(4) }(y^\sigma-x^\sigma(\tau ))}{\sqrt{-g}}\frac{dx^\mu}{d\tau}\frac{dx^\nu}{d\tau}.\tag{2} \end{equation} Taking the covariant derivative of this tensor gives $$\begin{align} \nabla_\mu T^{\mu\nu}=&m\int d \tau \nabla_\mu\left[ \frac{\delta^{(4)}(y^\sigma-x^\sigma(\tau ))}{\sqrt{-g}}\right]\frac{dx^\mu}{d\tau}\frac{dx^\nu}{d\tau}\cr &+m\int d \tau \frac{\delta^{(4)}(y^\sigma-x^\sigma(\tau ))}{\sqrt{-g}}\nabla_\mu\left[\frac{dx^\mu}{d\tau}\frac{dx^\nu}{d\tau}\right].\tag{3} \end{align}$$ The first covariant derivative of the right-hand side of the above equation reduces to an ordinary partial derivative, as the argument is a scalar. This allows us to apply partial integration to this term. The second covariant derivative has an argument that is not explicitly dependent on $y^\sigma$, so the covariant derivative can be written as a multiplication of this tensor with the appropriate Christoffel symbols. This finally leads us to $$\begin{align} &-m\int d \tau \frac{\delta^{(4)}(y^\sigma-x^\sigma(\tau ))}{\sqrt{-g}}\frac{d^2x^\nu}{d\tau^2} \cr &+ m\int d \tau \frac{\delta^{(4)}(y^\sigma-x^\sigma(\tau ))}{\sqrt{-g}}\left[ \Gamma^\mu_{\mu\sigma}\frac{dx^\sigma}{d\tau}\frac{dx^\nu}{d\tau} + \Gamma^\nu_{\mu\sigma}\frac{dx^\mu}{d\tau}\frac{dx^\sigma}{d\tau} \right].\tag{4} \end{align}$$ The continuity equation requires \begin{equation} -\frac{d^2x^\nu}{d\tau^2} + \Gamma^\mu_{\mu\sigma}\frac{dx^\sigma}{d\tau}\frac{dx^\nu}{d\tau} + \Gamma^\nu_{\mu\sigma}\frac{dx^\mu}{d\tau}\frac{dx^\sigma}{d\tau}=0.\tag{5} \end{equation} This is the geodesic equation with an extra term, i.e. the term in the middle and with an incorrect sign for the first term. Can I get rid of this term in the middle by changing the parameter $\tau$ of the worldline? What about the incorrect sign? What did I do wrong?
At void, an object with velocity v, mass m collides with an object with the same mass m at rest. Let's assume that they were connected to each other(the instant after the collision). then it would be double the mass and half the velocity $E = \frac{1}{2}2m(\frac{v}{2})^2 = \frac{1}{4}mv^2$ There is no PE in the object. Why would it lose KE and Where does the KE go?
In inelastic collisions, kinetic energy changes, so the velocities of the objects also change. So how is momentum conserved in inelastic collisions?
I am doing a disk to disk copy on a PC and the transfer rate is surprisingly slow. It is a Windows XP machine, which means the operating system is faster than newer generation Windows LOL (the funny part is that I am not even kidding, the XP machine is literally faster than my Windows 10 machine, is it funny or just sad?). I am using Multi Commander to do the transfer. Both of the drives are normal hard drives of sizes of about 500 GB. Many of the files are relatively small, between 50 KB and 500 KB, but some files are megabytes in size. The total number of files is about 1.2 million and the total size of the transfer is 54 GB. According to Multicommander, the average speed is 304 KB/s which seems incredibly slow to me and is taking literally days to transfer the 54 GB required. It seems like the small files are the problem because most of the time the transfer speed is listed as 4 or 8 KB/s which is INSANELY slow. I think the speed just increases exponentially when a larger file is transferred. So, if this is indeed the problem, a 4 KB/s speed on small files, what could be causing this?
I noticed that if I transfer a few large files between two hard drives, it's pretty speedy, at around at least 30 MB per second, but if I transfer thousands of files less than 5 KB, it is pretty damn too slow.. around 1 to 2 MB per second. Is there a way to speed up the copy/paste process with thousands of small files on Windows 7?
does not work in my case. Terminal:/$ sudo add-apt-repository ppa:/alexlarsson/flatpak Output:Err:17 http://ppa.launchpad.net/alexlarsson/flatpak/ubuntu cosmic Release 404 Not Found [IP: 91.189.95.83 80]
When updating, I get the following error message: W: The repository 'http://ppa.launchpad.net/mc3man/trusty-media/ubuntu xenial Release' does not have a Release file. Here, I find another statement on this error: This recommends removing certain PPAs; and, I'm not sure if I should do that since it might mean not getting the updates that I need. Is this what I should do?
I know I have to prevent db injections by using the mysqli_real_escape_string() but where best should I use it? When declaring variables? e.g. $username = mysqli_real_escape_string($link, $_POST['username']); OR inside the SELECT / INSERT mysql queries? OR somewhere else? Also, do I have to prevent db injection in md5 password? e.g. $password = mysqli_real_escape_string($link, md5($_POST['password']));
If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example: $unsafe_variable = $_POST['user_input']; mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')"); That's because the user can input something like value'); DROP TABLE table;--, and the query becomes: INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--') What can be done to prevent this from happening?
New Modified Selection Sort Algorithm (It outperforms Insertion Sort in some cases) goes like standard Selection Sort Algorithm , but instead searching for only a minimum in an Array , it searches for minimum and maximum in one iteration. Then it swaps minimum to start of an Array and maximum to end of an Array. Increments start_pointer, decrements end_pointer, and then goes iterative again. I think time complexity it needs to sort N size array is : N + (N-2) + (N-4) + (N-6) + ... + 1. Can someone give me approximation of this formula. I will be appreciated. public static void DoubleSelectionSort(int[] Array, int startpos, int endpos) { /*Double Selection Sort Algorithm , made by Milan Domonji 1986 , [email protected]*/ while(startpos < endpos) { int min = Integer.MAX_VALUE; int max = Integer.MIN_VALUE; int minpos = startpos; int maxpos = endpos; for(int i = startpos; i <= endpos; i++) { //main loop that finds minimum and maximum from an Array if (Array[i] <= min) { min = Array[i]; minpos = i; } if (Array[i] >= max) { max = Array[i]; maxpos = i; } } /* I added missing part of algorithm so it works now (Edited) */ if (maxpos==startpos && minpos==endpos) { Swap(Array, minpos, maxpos); }else { if (maxpos==startpos) { Swap(Array,minpos,startpos); Swap(Array,minpos,endpos); }else { Swap(Array,minpos,startpos); Swap(Array,maxpos,endpos); } } startpos++; endpos--; } } private static void Swap(int[] Array, int A, int B) { int tmp = Array[A]; Array[A] = Array[B]; Array[B] = tmp; } Algorithm Sorts all the times correctly.
Most people with a degree in CS will certainly know what . It helps us to measure how well an algorithm scales. But I'm curious, how do you calculate or approximate the complexity of your algorithms?
When applying for a Schengen visa, can I use fixed deposit to prove my intention to return after my visit to my friend in Latvia?
I am considering whether there is any paperwork I should be collecting for future tourist visa applications. I am a British Citizen, US Permanent Resident, and my recent travel outside the US and EU has been group tours and cruises. I have been treated as having low risk of overstay etc. However, bureaucracy happens, and I want to be prepared. The potential problem is that I am retired. No job, no school. A lot of visa granting seems to depend on jobs to prove monthly income and intent to return home. I transfer a fixed allowance from an investment account to my checking account each month, and treat that as though it were my income. The investment account can go up and down in value quite dramatically over periods of months, because it contains stocks and bonds as well as cash equivalents. I have no family in the US. I do have a house I like, and consider my home. Is there any paperwork should I be collecting to maximize my chances of getting any tourist visas I might want in the future? Possible non-EU countries include Russia, Mongolia, and several countries in sub-Saharan Africa. EU may become an issue, depending on the terms of the Brexit divorce. ======================================================================= I agree with the comments that I am likely to get most visas with no problem. That has been my practical experience. The question is what I should do to guard against exceptions, such as an excessively bureaucratic process requiring me to prove intent to return home.
Let $Z$ be a closed set in a quasi projective variety $X$. My question is what can we say about $Z$ if $\dim Z=0?$ I know $\dim Z=0$ implies all irreducible components of $Z$ is zero-dimensional.
In the book , at page 27 we find the exercise asserting that Exercise I.XXXVI. The underlying space of a zero-dimensional scheme is discrete; if the scheme is Noetherian, it is finite. Thoughts I thought that a zero-dimensional scheme is one such that, in every local ring $\mathscr O_{X,p}$, the only prime ideal is its unique maximal ideal $\mathfrak m_{X,p}.$ Hence, supposing that $X=\operatorname{Spec} R$ is affine, we deduce that every prime ideal is maximal, so each ponit in $X$ is closed. But how does this imply the discreteness? It only implies the Hausdorff-ness of $X$, right? Furthermore, I cannot perceive what the "Noetherianity" has to do with the finiteness claimed here. In the affine case, it seems to be claiming that there are only a finite number of prime ideals in a Noetherian ring, if its scheme is zero-dimensional? For example, $\mathbb Z$ is a Dedekind domain, hence its scheme is zero-dimensional, but it has infinitely many primes: does this contradict the statement? Thanks in advance for any reference or hint, and point out any inappropriate point if any is presented. Edit I see why my example cannot work now: it is one-dimensinoal: don't forget the pirme $(0)$. But I am still wondering why the statement is true...
Looking for recommendations for simple bookkeeping software for Linux. Basic check register. Prefer to be able to transfer existing basic data from Quicken if possible.
I plan on switching my parents company to Ubuntu (or K or X, haven't decided yet) and one of the most important things is if there is a Quickens equivalent available for any of them? Something to manage taxes just as well.
If gravity can bend light, why can't gravity slow light. At least momentarily? Wouldn't that give the illusion of the universe expansion speeding up?
I read (I think ) that part of relativity theory is that a strong gravitational field distorts the uniform passage of time. If this is true and a lightwave 'travelling' to Earth passes a star near its intense gravitational field (a gravity 'lens') does the gravitational field distort the 'timing' of the speed of light and for a small duration of time the light-wave slows a bit until it leaves the influence of the star's gravity? If this is so could you say the speed of light itself was slightly less while the lightwave was passing through the star's gravity?
I know this is true but I don't know how to prove it. I have worked it out for the integers from $1$ to $10$ but this is not direct proof, is there a formula I need?
Give a direct proof of the fact that $a^2-5a+6$ is even for any $a \in \mathbb Z.$ I know this is true because any even number that is squared will be even, is it also true than any even number multiplied by 5 will be even?? is this direct proof enough?
I'm dealing with something like $\sum_{j=2}^{n-1}j^2$. I know I can do this $\sum_{j=1}^{n-1}j^2 - \sum_{j=1}^{1}j^2$. Would that be equal to $\frac{j(j+1)(2j+1)}{6} - j^2$ or I'm missing some properties with $n-1$? If so, which ones?
I am just starting into calculus and I have a question about the following statement I encountered while learning about definite integrals: $$\sum_{k=1}^n k^2 = \frac{n(n+1)(2n+1)}{6}$$ I really have no idea why this statement is true. Can someone please explain why this is true and if possible show how to arrive at one given the other?
Proof Suppose $\sqrt{2} = \frac{p_o}{q_o}$, where $q_o$ is as small as possible. We have $q_o < p_o < 2q_o$ (from $1 < \sqrt{2} < 2$, which follows from $1 < 2 < 4$) let $q_1 = p_o - q_o$, and $p_1 = 2q_o - p_o$ (where both $p_1$ and $q_1$ are natural numbers) Then, $\frac{p_1}{q_1} =\frac{2q_o-p_o}{p_o-q_o}$ $=\frac{(2q_o-\sqrt{2}qo)}{\sqrt{2}q_o - q_o}$ $=\frac{\sqrt{2}q_o(\sqrt{2} - 1)}{q_o(\sqrt{2} - 1)} $ $= \sqrt{2}$ but $q_1 < q_o$, so contradiction. Questions: How does $q_o < p_o <2q_o$ follow from $1 < \sqrt{2} < 2$? I know it can also be written as $\frac{p_o}{\sqrt{2}} < p_o < \sqrt{2}p_o$, but I don't know how this is related to $1 < \sqrt{2} < 2$. How does $q_1 < q_o$ prove $\sqrt{2} is irrational? Which premise does it contradict?
I am studying the proof that $\sqrt 2$ is an irrational number. Now I understand most of the proof, but I lack an understanding of the main idea which is: We assume $\frac{m^2}{n^2} = 2$. Then both $m$ and $n$ can't be even. I do not understand, why can't both $m$ and $n$ be even?
Using the book class equations, tables, figures and sections have the chapter number as first number of the label (e.g. the first equation of chapter 2 is equation 2.1). I want to remove the chapter number from the label but I want to keep it when I refer to it (the best would be keeping it if and only if the reference is outside the chapter where the label is)
In my thesis I use chapters, sections and subsection. I like to have my equations numbered with respect to section, but I want the displayed equations numbers not to include the chapter number. Moreover when referencing the equations I want the chapter number to be excluded unless I reference them from a different chapter. How can I achieve this? If not otherwise possible it would be ok to use two commands \ref{} and \gref{} where the first one omits the chapter number. I would like to do the same thing also for references to sections and to theorems. At the moment I am using the koma scrbook class. Example I. Chapter 1 1. Section 1 a^2 + b^2 = c^2 (1.1) as seen in (1.1) II. Chapter 2 1. Section 1 an extension of (I.1.1) is a^3 + b^3 = c^3 (1.1)
I am asking the current question because of . I've never ever seen an answer with so many downvotes. We are waiting for some mod to remove it, and people keep voting it down. They should, but why not delete it automatically? It will be better for SE users not to see this garbage on the site. Auto-deleting something so it's not done manually will be better for the mods. It will be better for the poster himself; receiving more downvotes will increase his chance of at least being banned from answering on Chess.SE.
Downvoted, unanswered questions have been subject to automatic deletion for a long time. The same is not true of downvoted answers. On Super User, we have posted before the beginning of this year still in existence. Over two thousand of those are scored at -2 or below, having been downvoted by multiple people. I see no reason to keep these answers around. Based on the votes, they have helped nobody. They're just sitting there, being pointless, borderline-NAA, or otherwise bad. Low quality (but not flag-worthy) posts aren't actively harmful, but don't provide a good image for the site. Additionally, I think people would be a lot more likely to downvote bad things if they knew there was a good chance for the -1 to be refunded in the future if somebody else agreed. (And hey, the poster would get the -2 refunded as well.) To prevent people from adding single downvotes to cause quick deletion of things they don't like, it would probably be good to require a score of at most -2 before an answer is eligible for auto-deletion. Accepted answers (that aren't self-answers) shouldn't be deleted, since they helped someone. A reasonable time frame for the deletion of -2 answers would be a month after they hit that score; the process would optimally be accelerated by additional downvotes and slowed significantly by any upvotes. I understand now that some downvoted answers should stick around to show an example of something subtly bad. To prevent those from going away, the presence of numerous comments or somewhat-highly-upvoted comments could be a factor against deletion. I still believe that many downvoted answers are just mediocre/useless and not representative of any common misconception. (See the Super User search linked above.) Of course, such deletion shouldn't apply to meta sites, where downvotes are overloaded. I think both child metas and Meta Stack Exchange should be excepted from answer auto-deletion. Otherwise, please make the Community user delete negatively scored answers after a while.
$$\int \frac{dx}{(x^2+1)^2}$$ How should I approach this? Is there a general approach when the degree of the denominator>>numerator in this case $x^4>>1$?
$$\int \frac{1}{(x^2+1)^2}\mathrm dx$$ Look simple, but I stuck a little bit. What method is better in this situation? Please, help.
I'm trying to read in some xml and want to find the tag names. For example if I read <dc:title>, I want to get "title". Can someone tell me what the "dc" part is and what the "title" part is? I'm using Python and when I iterate over the nodes and print out node.tag, it returns "{}title". I really don't know what the url stuff is or why it's returning with my node tag.
This is something that I always find a bit hard to explain to others: Why do XML namespaces exist? When should we use them and when should we not? What are the common pitfalls when working with namespaces in XML? Also, how do they relate to XML schemas? Should XSD schemas always be associated with a namespace?