qid
int64
1
74.7M
question
stringlengths
15
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
4
30.2k
response_k
stringlengths
11
36.5k
11,365,527
I have the following objects defined: ``` public class MyGroup { public MyItem[] Items; } public class MyItem { public int Val; } ``` Say I have a list as List where each MyGroup object contains a varying number of MyItems; which in turn contains a varying value for Val. How can I find the subset of MyGrou...
2012/07/06
[ "https://Stackoverflow.com/questions/11365527", "https://Stackoverflow.com", "https://Stackoverflow.com/users/691226/" ]
``` var query = from gr in myGroups where gr.Items.Any(x => x.Val == (from g in myGroups from i in g.Items orderby i.Val select i.Val).FirstOrDefault()) select gr; ```
Add this to your Linq query: .FirstOrDefault(); and you get only one value.
11,365,527
I have the following objects defined: ``` public class MyGroup { public MyItem[] Items; } public class MyItem { public int Val; } ``` Say I have a list as List where each MyGroup object contains a varying number of MyItems; which in turn contains a varying value for Val. How can I find the subset of MyGrou...
2012/07/06
[ "https://Stackoverflow.com/questions/11365527", "https://Stackoverflow.com", "https://Stackoverflow.com/users/691226/" ]
Here's the code snippet I just wrote for this. It's an extension method to `IEnumerable<T>`, and it returns a minimum element based on a "sort" function (without actually doing a sort, or performing two passes, and without the race condition that happens when you do two passes). ``` /// <summary> /// Get the minimum e...
Add this to your Linq query: .FirstOrDefault(); and you get only one value.
11,365,527
I have the following objects defined: ``` public class MyGroup { public MyItem[] Items; } public class MyItem { public int Val; } ``` Say I have a list as List where each MyGroup object contains a varying number of MyItems; which in turn contains a varying value for Val. How can I find the subset of MyGrou...
2012/07/06
[ "https://Stackoverflow.com/questions/11365527", "https://Stackoverflow.com", "https://Stackoverflow.com/users/691226/" ]
``` var myGroup1 = new MyGroup(); myGroup1.Items = Enumerable.Range (1,3).Select (x=> new MyItem {Val=x}).ToArray(); var myGroup2 = new MyGroup(); myGroup2.Items = Enumerable.Range (1,4).Select (x=> new MyItem {Val=x}).ToArray(); var myGroup3 = new MyGroup(); myGroup3.Items = Enumerable.Range (3...
``` var query = from gr in myGroups where gr.Items.Any(x => x.Val == (from g in myGroups from i in g.Items orderby i.Val select i.Val).FirstOrDefault()) select gr; ```
11,365,527
I have the following objects defined: ``` public class MyGroup { public MyItem[] Items; } public class MyItem { public int Val; } ``` Say I have a list as List where each MyGroup object contains a varying number of MyItems; which in turn contains a varying value for Val. How can I find the subset of MyGrou...
2012/07/06
[ "https://Stackoverflow.com/questions/11365527", "https://Stackoverflow.com", "https://Stackoverflow.com/users/691226/" ]
``` var myGroup1 = new MyGroup(); myGroup1.Items = Enumerable.Range (1,3).Select (x=> new MyItem {Val=x}).ToArray(); var myGroup2 = new MyGroup(); myGroup2.Items = Enumerable.Range (1,4).Select (x=> new MyItem {Val=x}).ToArray(); var myGroup3 = new MyGroup(); myGroup3.Items = Enumerable.Range (3...
Here's the code snippet I just wrote for this. It's an extension method to `IEnumerable<T>`, and it returns a minimum element based on a "sort" function (without actually doing a sort, or performing two passes, and without the race condition that happens when you do two passes). ``` /// <summary> /// Get the minimum e...
176,496
I've recently read through my `\jobname.log` files to spot errors in typography. I came across this: ``` Overfull \hbox (6.8925pt too wide) in paragraph at lines 650--651 [][]\T1/cmtt/m/n/10 plot([][][]<functie>[], []col=<kleur>[], []lwd=<breedte van de geplotte lijn>[], []type=<type plot, [] Underfull \hbox (badn...
2014/05/11
[ "https://tex.stackexchange.com/questions/176496", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/44160/" ]
This stems from the fact that the typewriter font (`\ttfamily`) does not have any inter-word stretch or shrink. As such, it typically doesn't work well in getting a justified look. Stefan wrote a nice blog entry on this the TeXblog: [Full justification with typewriter font](http://texblog.net/latex-archive/plaintex/ful...
``` \documentclass{article} \usepackage[english]{babel} \usepackage{geometry,blindtext} \usepackage{everysel} \renewcommand*\familydefault{\ttdefault} \begin{document} \section{Default typesetting} \blindtext \section{With hyphenation} \hyphenchar\font=`\-% to allow hyphenation \blindtext \section{With hyphenation an...
21,022,746
I have an (NxK) array, and I need to efficiently calculate differences between sequential row pairs, producing an (N-1 x K) array (i.e. elements in its first column would be calculated as A[i+1,0]-A[i,0]). Is it possible to do this not with a loop (which is obvious), but in a more elegant vectorized way? Thank you.
2014/01/09
[ "https://Stackoverflow.com/questions/21022746", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27122/" ]
What you should do is to define an interface and then make two different classes that implement that interface. It shouldn't be too difficult to take all the existing functions in your module and turn that into a class instead. Here is an example. I created an interface class named `IMachine` and two classes that impl...
You would be able to get a more elegant solution to this using VB.NET, but as you are using VB6 and you want to use modules I think the best way you can do this is something like this: Put all common routines in one module `ModuleCommon`, put device specific routines in separate modules `Machine1`, `Machine2` etc. ``...
25,972,218
I really like the idea of making my policies in charge of making sure all variables are populated and valid, so we don't get any nil:nilClass errors or similar. I thought it would be good to make sure a user has uploaded a file using a policy: Here's my create action: ``` def create file = params[:file][:upload...
2014/09/22
[ "https://Stackoverflow.com/questions/25972218", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2069715/" ]
I'm doing this in my controller: ``` file = params[:file][:uploaded_file] raise Pundit::NotAuthorizedError if file == nil ``` It works fine, but I'd like this logic to be in my policy layer :/ At first I thought it might not make sense semantically, as this isn't an authorization thing, but it is when you think abou...
The way pundit works is that is looks at the class of the object you are passing to it and then calls that policy. According to the [pundit github](https://github.com/elabs/pundit) authorize will call something equivalent to this (assuming @asset is of the Asset class): ``` raise "not authorized" unless AssetPolicy.n...
25,972,218
I really like the idea of making my policies in charge of making sure all variables are populated and valid, so we don't get any nil:nilClass errors or similar. I thought it would be good to make sure a user has uploaded a file using a policy: Here's my create action: ``` def create file = params[:file][:upload...
2014/09/22
[ "https://Stackoverflow.com/questions/25972218", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2069715/" ]
In your config/initializers/pundit.rb file, you could add ``` rescue_from Pundit::NotDefinedError, with: :user_not_authorized ```
The way pundit works is that is looks at the class of the object you are passing to it and then calls that policy. According to the [pundit github](https://github.com/elabs/pundit) authorize will call something equivalent to this (assuming @asset is of the Asset class): ``` raise "not authorized" unless AssetPolicy.n...
15,267,500
I want to remove the following words from end of String `‘PTE’, ‘LTD’, ‘PRIVATE’ and ‘LIMITED’` i tried the code but then i stuck. i tried this ``` String[] str = {"PTE", "LTD", "PRIVATE", "LIMITED"}; String company = "Basit LTD"; for(int i=0;i<str.length;i++) { if (company.endsWith(str[i])) { int pos...
2013/03/07
[ "https://Stackoverflow.com/questions/15267500", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1000510/" ]
If you place the unwanted words in the map it will be ommitted in the resultant string ``` HashMap map = new HashMap(); map.put("PTE", ""); map.put("LTD", ""); map.put("PRIVATE", ""); map.put("LIMITED", ""); String company = "Basit LTD PRIVATE PTE"; String words[] = company.split(" "); ...
If you want to remove these suffixes only at the end of the string, then you could introduce a `while` loop: ``` String[] str = {"PTE", "LTD", "PRIVATE", "LIMITED"}; boolean foundSuffix = true; String company = "Basit LTD"; while (foundSuffix) { foundSuffix = false; for(int i=0;i<str.length;i++) { ...
15,267,500
I want to remove the following words from end of String `‘PTE’, ‘LTD’, ‘PRIVATE’ and ‘LIMITED’` i tried the code but then i stuck. i tried this ``` String[] str = {"PTE", "LTD", "PRIVATE", "LIMITED"}; String company = "Basit LTD"; for(int i=0;i<str.length;i++) { if (company.endsWith(str[i])) { int pos...
2013/03/07
[ "https://Stackoverflow.com/questions/15267500", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1000510/" ]
If you place the unwanted words in the map it will be ommitted in the resultant string ``` HashMap map = new HashMap(); map.put("PTE", ""); map.put("LTD", ""); map.put("PRIVATE", ""); map.put("LIMITED", ""); String company = "Basit LTD PRIVATE PTE"; String words[] = company.split(" "); ...
Try this : ``` public static void main(String a[]) { String[] str = {"PTE", "LTD", "PRIVATE", "LIMITED"}; String company = "Basit LIMITED PRIVATE LTD PTE"; for(int i=0;i<str.length;i++) { company = company.replaceAll(str[i], ""); } System.out.println(company.replaceAll("\\s","")); } ...
15,267,500
I want to remove the following words from end of String `‘PTE’, ‘LTD’, ‘PRIVATE’ and ‘LIMITED’` i tried the code but then i stuck. i tried this ``` String[] str = {"PTE", "LTD", "PRIVATE", "LIMITED"}; String company = "Basit LTD"; for(int i=0;i<str.length;i++) { if (company.endsWith(str[i])) { int pos...
2013/03/07
[ "https://Stackoverflow.com/questions/15267500", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1000510/" ]
If you want to remove these suffixes only at the end of the string, then you could introduce a `while` loop: ``` String[] str = {"PTE", "LTD", "PRIVATE", "LIMITED"}; boolean foundSuffix = true; String company = "Basit LTD"; while (foundSuffix) { foundSuffix = false; for(int i=0;i<str.length;i++) { ...
I was trying to do exactly same thing for one of my projects. I wrote this code few days earlier. Now I was exactly trying to find a much better way to do it, that's how I found this Question. But after seeing other answers I decided to share my version of the code. ``` Collection<String> stopWordSet = Arrays.asList("...
15,267,500
I want to remove the following words from end of String `‘PTE’, ‘LTD’, ‘PRIVATE’ and ‘LIMITED’` i tried the code but then i stuck. i tried this ``` String[] str = {"PTE", "LTD", "PRIVATE", "LIMITED"}; String company = "Basit LTD"; for(int i=0;i<str.length;i++) { if (company.endsWith(str[i])) { int pos...
2013/03/07
[ "https://Stackoverflow.com/questions/15267500", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1000510/" ]
If you want to remove these suffixes only at the end of the string, then you could introduce a `while` loop: ``` String[] str = {"PTE", "LTD", "PRIVATE", "LIMITED"}; boolean foundSuffix = true; String company = "Basit LTD"; while (foundSuffix) { foundSuffix = false; for(int i=0;i<str.length;i++) { ...
Try this : ``` public static void main(String a[]) { String[] str = {"PTE", "LTD", "PRIVATE", "LIMITED"}; String company = "Basit LIMITED PRIVATE LTD PTE"; for(int i=0;i<str.length;i++) { company = company.replaceAll(str[i], ""); } System.out.println(company.replaceAll("\\s","")); } ...
15,267,500
I want to remove the following words from end of String `‘PTE’, ‘LTD’, ‘PRIVATE’ and ‘LIMITED’` i tried the code but then i stuck. i tried this ``` String[] str = {"PTE", "LTD", "PRIVATE", "LIMITED"}; String company = "Basit LTD"; for(int i=0;i<str.length;i++) { if (company.endsWith(str[i])) { int pos...
2013/03/07
[ "https://Stackoverflow.com/questions/15267500", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1000510/" ]
If you want to remove these suffixes only at the end of the string, then you could introduce a `while` loop: ``` String[] str = {"PTE", "LTD", "PRIVATE", "LIMITED"}; boolean foundSuffix = true; String company = "Basit LTD"; while (foundSuffix) { foundSuffix = false; for(int i=0;i<str.length;i++) { ...
``` public class StringMatchRemove { public static void main(String[] args) { String str="my name is noorus khan"; String search="noorus"; String newString=""; String word=str.replace(search," "); StringTokenizer st = new StringTokenizer(word," "); while(st.hasMoreT...
15,267,500
I want to remove the following words from end of String `‘PTE’, ‘LTD’, ‘PRIVATE’ and ‘LIMITED’` i tried the code but then i stuck. i tried this ``` String[] str = {"PTE", "LTD", "PRIVATE", "LIMITED"}; String company = "Basit LTD"; for(int i=0;i<str.length;i++) { if (company.endsWith(str[i])) { int pos...
2013/03/07
[ "https://Stackoverflow.com/questions/15267500", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1000510/" ]
If you place the unwanted words in the map it will be ommitted in the resultant string ``` HashMap map = new HashMap(); map.put("PTE", ""); map.put("LTD", ""); map.put("PRIVATE", ""); map.put("LIMITED", ""); String company = "Basit LTD PRIVATE PTE"; String words[] = company.split(" "); ...
I was trying to do exactly same thing for one of my projects. I wrote this code few days earlier. Now I was exactly trying to find a much better way to do it, that's how I found this Question. But after seeing other answers I decided to share my version of the code. ``` Collection<String> stopWordSet = Arrays.asList("...
15,267,500
I want to remove the following words from end of String `‘PTE’, ‘LTD’, ‘PRIVATE’ and ‘LIMITED’` i tried the code but then i stuck. i tried this ``` String[] str = {"PTE", "LTD", "PRIVATE", "LIMITED"}; String company = "Basit LTD"; for(int i=0;i<str.length;i++) { if (company.endsWith(str[i])) { int pos...
2013/03/07
[ "https://Stackoverflow.com/questions/15267500", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1000510/" ]
If you want to remove these suffixes only at the end of the string, then you could introduce a `while` loop: ``` String[] str = {"PTE", "LTD", "PRIVATE", "LIMITED"}; boolean foundSuffix = true; String company = "Basit LTD"; while (foundSuffix) { foundSuffix = false; for(int i=0;i<str.length;i++) { ...
All you need is to use `trim()` and call your function recursively, Or each time you remove a sub string from the end, reset your `i` to 0.
15,267,500
I want to remove the following words from end of String `‘PTE’, ‘LTD’, ‘PRIVATE’ and ‘LIMITED’` i tried the code but then i stuck. i tried this ``` String[] str = {"PTE", "LTD", "PRIVATE", "LIMITED"}; String company = "Basit LTD"; for(int i=0;i<str.length;i++) { if (company.endsWith(str[i])) { int pos...
2013/03/07
[ "https://Stackoverflow.com/questions/15267500", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1000510/" ]
If you place the unwanted words in the map it will be ommitted in the resultant string ``` HashMap map = new HashMap(); map.put("PTE", ""); map.put("LTD", ""); map.put("PRIVATE", ""); map.put("LIMITED", ""); String company = "Basit LTD PRIVATE PTE"; String words[] = company.split(" "); ...
All you need is to use `trim()` and call your function recursively, Or each time you remove a sub string from the end, reset your `i` to 0.
15,267,500
I want to remove the following words from end of String `‘PTE’, ‘LTD’, ‘PRIVATE’ and ‘LIMITED’` i tried the code but then i stuck. i tried this ``` String[] str = {"PTE", "LTD", "PRIVATE", "LIMITED"}; String company = "Basit LTD"; for(int i=0;i<str.length;i++) { if (company.endsWith(str[i])) { int pos...
2013/03/07
[ "https://Stackoverflow.com/questions/15267500", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1000510/" ]
You can do this in single line. no need to loop through. just use [**String#replaceAll(regex, str)**](http://docs.oracle.com/javase/7/docs/api/java/lang/String.html#replaceAll%28java.lang.String,%20java.lang.String%29). ``` company = company.replaceAll("PTE$*?|LTD$*?|PRIVATE$*?|LIMITED$*?",""); ```
All you need is to use `trim()` and call your function recursively, Or each time you remove a sub string from the end, reset your `i` to 0.
15,267,500
I want to remove the following words from end of String `‘PTE’, ‘LTD’, ‘PRIVATE’ and ‘LIMITED’` i tried the code but then i stuck. i tried this ``` String[] str = {"PTE", "LTD", "PRIVATE", "LIMITED"}; String company = "Basit LTD"; for(int i=0;i<str.length;i++) { if (company.endsWith(str[i])) { int pos...
2013/03/07
[ "https://Stackoverflow.com/questions/15267500", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1000510/" ]
You can do this in single line. no need to loop through. just use [**String#replaceAll(regex, str)**](http://docs.oracle.com/javase/7/docs/api/java/lang/String.html#replaceAll%28java.lang.String,%20java.lang.String%29). ``` company = company.replaceAll("PTE$*?|LTD$*?|PRIVATE$*?|LIMITED$*?",""); ```
I was trying to do exactly same thing for one of my projects. I wrote this code few days earlier. Now I was exactly trying to find a much better way to do it, that's how I found this Question. But after seeing other answers I decided to share my version of the code. ``` Collection<String> stopWordSet = Arrays.asList("...
2,274,905
How many $3$ digit number $x > 350$ can be formed by using digit $0 ,1,2,3,4,5,6$ if each digit can be used only once? So my understanding is there would be three cases here. First one is first digit start with $3$ but and second digit is $5$ and third digit is $1,2,3$ and so on. that would be $$1 \times 1 \times 6$...
2017/05/10
[ "https://math.stackexchange.com/questions/2274905", "https://math.stackexchange.com", "https://math.stackexchange.com/users/445019/" ]
Solutions can be written as $u(x,t) = F(\sqrt{x^2 + 2 t})$ where $F$ is an arbitrary (differentiable) function. However, this requires the initial condition $u(x,0) = F(|x|)$ to be an even function.
For the boundary conditions you posed, $u(x,0)$ known, the solution is $u(x,t)=u(\sqrt{x^2-2t},0)$
1,592,449
Let $T: \mathbb{R}^2 \to \mathbb{R}^2$ the rotation transformation of 120 degrees counter clockwise around the dot $(0,0)$. let $P(t) =t^7-t^4+t^3$. then $P(T)(x,y)= (x,y)$ for every $(x,y) \in \mathbb{R}^2$? I need to find out if thats true or false, but I have no idea how to calculate $P(T)$ ?
2015/12/29
[ "https://math.stackexchange.com/questions/1592449", "https://math.stackexchange.com", "https://math.stackexchange.com/users/151615/" ]
In 1830 Jacobi wrote a letter to Legendre after the death of Fourier (for an account, see [Fourier, Legendre and Jacobi](http://dx.doi.org/10.1016/j.joems.2011.08.001), Kahane, 2011). In it he writes about "L'honneur de l’esprit humain" (The honour of the human mind), which later became a motto for pure mathematics, an...
A major topic of classical analysis is Fourier series and Fourier integrals. These ideas generalize to analysis on (locally compact) *topological groups*. A topological group is a group $G$ in which group multiplication $G \times G \rightarrow G$ where $(g,h) \mapsto gh$ and group inversion $G \rightarrow G$ where $g \...
1,592,449
Let $T: \mathbb{R}^2 \to \mathbb{R}^2$ the rotation transformation of 120 degrees counter clockwise around the dot $(0,0)$. let $P(t) =t^7-t^4+t^3$. then $P(T)(x,y)= (x,y)$ for every $(x,y) \in \mathbb{R}^2$? I need to find out if thats true or false, but I have no idea how to calculate $P(T)$ ?
2015/12/29
[ "https://math.stackexchange.com/questions/1592449", "https://math.stackexchange.com", "https://math.stackexchange.com/users/151615/" ]
In most branches of mathematics that work with topological spaces, most of the spaces people use have only one natural topology\* that the people want to work with, and so general discussions of abstract topology are unnecessary. Anywhere you have a metric space, you have a topology, and there are topological questions...
An elegant theorem of Brouwer's asserts that a continuous map from a disk to itself necessarily has a fixed point. Probably the most accessible proof of this is an algebraic-topology proof using a relative homology group. That's an example to illustrate that the assumption of your question is not correct. This type of ...
1,592,449
Let $T: \mathbb{R}^2 \to \mathbb{R}^2$ the rotation transformation of 120 degrees counter clockwise around the dot $(0,0)$. let $P(t) =t^7-t^4+t^3$. then $P(T)(x,y)= (x,y)$ for every $(x,y) \in \mathbb{R}^2$? I need to find out if thats true or false, but I have no idea how to calculate $P(T)$ ?
2015/12/29
[ "https://math.stackexchange.com/questions/1592449", "https://math.stackexchange.com", "https://math.stackexchange.com/users/151615/" ]
One of the basic lessons of 20th century mathematics was that infinite structures are usually best thought of as having a topology (or something like a topology to serve similar purposes). The idea is that everything is a "space" of some sort and not only a set. A pure set with no topological structure is included in t...
The obvious answer is that is *often* comes up outside topology. > > But I have not seen anyone bringing this up in other areas of mathematics such as linear algebra, calculus, differential equations or analysis or complex analysis. > > > You haven't seen any topology in these classes? Point set topology is simp...
1,592,449
Let $T: \mathbb{R}^2 \to \mathbb{R}^2$ the rotation transformation of 120 degrees counter clockwise around the dot $(0,0)$. let $P(t) =t^7-t^4+t^3$. then $P(T)(x,y)= (x,y)$ for every $(x,y) \in \mathbb{R}^2$? I need to find out if thats true or false, but I have no idea how to calculate $P(T)$ ?
2015/12/29
[ "https://math.stackexchange.com/questions/1592449", "https://math.stackexchange.com", "https://math.stackexchange.com/users/151615/" ]
In 1830 Jacobi wrote a letter to Legendre after the death of Fourier (for an account, see [Fourier, Legendre and Jacobi](http://dx.doi.org/10.1016/j.joems.2011.08.001), Kahane, 2011). In it he writes about "L'honneur de l’esprit humain" (The honour of the human mind), which later became a motto for pure mathematics, an...
One of the basic lessons of 20th century mathematics was that infinite structures are usually best thought of as having a topology (or something like a topology to serve similar purposes). The idea is that everything is a "space" of some sort and not only a set. A pure set with no topological structure is included in t...
1,592,449
Let $T: \mathbb{R}^2 \to \mathbb{R}^2$ the rotation transformation of 120 degrees counter clockwise around the dot $(0,0)$. let $P(t) =t^7-t^4+t^3$. then $P(T)(x,y)= (x,y)$ for every $(x,y) \in \mathbb{R}^2$? I need to find out if thats true or false, but I have no idea how to calculate $P(T)$ ?
2015/12/29
[ "https://math.stackexchange.com/questions/1592449", "https://math.stackexchange.com", "https://math.stackexchange.com/users/151615/" ]
One of the basic lessons of 20th century mathematics was that infinite structures are usually best thought of as having a topology (or something like a topology to serve similar purposes). The idea is that everything is a "space" of some sort and not only a set. A pure set with no topological structure is included in t...
One subject which relies heavily on topology is functional analysis, you should take a look at that. In basic math courses one does not encounter anything that behaves that wierd , which makes it harder to see the point or "idea" of topology. Taking a serious course in functional analysis will probably be the first pla...
1,592,449
Let $T: \mathbb{R}^2 \to \mathbb{R}^2$ the rotation transformation of 120 degrees counter clockwise around the dot $(0,0)$. let $P(t) =t^7-t^4+t^3$. then $P(T)(x,y)= (x,y)$ for every $(x,y) \in \mathbb{R}^2$? I need to find out if thats true or false, but I have no idea how to calculate $P(T)$ ?
2015/12/29
[ "https://math.stackexchange.com/questions/1592449", "https://math.stackexchange.com", "https://math.stackexchange.com/users/151615/" ]
In 1830 Jacobi wrote a letter to Legendre after the death of Fourier (for an account, see [Fourier, Legendre and Jacobi](http://dx.doi.org/10.1016/j.joems.2011.08.001), Kahane, 2011). In it he writes about "L'honneur de l’esprit humain" (The honour of the human mind), which later became a motto for pure mathematics, an...
One subject which relies heavily on topology is functional analysis, you should take a look at that. In basic math courses one does not encounter anything that behaves that wierd , which makes it harder to see the point or "idea" of topology. Taking a serious course in functional analysis will probably be the first pla...
1,592,449
Let $T: \mathbb{R}^2 \to \mathbb{R}^2$ the rotation transformation of 120 degrees counter clockwise around the dot $(0,0)$. let $P(t) =t^7-t^4+t^3$. then $P(T)(x,y)= (x,y)$ for every $(x,y) \in \mathbb{R}^2$? I need to find out if thats true or false, but I have no idea how to calculate $P(T)$ ?
2015/12/29
[ "https://math.stackexchange.com/questions/1592449", "https://math.stackexchange.com", "https://math.stackexchange.com/users/151615/" ]
One of the basic lessons of 20th century mathematics was that infinite structures are usually best thought of as having a topology (or something like a topology to serve similar purposes). The idea is that everything is a "space" of some sort and not only a set. A pure set with no topological structure is included in t...
An elegant theorem of Brouwer's asserts that a continuous map from a disk to itself necessarily has a fixed point. Probably the most accessible proof of this is an algebraic-topology proof using a relative homology group. That's an example to illustrate that the assumption of your question is not correct. This type of ...
1,592,449
Let $T: \mathbb{R}^2 \to \mathbb{R}^2$ the rotation transformation of 120 degrees counter clockwise around the dot $(0,0)$. let $P(t) =t^7-t^4+t^3$. then $P(T)(x,y)= (x,y)$ for every $(x,y) \in \mathbb{R}^2$? I need to find out if thats true or false, but I have no idea how to calculate $P(T)$ ?
2015/12/29
[ "https://math.stackexchange.com/questions/1592449", "https://math.stackexchange.com", "https://math.stackexchange.com/users/151615/" ]
One subject which relies heavily on topology is functional analysis, you should take a look at that. In basic math courses one does not encounter anything that behaves that wierd , which makes it harder to see the point or "idea" of topology. Taking a serious course in functional analysis will probably be the first pla...
An elegant theorem of Brouwer's asserts that a continuous map from a disk to itself necessarily has a fixed point. Probably the most accessible proof of this is an algebraic-topology proof using a relative homology group. That's an example to illustrate that the assumption of your question is not correct. This type of ...
1,592,449
Let $T: \mathbb{R}^2 \to \mathbb{R}^2$ the rotation transformation of 120 degrees counter clockwise around the dot $(0,0)$. let $P(t) =t^7-t^4+t^3$. then $P(T)(x,y)= (x,y)$ for every $(x,y) \in \mathbb{R}^2$? I need to find out if thats true or false, but I have no idea how to calculate $P(T)$ ?
2015/12/29
[ "https://math.stackexchange.com/questions/1592449", "https://math.stackexchange.com", "https://math.stackexchange.com/users/151615/" ]
A major topic of classical analysis is Fourier series and Fourier integrals. These ideas generalize to analysis on (locally compact) *topological groups*. A topological group is a group $G$ in which group multiplication $G \times G \rightarrow G$ where $(g,h) \mapsto gh$ and group inversion $G \rightarrow G$ where $g \...
An elegant theorem of Brouwer's asserts that a continuous map from a disk to itself necessarily has a fixed point. Probably the most accessible proof of this is an algebraic-topology proof using a relative homology group. That's an example to illustrate that the assumption of your question is not correct. This type of ...
1,592,449
Let $T: \mathbb{R}^2 \to \mathbb{R}^2$ the rotation transformation of 120 degrees counter clockwise around the dot $(0,0)$. let $P(t) =t^7-t^4+t^3$. then $P(T)(x,y)= (x,y)$ for every $(x,y) \in \mathbb{R}^2$? I need to find out if thats true or false, but I have no idea how to calculate $P(T)$ ?
2015/12/29
[ "https://math.stackexchange.com/questions/1592449", "https://math.stackexchange.com", "https://math.stackexchange.com/users/151615/" ]
One of the basic lessons of 20th century mathematics was that infinite structures are usually best thought of as having a topology (or something like a topology to serve similar purposes). The idea is that everything is a "space" of some sort and not only a set. A pure set with no topological structure is included in t...
A major topic of classical analysis is Fourier series and Fourier integrals. These ideas generalize to analysis on (locally compact) *topological groups*. A topological group is a group $G$ in which group multiplication $G \times G \rightarrow G$ where $(g,h) \mapsto gh$ and group inversion $G \rightarrow G$ where $g \...
31,488,139
I have encountered a strange issue with cxGrid. After executing a query to fetch all the records, the records show in the grid. Its a simple query: > > 'select \* from mytable order by name asc' > > > However,if I try and select the first record in the grid,the grid jumps to some random record in the middle of th...
2015/07/18
[ "https://Stackoverflow.com/questions/31488139", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3181689/" ]
In case it helps, below are the code and DFM of a minimalist cxGrid project which works fine for me and doesn't show the behaviour you describe. If it works for you, too, perhaps it will help you identify what difference in your project is causing your problem. Code: ``` type TForm1 = class(TForm) CDS1: TClient...
The only way I could make this work is to disable the sync mode before executing the query : > > cxGrid2DBTableView1.DataController.DataModeController.SyncMode := > False; > > > Just had to remember to enable it back again. Not the optimal solution but if someone knows a better one, I'd be much obliged.
18,505,214
I have the following question in Python 2.7: I have 20 different txt-files, each with exactly one column of numbers. Now - as an output - I would like to have one file with all those columns together. How can I concatenate one-column files in Python ? I was thinking about using the fileinput module, but I fear, I have ...
2013/08/29
[ "https://Stackoverflow.com/questions/18505214", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2728278/" ]
Use BufferedReader, for text parsing you can use regular expresions.
[Reading a .txt file using Scanner class in Java](https://stackoverflow.com/questions/13185727/reading-a-txt-file-using-scanner-java) <http://www.tutorialspoint.com/java/java_string_substring.htm> That should help you.
18,505,214
I have the following question in Python 2.7: I have 20 different txt-files, each with exactly one column of numbers. Now - as an output - I would like to have one file with all those columns together. How can I concatenate one-column files in Python ? I was thinking about using the fileinput module, but I fear, I have ...
2013/08/29
[ "https://Stackoverflow.com/questions/18505214", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2728278/" ]
You should use the split method: ``` String strCollection[] = yourScannedStr.Split(":", 2); String extractedUrl = strCollection[1]; ```
[Reading a .txt file using Scanner class in Java](https://stackoverflow.com/questions/13185727/reading-a-txt-file-using-scanner-java) <http://www.tutorialspoint.com/java/java_string_substring.htm> That should help you.
18,505,214
I have the following question in Python 2.7: I have 20 different txt-files, each with exactly one column of numbers. Now - as an output - I would like to have one file with all those columns together. How can I concatenate one-column files in Python ? I was thinking about using the fileinput module, but I fear, I have ...
2013/08/29
[ "https://Stackoverflow.com/questions/18505214", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2728278/" ]
You should read the file line by line with a `BufferedReader` as you are doing, I would the recommend parsing the file using regex. The pattern ```perl (?<=:)http://[^\\s]++ ``` Will do the trick, this pattern says: * http:// * followed by any number of non-space characters (more than one) `[^\\s]++` * and precede...
[Reading a .txt file using Scanner class in Java](https://stackoverflow.com/questions/13185727/reading-a-txt-file-using-scanner-java) <http://www.tutorialspoint.com/java/java_string_substring.htm> That should help you.
18,505,214
I have the following question in Python 2.7: I have 20 different txt-files, each with exactly one column of numbers. Now - as an output - I would like to have one file with all those columns together. How can I concatenate one-column files in Python ? I was thinking about using the fileinput module, but I fear, I have ...
2013/08/29
[ "https://Stackoverflow.com/questions/18505214", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2728278/" ]
You should read the file line by line with a `BufferedReader` as you are doing, I would the recommend parsing the file using regex. The pattern ```perl (?<=:)http://[^\\s]++ ``` Will do the trick, this pattern says: * http:// * followed by any number of non-space characters (more than one) `[^\\s]++` * and precede...
Use BufferedReader, for text parsing you can use regular expresions.
18,505,214
I have the following question in Python 2.7: I have 20 different txt-files, each with exactly one column of numbers. Now - as an output - I would like to have one file with all those columns together. How can I concatenate one-column files in Python ? I was thinking about using the fileinput module, but I fear, I have ...
2013/08/29
[ "https://Stackoverflow.com/questions/18505214", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2728278/" ]
You should read the file line by line with a `BufferedReader` as you are doing, I would the recommend parsing the file using regex. The pattern ```perl (?<=:)http://[^\\s]++ ``` Will do the trick, this pattern says: * http:// * followed by any number of non-space characters (more than one) `[^\\s]++` * and precede...
You should use the split method: ``` String strCollection[] = yourScannedStr.Split(":", 2); String extractedUrl = strCollection[1]; ```
28,238,465
I am trying to access a secure for local network url through `UIWebView`. When I access it through safari, i get an authentication challenge but the same does not appear in my `UIWebView` in the application. How can I make it appear? E.g. <http://292.168.1.54/TestWeb/Test.pdf> This url working in safari browser but t...
2015/01/30
[ "https://Stackoverflow.com/questions/28238465", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4511786/" ]
There are two ways to get to the authentication (in your case probably basic auth) challenge. 1. `-[UIWebViewDelegate webView:shouldStartLoadWithRequest:navigationType:]` will give you the request. Now you just start a second request to the same URL and use `[NSURLConnectionDelegate connection:willSendRequestForAuthen...
I hope this code will help you. * (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view from its nib. self.webView.delegate = self; ``` NSURL *url = [NSURL URLWithString:@"http://skinC.com/abc/"];// here you can write your url that you want to open NSURLRequest *request...
534,120
I've not been able to find anyway to do this via registry or GPO. I want to remove standard users ability to right-click computer and open the "Add a Network Location" button, or just disable the wizard from coming up. Is there any possible way to do this? I can't seem to find anyone successful with this.
2013/08/27
[ "https://serverfault.com/questions/534120", "https://serverfault.com", "https://serverfault.com/users/186205/" ]
A Remote Desktop Gateway server would do the job for you. From [here](http://technet.microsoft.com/en-us/library/dd560672%28v=ws.10%29.aspx): > > Remote Desktop Gateway (RD Gateway), formerly Terminal Services > Gateway (TS Gateway), is a role service in the Remote Desktop Services > server role included with Windo...
There is also this solution [as posted on StackOverflow](https://stackoverflow.com/a/25470588/195835)... > > Windows Vista onwards provides secure RDP connectivity over IPv6 without port forwarding configuration on NAT. > > > This feature is called **Windows Internet Computer Names** (WICN) & it gives a unique name...
20,371,370
I have the j-query function `test()` in (chart.js) another solution file which is added the reference of main projects. Now i want to call the `test()` method from default.aspx page. This is my code. chart.js -------- ``` function test(){ //for Example } ``` default.aspx ------------ ``` <script> test(); //call...
2013/12/04
[ "https://Stackoverflow.com/questions/20371370", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2990596/" ]
you should put reference to tht perticular js file at starting of the page like below :- ``` <script type="text/javascript" src="chart.js" /> <script> test(); //call chart.js function </script> ```
It seems like you are using a JS.page and that you are trying to call it with a script. If you want to have your chart.js called into the default.aspx page do it like this. ``` <script src="assets/chart.js"></script> ``` place this in the head sections
20,371,370
I have the j-query function `test()` in (chart.js) another solution file which is added the reference of main projects. Now i want to call the `test()` method from default.aspx page. This is my code. chart.js -------- ``` function test(){ //for Example } ``` default.aspx ------------ ``` <script> test(); //call...
2013/12/04
[ "https://Stackoverflow.com/questions/20371370", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2990596/" ]
you should put reference to tht perticular js file at starting of the page like below :- ``` <script type="text/javascript" src="chart.js" /> <script> test(); //call chart.js function </script> ```
You have to add that js file (chart.js) before your script block, may be in head tags of page. like following ``` <script type="text/javascript" src="chart.js" /> ``` and Make sure your jQuery file is added even before it. so it should be like following ``` <script type="text/javascript" src="jQuery.js" /> <script ...
20,371,370
I have the j-query function `test()` in (chart.js) another solution file which is added the reference of main projects. Now i want to call the `test()` method from default.aspx page. This is my code. chart.js -------- ``` function test(){ //for Example } ``` default.aspx ------------ ``` <script> test(); //call...
2013/12/04
[ "https://Stackoverflow.com/questions/20371370", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2990596/" ]
you should put reference to tht perticular js file at starting of the page like below :- ``` <script type="text/javascript" src="chart.js" /> <script> test(); //call chart.js function </script> ```
In the **head section** of your aspx page add this: ``` <script type="text/javascript" src="chart.js" />//add reference of the chart.js file <script type="text/javascript" language="javascript"> test(); //call chart.js function </script> ```
20,371,370
I have the j-query function `test()` in (chart.js) another solution file which is added the reference of main projects. Now i want to call the `test()` method from default.aspx page. This is my code. chart.js -------- ``` function test(){ //for Example } ``` default.aspx ------------ ``` <script> test(); //call...
2013/12/04
[ "https://Stackoverflow.com/questions/20371370", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2990596/" ]
Try this ``` <script type="text/javascript" src="chart.js"> $(document).ready(function() { test(); }); </script> ```
It seems like you are using a JS.page and that you are trying to call it with a script. If you want to have your chart.js called into the default.aspx page do it like this. ``` <script src="assets/chart.js"></script> ``` place this in the head sections
20,371,370
I have the j-query function `test()` in (chart.js) another solution file which is added the reference of main projects. Now i want to call the `test()` method from default.aspx page. This is my code. chart.js -------- ``` function test(){ //for Example } ``` default.aspx ------------ ``` <script> test(); //call...
2013/12/04
[ "https://Stackoverflow.com/questions/20371370", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2990596/" ]
Try this ``` <script type="text/javascript" src="chart.js"> $(document).ready(function() { test(); }); </script> ```
You have to add that js file (chart.js) before your script block, may be in head tags of page. like following ``` <script type="text/javascript" src="chart.js" /> ``` and Make sure your jQuery file is added even before it. so it should be like following ``` <script type="text/javascript" src="jQuery.js" /> <script ...
20,371,370
I have the j-query function `test()` in (chart.js) another solution file which is added the reference of main projects. Now i want to call the `test()` method from default.aspx page. This is my code. chart.js -------- ``` function test(){ //for Example } ``` default.aspx ------------ ``` <script> test(); //call...
2013/12/04
[ "https://Stackoverflow.com/questions/20371370", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2990596/" ]
Try this ``` <script type="text/javascript" src="chart.js"> $(document).ready(function() { test(); }); </script> ```
In the **head section** of your aspx page add this: ``` <script type="text/javascript" src="chart.js" />//add reference of the chart.js file <script type="text/javascript" language="javascript"> test(); //call chart.js function </script> ```
1,975,377
I need to populate a database with thousands of entries on a daily basis, but my code at the moment manually inserts each one into the database one at a time. ``` Do While lngSQLLoop < lngCurrentRecord lngSQLLoop = lngSQLLoop + 1 sql = "INSERT INTO db (key1, key2) VALUES ('value1', 'value2');" result = bIn...
2009/12/29
[ "https://Stackoverflow.com/questions/1975377", "https://Stackoverflow.com", "https://Stackoverflow.com/users/240298/" ]
The use of multiple `(), ()` clauses only works with SQL Server 2008. But you're in luck: you can batch these by simply concatenating your SQL statements and batch a the calls to bInsertIntoDatabase. The only down side to this approach is that if one statement in the batch fails, so will every subsequent statement in...
If the source of your data can be accessed via a database driver (like ODBC) and your database framework supports heterogeneous queries you should be able to do: ``` INSERT INTO targetDBtable (key1, key2) VALUES (SELECT key1, key2 FROM sourceDBtable); ```
1,975,377
I need to populate a database with thousands of entries on a daily basis, but my code at the moment manually inserts each one into the database one at a time. ``` Do While lngSQLLoop < lngCurrentRecord lngSQLLoop = lngSQLLoop + 1 sql = "INSERT INTO db (key1, key2) VALUES ('value1', 'value2');" result = bIn...
2009/12/29
[ "https://Stackoverflow.com/questions/1975377", "https://Stackoverflow.com", "https://Stackoverflow.com/users/240298/" ]
The use of multiple `(), ()` clauses only works with SQL Server 2008. But you're in luck: you can batch these by simply concatenating your SQL statements and batch a the calls to bInsertIntoDatabase. The only down side to this approach is that if one statement in the batch fails, so will every subsequent statement in...
Using .AddNew and .Update with an updateable recordset seems fast: takes about 0.25 seconds to add 10000 records with no errors, or 1.25 seconds to add 10000 records with 10000 errors, on my system.
1,975,377
I need to populate a database with thousands of entries on a daily basis, but my code at the moment manually inserts each one into the database one at a time. ``` Do While lngSQLLoop < lngCurrentRecord lngSQLLoop = lngSQLLoop + 1 sql = "INSERT INTO db (key1, key2) VALUES ('value1', 'value2');" result = bIn...
2009/12/29
[ "https://Stackoverflow.com/questions/1975377", "https://Stackoverflow.com", "https://Stackoverflow.com/users/240298/" ]
The use of multiple `(), ()` clauses only works with SQL Server 2008. But you're in luck: you can batch these by simply concatenating your SQL statements and batch a the calls to bInsertIntoDatabase. The only down side to this approach is that if one statement in the batch fails, so will every subsequent statement in...
Save the data to a CSV file first and then use Access' TransferText method (of the DoCmd object) to load in to Access table in one go. Remember to delete the CSV file afterwards. Even if you're running the code from Excel, you can still execute the TransferText method in Access via Automation.
14,281,920
So I have installed wordpress on my server, and it looks wonderful there. I would love to have a profile/front page for my website that is displayed nicely on phones/tablets and desktop. I have been looking around for this for a loong time but I have been unable to find anything. It would be great if it looks like: <ht...
2013/01/11
[ "https://Stackoverflow.com/questions/14281920", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1189116/" ]
Yes. You need to read about media queries. They allow your page to adapt to screen sized allowing your content to be enhanced for mobile and desktop browsing. take a look here: <http://css-tricks.com/css-media-queries/>
Have a look at WP-Touch: <http://wordpress.org/extend/plugins/wptouch/> or alternatively use Themes/Frameworks that have this functionality built in, like the Roots theme. When using your very own theme, then have a look at CSS3 media queries <http://mobile.smashingmagazine.com/2010/07/19/how-to-use-css3-media-queries-...
882,398
So I have started building plist files using NSCoder, but as I"m developing i want to look at them and see what data is being saved. How do i find/access the plist files generated by my app in the simulator (and on the device when i get to that) Places Ive looked: * application bundle * build directory
2009/05/19
[ "https://Stackoverflow.com/questions/882398", "https://Stackoverflow.com", "https://Stackoverflow.com/users/81044/" ]
To put them into the ~/Library/Application Support/iPhone Simulator/User/Applications/ subfolder (where they would end up if they were on a real device), you could use the following piece of code in your application: ``` + (NSString *)dataFilePath:(NSString *)filename { NSArray *paths = NSSearchPathForDirectoriesInDom...
wow that is dumb, found them at / this simulator must not emulate the real phone environment well at all.
882,398
So I have started building plist files using NSCoder, but as I"m developing i want to look at them and see what data is being saved. How do i find/access the plist files generated by my app in the simulator (and on the device when i get to that) Places Ive looked: * application bundle * build directory
2009/05/19
[ "https://Stackoverflow.com/questions/882398", "https://Stackoverflow.com", "https://Stackoverflow.com/users/81044/" ]
To put them into the ~/Library/Application Support/iPhone Simulator/User/Applications/ subfolder (where they would end up if they were on a real device), you could use the following piece of code in your application: ``` + (NSString *)dataFilePath:(NSString *)filename { NSArray *paths = NSSearchPathForDirectoriesInDom...
If your plist is in the Document folder then give the path as ``` NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; ``` else if your plist file is in the resource folder then give the path of resource folder as `...
50,425,305
This question was already asked, however, I still didn't get anything working properly. I am trying to create a functionality in my Admin Panel on my Laravel App that allow user to paste ad codes that then will be rendered in specific parts of the laravel app. I already have my view: ``` <form action="{{ route('upda...
2018/05/19
[ "https://Stackoverflow.com/questions/50425305", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4418242/" ]
The `{{ }}` is the "safe" blade echo; it actually re-encodes things with htmlspecialchars automatically before outputting the data. Try `{!! html_entity_decode($ads->ad1) !!}` or something similar. I'm not sure how it's getting stored, so you might have to do different decoding, but the key thing here is to use `{!! !...
The {{ }} is the " " blade echo; it actually re-encodes things with htmlspecialchars automatically before outputting the data.
53,810,242
i have two functions in python ``` class JENKINS_JOB_INFO(): def __init__(self): parser = argparse.ArgumentParser(description='xxxx. e.g., script.py -j jenkins_url -u user -a api') parser.add_argument('-j', '--address', dest='address', default="", required=True, action="store") parser.add_a...
2018/12/17
[ "https://Stackoverflow.com/questions/53810242", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5871199/" ]
Just write `params.params` instead of `params`. The way you do it is extremely confusing because in `get_jenkins_josn_data`, `self` will be the `params` and `params` will be the `base_url`. I would advise you no to do that in the future. If you want to send some parameters to the function, send the minimal amount of ...
So your solution is a bit confusing. You shouldn't pass the self to the `get_jenkins_json_data` method. The python will do that for you automatically. You should check out the data model for how [instance methods](https://docs.python.org/3/reference/datamodel.html#the-standard-type-hierarchy) work. I would refactor you...
53,810,242
i have two functions in python ``` class JENKINS_JOB_INFO(): def __init__(self): parser = argparse.ArgumentParser(description='xxxx. e.g., script.py -j jenkins_url -u user -a api') parser.add_argument('-j', '--address', dest='address', default="", required=True, action="store") parser.add_a...
2018/12/17
[ "https://Stackoverflow.com/questions/53810242", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5871199/" ]
In your function `get_jobs_state` you are passing in self as the argument for the params argument to the `get_jenkins_json_data`, and self in this case is an instance of a class. Try something like this: ``` class Jenkins: def __init__(self, domain): self.user = "user" self.api_token = "api_token" self....
So your solution is a bit confusing. You shouldn't pass the self to the `get_jenkins_json_data` method. The python will do that for you automatically. You should check out the data model for how [instance methods](https://docs.python.org/3/reference/datamodel.html#the-standard-type-hierarchy) work. I would refactor you...
58,211,821
create a project that will allow the user to enter a mailing address. The address may not contain any leading or trailing spacebars and may not contain the following special characters. ``` • Period key (.) • Comma (,) • Semicolon (;) ``` The user will enter a mailing address into a Text Box. When the appropri...
2019/10/03
[ "https://Stackoverflow.com/questions/58211821", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11778574/" ]
Please try given below. Thanks. ``` string inputValue = textBox1.Text .Trim() .Replace(".", "") .Replace(",", "") .Replace(";", ""); ```
If you have dynamic number of chars, just loop the replacement: ``` char[] delimChar = { ',', '.', ';' }; var labelBuilder = new StringBuilder(textBox1.Text); foreach(var c in delimChar) labelBuilder.Replace(c, string.Empty); label1.Text = labelBuilder.ToString().Trim(); ``` Or you may still use [Regex](https://...
5,423,103
I'm trying to create a website with different pages that all change with jquery (and maybe ajax, depending on how long it takes to initially load everything) Basically, the idea is that when you click on an item to view it, some sort of animation happens, and then you can view that item/page without the browser refre...
2011/03/24
[ "https://Stackoverflow.com/questions/5423103", "https://Stackoverflow.com", "https://Stackoverflow.com/users/348092/" ]
You could try the jQuery BBQ: Back Button & Query Library [jQuery BBQ: Back Button & Query Library](http://benalman.com/projects/jquery-bbq-plugin/) and read something about hash bang urls [Hash URIs](http://www.jenitennison.com/blog/node/154) you must consider making your ajax site crawlable [Making AJAX Applicat...
what you're looking to do is a part of the new HTML5 specs, and is essentially using the pushState() method. This allows webpages to use the hashmark(#) as a reference just like a URL, therefore allowing you to use the back and forward buttons as normal. I've never used it, but [this should point you](http://www.w3.org...
5,423,103
I'm trying to create a website with different pages that all change with jquery (and maybe ajax, depending on how long it takes to initially load everything) Basically, the idea is that when you click on an item to view it, some sort of animation happens, and then you can view that item/page without the browser refre...
2011/03/24
[ "https://Stackoverflow.com/questions/5423103", "https://Stackoverflow.com", "https://Stackoverflow.com/users/348092/" ]
what you're looking to do is a part of the new HTML5 specs, and is essentially using the pushState() method. This allows webpages to use the hashmark(#) as a reference just like a URL, therefore allowing you to use the back and forward buttons as normal. I've never used it, but [this should point you](http://www.w3.org...
the url bar at the top of the page will always remember anchors without refreshing so just load content via ajax and let the browser do the remembering for you. ie: ``` //the js function load(){ var hash = window.location.hash; var url = hash+".html"; $("body").load(url); } $(document).ready(function()...
5,423,103
I'm trying to create a website with different pages that all change with jquery (and maybe ajax, depending on how long it takes to initially load everything) Basically, the idea is that when you click on an item to view it, some sort of animation happens, and then you can view that item/page without the browser refre...
2011/03/24
[ "https://Stackoverflow.com/questions/5423103", "https://Stackoverflow.com", "https://Stackoverflow.com/users/348092/" ]
You could try the jQuery BBQ: Back Button & Query Library [jQuery BBQ: Back Button & Query Library](http://benalman.com/projects/jquery-bbq-plugin/) and read something about hash bang urls [Hash URIs](http://www.jenitennison.com/blog/node/154) you must consider making your ajax site crawlable [Making AJAX Applicat...
Use Ben Almans [hashchange plugin](http://benalman.com/projects/jquery-hashchange-plugin/). It has a hashchange event that fires everytime the hashchanges. ``` $(document).ready(function() { // Bind the event. $(window).hashchange( function(){ // Update page in here }) // Trigger the ...
5,423,103
I'm trying to create a website with different pages that all change with jquery (and maybe ajax, depending on how long it takes to initially load everything) Basically, the idea is that when you click on an item to view it, some sort of animation happens, and then you can view that item/page without the browser refre...
2011/03/24
[ "https://Stackoverflow.com/questions/5423103", "https://Stackoverflow.com", "https://Stackoverflow.com/users/348092/" ]
You could try the jQuery BBQ: Back Button & Query Library [jQuery BBQ: Back Button & Query Library](http://benalman.com/projects/jquery-bbq-plugin/) and read something about hash bang urls [Hash URIs](http://www.jenitennison.com/blog/node/154) you must consider making your ajax site crawlable [Making AJAX Applicat...
the url bar at the top of the page will always remember anchors without refreshing so just load content via ajax and let the browser do the remembering for you. ie: ``` //the js function load(){ var hash = window.location.hash; var url = hash+".html"; $("body").load(url); } $(document).ready(function()...
5,423,103
I'm trying to create a website with different pages that all change with jquery (and maybe ajax, depending on how long it takes to initially load everything) Basically, the idea is that when you click on an item to view it, some sort of animation happens, and then you can view that item/page without the browser refre...
2011/03/24
[ "https://Stackoverflow.com/questions/5423103", "https://Stackoverflow.com", "https://Stackoverflow.com/users/348092/" ]
Use Ben Almans [hashchange plugin](http://benalman.com/projects/jquery-hashchange-plugin/). It has a hashchange event that fires everytime the hashchanges. ``` $(document).ready(function() { // Bind the event. $(window).hashchange( function(){ // Update page in here }) // Trigger the ...
the url bar at the top of the page will always remember anchors without refreshing so just load content via ajax and let the browser do the remembering for you. ie: ``` //the js function load(){ var hash = window.location.hash; var url = hash+".html"; $("body").load(url); } $(document).ready(function()...
726,732
This time I have problem with virtual fields. I have core class for my game objects. This class contains a field with Model class object. Model's object contains values such as position etc. Now - while drawing I need to read position of each object from it's model. The problem starts when instead of default model cl...
2009/04/07
[ "https://Stackoverflow.com/questions/726732", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
In this case your best approach would be to assign the value of your parent field to be an instance of your derived class, then either cast it back to your derived class or hold on to a reference of your derived class (probably better). Or you could go down this road, which I like the best... ``` abstract class Gener...
If you used an interface, I believe you'd still be able to call: ``` IGameObjectModel.Position.X = 10; ``` As long as the object type you used for Position has a read/write property called X. Your interface would look something like: ``` public interface IGameObjectModel { Vector2 Position { get; ...
726,732
This time I have problem with virtual fields. I have core class for my game objects. This class contains a field with Model class object. Model's object contains values such as position etc. Now - while drawing I need to read position of each object from it's model. The problem starts when instead of default model cl...
2009/04/07
[ "https://Stackoverflow.com/questions/726732", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
There's no such thing as 'virtual fields'. Only [properties](http://msdn.microsoft.com/en-us/library/aa664453(VS.71).aspx) and [methods](http://msdn.microsoft.com/en-us/library/aa645767(VS.71).aspx) can be virtual. In your Missle class, you appear to be using the [new keyword as a modifier](http://msdn.microsoft.com/e...
If you used an interface, I believe you'd still be able to call: ``` IGameObjectModel.Position.X = 10; ``` As long as the object type you used for Position has a read/write property called X. Your interface would look something like: ``` public interface IGameObjectModel { Vector2 Position { get; ...
726,732
This time I have problem with virtual fields. I have core class for my game objects. This class contains a field with Model class object. Model's object contains values such as position etc. Now - while drawing I need to read position of each object from it's model. The problem starts when instead of default model cl...
2009/04/07
[ "https://Stackoverflow.com/questions/726732", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
If you used an interface, I believe you'd still be able to call: ``` IGameObjectModel.Position.X = 10; ``` As long as the object type you used for Position has a read/write property called X. Your interface would look something like: ``` public interface IGameObjectModel { Vector2 Position { get; ...
Did you try using generics? Using generics you can separate your game object model from your game object. You can then instantiate your game object with any game object model. The game object can communicate with the game object model thru standard interfaces. ``` interface IGameObjectModel { void Shoot(); ...
726,732
This time I have problem with virtual fields. I have core class for my game objects. This class contains a field with Model class object. Model's object contains values such as position etc. Now - while drawing I need to read position of each object from it's model. The problem starts when instead of default model cl...
2009/04/07
[ "https://Stackoverflow.com/questions/726732", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
In this case your best approach would be to assign the value of your parent field to be an instance of your derived class, then either cast it back to your derived class or hold on to a reference of your derived class (probably better). Or you could go down this road, which I like the best... ``` abstract class Gener...
You said that if you used an interface with a property that you "can't do IGameObjectModel.Position.X=10". I assume this is because Vector2 is a struct and therefore has value-type semantics. If this is correct, you should simply assign the Position property to a new Vector2 calculated from the original value. For exam...
726,732
This time I have problem with virtual fields. I have core class for my game objects. This class contains a field with Model class object. Model's object contains values such as position etc. Now - while drawing I need to read position of each object from it's model. The problem starts when instead of default model cl...
2009/04/07
[ "https://Stackoverflow.com/questions/726732", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
In this case your best approach would be to assign the value of your parent field to be an instance of your derived class, then either cast it back to your derived class or hold on to a reference of your derived class (probably better). Or you could go down this road, which I like the best... ``` abstract class Gener...
There's no such thing as 'virtual fields'. Only [properties](http://msdn.microsoft.com/en-us/library/aa664453(VS.71).aspx) and [methods](http://msdn.microsoft.com/en-us/library/aa645767(VS.71).aspx) can be virtual. In your Missle class, you appear to be using the [new keyword as a modifier](http://msdn.microsoft.com/e...
726,732
This time I have problem with virtual fields. I have core class for my game objects. This class contains a field with Model class object. Model's object contains values such as position etc. Now - while drawing I need to read position of each object from it's model. The problem starts when instead of default model cl...
2009/04/07
[ "https://Stackoverflow.com/questions/726732", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
In this case your best approach would be to assign the value of your parent field to be an instance of your derived class, then either cast it back to your derived class or hold on to a reference of your derived class (probably better). Or you could go down this road, which I like the best... ``` abstract class Gener...
Did you try using generics? Using generics you can separate your game object model from your game object. You can then instantiate your game object with any game object model. The game object can communicate with the game object model thru standard interfaces. ``` interface IGameObjectModel { void Shoot(); ...
726,732
This time I have problem with virtual fields. I have core class for my game objects. This class contains a field with Model class object. Model's object contains values such as position etc. Now - while drawing I need to read position of each object from it's model. The problem starts when instead of default model cl...
2009/04/07
[ "https://Stackoverflow.com/questions/726732", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
There's no such thing as 'virtual fields'. Only [properties](http://msdn.microsoft.com/en-us/library/aa664453(VS.71).aspx) and [methods](http://msdn.microsoft.com/en-us/library/aa645767(VS.71).aspx) can be virtual. In your Missle class, you appear to be using the [new keyword as a modifier](http://msdn.microsoft.com/e...
You said that if you used an interface with a property that you "can't do IGameObjectModel.Position.X=10". I assume this is because Vector2 is a struct and therefore has value-type semantics. If this is correct, you should simply assign the Position property to a new Vector2 calculated from the original value. For exam...
726,732
This time I have problem with virtual fields. I have core class for my game objects. This class contains a field with Model class object. Model's object contains values such as position etc. Now - while drawing I need to read position of each object from it's model. The problem starts when instead of default model cl...
2009/04/07
[ "https://Stackoverflow.com/questions/726732", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
You said that if you used an interface with a property that you "can't do IGameObjectModel.Position.X=10". I assume this is because Vector2 is a struct and therefore has value-type semantics. If this is correct, you should simply assign the Position property to a new Vector2 calculated from the original value. For exam...
Did you try using generics? Using generics you can separate your game object model from your game object. You can then instantiate your game object with any game object model. The game object can communicate with the game object model thru standard interfaces. ``` interface IGameObjectModel { void Shoot(); ...
726,732
This time I have problem with virtual fields. I have core class for my game objects. This class contains a field with Model class object. Model's object contains values such as position etc. Now - while drawing I need to read position of each object from it's model. The problem starts when instead of default model cl...
2009/04/07
[ "https://Stackoverflow.com/questions/726732", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
There's no such thing as 'virtual fields'. Only [properties](http://msdn.microsoft.com/en-us/library/aa664453(VS.71).aspx) and [methods](http://msdn.microsoft.com/en-us/library/aa645767(VS.71).aspx) can be virtual. In your Missle class, you appear to be using the [new keyword as a modifier](http://msdn.microsoft.com/e...
Did you try using generics? Using generics you can separate your game object model from your game object. You can then instantiate your game object with any game object model. The game object can communicate with the game object model thru standard interfaces. ``` interface IGameObjectModel { void Shoot(); ...
1,586,674
the task says: 1. Use OpenSSL to calculate the following user names and passwords (4 pts): • Anaga:happy666 • Maria:12345678 • Joseph:q1w2e3r4 • Stephan:1234asdf i am not sure how to install and use openssl. i have tried to install openssl but it is only a folder on my computer so dont know what to do next.[![](https...
2020/09/18
[ "https://superuser.com/questions/1586674", "https://superuser.com", "https://superuser.com/users/-1/" ]
To have this working as expected create a Windows environment variable called `MSYSTEM` and set it to your system type eg `MINGW64` For a list of supported system types see `git-sdk-64\etc\msystem` For how to set the environment variables in Windows 10 see here: [How do I set system environment variables in Windows 1...
> > when I run C:\git-sdk-64\git-bash.exe everything works fine > > > Thus, you can to use `C:\git-sdk-64\git-bash.exe` instead of cryptic git-ism `"\"C:\\git-sdk-64\\usr\\bin\\bash.exe\" -i -l"` in "commandline", isn't it?
12,812
I've read many articles on Hillary's email issue. To me, it seems like she was just a bit careless and she has no bad intentions, and the FBI knows that. So why is it that the FBI is so persistent on further investigation to this case?
2016/10/28
[ "https://politics.stackexchange.com/questions/12812", "https://politics.stackexchange.com", "https://politics.stackexchange.com/users/9883/" ]
There are two distinct problems that exist here: the use of a private email server to execute the business of the Department of State and the introduction of classified material into an unclassified system. Each must be addressed in apart from the other. **Use of a Personal Server** While not inherently illegal, th...
To answer the question most directly, the FBI is supposed to pursue investigations doggedly. To "make a big deal" is the right answer for the FBI if they must investigate a serious charge. So the implied question is about the seriousness of the charge, and so forth, the nature of the activity in question. To answer so...
12,812
I've read many articles on Hillary's email issue. To me, it seems like she was just a bit careless and she has no bad intentions, and the FBI knows that. So why is it that the FBI is so persistent on further investigation to this case?
2016/10/28
[ "https://politics.stackexchange.com/questions/12812", "https://politics.stackexchange.com", "https://politics.stackexchange.com/users/9883/" ]
> > Why is the FBI making such a big deal out Hillary Clinton's private email server? > > > Because she: * Violated laws and rules by using personal email server * Performed actions that risked classified information being exposed * Violated laws and rules by deleting emails (importantly, by violating Freedom of ...
To answer the question most directly, the FBI is supposed to pursue investigations doggedly. To "make a big deal" is the right answer for the FBI if they must investigate a serious charge. So the implied question is about the seriousness of the charge, and so forth, the nature of the activity in question. To answer so...
12,812
I've read many articles on Hillary's email issue. To me, it seems like she was just a bit careless and she has no bad intentions, and the FBI knows that. So why is it that the FBI is so persistent on further investigation to this case?
2016/10/28
[ "https://politics.stackexchange.com/questions/12812", "https://politics.stackexchange.com", "https://politics.stackexchange.com/users/9883/" ]
Possibly three main reasons: 1. It is the FBI's duty to do so as a law enforcement and intelligence agency as described in [their Mission statement](https://www.fbi.gov/about/mission). 2. To deter others from being careless with secrets. 3. To protect their reputation in the light of this becoming such a hot topic in ...
To answer the question most directly, the FBI is supposed to pursue investigations doggedly. To "make a big deal" is the right answer for the FBI if they must investigate a serious charge. So the implied question is about the seriousness of the charge, and so forth, the nature of the activity in question. To answer so...
12,812
I've read many articles on Hillary's email issue. To me, it seems like she was just a bit careless and she has no bad intentions, and the FBI knows that. So why is it that the FBI is so persistent on further investigation to this case?
2016/10/28
[ "https://politics.stackexchange.com/questions/12812", "https://politics.stackexchange.com", "https://politics.stackexchange.com/users/9883/" ]
> > Why is the FBI making such a big deal out Hillary Clinton's private email server? > > > Because she: * Violated laws and rules by using personal email server * Performed actions that risked classified information being exposed * Violated laws and rules by deleting emails (importantly, by violating Freedom of ...
Possibly three main reasons: 1. It is the FBI's duty to do so as a law enforcement and intelligence agency as described in [their Mission statement](https://www.fbi.gov/about/mission). 2. To deter others from being careless with secrets. 3. To protect their reputation in the light of this becoming such a hot topic in ...
12,812
I've read many articles on Hillary's email issue. To me, it seems like she was just a bit careless and she has no bad intentions, and the FBI knows that. So why is it that the FBI is so persistent on further investigation to this case?
2016/10/28
[ "https://politics.stackexchange.com/questions/12812", "https://politics.stackexchange.com", "https://politics.stackexchange.com/users/9883/" ]
You said: > > To me, it seems like she was just a bit careless and she has no bad intentions, and the FBI knows that. > > > She was rather a lot careless. Here's what Comey said when he [recommended not to prosecute](http://www.realclearpolitics.com/articles/2016/07/05/comey_no_case_against_clinton_on_emails_131...
> > Why is the FBI making such a big deal out Hillary Clinton's personal email server? > > > They *aren't* presently. ======================== Or at least, they don't appear to be anymore, even with recent events. They were doing their job by investigating the issue, which was then a "big-deal", but they complet...
12,812
I've read many articles on Hillary's email issue. To me, it seems like she was just a bit careless and she has no bad intentions, and the FBI knows that. So why is it that the FBI is so persistent on further investigation to this case?
2016/10/28
[ "https://politics.stackexchange.com/questions/12812", "https://politics.stackexchange.com", "https://politics.stackexchange.com/users/9883/" ]
> > Why is the FBI making such a big deal out Hillary Clinton's private email server? > > > Because she: * Violated laws and rules by using personal email server * Performed actions that risked classified information being exposed * Violated laws and rules by deleting emails (importantly, by violating Freedom of ...
Setting aside the question of whether Clinton is legally culpable, the FBI has confirmed that the servers constituted a data spill of classified information, the extent of which is presumably currently classified. One of the FBI's duties is investigation and mitigation of domestic data breaches and spills, which can ta...
12,812
I've read many articles on Hillary's email issue. To me, it seems like she was just a bit careless and she has no bad intentions, and the FBI knows that. So why is it that the FBI is so persistent on further investigation to this case?
2016/10/28
[ "https://politics.stackexchange.com/questions/12812", "https://politics.stackexchange.com", "https://politics.stackexchange.com/users/9883/" ]
> > Why is the FBI making such a big deal out Hillary Clinton's personal email server? > > > They *aren't* presently. ======================== Or at least, they don't appear to be anymore, even with recent events. They were doing their job by investigating the issue, which was then a "big-deal", but they complet...
Because they can? There are clearly laws and regulations concerning classified material and Hillary Clinton used a private Email server likely mainly in order to sidestep certain documentation and information retention duties that are a hassle when doing a job description like "Secretary of State". In the course of doi...
12,812
I've read many articles on Hillary's email issue. To me, it seems like she was just a bit careless and she has no bad intentions, and the FBI knows that. So why is it that the FBI is so persistent on further investigation to this case?
2016/10/28
[ "https://politics.stackexchange.com/questions/12812", "https://politics.stackexchange.com", "https://politics.stackexchange.com/users/9883/" ]
There are two distinct problems that exist here: the use of a private email server to execute the business of the Department of State and the introduction of classified material into an unclassified system. Each must be addressed in apart from the other. **Use of a Personal Server** While not inherently illegal, th...
You said: > > To me, it seems like she was just a bit careless and she has no bad intentions, and the FBI knows that. > > > She was rather a lot careless. Here's what Comey said when he [recommended not to prosecute](http://www.realclearpolitics.com/articles/2016/07/05/comey_no_case_against_clinton_on_emails_131...
12,812
I've read many articles on Hillary's email issue. To me, it seems like she was just a bit careless and she has no bad intentions, and the FBI knows that. So why is it that the FBI is so persistent on further investigation to this case?
2016/10/28
[ "https://politics.stackexchange.com/questions/12812", "https://politics.stackexchange.com", "https://politics.stackexchange.com/users/9883/" ]
Setting aside the question of whether Clinton is legally culpable, the FBI has confirmed that the servers constituted a data spill of classified information, the extent of which is presumably currently classified. One of the FBI's duties is investigation and mitigation of domestic data breaches and spills, which can ta...
You said: > > To me, it seems like she was just a bit careless and she has no bad intentions, and the FBI knows that. > > > She was rather a lot careless. Here's what Comey said when he [recommended not to prosecute](http://www.realclearpolitics.com/articles/2016/07/05/comey_no_case_against_clinton_on_emails_131...
12,812
I've read many articles on Hillary's email issue. To me, it seems like she was just a bit careless and she has no bad intentions, and the FBI knows that. So why is it that the FBI is so persistent on further investigation to this case?
2016/10/28
[ "https://politics.stackexchange.com/questions/12812", "https://politics.stackexchange.com", "https://politics.stackexchange.com/users/9883/" ]
> > Why is the FBI making such a big deal out Hillary Clinton's private email server? > > > Because she: * Violated laws and rules by using personal email server * Performed actions that risked classified information being exposed * Violated laws and rules by deleting emails (importantly, by violating Freedom of ...
Because they can? There are clearly laws and regulations concerning classified material and Hillary Clinton used a private Email server likely mainly in order to sidestep certain documentation and information retention duties that are a hassle when doing a job description like "Secretary of State". In the course of doi...
3,368,157
Without going into detail about what I'm trying to achieve, is it possible (and if so how) can I reference an object that I don't know the name of? For example I want to saything like: ``` someButton.Text = someButton.Name; ``` But on the right side I don't want to state the object name. So what I'd really like to d...
2010/07/30
[ "https://Stackoverflow.com/questions/3368157", "https://Stackoverflow.com", "https://Stackoverflow.com/users/406338/" ]
How do you determine the "current" button? Was it just clicked? Use the `sender` argument to the `Click` event handler (and cast it to `Button`). Do you mean the one with focus? Read the `ActiveControl` property (and cast it to `Button`). EDIT: Wait, by *current* button you mean the one on the left hand side of the ...
Use reflection. ``` Imports System.Reflection Public Function GetName(b as Button) as String Dim t As Type = b.GetType() Dim prop As PropertyInfo = t.GetProperty("Name") Return prop.GetValue(b, Nothing).ToString() End Function ``` In C#, I believe it would like this: ``` using System.Reflection; public stri...
741,557
For a certain (divergenceless) $\vec{B}$ find $\vec{A} $ such that $\vec{B}= \nabla \times \vec{A} $. Is there a general procedure to "invert" $\vec{B}= \nabla \times \vec{A} $? An inverse curl? (I was thinking of taking the curl of the previous equation: $$ \nabla \times \vec{B}= \nabla \times \nabla \times \vec{A}...
2022/12/17
[ "https://physics.stackexchange.com/questions/741557", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/212834/" ]
**Draw a square on an elastomer strip and stretch it:** *"OK, I get this:"* ![](https://i.stack.imgur.com/gHwhg.png) ![](https://i.stack.imgur.com/bmf4n.png) **The lengthwise load (comprising two force vectors, to the left and to the right) applies a stress state on the shape. What kind of stress?** *"I'll assume t...
We can put a wire under tensile stress by pulling each end with a force of equal magnitude. If the wire has an East-West alignment we need to pull its eastern end to the East and its western end to the West (even though one of these forces may be inconspicuously applied by a fixed anchorage to which one end of the wire...
741,557
For a certain (divergenceless) $\vec{B}$ find $\vec{A} $ such that $\vec{B}= \nabla \times \vec{A} $. Is there a general procedure to "invert" $\vec{B}= \nabla \times \vec{A} $? An inverse curl? (I was thinking of taking the curl of the previous equation: $$ \nabla \times \vec{B}= \nabla \times \nabla \times \vec{A}...
2022/12/17
[ "https://physics.stackexchange.com/questions/741557", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/212834/" ]
We can put a wire under tensile stress by pulling each end with a force of equal magnitude. If the wire has an East-West alignment we need to pull its eastern end to the East and its western end to the West (even though one of these forces may be inconspicuously applied by a fixed anchorage to which one end of the wire...
Stress is not a vector because it needs more information than what a vector can provide. Stress can be represented as a $2^{nd}$ order tensor quantity $\mathbb{T}$ that relates two vectors, the unit normal vector, $\mathbf{\hat{n}}$, of a surface passing through a chosen point and the force per unit surface acting on ...
741,557
For a certain (divergenceless) $\vec{B}$ find $\vec{A} $ such that $\vec{B}= \nabla \times \vec{A} $. Is there a general procedure to "invert" $\vec{B}= \nabla \times \vec{A} $? An inverse curl? (I was thinking of taking the curl of the previous equation: $$ \nabla \times \vec{B}= \nabla \times \nabla \times \vec{A}...
2022/12/17
[ "https://physics.stackexchange.com/questions/741557", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/212834/" ]
We can put a wire under tensile stress by pulling each end with a force of equal magnitude. If the wire has an East-West alignment we need to pull its eastern end to the East and its western end to the West (even though one of these forces may be inconspicuously applied by a fixed anchorage to which one end of the wire...
Suppose a ball so full of air that is almost exploding. Due to the symmetry of the situation, it is clear that each small area of its surface is being stretched equally to all tangential directions. It is not possible to represent such a stress state to an entity with a modulus and a given direction as it is the case o...
741,557
For a certain (divergenceless) $\vec{B}$ find $\vec{A} $ such that $\vec{B}= \nabla \times \vec{A} $. Is there a general procedure to "invert" $\vec{B}= \nabla \times \vec{A} $? An inverse curl? (I was thinking of taking the curl of the previous equation: $$ \nabla \times \vec{B}= \nabla \times \nabla \times \vec{A}...
2022/12/17
[ "https://physics.stackexchange.com/questions/741557", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/212834/" ]
**Draw a square on an elastomer strip and stretch it:** *"OK, I get this:"* ![](https://i.stack.imgur.com/gHwhg.png) ![](https://i.stack.imgur.com/bmf4n.png) **The lengthwise load (comprising two force vectors, to the left and to the right) applies a stress state on the shape. What kind of stress?** *"I'll assume t...
Stress is not a vector because it needs more information than what a vector can provide. Stress can be represented as a $2^{nd}$ order tensor quantity $\mathbb{T}$ that relates two vectors, the unit normal vector, $\mathbf{\hat{n}}$, of a surface passing through a chosen point and the force per unit surface acting on ...
741,557
For a certain (divergenceless) $\vec{B}$ find $\vec{A} $ such that $\vec{B}= \nabla \times \vec{A} $. Is there a general procedure to "invert" $\vec{B}= \nabla \times \vec{A} $? An inverse curl? (I was thinking of taking the curl of the previous equation: $$ \nabla \times \vec{B}= \nabla \times \nabla \times \vec{A}...
2022/12/17
[ "https://physics.stackexchange.com/questions/741557", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/212834/" ]
**Draw a square on an elastomer strip and stretch it:** *"OK, I get this:"* ![](https://i.stack.imgur.com/gHwhg.png) ![](https://i.stack.imgur.com/bmf4n.png) **The lengthwise load (comprising two force vectors, to the left and to the right) applies a stress state on the shape. What kind of stress?** *"I'll assume t...
Suppose a ball so full of air that is almost exploding. Due to the symmetry of the situation, it is clear that each small area of its surface is being stretched equally to all tangential directions. It is not possible to represent such a stress state to an entity with a modulus and a given direction as it is the case o...
741,557
For a certain (divergenceless) $\vec{B}$ find $\vec{A} $ such that $\vec{B}= \nabla \times \vec{A} $. Is there a general procedure to "invert" $\vec{B}= \nabla \times \vec{A} $? An inverse curl? (I was thinking of taking the curl of the previous equation: $$ \nabla \times \vec{B}= \nabla \times \nabla \times \vec{A}...
2022/12/17
[ "https://physics.stackexchange.com/questions/741557", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/212834/" ]
Suppose a ball so full of air that is almost exploding. Due to the symmetry of the situation, it is clear that each small area of its surface is being stretched equally to all tangential directions. It is not possible to represent such a stress state to an entity with a modulus and a given direction as it is the case o...
Stress is not a vector because it needs more information than what a vector can provide. Stress can be represented as a $2^{nd}$ order tensor quantity $\mathbb{T}$ that relates two vectors, the unit normal vector, $\mathbf{\hat{n}}$, of a surface passing through a chosen point and the force per unit surface acting on ...
3,103,261
I have the following trigger: ``` CREATE TRIGGER Users_Delete ON Users AFTER DELETE AS BEGIN SET NOCOUNT ON; -- Patients UPDATE Patients SET ModifiedByID=NULL WHERE ModifiedByID=ID; UPDATE Patients SET CreatedByID=NULL WHERE CreatedByID=ID; UPDATE Patients SET DeletedByID=NULL WHERE Dele...
2010/06/23
[ "https://Stackoverflow.com/questions/3103261", "https://Stackoverflow.com", "https://Stackoverflow.com/users/200322/" ]
Something like this? ``` UPDATE Patients SET ModifiedByID = CASE WHEN ModifiedByID=ID THEN Null ELSE ModifiedById END, CreatedByID = CASE WHEN CreatedByID=ID THEN Null ELSE CreatedById END, DeletedByID = CASE WHEN DeletedByID=ID THEN Null ELSE DeletedById END WHERE (ModifiedByID = ID OR CreatedByID = ID OR DeletedByI...
You can do it in one statement, but that's not necessarily better for performance. ``` UPDATE Patients SET ModifiedByID = CASE WHEN ModifiedID = ID THEN NULL ELSE ModifiedID, CreatedByID = CASE WHEN CreatedByID = ID THEN NULL ELSE CreatedByID, DeletedByID = CASE WHEN DeletedByID = ID THEN NULL ELSE Del...
3,103,261
I have the following trigger: ``` CREATE TRIGGER Users_Delete ON Users AFTER DELETE AS BEGIN SET NOCOUNT ON; -- Patients UPDATE Patients SET ModifiedByID=NULL WHERE ModifiedByID=ID; UPDATE Patients SET CreatedByID=NULL WHERE CreatedByID=ID; UPDATE Patients SET DeletedByID=NULL WHERE Dele...
2010/06/23
[ "https://Stackoverflow.com/questions/3103261", "https://Stackoverflow.com", "https://Stackoverflow.com/users/200322/" ]
Regarding your original question. Not really. I can't come up with anything better than ``` UPDATE Patients SET ModifiedByID= CASE WHEN ModifiedByID=ID THEN NULL ELSE ModifiedByID END, CreatedByID= CASE WHEN CreatedByID=ID THEN NULL ELSE CreatedByID END, DeletedByID= CASE WHEN DeletedByID=ID THEN NULL ELSE DeletedB...
You can do it in one statement, but that's not necessarily better for performance. ``` UPDATE Patients SET ModifiedByID = CASE WHEN ModifiedID = ID THEN NULL ELSE ModifiedID, CreatedByID = CASE WHEN CreatedByID = ID THEN NULL ELSE CreatedByID, DeletedByID = CASE WHEN DeletedByID = ID THEN NULL ELSE Del...
16,587,024
I tried to create a method which can delete itself while instantiating. After several failed attempt I ended up writing this evil `rem()` ``` var g = function () { this.rem = function () { var _instance = this; setTimeout(function () { console.log('_instance before:', _instance, 'scope:', this); ...
2013/05/16
[ "https://Stackoverflow.com/questions/16587024", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1178072/" ]
I use a similar approach to lock resources for related items rather than a blanket resource lock... It works perfectly. Your almost there but you really don't need to remove the object from the dictionary; just let the next object with that id get the lock on the object. Surely there is a limit to the number of uniq...
The main semantic issue I see is that an object can be locked without being listed in the collection because the the last line in the lock removes it and a waiting thread can pick it up and lock it. Change the collection to be a collection of objects that should guard a lock. Do **not** name it `LockedObjects` and do ...
16,587,024
I tried to create a method which can delete itself while instantiating. After several failed attempt I ended up writing this evil `rem()` ``` var g = function () { this.rem = function () { var _instance = this; setTimeout(function () { console.log('_instance before:', _instance, 'scope:', this); ...
2013/05/16
[ "https://Stackoverflow.com/questions/16587024", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1178072/" ]
I use a similar approach to lock resources for related items rather than a blanket resource lock... It works perfectly. Your almost there but you really don't need to remove the object from the dictionary; just let the next object with that id get the lock on the object. Surely there is a limit to the number of uniq...
I used the following approach. Do not check the original ID, but get small hash-code of int type to get the existing object for lock. The count of lockers depends on your situation - the more locker counter, the less the probability of collision. ``` class ThreadLocker { const int DEFAULT_LOCKERS_COUNTER = 997; ...
16,587,024
I tried to create a method which can delete itself while instantiating. After several failed attempt I ended up writing this evil `rem()` ``` var g = function () { this.rem = function () { var _instance = this; setTimeout(function () { console.log('_instance before:', _instance, 'scope:', this); ...
2013/05/16
[ "https://Stackoverflow.com/questions/16587024", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1178072/" ]
I use a similar approach to lock resources for related items rather than a blanket resource lock... It works perfectly. Your almost there but you really don't need to remove the object from the dictionary; just let the next object with that id get the lock on the object. Surely there is a limit to the number of uniq...
If you want to use the ID itself and do not allow collisions, caused by hash-code, you can you the next approach. Maintain the Dictionary of objects and store info about the number of the threads, that want to use ID: ``` class ThreadLockerByID<T> { Dictionary<T, lockerObject<T>> lockers = new Dictionary<T, locker...
74,011,119
I am working on a react project in VS Code but whenever I try to connect to firebase functions using the 'firebase init' command, it does not show the right project in my email. It's showing a project in another email of mine. I cannot remember how or when I linked the project to connect to the email from where it is ...
2022/10/10
[ "https://Stackoverflow.com/questions/74011119", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20052853/" ]
`Array.map()` ALWAYS returns ALL results but allows changes to each object within the array. `Array.filter()` on the other hand ONLY filters and cannot change individual objects within the array and should only return a boolean. If you need to first make changes to the data in order to determine if it should be inclu...
```js const data = [{ company: 'amazon', companyurl:'amazon.com' }, { company: '400 prize money', companyurl:'400 prize money' }, { company: 'facebook', companyurl:'facebook.com' }, { company: 'google', companyurl:'google.com' } ] const result = data.filter(item => item....
74,011,119
I am working on a react project in VS Code but whenever I try to connect to firebase functions using the 'firebase init' command, it does not show the right project in my email. It's showing a project in another email of mine. I cannot remember how or when I linked the project to connect to the email from where it is ...
2022/10/10
[ "https://Stackoverflow.com/questions/74011119", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20052853/" ]
`Array.map()` ALWAYS returns ALL results but allows changes to each object within the array. `Array.filter()` on the other hand ONLY filters and cannot change individual objects within the array and should only return a boolean. If you need to first make changes to the data in order to determine if it should be inclu...
```js const data = [ { company: "amazon", companyurl: "amazon.com" }, { company: "400 prize money", companyurl: "400 prize money" }, { company: "facebook", companyurl: "facebook.com" }, { company: "google", companyurl: "google.com" }, ]; const newObject = data.filter((item) => item.companyurl.includes(".com"));...
74,011,119
I am working on a react project in VS Code but whenever I try to connect to firebase functions using the 'firebase init' command, it does not show the right project in my email. It's showing a project in another email of mine. I cannot remember how or when I linked the project to connect to the email from where it is ...
2022/10/10
[ "https://Stackoverflow.com/questions/74011119", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20052853/" ]
`Array.map()` ALWAYS returns ALL results but allows changes to each object within the array. `Array.filter()` on the other hand ONLY filters and cannot change individual objects within the array and should only return a boolean. If you need to first make changes to the data in order to determine if it should be inclu...
you can use `String.prototype.endsWith()` to check if the end of the string is `.com` and filter by this: ```js const arr = [{ company: 'amazon', companyurl:'amazon.com' }, { company: '400 prize money', companyurl:'400 prize money' }, { company: 'facebook', companyurl:'facebook.com' }, { comp...
1,294,536
If a quadratic equation $ax^2+bx+c=0$ has more than two roots, then it is an identity i.e. it is true for all values of $x$ and $a=b=c=0$. What is a proof of this?
2015/05/22
[ "https://math.stackexchange.com/questions/1294536", "https://math.stackexchange.com", "https://math.stackexchange.com/users/242754/" ]
Let the three roots be $x\_1,x\_2,x\_3$. **Method $1$**: Let $f(x) = ax^2+bx+c$. Since $x\_1$ and $x\_2$ are roots, this means $f(x) = (x-x\_1)(x-x\_2)g(x)$. Since $f(x)$ has degree $2$, this forces $g(x)$ to be a constant say $k$. Further, we have $f(x\_3) = 0$. This means $k(x\_3-x\_1)(x\_3-x\_2) = 0$. Since $x\_3 \...
This is not true in general. The polynomial $x^2+1$ has more than two zeroes over the quaternions $\mathbb{H}$, but is not identical zero. I suppose you assume implicitly that the domain is a field ? Over a field every nonzero polynomial of degree $n$ has at most $n$ zeroes, see [here](https://math.stackexchange.com/qu...
1,294,536
If a quadratic equation $ax^2+bx+c=0$ has more than two roots, then it is an identity i.e. it is true for all values of $x$ and $a=b=c=0$. What is a proof of this?
2015/05/22
[ "https://math.stackexchange.com/questions/1294536", "https://math.stackexchange.com", "https://math.stackexchange.com/users/242754/" ]
Let the three roots be $x\_1,x\_2,x\_3$. **Method $1$**: Let $f(x) = ax^2+bx+c$. Since $x\_1$ and $x\_2$ are roots, this means $f(x) = (x-x\_1)(x-x\_2)g(x)$. Since $f(x)$ has degree $2$, this forces $g(x)$ to be a constant say $k$. Further, we have $f(x\_3) = 0$. This means $k(x\_3-x\_1)(x\_3-x\_2) = 0$. Since $x\_3 \...
Here's a more elementary proof. It's more cumbersome than other answers here, but it gets the job done... Assume there are three distinct roots of your quadratic $r\_1, r\_2, r\_3$. Then we have \begin{align\*} ar\_1^2 + br\_1 + c &= 0\\ ar\_2^2 + br\_2 + c &= 0\\ ar\_3^2 + br\_3 + c &= 0 \end{align\*} Subtracting the...
1,294,536
If a quadratic equation $ax^2+bx+c=0$ has more than two roots, then it is an identity i.e. it is true for all values of $x$ and $a=b=c=0$. What is a proof of this?
2015/05/22
[ "https://math.stackexchange.com/questions/1294536", "https://math.stackexchange.com", "https://math.stackexchange.com/users/242754/" ]
This is not true in general. The polynomial $x^2+1$ has more than two zeroes over the quaternions $\mathbb{H}$, but is not identical zero. I suppose you assume implicitly that the domain is a field ? Over a field every nonzero polynomial of degree $n$ has at most $n$ zeroes, see [here](https://math.stackexchange.com/qu...
Here's a more elementary proof. It's more cumbersome than other answers here, but it gets the job done... Assume there are three distinct roots of your quadratic $r\_1, r\_2, r\_3$. Then we have \begin{align\*} ar\_1^2 + br\_1 + c &= 0\\ ar\_2^2 + br\_2 + c &= 0\\ ar\_3^2 + br\_3 + c &= 0 \end{align\*} Subtracting the...
9,592,445
I need some help with sed regex substitution. From the following line: ``` Provides mysql ``` I want to get: ``` Provides mysql-5.5 ``` The best solution I was able to come with is: ``` sed -i "s/\(Provides\)\(\s\)*\(mysql\)/\1\2mysql-5.5/g" my_file_containin...
2012/03/06
[ "https://Stackoverflow.com/questions/9592445", "https://Stackoverflow.com", "https://Stackoverflow.com/users/353985/" ]
``` "s/\(Provides\)\(\s\)*\(mysql\)/\1\2mysql-5.5/g" ``` `\2` group does not contain all spaces `"s/\(Provides\)\(\s*\)\(mysql\)/\1\2mysql-5.5/g"` will work. ``` $> echo "Provides mysql" | sed "s/\(Provides\)\(\s*\)\(mysql\)/\1\2mysql-5.5/g" Provides mysql-5.5 ``` Beside that you can use `--rege...
Change this: ``` \(\s\)* ``` to this: ``` \(\s*\) ``` so that the capture-group contains all of `\s*`, instead of just a single `\s`. (With `\(\s\)*`, the capture-group ends up containing only the last whitespace character.) Actually, for that matter, you can combine all the capture groups, and write either: ``...
9,592,445
I need some help with sed regex substitution. From the following line: ``` Provides mysql ``` I want to get: ``` Provides mysql-5.5 ``` The best solution I was able to come with is: ``` sed -i "s/\(Provides\)\(\s\)*\(mysql\)/\1\2mysql-5.5/g" my_file_containin...
2012/03/06
[ "https://Stackoverflow.com/questions/9592445", "https://Stackoverflow.com", "https://Stackoverflow.com/users/353985/" ]
Change this: ``` \(\s\)* ``` to this: ``` \(\s*\) ``` so that the capture-group contains all of `\s*`, instead of just a single `\s`. (With `\(\s\)*`, the capture-group ends up containing only the last whitespace character.) Actually, for that matter, you can combine all the capture groups, and write either: ``...
This might work for you: ``` echo "Provides mysql " | sed '/^Provides/s/mysql/&-5.5/' Provides mysql-5.5 ```
9,592,445
I need some help with sed regex substitution. From the following line: ``` Provides mysql ``` I want to get: ``` Provides mysql-5.5 ``` The best solution I was able to come with is: ``` sed -i "s/\(Provides\)\(\s\)*\(mysql\)/\1\2mysql-5.5/g" my_file_containin...
2012/03/06
[ "https://Stackoverflow.com/questions/9592445", "https://Stackoverflow.com", "https://Stackoverflow.com/users/353985/" ]
``` "s/\(Provides\)\(\s\)*\(mysql\)/\1\2mysql-5.5/g" ``` `\2` group does not contain all spaces `"s/\(Provides\)\(\s*\)\(mysql\)/\1\2mysql-5.5/g"` will work. ``` $> echo "Provides mysql" | sed "s/\(Provides\)\(\s*\)\(mysql\)/\1\2mysql-5.5/g" Provides mysql-5.5 ``` Beside that you can use `--rege...
This might work for you: ``` echo "Provides mysql " | sed '/^Provides/s/mysql/&-5.5/' Provides mysql-5.5 ```
6,044,941
I'm trying to write a PHP script that sends a POST request to a remote server, then parses the XML response. I can do the POST request, but am having difficulty (from other SO questions) working out how to parse the XML response. My current code gives me: `Warning: simplexml_load_file() [function.simplexml-load-file]...
2011/05/18
[ "https://Stackoverflow.com/questions/6044941", "https://Stackoverflow.com", "https://Stackoverflow.com/users/693848/" ]
use [simplexml\_load\_string](http://php.net/simplexml_load_string) instead of `simplexml_load_file`
You have to set the cURL option to return the transfer ``` curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); ```