body1
stringlengths
20
4.1k
body2
stringlengths
23
4.09k
I was trying to solve the problem asked in . The answer that had been accepted didn't work for me, but I eventually an answer that worked for me. I would like to add my answer to the original question to help other people like me who come across this question. However, I can't find the answer question button. Is there something I'm missing?
Questions can be closed or marked as duplicates. What does it mean for a question to be "closed"? What does it mean for a question to be marked as a "duplicate"? Who can close a question? What are the reasons for closing a question ? Is closure the end of the road for a question? When are closed questions eligible for deletion? Related For more information, see "" in the .
I'm importing stuff from a Drupal site that has a couple of alias URLs: /node/123 /my-alias-node-title My new site is a very simple CMS handmade in PHP by me as a practice. In the new system, the URL for each page has this format: /contenido.php?id=30 I've managed to rewrite all traffic to a PHP file (reenvio.php) using a rewrite rule: My .htaccess file is like this: Options +FollowSymLinks RewriteEngine On RewriteCond %{SCRIPT_FILENAME} !-d RewriteCond %{SCRIPT_FILENAME} !-f RewriteRule ^.*$ ./reenvio.php My PHP file consults the database and do the redirects. So, when users type /node/123 they get redirected to /contenido.php?id=30 Is that a problem from an SEO perspective? My pages will still link to URLs like /my-alias-node-title but my users will end up seeing /contenido.php?id=30 Is there any way to address this issue in a different, better way? Because after all, the user still sees the ugly URL, so I assume Google sees it as well.
Simple question What is better: http://www.example.com/product/123/subpage/456.html or http://www.example.com/product?123/subpage/456 As far as I know they would rank the same SEO wise, but my SEO knowledge might be a little off. Also the last one seems to be easier and cleaner to implement on my end. Please explain to me which is better and for what reasons.
I'll cut right to the chase: I am trying to parse a string with strtold to get a long double, but it is giving me the wrong value. Specifically, I am parsing the number 97777777777777777777777777777777777777.0, but strtold parses it as 97777777777777777779155292002375958528.000000. I check errno, HUGE_VALL, and end_ptr, but errno does not report an error, my number is no where near HUGE_VALL, and end_ptr is empty. I've been trying to debug this for a while, but I'm at my wits end. I don't think this is a bug in strtold because the same problem happens if I take out some 7's from the number. This code works for small numbers, like 97. I would greatly appreciate it if someone could help me here. The code: #include <stdio.h> // printf #include <stdlib.h> // strtold #include <errno.h> // errno #include <string.h> // strerror #include <math.h> // HUGE_VALL int main(int argc, char** argv) { char* theNum = "97777777777777777777777777777777777777.0"; printf("HUGE_VALL = %Lf\n", HUGE_VALL); // just to make sure I'm not insane char* endbuf; errno = 0; long double n = strtold(theNum, &endbuf); if (n == HUGE_VALL && errno != 0) { printf("strtold err: %s\n", strerror(errno)); } else { printf("strtold status: %s\n", strerror(errno)); } printf("the number: %Lf\n", n); printf("endbuf: %s\n", endbuf); return 0; } Output: HUGE_VALL = inf strtold status: Success the number: 9777777777777777777835998445568.000000 endbuf: Some details: 64-bit Red Hat Linux: (uname -i says x86_64) Running Red Hat Enterprise Linux Server release 7.1 (Maipo) gcc (GCC) 4.8.3 20140911 (Red Hat 4.8.3-9) I'm compiling using c99: c99 primefactors_test.c ../../src/primefactors.c -o primefactors_test -I../../include/ -O3 -lm I also tried a simpler compile statement where I take out all of the unneeded dependencies: c99 primefactors_test.c -o primefactors_test -lm
In follow up to , it appears that some numbers cannot be represented by floating point at all, and instead are approximated. How are floating point numbers stored? Is there a common standard for the different sizes? What kind of gotchas do I need to watch out for if I use floating point? Are they cross-language compatible (ie, what conversions do I need to deal with to send a floating point number from a python program to a C program over TCP/IP)?
A = [['2','4'],['1','2']] B = [] for i in A: for x in A[i]: B.append(x) print(B) TypeError: list indices must be integers or slices, not list I expected to use two loops to iterate all the elements in A. A[i] is the first list element in A. And the second for loop should iterate the A[i] and append all the elements into B. However, the error says must be integers or slices, not list. I don't know why i can not iterate elements in A[i]. I am very appreciate if anyone can help.
What's the difference between the list methods append() and extend()?
Considering the potential energy of interacting particles, how does covalent bonding lower the energy of the system?
why in a covalent bond are "the bonded electrons are in a lower energy state than if the individual atoms held them at the same proximity"? Also is it correct that " I think when you start pushing two molecules together orbitals between the two start overlapping - forming covalent bonds?" Essentially why are covalent bonds made? A QM description would be nice but I don't really know QM so a somewhat reduced-to-classical explanation of the QM explanation would also be nice!
For a binary string of length $n$ that has at most $k$ $1$'s, it makes complete sense that the total number of possibilities is $\sum_{j=0}^{k} \binom{n}{j}$. But I am struggling to wrap my head around $\sum_{j=0}^{k} \binom{n-1-j}{k-j}2^j$ being an equivalent way of counting. I can see where the $2^j$ comes from but I can't quite see the $n-1-j$ part. Can someone could give me some guidance on what that method of counting is actually saying?
Give a combinatorial proof for this identity for non-negative integer $k$ and $n$ such that $0 \leq k < n$ $$\sum_{j=0}^{k} \binom{n}{j} = \sum_{j=0}^k \binom{n-1-j}{k-j}2^j$$ My attempt: I tried to reduce this identity. Since $k,n$ are nonnegative integer and $k<n$ then I can change the upper limit into $$\sum_{j=0}^{n-1} \binom{n}{j} =2^n-1 \quad \text{and} \quad \sum_{j=0}^{n-1} \binom{n-1-j}{n-1-j}2^j = \sum_{j=0}^{n-1} 2^j ~.$$ So, I just need to show $$\sum_{j=0}^{n-1} 2^j =2^n-1 $$ using combinatorial proof. Am I right? I really need helps
Is it possible to get the value of $i^i$? I want to know what the result of it is.
According to WolframAlpha, but I don't know how I can prove it.
When I try to move my files into /opt with the command mv, bash says that I don't have permission.
To be short, I want to copy a folder to a location /usr/share/screenlets/.... in Ubuntu 10.04 system. I tried by logging in as root from terminal giving su. I even changed my user account type to ADMINISTRATOR; Yet, no use. PASTE option in the context menu's list in the folder /usr/share/... is INACTIVE. How can I copy those files?
I have a list of 11 numbers, and I want to test the product of all combinations against some rule (2^11 possibilities). I came across , but it seems to return a list of all combinations, which I think would take up to much memory. My C++ thinking would be to go through each binary number 0x001 to 0x7FF and multiply each number where its corresponding bit is 1. Example with 4 numbers: My list is [2, 3, 5, 7] The first binary number would be 0001 giving - 2 = 2 Later we would get to 1110 and the product would be 3 * 5 * 7 = 105 Is there a better way of doing this in python? A bit manipulation doesn't seem like the right way to go.
I have a list with 15 numbers in, and I need to write some code that produces all 32,768 combinations of those numbers. I've found (by Googling) that apparently does what I'm looking for, but I found the code fairly opaque and am wary of using it. Plus I have a feeling there must be a more elegant solution. The only thing that occurs to me would be to just loop through the decimal integers 1–32768 and convert those to binary, and use the binary representation as a filter to pick out the appropriate numbers. Does anyone know of a better way? Using map(), maybe?
I have problem when I implemented this command sudo apt-get install tcl8.5-dev tk8.5-dev And I get this: fawaz@fawaz-Lenovo-B590:~$ sudo apt-get install tcl8.5-dev tk8.5-dev Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: tcl8.5-dev : Depends: tcl8.5 (= 8.5.11-1ubuntu1) but it is not going to be installed tk8.5-dev : Depends: libx11-dev but it is not going to be installed Depends: libxss-dev but it is not going to be installed Depends: libxext-dev but it is not going to be installed Depends: libxft-dev but it is not going to be installed Depends: tk8.5 (= 8.5.11-1) but it is not going to be installed E: Unable to correct problems, you have held broken packages. fawaz@fawaz-Lenovo-B590:~$ PLZ help me
After upgrading from 10.04 to 12.04 I am trying to install different packages. For instance ia32-libs and skype (4.0). When trying to install these, I am getting the 'Unable to correct problems, you have held broken packages' error message. Output of commands: sudo apt-get install -f Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. After running this: sudo dpkg --configure -a foo@foo:~$ sudo apt-get install -f Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
I am working on the project which is totally based on search. To trigger the search I have 8 fields and one of them is mandatory. I came up with one option to narrow down the search and also to reduce the number of fields to show up in advance. Before After I think the user will always come to the system with some motivation. Since this is a search based system, keeping multiple fields might increase the decision time for the user or may mislead his motivation. I am not sure which one has more advantages over the other. Do you think search by field will work better and help the user to start the search as quickly as possible.
I have been asked to come up with a search mechanism for a database. The database stores details about electors. Is a multiple search field interface better than a single search field interface? The single search can search across all the fields the multi box can. Drawbacks of single: it can't differentiate between strings that could be a name or part of an address eg 'Woods' vs 'Woods avenue' but the user is not likely going to be searching for something so vague; they are likely to have a unique ID or combination of details eg 'Woods SW6 2LT' here are the alternatives (state of the system: the user has run some search and the then cleared all the search fields for some reason) What are the pros and cons of each approach? Are multiple boxes better than one?
If $a < x_{n} < b$ and $\lim_{n \rightarrow \infty}x_{n}=x$ then prove that $a \leq x \leq b$. I am taking two case where the sequence is monotonic and non-monotonic. If the sequence is increasing then it would converge to its supremum and if its decreasing then it will converge to its infimum, hence the limit being greater than $a$ and less than $b$. But I am not sure how to go on about the non-monotonic case.
I'm stuck with the proof of the following: Suppose that $(s_n)$ converges to $s$, $(t_n)$ converges to $t$, and $s_n \leq t_n \: \forall \: n$. Prove that $s \leq t$. I've tried starting with $s_n \leq t_n \: \forall : n$ and the definitions of each limit (i.e. $|s_n - s| \leq \epsilon \: \forall \: n > N_1$), but I'm not really getting very far. Any help is appreciated!
I have followed some guides and it seems to be a very simple task. still, I cannot make it work. I can minimize app to tray: private void Form1_Resize(object sender, EventArgs e) { if (FormWindowState.Minimized == this.WindowState) { ntfIcon.Visible = true; ntfIcon.Icon = SystemIcons.Application; ntfIcon.BalloonTipText = "Antispin"; ntfIcon.ShowBalloonTip(500); this.Hide(); } else if (FormWindowState.Normal == this.WindowState) { ntfIcon.Visible = false; this.Show(); } } But I cannot make it restore from tray private void ntfIcon_DoubleClick(object sender, EventArgs e) { this.WindowState = FormWindowState.Normal; } Simply, the window will not show up, even adding this.Show() after the windowstate Any help please? Compiling winform under win10
Is there an easy method to restore a minimized form to its previous state, either Normal or Maximized? I'm expecting the same functionality as clicking the taskbar (or right-clicking and choosing restore). So far, I have this, but if the form was previously maximized, it still comes back as a normal window. if (docView.WindowState == FormWindowState.Minimized) docView.WindowState = FormWindowState.Normal; Do I have to handle the state change in the form to remember the previous state?
Could one give me a bijection between $[0,1]$ and $[0,1)$ ? I am trying to find a function $f:[0,2]\to[0,2]$ such that $\forall0\le x\le2,f^{-1}(x)$ is a tuple (2 elements), and such a bijection would give me an answer easily.
A) Specify a bijection from [0,1] to (0,1]. This shows that |[0,1]| = |(0,1]| B) The Cantor-Bernstein-Schroeder (CBS) theorem says that if there's an injection from A to B and an injection from B to A, then there's a bijection from A to B (ie, |A| = |B|). Use this to come to again show that |[0;1]| = |(0;1]|
Let X be an infinite dimensional normed $\mathbb K$-linear space .Prove that $\partial B(0,1)=\{x\in X: ||x||= 1\}$ is not weakly closed in $X$. We know that a convex subset of $X$ is weakly closed iff it is closed w.r.t. the normed topology. But here $\partial B(0,1)$ is not convex in X. (definition of weak topology): Let $X$ be a normed $\mathbb K$ -linear space . The weak topology of $X$ is the smallest topology $J_{\omega}$(which is a subset of the normed topology of X) such that $f:(X,J_{\omega})\to\mathbb K$ is continuous for all $f \in X^*.$ Please someone give some hints. Thank you.
I want to prove that in an infinite dimensional normed space $X$, the weak closure of the unit sphere $S=\{ x\in X : \| x \| = 1 \}$ is the unit ball $B=\{ x\in X : \| x \| \leq 1 \}$. $\\$ Here is my attempt with what I know: I know that the weak closure of $S$ is a subset of $B$ because $B$ is norm closed and convex, so it is weakly closed, and $B$ contains $S$. But I need to show that $B$ is a subset of the weak closure of $S$. $\\$ for small $\epsilon > 0$, and some $x^*_1,...,x^*_n \in X^*$, I let $U=\{ x : \langle x, x^*_i \rangle < \epsilon , i = 1,...,n \} $ then $U$ is a weak neighbourhood of $0$ What I think I need to show now is that $U$ intersects $S$, but I don't know how.
I found many tutorials on how to use VoiceInteractor I applied VoiceInteractor.PickOptionRequest.Option[] options = {option1, option2}; VoiceInteractor.Prompt prompt = new VoiceInteractor.Prompt("say cheese or you can say something else"); VoiceInteractor voiceInteractor = getVoiceInteractor(); boolean b = voiceInteractor.submitRequest(new PickOptionRequest(prompt, new PickOptionRequest.Option[]{option1, option2}, savedInstanceState) { @Override public void onPickOptionResult(boolean finished, Option[] selections, Bundle result) { if (finished && selections.length == 1) { Intent intent = new Intent(FullscreenActivity.this, ScrollingActivity.class); startActivity(intent); has given me enough delay, when I keep getting the exception E/AndroidRuntime: FATAL EXCEPTION: main Process: com.ai.asni_assistant, PID: 17454 java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.app.VoiceInteractor.submitRequest(android.app.VoiceInteractor$Request)' on a null object reference at com.ai.asni_assistant.FullscreenActivity$2.onClick(FullscreenActivity.java:87) at android.view.View.performClick(View.java:6597) at android.view.View.performClickInternal(View.java:6574) at android.view.View.access$3100(View.java:778) at android.view.View$PerformClick.run(View.java:25885) at android.os.Handler.handleCallback(Handler.java:873) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6669) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) I/Process: Sending signal. PID: 17454 SIG: 9 Disconnected from the target VM, address: 'localhost:50320', transport: 'socket' I am ready to share information on what i'm working on if someone has another solution to that exception or it's something within another part of the code that is the part of the code for the permissions if (ActivityCompat.checkSelfPermission(this, Manifest.permission.READ_CALENDAR) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.INTERNET) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.RECORD_AUDIO) != PackageManager.PERMISSION_GRANTED) { builder.show(); requestPermissions(new String[]{Manifest.permission.RECORD_AUDIO, Manifest.permission.INTERNET, Manifest.permission.READ_CALENDAR}, 3); return; } It did pop up once for audio recording permissions but it didn't do it for the internet and I know why and for the calendar but that was ambigious. it is 3 hours until now since I got the crash with null pointer exception.
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?
This is a newbie follow-up question on the solution for how to use the same email address for multiple users presented here: My question: where do I add this code (file name and location in file)? I know this is probably extremely obvious to someone with even a little experience with Wordpress development. Any direction / help would be most appreciated. Thanks, Mike
Many posts here or somewhere else contain code, but they do not say where to put it. Example: I have found this post: I'm a newbie with PHP. Where exactly should I place the code from the answer?
Last Sunday or Monday I posted a question that boiled down to:; How to install 18.04? say, starting by 15 April. My desktop is having trouble with 17.04 and 17.10. Screwy! Okay, I'll try again. I messed up 7.04 And 7.10 on my largest desktop. (I'm writing this on my laptop.) What I want to do is install 18.04 Om my desktop and go from there. I've been using Ubuntu since 5.04 LTS And have stuck with it. A disability limits me to the use of only my left hand. A friend who lives 2000 miles away configured a RAID when he was here last Fall. He is a new father and cant fly back until 2019. He said that Installing Ubuntu 18.04 Would be "very difficult". Considering my hassles With 17.04 And 17.10, I thought installing 18.04 LTS and staying there Would be my best bet. This is one of the few times I've had this much troubles with Ubuntu; previously I have waited at least until the middle of April. To Anybody: Do I have to create a DVD with 18.04? What is a "Start Up Disk"? Thanks to Richard G for his suggestions. Gary Kline PS: The above was my post within the past week++; it is for anybody in the Ubuntu community. What's the best way of upgrading to 18.04? I have only 2 DVDs left!
I would like to see a full how-to guide on how to install Ubuntu.
For finding the solutions for $z^3−5=−12i$, I calculated $\theta$ as $-67.3^\circ$. I can then write $z=r^{(1/3)}e^{i\theta/3}$ where I can substitute $e^{(i\theta/3)}$ as $\operatorname{cis}(2\pi k/3+θ/3)$ where I took $k$ as $0,\,1,\,2$. Is this right?
I cant get any good reference in my books regarding cube of complex numbers. Please help me find cube roots of the Complex number i+1??
The textbook says that to express "There is a $P$ that is $Q$", one can write the following preposition: $$ \exists x [P(x) \land Q(x)\ ] $$ However, I am unsure why I can't write like this: $$ \exists x [P(x) \rightarrow Q(x)] $$ For the case of universial quantifier, I have the opposite question. The textbook says "All $P$ is $Q$" can be written as below: $$ \forall x [P(x) \rightarrow Q(x)] $$ and I am unsure why I can't write like this: $$ \forall x [P(x) \land Q(x)] $$ I do understand that $P \land Q$ and $P \rightarrow Q$ are different in that $P \rightarrow Q$ also accepts vacuously true. But I am curious why $\forall$ can accept vacously true while $\exists$ cannot.
I'm not quite sure that I really understand WHY I need to use implication for universal quantification, and conjunction for existential quantification. Let $F$ be the domain of fruits and $$A(x) : \text{is an apple}$$ $$D(x) : \text{is delicious}$$ Let's say: $$\forall{x} \in F, A(x) \implies D(x)$$ Is correct and means all apples are delicous. Whereas, $$\forall{x} \in F, A(x) \land D(x)$$ is incorrect because this would be saying that all fruits are apples and delicious which is wrong. But when it comes to the existential quantifier: $$\exists{x} \in F, A(x) \land D(x)$$ Is correct and means there is some apple that is delicious. Also, $$\exists{x} \in F, A(x) \implies D(x)$$ Is incorrect, but I cannot tell why. To me it says there is some fruit that if it is an apple, it is delicious. I cannot tell the difference in this case, and why the second case is incorrect?
This object looks fine in this mode. It has a shiny material on 2 selected faces. However, it turns black in this mode. It looks like wire, with hundreds of edges.
I have created two bezier circles, then converted them to meshes. When I press tab to enter edit mode, the objects appear completely black. You can see the exact tutorial I am Why do they appear black, and not have any subdivisions? Is this a problem with blender, or is there a setting I need to change? Edit Mode Edit Mode + Wireframe view
I have moved my eggs to a mini-fridge and, despite attempting to get a good-quality one, it seems as though the temperature even on max cold doesn't get below 40°F throughout the refrigerator. I really hate food poisoning and, especially now, would very much like to avoid going to the hospital or damaging my health. Are US eggs (high quality, from Alexander farms) left in a fridge above safe temperature for over a week still safe to eat? Does the float test work to detect salmonella? Is there something I can use them for that's high enough temperature to eliminate the risk? Thanks in advance!
How do I know if a given food or ingredient I have is still good, or if I should discard it? How can I best preserve a food or ingredient? This broad question is intended as a "general reference" question to quickly answer many how long will food keep for? questions. Please feel free to edit this question to expand and clarify as needed.
I want to install Kali linux on my laptop which was preinstalled with windows 8,windows 8.1,Ubuntu 13,04. Windows 8 installed on dev/sda1Windows 8.1 installed on dev/sda6Ubuntu 13.04 installed on dev/sda8I want to install kali linux on dev/sda3 partition.Is that possible to install and boot all four os's?
I would love to triple-boot Windows XP Pro, Ubuntu 12.10, and Backtrack 5 R3, but is this safe for my harddrive/other OSs on the computer?
I have 2046 mb of DDR3 ram , an Intel core 2 duo E7500 processor and Asus P5G41C-M LX mother boad can in this system Ubuntu 14.04 LTS can be installed error free and run smoothly.
I'm thinking about installing Ubuntu Desktop, but I don't know what flavor is the best for my system. What are the minimum and recommended hardware requirements? What kind of CPU? How much memory? Should I have Hardware Acceleration? What flavor should I use? This is an attempt of a canonical answer. My answers have the "official requirements", the recommended are a mix of official sources and opinion based (along with the answer it's told the source). You can comment or edit if you feel that the information is obsolete or incomplete. It is a good rule of thumb that any system capable of running Windows Vista, 7, 8, x86 (Intel) OS X will almost always be a lot faster with any Ubuntu flavor even if they are lower-spec than described below.
I heard that a black hole is not black because it's escape velocity is greater than or equals to the speed of light. But instead it is black because the light that gets emitted from a black hole gets red shifted due to the curvature of space-time near that black hole. Is it true or not? If it is true then tell me how does light even escape from a black hole to be red-shifted in the first place?
In (ignoring Hawking radiation), why is a black? Why nothing, not even light, can escape from inside a black hole? To make the question simpler, say, why is a black hole black?
I'm new in the GIS world. I have a bunch of points (around 40,000), which are split in categories (1 to 9) and have a field which specifies their membership to a polygon (~50) (e.g, 30, which would mean that the point is located in polygon 30). Some zones do not contain points of all categories. I wish to know the frequency of each category per zone, in such a way that in the end I would have a table with the first column for the categories, and the zones listed in the first row. Did somebody have the same challenge? How did you solve it?
Is there a way of calculating the number of unique text strings in a field in ArcGIS 10.1? I have a number of repeated strings in this field, but would like to calculate the number of unique strings in a field based on groupings from another field. E.g - Current table: Field 1 Field 2 Apple Green Apple Red Apple Red Citrus Yellow Citrus Green Citrus Orange Citrus Orange Result: Field 1 Field 2 Apple 2 Citrus 3
just found my stackoverflow in this site. with a lot of others. without answers. all the questions are attributed to one Rajesh Kumar .Also find an identical site named . thought you should know.
NB The following is a community-generated list of websites that republish Stack Exchange content without attributing it properly. It is no longer being maintained, because the procedure for reporting such sites has changed; see the duplicate for more information. There are a number of license-violating clones of Stack Exchange sites popping up that use Stack Exchange's data without following our Creative Commons attribution terms. Those terms are , and are also included as a .txt file in every data dump we produce. Google now has in search results. Also, you can : The option to block a site appears when you click a search result and then navigate back to the search results page. Click the "Block" link next to that result to block all pages within the site's entire domain. This post was created as an attempt to organize information originally posted . You may also be looking for .
How did the Asgardians survive? I've been trying to noodle this through for a while now after seeing Avengers: Endgame. At the End of Thor: Ragnarok, the Asgardians are all on Thor's ship looking for new lands. At the beginning of Infinity War, Thanos attacks the ship and comes aboard. There's been a slaughter and only a few Asgardians are left. Those are either killed directly by Thanos (Helmdal, Loki) or, well, basically Thor, who is picked up by the Guardians of the Galaxy. In Endgame we find out that there are some Asgardians still alive, including Valkyrie, the Rock guy, and presumably enough to populate a town. Where did they all come from? How'd they survive? Did I miss an explanation? Edit: To be clear, in addition to whatever other Asgardians there might be in the universe (which might have been 50% decimated with the snap), I'm asking about the Asgardians on the ship at the end of Thor Ragnarok.
In the opening scenes of Infinity War, Thanos and the Black Order have killed basically everyone aboard the Asgardian ship, which amounts to everyone who escaped the destruction of Asgard itself at the end of Thor: Ragnarok. After this, Thanos destroys the whole ship using the Power Stone. The end result is that Thor is picked up as the only survivor, by the Guardians of the Galaxy. Of course, we learned during Thor: Ragnarok that not all Asgardians are necessarily on Asgard (Valkyrie was living on Sakaar, after all). Do we have any indication that there are any other such Asgardians anywhere else in the MCU at the current time, or is Thor now officially (or at least "as far as we know") the last of the Asgardian race? I'd prefer an official confirmation if one exists anywhere.
I am trying to create a fishnet of x by x miles for all USA, same as this basically: However, I want to do this with python. My current code works but it doesn't take distance in miles, but rather in degrees, and therefore it doesn't take into consideration how for different lat, lon points the conversion of distance to degrees changes (). This is my current code: from pygeoif import geometry import shapefile import numpy as np sq_len_deg = 1 lats = np.arange(26, 50.1, sq_len_deg) lons = np.arange(-125, -69.9, sq_len_deg) a=[] geometries=[] for lat in lats: for lon in lons: a.append([(lon,lat),(lon,lat-sq_len_deg),(lon-sq_len_deg,lat-sq_len_deg),(lon-sq_len_deg,lat)]) geometries.append('POLYGON ((%s %s, %s %s, %s %s, %s %s))'%(lon,lat,lon,lat-sq_len_deg,lon-sq_len_deg,lat-sq_len_deg,lon-sq_len_deg,lat)) w = shapefile.Writer(shapefile.POLYGON) w.field('test','N') for i,poly in enumerate(geometries): w.poly([geometry.from_wkt(poly).exterior.coords]) print(i) w.record(i) w.save('officialpysh') I can see this going into two directions, some function already exist and I can use this, or a suggestion on how to modify this code.
I'm working with a geodataframe of points and I need to create a grid of rectangular polygons. I know how to have bounds of the geodataframe with gdf.geometry.bounds. Now using this information and with 2 variables length and width (L, W) of rectangular polygon, how can I create a grid ?
Overnight, my MBP would not power on with the power button. The Battery was full and the LED on the charger was green. SMC Reset did not bring any results. So I opend up the Mac, disconnected and connected the battery from the logic board and connected the charger to MPB. MPB turned on automatically, but the power button still doesn't work. I had problems with Caps-Lock and a few keys, but after cleaning the keyboard connector they disappeared. Power Button still does not work. Any suggestions?
This is an attempt to write a canonical QA for this issue, as per the Meta post: I expect it to be periodically edited with the goal of becoming a comprehensive information resource. I have a MacBook Pro that has a key(Shift, Return, Command, P, etc.) that doesn’t respond when pressed or is stuck in the down position. It's possible that my favorite beverage was spilled (or some other liquid damage). It's also possible that I have no idea what happened. It was working yesterday and suddenly today it's no longer working. Is there any way to bypass or remap the key? Can I have the system ignore it completely? (This question can also apply to external USB keyboards or the Bluetooth keyboards)
I am currently planning on writing a bigger shell script. The script itself consists of many smaller scripts. I want to organize it modular. For example: . ├── mainScript.sh └── modules ├── moduleScript_1.sh ├── moduleScript_2.sh └── moduleScript_3.sh 1 directory, 4 files The mainScript will import the modules and defines some shared variables. The single modules are designed to be also useable on their own, so that I can run a module from console if I only need it's certain function. I know that I can "source" the files just like: #! /bin/bash sharedVariable="share" source ./module/moduleScript_1.sh source ./module/moduleScript_2.sh source ./module/moduleScript_3.sh ...but I am worried about scopes and interfering variables or functions. Is this file structure actually a good practice, or is there a better, more advanced, way to handle bigger scripts with multiple modules? Thanks in advance!
Does anyone know of any resources that talk about best practices or design patterns for shell scripts (sh, bash etc.)?
I'm trying to install WPS office in kubuntu . i've got this error : cannot satisfy dependencies. I try to install libpng12-0 but the error is still occurred. anyone help me to fix this issue
I could install with an error message "unknown media /ALL". It could not run WPS Office.
Consider this problem : Let $S^{1} =\{(x,y)\in \mathbb{R} \times \mathbb{R} \mid x^2 +y^2 =1\}$. Let $f: S^1 \to \mathbb{R}$ be a continuous function. Prove that there exits $x\in S^1$ such that $f(x)=f(-x)$. I am not able to construct such a function and I am not getting any ideas on which result I should use for construction. Can you please help me with that?
Question is to prove : $f : S^1 \to \mathbb R$ is continuous then $f(x)=f(-x)$ for some $x\in S^1$ I guess it would be helpful to use intermediate value theorem Assuming $f(x)\neq f(-x)$ then given any $p\in (f(-x),f(x))$ (assuming $f(-x)<f(x)$) there exists $y\in (-x, x)$ such that $f(y)=p$ I am not very sure of how to use this.. It would be helpful if someone can give some hint which would help me to solve this.. Thank you.
With a list like so: int[] numbers = {1,2,2,3,3,4,4,5}; I can remove the duplicates using the Distinct() function so the list will read: 1,2,3,4,5 however, I want the inverse. I want it to remove all of the numbers that are duplicated leaving me with the unique ones. So the list will read: 1,5. How would this be done?
I have been working with a string[] array in C# that gets returned from a function call. I could possibly cast to a Generic collection, but I was wondering if there was a better way to do it, possibly by using a temp array. What is the best way to remove duplicates from a C# array?
The markdown used on Stack Exchange and the one used on GitHub are fairly similar, but have some subtle differences. For example, on GitHub, you can add ``` before and after a set of lines to format them as code, but that doesn't work on Stack Exchange. As someone who writes markdown on both sites, I find these subtle differences inhibit the development of muscle memory (e.g. I often type ``` on Stack Exchange, only to realize (again) that it doesn't work and erase and correct it). Is there any plan / path forward to converge these two flavours of Markdown? Note: I gave ``` as an example, but I'm asking about general convergence between the two flavours, rather than one particular extension.
Currently, Stack Exchange’s Markdown parser only allows four-space indents to represent code blocks: // some code // another line of code and other Markdown implementations allow for an alternative syntax, that doesn’t require indenting each code line: ``` // some code // another line of code ``` This is much more convenient to type out. It would be super useful if Stack Exchange could support this syntax. By extension, this syntax also allow you to specify the source language right after the opening ```: ```js // some code // another line of code ``` …which would then enable syntax highlighting for that specific language. Although it’s interesting metadata, I don’t think this feature is needed on Stack Overflow, as the syntax highlighting library works pretty well for various languages. So, even if you would allow this syntax but ignore the ```language, this would greatly improve my productivity on Stack Exchange. What do you think? The moderators are currently collecting feedback regarding this feature, so please post a comment with your thoughts. Good idea? Bad idea? Don’t really care? What do you think are the benefits/drawbacks? Experiences? Let them know! Thanks!
I have been browsing youtube and wikipedia but couldn't find anything related to algorithm's runtime, can someone explain to me what does it mean if an algorithm has a run time of O(log*(n))?
I'd prefer as little formal definition as possible and simple mathematics.
I don't really understand the meaning of the term: "Industry sources" in this text. please aware me. "Details of the agreement have yet to be made public, but industry sources have said Noble and Delek will be allowed to keep control of Leviathan, the world's largest offshore gas discovery of the past decade. "
"To care all about the appearance of a matter or a law, without paying attention to its meaning/spirit and essence" Actually, I look for a suitable word for to express such meaning, and place it in this text: The Pharisee Jews were so/very/too ................ . That is to say, they were paying attention to the appearance of religious orders, but they didn't care about the spirit of those orders at all. Jesus told them: "You argue about the uncleanness of a dish with one another, but you do not argue about what is earned through usury or a forbidden and unclean way, that you eat in the same dish?! You're okay with usury, but you judge on trivial matters, such as the egg that a chicken laid on Saturday (Jewish holiday)?!" The words I have found so far are: Formalistic and Superficial observer Also im not sure about to choose among these: 1. Appearance of religious orders or 2. Outward of religious orders Please leave me any kind of improvements and changes you think works within the whole text.
Hi is there any possibility that you located between 2 sound sources and u hear nothing? as we know 2 wave in opposite direction will destroy each other...
What happens to the energy when waves perfectly cancel each other (destructive interference)? It appears that the energy "disappear" but the law of conservation of energy states that it can't be destructed. My guess is that the kinetic energy is transformed into potential energy. Or maybe it depends on the context of the waves where do the energy goes? Can someone elaborate on that or correct me if I'm wrong?
I received the following rejection letter from the journal editor. It does not look like “rejection and resubmission” to me. Should I revise and resubmit? Is there any chance of acceptance? ... I very much regret to inform you that your manuscript has been rejected. Below are the comments and recommendations for this manuscript. If you wish, please consider the suggestions made by the reviewers and/or Editor's Office and, possibly, consider submitting a new version to the journal. If it meets the journal requirements, we will then send it out for independent peer review. It has been our experience that those who follow the reviewers' comments and re-submit their paper generally are successful in publishing in ABC. However, the decision to rewrite the paper rests with you...
I sent a paper to a top tier journal in science a few weeks ago. I received the feedback from the editor saying he declined to publish/ accept my paper at the moment but if I corrected/ responded to the comments provided by reviewer, he/ she would consider to publish my paper. I went to paper tracking website only to discover that my paper is classified as "reject and resubmit". Does that mean if I responded/ did everything suggested by reviewer, there'll be high possibility my paper will be outright rejected? The comments from reviewer was not that harsh, but I wonder whether I'll be wasting my time if I went back to the lab and did what he said. I only have 2 months to respond. Also, what is the difference between "reject and resubmit" and "major revision required"? This is my first submission and I'm confused. Hope anyone can enlighten me.
I want to discuss my technical and coding related problems with users on stackoverflow. How can I chat with individual user to discuss my problem?
Sometimes I find questions or answers by users and I would like to ask the user a specific question that doesn't (yet) fit as a full SO question. Adding a comment with @username doesn't necessarily seem appropriate, as it isn't a comment on the question or answer per se. So, can I somehow open a chat or contact that user without putting in a comment?
I just did a clean install of windows 7 professional 64-bit on my skylake build and I was able to install windows 7 fine, I even installed the usb drivers, chipset drivers and the rest of the drivers needed. I installed it from a dvd (it had service pack 1 on it) and had a brand new product key (never used on another pc), even when I go to system properties it says that "windows is activated," but when I plugged my ethernet in and connected to the internet, windows update isn't finding any updates. I open windows update and it has been searching for updates the last 30 minutes now and found nothing, Does anyone knoe what go be wrong because I know the dvd would not have the most recent updates? Yes, my internet works fine I am able to go on google chrome and surf the web.
I installed Windows 7 fresh and installed SP1. Now, when I try to check manually for Windows Updates it just hangs on the Checking for updates screen. I tried running the tools in , but this did not fix the issue either: No matter what I do it just hangs on the "Checking for updates..." screen and goes no further.
I need some help on how to make a camera separately for a phone model step by step. Like for example: a Samsung galaxy s8 camera. And also just one more question: How do you put a phone screen image on the phone model? I just started blender.
I want to do in my 3D model a bulging camera block. Of course, I know this can be done using the "extrude" tool. But I can't use subdivide modifier, consequently I can't do that. And I want to do a "notches" (It's Google Translate, not me) for power button (like power button in Moto Inc. Smartphones) So, I hope you understand me, because I'm not good in english. Please, don't throw tomatoes at me :) And remember, I don't want to steal someone's design of smartphone, I'm just learning to do something like this. This is my .blend file:
I'm not a mathematician nor do I otherwise use it seriously, but every once in a while I just play around with a formula that I generate (usually to look complex or designed to get really big [like a factorial function]), but this time, I think I found something interesting. I generated the following formula: $$f(x)=\sum_{n=1}^{x}(\prod_{m=1}^{n}(\frac{1}{m}))$$ I plugged into Desmos (originally, I was testing if they had fixed their summation and product functions on their graphing calculator) and I realized that the limit was some constant. I decided to explore this myself and, to speed up the process, I plugged in $10$ for $x$ and I got something close to the constant: $$\sum_{n=1}^{10}(\prod_{m=1}^{n}(\frac{1}{m}))\approx1.7182\ldots$$ If we plug in 100, instead, we get a similar value: $$\sum_{n=1}^{100}(\prod_{m=1}^{n}(\frac{1}{m}))\approx1.7182\ldots$$ Seeing this, I was curious about mathematical constants. I know that $\varphi=\frac{1+\sqrt{5}}{2}\approx1.6\ldots$ and $\sqrt{3}\approx1.732\ldots$, so this constant must be represented as the following: $$\varphi\leq c \leq\sqrt{3}$$ Is there a constant here, or did I just discover something (probably useless) here? If there is a constant here, what is it used for? If not, then are there potential uses?
I guess the proof of the identity $$ \sum_{n = 0}^{\infty} \frac{1}{n!} \equiv \lim_{x \to \infty} \left(1 + \frac{1}{x}\right)^x $$ explains the connection between such different calculations. How is it done?
I'm trying to solve the pde: $$u_t = (u_x)^{-1} \quad u(t,x) \geq 0 \text{ for positive real }x,t, \text{ and } u(0,0)=0$$ by separation of variables with $u(t,x) = f(t)g(x)$. By rewriting with the substitution i get to $f f' g g' =1$. Trying to solve for $f(t)$ I keep $x$ constant so $g g'=c$ and then $ff' = \frac{1}{c}$. From here though I can't see how to proceed, should I guess a function $f$ to satisfy this and if so how do I go about it?
How do I solve the partial differential equaiton $u_{t} = (u_{x})^{-1}$ subject to the conditions $u(t,x) \geq 0$ and $u(0,0) = $0. Use the separation Ansatz $u(t,x) = f(t)g(x)$. The inverse in confusing me
I tried looking up the difference between has and have and it generally has to do with plurals, but that doesn't seem to be changing in this case. Why do you use have in one case and has in another?
Does and has both are used with singular pronouns (He has the bottle , He does play cricket , etc) whereas Do and have are used with plural pronouns ( They have the bottle , Do they like cricket? , etc) But still we use Does with have ( She does have a car ). Why? Shouldn't it be She does has a car.
As light is affected by gravity ( gravitational lending and black holes), it would seem that gravity causes acceleration. Acceleration has two parts: direction and magnitude. It is clearly evident that gravity affects the former of the two. It would seem that it does not affect the later component because light is currently at the universal 'speed limit' (not counting taychons). What is going on here? Is the magnitude component affected by gravity?
Gravity causes anything with energy to accelerate toward the source. Black holes, for example, have such strong gravity that they pull in light and don't let any escape. But can acceleration still apply to light? The speed of light is constant, of course, but why are photons affected by gravity yet aren't accelerated by it? Edit: My main question is why photons aren't affected in the same way as most other particles. I'm perfectly aware that it cannot surpass lightspeed, but I want to know what makes it unaffected by acceleration while other particles are affected.
I think my solution has been incorrectly mistaken with the solution of another question. It has also been edited so it looks like the solution is the one pointed by the duplicate, but this obviously did not solve my problem, just avoided the exception raised (the surface of the problem). Since my efforts to reopen the question have been useless, I have opened a new one . I am getting a ConcurrentModificationException and I am not able to solve this problem. So I remove a series of elements from a list and I get an error. This is the error: 04-Nov-2016 15:49:50.488 SEVERE [http-nio-8080-exec-199] org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for servlet [Faces Servlet] in context with path [/...] threw exception [java.util.ConcurrentModificationException] with root cause java.util.ConcurrentModificationException at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:886) at java.util.ArrayList$Itr.next(ArrayList.java:836) at com.ex.PersonController.removeGroup(...) at .... The Java code: public void removeGroup(int age) { if (person != null) { List<Person> friends = person.getFriends(); List<Person> removeFriends = new ArrayList<>(); if (friends != null) { for (Person p : friends) { if (p.getAge() == age) { removeFriends.add(p); } } friends.removeAll(removeFriends); } } EDIT: Note that apparently is not solving my problem. It avoids raising an error, though, but the results displayed by JSF are not correct. Is it possible that JSF is trying to refresh while my list is not fully updated? EDIT2: I don't think this is a duplicate. The error I got with some of my tests is gone with or (note that even with the .add() approach I got the same error for some reason). But JSF is still not printing what I expect. I write again the code that BalusC removed from my question with a bit more of information: The xhtml Java code: <c:forEach items="#{personController.groupedPersons}" var="personG"> <h:commandButton action="#{personController.removeGroup(personG.key)}" type="submit" value="Remove" > <f:ajax render="@form" /> </h:commandButton> #{personG.key} - #{personG.value.size()} </c:forEach> So the first time I execute the page, personController.groupedPersons returns the right list of persons (a HashMap<Integer, List<Person>>) and prints it just fine. At this point I have 2 groups: a group of 3 Person of the same age and another Person with a different age. When I click on remove the group of the 3 persons with the same age, I trace the code and with the Iterator it removes all the necessary persons without raising a ConcurrentModificationException. The returned list of person.getFriends(); is size = 1, which is correct. Then the ajax code renders the form. personController.groupedPersons is called again and returns 1 person as expected. I have verified and this is the return person I actually expect. But then the JSF does print the wrong #{personG.key} (the one I removed) and null #{personG.value.size()}. I know it might be difficult to follow, but can you think of any explanations for this? EDIT 3: This is even funnier... If I delete the group that has 1 person, it is removed and then the JSF prints correctly the group with 3 persons. If I delete the group with 3 persons, they are removed and JSF prints (as I said in EDIT2) the key of the group I just removed and size() is null. Is it possible that I am on a concurrency problem here between JSF refreshing the page at the same time as I am modifying the list? (this was originally my worry, that the ConcurrentModificationException came from a concurrency problem between the XHTML and my managed bean, and not only within the code of the Managed Bean). That could explain why I got a ConcurrentModificationException even when I added in the list instead of removing from it.
We all know you can't do the following because of ConcurrentModificationException: for (Object i : l) { if (condition(i)) { l.remove(i); } } But this apparently works sometimes, but not always. Here's some specific code: public static void main(String[] args) { Collection<Integer> l = new ArrayList<>(); for (int i = 0; i < 10; ++i) { l.add(4); l.add(5); l.add(6); } for (int i : l) { if (i == 5) { l.remove(i); } } System.out.println(l); } This, of course, results in: Exception in thread "main" java.util.ConcurrentModificationException Even though multiple threads aren't doing it. Anyway. What's the best solution to this problem? How can I remove an item from the collection in a loop without throwing this exception? I'm also using an arbitrary Collection here, not necessarily an ArrayList, so you can't rely on get.
Let $V$ be a vector space over $\Bbb C$, $p$ is a polynomial over $\Bbb C$ and $a\in \Bbb C$ . Prove that $a$ is an eigen value of $p(T)$ where $T$ is a linear operator on $V$ $\iff$ $a=p(\lambda$ ) for some eigen value $\lambda$ of $T$. Atempt:$a$ is an eigen value of $p(T)$ where $p(z)=(z-\lambda_1)(z-\lambda_2)\ldots (z-\lambda_n)$ say. $\implies p(T)v=av\implies (z-\lambda_1)(z-\lambda_2)\ldots (z-\lambda_n)(v)=av$ But how to show that $a=p(\lambda)$. Please help.
Suppose $T:V\to V$, $p\in \mathcal{P}(\mathbb{C})$ (polynomials with complex coefficients), and $a\in \mathbb{C}$. Prove that $a$ is an eigenvalue of $p(T)$ if and only if $a=p(\lambda)$ for some eigenvalue $\lambda$ of $T$. I can prove: if $a=p(\lambda)$ then $a$ is a eigenvalue of $p(T)$ because: $$Tv=\lambda v$$ $$T^kv=\lambda^k v$$ $$p(T)v=p(\lambda)v=av$$ But, how can I justify the other direction? Thanks for your help.
I want to add the following to the file /etc/securetty using sed: pts/0 pts/1 pts/2 pts/3 pts/4 pts/5 pts/6 pts/7 pts/8 pts/9 I wrote the following command for this purpose: sed -i '$a pts/0\\npts/1\\npts/2\\npts/3\\npts/4\\npts/5\\npts/6\\npts/7\\npts/8\\npts/9' /etc/securetty which gives me the output: pts/0\npts/1\npts/2\npts/3\npts/4\npts/5\npts/6\npts/7\npts/8\npts/9 I'm clearly missing out on something here. What could be wrong in my sed command?
I am writing a bash script to look for a file if it doesn't exist then create it and append this to it: Host localhost ForwardAgent yes So "line then new line 'tab' then text" I think its a sensitive format. I know you can do this: cat temp.txt >> data.txt But it seems weird since its two lines. Is there a way to append that in this format: echo "hello" >> greetings.txt
Even after reading this excellent answer at , I still do not know how to get over the partition problem. Because there is no "edit" button. Rakesh Godhala said: In sb4, there is 480 GB disk space, you can create required space from that partition This is what I do: Click the sb4. Click "change" button. (there is no "edit" button for me to hit) Select as shown: Click "OK", and then I get the following: You can see the sb4 type is changed to ext4. and I dare not click "continue", because I fear it will erase my Windows 8. Also, it did not ask me to set space size, I think this is the wrong step. And I get stuck. So what should I do?
I'd like to see the full How-To on how to use manual partitioning during Ubuntu installation. The existing guides (at least those I found here) cover only automatic part and leave untouched the manual part (or extremely short and contain no pictures). I'd like to cover such situations: If your disk contains other systems:
Most of us who are studying mathematics are familiar with the famous $e^{ix}=cos(x)+isin(x)$. Why is it that we have $e^{ix}=cos(x)+isin(x)$ and not $e^{ix}=sin(x)+icos(x)$? I haven't studied Complex Analysis to know the answer to this question. It pops up in Linear Algebra, Differential Equations, Multivariable Equations and many other fields. But I feel like textbooks and teachers just expect us students to take it as given without explaining it to a certain extent. I also couldn't find any good article that explains this.
Could you provide a proof of Euler's formula: $e^{i\varphi}=\cos(\varphi) +i\sin(\varphi)$?
In the end of The Revenge Of The Sith, Darth Vader and Palpatine are watching the construction of the first Death Star. This scene probably takes place less than a year after the previous scenes (according to the answers to question), but it would still be 18-20 years before it is fully operational in A New Hope. However, the second Death Star only takes about 5 years to build (assuming that they weren't expecting Death Star I to be destroyed)(the time between episodes IV and VI). The first one was much smaller (2-3 times), but still took 5 times as much time to finish. Why? Ok, the first one was a first, and had glitches, but surely it wouldn't take 5 times longer to build the first version then to improve the design massively, and increase the size! Note: As I consider Disney to have seriously messed up canon, I would prefer Legends answers if the films (I-VI) do not supply one.
The first Death Star was in construction at the end of Episode III (presumably 19 BBY). The ending shot is this picture, with only small portions of the superstructure completed: 19 years later, the Death Star has only been recently completed (the novel Death Star places the completion about 1 BBY). So we assume it took about 18 years to build, and that's with tons of Wookiees working on it. Fast-forward to Return of the Jedi in 4 ABY, and the second Death Star is significantly built, and is "fully operational": They had learned from their mistake on the first Death Star, and had covered up the thermal ports. Presumably they did not just make a patchwork fix, but re-engineered that portion. Anyway, it seems unlikely the progress made on the second Death Star occurred in only 4 years. Both Death Stars cost huge amounts of money and resources, and having two in construction would have been much more difficult to hide. So were both in construction at the same time?
what's the PHP equivalent of Ruby's "||=" assignment idiom? The scenario is I want to instantiate an object or array "on demand," and not necessarily when a class is initialized. I've tried to find this in the PHP docs, but I'm having difficulty finding things I need in there (miss the Ruby). Thank you!
In Ruby you can easily set a default value for a variable x ||= "default" The above statement will set the value of x to "default" if x is nil or false Is there a similar shortcut in PHP or do I have to use the longer form: $x = (isset($x))? $x : "default"; Are there any easier ways to handle this in PHP?
I would like to make sure my (very superficial) understanding of electron shells, subshells, and orbitals is correct. I did look them all up on the Internet, but none of the sources said exactly what I think is going on, so I might be wrong. So, as far as I understand, shell, subshells, and orbitals are not, strictly speaking, actual, physical locations around an atom's nucleus. Shells and subshells are more like abstractions: shell $1$ is the set of all electrons of an atom with principal quantum number $1$, and subshell $s$ is the set of all electrons of an atom with quantum azimuthal number $0$. Orbital $1s$ is not a place either, it's a probability function that tells you how likely you are to find an electron with $n = 1$ and $\ell=0$ in a given point in space. Still, the plot for $1s$ will basically describe a physical location around the nucleus, if you consider all points in space where the probability isn't $0$ as points of that location. (Or nearly zero, as I seem to recall it's never exactly zero.) However, I also read that for $k > l$, electrons with $n=k$ are more energetic and hence farther away from the nucleus than electrons with $n=l$. So, I guess that there are only certain regions of space around the nucleus where an electron with $n=k$ can be, and that they're generally larger than the regions described by orbitals. So, ultimately, I guess that both shells and orbitals can be seen as locations, although they aren't strictly speaking. I don't know about subshells, because I'm not sure if electrons can only have specific values $\ell$ at a specific distance from the nucleus. Am I making any sense?
I am learning the basics of quantum mechanics and am familiar with the Schrödinger equation and its solution, but I was confused about what the familiar atomic orbital shapes represent? Do they represent nothing physical and are just plots of the wavefunction in 3D polar co-ordinates? Or do they represent the region where probability of finding an electron is $90\%$? Or something else? Levine 7th ed. states that An atomic orbital is just the wavefunction of the electron Wikipedia instead states that In atomic theory and quantum mechanics, an atomic orbital is a mathematical function describing the location and wave-like behavior of an electron in an atom. This function can be used to calculate the probability of finding any electron of an atom in any specific region around the atom's nucleus. The term atomic orbital may also refer to the physical region or space where the electron can be calculated to be present, as predicted by the particular mathematical form of the orbital
Update: A solution has not been provided. I have given examples of why. Maybe I am doing something wrong, but I am not an Ubuntu expert, that is why I am here for help. It is no help when repositories keep moving and the experts expect all users to be experts. Are there any experts here that are truly willing to actually help? The instructions seem to be outdated and do not indicate if 1.0.27 needs to be removed first. The only reason I want to downgrade is to get my scanner working under 18.04LTS. My understanding is that 1.0.27 is hosed up for genesys_gl847 scanners (including my Lide 100) and the only viable solution is to down grade sane backend back to version 1.0.25 There does not seem to be any urgency to fix the bug as it has been there since the release of Ubuntu 17.04 with none of the known patches being applied. I have seen many comments on this forum fixing the issue on 17 and 18 releases, most of them involve downgrading the package. Unfortunately, the step by step solutions are all out dated as the repositories have moved and the threads have closed. I came here hoping to get assistance to fix the issue which is possible and apparently a little over my head. Yes, going to 16 is a work around, but not a solution. And why the Ubuntu 18.04LTS developers decided to go with an experimental package (libsane1_1.0.27-1~experimental3ubuntu2_amd64) vice a known stable package is beyond my comprehension. I came to this forum in search for assistance with a solution which does exist, just a little beyond my capability with Ubuntu. @user535733 Your suggestion did not work, but maybe I did it wrong. There are several packages, the process failed on the first one I tried. See below: $ sudo dpkg -i libsane_1.0.25+git20150528-1ubuntu1_amd64.deb Selecting previously unselected package libsane:amd64. dpkg: regarding libsane_1.0.25+git20150528-1ubuntu1_amd64.deb containing libsane:amd64: libsane1:i386 conflicts with libsane (<< 1.0.27-1~) libsane:amd64 (version 1.0.25+git20150528-1ubuntu1) is to be installed. dpkg: error processing archive libsane_1.0.25+git20150528-1ubuntu1_amd64.deb (--install): conflicting packages - not installing libsane:amd64 Errors were encountered while processing: libsane_1.0.25+git20150528-1ubuntu1_amd64.deb $
I want to downgrade some packages. I search and find and this and this . But i just want to do it with dpkg. Could i just run dpkg -i package-name? If yes then what will be done with the highest already insatlled version?!
Around 1990 I saw a cartoon movie on Super-channel (Europe). Think it was an anime. It was about a prince and a princess who were fond of each other but their countries were at war. The prince was from an industrial country and they had tanks and guns. The princess was from an agricultural country and they used bows and arrows and hot-air balloons. It had a sad and/or melancholic ending. Can't remember anything else. I would like to see that movie again. Does anybody knows the title?
I would like to find out the title of a Japanese anime feature film (not a series) that I saw on Romanian TV in the early 90s. It was about a feud between the peoples of two planets (one very technologically advanced, the other not). The two planets go to war against each other, and a young man from one of the planets falls in love with a princess from the other planet. I recall a scene where the army of the second planet take off in hot air balloons when they go to war. The only other thing I recall is that there is a dam next to the village where the young man lives, and for some reason he opens the dam gates and floods his own village. I do not recall there being robots in the movie, however I remember very vaguely that the technology level was probably at the level of late 19th century Europe on one planet and pre-industrial on the other one. What it's not: Nobunaga the Fool Aldnoah Zero Queen Millennia Uchuu Senkan Yamato (movie)
For real sequences $\{a_n\}$ and$\{b_n\}$. Prove that $\limsup_{n\to \infty} a_n+b_n\le \limsup_{n\to \infty} a_n+\limsup_{n\to \infty} b_n$ If $\limsup a_n=a$ and $\limsup b_n=b$, where $a,b\in\Bbb R$. By Rudin theorem 3.8 of $\limsup a_n=a$, $$\forall \varepsilon>0, \exists N\in\Bbb N\ni \forall n>N, a_n<a+\varepsilon$$ So, $\forall n>N,a_n+b_n<a+b_n+\varepsilon$ and take $\limsup$ both side we get, $$\limsup_{n\to \infty}(a_n+b_n)<a+\varepsilon+\limsup_{n\to \infty}b_n=a+b+\varepsilon$$, which is true $\forall \varepsilon>0$, let $\varepsilon\to0$, we have $$\limsup_{n\to \infty}(a_n+b_n)\le a+b$$ Is my attempt correct? I have read some answers, but all of them choose some subsequence and the symbol of subsequence is not easy to read, hence I try to use another definition to prove this statement.
I am stuck with the following problem. Prove that $$\limsup_{n \to \infty} (a_n+b_n) \le \limsup_{n \to \infty} a_n + \limsup_{n \to \infty} b_n$$ I was thinking of using the triangle inequality saying $$|a_n + b_n| \le |a_n| + |b_n|$$ but the problem is not about absolute values of the sequence. Intuitively it's clear that this is true because $a_n$ and $b_n$ can "reduce each others magnitude" if they have opposite signs, but I cannot express that algebraically... Can someone help me out ?
I've recently downloaded Ubuntu from the Windows Store (I'm running windows 10) and I wanted to start familiarize with it, I saw that it's possible not only to have the bash command line, but also a graphical interface. However, in the tutorial I saw () it seems that the method to start up the GUI is outdated/not working properly, could someone help me setting the GUI up so I can start Ubuntu inside Windows and use it? Thank you.
I searched around, and currently there are two methods suggested; installing an enhancement for Windows Subsystem for Linux and installing an XServer. I want to know which method is the most hassle-free (easy to install AND to use), and which one is less memory-heavy. I just want Synaptic and CMake. Why couldn't that be a builtin feature?
Soundness property, to my knowledge is the property that: $\Gamma \vdash \varphi \implies \Gamma \vDash \varphi$ If $\varphi$ is provable (a syntactic consequence) from $\Gamma$ then $\varphi$ is also a semantic consequence of $\varphi$, which I believe is saying $\varphi$ is "true". But what if, for example, $\varphi \in \Gamma$ and $\varphi = \bot$? It appears conceivable that some of the assumptions in $\Gamma$ are false, and then we might be able to prove things from it, but semantically they would be false. It's possible I just have the definition of soundness wrong but how is this accounted for? We would normally say that the Hilbert system is both complete and sound but is this still the case even if we begin with a $\Gamma$ that contains some false premises? Or is it "sound only in certain cases"? How does this work?
Soundness: $a \vdash b \implies a \vDash b$, i.e. if we can prove something, it will also be true. We don't want a system where we start out with something true and dedice something false. However it is conceivable that even if our system is sound, maybe it's quite incomplete/limited regarding what we can express, which is why we also would like... Completeness: $a \vDash b \implies a \vdash b$, i.e. if we can show something is true, it's also provable. We want to be able to prove all true statements. However it is conceivable that even though we can prove all true statements, maybe it also proves false ones as well, which is why we'd also like the soundness property from before. Do I have the right idea? If so, how would I begin to prove soundness? If we are already given $a \vdash b$ I'm not sure what all we must iterate over in e.g. propositional logic to show that we always get true statements. Especially since it seems possible I could pick a false $b$ that contradicts.
I'm looking for a group isomorphism between the group of integer polynomials (with addition) and the group of positive rationals (with multiplication). I was thinking a map between generators of $\mathbb{Q}^*$, $1/p$, where $p$ is prime to irreducible polynomial in $\mathbb{Z}[x]$, but I am not exactly sure how it works. Any idea would be appreciated.
In one of my assignment, I was told that $(\mathbb Z[x], +)$ and $(\mathbb Q_{>0}, .)$ are isomorphic, with $$\phi (\sum_{k=0}^n a_k x^k) = \prod_{k=0}^n p_k^{a_k}$$ is a one-to-one surjective group homomorphism, where $p_1 = 2$; $p_2 = 3$; $p_3 =5$, and so on. I know that this proof is based on the decomposition of numbers into a product of primes. But I don't think that it is correct. For instance, for $\frac12 \in \mathbb Q$, I cannot find a corresponding polynomial $f \in \mathbb Z[x]$ such that $\phi(f) = \frac12$. If this proof is wrong, then are $(\mathbb Z[x], +)$ and $(\mathbb Q_{>0}, \cdot)$ really isomorphic?
I am hoping someone can help me out here. For some reason my system has stopped letting me sudo. I can log into the machine just fine. When I attempt to install a package or sudo -i, I get asked for my password then get told that my account is not part of the sudoers file. There is only one user account on the machine. I have attempted to use the recovery method off this site found here: When I try to change the password using Jorge's method I get an error: passwd: Authentication token manipulation error passwd: password unchanged So I attempted the "drastic" measures: mount -o remount,rw / nano -B /etc/shadow and deleted my encrypted password. Saved the file and restarted the machine. No password require, I hit return at the prompt. But I still cannot go to sudo. I tried sudo -i with the blank password and get: Sorry try again... So I used passwd to change my password. It accepted the change. I then tried sudo -i and again I got user not a member of the sudoers group! I tried logging out and back in, it accepted my password to log in but not sudo -i or anything using sudo. Please help me get my user back into the sudoers group. Thanks (not feeling all that great but hopeful..)
I clean-installed Ubuntu 11.10 today, and then installed VirtualBox. This required me to add myself to the vboxusers group, and since 11.10 seems to no longer have a graphical app to add users to a group, I ran the following command: sudo usermod -G vboxusers stephane This is a problem. I now see what I should have run instead is: sudo usermod -aG vboxusers stephane The end result is I'm no longer in the groups I should be in. Including whatever group is required to run "sudo". When I run any command as sudo now, I get the following: $ sudo ls [sudo] password for stephane: stephane is not in the sudoers file. This incident will be reported. Is there a way to fix this, or do I need to re-install from scratch again?
So my friends have a server, and I was trying to join the server, but every time I try, I would be able to connect and see the terrain load around me, but after a while, the server would just kick me off and show the error message: Internal Exception: java.io.IOException: Connection reset by peer. So I'm just wondering if anyone knows a way to fix this problem
On both my computers, the entire internet connection goes down when the Minecraft Server crashes. A reboot is needed to get the internet back. Error is something like Internal exception: java.net.SocketException: Connection reset by peer Why is this and how can I stop it? EDIT: PCs are both XP SP3 and have RealTek integrated network cards EDIT #2: I am accepting @Oak's answer since it a good summary for this problem, however in my case I deleted %appdata%\.minecraft\bin\minecraft.jar and let the game recreate it and it seems to have fixed the issue. At least for 2 people on a local network.... we'll find out later if it comes back when we get a few more friends on the server using our public IP. EDIT #3: Problem came back again with more people on the server however the app linked below by Oak to buffer network packets fixed it
I have seen solutions of splitting a file with respect to pattern matching and line matching but what I want is the following. The scenario is, let's say I have a file file1 - A.B|100|20 A.B|101|20 A.X|101|30 A.X|1000|20 B.Y|1|1 Now I want to split this file into 3 different files just based on the first column where the 1st file would be all the lines containing A.B in the first column, the 2nd file should have all the lines with A.X and so on. If the first column changes in any way, there should be a new file created for those lines. Is there any way of doing it with bash or awk? Since there is no way of actually knowing before hand what the first column value is, I wasn't able to use any feature like split or cut. Thanks for the help in advance!
We will generate a csv file with below values yp1234,577,1,3 yp5678,577,3,5 yp9012,132,8,9 I need to extract data and create files based on second column. If it's 577 then the whole line has to be extracted and placed in a separate file. I mean I need a file having lines with second column as 577 alone and another file with second column as 132 alone I tried using IF but didn't work
the following Example does not work: \documentclass{article} \usepackage{pst-all} \begin{document} \def\FF{x 3 exp 4 mul 3 div x sub 1 add} \def\AbFF{x 2 exp 4 mul 1 sub} \begin{pspicture}(-2.5,-2)(2.5,4) \psaxes[Dx=1,Dy=1]{->}(0,0)(-2,-1.5)(2.2,3.7)[$x$,0][$y$,90] \psplot[plotstyle=curve,linewidth=1.5pt]{-1.3}{1.2}{\FF}% postscript function \def\xs{-1} \multido{\r=-1+0.5}{5}{ \psplotTangent{\r}{1.3}{\FF} \psdot[dotscale=1.2](! \r /x \r def \AbFF) } \end{pspicture} \end{document} The problem ist the second \r in the line: \psdot[dotscale=1.2](! \r /x \r def \AbFF) If I replace it with a number, then everything works fine.
I want to define a constant globally within my pspicture environment as follows: \begin{pspicture}(4,2) \psgrid \SpecialCoor \def\length{2} \pnode(!\length 1){C} \uput[90](C){$C$} % other codes truncated here for simplicity. \end{pspicture} The above example does not work. What is the correct way to do that?
First of all I apologize if this question is too out of topic but it's been bothering me for a while. From what I've gathered after years of study it seems that set theory is essentially the foundation of modern mathematics. Now, I've been studying formal logic for a while and it seems to me that logic is even more fundamental than set theory in the sense that we rely on it to prove things about sets. However, from what I've read we also rely on set theory to prove things about logic. I realize that formal logic is not the same as naïve logic. But if we expect to have a solid foundation for mathematics, shouldn't we have a rigourous approach to the way we reason that is independent from set theory? Is such a thing even possible? In a nutshell, is it possible to have a reasonable framework for logic that is rigourous and independent from set theory? I'm sorry if this question is too vague. And maybe a lot of people don't really care as long as everything makes sense. But since modern mathematics is so concerned with consistency and rigour, how do we know logic itself isn't flawed? I would really appreciate your insight on this topic! Thank you! PS: Please let me know if this question isn't appropriate for this forum.
I am trying to understand what mathematics is really built up of. I thought mathematical logic was the foundation of everything. But from reading a book in mathematical logic, they use "="(equals-sign), functions and relations. Now is the "=" taken as undefined? I have seen it been defined in terms of the identity relation. But in order to talk about functions and relations you need set theory. However, seems to be a part of mathematical logic. Does this mean that (naive) set theory comes before sentential and predicate logic? Is (naive)set-theory at the absolute bottom, where we can define relations and functions and the eqality relation. And then comes sentential logic, and then predicate logic? I am a little confused because when I took an introductory course, we had a little logic before set-theory. But now I see in another book on introduction to proofs that set-theory is in a chapter before logic. So what is at the bottom/start of mathematics, logic or set theory?, or is it circular at the bottom? Can this be how it is at the bottom? naive set-theory $\rightarrow$ sentential logic $\rightarrow $ predicate logic $\rightarrow$ axiomatic set-theory(ZFC) $\rightarrow$ mathematics (But the problem with this explanation is that it seems that some naive-set theory proofs use logic...) (The arrows are of course not "logical" arrows.) simple explanation of the problem: a book on logic uses at the start: functions, relations, sets, ordered pairs, "=" a book on set theory uses at the start: logical deductions like this: "$B \subseteq A$", means every element in B is in A, so if $C \subseteq B, B \subseteq A$, a proof can be "since every element in C is in B, and every element in B is in A, every element of C is in A: $C \subseteq A$". But this is first order logic? ($(c \rightarrow b \wedge b \rightarrow a)\rightarrow (c\rightarrow a)$). Hence, both started from each other?
I did my research and some sources are saying there wouldn't be warranty if your iPhone is bought outside your home country. But I don't know if that rule still applies now. I want to buy online on the US apple store 'cause its waaay cheaper than where I reside now.
I'm about to travel to the US, where iPods / AirPods / iPhone are much cheaper than in my country. I wonder if Apple's warranty is international, and/or what warranty coverage exists when I return to my country. Where can I understand what Apple Warranty covers in the US when products leave the US?
My book Isc Nootan 12th reasons for the question that when a voltmeter is connected in parallel and if it had less resistance it would draw some current and potential drop across resistor to be measured will decrease thus an error.In order to avoid this voltmeter has very high resistance.What i dont get is if connect voltmeter across resistor the net resistance in circuit would decrease and thus current drawn should increase.This increase current only passes through voltmeter thus there would be no change in current flowing through resistor,then how is above reasonable?
According to my textbook, it is said that, for an ammeter: It is essential that the resistance $R_A$ of the ammeter be very much smaller than other resistances in the circuit. Otherwise, the very presence of the meter will change the current to be measured. Which makes definite intuitive sense to me. One would hope its resistance is very low, because otherwise it would be like trying to measure the speed of a car by putting spikes under its tires just before. However, what it says for voltmeters is not intuitive for me: It is essential that the resistance $R_V$ of a voltmeter be very much larger than the resistance of any circuit element across which the voltmeter is connected. Otherwise, the meter alters the potential difference that is to be measured. Why would it having a small resistance cause a hamper on anything? Why does restricting the current of charge carriers a necessity in measuring potential difference in the circuit? This is coming from someone who is very unfamiliar with circuits in general, but trying to learn incrementally.
When I try to use LaTeXiT it only shows the bottom part of the equation, I have no idea what is causing this problem, I've searched the web about it but can't find anything related. It occurs not only on math eqs. but anything. I am on mac OS High Sierra. Thanks
I am using LaTeXiT (pierre chachatelier, www.chachatelier.fr) - latex equation editor for Powerpoint for mac. It's producing pdf that appear to be "cropped" on top (see attached) - I've tried already with changing the "margins" option (Preferences>General) but unsuccessfully - don't think that's the problem. Any hint? Thanks
I need to add Windows 10 in GRUB. Windows 10 I have installed in legacy BIOS mode. Similarly as in the screenshot: Ubuntu 16 I have installed in UEFI mode. $ [ -d /sys/firmware/efi ] && echo UEFI || echo BIOS UEFI I have two hard drives. Each operating system is installed on a separate hard drive. $ sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL NAME FSTYPE SIZE MOUNTPOINT LABEL sda 465,8G ├─sda1 vfat 19,5G RECOVERY ├─sda2 ntfs 445,8G Windows 10 └─sda3 ntfs 450M sdb 232,9G ├─sdb1 vfat 512M /boot/efi ├─sdb2 ext2 488M /boot └─sdb3 crypto_LUKS 231,9G └─sda3_crypt LVM2_member 231,9G ├─ubuntu--vg-root ext4 224G / └─ubuntu--vg-swap_1 swap 8G └─cryptswap1 swap 8G [SWAP] sr0 1024M . On Windows, I run the following command: C:\WINDOWS\system32>bcdboot C:\Windows /s C: /f uefi I performed this command to create a bootable configuration. In Ubuntu file /etc/grub.d/40_custom I added the following option: if [ "${grub_platform}" == "efi" ]; then menuentry "Windows 10 (BCD-UEFI configuration on system drive /dev/sda2)" --class windows --class os { insmod part_msdos insmod ntfs insmod search_fs_uuid insmod chain set root='hd0,msdos2' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2 8684C04C84C04103 else search --no-floppy --fs-uuid --set=root 8684C04C84C04103 fi chainloader /EFI/Microsoft/Boot/bootmgfw.efi } fi UUID of the partition labeled "Windows 10": $ sudo blkid /dev/sda2 /dev/sda2: LABEL="Windows 10" UUID="8684C04C84C04103" TYPE="ntfs" PARTUUID="76692ca8-02" The problem is booting Windows 10 does not progress further the Windows logo.
Long story short, I installed ubuntu while I was watching netflix and feeling very lazy, and may have lost all my windows 7 files. Quick summary: -Windows 7 was installed on Legacy bios and I installed ubuntu on UEFI bios -ubuntu installer didn't detect any other OS on my computer and wanted to write over the disk, so I had to manually edit the partition -Despite repeated warnings about partitioning windows in the ubuntu installer, I did this anyway, assigning 140 gigs to ubuntu and 500 to windows Now, my computer won't boot into anything but Ubuntu -in Gparted, it still shows that I have two partitions, and windows 7 boot loader -However, I can't boot into the non-linux partition, and boot loader says I need a recovery disk. My question is does anyone know if what I've done is fixable? I'm hoping that I can fix it using the way outlined in this thread: Thanks for the help everyone! Note: gparted shows: Foudn linux image: /boot/vmlinuz - 3.13.0.30 - generic Found linitrd image: /boot/initrd.img - 3.13.0 - 30 - generic Found linux image: /boot/vmlinuz - 3.13.0 - 24 generic Found initrd image: /boot/initrd.img - 3.13.0 - 24- generic memtest memtest Found windows 7 (loader) on /dev/sda1
I have a second internal hard drive, which shows up on the computer:/// page as a long string of numbers and letters (which is always the same). When I open it its gets mounted as a random (new) location, like /media/max/7830FA191926581F. It's got some stuff on it already which I can access fine, and want to keep. I can see with df -h that it's on `/dev/sdb2/: /dev/sdb2 525G 177G 348G 34% /media/max/7830FA191926581F How do I set it up so that it's a permanent location, eg as /mnt/drive2 ?
Running sudo fdisk -lu returns the hdd I want to mount as Disk /dev/sdb but when I try to mount it from KDE Partition Manager it doesn't show some directories when I try to set up a path (tried showing hidden folders, only displayed 3) and through the konsole with sudo mount /dev/sdb /mnt, I get mount: wrong fs type, bad option, bad superblock on /dev/sdb, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so. so I tried running sudo e2fsck -f -b 32768 -y /dev/sdb and get e2fsck 1.42.13 (17-May-2015) e2fsck: Bad magic number in super-block while trying to open /dev/sdb The superblock could not be read or does not describe a valid ext2/ext3/ext4 filesystem. If the device is valid and it really contains an ext2/ext3/ext4 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alternate superblock: e2fsck -b 8193 <device> or e2fsck -b 32768 <device> and when I try those variations I get the same message. How do I mount this hard drive? The file type for the hdd is "inode/blockdevice" and I've already created a partition for it but it won't save without a path. Also, why does it say 17-May-2015? Many thanks. EDIT: Was able to find the /dev folder by clicking the bar next to "Look in" however the partitions don't show up even as hidden files but it does show up if I type it into the "Directory:" bar but its not selectable ("Choose" is greyed). Gparted, as expected, no difference. I'm sure its a file type error.. Re-partition the hard drive in gparted: and after applying the settings it seems to have worked but upon opening my file manager, the "Devices" listing on the leftside has disappeared! My ssd is not even listed (as it had been before) "Devices" title is not there!
If you've got a string containing for example "how are you?", I would do stringname.replace("how", "How") to have the first word written in Capital H. So far so good. The problem now is, I'm writing this script which at some point accesses the Open Weather Map, and the words are driving me crazy. Until now I just did a weather2 = self.weather.replace("partly", "Partly") weather3 = weather2.replace("cloudy", "Cloudy") weather4 = weather3.replace("foggy", "Foggy") weather5 = weather4.replace("sunny", "Sunny") weather6 = weather5.replace("rain", "Rain") #and so on But I can't have 20 .replace(). So I was thinking, and here comes my question: Could I create two lists, one containing the OWM originals, and the other list with the Words it shall be replaced with, and do something like for name in names do something
Does anyone know of a really simple way of capitalizing just the first letter of a string, regardless of the capitalization of the rest of the string? For example: asimpletest -> Asimpletest aSimpleTest -> ASimpleTest I would like to be able to do all string lengths as well.
I'm newbie and I don't know how Drupal 7 work! I want to remove with and height from below code: <img typeof="foaf:Image" src="http://ashkanplastic.loc/sites/default/files/styles/large/public/slider-1a_0.jpg?itok=k4X3QU5U" width="480" height="236" alt=""> Could you please introduce to me why I can not find 480 with $ grep -H -R 492? And please help to remove width and height.
I want to remove width and height properties from img tags in certain content type Currently it show's like this <img src="http://somesite.com/dostavka-slider-ng.jpg?itok=KDymQiug" width="938" height="300" alt="blablabla" title="blablabla" /> but I want <img src="http://somesite.com/dostavka-slider-ng.jpg?itok=KDymQiug" alt="blablabla" title="blablabla" />
How can I copy files with extension .ORF from a director and all it's sub-directors to a different director. i.e: I have home/Pictures and it's sub-directories and I want to copy only the files with .ORF extension to home/TempPictures I want to specify that I have had a look already here and on a lot of other sites and I haven't find the answer I look for... Thanks!
I would like to copy all files with a certain extension that are in sub directories to a different folder. I don't want to maintain the directory structure, I just want to copy all files found to a different folder. I used this command to do it: cp `find . -name "*.aac"` /media/moasad/New\ Volume/Media\ files/Avengers/Aud/aac/ However, I noticed that If it runs into folders or files with spaces in them the cp function doesn't know what to do and I get an error something like this: cp: cannot stat ‘./Temporary_Items/martin/Problem’: No such file or directory cp: cannot stat ‘Files/nav-YCA136843.aac’: No such file or directory Notice that its one file: ./Temporary_Items/martin/Problem Files/nav-YCA136843.aac But because of the space in "Problem Files", it's confused.
Is the use of "but rather" correct here? The United States' decision to drop atomic bombs on Hiroshima and Nagasaki was not a diplomatic measure to intimidate the Soviet Union, but rather a military measure designed to force Japan’s unconditional surrender.
Is this comment that I made grammatically correct? In Latin, when a group of males and females is combined, the neutral plural form is not used, but rather the masculine is.
How can I block specific telephone numbers on my iPhone? I don't want to get call from specific numbers. if anyone call to me from the blocked number, he should receive a message that "this number does not exist" or "this number is busy" always.
How do I block unwanted callers without jailbreaking?
In the following code, I expect the program to print "Match", because "\D+\d" matches the "x4" part of the string. But it does not print anything. What is the problem? import re pattern = r"\D+\d" if re.match(pattern, "1x4"): print("Match"); Thanks
What is the difference between the search() and match() functions in the ? I've read the (), but I never seem to remember it. I keep having to look it up and re-learn it. I'm hoping that someone will answer it clearly with examples so that (perhaps) it will stick in my head. Or at least I'll have a better place to return with my question and it will take less time to re-learn it.
My problem is as follows: % File name: Example.tex \documentclass[journal]{IEEEtran} \usepackage{cite} \begin{document} \cite{key} \bibliographystyle{IEEETran} \bibliography{bibfile} \end{document} I want to generate the reference file in a separate PDF output. I can either run the standalone Example.bbl file as input or add the code as suggested below. I want to get the an additional PDF file for example Reference.pdf as an output each time. Example.pdf also contains the reference as a main file.
Some grant agencies require separate pdf files for the main proposal and the references. I guess, it is easier to work this way in Word :-) In LaTeX, one can create a single PDF file and then split it later using pdftk or other tools. However, is a direct method of creating two separate PDF files: one that contains the main text (with the correct citation information) and the second with all the list of references. I understand that, at the very least this will involve compiling two separate .tex files. That is okay. I just don't want to use additional tools (can be tricky to install on all computers of all collaborators, etc.) Here is a MWE to play with: \begin{filecontents}{test.bib} @ARTICLE{author, title={A sample article}, author={Random Author}, journal={Random journal}, volume = {10}, year = {2000}, } \end{filecontents} \documentclass{article} \usepackage{natbib} \begin{document} As shown by \citet{author}, using references can be interesting \newpage \bibliographystyle{apalike} \bibliography{test} \end{document}
I want document in specific database schema style. Like in image. I have tried as much I can do, even I am facing issue. Why access_log & group_id coming up with indentation (I want all line indented similar) Why text exceeds the page width? I tried with \usepackage[paperwidth=5.5in, paperheight=8.5in]{geometry} , \setlength{\textwidth}{6.5in} but even text content exceed page wdith In access_log, I want to create array as appearing in image. Is it possible? Can I create title as it is Users-schema in image width black strip Link to Source code with DEMo : Image:
I am trying to create a schema page in LaTeX. It shall look like this. How can I create schema code which look like this image? There should be also a click to go function. When the user clicks on the user_schema link he should be redirected to that page. What classes I can use for this? Any suggestions would be appreciated. \documentclass{article} \usepackage[utf8]{inputenc} \begin{document} \maketitle \section{User schema} \mySchema{Users} { _id: ObjectId - Id do registro name: String - Nome do usuário date: Date - Data de Cadastro ren_date: Date - Data de renovação do Cadastro email: String - Lorem ipsum dolorsitamet, consecteturadipisicingelit, sed do eiusmodtemporincididunt ut labore et dolore magna aliqua. Ut enim ad minimveniam, exercitationullamcolaborisnisi ut aliquipexeacommodoconsequat. Duisautereprehenderit in voluptatevelit esse cillumdolore eu fugiatnullapariatur. Occaecatcupidatat non proident, sunt in culpa quiofficiadeseruntmollit. access_log: Array [ { date: String - Data da ocorrência. user: ObjectId - Usuário que executou. action: String - Ação Executada. } { date: String - Data da ocorrência. user: ObjectId - Usuário que executou. action: String - Ação Executada. } ] \link{group}{group_id}: ObjectId - Id do grupo. } \end{document} Here is the image how should it appear:
I am going to download & install java on Ubuntu 12.04 LTS (32-bit system) On java download page, there are 2 download options. Java for Linux Platforms Java for RPM based Linux Platforms Which would be better suited for Ubuntu?
I want to install Oracle's JRE and to update to the latest version with the Software Updater when they released. Is there a Ubuntu package that is provided by Canonical or Oracle? Before release Java 7, I followed to install Java 6. But it doesn't work for Java 7. There is no package sun-java7-xxx. How can you install Java 7?
I am struggling to understand what frame of reference means in relativity. Imagine the twin scenario. Twin A is at rest, while twin B travels somewhere and back at near the speed of light. If one takes as a frame of reference the one where twin A is at rest, then time goes slowly for Twin B, thus making it so that when B returns, A is older. Now I get really confused, if I take twin B's rest frame as the frame of reference, then he was stationary all the time, and A was moving at close to the speed of light, thus B will be older than A. What am I getting wrong here?
I read a lot about the classical twin paradox recently. What confuses me is that some authors claim that it can be resolved within , others say that you need . Now, what is true (and why)?
because of resting potential is their a constant leakage current across membrane due to resistance of membrane and ion pumps continuously pump restore the resting potential ?
My bio teacher was discussing the ratios of different ions inside versus outside the cell. $$\text{OUT:IN}$$ $$\text{K}^+ (1:20)$$ $$\text{Cl}^- (11.5:1)$$ $$\text{Ca}^{2+} (10000:1)$$ $$\text{Na}^+ (10:1)$$ Can someone provide specific details as to the relative quantities of these different ions relative to each other? In other words, given these ion ratios, provide me with how much of each type of ion there are and show why this adds to to -70 mV. I just want to make sure I have a realistic picture of the concentrations. I think I am mixing up concentration with the ratio between inside and out. Although for every potassium ion outside there are 20 inside, the charge from the total number of potassium ions must be less than that of chloride or it would not be negative inside, right?
I know the set of rational numbers can be well ordered since there exists a bijection from the set of natural numbers and then set of rational numbers by ordering $ℚ$ in this way my question is, in this case, is $ℚ$ well ordered by the usual $<$? Same thing with the set of integers If you order them in this way: 0, 1, -1, 2, -2.. in this case the set is well ordered by the relation $<$ right? (Since there exists a bijection with the set of natural numbers)
Why can positive rationals be not well ordered? If we define the relation to be greater than(>), then every subset will have a least element. Or why are positive or even integers not well ordered? By the same logic we can always find a least element in any subset. I know I am wrong at some very fundamental point, but please explain it to me.
The class below is just an example of a wrapper I made to use the thread library. I assign a name and id for every thread I spawn using this wrapper. For ease of debugging multi-threaded applications, I would like to see the name of the thread displayed on my thread menu in Visual studio 2015 (see image attached). Is that possible? I would like to forward a custom name to visual studio or in other words I would like to name my worker threads. //// Identity //////////////////////////////////////////////////////// class Thread { //// Structors /////////////////////////////////////////////////////// public: // Constructor. Thread (const string& name, const ThreadType type, const function<void ()>& task); // Destructor. ~Thread (); public: thread::id id; string name; ///< The descriptive name of the thread. const ThreadType type; ///< The classification type of the thread.
I have a server application that uses "a lot" of threads. Without wanting to get into an argument about how many threads it really should be using, it would be nice to be able to see some descriptive text in the debugger "threads" window describing what each one is, without having to click through to it and determine from the context what it is. They all have the same start address so generally the threads window says something like "thread_base::start" or something similar. I'd like to know if there is an API call or something that allows me to customise that text.
When I compile the following (almost identical) two pieces of code, there is much more vertical space between both words in the first example than in the second example: % Much space between the hellos \documentclass{book} \begin{document} \Huge Hello {\Huge Hello} \end{document} and % Almost no space between the hellos \documentclass{book} \begin{document} {\Huge Hello} {\Huge Hello} \end{document} What is the reason for that? What difference do the curly brackets make at this point?
Why linebreaks break the line height within certain environments with size-changing macros? I'm trying to understand what's the difference between these three approaches: \newenvironment between {} or \begingroup/\endgroup inside a minipage \documentclass{article} \begin{document} \thispagestyle{empty} \section{With newenvironment} \newenvironment{env}{\begin{center}\LARGE}{\end{center}} \begin{env} Text with\\linebreak \end{env} \section{With begin/endgroup} \begin{center} {\LARGE Text with\\linebreak} \end{center} \begin{center} \begingroup \LARGE Text with\\linebreak \endgroup \end{center} \section{With minipage} \begin{center} \begin{minipage}{\textwidth}\centering \LARGE Text with\\linebreak \end{minipage} \end{center} \end{document}
I am traveling to the US with my daughter in May 2018. Her US visa expires in October 2018. We are back in our home country in a month. Does she have to have at least 6 months left on her visa at the time of entry in the USA.
I'm a bit surprised from my US Visa. I plan to go to a conference on 3rd of April. Amazingly though, the visa expiration date is written as April 3rd. So what does that mean. Can I enter the US on April 3rd? or should I enter one day earlier?
This has been haunting me for mostly all my life, a film I saw as a child during the 70s. Can't tell if it was theater or TV. I basically only remember the last scene of the film: There is some form of deadlock between a human spaceship and another hostile one (aliens, other humans?). This spaceship has some form of drill as nose cone; which is detachable but has to have someone ride it. Spoiler The deadlock is solved by some hero climbing into the drill pod and riding it into the hostile ship. I seem to recall his daughter was also on board and tries to dissuade him. Edit(per comments) I'm almost sure it was a live action film.
This has been a old live-action movie from Asia, most likely Japan. I've seen it some time in the late 80's and I think it's been black/white only. Earth is invaded by UFOs (small and round, like flying balls), coming from Mars. Japan (I think) built some kind of super spaceship, initially hidden within some secret port in some kind of island/mountain. The spaceship looks similar to a classic battleship, but with an added drill below the front. In the movie's finale it's revealed that this is some kind of super weapon/bomb that has to be manually piloted by someone. When launched it starts rotating and flies (formed like a bullet but with the drill/corkscrew head). To defend Earth, the ship is sent on a mission to Venus, where the UFOs seem to originate. I don't remember the specific reason or conclusion here. The ship starts underwater or launches from the mountain on the island, then taking off and fighting UFOs while leaving Earth's atmosphere.
I am trying to take the inverse Fourier transform of $\frac{1}{k^2+a^2}$. I know what the answer is (something like $e^{-|x|}$), but I'm having trouble actually doing the integral in the inverse Fourier transform. First I noted that $\frac{1}{k^2+a^2}$ is even in $k$, so it's inverse Fourier transform is $$\frac{1}{\sqrt{2\pi}}\int_{-\infty}^\infty \frac{1}{k^2+a^2} \cos(kx) dk$$ Where do I go from here? I tried integration by parts, but that didn't lead anywhere. And looking at the Fourier transform of $e^{-|x|}$ didn't really help. Ideas?
I need help to calculate the Fourier transform of this funcion $$b(x) =\frac{1}{x^2 +a^2}\,,\qquad a > 0$$ Thanks.
How can we read data from a text file and store in a String variable? is it possible to pass the filename in a method and it would return the String which is the text from the file. What kind of utilities do I have to import? A list of statements will be great.
I've been using the idiom below for some time now. And it seems to be the most wide-spread, at least on the sites I've visited. Is there a better/different way to read a file into a string in Java? private String readFile(String file) throws IOException { BufferedReader reader = new BufferedReader(new FileReader (file)); String line = null; StringBuilder stringBuilder = new StringBuilder(); String ls = System.getProperty("line.separator"); try { while((line = reader.readLine()) != null) { stringBuilder.append(line); stringBuilder.append(ls); } return stringBuilder.toString(); } finally { reader.close(); } }
Suppose in an empty space two rocketships exists with person A and B of same age inside each. Let A move with velocity c/2 away from B and return. They'll find out that B grew older while A didn't have that change in age due to relative passing of time. But this incident can also be interpreted in another way such that, we can assume B to be moving away while A stood still as there is no other frame to compare with. How will we define proper time and improper time in this case? Do we have to take the initial point of A in space into consideration? Doesn't this mean we're taking space as a universal reference frame?
The paradox in the is that the situation appears symmetrical so each twin should think the other has aged less, which is of course impossible. There are a thousand explanations out there for why this doesn't happen, but they all end up saying something vague like it's because one twin is accelerating or you need general relativity to understand it. Please will someone give a simple and definitive explanation for why both twins agree on which twin is younger when they meet for the second time?
Can't find any nodejs package in Ubuntu 20.04 Manifest . I'm actually running nodejs on Ubuntu 16.04, and planning to Upgrade to Ubuntu 20. Which version should I upgrade to? Thanks in advande.
How can I check the version of the available package in the Ubuntu repositories without installing it?
I'm new to C language, it is required for my degree to complete one course on C programming. Hope the title makes sense... I had a hard time trying to convey what I meant. I'll elaborate here. The problem I am facing right now is double type data being able to slip through the program undetected when it should have been rejected. This happens when a number very very close to the boundaries I set is provided. In this assignment, in order to get an HD, my code has to have identical output to the lecturer's. The solutions are able to detect any number larger than the boundaries, no matter how close. Basically, the program will ask the user to provide a GPA which is from 0 to 4. I tried the following inputs: 4.01 rejected 4.001 rejected ... 4.000001 rejected But at 4.0000001, it is accepted. This should not happen at all. I am baffled. Here's my code: double GPA=-1; /*Flags are being initialised*/ int GPAflag=1; while(GPAflag){ char str[50]; char *ptr; int isnum=1,n=0,i,point=0; printf("Enter GPA>"); fflush(stdin); gets(str); n = strlen(str); if(n==0){ /*string length is 0? There was no input, thus invalid*/ printf("Invalid GPA. "); isnum=0; }else{ for(i=0;i<n;i++) /*Validates numerical inputs, if not numerical, prompts user with error*/ if(!(str[i]>='0' && str[i]<='9')){ if(str[i]!='.'){ printf("Invalid GPA. "); isnum=0; break; }else{ point++; } } } if(isnum){ /*If the input is a number, it may still be invalid*/ GPA=strtod(str, &ptr); /*The string is converted to a double*/ if(GPA>=0&&GPA<=4&&point<=1) /*If GPA is between 0 and 4, and the above is also satisfied (point=1), then the flag is 0 and thus a valid input*/ GPAflag=0; else printf("Invalid GPA. "); /*If not, it is still invalid*/ } } I personally don't think this will be a problem but I would really like to know why it happens, and if possible, a way to fix it. I can simply make a FOR loop: IF leading number is 4 and there's a '.' -> Reject But this seems like hard coding to me, I think it's rather a workaround than an actual solution. Or I can change the IF statement from "<=4" to "<4.0000000000000000000000...1". Which in my opinion should lose marks... (if I was the marker I will take marks off for that) Also, I am totally aware that the function "gets" is primitive and causes many problems (overflow... etc.). I have tried using fgets but it's a pain to implement... replacing the '\n' with '\0' blah blah... we haven't even learnt gets, let alone fgets. Is there a better way to implement fgets? Maybe have a function to replace the '\n'? I've tried that and it refused to work. Any help and tips are greatly appreciated!
Consider the following code: 0.1 + 0.2 == 0.3 -> false 0.1 + 0.2 -> 0.30000000000000004 Why do these inaccuracies happen?
import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; public class ConcurrentHashMapTest { public static void main(String[] args) { Map<String, String> hMap = new HashMap<String, String>(); hMap.put("FIRST", "1"); hMap.put("SECOND", "2"); hMap.put("THIRD", "3"); hMap.put("FOURTH", "4"); hMap.put("FIFTH", "5"); hMap.put("SIXTH", "6"); System.out.println("HashMap before iteration : " + hMap); Iterator<String> hashMapIterator = hMap.keySet().iterator(); while (hashMapIterator.hasNext()) { String key = hashMapIterator.next(); if (key.equals("FOURTH")){ hMap.put(key + "-SHIVAM", "I AM NEW KEY IN HMAP"); } } System.out.println("HashMap after iteration : " + hMap); } } Exception in thread "main" java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.nextEntry(Unknown Source) at java.util.HashMap$KeyIterator.next(Unknown Source) at ConcurrentHashMapTest.main(ConcurrentHashMapTest.java:21) I am wondering why this exception is coming. The exception is not at all seems to be fair in this case.
We all know you can't do the following because of ConcurrentModificationException: for (Object i : l) { if (condition(i)) { l.remove(i); } } But this apparently works sometimes, but not always. Here's some specific code: public static void main(String[] args) { Collection<Integer> l = new ArrayList<>(); for (int i = 0; i < 10; ++i) { l.add(4); l.add(5); l.add(6); } for (int i : l) { if (i == 5) { l.remove(i); } } System.out.println(l); } This, of course, results in: Exception in thread "main" java.util.ConcurrentModificationException Even though multiple threads aren't doing it. Anyway. What's the best solution to this problem? How can I remove an item from the collection in a loop without throwing this exception? I'm also using an arbitrary Collection here, not necessarily an ArrayList, so you can't rely on get.
I am trying to follow the standard QGIS tutorial for Swellendam based on QGIS version 2. Specifically the chapter which address coordinate systems If I go to a layer and try to re-project it from WGS 84 to WGS 84 / UTM zone 34 S it shows that my data (purple square) is somewhere south of North Africa in the sea. Obviously if I set the CRS all my measurements gets messed up. How do I proceed or do I only set the project CRS? Please try and explain the reasoning behind this. Details: Using Version 3.2 Windows 10
How do I change the projection of my shapefile using QGIS? The default projection is set to EPSG:3003, I want to change it to WGS84 EPSG:32632. When I do a reprojection or I change projection in the properties mask I don't have the correct result. On the left, I have the plan coordinates but they are not correct for the EPSG shown on the right:
I get that for simple linear regression, say y=b0+b1*x + error, the errors should be normally distributed, have no autocorrelation, constant variance. I also understand that there should be no collinearity, and that the relationship between x and y should be linear. Those are the standard assumptions in an intro to regression. However, as I'm learning about power transforms such as the Box Cox transformation, it's said that the Box Cox attempts to transform either the predictor x or response y to normally distributed if they are skewed in the first place. By this I mean the marginal distribution of x and y, not the distribution of y conditioned on x (this is related to residues). But other sources say it's not important for x and y to be normally distributed. So I'm thinking, if both x and y are uniformly distributed rather than normally distributed, and then there is a roughly linear relationship between them, wouldn't linear regression also work? You can still have the error be normally distributed in this case right? For example, say you have a cylindrical bar of chocolate. You want to regress the weight against the length of chocolate that you cut. Since the cross section is the same, the weight is linear with the length. But let's say you cut it using a machine that randomly decides on a length from a uniform distribution (1-10 inches). Then the weight should be uniformly distributed too. You should still have normally distributed residues due to manufacturing tolerance, accuracy of the machine, accuracy of measurement, etc... A linear regression clearly is suitable in this case, but neither x and y are normally distributed. So I'm guessing, it's not required for x and y to be normally distributed. Please advise.
In linear regression, each predicted value is assumed to have been picked from a normal distribution of possible values. See below. But why is each predicted value assumed to have come from a normal distribution? How does linear regression use this assumption? What if possible values are not normally distributed?
Why do I get the following error message: josef@josef-Satellite-L755:~$ apt-get install -f E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied) E: Unable to lock the administration directory (/var/lib/dpkg/), are you root? josef@josef-Satellite-L755:~$ Thank you for your help
I get this error whenever I try to install programs using the terminal: home@ubuntu:~$ apt-get install myunity E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied) E: Unable to lock the administration directory (/var/lib/dpkg/), are you root? Also I'm unable to install updates using the terminal.
In bootstrap.css they have added the following style rules after many classes, display: table; content: " "; The classes that include this are: .clearfix:before, .clearfix:after, .dl-horizontal dd:before, .dl-horizontal dd:after, .container:before, .container:after, .container-fluid:before, .container-fluid:after, .row:before, .row:after, .form-horizontal .form-group:before, .form-horizontal .form-group:after, .btn-toolbar:before, .btn-toolbar:after, .btn-group-vertical > .btn-group:before, .btn-group-vertical > .btn-group:after, .nav:before, .nav:after, .navbar:before, .navbar:after, .navbar-header:before, .navbar-header:after, .navbar-collapse:before, .navbar-collapse:after, .pager:before, .pager:after, .panel-body:before, .panel-body:after, .modal-header:before, .modal-header:after, .modal-footer:before, .modal-footer:after { display: table; content: " "; } My question is why is this blankspace added after and before these classes and why is it's display set to table not something else like display: block or display: inline-block?
I have the age-old problem of a div wrapping a two-column layout. My sidebar is floated, so my container div fails to wrap the content and sidebar. <div id="container"> <div id="content"></div> <div id="sidebar"></div> </div> There seem to be numerous methods of fixing the clear bug in Firefox: <br clear="all"/> overflow:auto overflow:hidden In my situation, the only one that seems to work correctly is the <br clear="all"/> solution, which is a little bit scruffy. overflow:auto gives me nasty scrollbars, and overflow:hidden must surely have side effects. Also, IE7 apparently shouldn't suffer from this problem due to its incorrect behaviour, but in my situation it's suffering the same as Firefox. Which method currently available to us is the most robust?
So, 3 years ago I was convicted with a simple assault/domestic with a 3 year filing which means it will be completely off my record in november of this year. Im planning on going to england to visit for 2 weeks in may and was wondering if that was going to be a problem or if im going to be fine. I was never imprisoned for it but i did have to take like 3 months of a batterers intervention program, but like i said that was 3 years ago. Is this going to be a problem? and if you answer can you post a source? ive been looking on government websites and couldnt find anything that pertained to my situation.
I have a friend with a criminal record who wants to go to London with me and I'm trying to determine if that is actually a possibility. This friend was convicted of a class A misdemeanor on Dec 14, 2011 for theft. The court disposition was deferred so they weren't sentenced to any jail time (although they were in jail shortly following their initial arrest and prior to their being bonded out). They were, however, placed on probation for two years. Since they were never actually sentenced to jail time it seems like, per , that their visiting the UK shouldn't be a problem.
Now, with special relativity applied to the scenario of me getting closer and closer to light speed, my mass would increase with respect to the observer, and also my length would contract in the direction of motion, again with respect to the observer. Now, if this is allowed to continue, there certainly would come a point where my mass would be observed to be very very high, and my length contracted to below my Schwarzschild Radius, now what would happen in this scenario? Would the observer observe a black hole while observing me? if not, what would the observer actually see?(If the observer sees me as a black hole, shouldn't that technically not happen since nothing is different to me from my own point of view!? ) Would I turn into a black hole? and if not, what would the observer see if I do not turn into a black hole? Would the observer notice any gravitational effects from me?
I'm a big fan of the podcast Astronomy Cast and a while back I was listening to a Q&A episode they did. A listener sent in a question that I found fascinating and have been wondering about ever since. From the show : Arunus Gidgowdusk from Lithuania asks: "If you took a one kilogram mass and accelerated it close to the speed of light would it form into a black hole? Would it stay a black hole if you then decreased the speed?" Dr. Gay, an astrophysicist and one of the hosts, explained that she'd asked a number of her colleagues and that none of them could provide a satisfactory answer. I asked her more recently on Facebook if anyone had come forward with one and she said they had not. So I thought maybe this would be a good place to ask.
How do I get the value of my controller in my lighning controller I have the following ligntningcomponent: <aura:component access="global" implements="forceCommunity:availableForAllPageTypes" controller="NavigateToProfielController"> <aura:handler name="init" value="{!this}" action="{!c.openPage}"/> </aura:component> With The following Controller: ({ openPage: function (component, event, helper) { var recordId = component.get("v.LoggedInUserContact"); var url = '/flow/LerarenCommunity_Licentie_Verlenging?varProfielId="' + recordId +'"'; window.open(url, '_self'); } }) In my NavigateToProfielController I need to call LoggedInUserContact from which I want to pass the value to the RecordId My URL output gives me undefined: https:.../flow/LerarenCommunity_Licentie_Verlenging?varProfielId="undefined"
i have this attribute in my component: <aura:attribute name="currentRecordDuns" type="String" /> im trying to send it to the apex controller. this is the javascript controller: ({ doInit : function(component, event, helper) { helper.getAccounts(component); },}) this is the helper: ({ getAccounts: function(component) { var action = component.get("c.getAccounts"); action.setParams({ "currentDuns": component.get("v.currentRecordDuns"), "freeTextFilter": component.find("freeTextFilter").get("v.value") }); //Set up the callback var self = this; action.setCallback(this, function(actionResult) { component.set("v.Accounts", actionResult.getReturnValue()); }); $A.enqueueAction(action); },}) this is the apex code: public class AccConListController { @AuraEnabled public static List<Account> getAccounts(String currentDuns,String freeTextFilter) { String q = 'SELECT Id, Name,DunsNumber, (select name, Phone, Email FROM Contacts where Name like \'%' + freeTextFilter + '%\' or Phone like \'%' + freeTextFilter + '%\' or Email like \'%' + freeTextFilter + '%\') FROM Account where DunsNumber=:currentDuns'; //q+= ' and Name like \'%' + freeTextFilter + '%\''; List<Account> accounts= Database.query(q); return accounts; } } i didnt get the results i wanted, so i looked at the debug log and saw: 12:13:25:003 VARIABLE_ASSIGNMENT [19]|currentDuns|null i have no idea why, please advise EDIT: how do i assign a value to the currentRecordDuns: in my component i call: <aura:handler name="init" value="{!this}" action="{!c.doInit}" /> this is doInit in the controller: ({ doInit : function(component, event, helper) { helper.getDuns(component); helper.getLeads(component); helper.getAccounts(component); component.set("v.showContacts", component.find("checkboxContacts").get("v.value")); component.set("v.showLeads", component.find("checkboxLeads").get("v.value")); }, }) the function the retrieves the currentRecordDuns: helper.getDuns(component); this is the function in the helper: getDuns: function(component) { var action = component.get("c.getDunsByRecordId"); action.setParams({ "currentRecordID": component.get("v.recordId") }); //Set up the callback var self = this; action.setCallback(this, function(actionResult) { component.set("v.currentRecordDuns", actionResult.getReturnValue()); }); $A.enqueueAction(action); }, and this is the function in the apex controller: @AuraEnabled public static string getDunsByRecordId(id currentRecordID) { String q = 'SELECT DunsNumber FROM Account where Id=:currentRecordID limit 1'; List<Account> accounts = Database.query(q); return (!accounts.isEmpty()) ? accounts[0].DunsNumber : ''; }
ephemeral-ephemeral ECDH is it susceptible to MITM attack ? if yes, can you please give me a detailed answer ( Workflow that can be followed by the attacker) and how we can prevent this attack (static-ephemeral or we can keep ephemeral-ephemeral and change some parameters)? Thank you in advance
I'm new to cryptography and I just started learning about the Diffie-Hellman key agreement. I read that this system is vulnerable to a man-in-the-middle attack when used alone. What kind of attack is this?