qid
int64
1
74.7M
question
stringlengths
0
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
2
48.3k
response_k
stringlengths
2
40.5k
39,975
> > How do you like your coffee? > > > Can I use the above sentence either on an offering situation that I ask if they like it black or with sugar, or during having situation that I ask if the coffee tastes good? When the latter is possible, can next both answers be possible? 1. I like it a lot. 2. It's good.
2014/11/20
[ "https://ell.stackexchange.com/questions/39975", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/504/" ]
**Be careful of emphasis** There are 2 ways of emphasizing the question: 1. *How* do you like your coffee? 2. How do you like *your coffee*? The first is equivalent to 'how do you take your coffee?', so I would expect it in that context after someone has agreed to or requested some coffee. The second is equivalent ...
One other possible interpretation is if it's being said by someone who doesn't like coffee, in an incredulous manner: > > *How* do you like your coffee?? I hate it! > > > (This is me. :))
39,975
> > How do you like your coffee? > > > Can I use the above sentence either on an offering situation that I ask if they like it black or with sugar, or during having situation that I ask if the coffee tastes good? When the latter is possible, can next both answers be possible? 1. I like it a lot. 2. It's good.
2014/11/20
[ "https://ell.stackexchange.com/questions/39975", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/504/" ]
Beyond the answers given by other contributors, I would also add another parse: If asked at a bar at night, when the other party is clearly not drinking coffee, the individual who asked may be implying that they will be making coffee for the other party the following morning; that is, it could also serve as an implici...
It's easier to see the meaning if you expand the two sentences to avoid the ambiguity: > > How do you like your coffee [to be]? > > > And the second definition: > > How do you like your coffee [in front of you]? > > > --- The latter is usually instead said without the "how" (in fact, I have a feeling inclu...
39,975
> > How do you like your coffee? > > > Can I use the above sentence either on an offering situation that I ask if they like it black or with sugar, or during having situation that I ask if the coffee tastes good? When the latter is possible, can next both answers be possible? 1. I like it a lot. 2. It's good.
2014/11/20
[ "https://ell.stackexchange.com/questions/39975", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/504/" ]
As the other answers suggest, `"How do you like your coffee?"` can indeed have either meaning, depending on context. If you're looking for unambiguous versions, you could instead ask: > > How do you take your coffee? `Meaning: Milk? Sugar?` > > > Or > > How is your coffee? `Meaning: Do you like the coffee you...
It's easier to see the meaning if you expand the two sentences to avoid the ambiguity: > > How do you like your coffee [to be]? > > > And the second definition: > > How do you like your coffee [in front of you]? > > > --- The latter is usually instead said without the "how" (in fact, I have a feeling inclu...
39,975
> > How do you like your coffee? > > > Can I use the above sentence either on an offering situation that I ask if they like it black or with sugar, or during having situation that I ask if the coffee tastes good? When the latter is possible, can next both answers be possible? 1. I like it a lot. 2. It's good.
2014/11/20
[ "https://ell.stackexchange.com/questions/39975", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/504/" ]
You may use this in both situations, and indeed in others; the context will make it clear which meaning is intended: * If you ask before you start preparing the coffee, you are asking how your hearer prefers their coffee to be prepared—Do you like it strong or weak (or possibly boiled to a black sludge)? * If you ask ...
This phrase does have two meanings in US English, as agreed by other posters. For the sake of completeness, I feel compelled to add that in British English, this is a phrase that would only be used when offering coffee. Using it as a question to affirm how much someone was enjoying their coffee would probably be under...
39,975
> > How do you like your coffee? > > > Can I use the above sentence either on an offering situation that I ask if they like it black or with sugar, or during having situation that I ask if the coffee tastes good? When the latter is possible, can next both answers be possible? 1. I like it a lot. 2. It's good.
2014/11/20
[ "https://ell.stackexchange.com/questions/39975", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/504/" ]
You may use this in both situations, and indeed in others; the context will make it clear which meaning is intended: * If you ask before you start preparing the coffee, you are asking how your hearer prefers their coffee to be prepared—Do you like it strong or weak (or possibly boiled to a black sludge)? * If you ask ...
It's easier to see the meaning if you expand the two sentences to avoid the ambiguity: > > How do you like your coffee [to be]? > > > And the second definition: > > How do you like your coffee [in front of you]? > > > --- The latter is usually instead said without the "how" (in fact, I have a feeling inclu...
39,975
> > How do you like your coffee? > > > Can I use the above sentence either on an offering situation that I ask if they like it black or with sugar, or during having situation that I ask if the coffee tastes good? When the latter is possible, can next both answers be possible? 1. I like it a lot. 2. It's good.
2014/11/20
[ "https://ell.stackexchange.com/questions/39975", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/504/" ]
Beyond the answers given by other contributors, I would also add another parse: If asked at a bar at night, when the other party is clearly not drinking coffee, the individual who asked may be implying that they will be making coffee for the other party the following morning; that is, it could also serve as an implici...
One other possible interpretation is if it's being said by someone who doesn't like coffee, in an incredulous manner: > > *How* do you like your coffee?? I hate it! > > > (This is me. :))
5,968,614
How can I go about getting a program's running time through system time functions in Haskell? I would like to measure the execution time of a whole program and/or an individual function.
2011/05/11
[ "https://Stackoverflow.com/questions/5968614", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Assuming you don't just want to measure the total running time of your program, like so: ``` $ time ./A ``` Then you can time a computation a number of ways in Haskell: * [Basic timing](http://www.haskell.org/haskellwiki/Timing_computations) (e.g. as in the [timeit package](http://hackage.haskell.org/packages/arch...
I'm not sure how accurate it is, but using `:set +s` in ghci will show the time and space used for subsequent computations.
5,968,614
How can I go about getting a program's running time through system time functions in Haskell? I would like to measure the execution time of a whole program and/or an individual function.
2011/05/11
[ "https://Stackoverflow.com/questions/5968614", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Assuming you don't just want to measure the total running time of your program, like so: ``` $ time ./A ``` Then you can time a computation a number of ways in Haskell: * [Basic timing](http://www.haskell.org/haskellwiki/Timing_computations) (e.g. as in the [timeit package](http://hackage.haskell.org/packages/arch...
`:set +s` is really neat if use ghci, otherwise you can use `Criterion.Measurement`, see [my answer to another question with example](https://stackoverflow.com/a/22588000/1338198).
5,968,614
How can I go about getting a program's running time through system time functions in Haskell? I would like to measure the execution time of a whole program and/or an individual function.
2011/05/11
[ "https://Stackoverflow.com/questions/5968614", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
1) If you want to benchmark something, use the [criterion](http://hackage.haskell.org/package/criterion) package. 2) If you want to time a function and are positive you have controlled for laziness as needed, then just use `Data.Time.getCurrentTime` from the [time](http://hackage.haskell.org/package/time) package.: `...
I'm not sure how accurate it is, but using `:set +s` in ghci will show the time and space used for subsequent computations.
5,968,614
How can I go about getting a program's running time through system time functions in Haskell? I would like to measure the execution time of a whole program and/or an individual function.
2011/05/11
[ "https://Stackoverflow.com/questions/5968614", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
1) If you want to benchmark something, use the [criterion](http://hackage.haskell.org/package/criterion) package. 2) If you want to time a function and are positive you have controlled for laziness as needed, then just use `Data.Time.getCurrentTime` from the [time](http://hackage.haskell.org/package/time) package.: `...
`:set +s` is really neat if use ghci, otherwise you can use `Criterion.Measurement`, see [my answer to another question with example](https://stackoverflow.com/a/22588000/1338198).
5,968,614
How can I go about getting a program's running time through system time functions in Haskell? I would like to measure the execution time of a whole program and/or an individual function.
2011/05/11
[ "https://Stackoverflow.com/questions/5968614", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
`:set +s` is really neat if use ghci, otherwise you can use `Criterion.Measurement`, see [my answer to another question with example](https://stackoverflow.com/a/22588000/1338198).
I'm not sure how accurate it is, but using `:set +s` in ghci will show the time and space used for subsequent computations.
239,693
I've tried a bunch of different setups, but I can't get it to work. Here are the two setups I was the most confident in that it would work. I simply want to map existing id's in the source to new id's that are already created in taxonomy. Attempt 1: ``` field_season: # Map the seasons to our already existing ...
2017/06/30
[ "https://drupal.stackexchange.com/questions/239693", "https://drupal.stackexchange.com", "https://drupal.stackexchange.com/users/7704/" ]
load() and loadMultiple() are cached, loadByProperties() is a shortcut for an entity query + load, the entity query is not cached. Do not use loadByProperties() if you know the entity ID.
For anyone coming across this issue; You can also use the entity `resetCache` without passing an entity ID parameter since the `resetCache` method can accept empty parameters. See documentation on: [EntityStorageBase::resetCache](https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Entity%21EntityStorageBase...
488,742
I've been doing physics problems regarding cars for a while. I understand that there is a static friction (which appears when the wheel is rolling) and kinetic friction (which appears when the wheel is sliding). However, the way I'm visualizing it, static friction between the tire and road should not stop a car. In fac...
2019/06/28
[ "https://physics.stackexchange.com/questions/488742", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/170120/" ]
Imagine a car just going along at constant speed. Do your free-body diagram. The net force on the car has to be zero. So the wheels have to be exerting on the ground (net at least) only a vertical force. Now imagine the car decreasing speed. There has to be a force opposite to the velocity. Free-body time again. The ...
cars stop with their brakes, which produce friction at the inside of the wheel assemblies as the wheels rotate. This friction force retards the rotation of the wheels and dissipates the kinetic energy of the car into heat in the brake parts. since the wheels are in rolling contact with the pavement, and since the whe...
488,742
I've been doing physics problems regarding cars for a while. I understand that there is a static friction (which appears when the wheel is rolling) and kinetic friction (which appears when the wheel is sliding). However, the way I'm visualizing it, static friction between the tire and road should not stop a car. In fac...
2019/06/28
[ "https://physics.stackexchange.com/questions/488742", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/170120/" ]
Imagine a car just going along at constant speed. Do your free-body diagram. The net force on the car has to be zero. So the wheels have to be exerting on the ground (net at least) only a vertical force. Now imagine the car decreasing speed. There has to be a force opposite to the velocity. Free-body time again. The ...
Your teacher's explanation is a bit thin. Firstly, there are several reasons that a car might slow down. Secondly, even when specifically focusing on internal friction, there are several more factors involved. If there is kinetic friction ---------------------------- (if the wheels are sliding), then that friction is...
488,742
I've been doing physics problems regarding cars for a while. I understand that there is a static friction (which appears when the wheel is rolling) and kinetic friction (which appears when the wheel is sliding). However, the way I'm visualizing it, static friction between the tire and road should not stop a car. In fac...
2019/06/28
[ "https://physics.stackexchange.com/questions/488742", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/170120/" ]
Imagine a car just going along at constant speed. Do your free-body diagram. The net force on the car has to be zero. So the wheels have to be exerting on the ground (net at least) only a vertical force. Now imagine the car decreasing speed. There has to be a force opposite to the velocity. Free-body time again. The ...
Have you ever tried to lift yourself up by pulling your own hair? Go ahead try it. Try it really hard. You should be able to levitate a couple of inches, right? What? You got a handful of hairs in your hand and a bald patch in your skull? It should serve you right. Hopefully, you will learn that internal forces cannot ...
488,742
I've been doing physics problems regarding cars for a while. I understand that there is a static friction (which appears when the wheel is rolling) and kinetic friction (which appears when the wheel is sliding). However, the way I'm visualizing it, static friction between the tire and road should not stop a car. In fac...
2019/06/28
[ "https://physics.stackexchange.com/questions/488742", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/170120/" ]
> > the way I'm visualizing it, static friction between the tire and road should not stop a car. > > > Static friction is able to supply a force. If that force is opposite the direction of motion, it is able to stop the car. In the case of your car and the brakes, that's exactly what happens. A torque from the br...
cars stop with their brakes, which produce friction at the inside of the wheel assemblies as the wheels rotate. This friction force retards the rotation of the wheels and dissipates the kinetic energy of the car into heat in the brake parts. since the wheels are in rolling contact with the pavement, and since the whe...
488,742
I've been doing physics problems regarding cars for a while. I understand that there is a static friction (which appears when the wheel is rolling) and kinetic friction (which appears when the wheel is sliding). However, the way I'm visualizing it, static friction between the tire and road should not stop a car. In fac...
2019/06/28
[ "https://physics.stackexchange.com/questions/488742", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/170120/" ]
Have you ever tried to lift yourself up by pulling your own hair? Go ahead try it. Try it really hard. You should be able to levitate a couple of inches, right? What? You got a handful of hairs in your hand and a bald patch in your skull? It should serve you right. Hopefully, you will learn that internal forces cannot ...
cars stop with their brakes, which produce friction at the inside of the wheel assemblies as the wheels rotate. This friction force retards the rotation of the wheels and dissipates the kinetic energy of the car into heat in the brake parts. since the wheels are in rolling contact with the pavement, and since the whe...
488,742
I've been doing physics problems regarding cars for a while. I understand that there is a static friction (which appears when the wheel is rolling) and kinetic friction (which appears when the wheel is sliding). However, the way I'm visualizing it, static friction between the tire and road should not stop a car. In fac...
2019/06/28
[ "https://physics.stackexchange.com/questions/488742", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/170120/" ]
> > the way I'm visualizing it, static friction between the tire and road should not stop a car. > > > Static friction is able to supply a force. If that force is opposite the direction of motion, it is able to stop the car. In the case of your car and the brakes, that's exactly what happens. A torque from the br...
Your teacher's explanation is a bit thin. Firstly, there are several reasons that a car might slow down. Secondly, even when specifically focusing on internal friction, there are several more factors involved. If there is kinetic friction ---------------------------- (if the wheels are sliding), then that friction is...
488,742
I've been doing physics problems regarding cars for a while. I understand that there is a static friction (which appears when the wheel is rolling) and kinetic friction (which appears when the wheel is sliding). However, the way I'm visualizing it, static friction between the tire and road should not stop a car. In fac...
2019/06/28
[ "https://physics.stackexchange.com/questions/488742", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/170120/" ]
Have you ever tried to lift yourself up by pulling your own hair? Go ahead try it. Try it really hard. You should be able to levitate a couple of inches, right? What? You got a handful of hairs in your hand and a bald patch in your skull? It should serve you right. Hopefully, you will learn that internal forces cannot ...
Your teacher's explanation is a bit thin. Firstly, there are several reasons that a car might slow down. Secondly, even when specifically focusing on internal friction, there are several more factors involved. If there is kinetic friction ---------------------------- (if the wheels are sliding), then that friction is...
488,742
I've been doing physics problems regarding cars for a while. I understand that there is a static friction (which appears when the wheel is rolling) and kinetic friction (which appears when the wheel is sliding). However, the way I'm visualizing it, static friction between the tire and road should not stop a car. In fac...
2019/06/28
[ "https://physics.stackexchange.com/questions/488742", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/170120/" ]
> > the way I'm visualizing it, static friction between the tire and road should not stop a car. > > > Static friction is able to supply a force. If that force is opposite the direction of motion, it is able to stop the car. In the case of your car and the brakes, that's exactly what happens. A torque from the br...
Have you ever tried to lift yourself up by pulling your own hair? Go ahead try it. Try it really hard. You should be able to levitate a couple of inches, right? What? You got a handful of hairs in your hand and a bald patch in your skull? It should serve you right. Hopefully, you will learn that internal forces cannot ...
2,673,627
I am attempting to find the coefficient of $x^5$ in the expression $(2 + x - x^2)^5$ by using the multinomial theorem. I was capable of performing this task only when the number of elements is 2 (using the binomial theorem), however, I am stuck on this one.
2018/03/02
[ "https://math.stackexchange.com/questions/2673627", "https://math.stackexchange.com", "https://math.stackexchange.com/users/500033/" ]
Hint : $$2+x-x^2=(2-x)(x+1)$$ Now can you count the cases when the multiplication of the terms from each bracket will make up to $x^5?$
Note that $x^5=(1)^2(x)^1(x^2)^2=(1)^1(x)^3(x^2)^1=(1)^0(x)^5(x^2)^0$. The coefficient is $\displaystyle \binom{5}{2}(2)^2\binom{3}{1}(1)^1(-1)^2+\binom{5}{1}(2)^1\binom{4}{3}(1)^3(-1)^1+\binom{5}{0}(2)^0\binom{5}{5}(1)^5(-1)^0=81$
2,673,627
I am attempting to find the coefficient of $x^5$ in the expression $(2 + x - x^2)^5$ by using the multinomial theorem. I was capable of performing this task only when the number of elements is 2 (using the binomial theorem), however, I am stuck on this one.
2018/03/02
[ "https://math.stackexchange.com/questions/2673627", "https://math.stackexchange.com", "https://math.stackexchange.com/users/500033/" ]
Hint: To get $x^5$, the $x^2$ can only be raised to the power $0, 1$ or $2$, so using the multinomial theorem, you only want to look at the multinomial coefficients $${{5}\choose{0,5,0}}, {{5}\choose{1,3,1}}, {{5}\choose{2,1,2}}.$$
Note that $x^5=(1)^2(x)^1(x^2)^2=(1)^1(x)^3(x^2)^1=(1)^0(x)^5(x^2)^0$. The coefficient is $\displaystyle \binom{5}{2}(2)^2\binom{3}{1}(1)^1(-1)^2+\binom{5}{1}(2)^1\binom{4}{3}(1)^3(-1)^1+\binom{5}{0}(2)^0\binom{5}{5}(1)^5(-1)^0=81$
2,673,627
I am attempting to find the coefficient of $x^5$ in the expression $(2 + x - x^2)^5$ by using the multinomial theorem. I was capable of performing this task only when the number of elements is 2 (using the binomial theorem), however, I am stuck on this one.
2018/03/02
[ "https://math.stackexchange.com/questions/2673627", "https://math.stackexchange.com", "https://math.stackexchange.com/users/500033/" ]
The trinomial expansion formula: $$(a+b+c)^n=\sum\_{i+j+k=n} {{n} \choose {i,j,k}} a^ib^jc^k = \sum\_{i+j+k=n} \frac{n!}{i!j!k!} a^ib^jc^k.$$ So: $$(2+x+(-x^2))^5=\sum\_{i+j+k=5} {5 \choose {i,j,k}} 2^ix^j(-x^2)^k= \\ \cdots+\frac{5!}{0!5!0!}2^0x^5(-x^2)^0+\frac{5!}{1!3!1!}2^1x^3(-x^2)^1+\frac{5!}{2!1!2!}2^2x^1(-x^2)^2...
Note that $x^5=(1)^2(x)^1(x^2)^2=(1)^1(x)^3(x^2)^1=(1)^0(x)^5(x^2)^0$. The coefficient is $\displaystyle \binom{5}{2}(2)^2\binom{3}{1}(1)^1(-1)^2+\binom{5}{1}(2)^1\binom{4}{3}(1)^3(-1)^1+\binom{5}{0}(2)^0\binom{5}{5}(1)^5(-1)^0=81$
64,988
I need to change default layout file (`1column.phtml`, `2columns-left.phtml`, etc.) based on currently logged in user (user group) and if he's logged in or not. Is changing the default template possible from inside the PHP code, I mean just layout, I know how to do PHP logic?
2015/04/28
[ "https://magento.stackexchange.com/questions/64988", "https://magento.stackexchange.com", "https://magento.stackexchange.com/users/13852/" ]
Another way to this create `different handler for each customer group` using event `controller_action_layout_load_before` then on layout xml set it template. Config.xml code is: ``` <frontend> <events> <controller_action_layout_load_before> <observers> <add_Cus...
Untested, but this should work: ``` $layout = Mage::app()->getLayout(); $roleId = Mage::getSingleton('customer/session')->getCustomerGroupId(); $role = Mage::getSingleton('customer/group')->load($roleId)->getData('customer_group_code'); if($role == "Wholesale") { $layout->getUpdate()->addUpdate('<reference name="...
64,988
I need to change default layout file (`1column.phtml`, `2columns-left.phtml`, etc.) based on currently logged in user (user group) and if he's logged in or not. Is changing the default template possible from inside the PHP code, I mean just layout, I know how to do PHP logic?
2015/04/28
[ "https://magento.stackexchange.com/questions/64988", "https://magento.stackexchange.com", "https://magento.stackexchange.com/users/13852/" ]
Another way to this create `different handler for each customer group` using event `controller_action_layout_load_before` then on layout xml set it template. Config.xml code is: ``` <frontend> <events> <controller_action_layout_load_before> <observers> <add_Cus...
You can change the template (layout file) in your controller. ``` <?php public function indexAction() { $this->loadLayout(); if (yourcondition){ // e.g. check user group $this->getLayout()->getBlock('root')->setTemplate('page/templatefile.phtml'); //changes the template } ...
64,988
I need to change default layout file (`1column.phtml`, `2columns-left.phtml`, etc.) based on currently logged in user (user group) and if he's logged in or not. Is changing the default template possible from inside the PHP code, I mean just layout, I know how to do PHP logic?
2015/04/28
[ "https://magento.stackexchange.com/questions/64988", "https://magento.stackexchange.com", "https://magento.stackexchange.com/users/13852/" ]
Another way to this create `different handler for each customer group` using event `controller_action_layout_load_before` then on layout xml set it template. Config.xml code is: ``` <frontend> <events> <controller_action_layout_load_before> <observers> <add_Cus...
The best and recommended way is using the layout handle that is uniquely created for this purpose. They are non another than `customer_logged_in` and `customer_logged_out`. ``` <customer_logged_in> <reference name="root"> <action method="setTemplate"><template>page/1column.phtml</template></action> </r...
46,107
DARPA (US Defense Advanced Research Projects Agency) has released a Request for Proposal for a Secure Messaging Platform using a blockchain framework. The following is the Objective paragraph from DARPA's call for proposal: > > OBJECTIVE: Create a secure messaging and transaction platform that separates the message...
2016/06/22
[ "https://bitcoin.stackexchange.com/questions/46107", "https://bitcoin.stackexchange.com", "https://bitcoin.stackexchange.com/users/32636/" ]
Here's what I think how such a system could work: * A relatively small but geographically distributed network of well-connected nodes maintain a ripple-like ledger (<https://ripple.com/files/ripple_consensus_whitepaper.pdf>) using a consensus algorithm. Each version of the ledger builds upon the previous version and c...
As I see it, the key part is at the very end: "traceable in a decentralized ledger". That feature isn't described in the EFF page you cite, and I'm not aware that any of the services listed provide it. To see why this is important, imagine a scenario like the following: Major Smith receives a message at 0400 hours fr...
14,207,093
I have a string of comma-delimited characters that I'm splitting. Some of these characters, though, could be commas. For example: `test = "a,b,c,d,,,e,f,g"` I know that `(?<!,),` is the regular expression for "any commas not preceded by a comma", and `,(?!,)` is the regular expression for "any comma followed by a com...
2013/01/08
[ "https://Stackoverflow.com/questions/14207093", "https://Stackoverflow.com", "https://Stackoverflow.com/users/823859/" ]
Similar issue tackled in [Regex: replace single characters](https://stackoverflow.com/questions/13875084/regex-replace-single-characters) Just merging the two regexes that you have, as `(?<!,),(?!,)` should do the trick, unless there are subtle differences between ruby and Java in this area. If you want to delete all...
the following will find a character followed by a comma and then remove the final comma by only taking the first character: ``` String test = "a,b,c,d,,,e,f,g"; Pattern p=Pattern.compile(".,|.$"); Matcher m=p.matcher(test); while(m.find() ){ System.out.pr...
14,207,093
I have a string of comma-delimited characters that I'm splitting. Some of these characters, though, could be commas. For example: `test = "a,b,c,d,,,e,f,g"` I know that `(?<!,),` is the regular expression for "any commas not preceded by a comma", and `,(?!,)` is the regular expression for "any comma followed by a com...
2013/01/08
[ "https://Stackoverflow.com/questions/14207093", "https://Stackoverflow.com", "https://Stackoverflow.com/users/823859/" ]
Similar issue tackled in [Regex: replace single characters](https://stackoverflow.com/questions/13875084/regex-replace-single-characters) Just merging the two regexes that you have, as `(?<!,),(?!,)` should do the trick, unless there are subtle differences between ruby and Java in this area. If you want to delete all...
Assuming that for data `"a,b,c,d,,,,,e,f,g"` split should look like `a b c d , , e f g` you could find pair of comas and place some special mark between them. This way you will know that coma with that special mark after it need to be removed, but coma with special mark before it need to stay. Code based on that idea c...
14,207,093
I have a string of comma-delimited characters that I'm splitting. Some of these characters, though, could be commas. For example: `test = "a,b,c,d,,,e,f,g"` I know that `(?<!,),` is the regular expression for "any commas not preceded by a comma", and `,(?!,)` is the regular expression for "any comma followed by a com...
2013/01/08
[ "https://Stackoverflow.com/questions/14207093", "https://Stackoverflow.com", "https://Stackoverflow.com/users/823859/" ]
Split by `,` only if there is no `,` before or after it . ``` String str = "a,b,c,d,,,e,f,g"; String regex = "(?<!,),|,(?!,)"; for(String s : str.split(regex)) { System.out.println(s); } ``` Output: > > > ``` > a > b > c > d > , > e > f > g > > ``` > >
Similar issue tackled in [Regex: replace single characters](https://stackoverflow.com/questions/13875084/regex-replace-single-characters) Just merging the two regexes that you have, as `(?<!,),(?!,)` should do the trick, unless there are subtle differences between ruby and Java in this area. If you want to delete all...
14,207,093
I have a string of comma-delimited characters that I'm splitting. Some of these characters, though, could be commas. For example: `test = "a,b,c,d,,,e,f,g"` I know that `(?<!,),` is the regular expression for "any commas not preceded by a comma", and `,(?!,)` is the regular expression for "any comma followed by a com...
2013/01/08
[ "https://Stackoverflow.com/questions/14207093", "https://Stackoverflow.com", "https://Stackoverflow.com/users/823859/" ]
You could use `(.)(?:,|$)` instead of lookahead/lookbehind. `(?:,|$)` will match the commas in between or the end of line for the last character, while `(.)` will capture the character. Obviously, this will work only if you are matching against a regex expression, not if you are using the expression on the String's ...
the following will find a character followed by a comma and then remove the final comma by only taking the first character: ``` String test = "a,b,c,d,,,e,f,g"; Pattern p=Pattern.compile(".,|.$"); Matcher m=p.matcher(test); while(m.find() ){ System.out.pr...
14,207,093
I have a string of comma-delimited characters that I'm splitting. Some of these characters, though, could be commas. For example: `test = "a,b,c,d,,,e,f,g"` I know that `(?<!,),` is the regular expression for "any commas not preceded by a comma", and `,(?!,)` is the regular expression for "any comma followed by a com...
2013/01/08
[ "https://Stackoverflow.com/questions/14207093", "https://Stackoverflow.com", "https://Stackoverflow.com/users/823859/" ]
Split by `,` only if there is no `,` before or after it . ``` String str = "a,b,c,d,,,e,f,g"; String regex = "(?<!,),|,(?!,)"; for(String s : str.split(regex)) { System.out.println(s); } ``` Output: > > > ``` > a > b > c > d > , > e > f > g > > ``` > >
the following will find a character followed by a comma and then remove the final comma by only taking the first character: ``` String test = "a,b,c,d,,,e,f,g"; Pattern p=Pattern.compile(".,|.$"); Matcher m=p.matcher(test); while(m.find() ){ System.out.pr...
14,207,093
I have a string of comma-delimited characters that I'm splitting. Some of these characters, though, could be commas. For example: `test = "a,b,c,d,,,e,f,g"` I know that `(?<!,),` is the regular expression for "any commas not preceded by a comma", and `,(?!,)` is the regular expression for "any comma followed by a com...
2013/01/08
[ "https://Stackoverflow.com/questions/14207093", "https://Stackoverflow.com", "https://Stackoverflow.com/users/823859/" ]
You could use `(.)(?:,|$)` instead of lookahead/lookbehind. `(?:,|$)` will match the commas in between or the end of line for the last character, while `(.)` will capture the character. Obviously, this will work only if you are matching against a regex expression, not if you are using the expression on the String's ...
Assuming that for data `"a,b,c,d,,,,,e,f,g"` split should look like `a b c d , , e f g` you could find pair of comas and place some special mark between them. This way you will know that coma with that special mark after it need to be removed, but coma with special mark before it need to stay. Code based on that idea c...
14,207,093
I have a string of comma-delimited characters that I'm splitting. Some of these characters, though, could be commas. For example: `test = "a,b,c,d,,,e,f,g"` I know that `(?<!,),` is the regular expression for "any commas not preceded by a comma", and `,(?!,)` is the regular expression for "any comma followed by a com...
2013/01/08
[ "https://Stackoverflow.com/questions/14207093", "https://Stackoverflow.com", "https://Stackoverflow.com/users/823859/" ]
Split by `,` only if there is no `,` before or after it . ``` String str = "a,b,c,d,,,e,f,g"; String regex = "(?<!,),|,(?!,)"; for(String s : str.split(regex)) { System.out.println(s); } ``` Output: > > > ``` > a > b > c > d > , > e > f > g > > ``` > >
You could use `(.)(?:,|$)` instead of lookahead/lookbehind. `(?:,|$)` will match the commas in between or the end of line for the last character, while `(.)` will capture the character. Obviously, this will work only if you are matching against a regex expression, not if you are using the expression on the String's ...
14,207,093
I have a string of comma-delimited characters that I'm splitting. Some of these characters, though, could be commas. For example: `test = "a,b,c,d,,,e,f,g"` I know that `(?<!,),` is the regular expression for "any commas not preceded by a comma", and `,(?!,)` is the regular expression for "any comma followed by a com...
2013/01/08
[ "https://Stackoverflow.com/questions/14207093", "https://Stackoverflow.com", "https://Stackoverflow.com/users/823859/" ]
Split by `,` only if there is no `,` before or after it . ``` String str = "a,b,c,d,,,e,f,g"; String regex = "(?<!,),|,(?!,)"; for(String s : str.split(regex)) { System.out.println(s); } ``` Output: > > > ``` > a > b > c > d > , > e > f > g > > ``` > >
Assuming that for data `"a,b,c,d,,,,,e,f,g"` split should look like `a b c d , , e f g` you could find pair of comas and place some special mark between them. This way you will know that coma with that special mark after it need to be removed, but coma with special mark before it need to stay. Code based on that idea c...
62,767,755
Trying to align text elements as shown in the image below: [![enter image description here](https://i.stack.imgur.com/EdcmS.png)](https://i.stack.imgur.com/EdcmS.png) How to do it in Jetpack Compose? Normally I would use a Linear Layout with vertical orientation and TextViews with a `rotation of 90`. Wondering how t...
2020/07/07
[ "https://Stackoverflow.com/questions/62767755", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2735557/" ]
*compose\_verion: `1.0.0-beta02`* To rotate an element you can use `Modifier.rotate()` modifier ```kotlin Column { Text(text = "text", modifier = Modifier.rotate(-90f)) Text(text = "text", modifier = Modifier.rotate(-90f)) Text(text = "text", modifier = Modifier.rotate(-90f)) } ```
I didn't find a way to have a "wrap\_content" after rotation but I hope it helps: ``` Column (...) { Text("Element 1", style = TextStyle(textAlign = TextAlign.Center), modifier = Modifier .drawBackground(color = Color.Red) .padding(16.dp) .size(20.dp, 100.dp) .drawLa...
62,767,755
Trying to align text elements as shown in the image below: [![enter image description here](https://i.stack.imgur.com/EdcmS.png)](https://i.stack.imgur.com/EdcmS.png) How to do it in Jetpack Compose? Normally I would use a Linear Layout with vertical orientation and TextViews with a `rotation of 90`. Wondering how t...
2020/07/07
[ "https://Stackoverflow.com/questions/62767755", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2735557/" ]
*compose\_verion: `1.0.0-beta02`* To rotate an element you can use `Modifier.rotate()` modifier ```kotlin Column { Text(text = "text", modifier = Modifier.rotate(-90f)) Text(text = "text", modifier = Modifier.rotate(-90f)) Text(text = "text", modifier = Modifier.rotate(-90f)) } ```
The solution with a custom modifier from [How to show vertical text with proper size/layout in jetpack compose](https://stackoverflow.com/questions/70057396/how-to-show-vertical-text-with-proper-size-layout-in-jetpack-compose) worked for me: ```kotlin fun Modifier.vertical() = layout { measurable, constraints -> v...
127,756
I am migrating records to Salesforce.com, and therefore need to check total record counts frequently. Some objects have over 500,000 records. The simple 'Count' functions max out at 50,000 records so I therefore created a quick generic Batchable class to help, which really works fine, and takes about 6 minutes to cou...
2016/06/17
[ "https://salesforce.stackexchange.com/questions/127756", "https://salesforce.stackexchange.com", "https://salesforce.stackexchange.com/users/-1/" ]
In workbench, use query as Select count() from object. It works miraculously and gives exact count quickly. That 50,000 record limitations isn't there if we query via API. It might get timeout the first time, but if you do that for 5-6 times simultaneously in different tabs it will cache and show you data. [![enter...
Firstly, consider the sage advice to use the SOAP API to run a SOQL query using `count()`. As mentioned, the SOAP API doesn't have a direct limit on the number of records returned. See [SOAP API Call Limits](https://developer.salesforce.com/docs/atlas.en-us.salesforce_app_limits_cheatsheet.meta/salesforce_app_limits_ch...
4,484,728
I have a bit of trouble proving an adjugate matrix equality for $A\_{n\times n} = [a\_{ij}]$, $$ \mbox{adj} (A) = \left[ \frac{\partial }{\partial a\_{ij} } \det(A) \right]^T, \quad i, j = 1,\dots,n $$ I tried by definition $$ \mbox{adj} (A) = \left[ (-1)^{i+j} \sum\_{\sigma \in C\_n } \left( \mbox{sgn} (\sigma) \pr...
2022/07/02
[ "https://math.stackexchange.com/questions/4484728", "https://math.stackexchange.com", "https://math.stackexchange.com/users/897319/" ]
You can use Laplace expansion [wiki](https://en.wikipedia.org/wiki/Laplace_expansion) to write $$ \det(\mathbf{A}) = \sum\_j C\_{ij} A\_{ij} $$ where $C\_{ij}$ is called the cofactor of $A\_{ij}$. It follows $$ \frac{\partial \det(\mathbf{A})}{\partial A\_{ij}} = C\_{ij} $$ or in matrix form $$ \frac{\partial \det(\ma...
Let's prove this identity in a slightly different way than the way you have tried to do. Let $\varphi^{\ell}$ be the only not decreasing bijection between the sets $\{1,2,\ldots, n-2,n-1\}$ and $\{1,2,\ldots,\ell-1,\ell+1,\ldots n-1,n\}$. Observe that for all fixed $\ell \in \{1,2,\ldots, n-1,n\}$ we have $$ \varphi^{\...
4,484,728
I have a bit of trouble proving an adjugate matrix equality for $A\_{n\times n} = [a\_{ij}]$, $$ \mbox{adj} (A) = \left[ \frac{\partial }{\partial a\_{ij} } \det(A) \right]^T, \quad i, j = 1,\dots,n $$ I tried by definition $$ \mbox{adj} (A) = \left[ (-1)^{i+j} \sum\_{\sigma \in C\_n } \left( \mbox{sgn} (\sigma) \pr...
2022/07/02
[ "https://math.stackexchange.com/questions/4484728", "https://math.stackexchange.com", "https://math.stackexchange.com/users/897319/" ]
You can use Laplace expansion [wiki](https://en.wikipedia.org/wiki/Laplace_expansion) to write $$ \det(\mathbf{A}) = \sum\_j C\_{ij} A\_{ij} $$ where $C\_{ij}$ is called the cofactor of $A\_{ij}$. It follows $$ \frac{\partial \det(\mathbf{A})}{\partial A\_{ij}} = C\_{ij} $$ or in matrix form $$ \frac{\partial \det(\ma...
You can surely use the Laplace Expansion, but (imo) it is also interesting to see it right from the definition of the determinant and writing the $k$-th column as $\vec{a\_k}=\sum\_{i\_k=1}^n a\_{i\_k,k} \, \vec{e\_{i\_k}}$ where $\vec{e\_1}=(1,0,0,...,0)^t$, $\vec{e\_2}=(0,1,0,...,0)^t, ..., \vec{e\_n}=(0,0,0,...,1)^t...
29,265,783
I am trying to create a custom report using Axosoft's Report Builder though I have one big issue to tackle. The report will contain calculated totals and counts of the specific items that are pulled in from the database to display. One such field (Custom\_163) is a boolean where **true** will have it be one type of ite...
2015/03/25
[ "https://Stackoverflow.com/questions/29265783", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4713681/" ]
The iPhone Simulator files have moved and can be a bit of a pain to find now. Each simulated device has a folder in ~/Library/Developer/CoreSimulator/Devices. You can root around in there until you find the simulator you're looking for. I wrote a tool to help locate the sandbox for each simulated device on which you've...
for me it it is `Library/Developer/CoreSimulator/Devices/C7E8D457-BFAB-43DA-8B0C-D9010BBB1D88/data/Containers/Data/Application/6B7DC6FA-2379-468C-A74B-60910A1CDCD1/Documents` device id and application id will be different for you though. this would give you documents directory for your app. ``` NSArray *paths =...
29,265,783
I am trying to create a custom report using Axosoft's Report Builder though I have one big issue to tackle. The report will contain calculated totals and counts of the specific items that are pulled in from the database to display. One such field (Custom\_163) is a boolean where **true** will have it be one type of ite...
2015/03/25
[ "https://Stackoverflow.com/questions/29265783", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4713681/" ]
The iPhone Simulator files have moved and can be a bit of a pain to find now. Each simulated device has a folder in ~/Library/Developer/CoreSimulator/Devices. You can root around in there until you find the simulator you're looking for. I wrote a tool to help locate the sandbox for each simulated device on which you've...
OK The whole Problem lies in the fact that you need to open the Finder >> View >> Show View Options and then click to turn on Library. Why would someone hide this so deep and obscurely?
29,265,783
I am trying to create a custom report using Axosoft's Report Builder though I have one big issue to tackle. The report will contain calculated totals and counts of the specific items that are pulled in from the database to display. One such field (Custom\_163) is a boolean where **true** will have it be one type of ite...
2015/03/25
[ "https://Stackoverflow.com/questions/29265783", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4713681/" ]
The iPhone Simulator files have moved and can be a bit of a pain to find now. Each simulated device has a folder in ~/Library/Developer/CoreSimulator/Devices. You can root around in there until you find the simulator you're looking for. I wrote a tool to help locate the sandbox for each simulated device on which you've...
You can use **Core Data Lab** to automatically find and view the database files of any Core Data app running in the simulator. Info page: <https://betamagic.nl/products/coredatalab.html> Free 14-trial: <https://betamagic.nl/downloads/Core%20Data%20Lab%20Trial.zip> *Diclaimer: I'm the creator of this tool.*
29,265,783
I am trying to create a custom report using Axosoft's Report Builder though I have one big issue to tackle. The report will contain calculated totals and counts of the specific items that are pulled in from the database to display. One such field (Custom\_163) is a boolean where **true** will have it be one type of ite...
2015/03/25
[ "https://Stackoverflow.com/questions/29265783", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4713681/" ]
for me it it is `Library/Developer/CoreSimulator/Devices/C7E8D457-BFAB-43DA-8B0C-D9010BBB1D88/data/Containers/Data/Application/6B7DC6FA-2379-468C-A74B-60910A1CDCD1/Documents` device id and application id will be different for you though. this would give you documents directory for your app. ``` NSArray *paths =...
You can use **Core Data Lab** to automatically find and view the database files of any Core Data app running in the simulator. Info page: <https://betamagic.nl/products/coredatalab.html> Free 14-trial: <https://betamagic.nl/downloads/Core%20Data%20Lab%20Trial.zip> *Diclaimer: I'm the creator of this tool.*
29,265,783
I am trying to create a custom report using Axosoft's Report Builder though I have one big issue to tackle. The report will contain calculated totals and counts of the specific items that are pulled in from the database to display. One such field (Custom\_163) is a boolean where **true** will have it be one type of ite...
2015/03/25
[ "https://Stackoverflow.com/questions/29265783", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4713681/" ]
OK The whole Problem lies in the fact that you need to open the Finder >> View >> Show View Options and then click to turn on Library. Why would someone hide this so deep and obscurely?
You can use **Core Data Lab** to automatically find and view the database files of any Core Data app running in the simulator. Info page: <https://betamagic.nl/products/coredatalab.html> Free 14-trial: <https://betamagic.nl/downloads/Core%20Data%20Lab%20Trial.zip> *Diclaimer: I'm the creator of this tool.*
502,185
I am running OpenSUSE Tumbleweed. I don't recall what choice I made during the installation process months ago, but I am running out of disk space and need to find a solution. Can I just move my mount point for my `/home` partition? Would I need to format this partition first? What other steps? If it is more complic...
2019/02/21
[ "https://unix.stackexchange.com/questions/502185", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/304885/" ]
Don't do this. Getting the two lines of output in the wrong order should have been a hint that something was wrong. When you execute your script using ``` ssh centos@myhost.com 'bash -s' < script.sh ``` the following happens: 1. The script is passed to `bash -s` on the shells standard input stream. 2. The script...
You need to execute the commands in the shell that you start with `sudo`. ``` $ f() { sudo -Eu root bash -c whoami } $ f root ```
50,809,542
I am trying to map an observable, get a value from my returned observable then feed this value into another observable and return that result. Here is what I have so far: ```typescript getJobsByUser(user: User): Observable<Job[]> { return this.getUsersGroupsAsObservable(user.uid, 'contacts').map(groups => { ...
2018/06/12
[ "https://Stackoverflow.com/questions/50809542", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4372290/" ]
Below approach discussed in detail at : [Way to handle Parallel Multiple Requests](http://pranayamr.blogspot.com/2018/06/way-to-handle-parallel-multiple-requests.html) Below approach make use of `mergemap` ```typescript getJobsByUser(user: User) { return this.getUsersGroupsAsObservable(user.uid, 'contacts').pipe...
Ok, so first you are missing two `return` statements in `getJobsByUser` function (shown below with capital `RETURN`: ```typescript getJobsByUser(user: User): Observable<Job[]> { return this.getUsersGroupsAsObservable(user.uid, 'contacts').map(groups => { RETURN groups.map(group => { RETURN this.getJo...
56,984,043
Most of the applications consuming my add-in return "C:\Users\[username]\AppData\Local\Temp\" path. But one application is returning "C:\Users\[username]\AppData\Local\Temp\1affa5dd-2f26-4c96-9965-7a78f5c76321\". The GUID in the end changes every time I launch the application. The application that I am running my add-...
2019/07/11
[ "https://Stackoverflow.com/questions/56984043", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7693244/" ]
As per [this forum link](https://forums.autodesk.com/t5/revit-api-forum/revit-2020-temp-path-changes-every-session/td-p/8759058), `Revit 2020` alters the value returned as per what you are seeing. > > Since Revit 2020 the requested temp path contains an additional guid > at the end of the path, which changes after e...
I made an small fix wich splits the Path by the '\' character and composes a string until the word 'Temp', it works but **consider it a concept**. ``` private void concept() { string fullpath = Path.GetTempPath(); string[] ph = fullpath.Split('\\'); bool fix = false; ...
56,984,043
Most of the applications consuming my add-in return "C:\Users\[username]\AppData\Local\Temp\" path. But one application is returning "C:\Users\[username]\AppData\Local\Temp\1affa5dd-2f26-4c96-9965-7a78f5c76321\". The GUID in the end changes every time I launch the application. The application that I am running my add-...
2019/07/11
[ "https://Stackoverflow.com/questions/56984043", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7693244/" ]
As per [this forum link](https://forums.autodesk.com/t5/revit-api-forum/revit-2020-temp-path-changes-every-session/td-p/8759058), `Revit 2020` alters the value returned as per what you are seeing. > > Since Revit 2020 the requested temp path contains an additional guid > at the end of the path, which changes after e...
```cs Path.Combine( Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "AppData", "Local", "Temp"); ```
56,984,043
Most of the applications consuming my add-in return "C:\Users\[username]\AppData\Local\Temp\" path. But one application is returning "C:\Users\[username]\AppData\Local\Temp\1affa5dd-2f26-4c96-9965-7a78f5c76321\". The GUID in the end changes every time I launch the application. The application that I am running my add-...
2019/07/11
[ "https://Stackoverflow.com/questions/56984043", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7693244/" ]
I made an small fix wich splits the Path by the '\' character and composes a string until the word 'Temp', it works but **consider it a concept**. ``` private void concept() { string fullpath = Path.GetTempPath(); string[] ph = fullpath.Split('\\'); bool fix = false; ...
```cs Path.Combine( Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "AppData", "Local", "Temp"); ```
18,675,771
Is there some sort of boolean that I can use to check whether the instance of a form is loaded, or otherwise wait until the form is loaded? for example: ``` While(form_loaded == false) { Try { //do something } catch { }//do try catch so code won't barf } ``` I keep getting the following exception: > >...
2013/09/07
[ "https://Stackoverflow.com/questions/18675771", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2756489/" ]
try to use the shown event something like this ``` public partial class Form1 : Form { public Form1() { InitializeComponent(); this.Shown += new System.EventHandler(this.Form1_Shown); } private void Form1_Shown(object sender, EventArgs e) { } } ``` hope this help
You have a `Loaded` and a `Shown` event to pick from. Windows is event driven so never wait for something in a loop.
18,675,771
Is there some sort of boolean that I can use to check whether the instance of a form is loaded, or otherwise wait until the form is loaded? for example: ``` While(form_loaded == false) { Try { //do something } catch { }//do try catch so code won't barf } ``` I keep getting the following exception: > >...
2013/09/07
[ "https://Stackoverflow.com/questions/18675771", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2756489/" ]
try to use the shown event something like this ``` public partial class Form1 : Form { public Form1() { InitializeComponent(); this.Shown += new System.EventHandler(this.Form1_Shown); } private void Form1_Shown(object sender, EventArgs e) { } } ``` hope this help
The first event that is triggered after form is fully loaded is the `Shown` event. use it... --- According to [MSDN](http://msdn.microsoft.com/en-us/library/86faxx0d.aspx) the event sequence is : **When application starts:** * Control.HandleCreated * Control.BindingContextChanged * Form.Load * Control.VisibleCha...
25,583,570
I am trying to get a "datetime" from a csv file and insert it into MySql Database. What am I doing wrong? Thanks in advance! ``` while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) { $date = new Datetime(); $this->date->format('Y-d-m H:i:s', ($data[3])); ...
2014/08/30
[ "https://Stackoverflow.com/questions/25583570", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3594622/" ]
I ran into the same problem while building the centos 5 version of postgresql (8.2) for centos 7 (3.10.0-229.el7.x86\_64.) I wasn't able to make it work with gcc-4.8.3 using the CFLAGS="-O1" trick, but switching to clang (3.4.2) as the compiler (CC=clang) did work for me (and it worked at the default -O2 optimization ...
@Rhim appears to be correct - [you've hit what was assumed to be a compiler bug](http://www.postgresql.org/message-id/17948.1365090217@sss.pgh.pa.us). You might want to update to the latest gcc packages then `make clean`, re-run `configure` with `CFLAGS="-O1"` as an argument, and then re-compile. BTW, this suggests th...
25,583,570
I am trying to get a "datetime" from a csv file and insert it into MySql Database. What am I doing wrong? Thanks in advance! ``` while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) { $date = new Datetime(); $this->date->format('Y-d-m H:i:s', ($data[3])); ...
2014/08/30
[ "https://Stackoverflow.com/questions/25583570", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3594622/" ]
I ran into the same problem after compiling postgresql 8.1.4 with gcc 4.9.3. The problem seems to be the way postgres uses to represent variable length arrays: ``` typedef struct { int32 size; /* these fields must match ArrayType! */ int ndim; int flags; Oid ele...
@Rhim appears to be correct - [you've hit what was assumed to be a compiler bug](http://www.postgresql.org/message-id/17948.1365090217@sss.pgh.pa.us). You might want to update to the latest gcc packages then `make clean`, re-run `configure` with `CFLAGS="-O1"` as an argument, and then re-compile. BTW, this suggests th...
25,583,570
I am trying to get a "datetime" from a csv file and insert it into MySql Database. What am I doing wrong? Thanks in advance! ``` while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) { $date = new Datetime(); $this->date->format('Y-d-m H:i:s', ($data[3])); ...
2014/08/30
[ "https://Stackoverflow.com/questions/25583570", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3594622/" ]
I ran into the same problem while building the centos 5 version of postgresql (8.2) for centos 7 (3.10.0-229.el7.x86\_64.) I wasn't able to make it work with gcc-4.8.3 using the CFLAGS="-O1" trick, but switching to clang (3.4.2) as the compiler (CC=clang) did work for me (and it worked at the default -O2 optimization ...
I ran in the same problem. I have a production database in release 9.1 of Postgres and i must reinstall it on a new host. I’m trying this on a Centos8 and a Debian11 gcc version 8.5.0 I used the CFLAGS environment variable : ``` export CFLAGS=-fno-aggressive-loop-optimizations ``` Others -O1 or clang didn’t work at...
25,583,570
I am trying to get a "datetime" from a csv file and insert it into MySql Database. What am I doing wrong? Thanks in advance! ``` while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) { $date = new Datetime(); $this->date->format('Y-d-m H:i:s', ($data[3])); ...
2014/08/30
[ "https://Stackoverflow.com/questions/25583570", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3594622/" ]
I ran into the same problem after compiling postgresql 8.1.4 with gcc 4.9.3. The problem seems to be the way postgres uses to represent variable length arrays: ``` typedef struct { int32 size; /* these fields must match ArrayType! */ int ndim; int flags; Oid ele...
I ran in the same problem. I have a production database in release 9.1 of Postgres and i must reinstall it on a new host. I’m trying this on a Centos8 and a Debian11 gcc version 8.5.0 I used the CFLAGS environment variable : ``` export CFLAGS=-fno-aggressive-loop-optimizations ``` Others -O1 or clang didn’t work at...
57,019,938
When click middle position of the HTML textarea tag , it automatic takes 4 space. I want,dont take any space in textarea. ```html <textarea rows="2" cols="40" name="chief_complaints" class="form-control" value=""> </textarea> ``` How to solve this problem?
2019/07/13
[ "https://Stackoverflow.com/questions/57019938", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10865498/" ]
According to the standard, the `textarea` element does not support the `value` attribute, instead of that everything between `<textarea>` and `</textarea>` belongs to the value of the text area. To get rid of any spaces and newlines you have to write `<textarea></textarea>` without anything between the start and the en...
`<textarea>[DON NOT USE BREAK LINES AND SPACES HERE, LET IT BE BLANK]</textarea>` For example: `<textarea rows="2" cols="10">Your Content</textarea>`
7,463,838
Why does the following code output `0` indices? I want the indices to be: `0 1 2 3 4 ...`. How do I fix it? **Code:** ``` foreach ($query->result() as $row){ $data = json_decode($row->residence,true); foreach($data as $datum){ $newArray = array_chunk($datum['units'], 3); foreach($newArray as ...
2011/09/18
[ "https://Stackoverflow.com/questions/7463838", "https://Stackoverflow.com", "https://Stackoverflow.com/users/924353/" ]
In the third foreach, you need to add the $output to a new array, then print\_r after the loop. E.g. ``` foreach ($query->result() as $row){ $data = json_decode($row->residence,true); foreach($data as $datum){ $newArray = array_chunk($datum['units'], 3); $count = 0; foreach($ne...
Try this instead ``` $output[] = array(implode(",",$newA)); ```
7,463,838
Why does the following code output `0` indices? I want the indices to be: `0 1 2 3 4 ...`. How do I fix it? **Code:** ``` foreach ($query->result() as $row){ $data = json_decode($row->residence,true); foreach($data as $datum){ $newArray = array_chunk($datum['units'], 3); foreach($newArray as ...
2011/09/18
[ "https://Stackoverflow.com/questions/7463838", "https://Stackoverflow.com", "https://Stackoverflow.com/users/924353/" ]
On this line `$output = array(implode(",",$newA));` you are creating a new array for each set of results, so the offset with always start at 0. Try this: ``` $output = array(); foreach ($query->result() as $row){ $data = json_decode($row->residence,true); foreach($data as $unit) { $output[] = implode...
Try this instead ``` $output[] = array(implode(",",$newA)); ```
7,463,838
Why does the following code output `0` indices? I want the indices to be: `0 1 2 3 4 ...`. How do I fix it? **Code:** ``` foreach ($query->result() as $row){ $data = json_decode($row->residence,true); foreach($data as $datum){ $newArray = array_chunk($datum['units'], 3); foreach($newArray as ...
2011/09/18
[ "https://Stackoverflow.com/questions/7463838", "https://Stackoverflow.com", "https://Stackoverflow.com/users/924353/" ]
In the third foreach, you need to add the $output to a new array, then print\_r after the loop. E.g. ``` foreach ($query->result() as $row){ $data = json_decode($row->residence,true); foreach($data as $datum){ $newArray = array_chunk($datum['units'], 3); $count = 0; foreach($ne...
You can do so by using a standard for loop like this instead of the foreach loop: ``` for ($i = 0; $i < count($newArray); $i++) { // ... } ```
7,463,838
Why does the following code output `0` indices? I want the indices to be: `0 1 2 3 4 ...`. How do I fix it? **Code:** ``` foreach ($query->result() as $row){ $data = json_decode($row->residence,true); foreach($data as $datum){ $newArray = array_chunk($datum['units'], 3); foreach($newArray as ...
2011/09/18
[ "https://Stackoverflow.com/questions/7463838", "https://Stackoverflow.com", "https://Stackoverflow.com/users/924353/" ]
In the third foreach, you need to add the $output to a new array, then print\_r after the loop. E.g. ``` foreach ($query->result() as $row){ $data = json_decode($row->residence,true); foreach($data as $datum){ $newArray = array_chunk($datum['units'], 3); $count = 0; foreach($ne...
You are creating all separate arrays every time you call the `array` function. To add items to the same array, use `$output[] = $valueToAdd`: ``` $output = array(); foreach ($query->result() as $row){ $data = json_decode($row->residence,true); foreach($data as $datum){ $newArray = array_chunk($datum['u...
7,463,838
Why does the following code output `0` indices? I want the indices to be: `0 1 2 3 4 ...`. How do I fix it? **Code:** ``` foreach ($query->result() as $row){ $data = json_decode($row->residence,true); foreach($data as $datum){ $newArray = array_chunk($datum['units'], 3); foreach($newArray as ...
2011/09/18
[ "https://Stackoverflow.com/questions/7463838", "https://Stackoverflow.com", "https://Stackoverflow.com/users/924353/" ]
On this line `$output = array(implode(",",$newA));` you are creating a new array for each set of results, so the offset with always start at 0. Try this: ``` $output = array(); foreach ($query->result() as $row){ $data = json_decode($row->residence,true); foreach($data as $unit) { $output[] = implode...
You can do so by using a standard for loop like this instead of the foreach loop: ``` for ($i = 0; $i < count($newArray); $i++) { // ... } ```
7,463,838
Why does the following code output `0` indices? I want the indices to be: `0 1 2 3 4 ...`. How do I fix it? **Code:** ``` foreach ($query->result() as $row){ $data = json_decode($row->residence,true); foreach($data as $datum){ $newArray = array_chunk($datum['units'], 3); foreach($newArray as ...
2011/09/18
[ "https://Stackoverflow.com/questions/7463838", "https://Stackoverflow.com", "https://Stackoverflow.com/users/924353/" ]
On this line `$output = array(implode(",",$newA));` you are creating a new array for each set of results, so the offset with always start at 0. Try this: ``` $output = array(); foreach ($query->result() as $row){ $data = json_decode($row->residence,true); foreach($data as $unit) { $output[] = implode...
You are creating all separate arrays every time you call the `array` function. To add items to the same array, use `$output[] = $valueToAdd`: ``` $output = array(); foreach ($query->result() as $row){ $data = json_decode($row->residence,true); foreach($data as $datum){ $newArray = array_chunk($datum['u...
29,482,384
How to add an entry in to the iPhone system settings to add custom service authentication? How to link it with the My Application? I am looking something similar to Facebook and Twitter options available in the System settings for authentication.
2015/04/07
[ "https://Stackoverflow.com/questions/29482384", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1450836/" ]
``` vec c; c.reserve(a.size()); std::transform(a.begin(), a.end(), b.begin(), std::back_inserter(c), std::max<double>); ```
Igor's solution is great, but I had trouble compiling it. I found I needed to wrap std::max in an anonymous function to get it to compile. Here are two template functions which allow taking the pairwise maximum for an arbitrary number of vectors: ``` // pairwise maximum ...
34,705,737
I want to develop an application from which user can send an email (without using Intent) from anywhere and on the other hand it can be received by me on my Gmail id. Here's my code, when I click on button.. ``` switch (v.getId()) { case R.id.bBack: finish(); break; case R.id.bSend: // sen...
2016/01/10
[ "https://Stackoverflow.com/questions/34705737", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5755785/" ]
Finally, found one possible answer to this question after a long research. Simply, in my android code I used AsyncTask and passed the values of my EditText from a form in a url like this: ``` String url_select = "http://link_to_my_website/my_page.php?phone="+phone.getText().toString()+"&name="+name.getText().toString...
Integrated java mail api to your code.JavaMail API provides a platform-independent and protocol-independent framework to build mail and messaging applications. You can download it from here: <https://code.google.com/p/javamail-android/downloads/list> or you can send email by using smtp: [Sending mail in android with...
37,175,264
I am trying to do a migration with Django to a MySQL database, but I am receiving this error: > > (1005, "Can't create table '#sql-60\_f71' (errno: 13)") > > > I have done several migrations before to this database and this is the first time I am seeing this error. The thing that really confuses me is that my mig...
2016/05/12
[ "https://Stackoverflow.com/questions/37175264", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5285571/" ]
Found the answer here <https://stackoverflow.com/a/4037158/5285571>. I was having trouble because my database was not located at `/var/lib/mysql`. I ended up having to do `sudo chown -R mysql:mysql /usr/local/mysql/data/my_database`.
I was also facing the same problem, but I figured out this one. I don't know how it worked. But for god sake, it worked for me and I am not a professional in programming, but I am learning. The first time I created the database using like "/var/lib/mysql then mkdir a", but it didn't work, so I created the database in...
1,695,546
I believe the conventional way to deploy Crystal Report with a .NET program is to set it as a prerequisite in the publish settings and then a .msi will be packaged with the ClickOnce files on the web/network/CD/wtv. When the user runs setup.exe, it will check whether Crystal Report is on the client computer. If not, it...
2009/11/08
[ "https://Stackoverflow.com/questions/1695546", "https://Stackoverflow.com", "https://Stackoverflow.com/users/167638/" ]
I hate to be the bearer of bad news, but Crystal Reports for Visual Studio .NET is not designed for click-once deployment. Crystal Reports is a native application, and the assemblies you use to deal with the report depend on many non-.NET libraries. Lots of COM objects that require registration, support DLL's that hav...
I am almost sure that there is a redistributable package of libraries that ships with the final version of Crystal Reports when you buy it (not sure if this package ships with the Visual Studio version).
1,695,546
I believe the conventional way to deploy Crystal Report with a .NET program is to set it as a prerequisite in the publish settings and then a .msi will be packaged with the ClickOnce files on the web/network/CD/wtv. When the user runs setup.exe, it will check whether Crystal Report is on the client computer. If not, it...
2009/11/08
[ "https://Stackoverflow.com/questions/1695546", "https://Stackoverflow.com", "https://Stackoverflow.com/users/167638/" ]
I hate to be the bearer of bad news, but Crystal Reports for Visual Studio .NET is not designed for click-once deployment. Crystal Reports is a native application, and the assemblies you use to deal with the report depend on many non-.NET libraries. Lots of COM objects that require registration, support DLL's that hav...
I'd provide a separate link to the Crystal Redistributable on the installation site and build a check in the ClickOnce app for the presence of the Crystal files.
1,695,546
I believe the conventional way to deploy Crystal Report with a .NET program is to set it as a prerequisite in the publish settings and then a .msi will be packaged with the ClickOnce files on the web/network/CD/wtv. When the user runs setup.exe, it will check whether Crystal Report is on the client computer. If not, it...
2009/11/08
[ "https://Stackoverflow.com/questions/1695546", "https://Stackoverflow.com", "https://Stackoverflow.com/users/167638/" ]
I hate to be the bearer of bad news, but Crystal Reports for Visual Studio .NET is not designed for click-once deployment. Crystal Reports is a native application, and the assemblies you use to deal with the report depend on many non-.NET libraries. Lots of COM objects that require registration, support DLL's that hav...
You can add CR runtime merge module to your click-one MSI package, MSI will take care of merge module installation, It merges crystal report runtime installation files\process to your application click-one package. <https://origin.softwaredownloads.sap.com/public/site/index.html>
1,695,546
I believe the conventional way to deploy Crystal Report with a .NET program is to set it as a prerequisite in the publish settings and then a .msi will be packaged with the ClickOnce files on the web/network/CD/wtv. When the user runs setup.exe, it will check whether Crystal Report is on the client computer. If not, it...
2009/11/08
[ "https://Stackoverflow.com/questions/1695546", "https://Stackoverflow.com", "https://Stackoverflow.com/users/167638/" ]
If you are dead-set on doing it yourself, you can monitor the installation of the Crystal Reports runtime to see what files/registry entries/settings it creates/modifies. Alternatively, you can decompile the msi or download and decompile the mst transform file from Crystal Reports. Once you know what it is doing, write...
I am almost sure that there is a redistributable package of libraries that ships with the final version of Crystal Reports when you buy it (not sure if this package ships with the Visual Studio version).
1,695,546
I believe the conventional way to deploy Crystal Report with a .NET program is to set it as a prerequisite in the publish settings and then a .msi will be packaged with the ClickOnce files on the web/network/CD/wtv. When the user runs setup.exe, it will check whether Crystal Report is on the client computer. If not, it...
2009/11/08
[ "https://Stackoverflow.com/questions/1695546", "https://Stackoverflow.com", "https://Stackoverflow.com/users/167638/" ]
If you are dead-set on doing it yourself, you can monitor the installation of the Crystal Reports runtime to see what files/registry entries/settings it creates/modifies. Alternatively, you can decompile the msi or download and decompile the mst transform file from Crystal Reports. Once you know what it is doing, write...
I'd provide a separate link to the Crystal Redistributable on the installation site and build a check in the ClickOnce app for the presence of the Crystal files.
1,695,546
I believe the conventional way to deploy Crystal Report with a .NET program is to set it as a prerequisite in the publish settings and then a .msi will be packaged with the ClickOnce files on the web/network/CD/wtv. When the user runs setup.exe, it will check whether Crystal Report is on the client computer. If not, it...
2009/11/08
[ "https://Stackoverflow.com/questions/1695546", "https://Stackoverflow.com", "https://Stackoverflow.com/users/167638/" ]
If you are dead-set on doing it yourself, you can monitor the installation of the Crystal Reports runtime to see what files/registry entries/settings it creates/modifies. Alternatively, you can decompile the msi or download and decompile the mst transform file from Crystal Reports. Once you know what it is doing, write...
You can add CR runtime merge module to your click-one MSI package, MSI will take care of merge module installation, It merges crystal report runtime installation files\process to your application click-one package. <https://origin.softwaredownloads.sap.com/public/site/index.html>
16,901,370
The `ROOT` application contains all of the items described (classic theme, approx 10 layouts and numerous portlets). Is it possible or good practice to create own packages like this? How to? Please, give a hint.
2013/06/03
[ "https://Stackoverflow.com/questions/16901370", "https://Stackoverflow.com", "https://Stackoverflow.com/users/258483/" ]
Theoretically it is possible to have a single project with a Portlet, Theme, Layout and a Hook all packed in one. But it is not at all a good-practice to have all the four types togather, from both maintenance and development perspective. Though sometimes you may have a portlet and hook in one project if they are som...
Generally one would add all portlets in one war so that they can access the service without any problems and to save context reloading time. However Themes with portlets might not be a good idea always since we change theme.. and thus while updating portlets reloading in unnecessary. Well that's once in months but st...
15,676,858
In my app I want to draw a line on imageview.I want to write a line with finger when i touch it.This is my requirement.For that i googled alot And fallow the bellow link: [How to draw a Line in ImageView on Android?](https://stackoverflow.com/questions/6178896/how-to-draw-a-line-in-imageview-on-android). In my activ...
2013/03/28
[ "https://Stackoverflow.com/questions/15676858", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1717339/" ]
use positional ("$") operator. ``` // single db.collection.update({ _id: ..., "elements.id": "20" }, { $set: { "elements.$.status": "status" } }) // all db.collection.update({ "elements.id": "20" }, { $set: { "elements.$.status": "status" } }, { multi: true }) ```
You have to use elemMatch (<http://docs.mongodb.org/manual/reference/projection/elemMatch/>) . To match both the items of the array like status and id 20 , then you can use the $set command. The reason behind using elemMatch is that it will make sure that both the criteria is matched on the same subdocument before retu...
76,157
How do I draw specific filled regions in `DateListPlot`? I trying to plot something like this: ![enter image description here](https://i.stack.imgur.com/Dp0LF.jpg) Thanks
2015/03/01
[ "https://mathematica.stackexchange.com/questions/76157", "https://mathematica.stackexchange.com", "https://mathematica.stackexchange.com/users/8555/" ]
One approach is to use Inset. ``` DateListPlot[{1, 1, 2, 3, 5, 8, 11}, {2000, 8}, Prolog -> Inset[Graphics[{GrayLevel[.6], Rectangle[Scaled[{.5, .1}], Scaled[{.7, .3}]], Rectangle[Scaled[{.7, .3}], Scaled[{.9, .5}]], Rectangle[Scaled[{.9, .5}], Scaled[{1.1, .7}]]}]]] ``` ![enter image description here](http...
Using @bbgodfrey's example ``` list = {1, 1, 2, 3, 5, 8, 11}; pnts = Thread[{AbsoluteTime /@ ({2000, #} & /@ Range[8, 14])[[3 ;; 6]], list[[3 ;; 6]]}]; DynamicModule[{pts = pnts}, LocatorPane[Dynamic[pts], DateListPlot[{1, 1, 2, 3, 5, 8, 11}, {2000, 8}, Epilog -> {Opacity[.5, Gray], Dynamic[Rectangle @@@ Partition[p...
746,274
I have a data file consists of several rows and columns with numeric and string data. Some string and numeric patterns are repeated. I need to extract last repeated pattern. For example; ``` 715 ANKR PRN 1 value 1 760 ISTA PRN 2 value 2 715 ANKR PRN 1 value 3 760 ISTA PRN 2 value 4 715 ANKR PRN 1 value 5 760 ISTA PRN ...
2016/03/15
[ "https://askubuntu.com/questions/746274", "https://askubuntu.com", "https://askubuntu.com/users/347341/" ]
Using standard tools, `sort`, `rev`, `uniq`: ``` % sort -k1,5 -k6,6nr file.txt | rev | uniq -f1 -d | rev 1 ANKR PRN 7 value 12 715 ANKR PRN 1 value 5 760 ISTA PRN 2 value 6 ``` If you want sort the output as desired: ``` % sort -k1,5 -k6,6nr file.txt | rev | uniq -f1 -d | rev | sort -k6,6n 715 ANKR PRN 1 value ...
How about ``` awk '{a[$1 FS $2 FS $3 FS $4 FS $5] = $6; c[$1 FS $2 FS $3 FS $4 FS $5]++}; END{for (i in a) {if (c[i]>1) print i,a[i]}}' ``` Testing with your input ``` $ awk '{a[$1 FS $2 FS $3 FS $4 FS $5] = $6; c[$1 FS $2 FS $3 FS $4 FS $5]++}; END{for (i in a) {if (c[i]>1) print i,a[i]}}' file 715 ANKR PRN 1 valu...
221,454
I have an array of values, with those values I plotted the histogram, calculated mean and variance. I want to know the corresponding distribution from the histogram obtained. How is it possible? Could you please explain the steps in obtaining appropriate probability distribution from histograms?
2016/06/30
[ "https://stats.stackexchange.com/questions/221454", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/121785/" ]
From [basic properties of variance](https://en.wikipedia.org/wiki/Variance#Basic_properties): $\text{Var}(X\_1+X\_2) = \text{Var}(X\_1)+\text{Var}(X\_2)+2\text{Cov}(X\_1,X\_2)$ and the $k-$variable case can be obtained recursively from that.
You can just calculate the basic data from the cumulative data. $f\_n$ = $F\_n$ - $F\_{n-1}$ Where $f\_n$ denotes the basic data and $F\_n$ is the cumulative value
3,818,426
How do I build a XML-RPC web service in C#?
2010/09/29
[ "https://Stackoverflow.com/questions/3818426", "https://Stackoverflow.com", "https://Stackoverflow.com/users/103264/" ]
You could implement either a generic handler (.ashx) or an ASP.NET 2.0-compatible service (.asmx). You would then need to handle the XML parsing and construction either using .NET classes for XML or just on your own. Edit: I took out information about WCF since the question changed, making it irrelevant.
if you mean RPC where you cliend simply sends raw XML via form variables, etc, and you parse it in the implementation of your service, .net 3.5 and wcf support out of the box POX services. <http://msdn.microsoft.com/en-us/library/aa395208.aspx>
3,818,426
How do I build a XML-RPC web service in C#?
2010/09/29
[ "https://Stackoverflow.com/questions/3818426", "https://Stackoverflow.com", "https://Stackoverflow.com/users/103264/" ]
I've seen some people produce "web services" that are just simple .aspx pages that spits out Xml instead of html. The "proper" way to do this is to probably to [implement your own custom http handler](http://www.developer.com/net/asp/article.php/3565541/Use-Custom-HTTP-Handlers-in-Your-ASPNET-Applications.htm) though....
if you mean RPC where you cliend simply sends raw XML via form variables, etc, and you parse it in the implementation of your service, .net 3.5 and wcf support out of the box POX services. <http://msdn.microsoft.com/en-us/library/aa395208.aspx>
13,786,042
I have field type string that can get two type of values on it: 1. simple field e.g. **p1** 2. complex fields **p1/p2/p3/p4** Now I have 2 questions: 1. how can I identify that the type is complex **with little effort as possible** since the check is runs in loop? 2. when I got type complex I need to store **the l...
2012/12/09
[ "https://Stackoverflow.com/questions/13786042", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
<https://github.com/sgbj/Dukpt.NET> - Great introduction. You'll need the specification to understand the code as it was written with clever brevity in mind, not readability. I used it 6 months ago to not only learn about DUKPT, but to implement the embedded C libraries for biometric sensor device.
There is a ANSI standard that defines DUKPT, X9.24-1 but that uses DES both for the encryption/decryption and to produce the keys. Since you said BDK and KSN, I imagine this is what you have in mind. I expect you did not get any responses (even after the extended period of four hours) because you said AES and DUKPT in ...
13,786,042
I have field type string that can get two type of values on it: 1. simple field e.g. **p1** 2. complex fields **p1/p2/p3/p4** Now I have 2 questions: 1. how can I identify that the type is complex **with little effort as possible** since the check is runs in loop? 2. when I got type complex I need to store **the l...
2012/12/09
[ "https://Stackoverflow.com/questions/13786042", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
As mentioned in last post ANSI standard that defines DUKPT, X9.24-1 in 3DES mode, that means Dukpt uses 3DES algorithm to generate Key(not to encrypt or decrypt data) and it is known as 3DES-DUKPT.Another type is AES-DUKPT, which uses AES-ECB mode to generate key. Both have common inputs Base derivation Key(BDK) and KS...
There is a ANSI standard that defines DUKPT, X9.24-1 but that uses DES both for the encryption/decryption and to produce the keys. Since you said BDK and KSN, I imagine this is what you have in mind. I expect you did not get any responses (even after the extended period of four hours) because you said AES and DUKPT in ...
43,378,003
how would I go about producing the following if statement? ``` var a = 50; var b = 10; if(a > b by 20){ console.log("a is too big"); } ```
2017/04/12
[ "https://Stackoverflow.com/questions/43378003", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7139108/" ]
``` if(a - b > 20) { console.log('You didnt try much it seems') } ```
Why don't you just do: ``` if (a > (b + 20)) { console.log("a is too big"); } ```
16,994,284
I have had an issue with the [Background Image not rendering correctly on the iPad](https://stackoverflow.com/questions/16785085/background-image-not-displaying-correctly-in-ios). The answer provided which did solve the issue was to add `-webkit-transform: translateZ(0);` to the `id` that solved the issue but caused an...
2013/06/07
[ "https://Stackoverflow.com/questions/16994284", "https://Stackoverflow.com", "https://Stackoverflow.com/users/825757/" ]
Try [Fiddler](http://fiddler2.com), it lets you intercept and tamper with the raw request.
The most appropriate way is to use Fiddlerscript (download it the Fiddlerscript Editor <http://fiddler2.com/fiddlerscript-editor>, it will open the needed file just after the start). I have customized the ``` static function OnBeforeRequest(oSession: Session) { if (m_Replace16) { var post_body: String =...
8,172,546
I have a class definition that is part of a class definition. ``` var someObject = { someClass: function() { this.someMethod = function() { alert('hello'); }; } } ``` I have been told that I should use prototype to add methods, as it then only needs to be created once for all instances of ...
2011/11/17
[ "https://Stackoverflow.com/questions/8172546", "https://Stackoverflow.com", "https://Stackoverflow.com/users/512922/" ]
Renaming a column (with `ALTER TABLE ... CHANGE COLUMN`) unfortunately requires MySQL to run a full table copy. Check out [pt-online-schema-change](http://www.percona.com/doc/percona-toolkit/pt-online-schema-change.html). This helps you to make many types of ALTER changes to a table without locking the whole table for...
If there aren't any constraints on it, you can alter it without a hassle as far as I know. If there are you'll have to remove the constraints first, alter and add the constraints back.
8,172,546
I have a class definition that is part of a class definition. ``` var someObject = { someClass: function() { this.someMethod = function() { alert('hello'); }; } } ``` I have been told that I should use prototype to add methods, as it then only needs to be created once for all instances of ...
2011/11/17
[ "https://Stackoverflow.com/questions/8172546", "https://Stackoverflow.com", "https://Stackoverflow.com/users/512922/" ]
Renaming a column (with `ALTER TABLE ... CHANGE COLUMN`) unfortunately requires MySQL to run a full table copy. Check out [pt-online-schema-change](http://www.percona.com/doc/percona-toolkit/pt-online-schema-change.html). This helps you to make many types of ALTER changes to a table without locking the whole table for...
Altering a table with many rows can take a long time (though if the columns involved are not indexed, it may be trivial). If you specifically want to avoid using the [ALTER TABLE](http://dev.mysql.com/doc/refman/5.5/en/alter-table.html) syntax created specifically for that purpose, you can always create a table with a...
34,668,295
After hours of Googling I managed to make the `{ display : table }` and `{ vertical-align : bottom }` work. However, if I change the name of my `div` class called "big div" to any other name, then the table properties on the container and UL items below stop working and the menu is no longer positioned. ``` .big div {...
2016/01/08
[ "https://Stackoverflow.com/questions/34668295", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2784370/" ]
The problem is that `div` is a reserved word in css to select **any** `div` **tag** Your class is named `.big` **not** `big div` you can add style to an element using multiple classes by **spacing** every class so in this case: ``` .big div ``` you're selecting the class `.big` that contains a `div`
`.big div` selects the `div` element under the `.big` class. If you want to change the name of the `.big div` to `.container` and applying style to `.container` it is not working because you have to apply the style to `tablecontain` to work. In your second fiddle replace the `.container` to `tablecontain`.
34,668,295
After hours of Googling I managed to make the `{ display : table }` and `{ vertical-align : bottom }` work. However, if I change the name of my `div` class called "big div" to any other name, then the table properties on the container and UL items below stop working and the menu is no longer positioned. ``` .big div {...
2016/01/08
[ "https://Stackoverflow.com/questions/34668295", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2784370/" ]
The problem is that `div` is a reserved word in css to select **any** `div` **tag** Your class is named `.big` **not** `big div` you can add style to an element using multiple classes by **spacing** every class so in this case: ``` .big div ``` you're selecting the class `.big` that contains a `div`
Change ``` .container { background-color : #328332 ; width : 100% ; height : 90px ; margin-top : 0 ; color : white ; text-align : center ; position : relative } ``` To ``` .container div { background-color : #328332 ; width : 100% ; height : 90px ; margin-top : 0 ; color : white...
35,066,102
While using the [facebook debugger](https://developers.facebook.com/tools/debug/og/object/), it complains: > > Warning > fb:app\_id hasn't been included in the meta tags. Specify the app ID so that stories shared to Facebook will be properly attributed to the app. Alternatively, app\_id can be set in url when open t...
2016/01/28
[ "https://Stackoverflow.com/questions/35066102", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1620081/" ]
If you don't have an app to associate the website to, then that warning can be ignored. For an example of a successful website which doesn't have a fb:app\_id included, you can run a debug on this [stackoverflow page's URL](https://stackoverflow.com/questions/35066102/facebook-debugger-why-complaining-about-app-id-mis...
You need to add this into your head tag in HTML source ``` <meta property="fb:app_id" content="XXXXXXXXXXXXXXX" /> ``` That is default app id. Replace `XXX` With your app id
35,066,102
While using the [facebook debugger](https://developers.facebook.com/tools/debug/og/object/), it complains: > > Warning > fb:app\_id hasn't been included in the meta tags. Specify the app ID so that stories shared to Facebook will be properly attributed to the app. Alternatively, app\_id can be set in url when open t...
2016/01/28
[ "https://Stackoverflow.com/questions/35066102", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1620081/" ]
If you don't have an app to associate the website to, then that warning can be ignored. For an example of a successful website which doesn't have a fb:app\_id included, you can run a debug on this [stackoverflow page's URL](https://stackoverflow.com/questions/35066102/facebook-debugger-why-complaining-about-app-id-mis...
This means your page is missing the `fb:app_id` meta tag. > > Missing Properties The following required properties are missing: fb:app\_id > > > You **must use the `fb` prefix** (the `og` prefix won't work!) The meta tag should look like this (replace the app id "474629550209194" below with your own) ``` <meta ...
35,066,102
While using the [facebook debugger](https://developers.facebook.com/tools/debug/og/object/), it complains: > > Warning > fb:app\_id hasn't been included in the meta tags. Specify the app ID so that stories shared to Facebook will be properly attributed to the app. Alternatively, app\_id can be set in url when open t...
2016/01/28
[ "https://Stackoverflow.com/questions/35066102", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1620081/" ]
You need to add this into your head tag in HTML source ``` <meta property="fb:app_id" content="XXXXXXXXXXXXXXX" /> ``` That is default app id. Replace `XXX` With your app id
This means your page is missing the `fb:app_id` meta tag. > > Missing Properties The following required properties are missing: fb:app\_id > > > You **must use the `fb` prefix** (the `og` prefix won't work!) The meta tag should look like this (replace the app id "474629550209194" below with your own) ``` <meta ...
55,803,125
I am trying to set up a hyperledger fabric on a VM manually. I have generated all the artifacts and configured the `orderer.yaml` and `core.yaml`. I have orderer running on port `127.0.0.1:7050`. When I try to create channel using the peer cli `channel create` command I am getting a `context deadline exceeded` message ...
2019/04/23
[ "https://Stackoverflow.com/questions/55803125", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8564491/" ]
The issue is that the TLS server certificate used by the orderer does not have a SAN matching "127.0.0.1". You can add "localhost" and/or "127.0.0.1" to you TLS certificates by using a custom **crypto-config.yaml** when generating your artifacts with cryptogen: ``` # ---------------------------------------------------...
I also faced the same problem and in my case, the issue was that I made some changes to the local directory files and apparently those changes were not successfully reflected while mounting those files back into the docker containers. What fixed the problem for me was `docker volume rm $(docker volume ls)` I restart...
55,803,125
I am trying to set up a hyperledger fabric on a VM manually. I have generated all the artifacts and configured the `orderer.yaml` and `core.yaml`. I have orderer running on port `127.0.0.1:7050`. When I try to create channel using the peer cli `channel create` command I am getting a `context deadline exceeded` message ...
2019/04/23
[ "https://Stackoverflow.com/questions/55803125", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8564491/" ]
The issue is that the TLS server certificate used by the orderer does not have a SAN matching "127.0.0.1". You can add "localhost" and/or "127.0.0.1" to you TLS certificates by using a custom **crypto-config.yaml** when generating your artifacts with cryptogen: ``` # ---------------------------------------------------...
when the problem of TLS handshake failed occurs between the orderer and orderer, it is most likely that there is an error in the configuration parameters when generating the TLS file. if you are registered with TLS via fabric-ca, then you need to check whether the CSR properties in the TLS files of the two orderer are...
55,803,125
I am trying to set up a hyperledger fabric on a VM manually. I have generated all the artifacts and configured the `orderer.yaml` and `core.yaml`. I have orderer running on port `127.0.0.1:7050`. When I try to create channel using the peer cli `channel create` command I am getting a `context deadline exceeded` message ...
2019/04/23
[ "https://Stackoverflow.com/questions/55803125", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8564491/" ]
I also faced the same problem and in my case, the issue was that I made some changes to the local directory files and apparently those changes were not successfully reflected while mounting those files back into the docker containers. What fixed the problem for me was `docker volume rm $(docker volume ls)` I restart...
when the problem of TLS handshake failed occurs between the orderer and orderer, it is most likely that there is an error in the configuration parameters when generating the TLS file. if you are registered with TLS via fabric-ca, then you need to check whether the CSR properties in the TLS files of the two orderer are...
58,067,998
I have two spreadsheet in '.xls' format, both have two sheets (sheet1 and sheet2). I am trying to overwrite the 'sheet2' in book2.xls with 'sheet2' from book1.xls. I am trying the pandas approach and here is my draft code, ``` import pandas as pd # Open the first spreadsheet df1 = pd.read_excel('Book1.xls', sheet_nam...
2019/09/23
[ "https://Stackoverflow.com/questions/58067998", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10729703/" ]
[EDIT] Official tool released: [try-convert](https://github.com/dotnet/try-convert) Check out [releases](https://github.com/dotnet/try-convert/releases) for latest version. Until official tool is published, here is link from some guy that has made alternative [Migration-von-NET-Framework-zu-NET-Core-per-PowerShell](h...
Please follow this step: Using Portability Analyzer -------------------------- Use the following instructions to run Portability Analyzer. 1.Run PortabilityAnalyzer.exe (<https://github.com/Microsoft/dotnet-apiport-ui/releases/download/1.1/PortabilityAnalyzer.zip>) 2.In the Path to application text box enter the di...
58,067,998
I have two spreadsheet in '.xls' format, both have two sheets (sheet1 and sheet2). I am trying to overwrite the 'sheet2' in book2.xls with 'sheet2' from book1.xls. I am trying the pandas approach and here is my draft code, ``` import pandas as pd # Open the first spreadsheet df1 = pd.read_excel('Book1.xls', sheet_nam...
2019/09/23
[ "https://Stackoverflow.com/questions/58067998", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10729703/" ]
[EDIT] Official tool released: [try-convert](https://github.com/dotnet/try-convert) Check out [releases](https://github.com/dotnet/try-convert/releases) for latest version. Until official tool is published, here is link from some guy that has made alternative [Migration-von-NET-Framework-zu-NET-Core-per-PowerShell](h...
Maybe in some cases brutal force migration (mentioned in OP) is indeed easiest especially when there is 3rd party libaries that can't be processed by tools automatically. My Winforms (.NET 4.6.2 with VS2019) exampe: (1) Create new VS2019 .net core 3.0 WinForm project. (2) Copy and overwrite every file except for the...
58,067,998
I have two spreadsheet in '.xls' format, both have two sheets (sheet1 and sheet2). I am trying to overwrite the 'sheet2' in book2.xls with 'sheet2' from book1.xls. I am trying the pandas approach and here is my draft code, ``` import pandas as pd # Open the first spreadsheet df1 = pd.read_excel('Book1.xls', sheet_nam...
2019/09/23
[ "https://Stackoverflow.com/questions/58067998", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10729703/" ]
[EDIT] Official tool released: [try-convert](https://github.com/dotnet/try-convert) Check out [releases](https://github.com/dotnet/try-convert/releases) for latest version. Until official tool is published, here is link from some guy that has made alternative [Migration-von-NET-Framework-zu-NET-Core-per-PowerShell](h...
Microsoft released a new [Upgrade Assistant](https://dotnet.microsoft.com/platform/upgrade-assistant) tool that will migrate your .NET Framework projects to .NET 5. After migration you can change the TargetFramework in your csproj files to whatever version of .NET you want. I ran the following commands to install the ...
58,067,998
I have two spreadsheet in '.xls' format, both have two sheets (sheet1 and sheet2). I am trying to overwrite the 'sheet2' in book2.xls with 'sheet2' from book1.xls. I am trying the pandas approach and here is my draft code, ``` import pandas as pd # Open the first spreadsheet df1 = pd.read_excel('Book1.xls', sheet_nam...
2019/09/23
[ "https://Stackoverflow.com/questions/58067998", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10729703/" ]
Please follow this step: Using Portability Analyzer -------------------------- Use the following instructions to run Portability Analyzer. 1.Run PortabilityAnalyzer.exe (<https://github.com/Microsoft/dotnet-apiport-ui/releases/download/1.1/PortabilityAnalyzer.zip>) 2.In the Path to application text box enter the di...
Maybe in some cases brutal force migration (mentioned in OP) is indeed easiest especially when there is 3rd party libaries that can't be processed by tools automatically. My Winforms (.NET 4.6.2 with VS2019) exampe: (1) Create new VS2019 .net core 3.0 WinForm project. (2) Copy and overwrite every file except for the...
58,067,998
I have two spreadsheet in '.xls' format, both have two sheets (sheet1 and sheet2). I am trying to overwrite the 'sheet2' in book2.xls with 'sheet2' from book1.xls. I am trying the pandas approach and here is my draft code, ``` import pandas as pd # Open the first spreadsheet df1 = pd.read_excel('Book1.xls', sheet_nam...
2019/09/23
[ "https://Stackoverflow.com/questions/58067998", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10729703/" ]
Microsoft released a new [Upgrade Assistant](https://dotnet.microsoft.com/platform/upgrade-assistant) tool that will migrate your .NET Framework projects to .NET 5. After migration you can change the TargetFramework in your csproj files to whatever version of .NET you want. I ran the following commands to install the ...
Maybe in some cases brutal force migration (mentioned in OP) is indeed easiest especially when there is 3rd party libaries that can't be processed by tools automatically. My Winforms (.NET 4.6.2 with VS2019) exampe: (1) Create new VS2019 .net core 3.0 WinForm project. (2) Copy and overwrite every file except for the...
3,244,160
Can anybody give me an example of a group $G$ such that it has elements $a,b$ of order $6$ and $2$ respectively satisfying $a^3b = ba$ I came across a problem saying - "$G$ is a group. $a,b$ are two elements of $G$ such that $o(a)=6 ,o(b)=2$ and $a^3b =ba$. Then find order of $ab$." But if $a,b$ satisfy the above prope...
2019/05/29
[ "https://math.stackexchange.com/questions/3244160", "https://math.stackexchange.com", "https://math.stackexchange.com/users/657460/" ]
> > Clearly, $p(x)\le 1$ if and only if $x\in K$. *Like how?* > > > If $x \in K$, then $\frac{1}{1}x \in K$, so the infimal value of $\rho$ such that $\frac{1}{\rho} x \in K$ must be less than or equal to $1$. Inversely, suppose $x \notin K$. By the convexity of $K$, and the fact $0 \in K$, we also have that $\la...
For most of your questions the answers come from the definition of $p(x)$, which is $$p(x) = \inf \left\{\rho \geq 0 \mid \frac{1}{\rho}x \in K \right\} $$ Hence, 1. if $x\in K$ then $\rho = 1$ is valid in the definition of $p(x)$. However, if $\rho < 1$ we get that $1/\rho > 1$ and then $(1/\rho) x \not\in K$ since $...
930,460
I am trying to run `buildozer`. While running it gave the following error: ``` Aidl not found, please install it. ``` So I tried to install aidl as described [here](http://thelinuxfaq.com/ubuntu/ubuntu-17-04-zesty-zapus/aidl) But it gave me the following error > > E: Unable to locate package aidl > > > I hav...
2017/06/29
[ "https://askubuntu.com/questions/930460", "https://askubuntu.com", "https://askubuntu.com/users/705925/" ]
Finally, I have found the solution. To install `aidl`, you need `libstdc++-6`. Previously I had a lower version of `libstdc++`, which causes problems while installing `aidl`. To update to `libstdc++-6`, try ``` sudo apt-get update sudo apt-get install build-essential sudo apt-get install libstdc++6 ``` After this,...
First of all, there's very specific versions of Cython required so make sure you use the appropriate [Ubuntu dependencies installation from this site](http://buildozer.readthedocs.io/en/latest/installation.html) For Ubuntu 16.04 it is: ``` sudo pip install --upgrade cython==0.21 sudo dpkg --add-architecture i386 sudo...