body1
stringlengths 20
4.1k
| body2
stringlengths 23
4.09k
|
---|---|
I have Travel document convention 1951 issued by Romania, do I need a visa to visit Sweden or Germany? | What countries allow me to pass their borders visa-free? Am I allowed to visit and work in EU and Schengen countries? |
I have this function in postgresSQL and I need some help to take them from enviroment. Adding Vars in DockerFile CREATE OR REPLACE FUNCTION prc_get_connstr() RETURNS TEXT AS $$ DECLARE res TEXT; SRC_ADDR varchar(50) := `echo ${SRC_ADDR_CRD:-noaddr}`; SRC_PORT varchar(50) := `echo ${SRC_PORT_CDR:-noport}`; SRC_DB varchar(50) := `echo ${SRC_DB_CDR:-nodb}`; SRC_USR varchar(50) := `echo ${SRC_USR_CDR:-nouser}`; SRC_PASS varchar(50) := `echo ${SRC_PASS_CDR:-nopass}`; BEGIN RETURN 'dbname=SRC_DB host=SRC_ADDR port=SRC_PORT user=SRC_USR password=SRC_PASS connect_timeout=5'; END; $$ LANGUAGE 'plpgsql'; When I deploy it doesn't work You are now connected to database "cdr" as user "postgres". CREATE EXTENSION CREATE FUNCTION psql:/docker-entrypoint-initdb.d/2_cdr_trigger.sql:31: ERROR: syntax error at or near "$" LINE 6: SRC_ADDR varchar(50) := `echo ${SRC_ADDR_CRD:-noaddr}`; What i have to do to declare de enviroment vars. | In MS SQL Server, I create my scripts to use customizable variables: DECLARE @somevariable int SELECT @somevariable = -1 INSERT INTO foo VALUES ( @somevariable ) I'll then change the value of @somevariable at runtime, depending on the value that I want in the particular situation. Since it's at the top of the script it's easy to see and remember. How do I do the same with the PostgreSQL client psql? |
Given $f$ is an even function of interval $(-a, a)$, $a>0$ and $0<c < a$. Prove that if $L'f(c)$ exists, then $Rf'(-c)$ exists and $Lf'(c)=-Rf'(-c)$. Deduce that if $f$ is differentiable on $(-a,a)$, then $f'$ is an odd function on $(-a,a)$. $f$ is even then $f(-x)=f(x)$, then $f'(-x)=-f'(x)$ i.e $f'$ is odd function. But what exactly the question want? Please help with apropriate answer. | This is the question: "Show that the derivative of an even function is odd and that the derivative of an odd function is even. (Write the equation that says f is even, and differentiate both sides, using the chain rule.)" I already read numerous solutions online. was the official solution but I didn't quite understand it (particularly, I'm not convinced why exactly $dz/dx=-1$; even though $z=-x$). Thanks in advance =] |
has bought up some interesting discussion around (un)holy damage. So far, we appear to have established the following: There does not appear to be . There does not seem to be any rules for (un)holy damage. However, I couldn't find any rules for good/evil damage either. , where every instance of holy damage should be good damage and unholy damage should be evil damage. At minimum, both damage types are known to appear several times in the Book of Exalted Deeds and the Book of Vile Darkness, but they also both appear once in the DMG2's (Un)Holy Strike and the errata for the first Monster Manual. In the interest of furthering the debate on whether or not this damage type is an error, I'd like to ask: what sources mention (un)holy damage and/or its DR? In particular, I'm interested in seeing if there are more cases outside of the BoED/BoVD, as they would be evidence against these damage types being erroneous and a potential place to look for rules about these damage types. I'd also like to see if they (or better yet, rules for them) appear anywhere in 3e. | We've got a party with a Celestial Mystic (Book of Exalted Deeds), and I was reading about his level 9 ability, which grants him DR 10/Unholy. Would this be different from DR/evil, as in it would only be breached by unholy weapons, and not attacks from evil outsiders? I'm asking this because I haven't seen any monsters or anything that have things like DR/Unholy, Holy, Axiomatic, etc. It's usually just Good/Evil/Lawful/Chaotic. Has anyone seen any material throughout the books like this? My intuition tells me it's a typo and should be DR 10/evil, but the errata doesn't say anything about this. |
This is my class public static class FeedItem { public int likesCount; public boolean isLiked; public FeedItem(int likesCount, boolean isLiked) { this.likesCount = likesCount; this.isLiked = isLiked; } } This is the other class where i utilised the FeedItem Class class PostViewHolder extends RecyclerView.ViewHolder { FeedItem feedItem; FeedItem getFeedItem() { return feedItem; } } Then i use it in an animation file FeedItemHolderInfo feedItemHolderInfo = (FeedItemHolderInfo) preInfo; FeedAdapter.PostViewHolder holder = (FeedAdapter.PostViewHolder) newHolder; animateHeartButton(holder); updateLikesCounter(holder, holder.getFeedItem().likesCount); Now in the MainActivity has a method where i update the arraylist public void updateItems(boolean animated) { feedItems.clear(); feedItems.addAll(Arrays.asList( new FeedItem(33, false), new FeedItem(1, false), new FeedItem(223, false), new FeedItem(2, false), new FeedItem(6, false), new FeedItem(8, false), new FeedItem(99, false) )); if (animated) { notifyItemRangeInserted(0, feedItems.size()); } else { notifyDataSetChanged(); } } But the app crashes at point updateLikesCounter(holder, holder.getFeedItem().likesCount); With the error being shown as java.lang.NullPointerException: Attempt to read from field 'int com.example.alsongdunstan.thefaithapp.ui.adapter.FeedAdapter$FeedItem.likesCount' on a null object reference Here i have even tried initialising the object from MainActivity before i call the updateItems Method itemList.add(new FeedAdapter.FeedItem(124,false)); Though another error arises which i dont want. Some here Thanks | What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them? What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely? |
I have a brand new Pixel 3A with the recently updated Android 10 update. Google Assistant has been activated while in my laptop bag. I'm assuming this is because of the incessant urgings that Google displays on screen, and of course the new android doesn't swictch the screen off when you hit the power button, it leaves an 'awake' screen that can respond. Well, however it happened, Assistant is enabled and it is causing a number of problems, and I can't switch it off. The main issues are: Assistant repeats continuously on the arcane workings of the system. Voice messages like 'Checking WebAPP for updates' 'Downlaoding update' '10% downloaded, etc' Assistant stops the phone Whenever any event status changes Examples of this are 'Home screen 1of 2, double tap to enable' etc., etc., etc totally take over the user interface. The UI is now a triple tap pause system. To do anything, you tap an icon and wait for it to be highlighted (at which point a stream of help instructions are played back) then double tap to activate. This happens for each and every tap including back buttons, home buttons, whatever.The system is now an incredibly slow, novice system. The gesture system is disabled. This is the real killer. Without the gesture system you are locked into only what is visible. You cant get into the app drawer, for instance. And you can't get beyond the displayed items in the settings screens. My Problem is: The instructions to switch off assistant are as follows: Open the google app Tap the compass at the bottom right Tap the profile button top right Tap the Assistant Scroll down to the Assistant devices,Devices section and switch off. BUT gestures and scrolling are disabled You can see to the Face Match setting, but connected devices is somewhere way, way down below that. And one can't get there. Not for love nor money. Under Android 9, I could deactivate with a voice command. That seems to be gone. Is my only solution to do a factory re-set? Anyone out there with a solution for me? | I accidentally turned on talkback in the Accessibility menu. When I turned it on I got some kind of walk through on how to use it. I couldn't cancel it. So I turned off my phone. When I turned it back on again it took me 15 minutes to unlock my phone. Apparently I had to touch a button to give it focus and then double tap it to click it. Now my question is: how do I turn this off? I can't reach the settings because I have don't know how to access a drop down and I can't scroll through all my apps. |
Sometimes when going through questions, I can see that someone has previously voted to close it. However quite often I disagree with the close vote and I would like to vote for the question to stay open instead. However I can't do that. Maybe adding it as an option to this popup: But make it only show up when not doing a review task since the review tasks have their own way to vote to keep a question open. | My request is simple: Many times, there will be a question where some people feel like it should be closed. At the same time, I'll feel like it's a perfectly legit question, and it should therefore NOT be closed. Right now, I have to wait till it gets enough close votes (which it always does for some reason, as soon as 1 or 2 people vote to close, e/o else decides to vote as well) and then vote to re-open. How about, as soon as there's one vote to close, there should be an option to counter the close vote, something like "vote not to close" or whatever. This would then bring the "Vote to close" number down by one. Only when the vote to close outnumbers the vote not to close by 5, that's when a question is indeed closed. Any thoughts? |
I just want to open a website link using the terminal in ubuntu. I am using the following code:- firefox the problem is that once this command is executed, the terminal does not get free until and unless I close mozilla or press ctrl+c. I want to execute few more codes after the browser gets opened. What should I do??? | Sometimes you run a program from the terminal, say, lxpanel†. The terminal won't drop you back to the prompt, it'll hang. You can press Ctrl+C to get back to the prompt, but that will kill lxpanel. However, pressing Alt+F2 (which pops up a window to take a command) and running lxpanel works gracefully. Why is this? What is different between running a command from the terminal and from the 'run' window that appears when you press Alt+F2? † lxpanel here was just used as an example. I have experienced this with multiple programs |
I want to filter an array that only contains emails, I did this emails = emails.filter((x)=>(x !== (undefined || null || ''))) that delete the empty value, but can accept a value that is not an email. | Is there a regular expression to validate an email address in JavaScript? |
This is exercise 12.2.I in Vakil's notes: Suppose $X$ is a finite type scheme of pure dimension $d$ over an algebraically closed field $k$. Show that $X$ is regular at its closed points if and only if it is smooth. For the forward direction, for a closed point $p$, $\operatorname{dim}\mathcal{O}_{X,p}=d$. From Exercise 12.1.G, one has that the Zasiki cotangent space at a closed point is given by the cokernel of the Jacobian matrix. If $X$ is regular at closed points, then corank of the Jacobian matrix is $d$ at all closed points, hence by Exercise 12.2.H, the Jacobian matrix has corank $d$ at all points. This shows the smoothness. Conversely, smoothness of $X$ implies the Jacobian has corank $d$ at all points, in particular closed points. Is the result true for $k$ not algebraically closed? I don't see why it's required that $k$ is algebraically closed. | Take $X=\operatorname{Spec}(k[x,y]/(y^2-x^p+t))$ with $k=\mathbb{F}_p(t)$ and $p\neq2$. The Jacobian ideal is $J=(y,y^2-x^p+t)=(y,x^p-t)$ which is maximal ie a closed point of $X$ so Jacobian criterion work to say that $\mathfrak{p}=(y,x^p-t)$ is singular. Let's $A=k[x,y]/(y^2-x^p+t)$ then in $A_\mathfrak{p}$ one have $\mathfrak{p}A_\mathfrak{p}=(y)$ because $x^p-t=y^2\in(y)$ so $\mathfrak{p}A_\mathfrak{p}$ has so many generator as $\dim A_\mathfrak{p}$ (which is 1 because $\mathfrak{p}$ is maximal in $A$ so $\dim A=\dim A_\mathfrak{p}$). So $A_\mathfrak{p}$ is regular ie $\mathfrak{p}$ is regular. Where is my stupid mistake? |
I am just curious if solar panels, because they absorb radiation, cool the atmosphere. If there were enough of them, would the temperature be different? I'm not a physicist or student. | I guess that energy will be used up and, at the end, will contribute to heat the earth, so I see no big differences... please explain your point of view. |
I'm trying to solve this limit, for which I already know the solution thanks to Wolfram|Alpha to be $\sqrt[3]{abc}$: $$\lim_{n\rightarrow\infty}\left(\frac{a^\frac{1}{n}+b^\frac{1}{n}+c^\frac{1}{n}}{3}\right)^n:\forall a,b,c\in\mathbb{R}^+$$ As this limit is an indeterminate form of the type $1^\infty$, I've been trying to approach it by doing: $$\lim_{n\rightarrow\infty}\left(\frac{a^\frac{1}{n}+b^\frac{1}{n}+c^\frac{1}{n}}{3}\right)^n=\lim_{n\rightarrow\infty}\left(1+\frac{a^\frac{1}{n}+b^\frac{1}{n}+c^\frac{1}{n}-3}{3}\right)^n=\lim_{n\rightarrow\infty}\left(1+\frac{1}{\frac{3}{a^\frac{1}{n}+b^\frac{1}{n}+c^\frac{1}{n}-3}}\right)^n=\lim_{n\rightarrow\infty}\left(1+\frac{1}{\frac{3}{a^\frac{1}{n}+b^\frac{1}{n}+c^\frac{1}{n}-3}}\right)^{\frac{3}{a^\frac{1}{n}+b^\frac{1}{n}+c^\frac{1}{n}-3}\cdot\frac{a^\frac{1}{n}+b^\frac{1}{n}+c^\frac{1}{n}-3}{3}\cdot n}=e^{\lim_{n\rightarrow\infty}\frac{a^\frac{1}{n}+b^\frac{1}{n}+c^\frac{1}{n}-3}{3}\cdot n}$$ But now when I approach that top limit this is what I get: $$\lim_{n\rightarrow\infty}\frac{a^\frac{1}{n}+b^\frac{1}{n}+c^\frac{1}{n}-3}{3}\cdot n=\lim_{n\rightarrow\infty}\frac{n\cdot a^{\frac{1}{n}}}{3}+\frac{n\cdot b^{\frac{1}{n}}}{3}+\frac{n\cdot c^{\frac{1}{n}}}{3}-n=\lim_{n\rightarrow\infty}\frac{n\cdot a^0}{3}+\frac{n\cdot b^0}{3}+\frac{n\cdot c^0}{3}-n=\lim_{n\rightarrow\infty}\frac{n}{3}+\frac{n}{3}+\frac{n}{3}-n=0$$ And hence the final limit should be $e^0=1$ which is clearly wrong but I honestly don't know what I did wrong, so what do you suggest me to solve this limit? | For $a,b,c>0$, Find $$ \lim_{n \to \infty}\left(\frac{a^{1/n}+b^{1/n}+c^{1/n}}{3}\right)^n$$ how can I find the limit of sequence above? Provide me a hint or full solution. thanks ^^ |
I need to draw (simple) movement arrows in linguex examples. I would normally use the tree-dvips package for that (as in the LaTeX example below) but this time I must use XeLaTeX, which is incompatible with tree-dvips. What is an alternative that you can recommend? Note that I do not need to use arrows more complex that what's in the example. \documentclass{article} \usepackage{linguex} \usepackage{tree-dvips} \usepackage{linguex} \begin{document} \ex. ta\node{tgt}rget {} \dots {} \node{trace}t \abarnodeconnect[-9pt]{trace}{tgt} \end{document} | Is it possible in gb4e to gloss an example AND have a movement arrow in the example. I'm currently using gb4e, and I want an arrow from 't' to 'een auto'. I already looked at other packages (xytree, tikz), but I found no way to do this \documentclass[11pt]{article} \usepackage{gb4e} \begin{document} \begin{xlist} \ex \label{scramble-det} \gll ... dat Jan een auto gisteren t gekregen heeft.\\ ... that John a car yesterday t gotten has \\ ... that John a car yesterday. \end{xlist} \end{document} The following, as an example, is taken from the , but I don't understand it at and therefore cannot modify it to suit my needs: |
In the sentence: The team could not win the match because it was split into two groups. The correction given is: The team could not win the match because they were split into two groups. According to me, "team" is a single entity which was split into two, so that should not be incorrect. Am I missing something? | A newspaper ran this headline recently: (1) [emph added] Why did it not read: (2) ? Police cracks down on IAC protesters. I have found instances of "police cracks" in newspapers: and . However, suggests that "police cracks" is significantly less frequent: I think that the difference between "Police crack down" and "Police cracks down" is influenced by and that the difference in this example reflects the of the verb's . Here, "cracks" is inflected for singular number, which implies that its subject is singular, and "crack" is inflected for plural number, which implies that its subject is plural. E.g.: The army cracks down on IAC protesters. [singular] The armies crack down on IAC protesters. [plural] The confusing thing about (1) and (2) is that the subject, "police", looks like it is singular; the plural form would be "polices", but I have never heard this form (for the noun). It sounds like police fits the definition of a , which Wikipedia says is "the name of a number (or collection) of people or things taken together and spoken of as one whole. For example, in the phrase 'a pride of lions', pride is a collective noun." Police fits this because it refers to (i) some relevant police force or (ii) some relevant group of police officers, which are both collections of people taken as wholes. It does not refer to a single police officer. So one might conjecture that verbs whose subjects are collective nouns are inflected for plural number. However, it sounds like group also fits the definition of a collective noun because it refers to a collection of individuals taken as a whole. And I think that both of the following sound acceptable. (3) The group crack down on IAC protesters. (4) The group cracks down on IAC protesters. The above conjecture also doesn't explain why it is sometimes okay to use "police cracks". My preliminary questions: Do (1), (2), (3) and (4) all sound acceptable to everyone else? Are police and group both collective nouns? My main questions: If (3) and (4) are both acceptable and police and group are both collective nouns, then why does (1) but not (2) sound acceptable, or at least why is "police crack" better than "police cracks"? How do you determine the correct conjugation for a verb whose subject is a collective noun? Is there a general rule, or does it vary from case to case? My secondary questions: Does the behavior of (1) and (2) have to do with ? Is using police to refer to the police force more like a or ? Does it matter if you add "the": (5) The police crack down on IAC protesters. (6) ? The police cracks down on IAC protesters. I ask these secondary questions because I find it interesting that policeis, to me, a near of police force, but police force () behaves oppositely to police () when it comes to subject-verb agreement: (7) ? The police force crack down on IAC protesters. (8) The police force cracks down on IAC protesters. [Note: the question mark at the beginning of an example indicates questionable .] |
Consider a Lie group $G$, $$ L_x : G\rightarrow G, ~~~~~ L_x(y)=xy $$ is the translations from the left. A vector field $X$ on $G$ is left invariant if $$ dL_x (X)=X. $$ Let $x_t$ be the flow of $X$, then why we have $L_y\circ x_t = x_t \circ L_y$ ? There is a similar . But I can't understand it. The answer hint Let $\theta^{(p)}(t) = yx_t(p)$ and $\psi^{(p)}(t) = x_t(yp)$. Compute both ${\theta^{(p)}}'(0)$ and ${\psi^{(p)}}'(0)$. Then use uniqueness of integral curves. But in my calculation, $$ {\theta^{(p)}}'(0) =\frac{d}{dt}|_{t=0} ~yx_t(p)=yX(p) \\ {\psi^{(p)}}'(0)= \frac{d}{dt}|_{t=0} x_t(yp) = X(yp) $$ Evenly, I don't know what is the $yX(p)$. Since $y$ is a element of $G$, and $X(p)$ is a tangent vector at $p$, how do they multiply ? | Given $G$ a lie group and $X$ a left-invariant vector field. Let $\Phi_X^t$ be the local flow of $X$. Why can we conclude that $\Phi_X^t \circ L_x=L_x \circ \Phi_X^t$? Thanks! |
The underscores and carrots are highlighted red which is really an eyesore. How can I change/remove this? The plugin works fine, so I don't think it's an installation issue. Update for more details: Vim 8.1, I doubt I have any conflicting plugins. I have a tex.vim file located at /usr/local/share/vim/vim81/syntax/. | Sorry if this is the wrong place to ask this, I'm new to the site :/ My issue is this: when editing in vim, my syntax file highlights underscores and carets when found in non-math text, which is fine, except vim doesn't recognize that "align" is a math environment. What do I need to do to fix this? |
this is car controller using UnityEngine; using System.Collections; using System.Collections.Generic; public class CarController : MonoBehaviour { public float acceleration; public float steering; private Rigidbody2D rb; void Start() { rb = GetComponent<Rigidbody2D>(); } void FixedUpdate() { float h = -Input.GetAxis("Horizontal"); float v = Input.GetAxis("Vertical"); Vector2 speed = transform.up * (v * acceleration); rb.AddForce(speed); float direction = Vector2.Dot(rb.velocity, rb.GetRelativeVector(Vector2.up)); if (direction >= 0.0f) { rb.rotation += h * steering * (rb.velocity.magnitude / 5.0f); //rb.AddTorque((h * steering) * (rb.velocity.magnitude / 10.0f)); } else { rb.rotation -= h * steering * (rb.velocity.magnitude / 5.0f); //rb.AddTorque((-h * steering) * (rb.velocity.magnitude / 10.0f)); } Vector2 forward = new Vector2(0.0f, 0.5f); float steeringRightAngle; if (rb.angularVelocity > 0) { steeringRightAngle = -90; } else { steeringRightAngle = 90; } Vector2 rightAngleFromForward = Quaternion.AngleAxis(steeringRightAngle, Vector3.forward) * forward; Debug.DrawLine((Vector3)rb.position, (Vector3)rb.GetRelativePoint(rightAngleFromForward), Color.green); float driftForce = Vector2.Dot(rb.velocity, rb.GetRelativeVector(rightAngleFromForward.normalized)); Vector2 relativeForce = (rightAngleFromForward.normalized * -1.0f) * (driftForce * 10.0f); Debug.DrawLine((Vector3)rb.position, (Vector3)rb.GetRelativePoint(relativeForce), Color.red); rb.AddForce(rb.GetRelativeVector(relativeForce)); } } and this is camera controller using UnityEngine; public class CameraController : MonoBehaviour { public Transform player; public Vector3 offset; void Update() { transform.position = new Vector3(offset.x + offset.x, player.position.y + offset.y, offset.z); // Camera follows the player with specified offset position } } | I created 3 boxes, then align the three to form some sort of a gate, I set the parent to an empty object so that I can easily move it. And I add box collider inside the gate. When I try to rotate it on Y axis, the boxes deforms I just want to rotate the Y, not deformed it. Here are the object Is this related to the transformation I created before? Something that requires to apply the transformation first? like in blender3d? |
I have a total of 3 laptops and 2 tablets to take in my carry on and/or laptop bag. One laptop is my work laptop. The second laptop is personal which is 3 years old. The third one is also personal but it is damaged very badly with taping all over. It is more than 5 years old, and looks in bad condition. The 2 tablets are each worth $50 each and are new. How should I carry these? Will I have a problem taking all of these on the plane? | I am planning to travel to India (COK airport, Kerala) from United States. I want to take my laptop as well as my tablet (iPad). Am I allowed to take both in my backpack with my documents related my work. I think I am allowed to take only one computer as per the rule. Will the customs consider my iPad as a computer? What all I can take? One of my friends took 2 laptops (1 work and 1 personal) and had trouble at the airport. Also I am planning to take some wristwatches (7 of them, each avg price is 45 $). I read in a website that I can take stuff up to max 35000 INR. Is that true? In that case, how will I manage my stuff? |
Let $a_n$ be a sequence of real numbers such that $\sum_{n=1}^{\infty} a_nb_n < \infty$ for any sequence $b_n$ satisfying $\sum_{n=1}^{\infty}b_n^2 < \infty$. Prove that $\sum_{n=1}^{\infty}a_n^2 < \infty$. This question is in the chapter on Hilbert spaces. What sort of technique is required here? Seems like a baby analysis question. | I'm trying to prove the following: If $(a_n)$ is a sequence of positive numbers such that $\sum_{n=1}^\infty a_n b_n<\infty$ for all sequences of positive numbers $(b_n)$ such that $\sum_{n=1}^\infty b_n^2<\infty$, then $\sum_{n=1}^\infty a_n^2 <\infty$. The context here is functional analysis homework, in the subject of Hilbert spaces. Here's what I've thought: Let $f=(a_n)>0$. Then the problem reads: if $\int f\overline{g}<\infty$ for all $g>0,g\in \ell^2$, then $f\in \ell^2$. This brings the problem into the realm of $\ell^p$ spaces. I know the inner product is defined only in $\ell^2$, but it's sort of like saying: if $\langle f,g\rangle <\infty$ for all $g>0,g\in \ell^2$ then $f\in \ell^2$. I read this as: "to check a positive sequence is in $\ell^2$, just check its inner product with any positive sequence in $\ell^2$ is finite, then you're done", which I find nice, but I can't prove it :P From there, I don't know what else to do. I thought of Hölder's inequality which in this context states: $$\sum_{n=1}^\infty a_nb_n \leq \left( \sum_{n=1}^\infty a_n^2 \right)^{1/2} \left( \sum_{n=1}^\infty b_n^2 \right)^{1/2}$$ but it's not useful here. |
In a folder, I have number of files that are in .dat extension format (it is originally .xvg format but have changed to .dat format to plot all other graphs in a single plot) which contains the values along with the some written headings etc., as : # Grace project file # @version 50125 @page size 792, 612 @page scroll 5% @page inout 5% @link page off @map font 8 to "Courier", "Courier" @map font 10 to "Courier-Bold", "Courier-Bold" @map font 11 to "Courier-BoldOblique", "Courier-BoldOblique" @map font 9 to "Courier-Oblique", "Courier-Oblique" @map font 4 to "Helvetica", "Helvetica" @map font 6 to "Helvetica-Bold", "Helvetica-Bold" @map font 7 to "Helvetica-BoldOblique", "Helvetica-BoldOblique" @map font 5 to "Helvetica-Oblique", "Helvetica-Oblique" . . . . @ s0 errorbar riser linestyle 1 @ s0 errorbar riser clip off @ s0 errorbar riser clip length 0.100000 @ s0 comment "rdf_CaNm.xvg" @ s0 legend "N1" @target G0.S0 @type xy 0 0 0.002 0 0.004 0 ie., there are 327 lines from #Grace project file(being line one) --> @type xy(being line 327) and then the 0 0 is the 328th line, 0.002 0 is the 329th line etc. How can I delete all the first 327 lines in all the files of .dat format containing in the folder (yes all those .dat files have first 327 lines as stated above) through the command in terminal? | I have multiple files that contain ascii text information in the first 5-10 lines, followed by well-tabulated matrix information. In a shell script, I want to remove these first few lines of text so that I can use the pure matrix information in another program. How can I use bash shell commands to do this? If it's any help, I'm using RedHat and an Ubuntu linux systems. |
This is one of those things that seems like it should be laughably easy but I'm stuck... I need to open a CSV file that is stored in SHIFT_JIS encoding and decode it to Unicode and also encode in UTF-8. It sounds like this is pretty straightforward in ruby 1.9 but I'm not feeling particularly adventurous on my production Rails app, so I need to stick with 1.8.7. Any help would be appreciated. | I have a Ruby script that generates a UTF8 CSV file remotely in a Linux machine and then transfers the file to a Windows machine thru SFTP. I then need to open this file with Excel, but Excel doesn't get UTF8, so I always need to open the file in a text editor that has the capability to convert UTF8 to ANSI. I would love to do this programmatically using Ruby and avoid the manual conversion step. What's the easiest way to do it? PS: I tried using iconv but had no success. |
Suppose $f$ is twice differentiable on $(a, \infty)$ and let $\lim_{x \to \infty}f(x) = 0$. Also assume that $f''(x)$ is bounded for all $x \in (a, \infty)$. Prove that $f'(x) \to 0$ as $x \to \infty$. Note that if $f'(x)$ tends to a limit as $x \to \infty$ then this limit must be $0$ (because of the relation $f(x) - f(x/2) = (x/2)f'(c)$). What we need to establish now is that $f'(x)$ does tend to a limit. To show that we need to somehow use the fact that $f''(x)$ is bounded. Let $b > 0$ be any arbitrary but fixed number then we have relation $f(x + b) - f(x) = bf'(c)$ and this again implies that for all sufficiently large $x$ the derivative $f'$ takes a small value in the interval $(x, x + b)$. What we need to show that eventually all the values of $f'$ are small in such intervals. Now we can take $b$ as small as we please, we can therefore find a value $N > 0$ such that $f'$ takes very small value for at least one point in $(x, x + b)$ for all $x > N$. If $p, q$ are two points of this interval $(x, x + b)$ then $|f'(p) - f'(q)| = |(p - q)f''(\xi)| \leq b|f''(\xi)|$ and since $f''$ is bounded it follows that $f'(p) - f'(q)$ is small so that effectively all values of $f'$ in $(x, x + b)$ are small. The above is a non-rigorous argument which I have not been able to make rigorous by using $\epsilon, \delta$ in proper manner. Maybe the approach used above can't be made rigorous and I am wrong path (or may be not!). Please help me in making above approach rigorous or suggest some alternative method. Further there is another generalization available: If $f(x) $ tends to a finite limit as $x \to \infty$ and $f^{(n + 1)}(x)$ is bounded then show that $f^{(n)}(x) \to 0$ as $x \to \infty$. I have not tried to solve this general problem and any hint would be great. | Let $f\colon\mathbb R\to\mathbb R$ be twice differentiable with $f(x)\to 0$ as $x\to\infty$ and $f''$ bounded. Show that $f'(x)\to0$ as $x\to\infty$. (This is inspired by to a different question) |
After that When i run this 'git reset HEAD@{1}' It shows 'Unstaged changes after reset:' followed by all my files including lost files. What should be my next command to recover the lost files? | Is it possible to undo the changes caused by the following command? If so, how? git reset --hard HEAD~1 |
I'm working through Stanford's on Probability for Computer Scientists, and on #15 there's an extra credit question I can't explain: Consider a game that uses a generator which produces independent random integers between 1 and 100 inclusive. The game starts with a sum $S = 0$. The first player adds random numbers from the generator to $S$ until $S > 100$ and records her last random number as $x$. The second player continues adding random numbers from the generator to $S$ until $S > 200$ and records her last random number as $y$. The player with the highest number wins, i.e. if $y > x$ the second player wins. Is this fair? Write a program to simulate 100,000 games. What is the probability estimate, based on your simulations, that the second player wins? Give your answer rounded to 3 places behind the decimal. For extra credit, calculate the exact probability (without sampling). By creating a Python script to simulate 100,000 games, the probability of the second player winning hovers around $0.532$. Yet, I suspected it to be $0.495$ since each players' last number could be any number from $1$ to $100$ since $S \leq 100$ is met to allow them to keep generating numbers. The same goes for player two and $S \leq 200$. Since each number seems equally likely, I found: $$P(y > x) = \frac{99 \cdot 100}{2} \cdot \frac{1}{100^2} = 0.495$$ But this is definitely not correct as the simulation shows. Where is the problem in my analysis? I made sure I used a uniform distribution for generating numbers in my simulation. | Consider a game that uses a generator which produces independent random integers between 1 and 100 inclusive. The game starts with a sum S = 0. The first player adds random numbers from the generator to S until S > 100 and records her last random number 'x'. The second player, continues adding random numbers from the generator to S until S > 200 and records her last random number 'y'. The player with the highest number wins, i.e. if y > x the second player wins. Is this game fair? Write a program to simulate 100,000 games. What is the probability estimate, based on your simulations, that the second player wins? Give your answer rounded to 3 places behind the decimal. For extra credit, calculate the exact probability (without sampling). import random CONST_TIMES = 100000 CONST_SMALL = 100 CONST_LARGE = 200 def playGame(): s = 0 while s <= CONST_SMALL: x = random.randint(1, CONST_SMALL) s = s + x; while s <= CONST_LARGE: y = random.randint(1, CONST_SMALL) s = s + y if x < y: return 's' elif x == y: return 'm' else: return 'f' fst = sec = 0 for i in range(CONST_TIMES): winner = playGame() if winner == 'f': fst = fst + 1 elif winner == 's': sec = sec + 1 secWinPro = round(float(sec) / CONST_TIMES, 3) print secWinPro The simulation probability is about 0.524. I want to know how to calculate the exact probability. |
Let $f:M\to N$ be a function. For all $Y$ subset of $N$, $f(f^{-1}(Y))$ is a subset of $Y$. When $f$ is surjective, $f(f^{-1}(Y))$ equals $Y$. Is this true or false? I guess because of $f(f^{-1}(Y)) = \mathrm{id}(Y)$ this statement is true. Can give some one a better explanation? | I haven't been able to do this exercise: Let $f: A \rightarrow B$ be any function. $f^{-1}(X)$ is the inverse image of $X$. Demonstrate that if $f$ is surjective then $X = f(f^{-1}(X))$ where $X \subseteq B$. Since $X \subseteq B$, all the elements in $X$ belong to the codomain of $f$. Since $f$ is surjective, it means that all elements in the codomain $B$ have some preimage in $A$. Given that $X \subseteq B$, all elements in $X$ must also have a preimage in $A$. Have $\triangle = f^{-1}(X)$, $\triangle$ is now a set containing the preimages of the elements in $X$. Because of this, $\triangle \subseteq A$. If we evaluate $f(\triangle)$, we...... nope, I don't know what I'm doing now. What do you think? |
I want to retrieve all table names and column names IN A SCHEMA. So if I am in schema scott it should only show all the tables present in scott. And can the query below only retrieve the tables in a schema? Select * from tab; | How do I query an Oracle database to display the names of all tables in it? |
Suppose an entire function $f$ exists with the properties: $$f(z) = f(z+1)$$ $$f(z) = f(z+i)$$ For all $z \in \mathbb{C}$. Show that $f$ is a constant. I think I must inspect the unit square and show that it characterizes the whole function (rigorously i suppose), and show that $f$ is bounded in that unit square and hence $f$ is bounded, and by Liouville's theorem $f$ is then constant. I am not sure how to show f is bounded in the unit square, is it possible for an analytic function to be unbounded/have its absolute value get arbitrarily large at any point? | Let $f: \Bbb C \to \Bbb C$ be an entire (analytic on the whole plane) function such that exists $\omega_1,\omega_2 \in \mathbb{S}^1$, linearly independent over $\Bbb R$ such that: $$f(z+\omega_1)=f(z)=f(z+\omega_2), \quad \forall\,z\in \Bbb C.$$Prove that $f$ is constant. The intuition seems clear to me, we have the three vertices of a triangle given by $0$, $\omega_1$ and $\omega_2$. All points in the plane are one of the vertices of that triangle under a suitable parallel translation. The constant value will be $f(0)$, fine. Throwing values for $z$ there, I have found that $$f(n\omega_1) = f(\omega_1) = f(0)=f(\omega_2) = f(n\omega_2), \quad \forall\, n \in \Bbb Z.$$ I don't know how to improve the above for, say, rationals (at least). Some another ideas would be: Checking that $f' \equiv 0$. I don't have a clue of how to do that. Write $w = a\omega_1+b\omega_2$, with $a,b \in \Bbb R$, do stuff and conclude that $f(w) = f(0)$. This approach doesn't seem good, because I only have a weak result with integers above. Finding that $f$ coincides with $f(0)$ on a set with an accumulation point. This seems also bad: the set on with $f$ coincides with $f(0)$ by which I found above is discrete. Nothing works and this is getting annoying... And I don't see how analyticity comes in there. I'll be very thankful if someone can give me an idea. (On a side note.. I know that this title is not informative at all. Feel free to edit if you come up with something better.) |
I am having problems solving this problem: Using only basic geometry is easy to go here: And propose 4 equations: $$ x+y+70=180$$ $$x+w+40=180 $$ $$u+y+50=180 $$ $$u+w+20=180 $$ And it doesn't make sense to me because, they are linear dependent, we can reduce it to 3 equations that depends (for example) of $u$.Giving us: $$y=130-u$$ $$w=160-u $$ $$x=u-20 $$ But for the construction of the problem, it don't understand how can this problem depends of a variable, and don't know how to solve it. Please help with this. | The following is a geometry puzzle from a math school book. Even though it has been a long time since I finished school, I remember this puzzle quite well, and I don't have a nice solution to it. So here is the puzzle: The triangle $ABC$ is known to be isosceles, that is, $AC=BC$. The labelled angles are known to be $\alpha=\gamma=20°$, $\beta=30°$. The task is to find the angle labelled "?". The only solution that I know of is to use the sine formula and cosine formula several times. From this one can obtain a numerical solution. Moreover this number can be algebraically shown to be correct (all sines and cosines are contained in the real subfield of the 36th cyclotomic field). So in this sense I solved the problem, but the solution is kind of a brute force attack (for example, some of the polynomials that show up in the computation have coefficients > 1000000). Since the puzzle originates from a book that deals only with elemetary geometry (and not even trigonometry if I remember correctly) there has to be a more elegant solution. |
What is the most likely cause of the lack of sharpness in this picture? Taken with a Nikon D3000 and a 55-200 lens at 200mm, 1/320s, f/5.6, ISO 400. | Probably a novice question, but how do I correctly diagnose from a photo for what reason that camera wasn't able to focus properly? It can be any 1 of the following Unsteady hand Lens issue Metering Re-Calibration required in camera or ... Is there a set of unsaid protocols that needs to be followed by a photographer? Goal is to get a sharp and crisp image prior to editing. [PS: I own a Nikon D5200.] |
I've heard horror stories about off-brand inkjet cartridges, and I'm wondering if similar dangers apply to off-brand toner for laser printers. I've found online stores with good ratings on Google Shopping, selling discount toner cartridges for mid-to-high-end HP enterprise printers, for a fifth of the price HP charges for the same cartridges. What's the general consensus on these types of products? Are they known to be less dangerous to laser printers than off-brand inkjet cartridges? | Printer manufacturers usually recommend that you only use their branded, OEM toner cartridges in their products but generic ones are commonly available for far less cost. Print quality will of course vary between different brands/makes/models and personal experiences, so that discussion is one of opinion, however: Does using generic toner cause any damage, or otherwise have any negative effect on the printer's lifespan? I'm struggling to find any unbiased studies. There is a similar but different question on ink/toner refill kits , but I'm referring to generic already-filled cartridges that can be bought online or in some discount stores. |
$$\int \dfrac{x^2+x}{(e^x+x+1)^2}dx$$ My multiple attempts are as follows:- Attempt $1$: Let's differentiate $\dfrac{f(x)}{e^x+x+1}$ $$\dfrac{d}{dx}\left(\dfrac{f(x)}{e^x+x+1}\right)=\left(\dfrac{f'(x)(e^x+x+1)-f(x)(e^x+1)}{(e^x+x+1)^2}\right)$$ If we can choose $f(x)$ such that $f'(x)(e^x+x+1)-f(x)(e^x+1)$ equals to $x^2+x$, then our job will be done. But I was not finding such $f(x)$. Attempt $2$: $$N_r=A(e^x+x+1)^2+2B(e^x+x+1)(e^x+1)$$ $$N_r=A(e^{2x}+x^2+1+2x+2xe^x+2e^x)+2B(e^{2x}+e^x+xe^x+x+e^x+1)$$ $$x^2+x=(A+2B)e^{2x}+(2A+4B)e^x+(2A+2B)xe^x+Ax^2+(2A+2B)x+A+2B$$ $$A+2B=0$$ $$A=1$$ $$2A+2B=0$$ $$2A+2B=1$$ So we don't have any solution for $A$ and $B$ Attempt $3$: $$\int \dfrac{x^2+x+xe^x}{(e^x+x+1)^2}-\dfrac{xe^x}{(e^x+x+1)^2}dx$$ $$\int \left(\dfrac{(e^x+x+1)^2}{(e^x+x+1)^2}-\dfrac{1}{2}\cdot\dfrac{2(e^x+x+1)(e^x+1)}{(e^x+x+1)^2}\right)dx-\int \dfrac{xe^x}{(e^x+x+1)^2}dx$$ $$x-\ln(e^x+x+1)-\int \dfrac{xe^x}{(e^x+x+1)^2}dx$$ $$x-\ln(e^x+x+1)-\int \dfrac{(x+e^x+1-e^x-1)e^x}{(e^x+x+1)^2}dx$$ $$x-\ln(e^x+x+1)-\int \left(\dfrac{1}{e^x+x+1}-\dfrac{e^x+1}{(e^x+x+1)^2}\right)e^xdx$$ So we have the standard integral form $\int e^x\left(f(x)+f'(x)\right)=e^xf(x)+C$ $$x-\ln(e^x+x+1)-\dfrac{e^x}{e^x+x+1}+C$$ But it took me a lot of time to arrive at this. Is there any simple thing which I am missing here? Feel free to suggest your alternatives. | Evaluate $$\int \frac{x^2+x}{(e^x+x+1)^2}dx$$ I tried converting in the form of Quotient rule(seeing the square in the denominator), neither am I able to make the denominators' derivative in the numerator. Some hints would be great. Thanks. |
currently I have faced a problem in changing a string in a file which have / character . I want to replace 1/0 with hetero in a file. can you tell me which command to use ? | I want to replace 0/1 with hetero but whenever I am trying to use the known commands it is showing syntax error because the / is aleady part of the command .. Can anyone suggest a command to solve this issue?? |
I understand sed will Applies all instructions on line 1, then line 2... Previous instructions may change the pattern space so the next instruction will operate on that modified pattern space (instead of the original text) The example is: sample.txt file pig cow Command sed -e 's/pig/cow/; s/cow/horse/;' sample.txt Expected Output horse horse Real Output horse cow The reason for my expected output is: First instruction substituted pig with cow in the pattern space Second instruction substituted 2 pigs with 2 horses in the pattern space | I know people use : instead of / when they are dealing with paths, but what does :g do in the following sed action? Why is path1 between quotation mark? Can anyone explain the action of this code? sed -i -e s:INPUT_REPLACE:"${path1}":g ${path2} |
In our feet, other than the large toe, the other toes cannot be moved separately. If we try to move them, then all the four toes move together. We cannot move each toe by itself. Same thing occurs in the hands of some of us, where we cannot move the little finger by itself. While folding the little finger, the ring finger before that also has to be folded to some extent, and vice-versa. An explanation to the problem with the ring finger and the little finger can be found . The phalanges make the toes. Are the phalanges of the small toes connected, such that we cannot move them separately? | Why is it that we need to move little finger in order to move ring finger with it? For example, put your palm on a table and fold your middle finger inside. You won't be able to move your ring finger unless you move your little finger along with it. Why? and and various other guitarists are the only people that I'm aware of that use the ring finger and looks independent. Is it possible to have surgery to make the fingers independent or is it not functional to do that? |
I took a large pack of ground beef out of the freezer and it has been in the fridge for no more than 10 hours. There are still ice crystals on the meat. I'm on call and turns out I won't have the opportunity to cook it until next week (the works in another city). I guess I have two options put the meat back in the freezer and refreeze thaw out the meat, quickly cook it, and put the left overs in the fridge. Any advice? | I've often been told by people that I shouldn't refreeze meat (particularly hamburger meat) once it has been thawed. However, this seems a little silly to me. I can't imagine how meat that hasn't been bought fresh and local could find its way to my kitchen with out thawing and being refrozen a couple of times. How much damage can one more thawing and refreezing really do? Can it really be that dangerous disease wise? Or is this just one of those urban myths? |
How can I change my os from Xubuntu to Lubuntu. Should I download the iso file of lubuntu so i can install it? Because i find xubuntu laggy when streaming videos on celeron 900mhz | Can I convert Ubuntu into another form of Ubuntu like Kubuntu or Ubuntu Studio and the system recognize itself as the new form? UPDATE: After getting an answer and talking with people, I managed to gain a lot of information on this topic. I then wrote an article about converting between Ubuntu systems - |
This error hinders me alot from taking actions like installing anything that requires the use of terminal.. E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? i have tried to fix the missings with its command.. Each time i try to install git, this is always the result Reading package lists... Done Building dependency tree Reading state information... Done Package git is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package 'git' has no installation candidate Please help me, i use Ubuntu 19.04 | Recently I have installed an older version of Ubuntu on my old machine. Whenever I try to install any software, I get an error saying it couldn't be found: $ sudo apt-get install vlc Reading package lists... Done Building dependency tree Reading state information... Done E: Couldn't find package vlc |
Apologies if this is a basic concept, but I was wondering how to incorporate the userinput immediately after running the code. Same line, no prompt. I tried: #!/bin/bash read userinput but that results in reading the userinput in the next line over. i.e. (assuming UserInput is 2): $./programname 2 For reference, I want to essentially type: $./programname 2 directly into the command line, without a newline. | Say, I have a script that gets called with this line: ./myscript -vfd ./foo/bar/someFile -o /fizz/someOtherFile or this one: ./myscript -v -f -d -o /fizz/someOtherFile ./foo/bar/someFile What's the accepted way of parsing this such that in each case (or some combination of the two) $v, $f, and $d will all be set to true and $outFile will be equal to /fizz/someOtherFile? |
I had never done anything crazy in my life before I started learning how to skydive five months ago. I never did anything crazy in my life before I started learning...... Are both the above sentences grammatically correct? I see natives not using past perfects all the time. I was on and if you would scroll down a bit, you'd see a sentence: "She never saw a bear before she moved to Alaska." It is deemed incorrect. | The rule says if the order of two actions/events is clear then the past perfect is not necessary, i.e. you can use past simple. So if the sentence has before or after then the order is clear and therefore the rule applies. says the first sentence is incorrect. Is he/she right? If so, how do you explain what appears, to me, to be contradictory? If the Past Perfect is not referring to an action at a specific time, Past Perfect is not optional. Compare the examples below. Here Past Perfect is referring to a lack of experience rather than an action at a specific time. For this reason, Simple Past cannot be used. Examples: She never saw a bear before she moved to Alaska. Not Correct She had never seen a bear before she moved to Alaska. Correct They say "a lack of experience rather than an action". Saying that just does not solve the problem I have which is the past simple fits the rule of order of events. Not seeing is a negative event with the verb "to see". I hope the answer won't be this is how we speak or this is how English works or since when languages are logical! |
I need to start a project where many tables will be needed. I was going to use tabu, since it seems a rather complete package for typesetting tables. However, on this site (which I trust) I read that tabu is no longer maintained and should not be used. Is there a definite answer on this? Being in the "planning" phase, should I discard tabu and consider something else? thanks | When I stumbled upon tabu some time ago it looked quite interesting on a first glance and I intended to learn more about it when I have the time. But, in the comments section of posted on the new german question and answer site texwelt.de Herbert Voß wrote that the tabu package is obsolete in its current version (thereby citing the package author) and is not actively maintained anymore. What are the implications for the usability of the package? Should I refrain from investing time to learn tabu and consider some other packages for the creation of tables instead? |
I'm about to do a website relaunch in a couple of months. It's a WordPress site. The relaunch will include these changes: changes in content, both text and images a new WP theme, thus changes in the DOM as well as design changes some minor structural changes The domain luckily stays the same. In terms of SEO I remember reading somewhere, that it is wiser to not change everything at once, but rather do changes gradually. Especially to not make changes with the content and the design/DOM at the same time. But I cannot find that same advise anymore anywhere. So my question is: Is it better for your Google rankings to do all the above changes at once, or do them gradually, hence changing the theme first, than waiting 4 weeks or so and then doing changes to the content? | I'm a web designer and I'd like to make a custom wordpress theme for my upcoming blog. The template is already made in photoshop but I need a good starting point. I don't have too much experience with Wordpress but I want something that is SEO friendly which I can edit without risking getting poor search results. I Know about Starkers and that there are other blank themes out there, but are they good for SEO? |
The old gray seen in has ... issues. shrink factor 8: shrink factor 9: So, even when using shrink factor 8, which given the 4x4 pixel pattern used for pixels in grayf.mf seems like it should put 2x2 proof pixels on one display pixel, something goes wrong and we get rows of missing pixels, and when we use an unrelated shrink factor we get something much worse :-( What gray font / xdvi flags should I use to get my metafont proofs to render correctly? | I'm working through Knuth's Metafont Book as preparation for learning Metapost and I'm running into some problems working through his "experiments". I've installed the latest TeX Live 2013 distribution on my system but I'm having problems. Here's the code (contained in file io.mf as recommended by Knuth): mode_setup; em#:=10pt#; cap#:=7pt#; thin#:=1/3pt#; thick#:=5/6pt#; o#:=1/5pt#; define_pixels(em,cap); define_blacker_pixels(thin,thick); define_corrected_pixels(o); curve_sidebar=round 1/18em; beginchar("O", 0.8em#, cap#, 0); "The letter O"; penpos1(thick,10); penpos2(.1[thin,thick],90-10); penpos3(thick,180+10); penpos4(thin,270-10); x1l=w-x3l=curve_sidebar; x2=x4=.5w; y1=.49h; y2l=-o; y3=.51h; y4l=h+o; penstroke z1e{down}..z2e{right} ..z3e{up}..z4e{left}..cycle; penlabels(1,2,3,4); endchar; Now, when running the mf command and loading this file, I get a window that is unfortunately empty. Supposedly a large letter "O" should appear. $ mf This is METAFONT, Version 2.718281 (TeX Live 2013) **io (io.mf The letter O [79]) *end Output written on io.2602gf (1 character, 1724 bytes). Transcript written on io.log. $ gftodvi io.2602gf gftodvi: fatal: tfm file `gray.tfm' not found. Then, when trying to use the gftodvi command I get the above error. Any ideas why my "window" that should display the letter "O" is blank/empty? How do I resolve the gray.tfm error? Are the two related? Note: I'm using Ubuntu 14.04, but the TeXLive installation is NOT from the Ubuntu repository. I used the installer from and created a local "portable" installation. |
I'm recording with OBS. In OBS, I have two options for audio recording, Desktop Audio and Mic Audio. Each of these are mixed together and saved in the same MP4 with the video which is recorded. When I open the .mp4 in Blender, both the Desktop and Mic audio have are in the same audio strip. How do I separate audio sources and import them for individual editing? I'd like to have game audio, microphone audio, desktop audio (game?), and other programs (Discord, in my case) all as separate audio strips when I pull it into Blender. Any ideas as to how I can accomplish this? EDIT: I should add that I've tried sending video to OBS via Dxtory. I've also tried simply recording with Dxtory only, but I do not seem to be able to record separate audio clips for use in Blender. | I've recently started using OBS multiplatform to record game play. I currently have it set to record sounds on 2 different tracks. The first for system sounds (like gamesound, mumble, etc.) and the second to record the mic. I am able to switch between tracks when I play the unedited video using VLC, but when I load the mp4 into blender, I only get track 1. Did I do something wrong, or does blender vse not support multiple tracks? Blender after loading mp4: VLC video information: UPDATE For now, it seems like the solution will be to use an external tool to get the second audio track and import it into blender afterwards. A has been logged with the Blender bug reporting tool. UPDATE 2 The bug report has been closed/archived with the gist being "not a bug". It has been added to the . If you are looking to have support for multiple audio tracks, I would suggest looking at other video editing software until Blender adds support for this feature. |
I'm a beginner at Blender. I'm trying to model a wrench, which looks like this without applying the subdivision modifier: And like this after using the subdivision modifier: A closer look of the end: There are no doubles and I think I have enough tightening loops here. Really can't figure out what's wrong, any suggestions? | I'm modeling a GoPro camera, and am using circular n-gons to make a set of nested depressions for the lens. The model without subsurf looks like this: (n-gons in question are around the outer edge of the outer circle and in the center of the len) When I try to apply a subsurf modifier to any degree, I get crazy distortion like this: My only thought as to what could be causing this is that the mesh isn't all quads, so I tried using a remesh modifier, but only got high-enough quality results at around octree 9 or 10, far higher of a resolution than I want to deal with when render time comes along. Is there any way short of manual retopo that I can stop the subsurf from freaking out over the n-gons? Any and all help is appreciated. Thanks in advance for your time. EDIT 1: I'm running Blender 2.8 Beta, so if all else fails I'm prepared to accept that this might just be a bug, in which case I'll start over in 2.79. EDIT 2: So I fixed the problem through manual retopology, but I'm still interested in hearing if anybody knows a faster way to do this for future projects. Thanks! |
All of a sudden, Unity is broken on Ubuntu 14.04. After the logging screen, I can see the desktop but there are no unity panel and no top taskbar. I tried to boot in recovery mode but I can't access the menu by holding "shift" or "esc" from boot. How can I repair Unity ? Note : on guest session, Unity is working. | When I login, nothing happens. I am presented with my desktop wallpaper. No Dash, no Launcher, nothing. |
I plotted a 2d figure of a curve but I also want to show variance of the value with a shaded area around the curve line. How can I do it in pgfplots? Here is my current plot. | I have several curves/datasets (obtained from Monte Carlo simulations) with x-dependent y errors I would like to plot with the errors somehow indicated. Since each curve consists of quite a large number of data points with rather small errors, using ordinary errorbars doesn't seem to be the most informative/aestethic solution. Instead, I think it would be nicer to indicate the error by (local) line thickness (or thickness in the y-direction). It could e.g. be done by plotting y(x)+dy(x) and y(x)-dy(x) and fill between the two curves. But how does one do that (in a reasonably easy way - remember: I have several curves!) in Pgfplots? My question is maybe somewhat similar to , but I don't know how to do the table manipulations (within Pgfplots) needed in my case. Here's a simplified example of how my datafiles look: x y dy 0 2 0.1 1 4 0.5 2 3 0.2 3 3 0.3 |
Essentially, I need to show that e^inx is dense in the complex unit circle for irrational angle x. I'm not sure how to go about this but I think I need to show that between any two points on the unit circle, we can find some e^inx. | I think the title of the question says it all. I unfortunately did not seem to conclude anything. Some ideas I had: It is easy to show that (given $T$ is the rotation) $\{T^n(\theta)\}$ is a set of distinct points. Furthermore, given that the circle is a compact metric, it must have a limit point $x$. By continuity of the rotation function, $T^n(x)$ is a limit as well since taking $T$ of every term yields the same sequence (with only the first term removed). By induction, we have infinitely many distinct limit points $\{T^n(x)\}$. That's all I could come up with! It was also easy to show that the orbit is infinite. I still don't seem to be able to get close to the required result however. |
>>> class A: ... def foo(self): ... print(self) ... >>> >>> a = A() >>> a.foo() <__main__.A instance at 0x7f4399136cb0> >>> def foo(self): ... print(self) ... >>> a.foo = foo >>> a.foo() Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: foo() takes exactly 1 argument (0 given) I am trying to understand monkey-patching in Python. Please illustrate the reason for the error and how to fix it. | I've read that it is possible to add a method to an existing object (i.e., not in the class definition) in Python. I understand that it's not always good to do so. But how might one do this? |
Claim : $H$ and $K$ are two normal subgroups of group $G$ such that $H\cap K = \{e\}$ then $ xy = yx $ for $x \in H$ and $y \in K$. Proof : Let $x \in H$ and $y\in K$ then I need to prove that $xy =yx$. Let us assume that $$y^{-1}xy \neq x$$ $y^{-1}xy = z$ where $z \in H$ Question : I am not getting how to proceed further? | This is the proof, which I mostly understand except for one bit: You have $h_1 \in H_1$ and $h_2 \in H_2$. We also have $h_1^{-1}(h_2^{-1}h_1h_2) \in H_1$, because $h_2^{-1}h_1h_2 \in h_2^{-1}H_1h_2 = H_1$. Similarly, we have $(h_1^{-1}h_2^{-1}h_1)h_2 \in H_2$. Therefore $$ h_1^{-1}h_2^{-1}h_1h_2 \in H_1 \cap H_2 = \{1_G\} $$ and so $h_1^{-1}h_2^{-1}h_1h_2 = \{1_G\}$. Let's first multiply everything on the left by $h_1$ $$h_1^{-1}h_2^{-1}h_1h_2 = \{1_G\}$$ $$ h_1 h_1^{-1}h_2^{-1}h_1h_2 = h_1 \{1_G\}$$ $$ h_2^{-1}h_1h_2 = h_1 \{1_G\}$$ Multiply both sides on the left by $h_2$ giving us $$ h_1h_2 = h_2 h_1 $$ The bit I don't get is right at the beginning. Why is this correct: "We also have $h_1^{-1}(h_2^{-1}h_1h_2) \in H_1$, because $h_2^{-1}h_1h_2 \in h_2^{-1}H_1h_2 = H_1$." |
I cooked chicken soup and freeze it.For how long I can eat it | 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. |
For some reason Wordpress is cropping some of my thumbnails proportionately rather than to specific dimensions for some images, and cropping them to specific dimensions for others. I want it to crop all my thumbnails to 728 x 410 pixels, but some of them are taller than 410 pixels. Here is what I have in my functions.php: add_image_size('main-thumbnail', 728, 410, true); Here is what I have in my content.php: <div class="thumbnail"><a href="<?php the_permalink(); ?>"> <?php the_post_thumbnail('main-thumbnail'); ?></a></div> This works for some images but not for others, and I don't know what is causing this. I have also regenerated my thumbnails using the Regenerate Thumbnails plugin but nothing changed. What is the reason for this? | For some reason WordPress is ignoring my thumbnail sizes and keeping thumbnails cropped proportionately instead of specific dimensions. Here is what I have in functions.php: add_image_size( 'main-thumbnail', 728, 410, true ); and in content.php: <div class="thumbnail"> <a href="<?php the_permalink(); ?>"> <?php the_post_thumbnail( 'main-thumbnail' ); ?> </a> </div> I added these two things and regenerated my images with the plugin, but it doesn't seem to matter. The images don't change. For some reason WordPress isn't recognizing the hard crop and is keeping the images proportional, so some of my images are way taller than 410 pixels. Why is this? |
I have to solve this integral using Cauchy's integral formula. I tried to substitute it with several different attempts but without a solution. Can anyone help? $$\int_0^{2\pi} \frac{1}{a^2 \cdot {\cos}^2(t) + b^2 \cdot {\sin}^2(t)} dt$$ | Using Residue Theorem find $\displaystyle \int_0^{2\pi} \frac{1}{a^2\cos^2 t+b^2 \sin^2 t} dt \;; a,b>0$. My Try: So, I am going to use the ellipse $\Gamma = \{a\cos t+i b \sin t: 0\leq t\leq 2\pi\}$. On $\Gamma$, $z=a\cos t+i b \sin t$, so $|z|^2=z\bar{z}=a^2\cos^2 t+b^2 \sin^2 t$. Now, $dz=-a\sin t+i b \cos t dt$. Hence, the integral becomes $\displaystyle \int_\Gamma \frac{dz}{z(iab+(\sin t \cos t)(b^2-a^2))}$. I know that $\displaystyle \int_\Gamma \frac{dz}{z}=2\pi i$. Now, how do I get rid of $\sin t \cos t$ part? I am stuck here. Can somebody please explain how? |
Let's say there's a site that I'd like to see graduate into a full SE site (I'm not going to mention Code Golf here). Now, I'm aware that the answer to "when will we graduate" is "when you're ready." However, what if I have the question "what do we need to do to graduate?" What if I think we're ready to graduate, and I want to know why we're not? What is the process for asking that? Do I ask on its per-site meta? If I do this, I'm not sure it will get the attention by the Official SE Graduation Committee of Officialness™. Ask on meta.SO (meta.SE soon)? This doesn't seem right either though, since it's site-specific. Something else? | I came across today in a separate question: The only thing holding [Code Review] back from graduating is the lack of high rep users - there just aren't enough 1k+, 3k+ users on the site, and it can't quite yet sustain an election. Every single thing about CR is ready but that - it's really just a matter of time at this point (and, well, voting). Almost all the posts about what the criteria for graduation are vague and don't mention specific examples: The first question specifically asks about 2 beta (now graduated) sites, but the answer is more general, "Look at this blog" with general guidance. How often are site stats reviewed by the team in charge of betas? And is it appropriate to create meta questions asking where a site stands to get feedback to the community on how to improve? |
This question has been already asked regarding Season 3, but if I recall correclty, Riot stated something in the lines of "You can drop tiers in Season 4". So I want to know if this is the case, now that Season 4 has started..? edit: Since some people obviously don't know that there is a difference between Season 3 (before December 2013) and Season 4 (from Mid January 2014), I want to state this clearly again: I am asking about dropping tiers in Season 4. This is not a duplicate to , since it was asked by the time of Season 3, which means through patches the system can be (and has) changed. So either the other question question (as well as the answers) has to be updated, or this question is just plain and simple not a duplicate. | ... and if so, what criteria must you meet? I keep hearing conflicted info, like "Only through inactivity." "Only from challenger." "You can never drop Tiers." "Yes." Does anyone know definitively? |
My node is having list of nodes(as children). ref.get(L.get(t)).children.add(N); L.get(t) is giving my parent node. ref.get(L.get(t)) is another node which I want to work with. I wanted to add my new node N to children of ref.get(L.get(t)). While debugging I can see a node in ref.get(L.get(t)) but throwing NullPointerException. public void CreateNode(Node m,ArrayList<Node> S,HashMap<Node,Node> ref,ArrayList<String> L) { Node N = new Node(m.val,m.data); ref.put(m,N); if(S.isEmpty()) { S.add(N); } else { Node c =ref.get(L.get(t)); //Showing C as null ref.get(L.get(t)).children.add(N); //unable to access node in ref.get(L.get(t)) System.out.println(ref.get(L.get(t)).val); S.add(N); t++; } } | 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? |
Sorry for the long title. I am kind of paranoid, so I sanitized $_POST that was treated with JSON.stringify(order) via javascript with $order = mysqli_real_escape_string($db_upload, htmlspecialchars( strip_tags($_POST['order']))); before inserting into mysql through mysqli prepared statement. But when I try to json_decode by foreach(json_decode($row['order'], true) as $id =>$value){ $sumArray[]= array("item" => $id, "value" => $value); } I get "Invalid argument supplied for foreach() ..." I know json_decode works when inserted value is {"Hot water":"1"} but not when inserted value is {&quot;Hot water&quot;:&quot;1&quot;} In this case, how can I json_decode? Thanks. edit: I was poor at explaining what I really wanted. As I have mentioned earlier, I already used mysqli prepared statement for inserting the data. I am less worried about sql injection but to advanced xss attacks. What i really wanted was just how to json_decode {&quot;Hot water&quot;:&quot;1&quot;} I decided to go easier method: dropping htmlspecialchars. What I did was $order = mysqli_real_escape_string($db_upload, strip_tags($_POST['order'])); then, foreach(json_decode(stripslashes($row['order']), true) as $id =>$value){ $sumArray[]= array("item" => $id, "value" => $value); } This worked nicely | If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example: $unsafe_variable = $_POST['user_input']; mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')"); That's because the user can input something like value'); DROP TABLE table;--, and the query becomes: INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--') What can be done to prevent this from happening? |
As we know, the measures of central angles of the arcs of a circle is proportional to the lengths of the arcs How to prove that those ratios are the same? | How can I prove that: The length of the arc is proportional to the size of the angle. Every book use this fact in explaining radians and the fundamental arc length equation $s = r\theta$. However no book proofs this fact. Is this fact some axiom, some natural law like $\pi$ and the triangle side proportions? Can I proof the above? Or is it something that you should just accept? |
I have the Subversion 1.6.5 client and 1.5.4 server. And I mostly only care about diffs on fully repository paths, not working copies. When diffing branches, ones that have been merged already show up as identical except for the properties. This is a touch annoying for a human who has to then look through the changes looking for anything that might be a real change. However it's somewhat worse in our usecase as we have scripts that run around checking on the merge state of various things and the mergeinfo properties cause them to highlight a lot of things as being out of sync when they aren't. Is there a way to get the diff summary to ignore the mergeinfo properties? | I use SVN as the source control system, and I wonder how to compare directories while ignoring any metadata differences. Is there a way to tell svn diff to compare only the actual content and ignore any metadata? I mean metadata like SVN properties, etc. that don't affect the file content. Assume file X has an additional property in branch B compared to trunk T. Unfortunately it will show up in 'svn diff T B' even though the actual content of file X is the same. I look for something like this: svn diff https://example.org/tags/v1 https://example.org/tags/v2 -x -ignore-metadata --summarize Update: I partially solved this by diff'ing directly on the filesystem instead of using the SVN tools. See my own answer below... |
I am new to Java and trying to learn by practicing. I am not sure where I am going wrong in my if statement, it seems that after I type r (I believe scanner is storing this in value) the first part of the if statement does not initialize and instead the else statement initializes. import java.util.Scanner; import java.util.concurrent.ThreadLocalRandom; public class T2 { public static void main(String args[]){ Scanner input = new Scanner(System.in); T2_2 T2_2Object = new T2_2(); System.out.println("What is your favorite color? (Enter 0 if unsure) "); String value = input.nextLine(); if (value == "r"){ int value2; value2 = ThreadLocalRandom.current().nextInt(1,10); String value3 = Integer.toString(value2); System.out.println(value3); | I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug. Is == bad? When should it and should it not be used? What's the difference? |
I have a problem with an old theme that can't be updated. My hosts (1&1) are now charging to continue using PHP 5.6 but I get the following errors when switching to PHP 7.2 and I don't know what to do. If anyone can help, it would be much appreciated. Thanks in advance. Warning: Declaration of mysiteDescriptionWalker::start_el(&$output, $item, $depth, $args) should be compatible with Walker_Nav_Menu::start_el(&$output, $item, $depth = 0, $args = Array, $id = 0) in /homepages/36/d129703868/htdocs/mightyoak/bhd-wp/wp-content/themes/construct/lib/classes/menu-walker.php on line 45 Warning: Declaration of mysiteResponsiveMenuWalker::start_lvl(&$output, $depth) should be compatible with Walker_Nav_Menu::start_lvl(&$output, $depth = 0, $args = Array) in /homepages/36/d129703868/htdocs/mightyoak/bhd-wp/wp-content/themes/construct/lib/classes/menu-walker.php on line 87 Warning: Declaration of mysiteResponsiveMenuWalker::end_lvl(&$output, $depth) should be compatible with Walker_Nav_Menu::end_lvl(&$output, $depth = 0, $args = Array) in /homepages/36/d129703868/htdocs/mightyoak/bhd-wp/wp-content/themes/construct/lib/classes/menu-walker.php on line 87 Warning: Declaration of mysiteResponsiveMenuWalker::start_el(&$output, $item, $depth, $args) should be compatible with Walker_Nav_Menu::start_el(&$output, $item, $depth = 0, $args = Array, $id = 0) in /homepages/36/d129703868/htdocs/mightyoak/bhd-wp/wp-content/themes/construct/lib/classes/menu-walker.php on line 87 Warning: Declaration of mysiteResponsiveMenuWalker::end_el(&$output, $item, $depth) should be compatible with Walker_Nav_Menu::end_el(&$output, $item, $depth = 0, $args = Array) in /homepages/36/d129703868/htdocs/mightyoak/bhd-wp/wp-content/themes/construct/lib/classes/menu-walker.php on line 87 | I'm currently working on a WordPress site and whenever in the admin I go the Appearance > Menus page I get the following error: ErrorException: Runtime Notice: Declaration of Walker_Nav_Menu_Edit::start_lvl() should be compatible with that of Walker_Nav_Menu::start_lvl() in wp-admin/includes/nav-menu.php line 203 It seems like some sort of PHP compatibility issue. I'm running PHP 5.3.10 on my local dev machine. What would be the best way to remedy this problem? |
Say you don't have a dark elixir storage, then you raid somebody who does and gain 500 dark elixir. What happens to that dark elixir? Is it unobtainable? Just gone? Thanks | are you able to attack an enemy's dark elixir storage without your own dark elixir storage to hold the stolen resource? Furthermore if you are able to attack it what consequences occur. |
I am an Indian national, and I have secured a Schengen visa for my travel to Germany which starts on 17th September 2018 and ends on 5th November 2018. The visa is a type-C multiple-entry visa, which is valid from 17th September 2018 to 20th November 2018, for a period of 50 days. I want to visit a tech conference which takes place in Lisbon, Portugal, between 5 and 7 November 2018 and also watch a Champions League match on 8 November 2018. My problem is I exhaust my 50 days if I stay in Germany from 17th September 2018 to 5th November 2018. I will have to leave the Schengen area on 5th November. My question is: Can I apply for a Portugal visa for 5th November to 8th November, even if I already have a Schengen visa valid till 20th November (which expires on 5th November as I deplete my 50 days)? Also, it is possible to apply for this visa when I am already in Germany? | I am traveling to Germany on May 1st for an exhibition for which I have already obtained a visa and its validity is up to May 13th. I am returning on May 12th and then traveling on May 17th to UK, and from UK to Switzerland for vacation with family. As time is very short for applying for a Schengen visa again after returning on the 12th with May 13-14 being a Saturday and Sunday, can I apply for Schengen visa again and can I get 2 valid Schengen visa? |
Sorry, I'm new on this subject. I faced a question which let me confused with the concept of a Sylow p-subgroup. The p-subgroups of a group are all contained in the Sylow p-subgroup? In another words, the Sylow p-subgroups are unique? Thanks | While we know that a unique Sylow p-subgroup is normal, is the converse true? If there are multiple p-subgroups for the same p are they inherently not normal as a result? |
Is there a way to prevent a file or folder being set invisible ? I am working on an infected machine (which I cannot disinfect) that constantly makes the files and folders in my usb stick invisible. I use the: attrib -h -r -s /s /d f:\*.* command to make them visible again but the problem continues since this command just saves the day. | I have 1 GB hard drive with files hidden on it due to a virus. All of its contents were gone after a virus got in when I gave the drive to someone else. After research found that it was a virus may be. I ran Nortan Anti-Virus and removed a certain virus. Then ran Malwarebytes, now Ad-Aware and AVG 2011 Anti-Virus. After that, I could see the files on my other computer. But now I have hooked this to my new MacBook Pro—which is running Windows—I can’t see the files. The Anti-Virus finds all the files and Mac OS X wrote a 400 MB directory there which I can see but nothing else. How to fix this? Which program will fix it? |
Apparently the isc-dhcp-server is started too early in the boot sequence, it states that it has nothing to do. If I just log directly in as root and start it using the init.d-script, it starts normally. My setup is basically an utterly standard router, with an eth0 on the inet side, and an eth1 on the lan side. However, I've defined a bridge instead of the eth1 for the lan-side. Thus, the lan-part of the network isn't up until the bridge is up. I currently believe that the dhcp server is brought up before the bridge is brought up, probably because the bridge is brought up with the 'networking' task, while the eth's are taken up with the 'network-interface' tasks - which are run earlier. (also, the bridge takes a small age to get up compared to the eth's). If I do take away the bridge config, instead using eth1 directly for the lan side, things work. (However, judging by syslog, things are still tight.) Ideas of how the get DHCP to start later? (The reason for the bridge, is to be able to use KVM with bridged networking..) | I have Ubuntu 10.04 server currently setup with dhcp3-server as well as a bridged interface (br0) for use with virtual machines. The problem I have is that when the server reboots, dhcp3-server fails to load because of the extra delay caused by bringing up the bridged interface. Essentially br0 doesn't have an IP address for use with DHCP3-Server until late in the boot cycle, well after DHCP3-server has attempted to load. Once the server has booted I can run '/etc/init.d/dhcp3-server start' without any issue. Is there any way I can either: - Force dhcp3-server to wait until the interface has loaded before attempting to load? - Start dhcp3-server after everything else has loaded up? |
There must be a model for what I would like to do, because I have been spending far too long with this project for an answer not to exist. For reference, I am using R. I have a time series object, $X$, with $n$ observations and $p$ columns (indicator variables). I also have a separate time series object $y$ which I would like to predict future values of, which has $n$ observations and $1$ column. I would like to feed this data into a black box, and I would like the black box to spit out $h$ predicted future values of object $y$ using learned patterns from my independent time series object X. Of course one could find a simple linear solution using regression, but this does not account for obvious autocorrelation. It also requires me to forecast dummy observations for $X$, which is undesirable. I would only like to forecast one series, not all of them. I could also use an ARIMA model, which takes care of autocorrelation but has very poor predictive ability. I looked into using bsts-type models, but these also require additional newdata when the object has a regression component. I have been looking into keras-based models as well, but thus far have not found a solid tutorial to teach me what I am looking to learn. To reiterate: Time series $X_{n \times p}$ Time series $y_{n \times 1}$ Insert $X$ and $y$ into black box Supply value $h$, the desired time steps in the future I would like to predict See $h$ predicted values of $y$ based on features the machine learned during processing. Tutorials and/or walkthrough links would be greatly appreciated, especially if they are coded in R! This question was tagged as a duplicate of , which I had seen earlier. However, the answer was not satisfying to me. I feel this question is better worded, more nuanced, and asks specifically for some type of starter-code or tutorial, or information on how to begin implementation. , but in some regards it falls short (it does not explain how to accomplish far-in-the-future prediction). The theory of machine learning is interesting for all of us, but as noted in , Considering the complexity of financial time series, combining deep learning with financial market prediction is regarded as one of the most charming topics. However, this field still remains relatively unexplored. In posing this question, I am hoping to assist other beginners with the same problem they face when attempting to incorporate time series forecasting with deep learning. | I'm working on a project to predict the usage of all the files(rough frequency of usage) in a filesystem (a company server on which 100s of company employees are active) in near future (say the next 1 or 1.5 months) based on the metadata of the file system for past 6 months. I've got the following attributes about the files with me : The temporal sequence of file usage for last 6 months(whenever the file was read/written/modified and by whom). All the users who are on the server and can access the files. Last modified/written/read epoch time and by whom. File creation epoch time and by whom. Any compliance regulations on the file(whether the file contains any confidential data). Size, name, extension, version, type of the file. The number of users who can access the file. File path. The total number of times accessed. Permitted users. Now, I plan to use LSTM but for standard LSTMs, the input is temporal sequence only. However, all the attributes that I have seem significant in predicting the future usage of the file. How should I also make use of the attributes of the file that I have? Should I train a Feedforward Neural Network, disregarding the fact that it usually fails on temporal sequences? How should I proceed? Does a variant of LSTM exist that can take into account the attributes of the file as well and predict the usage of the file in near future? Do I need to use MLP and LSTM together like a hybrid? |
I need help to understand why my python variable is not changing? Here is the code: from tkinter import filedialog from tkinter import * selectedRootFolder = "" #<-------------------------------------here is the variable declared # get any folder to be a root folder def add_dir(): root = Tk() root.withdraw() dirname = filedialog.askdirectory(parent=root,initialdir="/",title='Please select a directory') selectedRootFolder = dirname print("Here: " + selectedRootFolder)#<-----------------------here is the variable changed # print the root folder def print_root_dir_path(): print (selectedRootFolder) #<-----------------------------here is the variable empty -> ="" # in case a wrong number is taken def invalid(): print("---------------------") print ("INVALID CHOICE!") print("---------------------") # exit program def exit_prog(): print ("Thank you, come back soon!") exit() # define the menu options menu = {"1":("Choose Directory:", add_dir), "2":("Print Root Directory Path",print_root_dir_path), "9":("Exit",exit_prog) } while True: # list the menu for key in sorted(menu.keys()): print (key + ":" + menu[key][0]) # pick a number print("---------------------") ans = input("Make A Choice: ") print("---------------------") #get the number, if none, call invalid function menu.get(ans,[None,invalid])[1]() This is just a part of the script, but it should be able to show my problem, which is that when I pick option 1, to choose a directory, it is successful, and it prints the selectedRootFolder, but when I choose option 2 after that, the printed value is just as declared in the beginning, empty. I do not understand why is that, can u help me? Thank you. Edit 1: Changed: selectedRootFolder = print(dirname) To: selectedRootFolder = dirname print("Here: " + selectedRootFolder) | How can I create or use a global variable in a function? If I create a global variable in one function, how can I use that global variable in another function? Do I need to store the global variable in a local variable of the function which needs its access? |
We have around 8 projects and 8 testers in our organisation. The testers are usually aligned to the Development manager and report to him. There is no proper process by which the testing can be stream lined. What happens is the developer managers forces the tester to test according to the developers schedule and the manager comes to defend them. How can a process be set up in a small organisation which ensures good utilization of testers and also helps testers to learn new technology. | So I'm going to be starting a Job here in a few weeks, I've been doing QA for about 6 years now. Pretty much your standard Test Plans/Testing with a little normal SysAdmin stuff that sometimes comes with the task. I've had some good ideas implemented in companies, as far as tracking requirements/test plans/issues differently, and they seem successful. However, this new position will be me laying down the foundation for QA. Right now things are done in what seems to be as needed as far as QA goes, requirements are gathered and sometimes kept in different locations, same with test plans (which are done by developers right now). So my job will be sort of centralizing this, or developing a Flexible way of QA'ing the Software (Web/Mobile development). So it seems the challenge will be centralizing everything, while creating test plans/ or ways of testing similar requirements that is flexible enough to span projects. I've had a few ideas, however, all my previous test work was windows based (So test plans in TFS or Microsoft Test Manager). I wanted to get some ideas from everyone here, or anyone that has started a QA department from scratch. I was also going to see if there were any books on the subject. My thoughts were mainly keeping projects separated for issue tracking (not sure of the software we will use yet). And keeping test plans for common I guess "actions/elements" that are repeated between different customers and executing those. Eventually maybe using selenium to save those "common" elements as test scripts. But I've never set something up like this before solo, so I've been doing quite a bit of reading. Any books/suggestions would be appreciated! |
I recently attended a seminar where a professor of quantum cryptography told the audience that one quantum qubit can theoretically store "infinite information". I was very intrigued by this statement, and me being an absolute novice in this domain, do not have the means of verifying the validity of his statement. My questions are as follows: Can we really compute the distance $|x - y| < \epsilon$ using a quantum qubit? If so, can anyone throw light on how this is done? Also, if not, how far along are we in actually computing this quantity? Can we measure if quantum computers approximate this quantity better (or worse?) than classical computers? Thanks a lot in advance! | I've just gotten started with Nielsen and Chuang's text, and I'm a little stuck. They mention that theoretically, it would be possible to store an infinite amount of information in the state of a single qubit. I'm not sure I completely comprehend this. Here's how I rationalized it: You take all the information you want to store, put it in binary form, and make it the real component of $\alpha $ or $\beta$ (the coefficients of the computational basis states). Now I'm not sure if I've understood it right, but since it's still fuzzy in my head it would be great to get some kind of ELI5 explanation or possibly a more detailed picture of how this would, even theoretically, be possible. Apologies if the question doesn't meet standards. I'm new to the forum and would be open to feedback regarding asking questions or answering them. |
If I flip a fair coin 10 times, and all of them land on heads, according to the Law of Large Numbers I am more likely to get tails on the next flip. However, this is clearly the Gambler's Fallacy. How am I misinterpreting the Law of Large Numbers? | I assume the following is true: assuming a fair coin, getting 10 heads in a row whilst tossing a coin does not increase the chance of the next coin toss being a tail, no matter what amount of probability and/or statistical jargon is tossed around (excuse the puns). Assuming that is the case, my question is this: how the hell do I convince someone that is the case? They are smart and educated but seem determined not to consider that I might be in the right on this (argument). |
As I know == basically compares memory location, So I totally understand that line 1 is returning true. But we have not overridden the equal method in class , then why line 2 is returning true? private String category = "procedura1"; public static void main(String[] args) { Lang obj1 = new Lang(); Lang obj2 = new Lang(); if (obj1.category == obj2.category) { /// Line 1 System.out.println("Equal"); } else { System.out.println("Not equal"); } if (obj1.category.equals(obj2.category)) { /// Line 2 System.out.println("Equal"); } else { System.out.println("Not equal"); } } And Why line 3 of following returning false? String a1 = new String("String 1"); String a2 = new String("String 1"); if (a1 == a2) { // Line 3 System.out.println("True"); } else { System.out.println("False"); } if (a1.equals(a2)) { System.out.println("True"); } else { System.out.println("False"); } | I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug. Is == bad? When should it and should it not be used? What's the difference? |
Rita Skeeter's Witch Weekly article states that Love Potions are banned at Hogwarts. Love Potions are of course banned at Hogwarts, and no doubt Albus Dumbledore will want to investigate these claims. In the meantime, Harry Potter's well-wishers must hope that, next time, he bestows his heart upon a worthier candidate. (Goblet of Fire, Chapter 27, Padfoot Returns) Obviously Skeeter has been known to print the odd untruth in her time. I wonder if this one of them. There certainly seem to be plenty of Love Potion-brewers and -users at Hogwarts: Gilderoy Lockhart encourages students to ask Snape to brew a Love Potion for them. Molly Weasley brewed a Love Potion as a student. Romilda Vane repeatedly tries to dope Harry during Half-Blood Prince. Slughorn brews Amortentia, "the most powerful love potion in the world", in front of his sixth-year Potions class. The Weasley twins brew the "best range of love potions you'll find anywhere." These are banned by Filch along with the rest of the Weasleys' Wizard Wheezes products. Whether the Love Potions in that range were contraband on multiple counts is up for debate I think. Pottermore only features summary of the examples listed above. There's no JKR feature. Are they actually banned? If so, why are they so commonly used with no disciplinary consequences? If not, why did Skeeter claim that they were as if it were obvious? ( Note that I'm not asking about whether Love Potions were banned by the Ministry of Magic but whether they were banned at Hogwarts.) | We know that in the Harry Potter universe, Love Potions (potions that cause a strong infatuation in the drinker) exist. We see at least two instances of their use in the books; When Romilda Vane attempts to trick Harry Potter into drinking some, and when Tom Riddle Jr's mother Merope Gaunt tricks Tom Riddle Sr into drinking one. A Love Potion in the world of Harry Potter acts very similar to that of the Imperius Curse in some ways, which like Love Potions causes the victim to lose any sense of self control that they once had. As we all know, the Imperius Curse is an Unforgivable Curse, and is one of the worst and most illegal spells a magic user can cast. Being as a Love Potion is effectively just a more effective and magical version of Rohypnol, are they legal to make/sell/use in the Harry Potter universe? Bonus question: Is Romilda Vane ever punished for attempting to rape or sexually assault a fellow student? |
I've heard that GPU is inside the package of the CPU. That is, CPU has it near itself. Is it true? If yes, what is the GPU with the graphics video card? Might we have two GPUs one with CPU and the other in the video card? My next question: It's said the the GPU has much bigger speed in calculating/processing the instructions with less power consuming. Once again, if it's so, why don't manufactures produce only GPUs instead of CPUs? | It seems to me that these days lots of calculations are done on the GPU. Obviously graphics are done there, but using CUDA and the like, AI, hashing algorithms (think bitcoins) and others are also done on the GPU. Why can't we just get rid of the CPU and use the GPU on its own? What makes the GPU so much faster than the CPU? |
i have a filed in my database...the datatype is LONGTEXT my insert query is : if(isset($_POST['submit'])){ $sql='INSERT INTO `tb_mansi` (`referrence`) VALUES ("'.$_POST["legis"].'")'; if (!mysql_query($sql, $con)) { die('Error: ' . mysql_error()); } echo "1 record added"; } now when i am inserting data it is showing errors like with data like childs's or "rena"...means its giving error with data that contains double quotes...or "'" i tried to insert this data " Indira Nehru Gandhi v. Raj Narain, AIR 1975 SC 2299; Seshan, CEC of India v. Union of India and ors., (1995) 4 SCC 611; Kuldip Nayar v. Union of India & Ors., AIR 2006 SC 3127; People's Union for Civil Liberties and another v. Union of India and another, (2013) 10 SCC 1; Mohinder Singh Gill and another v. Chief Election Commissioner, New Delhi and others, (1978) 1 SCC 405; Raghbir Singh Gill v. S. Gurcharan Singh Tohra, AIR 1980 SC 1362; Union of India v. Association for Democratic Reforms and another, (2002) 5 SCC 294; Dinesh Trivedi, M.P. and others v. Union of India and others, (1997) 4 SCC 306; Anukul Chandra Pradhan, Advocate Supreme Court v. Union of India and others, (1997) 6 SCC 1; K. Prabhakaran v. P. Jayarajan, AIR 2005 SC 688; Niranjan Hemchandra Sashittal and another v. State of Maharashtra, (2013) 4 SCC 642; Dr. Subramanian Swamy v. Director, Central Bureau of Investigation & Anr., Writ Petition (Civil) No. 38 of 1997 etc. pronounced on May 06, 2014; Lily Thomas v. Union of India and others, (2013) 7 SCC 653; His Holiness Kesavananda Bharati Sripadagalvaru v. State of Kerala and another, (1973) 4 SCC 225; Centre for PIL and another v. Union of India and another, (2011) 4 SCC 1; N.Kannadasan v. Ajoy Khose and others, (2009) 7 SCC 1; Inderpreet Singh Kahlon v. State of Punjab, (2006) 11 SCC 356; Arun Kumar Agarwal v. Union of India, (2014) 2 SCC 609; State of Punjab v. Salil Sabhlok and others, (2013) 5 SCC 1 and Centre for Public Interest Litigation and another v. Union of India and another, (2005) 8 SCC 20 2; but the error i am getting is : Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '0CGEQ_xc" style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; color: r' at line 1 can anyone help me with this .... | If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example: $unsafe_variable = $_POST['user_input']; mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')"); That's because the user can input something like value'); DROP TABLE table;--, and the query becomes: INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--') What can be done to prevent this from happening? |
I need to clear the field {pages} for book entries only, so I can't simply use \AtEveryBibitem{\clearfield{pages}} since that would remove pages-information from articles as well. I have tried \AtDataInput[book]{\clearfield{pages}} but that doesn't seem to work. Any ideas? I know that I could simply delete the field in my .bib file, but the database from which I pull entries often contains {pages} for books, so I would prefer a general solution to the problem. Thank you | How can I suppress the year from appearing in the bibliography for entries of type @inproceedings? In my specific case the year is implied in the booktitle (e.g. FOCS '09) so it is redundant when I need to save space. I found and the "second solution" looks promising but I am not sure how to translate it to only suppress the year for one type of entry. I am guessing \ifentrytype might be helpful. I am using biblatex+biber. |
$(G,\cdot)$ a group. If $\exists n\in \mathbb{Z} $ such that $(a\cdot b)^{n+i}=a^{n+i}\cdot b^{n+i}$ for $i=0,1,2.$ $\forall a,b \in G$. Prove that $(G,\cdot)$ is Abelian. I'm not sure how to prove this. Why $i$ must be 0 ,1 or 2? | I've been working on this problem listed in Herstein's Topics in Algebra (Chapter 2.3, problem 4): If $G$ is a group such that $(ab)^i = a^ib^i$ for three consecutive integers $i$ for all $a, b\in G$, show that $G$ is abelian. I managed to prove it, but I'm not very happy with my result (I think there's a neater way to prove this). Anyway, I'm just looking to see if there's a different approach to this. My approach: Let $j=i+1, k=i+2$ for some $i\in \mathbb{Z}$. Then we have that $(ab)^i = a^ib^i$, $(ab)^j = a^jb^j$ and $(ab)^k = a^kb^k$. If $(ab)^k = a^kb^k$, then $a^jb^jab =a^jab^jb$. We cancel on the left and right and we have $b^ja = ab^j$, that is $b^iba = ab^j$. Multiply both sides by $a^i$ on the left and we get $a^ib^iba = a^jb^j$, so $(ab)^iba = (ab)^j$. But that is $(ab)^iba = (ab)^iab$. Cancelling on the left yields $ab=ba$, which holds for all $a,b \in G$, and therefore, $G$ is abelian. Thanks! |
If I don't partition my drive before installing and I choose to install alongside Windows 10, how much space will Ubuntu automatically take? If I do create a partition, how do I also create a swap partition for it? Will it automatically create a swap partition? | For a given hardware configuration, how do I find out if Ubuntu will run on it? What considerations should I take into account when choosing an Ubuntu version and such as: with a lighter desktop than the usual Gnome and Unity with the even lighter LXDE desktop Obviously Ubuntu does not run on some processor architectures. So how do I go about choosing the right version and derivate. How can I find out the minmal system requirements? |
Please help with the following problem: Given a $m \times n$ matrix $A$, $m$-vectors $b$ and $y$, and $n$-vectors $c$ and $x$. Write the dual $LP$ problems $P$ and $P^d$ in the standard form. Whether $x$ (respectively, $y$) is a feasible vector for $P$ (respectively, for $P^d$)? Whether $x$ (respectively, $y$) is an optimal solution for $P$ (respectively, for $P^d$)? Whether the complementary slackness conditions hold for $P$ (respectively, for $P^d$)? Consider the cases a-g listed below and explain your answers in each case. a.) $ A = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}$, $b^T = (8,18)$, $c^T = (2,1)$, $x^T = (6,0)$, $y^T = (0,2/3)$ | Given a $m$ x $n$ matrix $A$, $m$-vectors $b$ and $y$, and $n$-vectors $c$ and $x$. Write the dual $LP$ problems $P$ and $P^d$ in the standard form. Whether $x$ (respectively, $y$) is a feasible vector for $P$ (respectively, for $P^d$)? Whether x (respectively, y) is an optimal solution for $P$ (respectively, for $P^d$)? Whether the complementary slackness conditions hold for $P$ (respectively, for $P^d$)? Consider the cases a-g listed below and explain your answers in each case. a.) $ A = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}$, $b^T = (8,18)$, $c^T = (2,1)$, $x^T = (6,0)$, $y^T = (0,2/3)$ b.) $ A = \begin{bmatrix} 1 & 1 & 2 \\ 2 & 3 & 4 \\ 7 & 6 & 2 \end{bmatrix}$, $b^T = (2,3,8)$, $c^T = (8,9,4)$, $x^T = (6/9,5/9,0)$, $y^T = (0,5/3,2/3)$ c.) $ A = \begin{bmatrix} 1 & 1 & 2 \\ 2 & 3 & 4 \\ 6 & 6 & 2 \end{bmatrix}$, $b^T = (2,3,8)$, $c^T = (8,9,5)$, $x^T = (1,1/3,0)$, $y^T = (1,1,1)$ d.) $ A = \begin{bmatrix} 3 & 2 \\ 1 & -2 \end{bmatrix}$, $b^T = (6,1)$, $c^T = (2,1)$, $x^T = (1,2)$, $y^T = (1,1)$ e.) $ A = \begin{bmatrix} 1 & 1 & 1 & 1 \\ 2 & 1 & -1 & -1 \\ 0 & -1 & 0 & 1 \end{bmatrix}$, $b^T = (40,-5,10)$, $c^T = (1,-3,1,4)$, $x^T = (35/3,0,55/3,10)$, $y^T = (2,2,0)$ f.) $ A = \begin{bmatrix} 2 & -6 & 2 & 7 & 3 & 8 \\ -3 & -1 & 4 & -3 & 1 & 2 \\ 8 & -3 & 5& -2 & 0 & 2 \\ 4 & 0 & 8 & 7 & -1 & 3 & \\ 5 & 2 & -3 & 6 & -2 & -1\end{bmatrix}$, $b^T = (1,-2,4,1,5)$, $c^T = (18,-7,12,5,0,8)$, $x^T = (2,4,0,0,7,0)$, $y^T = (1/3,0,5/3,1,0)$ |
I'm dealing with strings of the following form '000351'. Think of them as odometer readings. I want to increment them. For example I want to add 1 to '000345' and get '000346'. The following python code does the job, but appears rather cumbersome. Is there a more elegant way to do this? s='000345' t=int(s) t=t+1 int_to_6digit_string(t) where the function int_to_6digit_string() is as follows def int_to_6digit_string(i): if i<0 or i>999999: return 'argument out of bounds' j=str(i) if len(j) == 1: return '00000'+j elif len(j) == 2: return '0000'+j elif len(j) == 3: return '000'+j elif len(j) == 4: return '00'+j elif len(j) == 5: return '0'+j else: return j | What is a Pythonic way to pad a numeric string with zeroes to the left, i.e. so the numeric string has a specific length? |
I'm using R to run some generalized linear models (GLM) and I want to interpret the estimates. If I use a GLM assuming Gaussian distribution with identity link, interpretation is easy: if the estimate for factor $x$ is $y$ then an increase of 1 of factor $x$ (if all other factors remain constant) will be estimated to result in a change in the response variable by $y$ units. Now, if I run a GLM assuming Poisson distribution with log link, in the example above, will the response variable be expected to change by $y$ units, or by $\exp(y)$ units? note: I'm getting the estimates from summary(model object) | How can I interpret the main effects (coefficients for dummy-coded factor) in a Poisson regression? Assume the following example: treatment <- factor(rep(c(1, 2), c(43, 41)), levels = c(1, 2), labels = c("placebo", "treated")) improved <- factor(rep(c(1, 2, 3, 1, 2, 3), c(29, 7, 7, 13, 7, 21)), levels = c(1, 2, 3), labels = c("none", "some", "marked")) numberofdrugs <- rpois(84, 10) + 1 healthvalue <- rpois(84, 5) y <- data.frame(healthvalue, numberofdrugs, treatment, improved) test <- glm(healthvalue~numberofdrugs+treatment+improved, y, family=poisson) summary(test) The output is: Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) 1.88955 0.19243 9.819 <2e-16 *** numberofdrugs -0.02303 0.01624 -1.418 0.156 treatmenttreated -0.01271 0.10861 -0.117 0.907 MAIN EFFECT improvedsome -0.13541 0.14674 -0.923 0.356 MAIN EFFECT improvedmarke -0.10839 0.12212 -0.888 0.375 MAIN EFFECT --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 I know that the incident rate for numberofdrugs is exp(-0.023)=0.977. But how do I interpret the main effects for the dummy variables? |
I've tried searching for this but can't understand the answers that I've seen. I'm relatively new to Python (2.7) and am the only person at my org who uses it. They're sunsetting one of our virtual environments, and the one which will remain doesn't have any of the necessary third party packages to basically do anything. I need to copy all of the package folders (from 'Python27\Lib\site-packages') to a shared network drive so they're not lost. I've copied the entire Python27 folder over to a shared drive (T:) and want to run them using the copy of Python27 on the new virtual environment (C:) I want to modify my scripts to import these packages from the networked drive. The answers I'm seeing for this are similar to: from application.app.folder.file import func_name However, this isn't helpful to me, I guess I'm just too stupid to understand it. Lets say I want to import the babel package from the copy I made on T:. The above has me thinking I need to enter something like from 'T:\foo\Python27\Lib\site-packages' import babel or from 'T:\foo\Python2y7\Lib\site-packages\babel' import babel but every variation of this I try gives syntax errors. Additionally I'm confused, because the examples I see show people pointing to literal '.py' files, but none of these packages have an actual '.py' file of the same name as the package (they all have init files within their individual folders, and lots of other randomly named .py files). Can someone, in plain english, using filepath examples, show me how to do this? I'm very confused by the long answers and fake example paths, I would love a literal absolute path starting with 'T:\', as answers like from packA.subA.sa1 import helloWorld confuse the crap out of me (what is packA? what is subA? is helloWorld the name of the actual package, the name of the folder within site-packages, or the name of a .py file within a folder?) Unfortunately I'm unable to use PIP or any other third party libs that might make this easier, as the new VDE doesn't have anything but stock 2.7 packages. I'm sorry for being so dumb, I stayed late and created a StackOverflow account just for this, would really appreciate a hand holding. | How can I load a Python module given its full path? Note that the file can be anywhere in the filesystem, as it is a configuration option. |
I want to send screenshots and images in chat. How can I achieve that? | There is (apparently) a 100 reputation requirement to upload and post images through chat. There isn't any easily located documentation on this, however. 100 global reputation is listed as the privilege for , while the chat FAQ and help both do not mention any restrictions on uploading images. As such, could somewhere other than be used to indicate that there is a reputation requirement in chat for uploading images? |
I've searched a lot, i also tried lots of thing but still cannot find the problem. I have an apache 2.2.22 server installed on an ubuntu server 12.04 lts. I have a number of http virtual hosts and 2 https vhosts. Everything works fine, but the strange thing is that if i give on my browser one of my http sites, with https instead, it redirects me to the actual https site. This is very awkward an i really don't know what is causing it. Has anyone faced that too? and can you help with this? Thanks in advance | This is a about Hosting multiple SSL websites on the same IP. I was under the impression that each SSL Certificate required it's own unique IP Address/Port combination. But the is at odds with this claim. Using information from that Question, I was able to get multiple SSL certificates to work on the same IP address and on port 443. I am very confused as to why this works given the assumption above and reinforced by others that each SSL domain website on the same server requires its own IP/Port. I am suspicious that I did something wrong. Can multiple SSL Certificates be used this way? |
This is a question French mathematician Pierre de Fermat posed to the English mathematicians of his time. "Prove that x=5 and y=3 are the only positive integer values for which $x^2 +2=y^3$." I have been trying to come up with an answer for days using modular arithmetic to no avail. Any such method would therefore be appreciated as well as other insights. | $x^2 + 1 = z = y^3 - 1$ Why $z = 26 $ and only $26$ ? Is there an elementary proof of that ? |
Find the integral $$\int\int _{[0,1] \times[0,1]} \max \left\{x,y\right\} dx \,dy$$ | Evaluate: $$\int_{[0,1]×[0,1]} \max\{x, y\} dxdy$$ I am totally stuck on it. How can I solve this? |
I have two tables, 2012 and 2018, each in different databases. I am currently using SQL Server. The 2012 table has data filled in, while the 2018 table has the same exact columns, but is empty. I want to copy data from the 2012 table to the 2018 table. I tried looking it up online, but most of the information pertained to other versions of SQL (MySQL, Oracle, etc.) I would very much appreciate some help with this. Thank you. | I have a database called foo and a database called bar. I have a table in foo called tblFoobar that I want to move (data and all) to database bar from database foo. What is the SQL statement to do this? |
I need to program an FTP upload. So far no problem BUT I have to use a proxy to do so. Sadly its not a FTP proxy but a HTTP proxy so I get the typical error that uploading is not available with HTTP proxies. To correct this I tried the typical workaround with ftp.Proxy set to null (nothing in VB). But then I get the error message that the host cannot be found. So I'm wondering what I'm doing wrong there? OR am I in a situation there where it is impossible to use FtpWebRequest? FtpWebRequest ftp = (FtpWebRequest)FtpWebRequest.Create("ftp://ftp.targetserver.com/automaticUpload/test.txt"); ftp.Credentials = new NetworkCredential("myuser", "passwd"); ftp.UseBinary = true; //ftp.Proxy = new WebProxy("proxy1"); ftp.Proxy = null; ftp.Method = WebRequestMethods.Ftp.UploadFile; FileStream fs = File.OpenRead(@"C:\blah\blubb\blah\t1.txt.txt"); byte [] buffer = new byte[fs.Length]; fs.Read(buffer, 0, buffer.Length); fs.Close(); Stream ftpStream = ftp.GetRequestStream(); ftpStream.Write(buffer, 0, buffer.Length); Edit: As it seems the information I got there that there is a working workaround was wrong. Thus the other questions answers are fully correct (still) that there is no way to do this with plain c#. | Is there a way to upload a file to a FTP server when behind an HTTP proxy ? It seems that uploading a file is not supported behind an HTTP Proxy using .Net Webclient. (). If there is no workaround ? If not, do you know a good and free FTP library I can use ? Edit: Unfortunately, I don't have any FTP proxy to connect to. |
When we say that the universe is expanding, the space between everything is not. The space between atoms, the space between my house and school, and the space between Earth and Sun remains the same, due to the four fundamental forces of nature. However, when does the gravitational force becomes comparatively small, to see the expansion in space? Is it between the stars - interstellar? Is it between the galaxies - intergalactic? Is it between the superclusters - intersupercluster? Or something greater that I'm not aware of? | I have looked at other questions on this site (e.g. "why does space expansion affect matter") but can't find the answer I am looking for. So here is my question: One often hears talk of space expanding when we talk about the speed of galaxies relative to ours. Why, if space is expanding, does matter not also expand? If a circle is drawn on balloon (2d plane), and the balloon expands, then the circle also expands. If matter is an object with 3 spatial dimensions, then when those 3 dimensions expand, so should the object. If that was the case, we wouldn't see the universe as expanding at all, because we would be expanding (spatially) with it. I have a few potential answers for this, which raise their own problems: Fundamental particles are 'point sized' objects. They cannot expand because they do not have spatial dimension to begin with. The problem with this is that while the particles would not expand, the space between them would, leading to a point where the 3 non-gravity forces would no longer hold matter together due to distance Fundamental particles are curled up in additional dimensions a la string theory. These dimensions are not expanding. Same problems as 1, with the added problem of being a bit unsatisfying. The answer seems to be (from Marek in the previous question) that the gravitational force is so much weaker than the other forces that large (macro) objects move apart, but small (micro) objects stay together. However, this simple explanation seems to imply that expansion of space is a 'force' that can be overcome by a greater one. That doesn't sound right to me. |
I work as a researcher in a private company and my supervisor, who was previously working as a university professor, asked me to review papers for a conference he's co-organizing. He mentioned the review will be under his name. Is it normal for a researcher with a PhD to review papers without any type of exposure in return? Do you have tips on how to proceed? I have to mention that I come from a different field. | Is it common to supervisors to email their students papers to review (which were apparently assigned to the supervisor, and not to the student). The field is Computer Science, but I would also like to hear from the other fields. |
I work in security as an intern, and I've been asked by my boss to look into disabling Siri on macOS Sierra. I noticed that there's no way to prevent users from re-enabling Siri even if it's disabled by an administrator. I've tried using "csrutil disable" in Recovery Mode and editing Siri's .plist files, but it seems to have no effect. Is there any way to completely prevent any user from running Siri on macOS Sierra? | I have answered 'No' to Siri initial prompt, but I can still see it in my process list. I've tried to kill it, but it loads again immediately. How can I unload and remove Siri from my Mac? |
I think I need to be using induction in this case. i prove the subspace with dimension 0, then assume there is a subspace of k dimensions and then prove that k+1 holds under addition/scalar multiplication aswell. any hints/advice? | Let $V$ be an $n$-dimensional vector space over $\mathbb R$. Prove that $V$ has a subspace of dimension $r$ for each $0 \le r \le n$. Is this as simple as saying that $V$ has a basis of $n$ elements, and then take $r$ elements from this basis and this will generate an $r$-dimensional subspace? Or am I missing something? It seems too simple. Thanks |
I have an android app that l am busy with but ran into a small problem. I am trying to refresh/restart my fragement after saving data by the use of the save button but l am getting the following err: Attempt to invoke virtual method 'void android.support.v4.app.Fragment.setNextAnim(int)' on a null object reference here is my code in the button: save1.setOnClickListener(new View.OnClickListener(){ @Override public void onClick(View v) { //Util.displayMessage(getContext(),"Saving"); String textToStore = contact1.getText().toString(); String textToStore2 = contact2.getText().toString(); String Url = "/gps/savetaxiroutes/"+imei+"/"+textToStore+"/"+textToStore2 +"/"+ sendNotification.toString() ; AllContacts fragment = (AllContacts) getFragmentManager().findFragmentById(R.id.thelayout2) getFragmentManager().beginTransaction() .detach(fragment) .attach(fragment) .commit(); mPopupWindow.dismiss(); } }); this is how the code is structured in my save button method. | What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them? What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely? |
$$\sum_{\ell=k}^n \binom{\ell}{k} = \binom{n+1}{k+1}$$ Can someone explain how we got that equation? Expanding it we get $$\binom{k}{k} + \binom{k+1}{k} + \binom{k+2}{k} + .....+ \binom{n}{k}$$ but how does that add up to $$\binom{n+1}{k+1}$$ | After reading , the most popular answer use the identity $$\sum_{t=0}^n \binom{t}{k} = \binom{n+1}{k+1}.$$ What's the name of this identity? Is it the identity of the modified. How can we prove it? I tried by induction, but without success. Can we also prove it algebraically? Thanks for your help. EDIT 01 : This identity is known as the because, on Pascal's triangle, when the addends represented in the summation and the sum itself are highlighted, a hockey-stick shape is revealed. |
import java.util.Scanner; public class main { public static void main(String[] args) { boolean a = true; do { Scanner input = new Scanner(System.in); System.out.println("Press any on keyboard:"); String keys = input.nextLine(); System.out.println("You pressed:"); System.out.println(keys); System.out.println("Your hash is:"); String B = "#B"; String hash = B+keys; System.out.println(hash); System.out.println("To end loop press f"); //End Loop Scanner exit = new Scanner(System.in); String end = exit.nextLine(); if (end=="f") { a=false; } } while(a); } } I've been using python and I decided to start learning java since android studio requires it. I'm learning how to do loops again. I can't get this to work. I already looked this up I couldn't find it. How would I end this by pressing 'f'? My thought process was that once it was done going though the first lines of the do loop, it would go though the if statement changing the value of a ending the loop. | I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug. Is == bad? When should it and should it not be used? What's the difference? |
In The Day of the Doctor, all 13 Doctors turn up to help save Gallifrey, and it's assumed that Ten, Eleven, and War have summoned the rest. Given Twelve's presence - a form that Eleven hasn't yet seen - how come Eleven doesn't know he's going to regenerate again? In The Time of the Doctor, he tells Clara very clearly that he can't. Two possible answers that don't quite work: Twelve wasn't summoned; he turned up of his own accord (because Eleven's experiences are in his past but in the future of all the others). But if he remembered what really happened that day, then Eleven should have remembered too; also, even if he wasn't summoned, the Gallifreyan defence council saw him, and Eleven should have made the obvious deduction from the Time Lord General's exclamation "thirteen!" Eleven lost some of his memories of the end of the Time War, due to being together with too many versions of himself (Ten and War definitely forgot everything that happened, because 'the time streams were out of sync' or some other wibbly-wobbly timey-wimey stuff). But Clara should have remembered Twelve's appearance, since she was presumably with Eleven in his Tardis and no older version of herself was around, and her only rebuttal of Eleven's defeatist I-can't-regenerate I'll-die-on-Trenzalore speech is "you can change the future" rather than "we already know you'll regenerate again". Why do Eleven and Clara both seem to forget having (summoned and) seen Twelve? | The 13th Doctor, Capaldi, showed up in "The Day of the Doctor" when the Doctors froze Gallifrey. So, if the 12th Doctor saw him back then, how come he thought he was the last Doctor at the episode "The Time of the Doctor"? Could he have just forgotten? |
Real numbers satisfy a(bc) = (ab)c as well as ab = ba. They are also comparable. Generalising to complex numbers, everything stays the same, except the numbers lose their comparibility. Generalising to quaternions, the ab = ba no longer holds Generalising to octonions, a(bc) = (ab)c no longer holds. My question is, can you keep generalising indefinitely, and is there ever a point where the resulting number system has lost so many useful relations/identities that it just becomes a useless mush? (As a speculative example, perhaps it may become so generalised that something as simple as "a + b" becomes meaningless or uncomputable) | In the construction of types of numbers, we have the following sequence: $$\mathbb{R} \subset \mathbb{C} \subset \mathbb{H} \subset \mathbb{O} \subset \mathbb{S}$$ or: $$2^0 \mathrm{-ions} \subset 2^1 \mathrm{-ions} \subset 2^2 \mathrm{-ions} \subset 2^3 \mathrm{-ions} \subset 2^4 \mathrm{-ions} $$ or: "Reals" $\subset$ "Complex" $\subset$ "Quaternions" $\subset$ "Octonions" $\subset$ "Sedenions" With the following "properties": From $\mathbb{R}$ to $\mathbb{C}$ you gain "algebraic-closure"-ness (but you throw away ordering). From $\mathbb{C}$ to $\mathbb{H}$ we throw away commutativity. From $\mathbb{H}$ to $\mathbb{O}$ we throw away associativity. From $\mathbb{O}$ to $\mathbb{S}$ we throw away multiplicative normedness. The question is, what lies on the right side of $\mathbb{S}$, and what do you lose when you go from $\mathbb{S}$ to one of these objects ? |
Do electrons accelerating in the presence of a gravitational field radiate due to this acceleration? | A charged particle undergoing an acceleration radiates photons. Let's consider a charge in a freely falling frame of reference. In such a frame, the local gravitational field is necessarily zero, and the particle does not accelerate or experience any force. Thus, this charge is free in such a frame. But, a free charge does not emit any photons. There seems to be a paradox. Does a freely falling charge in a gravitational field radiate? |
I am using JabRef for my reference in LaTeX. But the heading for this section is "Bibliography", instead of "References". Commands used in latex: \bibliographystyle{plain} \bibliography{REFERENCES(this is my bib file)} | I'd like to modify the names used to typeset some of my document elements. For example, the caption of figure floats should change from "Figure" to "Fig.", and my \tableofcontents sectioning heading shouldn't read "Contents", but "Table of Contents". How can I do that? \documentclass{article} % \usepackage[english]{babel} \begin{document} \tableofcontents \section{foo} \begin{figure}[h] \centering \rule{1cm}{1cm}% placeholder for graphic \caption{A figure} \end{figure} \end{document} |
This is not a post about the positives or negatives of the new navbar color at the top of all StackExchange sites, but it does have to do indirectly with the navbar color. Now that the expandable search box has gone away, an interesting quirk occurs when you have your browser narrow enough to cause horizontal scrolling to kick in. Exhibit A: the browser scrollbar has activated because user has reduced the width to a size roughly less than the 980px width of the #content div container. Exhibit B: the search box looks ok, right? Exhibit C: well, maybe not...because what is the search box doing there, partly in a black background, and partly in a white background? To conclude: the top navbar appeareance should persist across the full width of the browser when the browser size is reduced, even if the search box in the right corner makes that more challenging. | Update A month Several months later, a new top bar, and the bug still exists. An answer has already been posted that would fix the bug, so is this something that the dev team plans on fixing? There are also a host of other problems caused by this, especially on the and . Again, this would be fixed with html{min-width:1000px;} There is a slight bug with small windows on both the new meta and main site(s)?, shown here. The problem is that the top bar coloring doesn't stretch across when you resize and scroll left or right. On Meta, when a horizontal scroll bar is needed, the black background will only be as wide as the width of the viewport, but when you scroll the coloring will not shift. To reproduce: Make screen as large as possible, or wait until the menu bar starts expanding Make it smaller and smaller until horizontal scrollbar appears, then scroll left and right. |
Would someone be able to explain in simple English why this happens when I try to index the below... I thought I should be getting back 45, 49, 52, 55 as my answer? I'm sure I am missing something here... times = (43, 45, 49, 52, 55) print(times[1:4]) (45, 49, 52) | I need a good explanation (references are a plus) on Python's slice notation. To me, this notation needs a bit of picking up. It looks extremely powerful, but I haven't quite got my head around it. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.