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
12,626,536
Running my app with the iOS6 simulator I am getting the following printed in the XCode console prior to `viewDidLoad` getting called: > > Couldn't find default.styleproto in framework > > > Has anyone else encountered this, and if so have you found a reason why? My guess is that it has to do with the iOS6 Apple M...
2012/09/27
[ "https://Stackoverflow.com/questions/12626536", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1344738/" ]
Please set your GPS settings active otherwise this error may occur again. Also,it is advisable to set the frame for the iPhone 5 .
If your iOS simulator's GPS setting is none, you will get this waring. Just change iOS simulator's GPS setting to "Apple Stores" or other, it will gone.
17,153,688
If I have two list and I want to know if there are at least one common element, I have this two options: ``` lst1.Intersect(lst2).Any(); Lst1.Any(x => lst2.Contains(x)); ``` The two options give me the result that I expect, however I don't know what is the best option. Which is more efficient? And why? Thanks. ED...
2013/06/17
[ "https://Stackoverflow.com/questions/17153688", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1068094/" ]
Oren's answer has an error in the way the stopwatch is being used. It isn't being reset at the end of the loop after the time taken by `Any()` has been measured. Note how it goes back to the start of the loop with the stopwatch never being `Reset()` so that the time that is added to `intersect` *includes* the time tak...
See Matthew's answer for a complete and accurate breakdown. Relatively easy to mock up and try yourself: ``` bool found; double intersect = 0; double any = 0; for (int i = 0; i < 100; i++) { List<string> L1 = GenerateNumberStrings(200000); List<string>...
17,153,688
If I have two list and I want to know if there are at least one common element, I have this two options: ``` lst1.Intersect(lst2).Any(); Lst1.Any(x => lst2.Contains(x)); ``` The two options give me the result that I expect, however I don't know what is the best option. Which is more efficient? And why? Thanks. ED...
2013/06/17
[ "https://Stackoverflow.com/questions/17153688", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1068094/" ]
It depends on the implementation of your IEnumerables. Your first try (`Intersect`/`Any`), finds all the matches and then determines if the set is empty or not. From the documentation, this looks to be something like O(n) operation: > > When the object returned by this method is enumerated, Intersect enumerates firs...
See Matthew's answer for a complete and accurate breakdown. Relatively easy to mock up and try yourself: ``` bool found; double intersect = 0; double any = 0; for (int i = 0; i < 100; i++) { List<string> L1 = GenerateNumberStrings(200000); List<string>...
17,153,688
If I have two list and I want to know if there are at least one common element, I have this two options: ``` lst1.Intersect(lst2).Any(); Lst1.Any(x => lst2.Contains(x)); ``` The two options give me the result that I expect, however I don't know what is the best option. Which is more efficient? And why? Thanks. ED...
2013/06/17
[ "https://Stackoverflow.com/questions/17153688", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1068094/" ]
Oren's answer has an error in the way the stopwatch is being used. It isn't being reset at the end of the loop after the time taken by `Any()` has been measured. Note how it goes back to the start of the loop with the stopwatch never being `Reset()` so that the time that is added to `intersect` *includes* the time tak...
It depends on the implementation of your IEnumerables. Your first try (`Intersect`/`Any`), finds all the matches and then determines if the set is empty or not. From the documentation, this looks to be something like O(n) operation: > > When the object returned by this method is enumerated, Intersect enumerates firs...
30,384
[This tumblr post](http://damselflier.tumblr.com/post/102596107201/reasons-not-to-donate-to-salvation-army-this) makes several claims about the Salvation Army: > > Reasons not to donate to Salvation Army this holiday season: > > > * They don’t pay their female pastors. (Their wages get added to their husbands’ payc...
2015/10/12
[ "https://skeptics.stackexchange.com/questions/30384", "https://skeptics.stackexchange.com", "https://skeptics.stackexchange.com/users/28574/" ]
It's true but misleadingly written. Women pastors who are married to male pastors do indeed have their paychecks added to their husbands check. For reference, read [this article](http://www.caringmagazine.org/the-equality-paradox/), the relevant quote is > > In the Army’s case, the agreement for compensation is that...
**This statement is completely untrue.** The easiest way to refute it is that many Salvation Army officers (as their pastors are called) are single women. [Here is a particularly prominent example](https://en.wikipedia.org/wiki/Linda_Bond), but there are many others. In fact the Salvation Army is one of the more egal...
23,421,044
Driving me crazy but here goes: ``` $cat=2,3,4 $test = print_r(explode(',', $cat), true); echo ''.$test.''; foreach ($test as $key => $val) { echo "$key => $val <br>"; } ``` What I'm hoping to get: ``` 2 3 4 ``` I'm trying to use a string of numbers obtained from another code to build an array, and then show each...
2014/05/02
[ "https://Stackoverflow.com/questions/23421044", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3424594/" ]
add `@Test` above your minusTest method also. It looks like ``` @Test public void testMinus() { class1 calc = new class1(); int expected = 0; int actual = class1.add(12, 4); assertEquals("subtracting 4 from 12", expected, actual); } ```
` ``` @Test public void testMinus() { class1 calc = new class1(); int expected = 0; int actual = calc.add(12, 4); // Issue with current implementation, method should be called with instance of a class. assertEquals("subtracting 4 from 12", expected, actual); } ``` ` All Junit tests should be annota...
4,342,517
I have three tables in SQL Server 2008 R2: `Country` `Address` and `Country_Address` --- `Country` has columns: `CountryID` `Country` 1, Afghanistan 2, Australia --- `Address` has columns: `AddressID` `Address` 1, 5 Smith Way --- `Country_Address` has columns: `CountryID` `AddressID` 1, 1 **edit**: so in ...
2010/12/03
[ "https://Stackoverflow.com/questions/4342517", "https://Stackoverflow.com", "https://Stackoverflow.com/users/212639/" ]
The problem is that when you try to update the primary key value in the Countries table, the Country\_Address table would then contain an invalid reference back to the Countries table. If you want to update the keys like this, the easiest way is to enable what are called cascading updates. You do this when creating th...
In SQL server, Tools tab -> Options-> Designer -> unselect the Prevent from making changes option. Then can directly edit table. If after adding row data, get error "no row was updated". Then select "New Query" then write insert query for a particular table. That's it It worked for me ,hope it might help
13,971
I am a graduate student and I receive a stipend that pays my living expenses, through a national fellowship that I was awarded. The fellowship never withholds taxes of any kind, and so I have been making quarterly estimated payments throughout the year. This is the second year of paying taxes with this fellowship, so I...
2012/03/13
[ "https://money.stackexchange.com/questions/13971", "https://money.stackexchange.com", "https://money.stackexchange.com/users/-1/" ]
according to this [presentation](http://www.aktcpa.com/assets/blogger/ohsu-phd-presentation-combined.pdf) (page 13) The current ruling is that you DO NOT have to pay the SE taxes. Here is a [link](http://www.irs.gov/pub/irs-wd/0113020.pdf) to the actual IRS ruling. I would suggest manually entering the amount in the...
The instructions for Form 1040 Line 7 say that you should include: > > Scholarship and fellowship grants not reported on Form W-2. Also, > enter “SCH” and the amount on the dotted line next to line 7. However, > if you were a degree candidate, include on line 7 only the amounts > you used for expenses other than t...
633,735
So I have this: $$A\vee (B\wedge C)\\ B\to D\\ C\to E\\ D\wedge E\to F\\ \sim A$$ $$--------$$ $$\therefore F $$ I know some rules like $p\to q \wedge q \therefore q$ but confused where to start?
2014/01/10
[ "https://math.stackexchange.com/questions/633735", "https://math.stackexchange.com", "https://math.stackexchange.com/users/10178/" ]
Yes, the deduction is correct, and here's why: You have the statements $A \vee (B \wedge C)$ and $\sim A$, which both have to be true. That means that $A$ is false, and that $B \wedge C$ is true. In order for $B \wedge C$ to be true, both $B$ and $C$ need to be true. As you can see [here](http://en.wikipedia.org/wiki...
**Hint**: Work backwards. You are trying to conclude $F$, and the only premise you have that mentions $F$ is the fourth one, $D\land E\to F$, so the last step in the proof must be to conclude $F$ from $D\land E \to F$, via the rule that says that you can conclude $z$ from $y\to z$ and $y$. You have $D\land E\to F$, so...
633,735
So I have this: $$A\vee (B\wedge C)\\ B\to D\\ C\to E\\ D\wedge E\to F\\ \sim A$$ $$--------$$ $$\therefore F $$ I know some rules like $p\to q \wedge q \therefore q$ but confused where to start?
2014/01/10
[ "https://math.stackexchange.com/questions/633735", "https://math.stackexchange.com", "https://math.stackexchange.com/users/10178/" ]
First of all, let's be clear in our vocabulary. Logically, an argument itself is not true or untrue: its premises and conclusions can be true or false, but being true or false is not a property of an argument. A deductive argument is either ***valid***, or else not valid (invalid). An argument form is *valid* if and ...
**Hint**: Work backwards. You are trying to conclude $F$, and the only premise you have that mentions $F$ is the fourth one, $D\land E\to F$, so the last step in the proof must be to conclude $F$ from $D\land E \to F$, via the rule that says that you can conclude $z$ from $y\to z$ and $y$. You have $D\land E\to F$, so...
633,735
So I have this: $$A\vee (B\wedge C)\\ B\to D\\ C\to E\\ D\wedge E\to F\\ \sim A$$ $$--------$$ $$\therefore F $$ I know some rules like $p\to q \wedge q \therefore q$ but confused where to start?
2014/01/10
[ "https://math.stackexchange.com/questions/633735", "https://math.stackexchange.com", "https://math.stackexchange.com/users/10178/" ]
Yes, the deduction is correct, and here's why: You have the statements $A \vee (B \wedge C)$ and $\sim A$, which both have to be true. That means that $A$ is false, and that $B \wedge C$ is true. In order for $B \wedge C$ to be true, both $B$ and $C$ need to be true. As you can see [here](http://en.wikipedia.org/wiki...
Since $\neg A$ and $A\vee (B\wedge C)$, we have $B\wedge C$ so $B$ and $C$ hold. Now $B$ and $B\to D$ give $D$ whereas $C$ and $C\to E$ give $E$. Thus we have $D\wedge E$, but then $(D\wedge E)\to F$ gives $F$.
633,735
So I have this: $$A\vee (B\wedge C)\\ B\to D\\ C\to E\\ D\wedge E\to F\\ \sim A$$ $$--------$$ $$\therefore F $$ I know some rules like $p\to q \wedge q \therefore q$ but confused where to start?
2014/01/10
[ "https://math.stackexchange.com/questions/633735", "https://math.stackexchange.com", "https://math.stackexchange.com/users/10178/" ]
Yes, the deduction is correct, and here's why: You have the statements $A \vee (B \wedge C)$ and $\sim A$, which both have to be true. That means that $A$ is false, and that $B \wedge C$ is true. In order for $B \wedge C$ to be true, both $B$ and $C$ need to be true. As you can see [here](http://en.wikipedia.org/wiki...
If we use Natural Deduction rules, we can formalise amWhy's derivation as follows (we have 5 assumptions) : *1)* assume : $\lnot A \rightarrow (B \land C)$ that is equivalent to : $A \lor (B \land C)$ --- Ass n°1 *2)* assume : $\lnot A$ --- Ass n°5 *3)* deduce $(B \land C)$ from 1) and 2) by $\rightarrow$-elim *4)*...
633,735
So I have this: $$A\vee (B\wedge C)\\ B\to D\\ C\to E\\ D\wedge E\to F\\ \sim A$$ $$--------$$ $$\therefore F $$ I know some rules like $p\to q \wedge q \therefore q$ but confused where to start?
2014/01/10
[ "https://math.stackexchange.com/questions/633735", "https://math.stackexchange.com", "https://math.stackexchange.com/users/10178/" ]
First of all, let's be clear in our vocabulary. Logically, an argument itself is not true or untrue: its premises and conclusions can be true or false, but being true or false is not a property of an argument. A deductive argument is either ***valid***, or else not valid (invalid). An argument form is *valid* if and ...
Since $\neg A$ and $A\vee (B\wedge C)$, we have $B\wedge C$ so $B$ and $C$ hold. Now $B$ and $B\to D$ give $D$ whereas $C$ and $C\to E$ give $E$. Thus we have $D\wedge E$, but then $(D\wedge E)\to F$ gives $F$.
633,735
So I have this: $$A\vee (B\wedge C)\\ B\to D\\ C\to E\\ D\wedge E\to F\\ \sim A$$ $$--------$$ $$\therefore F $$ I know some rules like $p\to q \wedge q \therefore q$ but confused where to start?
2014/01/10
[ "https://math.stackexchange.com/questions/633735", "https://math.stackexchange.com", "https://math.stackexchange.com/users/10178/" ]
First of all, let's be clear in our vocabulary. Logically, an argument itself is not true or untrue: its premises and conclusions can be true or false, but being true or false is not a property of an argument. A deductive argument is either ***valid***, or else not valid (invalid). An argument form is *valid* if and ...
If we use Natural Deduction rules, we can formalise amWhy's derivation as follows (we have 5 assumptions) : *1)* assume : $\lnot A \rightarrow (B \land C)$ that is equivalent to : $A \lor (B \land C)$ --- Ass n°1 *2)* assume : $\lnot A$ --- Ass n°5 *3)* deduce $(B \land C)$ from 1) and 2) by $\rightarrow$-elim *4)*...
2,771
Recently I watched the [bcl](/questions/tagged/bcl "show questions tagged 'bcl'") tag disappear in one fell swoop (over a period of 3-4 hours). While there were only around 120 questions so tagged, it was a fairly valid tag when referring to the .NET Framework Base Class Library. There's even a team at MS specifically ...
2009/07/06
[ "https://meta.stackexchange.com/questions/2771", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/419/" ]
In the case of anything major, **Yes** In particular, we (♦ moderators) [can now do batch retags](https://meta.stackexchange.com/questions/354/batch-retagging/2595#2595): * saving lots of your time * **with community agreement** (probably the biggest point you were trying to make) * avoiding lots of updates that bloc...
I would have to wonder what good it would do putting it up for a community vote. If it is a niche tag, are you sure there are going to be enough people who would advocate for it remaining up against a larger number of people potentially ignorant of the possible implications?
2,771
Recently I watched the [bcl](/questions/tagged/bcl "show questions tagged 'bcl'") tag disappear in one fell swoop (over a period of 3-4 hours). While there were only around 120 questions so tagged, it was a fairly valid tag when referring to the .NET Framework Base Class Library. There's even a team at MS specifically ...
2009/07/06
[ "https://meta.stackexchange.com/questions/2771", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/419/" ]
The BCL tag was used to describe the .NET framework. It was used incorrectly as a duplicate of .NET. There is no value added by referring to .NET as the BCL interchangeably. It should also be pointed out that the process is already throttled thanks to the horrible captcha system we have in place. At least with indiv...
I would have to wonder what good it would do putting it up for a community vote. If it is a niche tag, are you sure there are going to be enough people who would advocate for it remaining up against a larger number of people potentially ignorant of the possible implications?
2,771
Recently I watched the [bcl](/questions/tagged/bcl "show questions tagged 'bcl'") tag disappear in one fell swoop (over a period of 3-4 hours). While there were only around 120 questions so tagged, it was a fairly valid tag when referring to the .NET Framework Base Class Library. There's even a team at MS specifically ...
2009/07/06
[ "https://meta.stackexchange.com/questions/2771", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/419/" ]
I would definitely like to see a community vote for mass tag merging. I would also like it if regular users (with more rep than ~1000) could suggest tags to be merged for normal users. There are many tags that should be merged that I think the moderators just don't have time to look for (for example `datastructures` an...
I would have to wonder what good it would do putting it up for a community vote. If it is a niche tag, are you sure there are going to be enough people who would advocate for it remaining up against a larger number of people potentially ignorant of the possible implications?
2,771
Recently I watched the [bcl](/questions/tagged/bcl "show questions tagged 'bcl'") tag disappear in one fell swoop (over a period of 3-4 hours). While there were only around 120 questions so tagged, it was a fairly valid tag when referring to the .NET Framework Base Class Library. There's even a team at MS specifically ...
2009/07/06
[ "https://meta.stackexchange.com/questions/2771", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/419/" ]
If `bcl` referred to the .NET Base Class Library then it should really have the tag `.net-bcl`. If I came upon something tagged `bcl`, I would have no idea what it was referring to. If instead it was tagged `.net-bcl`, at least I would be able to determine that it is related to `.net`.
I would have to wonder what good it would do putting it up for a community vote. If it is a niche tag, are you sure there are going to be enough people who would advocate for it remaining up against a larger number of people potentially ignorant of the possible implications?
2,771
Recently I watched the [bcl](/questions/tagged/bcl "show questions tagged 'bcl'") tag disappear in one fell swoop (over a period of 3-4 hours). While there were only around 120 questions so tagged, it was a fairly valid tag when referring to the .NET Framework Base Class Library. There's even a team at MS specifically ...
2009/07/06
[ "https://meta.stackexchange.com/questions/2771", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/419/" ]
In the case of anything major, **Yes** In particular, we (♦ moderators) [can now do batch retags](https://meta.stackexchange.com/questions/354/batch-retagging/2595#2595): * saving lots of your time * **with community agreement** (probably the biggest point you were trying to make) * avoiding lots of updates that bloc...
The BCL tag was used to describe the .NET framework. It was used incorrectly as a duplicate of .NET. There is no value added by referring to .NET as the BCL interchangeably. It should also be pointed out that the process is already throttled thanks to the horrible captcha system we have in place. At least with indiv...
2,771
Recently I watched the [bcl](/questions/tagged/bcl "show questions tagged 'bcl'") tag disappear in one fell swoop (over a period of 3-4 hours). While there were only around 120 questions so tagged, it was a fairly valid tag when referring to the .NET Framework Base Class Library. There's even a team at MS specifically ...
2009/07/06
[ "https://meta.stackexchange.com/questions/2771", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/419/" ]
In the case of anything major, **Yes** In particular, we (♦ moderators) [can now do batch retags](https://meta.stackexchange.com/questions/354/batch-retagging/2595#2595): * saving lots of your time * **with community agreement** (probably the biggest point you were trying to make) * avoiding lots of updates that bloc...
I would definitely like to see a community vote for mass tag merging. I would also like it if regular users (with more rep than ~1000) could suggest tags to be merged for normal users. There are many tags that should be merged that I think the moderators just don't have time to look for (for example `datastructures` an...
2,771
Recently I watched the [bcl](/questions/tagged/bcl "show questions tagged 'bcl'") tag disappear in one fell swoop (over a period of 3-4 hours). While there were only around 120 questions so tagged, it was a fairly valid tag when referring to the .NET Framework Base Class Library. There's even a team at MS specifically ...
2009/07/06
[ "https://meta.stackexchange.com/questions/2771", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/419/" ]
In the case of anything major, **Yes** In particular, we (♦ moderators) [can now do batch retags](https://meta.stackexchange.com/questions/354/batch-retagging/2595#2595): * saving lots of your time * **with community agreement** (probably the biggest point you were trying to make) * avoiding lots of updates that bloc...
If `bcl` referred to the .NET Base Class Library then it should really have the tag `.net-bcl`. If I came upon something tagged `bcl`, I would have no idea what it was referring to. If instead it was tagged `.net-bcl`, at least I would be able to determine that it is related to `.net`.
2,771
Recently I watched the [bcl](/questions/tagged/bcl "show questions tagged 'bcl'") tag disappear in one fell swoop (over a period of 3-4 hours). While there were only around 120 questions so tagged, it was a fairly valid tag when referring to the .NET Framework Base Class Library. There's even a team at MS specifically ...
2009/07/06
[ "https://meta.stackexchange.com/questions/2771", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/419/" ]
The BCL tag was used to describe the .NET framework. It was used incorrectly as a duplicate of .NET. There is no value added by referring to .NET as the BCL interchangeably. It should also be pointed out that the process is already throttled thanks to the horrible captcha system we have in place. At least with indiv...
I would definitely like to see a community vote for mass tag merging. I would also like it if regular users (with more rep than ~1000) could suggest tags to be merged for normal users. There are many tags that should be merged that I think the moderators just don't have time to look for (for example `datastructures` an...
2,771
Recently I watched the [bcl](/questions/tagged/bcl "show questions tagged 'bcl'") tag disappear in one fell swoop (over a period of 3-4 hours). While there were only around 120 questions so tagged, it was a fairly valid tag when referring to the .NET Framework Base Class Library. There's even a team at MS specifically ...
2009/07/06
[ "https://meta.stackexchange.com/questions/2771", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/419/" ]
If `bcl` referred to the .NET Base Class Library then it should really have the tag `.net-bcl`. If I came upon something tagged `bcl`, I would have no idea what it was referring to. If instead it was tagged `.net-bcl`, at least I would be able to determine that it is related to `.net`.
I would definitely like to see a community vote for mass tag merging. I would also like it if regular users (with more rep than ~1000) could suggest tags to be merged for normal users. There are many tags that should be merged that I think the moderators just don't have time to look for (for example `datastructures` an...
32,743,293
Countless GSL functions return their result as a pointer in their first argument. For instance > > int gsl\_matrix\_get\_col (gsl\_vector \* v, const gsl\_matrix \* m, size\_t j) > > > My programming level is very low, but I was told such things were impossible with local variables (deleted on end of function), b...
2015/09/23
[ "https://Stackoverflow.com/questions/32743293", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1816316/" ]
I sum up what you do with the parameter `rescos` in your `fetch_eigenvalue` function: ``` double fetch_eigenvalue(gsl_matrix *M, gsl_vector *v, double *rescos) { double cos; // some code rescos = &cos; // some code return(result); } ``` Here you're not modifying the double value pointed by `resco...
I suspect that this is because the statement `rescos = &cos;` saves into `rescos` the address of the local variable `cos`. However, the scope of this variable is only local so that you can not then use it in the `main()`. I guess what you want to do is to: 1. change `rescos = &cos;` to `*rescos = cos;` in the `fetch_e...
32,743,293
Countless GSL functions return their result as a pointer in their first argument. For instance > > int gsl\_matrix\_get\_col (gsl\_vector \* v, const gsl\_matrix \* m, size\_t j) > > > My programming level is very low, but I was told such things were impossible with local variables (deleted on end of function), b...
2015/09/23
[ "https://Stackoverflow.com/questions/32743293", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1816316/" ]
I sum up what you do with the parameter `rescos` in your `fetch_eigenvalue` function: ``` double fetch_eigenvalue(gsl_matrix *M, gsl_vector *v, double *rescos) { double cos; // some code rescos = &cos; // some code return(result); } ``` Here you're not modifying the double value pointed by `resco...
I don't know anything about GSL, but it appears to be a library that uses C-style interface. To set values from a function, they use pointers. You don't seem to know how to use such an API yet, so here's some hints. The statements ``` double *outcos = (double*)malloc(sizeof(double) ); ... fetch_eigenvalue(unit_matri...
32,743,293
Countless GSL functions return their result as a pointer in their first argument. For instance > > int gsl\_matrix\_get\_col (gsl\_vector \* v, const gsl\_matrix \* m, size\_t j) > > > My programming level is very low, but I was told such things were impossible with local variables (deleted on end of function), b...
2015/09/23
[ "https://Stackoverflow.com/questions/32743293", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1816316/" ]
I suspect that this is because the statement `rescos = &cos;` saves into `rescos` the address of the local variable `cos`. However, the scope of this variable is only local so that you can not then use it in the `main()`. I guess what you want to do is to: 1. change `rescos = &cos;` to `*rescos = cos;` in the `fetch_e...
I don't know anything about GSL, but it appears to be a library that uses C-style interface. To set values from a function, they use pointers. You don't seem to know how to use such an API yet, so here's some hints. The statements ``` double *outcos = (double*)malloc(sizeof(double) ); ... fetch_eigenvalue(unit_matri...
32,733,085
I have a JSON file with 3 objects that I need to parse into certain elements on a widget, but I am not sure what's the best method to do that. Could somebody help me find a method? HTML: ``` <div class="widget style1" style="background-color: #F59C1A!important; color: #FFF"> <div class="row"> <div class="col-xs-...
2015/09/23
[ "https://Stackoverflow.com/questions/32733085", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4637417/" ]
Can you double check the Json returned. It looks like the service is returning a list of objects, each with the 3 properties. so the Json would have 1 object in the array with 3 properties. ``` [{"DailyChange":1124.60, "ThisYearChange":435.60, "FutureYearsChange":680.00}] ``` So all 3 properties can be found at inde...
Use something like this: ``` $('#ThisYearChange').html(json[1].ThisYearChange); ```
32,733,085
I have a JSON file with 3 objects that I need to parse into certain elements on a widget, but I am not sure what's the best method to do that. Could somebody help me find a method? HTML: ``` <div class="widget style1" style="background-color: #F59C1A!important; color: #FFF"> <div class="row"> <div class="col-xs-...
2015/09/23
[ "https://Stackoverflow.com/questions/32733085", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4637417/" ]
Can you double check the Json returned. It looks like the service is returning a list of objects, each with the 3 properties. so the Json would have 1 object in the array with 3 properties. ``` [{"DailyChange":1124.60, "ThisYearChange":435.60, "FutureYearsChange":680.00}] ``` So all 3 properties can be found at inde...
you can use JSON.parse() method which parses json in to the objet then easily data can be shown. Below is a sample code : ``` function AppendValues(jsonstring // this will be having json string) { var parsedObject = JSON.parse(jsonstring ); $("#ThisYearChange").val(parsedObject.ThisYearChange); } ```
32,733,085
I have a JSON file with 3 objects that I need to parse into certain elements on a widget, but I am not sure what's the best method to do that. Could somebody help me find a method? HTML: ``` <div class="widget style1" style="background-color: #F59C1A!important; color: #FFF"> <div class="row"> <div class="col-xs-...
2015/09/23
[ "https://Stackoverflow.com/questions/32733085", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4637417/" ]
Can you double check the Json returned. It looks like the service is returning a list of objects, each with the 3 properties. so the Json would have 1 object in the array with 3 properties. ``` [{"DailyChange":1124.60, "ThisYearChange":435.60, "FutureYearsChange":680.00}] ``` So all 3 properties can be found at inde...
Try this method ``` function ParseJson(jsonValue) { var parsedJson = JSON.parse(jsonValue); $('#DailyChange').text(parsedJson[0].DailyChange); $('#ThisYearChange').text(parsedJson[1].ThisYearChange); $('#FutureYearsChange').text(parsedJson[2].FutureYearsChange); } ```
32,733,085
I have a JSON file with 3 objects that I need to parse into certain elements on a widget, but I am not sure what's the best method to do that. Could somebody help me find a method? HTML: ``` <div class="widget style1" style="background-color: #F59C1A!important; color: #FFF"> <div class="row"> <div class="col-xs-...
2015/09/23
[ "https://Stackoverflow.com/questions/32733085", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4637417/" ]
Can you double check the Json returned. It looks like the service is returning a list of objects, each with the 3 properties. so the Json would have 1 object in the array with 3 properties. ``` [{"DailyChange":1124.60, "ThisYearChange":435.60, "FutureYearsChange":680.00}] ``` So all 3 properties can be found at inde...
try this: ``` var data = jQuery.parseJSON(data); $.each(data, function(i,v){ $.each(v,function(k,z){ $('#'+k).html(z); }); }); ```
343,896
While easy on Linux, not as easy on Windows from what I've been able to gather so far. I've found the command that kinda does what I want which is: ``` net user username /domain ``` However I wish to strip all of the data except for the list of the groups. I think findstr may be the answer but I'm not sure of how to...
2011/10/07
[ "https://superuser.com/questions/343896", "https://superuser.com", "https://superuser.com/users/100387/" ]
``` dsquery user -name "My Full Name" | dsget user -memberof | dsget group -samid ``` I found this pretty much gives me what I was looking for, in case anyone was curious! :)
Hmm. ``` net user paul /domain | find "Global Group memberships" ``` Will give you the the groups, but if you don't want the header you'd need something more involved: ``` for /f "tokens=4*" %f in ('net user paul /domain ^| find "Global Group memberships"') do echo %f ``` So %f contains the groups.
343,896
While easy on Linux, not as easy on Windows from what I've been able to gather so far. I've found the command that kinda does what I want which is: ``` net user username /domain ``` However I wish to strip all of the data except for the list of the groups. I think findstr may be the answer but I'm not sure of how to...
2011/10/07
[ "https://superuser.com/questions/343896", "https://superuser.com", "https://superuser.com/users/100387/" ]
``` dsquery user -name "My Full Name" | dsget user -memberof | dsget group -samid ``` I found this pretty much gives me what I was looking for, in case anyone was curious! :)
Use PowerShell! ``` $user = [wmi] "Win32_UserAccount.Name='JohnDoe',Domain='YourDomainName'" $user.GetRelated('Win32_Group') ``` or only for group names: ``` $user = [wmi] "Win32_UserAccount.Name='JohnDoe',Domain='YourDomainName'" $user.GetRelated('Win32_Group') | Select Name ``` <http://social.technet.microsoft....
1,176,504
> > Let $f: \Bbb[a,b]\rightarrow\Bbb{R}$ be differentiable in a point $a<x\_0<b$. Use Taylor's expansion with the remainder of $f$ around $x\_0$ to show that if $ x\_n\rightarrow\ x\_0^{-}$, and $ y\_n\rightarrow\ x\_0^{+}$ then: > $$ \lim \limits\_{n \to \infty} \frac{f(y\_n)-f(x\_n)}{y\_n-x\_n} = f^\prime(x\_0)$$ ...
2015/03/05
[ "https://math.stackexchange.com/questions/1176504", "https://math.stackexchange.com", "https://math.stackexchange.com/users/179152/" ]
A nice exercise in Rudin's Principles of Mathematical Analysis (Exercise 5.19) states that, if $\alpha\_n \to 0$ and $\beta\_n \to 0$, then $$ D\_n = \frac{f(\beta\_n)-f(\alpha\_n)}{\beta\_n-\alpha\_n} $$ converges to $f'(0)$ under each of the following assumptions: 1. $\alpha\_n < 0 <\beta\_n$; 2. $0<\alpha\_n<\beta...
You need to use an estimate for the remainder. For exemple $$R\_1(x) = (x-x\_0)\epsilon(x)$$ with $$\lim\_{x\to x\_0}\epsilon(x) = 0$$ Or in other words, $R\_1(x) = o(x-x\_0)$
51,496,129
I am trying to access auth()->user() in controller constructor, but it always return `null`. I have tried below, but no luck! ``` protected $user; function __construct() { $this->middleware(function ($request, $next) { $this->user = auth()->user(); return $next($request); }); } ``` Is th...
2018/07/24
[ "https://Stackoverflow.com/questions/51496129", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8749929/" ]
Controller Constructor is called before Middlewares. So you can not get User information inside Constructor(). My advice is create private function that sets User, and call this inside your functions.
I think that auth middleware run after create controller, you may do somethink like this in your controller ``` public function callAction($method, $parameters) { $this->middleware(function ($request, $next) { $this->user = auth()->user(); return $next($request); }); return parent::callAct...
51,496,129
I am trying to access auth()->user() in controller constructor, but it always return `null`. I have tried below, but no luck! ``` protected $user; function __construct() { $this->middleware(function ($request, $next) { $this->user = auth()->user(); return $next($request); }); } ``` Is th...
2018/07/24
[ "https://Stackoverflow.com/questions/51496129", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8749929/" ]
Thanks to @Ts8060 i had the idea to create a singleton for doing that. ``` /** @var User */ private static $user; /** * Singleton * * @return User */ public function getUser() { if(empty(static::$user)) { static::$user = Auth::user(); } return static::$user; } ```
I think that auth middleware run after create controller, you may do somethink like this in your controller ``` public function callAction($method, $parameters) { $this->middleware(function ($request, $next) { $this->user = auth()->user(); return $next($request); }); return parent::callAct...
51,496,129
I am trying to access auth()->user() in controller constructor, but it always return `null`. I have tried below, but no luck! ``` protected $user; function __construct() { $this->middleware(function ($request, $next) { $this->user = auth()->user(); return $next($request); }); } ``` Is th...
2018/07/24
[ "https://Stackoverflow.com/questions/51496129", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8749929/" ]
Controller Constructor is called before Middlewares. So you can not get User information inside Constructor(). My advice is create private function that sets User, and call this inside your functions.
Thanks to @Ts8060 i had the idea to create a singleton for doing that. ``` /** @var User */ private static $user; /** * Singleton * * @return User */ public function getUser() { if(empty(static::$user)) { static::$user = Auth::user(); } return static::$user; } ```
155,265
Now I understood that my questions must have a value for future users, it was my fault. I didn't know that deleting questions indicates that the material posted isn't right for Stack Overflow. Now I want to undelete my question and edit it in a manner that help future users, but I don't know how to undelete it. Also...
2012/11/10
[ "https://meta.stackexchange.com/questions/155265", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/201723/" ]
The easiest way to do it is to flag one of your existing questions for moderator attention: ![Flag example](https://i.stack.imgur.com/AcjWw.png) Then click "other" and in the description, explain the situation: ![Selecting other](https://i.stack.imgur.com/EurcE.png) Obviously if you know the specific questions you ...
I've undeleted your two recent self-deleted questions: * <https://stackoverflow.com/questions/12800498/comparison-between-threading-aspects> * <https://stackoverflow.com/questions/12627283/qt-export-dll-in-visual-studio-2010> The other deleted question you had was closed and deleted by members of the community, so I ...
155,265
Now I understood that my questions must have a value for future users, it was my fault. I didn't know that deleting questions indicates that the material posted isn't right for Stack Overflow. Now I want to undelete my question and edit it in a manner that help future users, but I don't know how to undelete it. Also...
2012/11/10
[ "https://meta.stackexchange.com/questions/155265", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/201723/" ]
~~You find the questions which you think that can be improved (As in, improved enough to gain upvotes and be reopened), those questions should be flagged for moderator attention stating you want to "undelete this question for improvement".~~ As @Bo correctly noted, it's impossible to find your deleted questions. In th...
I've undeleted your two recent self-deleted questions: * <https://stackoverflow.com/questions/12800498/comparison-between-threading-aspects> * <https://stackoverflow.com/questions/12627283/qt-export-dll-in-visual-studio-2010> The other deleted question you had was closed and deleted by members of the community, so I ...
31,746,718
In Haxe, it is possible to get the class of an object with the following function: ``` Type.getClass(myObject); ``` If the object `myObject` is an instance of the class `myClass`, which contains a static field, I should be able to access this static field: ``` class MyClass { public static myStaticField:Int = 5...
2015/07/31
[ "https://Stackoverflow.com/questions/31746718", "https://Stackoverflow.com", "https://Stackoverflow.com/users/295608/" ]
You need to use reflection to get such value: ``` class Test { @:keep public static var value = 5; static function main() { var test = new Test(); var v = Reflect.field(Type.getClass(test), "value"); trace(v); } public function new() {} } ``` Note that to prevent DCE (de...
Try the Reflect class (Specifically the [callMethod](http://api.haxe.org/Reflect.html#callMethod) or getProperty functions).
44,224,814
I am using mdl-checkbox and a text on the right side of the checkbox. I would like to switch the order of these two components in case of RTL languages (text to the left of the checkbox) but I can't move the text to the left (it is always on the right). I tried many variations of "dir=rtl", direction:rtl, align, etc.....
2017/05/28
[ "https://Stackoverflow.com/questions/44224814", "https://Stackoverflow.com", "https://Stackoverflow.com/users/632169/" ]
Please check the links given below. These might help you creating check boxes. [Github Link](https://github.com/WebRTL/material-design-lite-rtl): I have not used but you can check it. May this one also helps you. [RTL CDN for MDL](http://rtlcss.com/cdn/css-frameworks/material-design-lite/) : I have created snippet us...
After making diff with material.rtl.min.css with material.min.css I found that the following CSS solve the problem: ``` .mdl-radio.is-upgraded, .mdl-checkbox.is-upgraded{padding-right:24px} .mdl-radio__outer-circle, .mdl-checkbox__box-outline{right:0;} .mdl-radio__inner-circle {right:4px;} .mdl-radio__ripple-container...
23,409,034
I have a listview and in the listview `Update` commmand I am attempting to set the parameters defined in my `SqlDataSource UpdateParameters` property. When `Update` command fires, I recieve an error message stating > > Procedure or function 'MyStoredProcedure' expects parameter '@ReturnResult', which was not supplie...
2014/05/01
[ "https://Stackoverflow.com/questions/23409034", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2060136/" ]
Finally solved this. It turns out It was reproducible outside of spring and so wasn't a problem with the transaction manager. What Hibernate was doing if you look at the debugging logs is, firstly, creating a Cartesian Product of successive left outer joins from each Entity table and Join Table, like this ``` select...
Use `java.util.Set` instead of `java.util.List` for your collections and make sure that you have correctly implemented `equals` and `hashCode` for each entity bean.
29,599,313
I hope someone could help me with the following. If a user checks checkbox1 then a border (border: 1px solid green;) is added to the DIV SmallSquarePhoto using pure CSS or a combination of CSS and jQuery. Otherwise checkbox1 has a transparent color (border: 4px solid transparent;). Any help would be appreciated...Tha...
2015/04/13
[ "https://Stackoverflow.com/questions/29599313", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2822465/" ]
JS ``` $('#checkbox1').on('click', function () { $('#SmallSquarePhoto').toggleClass('green-border', $(this).is(':checked')); }); ``` CSS ``` .green-border{ border: 1px solid green; } #SmallSquarePhoto #checkbox1 { border: 4px solid transparent; } #SmallSquarePhoto.green-border { border: 1px solid gre...
On clicking check box adding border, [Demo](http://jsfiddle.net/stanze/fpo11Lts/1/) ``` $('#checkbox1').click(function(){ $('#SmallSquarePhoto').toggleClass('green-border'); }); ```
66,194,128
Only works with some numbers but is not working when i try to insert 3-10 for example. i don't know what is wrong. I'm still learning Javascript. Sorry for my bad english. Thank You ```js let btn = document.getElementById("btn") let msg = document.getElementById("avvisi") btn.addEventListener("click", () => { let ...
2021/02/14
[ "https://Stackoverflow.com/questions/66194128", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15207232/" ]
You need to convert the strings from the input to a number. The shortest way is to use an [unary plus `+`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Arithmetic_Operators#Unary_plus) in front of the expression. ```js let btn = document.getElementById("btn"); let msg = document.getEleme...
`primo` and `secondo` are strings because they came from an input. So when you set `i` to primo `i` is also a string. When comparing "3" to "10", "3" is bigger than "10" because of their unicode values and it skips the loop because `i <= secondo` is false in this case. Doing `i*i` can only work with numbers so javascri...
53,460,879
How would I be able to create a button that works similarly to the add phone button in the contacts app? As shown below, to replicate it, I have a button on the right side that the type is *Add Contact* (appears as a plus in a circle) and on the right is a label. I then put them together in a stack view. How does the ...
2018/11/24
[ "https://Stackoverflow.com/questions/53460879", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6675801/" ]
Your store setup seems incorrect. Write your store as: ``` import { createStore, applyMiddleware, compose } from 'redux'; import thunk from 'redux-thunk'; const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose; const store = createStore( authReducer, {}, composeEnhancers( applyMiddl...
Can you try the following snippet in the actions. ``` export function register=()=>{ return { type:'auth_user' } } ```
66,233,741
I am having trouble with the `Numbers[(Numbers<=0).argmax():] = 0` function it is supposed to turn all the elements behind it into zeroes if the condition is met, however if the condition is not met it turns all the array elements into zeroes. How can i fix this issue. If the `Numbers<=0` condition is not met the array...
2021/02/16
[ "https://Stackoverflow.com/questions/66233741", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15217016/" ]
Try these 2 methods, one is in place assignment to the NumPy view and the other creates a fresh array to be assigned to another variable - ``` #Method 1 (Inplace assignment) Numbers[(Numbers<=0).cumsum(dtype=bool)] = 0 ``` *Or,* ``` #Method 2 (Not inplace) np.where(~(Numbers<=0).cumsum(dtype=bool), Numbers, 0) ```...
Just use an `if` for this, it represents the intention quite well, and is easy to understand: ``` smaller_equal_zero = Numbers <= 0 if smaller_equal_zero.any(): Numbers[smaller_equal_zero.argmax():] = 0 ``` With Python 3.8+ you can use an assignment expression in the `if`: ``` if (smaller_equal_zero := Numbers ...
7,207,646
I'm using the following jQuery script to highlight a table row on mouseover. ``` input.find("tr").live('mouseover mouseout', function (event) { if (event.type == 'mouseover') { $(this).children("td").addClass("ui-state-hover-light"); } else { $(this).children("td").removeClass("ui-state-hover-l...
2011/08/26
[ "https://Stackoverflow.com/questions/7207646", "https://Stackoverflow.com", "https://Stackoverflow.com/users/489213/" ]
It looks like your state definition is off. Your code is defining an either or based upon its focus, but there is third state where no cell has the focus. I'd a function that only got executed on mouseover. Let it find the hightlighted cell, similar to what you did, only by class, then change that cells class and then...
Try `mouseenter` and `mouseleave` instead of `mouseover` and `mouseout`
7,207,646
I'm using the following jQuery script to highlight a table row on mouseover. ``` input.find("tr").live('mouseover mouseout', function (event) { if (event.type == 'mouseover') { $(this).children("td").addClass("ui-state-hover-light"); } else { $(this).children("td").removeClass("ui-state-hover-l...
2011/08/26
[ "https://Stackoverflow.com/questions/7207646", "https://Stackoverflow.com", "https://Stackoverflow.com/users/489213/" ]
Following Mindfulgeek's advice the solution below solves the problem. ``` input.find("tbody tr").live('mouseenter', function (event) { // Remove highlighting from any other row $(this).siblings("tr.ui-state-hover-light").removeClass("ui-state-hover-light"); // Highlight the row with focus ...
Try `mouseenter` and `mouseleave` instead of `mouseover` and `mouseout`
7,207,646
I'm using the following jQuery script to highlight a table row on mouseover. ``` input.find("tr").live('mouseover mouseout', function (event) { if (event.type == 'mouseover') { $(this).children("td").addClass("ui-state-hover-light"); } else { $(this).children("td").removeClass("ui-state-hover-l...
2011/08/26
[ "https://Stackoverflow.com/questions/7207646", "https://Stackoverflow.com", "https://Stackoverflow.com/users/489213/" ]
It looks like your state definition is off. Your code is defining an either or based upon its focus, but there is third state where no cell has the focus. I'd a function that only got executed on mouseover. Let it find the hightlighted cell, similar to what you did, only by class, then change that cells class and then...
Following Mindfulgeek's advice the solution below solves the problem. ``` input.find("tbody tr").live('mouseenter', function (event) { // Remove highlighting from any other row $(this).siblings("tr.ui-state-hover-light").removeClass("ui-state-hover-light"); // Highlight the row with focus ...
7,207,646
I'm using the following jQuery script to highlight a table row on mouseover. ``` input.find("tr").live('mouseover mouseout', function (event) { if (event.type == 'mouseover') { $(this).children("td").addClass("ui-state-hover-light"); } else { $(this).children("td").removeClass("ui-state-hover-l...
2011/08/26
[ "https://Stackoverflow.com/questions/7207646", "https://Stackoverflow.com", "https://Stackoverflow.com/users/489213/" ]
It looks like your state definition is off. Your code is defining an either or based upon its focus, but there is third state where no cell has the focus. I'd a function that only got executed on mouseover. Let it find the hightlighted cell, similar to what you did, only by class, then change that cells class and then...
``` $("tbody tr").mouseenter(function (event) { $("td", $(this)).addClass("ui-state-hover-light"); }); $("tbody tr").mouseleave(function (event) { $("td", $(this)).removeClass("ui-state-hover-light"); }); ```
7,207,646
I'm using the following jQuery script to highlight a table row on mouseover. ``` input.find("tr").live('mouseover mouseout', function (event) { if (event.type == 'mouseover') { $(this).children("td").addClass("ui-state-hover-light"); } else { $(this).children("td").removeClass("ui-state-hover-l...
2011/08/26
[ "https://Stackoverflow.com/questions/7207646", "https://Stackoverflow.com", "https://Stackoverflow.com/users/489213/" ]
Following Mindfulgeek's advice the solution below solves the problem. ``` input.find("tbody tr").live('mouseenter', function (event) { // Remove highlighting from any other row $(this).siblings("tr.ui-state-hover-light").removeClass("ui-state-hover-light"); // Highlight the row with focus ...
``` $("tbody tr").mouseenter(function (event) { $("td", $(this)).addClass("ui-state-hover-light"); }); $("tbody tr").mouseleave(function (event) { $("td", $(this)).removeClass("ui-state-hover-light"); }); ```
51,248,467
This is my code: ``` onedata = str("& "C:\Program Files\Windows Media Player\wmplayer.exe"") print (onedata) ``` Im trying to run it but it says: ``` onedata = str("& "C:\Program Files\test.test") ^ SyntaxError: invalid syntax ```
2018/07/09
[ "https://Stackoverflow.com/questions/51248467", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8553534/" ]
You closed the string before you should have. I'm guessing you want the literal `"` in the string, so you need this: ``` onedata = str("& \"C:\\Program Files\\test.test") ``` `\"` makes a literal `"` character. and `\\` makes a literal `\` character. This is so that the compiler doesn't get confused between the lite...
You can escape the second double quotes with `\`. Or you can use single outer quotes: ``` onedata = str('& "C:\Program Files\Windows Media Player\wmplayer.exe"') print(onedata) & "C:\Program Files\Windows Media Player\wmplayer.exe" ```
51,248,467
This is my code: ``` onedata = str("& "C:\Program Files\Windows Media Player\wmplayer.exe"") print (onedata) ``` Im trying to run it but it says: ``` onedata = str("& "C:\Program Files\test.test") ^ SyntaxError: invalid syntax ```
2018/07/09
[ "https://Stackoverflow.com/questions/51248467", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8553534/" ]
You closed the string before you should have. I'm guessing you want the literal `"` in the string, so you need this: ``` onedata = str("& \"C:\\Program Files\\test.test") ``` `\"` makes a literal `"` character. and `\\` makes a literal `\` character. This is so that the compiler doesn't get confused between the lite...
put a back lash behind the second ( " ) to solve it
51,248,467
This is my code: ``` onedata = str("& "C:\Program Files\Windows Media Player\wmplayer.exe"") print (onedata) ``` Im trying to run it but it says: ``` onedata = str("& "C:\Program Files\test.test") ^ SyntaxError: invalid syntax ```
2018/07/09
[ "https://Stackoverflow.com/questions/51248467", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8553534/" ]
You closed the string before you should have. I'm guessing you want the literal `"` in the string, so you need this: ``` onedata = str("& \"C:\\Program Files\\test.test") ``` `\"` makes a literal `"` character. and `\\` makes a literal `\` character. This is so that the compiler doesn't get confused between the lite...
The answers above are excellent, but they don't mention another solution that I personally find easier than using escape characters. In Python, you can use single quotes ('') or double quotes ("") for a string, and if you want to use a double quote inside the string, you can use single quotes to denote your string. Exa...
45,192,420
The following: ``` h = hs.find(h => await(isAvail(h))); ``` Uses the following libraries: ``` const async = require('asyncawait/async'); // async is used in the isAvail function to wrap it const await = require('asyncawait/await'); ``` I can't seem to find a elegant way of doing without an old school for loop arr...
2017/07/19
[ "https://Stackoverflow.com/questions/45192420", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1137669/" ]
As generic post method with data returned, I use. Than You can pass any class, so the request is more gerneric ``` public class Requests { //... public async Task<ResultType> Create<ResultType>(string uri) { //TODO implementation of httpclient POST logic go here var data = await results.Content.ReadAsStringAsyn...
I think you can do like following to have a loosely typed method ``` public static class HttpRequestHelper { public static async Task<T> GetDataModelFromRequestBodyAsync<T>(HttpRequestMessage req) { dynamic requestBody = await req.Content.ReadAsStringAsync(); object blobMode...
45,192,420
The following: ``` h = hs.find(h => await(isAvail(h))); ``` Uses the following libraries: ``` const async = require('asyncawait/async'); // async is used in the isAvail function to wrap it const await = require('asyncawait/await'); ``` I can't seem to find a elegant way of doing without an old school for loop arr...
2017/07/19
[ "https://Stackoverflow.com/questions/45192420", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1137669/" ]
As generic post method with data returned, I use. Than You can pass any class, so the request is more gerneric ``` public class Requests { //... public async Task<ResultType> Create<ResultType>(string uri) { //TODO implementation of httpclient POST logic go here var data = await results.Content.ReadAsStringAsyn...
.NET CLI ``` dotnet new web --name "GenericEndpointExample" cd GenericEndpointExample dotnet add package SingleApi ``` Program.cs: ``` var builder = WebApplication.CreateBuilder(args); var app = builder.Build(); // map generic endpoint app.MapSingleApi("sapi", // add your generic request handler // for e...
58,146
There seems to be two kinds of transposes of a linear mapping: 1. > > If $f: V→W$ is a linear map between vector spaces $V$ and $W$ with > nondegenerate bilinear forms, we define **[the transpose](http://en.wikipedia.org/wiki/Transpose#Transpose_of_linear_maps)** of $f$ > to be > the linear map $^tf : W→V$, determ...
2011/08/17
[ "https://math.stackexchange.com/questions/58146", "https://math.stackexchange.com", "https://math.stackexchange.com/users/1281/" ]
1. Given a bilinear map $H\colon V\times V\to F$, a basis $[v\_1,\ldots,v\_n]$ of $V$ would be orthonormal relative to $H$ if $H(v\_i,v\_j) = 0$ if $i\neq j$ and $H(v\_i,v\_i) = 1$ for each $i$. The transpose of the transformation is defined *in terms* of the bilinear forms. Change the forms, the "transpose" may chan...
If $f:V\to W$ is a linear map between vector spaces $V$ and $W$ with non-degenerate bilinear forms, we define the transpose of $f$ to be the linear map $t\_f:W\to V$, determined by $$B\_V(v,t\_f(w))=B\_W(f(v),w)$$ for all $v\in V$ and $w\in W$. Here, $B\_V$ and $B\_W$ are the bilinear forms on $V$ and $W$ respectively....
3,316,899
Is it possible to do some sort of try catch that will catch warnings? e.g. ``` if (!$dom->loadHTMLFile($url)) { //if cant load file handle error my way } ``` For the `$url` I am using I am getting > > Warning (2): DOMDocument::loadHTMLFile(MYURL) [domdocument.loadhtmlfile]: failed to open stream: HTTP request...
2010/07/23
[ "https://Stackoverflow.com/questions/3316899", "https://Stackoverflow.com", "https://Stackoverflow.com/users/123140/" ]
Probably you are looking for this ``` <?php // error handler function function myErrorHandler($errno, $errstr, $errfile, $errline) { switch ($errno) { case E_USER_ERROR: echo "<b>My ERROR</b> [$errno] $errstr<br />\n"; echo " Fatal error on line $errline in file $errfile"; echo ", PHP ...
You might be able to use a [custom error handler](http://www.php.net/manual/en/function.set-error-handler.php) but I am not completely sure if the warnings you get can be handled. Some errors or warnings will always use the default error handler. But just try it out.
3,316,899
Is it possible to do some sort of try catch that will catch warnings? e.g. ``` if (!$dom->loadHTMLFile($url)) { //if cant load file handle error my way } ``` For the `$url` I am using I am getting > > Warning (2): DOMDocument::loadHTMLFile(MYURL) [domdocument.loadhtmlfile]: failed to open stream: HTTP request...
2010/07/23
[ "https://Stackoverflow.com/questions/3316899", "https://Stackoverflow.com", "https://Stackoverflow.com/users/123140/" ]
You should use [`libxml_use_internal_errors`](http://www.php.net/manual/en/function.libxml-use-internal-errors.php) for this. This example is adapted from the manual: ``` libxml_use_internal_errors(true); $doc = new DOMDocument(); $res = $doc->loadHTMLFile($url); //this may fail and return FALSE! foreach (libxml_get_...
You might be able to use a [custom error handler](http://www.php.net/manual/en/function.set-error-handler.php) but I am not completely sure if the warnings you get can be handled. Some errors or warnings will always use the default error handler. But just try it out.
3,316,899
Is it possible to do some sort of try catch that will catch warnings? e.g. ``` if (!$dom->loadHTMLFile($url)) { //if cant load file handle error my way } ``` For the `$url` I am using I am getting > > Warning (2): DOMDocument::loadHTMLFile(MYURL) [domdocument.loadhtmlfile]: failed to open stream: HTTP request...
2010/07/23
[ "https://Stackoverflow.com/questions/3316899", "https://Stackoverflow.com", "https://Stackoverflow.com/users/123140/" ]
You should use [`libxml_use_internal_errors`](http://www.php.net/manual/en/function.libxml-use-internal-errors.php) for this. This example is adapted from the manual: ``` libxml_use_internal_errors(true); $doc = new DOMDocument(); $res = $doc->loadHTMLFile($url); //this may fail and return FALSE! foreach (libxml_get_...
Probably you are looking for this ``` <?php // error handler function function myErrorHandler($errno, $errstr, $errfile, $errline) { switch ($errno) { case E_USER_ERROR: echo "<b>My ERROR</b> [$errno] $errstr<br />\n"; echo " Fatal error on line $errline in file $errfile"; echo ", PHP ...
3,316,899
Is it possible to do some sort of try catch that will catch warnings? e.g. ``` if (!$dom->loadHTMLFile($url)) { //if cant load file handle error my way } ``` For the `$url` I am using I am getting > > Warning (2): DOMDocument::loadHTMLFile(MYURL) [domdocument.loadhtmlfile]: failed to open stream: HTTP request...
2010/07/23
[ "https://Stackoverflow.com/questions/3316899", "https://Stackoverflow.com", "https://Stackoverflow.com/users/123140/" ]
Probably you are looking for this ``` <?php // error handler function function myErrorHandler($errno, $errstr, $errfile, $errline) { switch ($errno) { case E_USER_ERROR: echo "<b>My ERROR</b> [$errno] $errstr<br />\n"; echo " Fatal error on line $errline in file $errfile"; echo ", PHP ...
I just found a very attractive solution at <http://bytes.com/topic/php/answers/6296-catch-warnings>: First tell PHP to track all errors: ``` ini_set('track_errors', '1'); ``` This puts all error messages (incl. warnings) into the variable `$php_errormsg` (see <http://www.php.net/manual/en/errorfunc.configuration.ph...
3,316,899
Is it possible to do some sort of try catch that will catch warnings? e.g. ``` if (!$dom->loadHTMLFile($url)) { //if cant load file handle error my way } ``` For the `$url` I am using I am getting > > Warning (2): DOMDocument::loadHTMLFile(MYURL) [domdocument.loadhtmlfile]: failed to open stream: HTTP request...
2010/07/23
[ "https://Stackoverflow.com/questions/3316899", "https://Stackoverflow.com", "https://Stackoverflow.com/users/123140/" ]
You should use [`libxml_use_internal_errors`](http://www.php.net/manual/en/function.libxml-use-internal-errors.php) for this. This example is adapted from the manual: ``` libxml_use_internal_errors(true); $doc = new DOMDocument(); $res = $doc->loadHTMLFile($url); //this may fail and return FALSE! foreach (libxml_get_...
I just found a very attractive solution at <http://bytes.com/topic/php/answers/6296-catch-warnings>: First tell PHP to track all errors: ``` ini_set('track_errors', '1'); ``` This puts all error messages (incl. warnings) into the variable `$php_errormsg` (see <http://www.php.net/manual/en/errorfunc.configuration.ph...
46,633
I am about to get my MEL added to my CFI, and I cannot get my head around the multiple explanations for how gross weight affects Vmc. The accepted answer is that The higher the gross weight, the lower is the Vmc. I have been proffered two contradictory explanations, from both internet articles, manufacturer documents,...
2017/12/15
[ "https://aviation.stackexchange.com/questions/46633", "https://aviation.stackexchange.com", "https://aviation.stackexchange.com/users/17810/" ]
I think your objection to #2 is exactly correct, and your #1 is where the misunderstanding may lie. The point of VMCA is essentially to maintain a constant heading, and when you have no more rudder authority to make that happen, you're there -- and any slower, with slightly less rudder authority, your heading starts t...
The flaw in the reasoning under 1. is that you should not show horizontal and vertical components of lift, but of gravity. You're considering the aircraft reference frame, and should look at gravity alignment with the aircraft axes. This is proportional to sin $\Phi$ and to mass. What you were doing was breaking the l...
46,633
I am about to get my MEL added to my CFI, and I cannot get my head around the multiple explanations for how gross weight affects Vmc. The accepted answer is that The higher the gross weight, the lower is the Vmc. I have been proffered two contradictory explanations, from both internet articles, manufacturer documents,...
2017/12/15
[ "https://aviation.stackexchange.com/questions/46633", "https://aviation.stackexchange.com", "https://aviation.stackexchange.com/users/17810/" ]
I think your objection to #2 is exactly correct, and your #1 is where the misunderstanding may lie. The point of VMCA is essentially to maintain a constant heading, and when you have no more rudder authority to make that happen, you're there -- and any slower, with slightly less rudder authority, your heading starts t...
Well, let’s consider the problem in detail. Assumptions: the aircraft is a light twin under 6,000lbs GTOW powered by reciprocating engines. Engines and propellers are of a tractor configuration, mounted on pylons forward of the wing leading edges. Engines are not geared to counter rotate and turn clockwise from the...
46,633
I am about to get my MEL added to my CFI, and I cannot get my head around the multiple explanations for how gross weight affects Vmc. The accepted answer is that The higher the gross weight, the lower is the Vmc. I have been proffered two contradictory explanations, from both internet articles, manufacturer documents,...
2017/12/15
[ "https://aviation.stackexchange.com/questions/46633", "https://aviation.stackexchange.com", "https://aviation.stackexchange.com/users/17810/" ]
I think your objection to #2 is exactly correct, and your #1 is where the misunderstanding may lie. The point of VMCA is essentially to maintain a constant heading, and when you have no more rudder authority to make that happen, you're there -- and any slower, with slightly less rudder authority, your heading starts t...
It's fun to listen to engineers talk about flying airplanes. I know this is a little late for the answer but here we go. It's not the lift, It's the weight. A plane in flight balances at the center of lift, not the center of gravity. As the CG is normally forward of the CL the bank causes the nose to yaw toward Gravity...
46,633
I am about to get my MEL added to my CFI, and I cannot get my head around the multiple explanations for how gross weight affects Vmc. The accepted answer is that The higher the gross weight, the lower is the Vmc. I have been proffered two contradictory explanations, from both internet articles, manufacturer documents,...
2017/12/15
[ "https://aviation.stackexchange.com/questions/46633", "https://aviation.stackexchange.com", "https://aviation.stackexchange.com/users/17810/" ]
The flaw in the reasoning under 1. is that you should not show horizontal and vertical components of lift, but of gravity. You're considering the aircraft reference frame, and should look at gravity alignment with the aircraft axes. This is proportional to sin $\Phi$ and to mass. What you were doing was breaking the l...
Well, let’s consider the problem in detail. Assumptions: the aircraft is a light twin under 6,000lbs GTOW powered by reciprocating engines. Engines and propellers are of a tractor configuration, mounted on pylons forward of the wing leading edges. Engines are not geared to counter rotate and turn clockwise from the...
46,633
I am about to get my MEL added to my CFI, and I cannot get my head around the multiple explanations for how gross weight affects Vmc. The accepted answer is that The higher the gross weight, the lower is the Vmc. I have been proffered two contradictory explanations, from both internet articles, manufacturer documents,...
2017/12/15
[ "https://aviation.stackexchange.com/questions/46633", "https://aviation.stackexchange.com", "https://aviation.stackexchange.com/users/17810/" ]
It's fun to listen to engineers talk about flying airplanes. I know this is a little late for the answer but here we go. It's not the lift, It's the weight. A plane in flight balances at the center of lift, not the center of gravity. As the CG is normally forward of the CL the bank causes the nose to yaw toward Gravity...
Well, let’s consider the problem in detail. Assumptions: the aircraft is a light twin under 6,000lbs GTOW powered by reciprocating engines. Engines and propellers are of a tractor configuration, mounted on pylons forward of the wing leading edges. Engines are not geared to counter rotate and turn clockwise from the...
22,192,379
The add-on SDK attaches panels to widgets as seen [here](https://mdn.mozillademos.org/files/6599/text-entry-panel.png). I would like to achieve the same effect **using the add-on SDK** with a toolbar button instead. The toolbar button I'm using is of the [type](https://developer.mozilla.org/en-US/docs/XUL/Attribute/t...
2014/03/05
[ "https://Stackoverflow.com/questions/22192379", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1720014/" ]
Panels don't have an onCommand method see [MDN - Panels Article](https://developer.mozilla.org/en-US/docs/XUL/panel) You can make your panel stylized, give it type arrow like `panel.setAttribute('type', 'arrow')` and then to attach to your button. I didn't give it type arrow below. Heres the working code. Copy paste ...
You can create a Toolbarbutton and Panel using the Addon SDK and some Jetpack modules. Try [toolbarwidget-jplib](https://github.com/Rob--W/toolbarwidget-jplib) and [browser-action-jplib](https://github.com/Rob--W/browser-action-jplib) by Rob--W. You can easy add a button to the toolbar and style the panel whatever yo...
22,192,379
The add-on SDK attaches panels to widgets as seen [here](https://mdn.mozillademos.org/files/6599/text-entry-panel.png). I would like to achieve the same effect **using the add-on SDK** with a toolbar button instead. The toolbar button I'm using is of the [type](https://developer.mozilla.org/en-US/docs/XUL/Attribute/t...
2014/03/05
[ "https://Stackoverflow.com/questions/22192379", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1720014/" ]
> > Thanks for pointing me in the direction of arrow panels. Is there a way to place an HTML file in one rather than having to dynamically create XUL elements? The effect I'm trying to achieve is similar to the Pocket extension, which does one thing when the button part is clicked and another when the arrow is clicked...
Panels don't have an onCommand method see [MDN - Panels Article](https://developer.mozilla.org/en-US/docs/XUL/panel) You can make your panel stylized, give it type arrow like `panel.setAttribute('type', 'arrow')` and then to attach to your button. I didn't give it type arrow below. Heres the working code. Copy paste ...
22,192,379
The add-on SDK attaches panels to widgets as seen [here](https://mdn.mozillademos.org/files/6599/text-entry-panel.png). I would like to achieve the same effect **using the add-on SDK** with a toolbar button instead. The toolbar button I'm using is of the [type](https://developer.mozilla.org/en-US/docs/XUL/Attribute/t...
2014/03/05
[ "https://Stackoverflow.com/questions/22192379", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1720014/" ]
> > Thanks for pointing me in the direction of arrow panels. Is there a way to place an HTML file in one rather than having to dynamically create XUL elements? The effect I'm trying to achieve is similar to the Pocket extension, which does one thing when the button part is clicked and another when the arrow is clicked...
You can create a Toolbarbutton and Panel using the Addon SDK and some Jetpack modules. Try [toolbarwidget-jplib](https://github.com/Rob--W/toolbarwidget-jplib) and [browser-action-jplib](https://github.com/Rob--W/browser-action-jplib) by Rob--W. You can easy add a button to the toolbar and style the panel whatever yo...
44,211,536
I would like to build a program using clang on x86\_64 and gerate the program to x86. So far so good, I just used this command: `$ clang++ -m32 main.cpp` However, I got some errors about headers and libraries. This same situation with gcc, would be fixed by gcc-mutilib, but clang has not some multilib package. If ...
2017/05/26
[ "https://Stackoverflow.com/questions/44211536", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2036859/" ]
All right. I got this and learned a lot in the process. --- TL;DR: ====== Under the following assumptions ... * No logging options are explicitly configured. * The only log related JARs in the classpath are the jboss logging ones (i.e. no slf4j, log4j, etc.). ... Hibernate will [automatically select JDK logging v...
Alternatively you can disable jdbc warnings by adding a property into your ***hibernate.properties*** file (create it if it doesn't exist at the same level with your *application.properties* file): ``` hibernate.jdbc.log.warnings=false ``` <https://docs.jboss.org/hibernate/orm/5.2/userguide/html_single/appendices/Co...
44,211,536
I would like to build a program using clang on x86\_64 and gerate the program to x86. So far so good, I just used this command: `$ clang++ -m32 main.cpp` However, I got some errors about headers and libraries. This same situation with gcc, would be fixed by gcc-mutilib, but clang has not some multilib package. If ...
2017/05/26
[ "https://Stackoverflow.com/questions/44211536", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2036859/" ]
The hibernate framework enables the MySQL's SHOW WARNING by default with every query fired, this doubles the number of queries to MySQL and application can realise performance issues. This additional logging of SHOW WARNING by hibernate can be established at - ``` org.hibernate.engine.jdbc.spi.SqlExceptionHelper#hand...
Alternatively you can disable jdbc warnings by adding a property into your ***hibernate.properties*** file (create it if it doesn't exist at the same level with your *application.properties* file): ``` hibernate.jdbc.log.warnings=false ``` <https://docs.jboss.org/hibernate/orm/5.2/userguide/html_single/appendices/Co...
229,095
Is there some program that saves Windows configuration as you have before reinstalling the same operating system? For example, I want a program which scans all (or some main) configuration's in Windows 7.
2011/01/04
[ "https://superuser.com/questions/229095", "https://superuser.com", "https://superuser.com/users/57990/" ]
Yes, you can use the "Windows Easy Transfer" to move data and configuration to your new machine. Also, if you are re-installing on the same machine, the windows 7 install should ask you if you want to retain your data and settings.
Windows also offers an informational tutorial video about *Windows Easy Transfer* here if you want to check it out: > > <http://windows.microsoft.com/en-us/windows7/products/features/windows-easy-transfer> > > >
12,413,553
so I work in an environment where we are not able to link any runtime libraries, or use exceptions. However we want to take advantage of either BOOST or STL. Initially we tried linking in boost::container::string/vector/map/... and were unable to resolve linker errors. So currently I am trying to link in STL's headers...
2012/09/13
[ "https://Stackoverflow.com/questions/12413553", "https://Stackoverflow.com", "https://Stackoverflow.com/users/562174/" ]
It depends upon what you need, but probably, no. All of the containers in the C++ Standard Library require memory allocation, which is included in a runtime library. So, you can't have: ``` std::vector<> std::set<> std::map<> std::list<> ``` You might be able to use ``` std::array<> std::tuple<> ``` But you mig...
In order to eliminate exceptions from the standard library you need a library build that doesn't use exceptions. Setting those macros is part of building and using such a library. I don't think Microsoft ships a no-exception version of their library, but if they do, you need to link to it instead of the normal one. If ...
12,413,553
so I work in an environment where we are not able to link any runtime libraries, or use exceptions. However we want to take advantage of either BOOST or STL. Initially we tried linking in boost::container::string/vector/map/... and were unable to resolve linker errors. So currently I am trying to link in STL's headers...
2012/09/13
[ "https://Stackoverflow.com/questions/12413553", "https://Stackoverflow.com", "https://Stackoverflow.com/users/562174/" ]
First off, a point of clarification. You don't need Boost to use the standard template library. The STL was incorporated into C++ a long, long time ago as a part of the C++ standard library. You already have it as a part of visual studio 2010. You need to clarify what you mean by not being able to "link any runtime li...
In order to eliminate exceptions from the standard library you need a library build that doesn't use exceptions. Setting those macros is part of building and using such a library. I don't think Microsoft ships a no-exception version of their library, but if they do, you need to link to it instead of the normal one. If ...
131,672
Let $X$ be a set of all positive integers and define metric $d$ on $X$ by $d(m,n)=|m^{-1} - n^{-1}|$. I'm required to show $(X,d)$ is not a complete space. SOLUTION: Let $\{x\_n\}$ be any Cauchy sequence in $X$. Then choose $\epsilon=0.5$; there exists a number $N$ such that $d(x\_n,x\_m)&lt0.5$ for all $m,n>N$. $d(...
2012/04/14
[ "https://math.stackexchange.com/questions/131672", "https://math.stackexchange.com", "https://math.stackexchange.com/users/29104/" ]
The sequence $x\_n = n \in \mathbb{Z}$ is a Cauchy sequence for $d$. And $(x\_n)$ don't converge to a limit.
Using the definition of $d$, it is easy to verify that the sequence $x\_n=(1,2,3,\ldots)$ is a Cauchy sequence in $X=Z^+$. We see that $\forall k \in X, d(x\_n,k)\rightarrow k^{(-1)}$ as $n \rightarrow \infty$. Hence $(x\_n)$ does not converge in $X$ and so $X$ is not complete.
93,711
I know the basics of SSL encryption and how certificates work, but there are some points that are not clear to me regarding the SSL security: 1. If there is a intercepting proxy between the web server and the client, mostly the proxy uses its own signed certificates which the client may or may not trust. Then why don'...
2015/07/12
[ "https://security.stackexchange.com/questions/93711", "https://security.stackexchange.com", "https://security.stackexchange.com/users/80799/" ]
> > 1. If there is a intercepting proxy between the web server and the client, mostly the proxy uses its own signed certificates which the client may or may not trust. Then why don't proxy just take the certificate from server and forward it to client so the client will trust it. Also if the private key is only held b...
The intermediary would need to "spoof" the server's cert by creating a cert with the same hostname but which has a keypair controlled by the intermediary. This is because if the intermediary just passes the actual server's cert to the client then the client and server will establish a secure exchange of keys and an e...
93,711
I know the basics of SSL encryption and how certificates work, but there are some points that are not clear to me regarding the SSL security: 1. If there is a intercepting proxy between the web server and the client, mostly the proxy uses its own signed certificates which the client may or may not trust. Then why don'...
2015/07/12
[ "https://security.stackexchange.com/questions/93711", "https://security.stackexchange.com", "https://security.stackexchange.com/users/80799/" ]
> > 1. If there is a intercepting proxy between the web server and the client, mostly the proxy uses its own signed certificates which the client may or may not trust. Then why don't proxy just take the certificate from server and forward it to client so the client will trust it. Also if the private key is only held b...
> > If there is a intercepting proxy between the web server and the > client, mostly the proxy uses its own signed certificates which the > client may or may not trust. Then why don't proxy just take the > certificate from server and forward it to client so the client will > trust it. Also if the private key is on...
93,711
I know the basics of SSL encryption and how certificates work, but there are some points that are not clear to me regarding the SSL security: 1. If there is a intercepting proxy between the web server and the client, mostly the proxy uses its own signed certificates which the client may or may not trust. Then why don'...
2015/07/12
[ "https://security.stackexchange.com/questions/93711", "https://security.stackexchange.com", "https://security.stackexchange.com/users/80799/" ]
**Public Key Cryptography** You need first to understand the principle of public key cryptography. Both the server and the client has it's own public key and (secret/private) key. The public key can be used for two things. * Encrypt data to *reciption*. * Verify received data from *sender* or other signed data, such...
The intermediary would need to "spoof" the server's cert by creating a cert with the same hostname but which has a keypair controlled by the intermediary. This is because if the intermediary just passes the actual server's cert to the client then the client and server will establish a secure exchange of keys and an e...
93,711
I know the basics of SSL encryption and how certificates work, but there are some points that are not clear to me regarding the SSL security: 1. If there is a intercepting proxy between the web server and the client, mostly the proxy uses its own signed certificates which the client may or may not trust. Then why don'...
2015/07/12
[ "https://security.stackexchange.com/questions/93711", "https://security.stackexchange.com", "https://security.stackexchange.com/users/80799/" ]
**Public Key Cryptography** You need first to understand the principle of public key cryptography. Both the server and the client has it's own public key and (secret/private) key. The public key can be used for two things. * Encrypt data to *reciption*. * Verify received data from *sender* or other signed data, such...
> > If there is a intercepting proxy between the web server and the > client, mostly the proxy uses its own signed certificates which the > client may or may not trust. Then why don't proxy just take the > certificate from server and forward it to client so the client will > trust it. Also if the private key is on...
4,943,807
I'm using OpenNetCF library in my WindowsCE .NET Compact Framework 3.5 application. The problem is that when I call one of its functions (**NetworkInterface.GetAllNetworkInterfaces()** to be specific), it randomly throws uncatchable exception and crashes my application: ``` ExceptionCode: 0x80000002 exceptionAddress...
2011/02/09
[ "https://Stackoverflow.com/questions/4943807", "https://Stackoverflow.com", "https://Stackoverflow.com/users/291427/" ]
I faced the similar problem while using the `OpenNetCF` library in Windows compact framework. The uncatchable native exception was thrown randomly and it crashed the entire application. While investigating the probable causes for this issue, I could get to know that it could be due to memory leaks due to which the syst...
I tend to make all PInvoke calls private, and wrap them in a public method which carries out the Exception catching: ``` class MyWrappingClass{ [DllImport("wzcsapi.dll")] private static extern void WZCDeleteIntfObj(ref INTF_ENTRY Intf); public void useWZCDeleteIntfObj(ref INTF_ENTRY Intf){ //you may wish ...
4,943,807
I'm using OpenNetCF library in my WindowsCE .NET Compact Framework 3.5 application. The problem is that when I call one of its functions (**NetworkInterface.GetAllNetworkInterfaces()** to be specific), it randomly throws uncatchable exception and crashes my application: ``` ExceptionCode: 0x80000002 exceptionAddress...
2011/02/09
[ "https://Stackoverflow.com/questions/4943807", "https://Stackoverflow.com", "https://Stackoverflow.com/users/291427/" ]
I faced the similar problem while using the `OpenNetCF` library in Windows compact framework. The uncatchable native exception was thrown randomly and it crashed the entire application. While investigating the probable causes for this issue, I could get to know that it could be due to memory leaks due to which the syst...
Try using managed C++ to catch the exception as a C++/C exception, and then rethrow as a CLR exception. When pInvoke gets too hard, managed C++ is often a good option.
4,943,807
I'm using OpenNetCF library in my WindowsCE .NET Compact Framework 3.5 application. The problem is that when I call one of its functions (**NetworkInterface.GetAllNetworkInterfaces()** to be specific), it randomly throws uncatchable exception and crashes my application: ``` ExceptionCode: 0x80000002 exceptionAddress...
2011/02/09
[ "https://Stackoverflow.com/questions/4943807", "https://Stackoverflow.com", "https://Stackoverflow.com/users/291427/" ]
I faced the similar problem while using the `OpenNetCF` library in Windows compact framework. The uncatchable native exception was thrown randomly and it crashed the entire application. While investigating the probable causes for this issue, I could get to know that it could be due to memory leaks due to which the syst...
I ran into the same problem. NativeException can not be caught in a c# try/catch. At least not on .NET CF 3.5. The error thrown is a DataType unalignment exception. which is an error that can occur on e.g. ARM processors, because ARM architecture requires data to be aligned correctly in memory. I looked through the Op...
17,240,624
I am trying to do a simple matrix inversion operation using boost. But I am getting an error. Basically what I am trying to find is inversted\_matrix = inverse(trans(matrix) \* matrix) But I am getting an error ``` Check failed in file boost_1_53_0/boost/numeric/ublas/lu.hpp at line 299: detail::expression_type_...
2013/06/21
[ "https://Stackoverflow.com/questions/17240624", "https://Stackoverflow.com", "https://Stackoverflow.com/users/902885/" ]
Boost Ublas has runtime checks to ensure among other thing numerical stability. If you look at source of the error, you can see that it tries to make sure that `U*X = B, X = U^-1*B, U*X = B` (or smth like that) are coorect to within some epsilon. If you have too much deviation numerically this will likely not hold. Yo...
As `m` has only 4 rows, `prod(trans(m), m)` cannot have a rank higher than 4, and as the product is a 5x5 matrix, it must be singular (i.e. it has determinant 0) and calculating the inverse of a singular matrix is like division by 0. Add independent rows to `m` to solve this singularity problem.
17,240,624
I am trying to do a simple matrix inversion operation using boost. But I am getting an error. Basically what I am trying to find is inversted\_matrix = inverse(trans(matrix) \* matrix) But I am getting an error ``` Check failed in file boost_1_53_0/boost/numeric/ublas/lu.hpp at line 299: detail::expression_type_...
2013/06/21
[ "https://Stackoverflow.com/questions/17240624", "https://Stackoverflow.com", "https://Stackoverflow.com/users/902885/" ]
Boost Ublas has runtime checks to ensure among other thing numerical stability. If you look at source of the error, you can see that it tries to make sure that `U*X = B, X = U^-1*B, U*X = B` (or smth like that) are coorect to within some epsilon. If you have too much deviation numerically this will likely not hold. Yo...
I think your matrix dimension, 4 by 5, caused the error. Like what [Maarten Hilferink mentioned](https://stackoverflow.com/a/19679723/5595995), you may try with a square matrix like 5 by 5. Here are [requirement to have an inverse](https://people.richland.edu/james/lecture/m116/matrices/inverses.html): 1. The matrix m...
17,240,624
I am trying to do a simple matrix inversion operation using boost. But I am getting an error. Basically what I am trying to find is inversted\_matrix = inverse(trans(matrix) \* matrix) But I am getting an error ``` Check failed in file boost_1_53_0/boost/numeric/ublas/lu.hpp at line 299: detail::expression_type_...
2013/06/21
[ "https://Stackoverflow.com/questions/17240624", "https://Stackoverflow.com", "https://Stackoverflow.com/users/902885/" ]
As `m` has only 4 rows, `prod(trans(m), m)` cannot have a rank higher than 4, and as the product is a 5x5 matrix, it must be singular (i.e. it has determinant 0) and calculating the inverse of a singular matrix is like division by 0. Add independent rows to `m` to solve this singularity problem.
I think your matrix dimension, 4 by 5, caused the error. Like what [Maarten Hilferink mentioned](https://stackoverflow.com/a/19679723/5595995), you may try with a square matrix like 5 by 5. Here are [requirement to have an inverse](https://people.richland.edu/james/lecture/m116/matrices/inverses.html): 1. The matrix m...
26,580,944
I would like to use PyMongo’s [bulk](http://api.mongodb.org/python/current/examples/bulk.html) write operation features which executes write operations in batches in order to reduces the number of network round trips and increaseses rite throughput. I also found [here](http://java.dzone.com/articles/mongodb-facts-ov...
2014/10/27
[ "https://Stackoverflow.com/questions/26580944", "https://Stackoverflow.com", "https://Stackoverflow.com/users/977828/" ]
You can simply do: ``` sDB.insert(iter_something(converted)) ``` PyMongo will do the right thing: iterate your generator until it has yielded 1000 a documents or 16MB of data, then pause the generator while it inserts the batch into MongoDB. Once the batch is inserted PyMongo resumes your generator to create the nex...
So you have a generator of documents, and you want to split it into chunks or groups of documents. This can be ellegantly done using the `grouper` generator, described in [this answer](https://stackoverflow.com/a/434411/2096752). Then, for each group of documents, use pymongo's [`insert`](http://api.mongodb.org/pytho...
34,369,079
I study swift. I have a question about initializers `init()`. For example, I want to initialize Int. ``` var number: Int = 20 var number = Int(20) var number = Int.init(20) ``` All expression is same? Second, Why this expression occurs? ``` var check = "123" var phoneNum:Int? if((phoneNum = Int.init(check)) ...
2015/12/19
[ "https://Stackoverflow.com/questions/34369079", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5697707/" ]
1. Yes, these all have the same effect: ``` var number: Int = 20 var number = Int(20) var number = Int.init(20) ``` And this is one more way to do it: ``` var number = 20 ``` 2. This produces an error: ``` var check = "123" var phoneNum:Int? if((phoneNum = Int.init(check)) != nil) { print("Success"); } ``` ...
I wanted to add this as a comment to [rob](https://stackoverflow.com/users/77567/rob-mayoff)'s answer but since I don't have enough reputation, here's my answer as? a comment (pun intended ;). Regarding the last two examples you can also use [optional binding](https://developer.apple.com/library/ios/documentation/Swif...
48,494,416
`event.target` returns the DOM element an action was performed on. How do I get a specific child element from the output? Here's my form (with Angular markup): ``` <form (ngSubmit)="onSubmit($event)" id="kekpek"> <div class="form-group"> <label>Example file input</label> <input type="file" class="form-contr...
2018/01/29
[ "https://Stackoverflow.com/questions/48494416", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5861479/" ]
You can use the `documentElement.querySelector()` method. ``` function onSubmit(event){ console.log(event.target.querySelector('input')); } ``` You can use any valid CSS query to get the element you need
This should help ``` onSubmit(event) { console.log(event.target.firstChild.children[1]); } ```
51,222,643
I need to pass some parameters from middleware to controller and I'm confused which approach should I use if I have to take care of performance, resource usage and security. * `context.Items["user-id"] = "12345";` * `context.Session.SetInt32("user-id", 12345);` (It is the requirement to keep the Session enabled anywa...
2018/07/07
[ "https://Stackoverflow.com/questions/51222643", "https://Stackoverflow.com", "https://Stackoverflow.com/users/925639/" ]
You could pass it as an http header down the pipeline with the request ```cs public class UserHeaderMiddleware { private readonly RequestDelegate _next; public UserHeaderMiddleware(RequestDelegate next) { _next = next; } public async Task Invoke(HttpContext context) { contex...
If you need to store the user ID for the future, session is the way to go. `Items` only passes it along for that request.
203,546
When we look at StackExchange's server certificate (by clicking on the Lock icon), it says: > > This certificate is intended for the following purposes: > > > Ensures the identity of a remote computer. > > Proves your identity to a remote computer. > > > I thought that the server certificate contains the pu...
2019/02/14
[ "https://security.stackexchange.com/questions/203546", "https://security.stackexchange.com", "https://security.stackexchange.com/users/87164/" ]
What you see is not how the certificate **is** used but how the certificate **can** be used. This certificate can be used and also is used to authenticate a server against a client. It can also be used as a client certificate to authenticate a client against a server - although it is currently not used that way. Using...
To understand how the client is also verified requires understanding a bit about how TLS works. Let's use an https connection to ***<https://security.stackexchange.com>*** as an example: 1. I connect to <https://security.stackexchange.com> and am sent their cert signed by ***Digicert Inc*** vouching that the cert- and...
37,570,691
``` I #> 0, I #< 10, indomain(I). ``` The previous code obviously does the following: ``` I = 1 ; I = 2 ; I = 3 ; I = 4 ; I = 5 ; I = 6 ; I = 7 ; I = 8 ; I = 9. ``` The following code does not work (arguments are not sufficiently instantiated): ``` I #> 0, indomain(I). ``` Now I understand that there are in thi...
2016/06/01
[ "https://Stackoverflow.com/questions/37570691", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2554145/" ]
The reason for this is that CLP(FD) preserves the following important property: > > **If** a predicate `p(Vs)` *terminates universally*, **then** `?- p(Vs), label(Vs).` **also** terminates universally. > > > A goal `G` *terminates universally* **iff** `?- G, false.` *terminates*. Why is this so important? Becaus...
There is no reason to not allow infinite domains enumeration in CLP(FD). Since as **user:mat** has correctly observed the constraints itself terminate, an infinite enumeration might find a solution if a solution exists. So basically we have: > > The constraints terminate universally, i.e. (#=)/2, (#=<)/2, etc.. give...
58,467,537
I created a `Spring Boot` app and have trouble with some endpoints that can be triggered manually or via `@Scheduled` annotation. The issue I get is the one below: > > org.springframework.security.authentication.AuthenticationCredentialsNotFoundException: > An Authentication object was not found in the SecurityCont...
2019/10/19
[ "https://Stackoverflow.com/questions/58467537", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4473386/" ]
I think this is what you want. You won't have ids and size from data in div class='size inactive active' ``` for sizeBlock in soup.select('div.size a.selectSize'): aid = sizeBlock.get('id') size = sizeBlock.get('data-size-us') ```
Already answered here [How to Beautiful Soup (bs4) match just one, and only one, css class](https://stackoverflow.com/questions/14496860/how-to-beautiful-soup-bs4-match-just-one-and-only-one-css-class) Use `soup.select`. Here's a simple test: ``` from bs4 import BeautifulSoup html_doc = """<div class="size"> <a clas...
64,862,741
I have a table of data for individual audits on inventory. Every audit has a location, an expected value, a variance value, and some other data that aren't really important here. I am writing a query for Cognos 11 which summarizes a week of these audits. Currently, it rolls everything up into sums by location class. M...
2020/11/16
[ "https://Stackoverflow.com/questions/64862741", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9448101/" ]
Have you tried taking a look at the [OVER](https://learn.microsoft.com/en-us/sql/t-sql/queries/select-over-clause-transact-sql?view=sql-server-ver15) clause in SQL? It allows you to use windowed functions within a result set such that you can get aggregates based on specific conditions. This would probably help since y...
Have you tried to put the distinct at the bottom like this ? (SUM(NVL(variance\_cost,0)) / SUM(NVL(expected\_cost,0))) "Variance", **COUNT(DISTINCT location) "Count of Locations"** FROM audit\_table
596,929
I'm curious to see how popular the alternatives to C are in the embedded developer world e.g. Ada... I've only ever used C (with a little bit of assembler), but then my targets have very limited resources. Is there a move else where in this space to something else? What is winning the ware in set top boxes? If !C wha...
2009/02/27
[ "https://Stackoverflow.com/questions/596929", "https://Stackoverflow.com", "https://Stackoverflow.com/users/67494/" ]
[Forth](http://Forth.Org/) is quite popular for embedded development. Also, while [Smalltalk](http://Smalltalk.Org/) is probably not popular in the embedded community, [embedded development](http://Smalltalk.Org/versions/OOVM.html) is definitely popular in the Smalltalk community.
Perhaps not quite the large step from C you're looking for but C++ is also resonably popular for embedded projects.
596,929
I'm curious to see how popular the alternatives to C are in the embedded developer world e.g. Ada... I've only ever used C (with a little bit of assembler), but then my targets have very limited resources. Is there a move else where in this space to something else? What is winning the ware in set top boxes? If !C wha...
2009/02/27
[ "https://Stackoverflow.com/questions/596929", "https://Stackoverflow.com", "https://Stackoverflow.com/users/67494/" ]
[Forth](http://Forth.Org/) is quite popular for embedded development. Also, while [Smalltalk](http://Smalltalk.Org/) is probably not popular in the embedded community, [embedded development](http://Smalltalk.Org/versions/OOVM.html) is definitely popular in the Smalltalk community.
I have used Ada in embedded project for military avionics because of customer requirements. There is lots of Ada tools for embedded development but most of it is very expensive. Personally I would just use C.
596,929
I'm curious to see how popular the alternatives to C are in the embedded developer world e.g. Ada... I've only ever used C (with a little bit of assembler), but then my targets have very limited resources. Is there a move else where in this space to something else? What is winning the ware in set top boxes? If !C wha...
2009/02/27
[ "https://Stackoverflow.com/questions/596929", "https://Stackoverflow.com", "https://Stackoverflow.com/users/67494/" ]
I haven't used myself, but [Bascom](http://microcontrollershop.com/product_info.php?cPath=110_131&products_id=352) is quite popular for AVR microcontrollers. It is a Basic IDE that lets you interact with the peripherals very easily. I've met hardware people that successfully use it.
Pascal, Modula2 work fine too. Essentially they are pretty much equivalent to C, except for the inability to do alloca (though some have that as extension). But the core problem will be the problem with any !C compiler: what do you prefer, a better compiler/toolchain or the language of preference. Despite I like the ...
596,929
I'm curious to see how popular the alternatives to C are in the embedded developer world e.g. Ada... I've only ever used C (with a little bit of assembler), but then my targets have very limited resources. Is there a move else where in this space to something else? What is winning the ware in set top boxes? If !C wha...
2009/02/27
[ "https://Stackoverflow.com/questions/596929", "https://Stackoverflow.com", "https://Stackoverflow.com/users/67494/" ]
[Forth](http://Forth.Org/) is quite popular for embedded development. Also, while [Smalltalk](http://Smalltalk.Org/) is probably not popular in the embedded community, [embedded development](http://Smalltalk.Org/versions/OOVM.html) is definitely popular in the Smalltalk community.
Pascal, Modula2 work fine too. Essentially they are pretty much equivalent to C, except for the inability to do alloca (though some have that as extension). But the core problem will be the problem with any !C compiler: what do you prefer, a better compiler/toolchain or the language of preference. Despite I like the ...
596,929
I'm curious to see how popular the alternatives to C are in the embedded developer world e.g. Ada... I've only ever used C (with a little bit of assembler), but then my targets have very limited resources. Is there a move else where in this space to something else? What is winning the ware in set top boxes? If !C wha...
2009/02/27
[ "https://Stackoverflow.com/questions/596929", "https://Stackoverflow.com", "https://Stackoverflow.com/users/67494/" ]
When you say "embedded development", keep in mind that you have to consider the scale of the project. When programming something on the scale of a microcontroller or the firmware for an ASIC, you tend to see C and assembly dominate the scene. Embedded developers tend to "specialize" in these languages since compilers ...
There is a [group of folks](http://www.eluaproject.net/) working to make Lua a viable option for embedded work. They are targeting primarily 32-bit ARMs with 256K FLASH and 64K RAM or better, and seem happy with their work so far. They are partly inspired by the classic [BASIC-Stamp](http://www.parallax.com/), a BASIC...
596,929
I'm curious to see how popular the alternatives to C are in the embedded developer world e.g. Ada... I've only ever used C (with a little bit of assembler), but then my targets have very limited resources. Is there a move else where in this space to something else? What is winning the ware in set top boxes? If !C wha...
2009/02/27
[ "https://Stackoverflow.com/questions/596929", "https://Stackoverflow.com", "https://Stackoverflow.com/users/67494/" ]
Yes. Java is becoming more popular - many processors have added instructions that pertain primarily to Java and similar languages (.net). Also, uclinux runs on microcontrollers, so you can use practically any language for some of the larger micros. Basic is still common, as is assembly. You'll see Ada in certain gov'...
See this related question: [What languages are used for real-time systems programming](https://stackoverflow.com/questions/697916/what-languages-are-used-for-real-time-systems-programming). In response to your "why" question, from the standpoint of government/military acquisition, there is a perception that Java (lan...
596,929
I'm curious to see how popular the alternatives to C are in the embedded developer world e.g. Ada... I've only ever used C (with a little bit of assembler), but then my targets have very limited resources. Is there a move else where in this space to something else? What is winning the ware in set top boxes? If !C wha...
2009/02/27
[ "https://Stackoverflow.com/questions/596929", "https://Stackoverflow.com", "https://Stackoverflow.com/users/67494/" ]
[Forth](http://Forth.Org/) is quite popular for embedded development. Also, while [Smalltalk](http://Smalltalk.Org/) is probably not popular in the embedded community, [embedded development](http://Smalltalk.Org/versions/OOVM.html) is definitely popular in the Smalltalk community.
I haven't used myself, but [Bascom](http://microcontrollershop.com/product_info.php?cPath=110_131&products_id=352) is quite popular for AVR microcontrollers. It is a Basic IDE that lets you interact with the peripherals very easily. I've met hardware people that successfully use it.