qid
int64
1
74.7M
question
stringlengths
15
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
4
30.2k
response_k
stringlengths
11
36.5k
34,743,389
I have the following table: ``` OrderID | OldOrderID | Action | EntryDate | Source 1 | NULL | Insert | 2016-01-12| A 1 | NULL | Remove | 2016-01-13| A 2 | NULL | Insert | 2016-01-12| B 3 | NULL | Insert | 2016-01-12| C 4 | ...
2016/01/12
[ "https://Stackoverflow.com/questions/34743389", "https://Stackoverflow.com", "https://Stackoverflow.com/users/555967/" ]
use $\_REQUEST['data'] instead of $\_REQUEST['text'] ``` class textify { function __construct() { $textify = $_REQUEST['data']; //change text to data because you use data in ajax post. echo $textify; } } new textify; ```
Just make some changes `{text: textify}` instead of `{data: textify}` like below: ``` $(document).ready(function(){ $('form').submit(function(){ var textify = $('input[name="textify"]').val(); $.post('textify.php', {text: textify}, function(txt){ $('pre').show(); $('p...
34,743,389
I have the following table: ``` OrderID | OldOrderID | Action | EntryDate | Source 1 | NULL | Insert | 2016-01-12| A 1 | NULL | Remove | 2016-01-13| A 2 | NULL | Insert | 2016-01-12| B 3 | NULL | Insert | 2016-01-12| C 4 | ...
2016/01/12
[ "https://Stackoverflow.com/questions/34743389", "https://Stackoverflow.com", "https://Stackoverflow.com/users/555967/" ]
The error is pretty simple the key name is invalid. You use keyname `data` but you get `text` which does not exists. change ``` $.post('textify.php', {data: textify}, function(txt){ ``` to ``` $.post('textify.php', {text: textify}, function(txt){ ``` or better use [serialize()](https://api.jquery.com/serializ...
use $\_REQUEST['data'] instead of $\_REQUEST['text'] ``` class textify { function __construct() { $textify = $_REQUEST['data']; //change text to data because you use data in ajax post. echo $textify; } } new textify; ```
28,085,168
I am trying to create a two fixed column table (freeze the first two columns), that respects the widths of the td elements that I give them. When the two columns get fixed, the widths of the columns are randomly set. ``` <div id="tableContainer"> <table class="all-table"> <colgroup> ...
2015/01/22
[ "https://Stackoverflow.com/questions/28085168", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1099343/" ]
I am not sure about the correct method to do it, but this might help. ```css #tableContainer { width: 300px; overflow: auto; overflow-y: scroll; } .td-fixed { position: fixed; left: 0px; width: 30px; z-index: 1; height: 25px; } .white-background { background-color: white; } .gray-backg...
When using the `position` rule in CSS, `top` `left` `right` and `bottom` values are the method of positioning these elements. [I hope this updated fiddle is more what you are after?](http://jsfiddle.net/pcmhd42e/9/)
28,085,168
I am trying to create a two fixed column table (freeze the first two columns), that respects the widths of the td elements that I give them. When the two columns get fixed, the widths of the columns are randomly set. ``` <div id="tableContainer"> <table class="all-table"> <colgroup> ...
2015/01/22
[ "https://Stackoverflow.com/questions/28085168", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1099343/" ]
When using the `position` rule in CSS, `top` `left` `right` and `bottom` values are the method of positioning these elements. [I hope this updated fiddle is more what you are after?](http://jsfiddle.net/pcmhd42e/9/)
if you are using jQuery I would recommend using [Sticky Table](https://github.com/armaaar/JQuery-Sticky-Table) plugin. You only need to use their classes to do what you want without changing your code structure or add any crappy JS code.
28,085,168
I am trying to create a two fixed column table (freeze the first two columns), that respects the widths of the td elements that I give them. When the two columns get fixed, the widths of the columns are randomly set. ``` <div id="tableContainer"> <table class="all-table"> <colgroup> ...
2015/01/22
[ "https://Stackoverflow.com/questions/28085168", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1099343/" ]
I am not sure about the correct method to do it, but this might help. ```css #tableContainer { width: 300px; overflow: auto; overflow-y: scroll; } .td-fixed { position: fixed; left: 0px; width: 30px; z-index: 1; height: 25px; } .white-background { background-color: white; } .gray-backg...
if you are using jQuery I would recommend using [Sticky Table](https://github.com/armaaar/JQuery-Sticky-Table) plugin. You only need to use their classes to do what you want without changing your code structure or add any crappy JS code.
28,085,168
I am trying to create a two fixed column table (freeze the first two columns), that respects the widths of the td elements that I give them. When the two columns get fixed, the widths of the columns are randomly set. ``` <div id="tableContainer"> <table class="all-table"> <colgroup> ...
2015/01/22
[ "https://Stackoverflow.com/questions/28085168", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1099343/" ]
I am not sure about the correct method to do it, but this might help. ```css #tableContainer { width: 300px; overflow: auto; overflow-y: scroll; } .td-fixed { position: fixed; left: 0px; width: 30px; z-index: 1; height: 25px; } .white-background { background-color: white; } .gray-backg...
This code below worked for me. 5 columns btw. You just need to adjust the `left` pixels in the five fixed columns (`first` to `fifth`) to your needs. ```css .view { width: fit-content; overflow-x: initial; } .wrapper { position: relative; white-space: nowrap; padding: 0px; } .sticky-col { pos...
28,085,168
I am trying to create a two fixed column table (freeze the first two columns), that respects the widths of the td elements that I give them. When the two columns get fixed, the widths of the columns are randomly set. ``` <div id="tableContainer"> <table class="all-table"> <colgroup> ...
2015/01/22
[ "https://Stackoverflow.com/questions/28085168", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1099343/" ]
This code below worked for me. 5 columns btw. You just need to adjust the `left` pixels in the five fixed columns (`first` to `fifth`) to your needs. ```css .view { width: fit-content; overflow-x: initial; } .wrapper { position: relative; white-space: nowrap; padding: 0px; } .sticky-col { pos...
if you are using jQuery I would recommend using [Sticky Table](https://github.com/armaaar/JQuery-Sticky-Table) plugin. You only need to use their classes to do what you want without changing your code structure or add any crappy JS code.
24,043
I don't have much theoretical knowledge about wine, but I like the taste. So I often get a random bottle from the wide selection at the supermarket, avoiding only the bottom line of TetraPack wine. I have noticed a few trends (e.g. I don't like Chillean wine), but it is still mostly a hit-and-miss. One of the "bah" mom...
2012/05/28
[ "https://cooking.stackexchange.com/questions/24043", "https://cooking.stackexchange.com", "https://cooking.stackexchange.com/users/4638/" ]
You could check whether a wine is carbonated which should be indicated on the label (it's one of the processes to produce wine). If it's not indicated on the label, then it's normally a young wine. The way to get rid of the off flavour is very simple: wait! A glass of evil smelling, lightly carbonated, wine can become...
I have to disagree with most of the comments here. I regularly buy older wines in the 20 to 25 dollar range. Rioja, Chiante, Cabs, always XD and of high quality. These wines always have a certain amount of carbonation coming out of the bottle. A bit of breathing reduces it, but it doesn't go away completely. Now I am m...
24,043
I don't have much theoretical knowledge about wine, but I like the taste. So I often get a random bottle from the wide selection at the supermarket, avoiding only the bottom line of TetraPack wine. I have noticed a few trends (e.g. I don't like Chillean wine), but it is still mostly a hit-and-miss. One of the "bah" mom...
2012/05/28
[ "https://cooking.stackexchange.com/questions/24043", "https://cooking.stackexchange.com", "https://cooking.stackexchange.com/users/4638/" ]
You could check whether a wine is carbonated which should be indicated on the label (it's one of the processes to produce wine). If it's not indicated on the label, then it's normally a young wine. The way to get rid of the off flavour is very simple: wait! A glass of evil smelling, lightly carbonated, wine can become...
Opened a Havens Black an Blue and discovered the "fizziness" described in this conversation. Not stored in a warm place. Left in the glass, for a good 20 minutes, the effervescence dissipated. I decanted the bottle and left it for the second round at the table, opening a merit age from a different producer, stored in t...
24,043
I don't have much theoretical knowledge about wine, but I like the taste. So I often get a random bottle from the wide selection at the supermarket, avoiding only the bottom line of TetraPack wine. I have noticed a few trends (e.g. I don't like Chillean wine), but it is still mostly a hit-and-miss. One of the "bah" mom...
2012/05/28
[ "https://cooking.stackexchange.com/questions/24043", "https://cooking.stackexchange.com", "https://cooking.stackexchange.com/users/4638/" ]
There are a couple of reasons why a wine would be slightly fizzy: 1. Maltreatment: wine which has been stored in a hot place will often be slight fizzy, as well as having a "sour cider" taste. This wine is ruined, throw it out. 2. Varietal: in addition to Champaigne/Prosecco/Cava,several other wine varietals are delib...
I have to disagree with most of the comments here. I regularly buy older wines in the 20 to 25 dollar range. Rioja, Chiante, Cabs, always XD and of high quality. These wines always have a certain amount of carbonation coming out of the bottle. A bit of breathing reduces it, but it doesn't go away completely. Now I am m...
24,043
I don't have much theoretical knowledge about wine, but I like the taste. So I often get a random bottle from the wide selection at the supermarket, avoiding only the bottom line of TetraPack wine. I have noticed a few trends (e.g. I don't like Chillean wine), but it is still mostly a hit-and-miss. One of the "bah" mom...
2012/05/28
[ "https://cooking.stackexchange.com/questions/24043", "https://cooking.stackexchange.com", "https://cooking.stackexchange.com/users/4638/" ]
There are a couple of reasons why a wine would be slightly fizzy: 1. Maltreatment: wine which has been stored in a hot place will often be slight fizzy, as well as having a "sour cider" taste. This wine is ruined, throw it out. 2. Varietal: in addition to Champaigne/Prosecco/Cava,several other wine varietals are delib...
Opened a Havens Black an Blue and discovered the "fizziness" described in this conversation. Not stored in a warm place. Left in the glass, for a good 20 minutes, the effervescence dissipated. I decanted the bottle and left it for the second round at the table, opening a merit age from a different producer, stored in t...
789,061
I've gotten some C++ code to work with the TinyXML parser. However, to do this I had to include the source code from TinyXML with my regular source code. I'd like to have TinyXML included as a separate library. I'm using Eclipse with the Cygwin C++ compiler. What's a good way to do this?
2009/04/25
[ "https://Stackoverflow.com/questions/789061", "https://Stackoverflow.com", "https://Stackoverflow.com/users/64895/" ]
I assume you want to separate the library from your own project's source code... but you don't know how to build when the library is not in the same folder. --- Assuming your library has precompiled \*.lib and \*.h files: 1. Move the library source code to a separate directory 2. Menubar "project" 3. Menu "propertie...
It's basically easy. You compile your source code for the library, and construct the library with *ar(1)*. Yes, surprise, a library is just an archive; UNIX is cool that way. You can then include the code as a static library when you build the final code. I don't use Eclipse all that much so I can't tell you the exac...
29,500,761
Basically I have a method to load an Image from database into an imageView and a second method to change the image I'm sucessfully running both methods without getting an exception but after the setImage in changeImage() method what do I need to update and how (scene,stage) is it possible at all. I know that there is n...
2015/04/07
[ "https://Stackoverflow.com/questions/29500761", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4760172/" ]
**Your Issue** If you have a member node in your controller which you inject using `@FXML`, you should never create a new object instance using a `new` constructor and assign that new object to your existing reference. Instead just use the object which FXML created for you. You have: ``` @FXML private ImageView img_...
Java I graduate here: In my JavaFX term project I had to update an imageView object upon a setOnAction Event (clicking a button). This allowed the program user to click through a series of pictures. The following worked great: First create your Image and ImageView instances: `Image imageObject = new Image();`...
3,753,883
How to integrate following $$\int\frac{u^3}{(u^2+1)^3}du\,?$$ What I did is here: Used partial fractions $$\dfrac{u^3}{(u^2+1)^3}=\dfrac{Au+B}{(u^2+1)}+\dfrac{Cu+D}{(u^2+1)^2}+\dfrac{Au+B}{(u^2+1)^3}$$ After solving I got $A=0, B=0, C=1, D=0, E=-1, F=0$ $$\dfrac{u^3}{(u^2+1)^3}=\dfrac{u}{(u^2+1)^2}-\dfrac{u}{(u^2+1...
2020/07/11
[ "https://math.stackexchange.com/questions/3753883", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
Substitute $u=\sinh t$ to integrate \begin{align} & \int \dfrac{u^3}{(u^2+1)^3}du= \int \frac{\sinh^3t}{\cosh^5t}dt\\ =&\int\tanh^3td(\tanh t)=\frac14\tanh^4t+C= \frac{u^4}{4(u^2+1)^2}+C \end{align}
This is one case where you can solve the problem without any integration. Because of the cube in denominator, assume that $$\int\frac{u^3}{(u^2+1)^3}du=\frac{P\_n(u)}{(u^2+1)^2}$$ Differentiate both sides and remove the common denominator to get $$u^3=\left(u^2+1\right) P\_n'(u)-4 u P\_n(u)$$ Comparing the degrees $n=...
3,753,883
How to integrate following $$\int\frac{u^3}{(u^2+1)^3}du\,?$$ What I did is here: Used partial fractions $$\dfrac{u^3}{(u^2+1)^3}=\dfrac{Au+B}{(u^2+1)}+\dfrac{Cu+D}{(u^2+1)^2}+\dfrac{Au+B}{(u^2+1)^3}$$ After solving I got $A=0, B=0, C=1, D=0, E=-1, F=0$ $$\dfrac{u^3}{(u^2+1)^3}=\dfrac{u}{(u^2+1)^2}-\dfrac{u}{(u^2+1...
2020/07/11
[ "https://math.stackexchange.com/questions/3753883", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
Substitute $u=\sinh t$ to integrate \begin{align} & \int \dfrac{u^3}{(u^2+1)^3}du= \int \frac{\sinh^3t}{\cosh^5t}dt\\ =&\int\tanh^3td(\tanh t)=\frac14\tanh^4t+C= \frac{u^4}{4(u^2+1)^2}+C \end{align}
In fact, substitution makes it very easy. Starting with $$\int \frac{u^3}{(u^2 + 1)^3}\ du$$ take $v = u^2 + 1$, then $dv = 2u\ du$ so $u\ du = \frac{1}{2} dv$. Then we get $$\begin{align} \int \frac{u^3}{(u^2 + 1)^3}\ du &= \int \frac{u^2 \cdot u}{(u^2 + 1)^3}\ du\\ &= \int \frac{u^2 \cdot \overbrace{(u\ du)}^{\fra...
3,753,883
How to integrate following $$\int\frac{u^3}{(u^2+1)^3}du\,?$$ What I did is here: Used partial fractions $$\dfrac{u^3}{(u^2+1)^3}=\dfrac{Au+B}{(u^2+1)}+\dfrac{Cu+D}{(u^2+1)^2}+\dfrac{Au+B}{(u^2+1)^3}$$ After solving I got $A=0, B=0, C=1, D=0, E=-1, F=0$ $$\dfrac{u^3}{(u^2+1)^3}=\dfrac{u}{(u^2+1)^2}-\dfrac{u}{(u^2+1...
2020/07/11
[ "https://math.stackexchange.com/questions/3753883", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
Substitute $u=\tan\theta\implies du=\sec^2\theta \ d\theta$ $$\int \frac{u^3}{(u^2+1)^3}du=\int \frac{\tan^3\theta}{(\tan^2\theta+1)^3}\sec^2\theta\ d \theta$$ $$=\int \frac{\tan^3\theta\sec^2\theta}{\sec^6\theta}\ d\theta$$ $$=\int\sin^3\theta\cos\theta d\theta$$ $$=\int\sin^3\theta\ d(\sin\theta)$$ $$=\frac{\sin^4\th...
You can use the partial fraction decomposition $$\dfrac{x^3}{(x^2+1)^3}=\dfrac{3i}{16}\left(\dfrac{1}{(x+i)^2}-\dfrac{1}{(x-i)^2}\right)+\dfrac{1}{8}\left(\dfrac{1}{(x+i)^3}+\dfrac{1}{(x-i)^3}\right)$$ to integrate this function. Then simplify the solution to get rid of complex unit $i.$
3,753,883
How to integrate following $$\int\frac{u^3}{(u^2+1)^3}du\,?$$ What I did is here: Used partial fractions $$\dfrac{u^3}{(u^2+1)^3}=\dfrac{Au+B}{(u^2+1)}+\dfrac{Cu+D}{(u^2+1)^2}+\dfrac{Au+B}{(u^2+1)^3}$$ After solving I got $A=0, B=0, C=1, D=0, E=-1, F=0$ $$\dfrac{u^3}{(u^2+1)^3}=\dfrac{u}{(u^2+1)^2}-\dfrac{u}{(u^2+1...
2020/07/11
[ "https://math.stackexchange.com/questions/3753883", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
Substitute $v=u^2+1$ so that $du=\frac{1}{2u}dv$ to turn the integral into: $$\int{\frac{u(v-1)}{2uv^3}} dv$$ $$\frac{1}{2}\int{\frac{v-1}{v^3}} dv$$ $$=\frac{1}{2}(\int{\frac{1}{v^2} dv}-\int{\frac{1}{v^3}} dv)$$ $$=\frac{1}{2}(\frac{1}{2v^2}-\frac{1}{v})+C$$ $$=\frac{1}{4v^2}-\frac{1}{2v}+C$$ Substitute $v=u^2+1$ a...
I would just attack it with integration by parts (IBP). The integrand is $\frac{u^3}{(u^2+1)^3}$. You can rewrite this as $u^2 \cdot \frac{u}{(u^2+1)^3}$. The rationale for doing so is to split it up into two terms. The "mental test" you need to apply to successfully IBP is can you 1) differentiate the first term, 2) ...
3,753,883
How to integrate following $$\int\frac{u^3}{(u^2+1)^3}du\,?$$ What I did is here: Used partial fractions $$\dfrac{u^3}{(u^2+1)^3}=\dfrac{Au+B}{(u^2+1)}+\dfrac{Cu+D}{(u^2+1)^2}+\dfrac{Au+B}{(u^2+1)^3}$$ After solving I got $A=0, B=0, C=1, D=0, E=-1, F=0$ $$\dfrac{u^3}{(u^2+1)^3}=\dfrac{u}{(u^2+1)^2}-\dfrac{u}{(u^2+1...
2020/07/11
[ "https://math.stackexchange.com/questions/3753883", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
Hint: $\frac {u^{3}} {(u^{2}+1)^{3}}=u\frac {(u^{2}+1)-1} {(u^{2}+1)^{3}}=\frac u {(u^{2}+1)^{2}}-\frac u {(u^{2}+1)^{3}}$. Split then integral into two parts and use the substitution $x=1+u^{2}$ in both . The answer is $-\frac 1 {2(u^{2}+1)} -\frac 1 {4(u^{2}+1)^{2}}+C$
You can use the partial fraction decomposition $$\dfrac{x^3}{(x^2+1)^3}=\dfrac{3i}{16}\left(\dfrac{1}{(x+i)^2}-\dfrac{1}{(x-i)^2}\right)+\dfrac{1}{8}\left(\dfrac{1}{(x+i)^3}+\dfrac{1}{(x-i)^3}\right)$$ to integrate this function. Then simplify the solution to get rid of complex unit $i.$
3,753,883
How to integrate following $$\int\frac{u^3}{(u^2+1)^3}du\,?$$ What I did is here: Used partial fractions $$\dfrac{u^3}{(u^2+1)^3}=\dfrac{Au+B}{(u^2+1)}+\dfrac{Cu+D}{(u^2+1)^2}+\dfrac{Au+B}{(u^2+1)^3}$$ After solving I got $A=0, B=0, C=1, D=0, E=-1, F=0$ $$\dfrac{u^3}{(u^2+1)^3}=\dfrac{u}{(u^2+1)^2}-\dfrac{u}{(u^2+1...
2020/07/11
[ "https://math.stackexchange.com/questions/3753883", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
Hint: $\frac {u^{3}} {(u^{2}+1)^{3}}=u\frac {(u^{2}+1)-1} {(u^{2}+1)^{3}}=\frac u {(u^{2}+1)^{2}}-\frac u {(u^{2}+1)^{3}}$. Split then integral into two parts and use the substitution $x=1+u^{2}$ in both . The answer is $-\frac 1 {2(u^{2}+1)} -\frac 1 {4(u^{2}+1)^{2}}+C$
I would just attack it with integration by parts (IBP). The integrand is $\frac{u^3}{(u^2+1)^3}$. You can rewrite this as $u^2 \cdot \frac{u}{(u^2+1)^3}$. The rationale for doing so is to split it up into two terms. The "mental test" you need to apply to successfully IBP is can you 1) differentiate the first term, 2) ...
3,753,883
How to integrate following $$\int\frac{u^3}{(u^2+1)^3}du\,?$$ What I did is here: Used partial fractions $$\dfrac{u^3}{(u^2+1)^3}=\dfrac{Au+B}{(u^2+1)}+\dfrac{Cu+D}{(u^2+1)^2}+\dfrac{Au+B}{(u^2+1)^3}$$ After solving I got $A=0, B=0, C=1, D=0, E=-1, F=0$ $$\dfrac{u^3}{(u^2+1)^3}=\dfrac{u}{(u^2+1)^2}-\dfrac{u}{(u^2+1...
2020/07/11
[ "https://math.stackexchange.com/questions/3753883", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
This is one case where you can solve the problem without any integration. Because of the cube in denominator, assume that $$\int\frac{u^3}{(u^2+1)^3}du=\frac{P\_n(u)}{(u^2+1)^2}$$ Differentiate both sides and remove the common denominator to get $$u^3=\left(u^2+1\right) P\_n'(u)-4 u P\_n(u)$$ Comparing the degrees $n=...
Letting $v = u^2+1$, $dv = 2u\, du, u^2 = v-1$ so $\begin{array}\\ \int\dfrac{u^3}{(u^2+1)^3}du &=\int\dfrac{(v-1)}{2v^3}dv\\ &=\frac12\int(v^{-2}-v^{-3}dv\\ &=\frac12\left(\dfrac{v^{-1}}{-1}-\dfrac{v^{-2}}{-2}\right)\\ &=\frac12\left(-v^{-1}+\frac12 v^{-2}\right)\\ &=\frac12\left(-\dfrac1{u^2+1}+\dfrac1{2(u^2+1)^2}\r...
3,753,883
How to integrate following $$\int\frac{u^3}{(u^2+1)^3}du\,?$$ What I did is here: Used partial fractions $$\dfrac{u^3}{(u^2+1)^3}=\dfrac{Au+B}{(u^2+1)}+\dfrac{Cu+D}{(u^2+1)^2}+\dfrac{Au+B}{(u^2+1)^3}$$ After solving I got $A=0, B=0, C=1, D=0, E=-1, F=0$ $$\dfrac{u^3}{(u^2+1)^3}=\dfrac{u}{(u^2+1)^2}-\dfrac{u}{(u^2+1...
2020/07/11
[ "https://math.stackexchange.com/questions/3753883", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
Substitute $u=\tan\theta\implies du=\sec^2\theta \ d\theta$ $$\int \frac{u^3}{(u^2+1)^3}du=\int \frac{\tan^3\theta}{(\tan^2\theta+1)^3}\sec^2\theta\ d \theta$$ $$=\int \frac{\tan^3\theta\sec^2\theta}{\sec^6\theta}\ d\theta$$ $$=\int\sin^3\theta\cos\theta d\theta$$ $$=\int\sin^3\theta\ d(\sin\theta)$$ $$=\frac{\sin^4\th...
I would just attack it with integration by parts (IBP). The integrand is $\frac{u^3}{(u^2+1)^3}$. You can rewrite this as $u^2 \cdot \frac{u}{(u^2+1)^3}$. The rationale for doing so is to split it up into two terms. The "mental test" you need to apply to successfully IBP is can you 1) differentiate the first term, 2) ...
3,753,883
How to integrate following $$\int\frac{u^3}{(u^2+1)^3}du\,?$$ What I did is here: Used partial fractions $$\dfrac{u^3}{(u^2+1)^3}=\dfrac{Au+B}{(u^2+1)}+\dfrac{Cu+D}{(u^2+1)^2}+\dfrac{Au+B}{(u^2+1)^3}$$ After solving I got $A=0, B=0, C=1, D=0, E=-1, F=0$ $$\dfrac{u^3}{(u^2+1)^3}=\dfrac{u}{(u^2+1)^2}-\dfrac{u}{(u^2+1...
2020/07/11
[ "https://math.stackexchange.com/questions/3753883", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
Substitute $v=u^2+1$ so that $du=\frac{1}{2u}dv$ to turn the integral into: $$\int{\frac{u(v-1)}{2uv^3}} dv$$ $$\frac{1}{2}\int{\frac{v-1}{v^3}} dv$$ $$=\frac{1}{2}(\int{\frac{1}{v^2} dv}-\int{\frac{1}{v^3}} dv)$$ $$=\frac{1}{2}(\frac{1}{2v^2}-\frac{1}{v})+C$$ $$=\frac{1}{4v^2}-\frac{1}{2v}+C$$ Substitute $v=u^2+1$ a...
One alternate method is thus: make the substitution $t=u^2$ which gives $dt = 2u\; du \iff du = dt/2 \sqrt t$. Then $$\mathcal I := \int \frac{u^3}{(u^2+1)^3} du = \int \frac{t \sqrt t}{(t+1)^3} \cdot \frac{dt}{2 \sqrt t} = \frac 1 2\int\frac{t}{(t+1)^3}dt$$ Now let $w = t+1 \implies dw = dt$. Then $$\mathcal I = \f...
3,753,883
How to integrate following $$\int\frac{u^3}{(u^2+1)^3}du\,?$$ What I did is here: Used partial fractions $$\dfrac{u^3}{(u^2+1)^3}=\dfrac{Au+B}{(u^2+1)}+\dfrac{Cu+D}{(u^2+1)^2}+\dfrac{Au+B}{(u^2+1)^3}$$ After solving I got $A=0, B=0, C=1, D=0, E=-1, F=0$ $$\dfrac{u^3}{(u^2+1)^3}=\dfrac{u}{(u^2+1)^2}-\dfrac{u}{(u^2+1...
2020/07/11
[ "https://math.stackexchange.com/questions/3753883", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
In fact, substitution makes it very easy. Starting with $$\int \frac{u^3}{(u^2 + 1)^3}\ du$$ take $v = u^2 + 1$, then $dv = 2u\ du$ so $u\ du = \frac{1}{2} dv$. Then we get $$\begin{align} \int \frac{u^3}{(u^2 + 1)^3}\ du &= \int \frac{u^2 \cdot u}{(u^2 + 1)^3}\ du\\ &= \int \frac{u^2 \cdot \overbrace{(u\ du)}^{\fra...
Letting $v = u^2+1$, $dv = 2u\, du, u^2 = v-1$ so $\begin{array}\\ \int\dfrac{u^3}{(u^2+1)^3}du &=\int\dfrac{(v-1)}{2v^3}dv\\ &=\frac12\int(v^{-2}-v^{-3}dv\\ &=\frac12\left(\dfrac{v^{-1}}{-1}-\dfrac{v^{-2}}{-2}\right)\\ &=\frac12\left(-v^{-1}+\frac12 v^{-2}\right)\\ &=\frac12\left(-\dfrac1{u^2+1}+\dfrac1{2(u^2+1)^2}\r...
154,556
I'm writing my first programming language that is object orientated and so far so good with create a single 'class'. But, let's say I want to have to classes, say `ClassA` and `ClassB`. Provided these two have nothing to do with each other then all is good. However, say `ClassA` creates a `ClassB`--this poses 2 related...
2012/06/27
[ "https://softwareengineering.stackexchange.com/questions/154556", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/45974/" ]
Different languages (and thus compilers) approach this differently. In the C family, the different modules have a corresponding header file that is used while building the object. The header files provide information on the size of the object and what functions or methods exists that may be invoked. This allows for th...
Practically speaking, with Java, the IDE's look at a whole program at once; when ClassB is referenced, the IDE compiler will look at it. Everything, including the libraries, is one complete whole. Once the program is ready, you can change classpaths, swap in and out individual .class files, and switch library versions....
154,556
I'm writing my first programming language that is object orientated and so far so good with create a single 'class'. But, let's say I want to have to classes, say `ClassA` and `ClassB`. Provided these two have nothing to do with each other then all is good. However, say `ClassA` creates a `ClassB`--this poses 2 related...
2012/06/27
[ "https://softwareengineering.stackexchange.com/questions/154556", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/45974/" ]
Different languages (and thus compilers) approach this differently. In the C family, the different modules have a corresponding header file that is used while building the object. The header files provide information on the size of the object and what functions or methods exists that may be invoked. This allows for th...
Older languages sometimes are more strict; consider what is possible in Java: ``` public interface Ifc { public static final Ifc MY_CONSTANT = new Implem(); } public class Implem implements Ifc { } ``` I have seen the anti-pattern above, and it is *really ugly* (I would have forbidden it). Both compilation unit...
6,848,109
I have a webapp developed with struts2 deployed in tomcat 5.5. The server has other applications deployed in it. But the app created with struts2 is very slow. Any ideas? How does Struts 2 handle object creation? And is there anything I can do on the tomecat server..
2011/07/27
[ "https://Stackoverflow.com/questions/6848109", "https://Stackoverflow.com", "https://Stackoverflow.com/users/749896/" ]
How slow is it? What are you doing? are you sure it is Struts 2 that is slow and not your application code? Did you do any profiling? What were the results? Check this out: <http://struts.apache.org/2.2.1/docs/performance-tuning.html> I found serving the static content from a folder increased the speed.
What OS is Tomcat running on? If it's Linux, you may have run into a lack of entropy issue. If this command returns something less than 200, it could explain your issue: ``` cat /proc/sys/kernel/random/entropy_avail ``` If it is low (or watch during startup/making requests), try pointing /dev/random to /dev/urandom...
6,848,109
I have a webapp developed with struts2 deployed in tomcat 5.5. The server has other applications deployed in it. But the app created with struts2 is very slow. Any ideas? How does Struts 2 handle object creation? And is there anything I can do on the tomecat server..
2011/07/27
[ "https://Stackoverflow.com/questions/6848109", "https://Stackoverflow.com", "https://Stackoverflow.com/users/749896/" ]
Well few details are really required for some one to answer your question in more good way 1. Which Struts2 version you are using 2. At which place/part do you think application is slow as per my experience there are certain areas where Struts2 have known problems, OGNL in itself sometime creates problem since this i...
What OS is Tomcat running on? If it's Linux, you may have run into a lack of entropy issue. If this command returns something less than 200, it could explain your issue: ``` cat /proc/sys/kernel/random/entropy_avail ``` If it is low (or watch during startup/making requests), try pointing /dev/random to /dev/urandom...
361,129
I'm trying to fill the area between two curves. Ideally, what I want to do is already answered [here](https://tex.stackexchange.com/questions/164991/pgfplots-how-to-fill-bounded-area-under-a-curve-using-addplot-and-fill), but I get the following warning (twice): ``` Package pgf Warning: fill between skipped: the first...
2017/03/29
[ "https://tex.stackexchange.com/questions/361129", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/104662/" ]
I think I can present a much simpler way to achieve what you want. For more details please have a look at the comments in the code. ``` % used PGFPlots v1.14 \documentclass[border=5pt]{standalone} \usepackage{pgfplots} \usepgfplotslibrary{fillbetween} \pgfplotsset{ % use this `compat' level or higher s...
I think you want only to clip the second path. ``` \documentclass{standalone} \usepackage{pgfplots} \usepgfplotslibrary{statistics,fillbetween} \usetikzlibrary{patterns,intersections} \pgfplotsset{compat=newest} \usetikzlibrary{babel} \begin{document} \begin{tikzpicture} \begin{axis}[ xmin=-2,xmax=7, ymin=0,...
40,299,424
I have a password reset like this: [Jumbotron-Form-Bootstrap-My-Attempt](https://i.stack.imgur.com/i9Wtg.png) my code from the above picture: ``` <div class="container"> <div class="jumbotron"> <br><br> <h2>Forget Password</h2> <br><br> <div class="alert alert-info" style="margin-t...
2016/10/28
[ "https://Stackoverflow.com/questions/40299424", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7083797/" ]
You can center vertically using the following css class: ``` .vertical-center { min-height: 100%; min-height: 100vh; display: flex; align-items: center; } ``` Horizontally, you can already center with bootstraps grid system using `col-??-#` and `col-??-offset-#`. Put those two concepts together by wrap...
``` <div class="container" style="width:30%;"> ``` Just add the width in percentage . Play with the numbers to get it how you want it . This will use the default bootstrap then force the size with your css.
40,299,424
I have a password reset like this: [Jumbotron-Form-Bootstrap-My-Attempt](https://i.stack.imgur.com/i9Wtg.png) my code from the above picture: ``` <div class="container"> <div class="jumbotron"> <br><br> <h2>Forget Password</h2> <br><br> <div class="alert alert-info" style="margin-t...
2016/10/28
[ "https://Stackoverflow.com/questions/40299424", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7083797/" ]
You can center vertically using the following css class: ``` .vertical-center { min-height: 100%; min-height: 100vh; display: flex; align-items: center; } ``` Horizontally, you can already center with bootstraps grid system using `col-??-#` and `col-??-offset-#`. Put those two concepts together by wrap...
just add .row div inside .container and add a div with class col-md-6 and col-md-offset-3 inside the row init add your jumbrotron div ``` <div class="container vertical-center"> <div class="row"> <div class="col-md-6"> <div class="jumbotron"> </div> </div> </div> </div>...
9,007,801
I just inherited a very old ASP.NET 2.0 web application. In the application it has SEVERAL support class library projects. In the DataAccess class library, is an app.config (and setting.settings file) with a connection string named ConnString1. I always thought that a .DLL couldn't have a app.config/setting.settings ...
2012/01/25
[ "https://Stackoverflow.com/questions/9007801", "https://Stackoverflow.com", "https://Stackoverflow.com/users/591172/" ]
There's got to be something that is confusing you to think that the config file that's a part of that DLL is being used - as opposed to the applications (entry point's) config file (yourapp.exe.config or web.config). Maybe that conn string is hard-coded somewhere for the use in debug mode, e.g. by using conditional com...
All config settings must be specified in the executable config file. For windows and console apps it's app.config, for web projects it's web.config. Libraries can specify config settings, but you have to copy the settings to the executable's config file in order for the application to be able to read them.
9,007,801
I just inherited a very old ASP.NET 2.0 web application. In the application it has SEVERAL support class library projects. In the DataAccess class library, is an app.config (and setting.settings file) with a connection string named ConnString1. I always thought that a .DLL couldn't have a app.config/setting.settings ...
2012/01/25
[ "https://Stackoverflow.com/questions/9007801", "https://Stackoverflow.com", "https://Stackoverflow.com/users/591172/" ]
There's got to be something that is confusing you to think that the config file that's a part of that DLL is being used - as opposed to the applications (entry point's) config file (yourapp.exe.config or web.config). Maybe that conn string is hard-coded somewhere for the use in debug mode, e.g. by using conditional com...
I found the issue: In the above example, I am using the web.config/machine.config to set the connection string for the application. If the connection string isn't defined in the web.config, it defaults to the machine.config. If the connection string isn't defined in the machine.config, it will use the app.config sett...
9,007,801
I just inherited a very old ASP.NET 2.0 web application. In the application it has SEVERAL support class library projects. In the DataAccess class library, is an app.config (and setting.settings file) with a connection string named ConnString1. I always thought that a .DLL couldn't have a app.config/setting.settings ...
2012/01/25
[ "https://Stackoverflow.com/questions/9007801", "https://Stackoverflow.com", "https://Stackoverflow.com/users/591172/" ]
There's got to be something that is confusing you to think that the config file that's a part of that DLL is being used - as opposed to the applications (entry point's) config file (yourapp.exe.config or web.config). Maybe that conn string is hard-coded somewhere for the use in debug mode, e.g. by using conditional com...
Difference between Web.config, AppSettings.json and App.config ============================================================== ### Web.config: Web.config is needed when you want to host your application on IIS. Web.config is a mandatory config file for IIS to configure how it will behave as a reverse proxy in front of...
9,007,801
I just inherited a very old ASP.NET 2.0 web application. In the application it has SEVERAL support class library projects. In the DataAccess class library, is an app.config (and setting.settings file) with a connection string named ConnString1. I always thought that a .DLL couldn't have a app.config/setting.settings ...
2012/01/25
[ "https://Stackoverflow.com/questions/9007801", "https://Stackoverflow.com", "https://Stackoverflow.com/users/591172/" ]
I found the issue: In the above example, I am using the web.config/machine.config to set the connection string for the application. If the connection string isn't defined in the web.config, it defaults to the machine.config. If the connection string isn't defined in the machine.config, it will use the app.config sett...
All config settings must be specified in the executable config file. For windows and console apps it's app.config, for web projects it's web.config. Libraries can specify config settings, but you have to copy the settings to the executable's config file in order for the application to be able to read them.
9,007,801
I just inherited a very old ASP.NET 2.0 web application. In the application it has SEVERAL support class library projects. In the DataAccess class library, is an app.config (and setting.settings file) with a connection string named ConnString1. I always thought that a .DLL couldn't have a app.config/setting.settings ...
2012/01/25
[ "https://Stackoverflow.com/questions/9007801", "https://Stackoverflow.com", "https://Stackoverflow.com/users/591172/" ]
All config settings must be specified in the executable config file. For windows and console apps it's app.config, for web projects it's web.config. Libraries can specify config settings, but you have to copy the settings to the executable's config file in order for the application to be able to read them.
Difference between Web.config, AppSettings.json and App.config ============================================================== ### Web.config: Web.config is needed when you want to host your application on IIS. Web.config is a mandatory config file for IIS to configure how it will behave as a reverse proxy in front of...
9,007,801
I just inherited a very old ASP.NET 2.0 web application. In the application it has SEVERAL support class library projects. In the DataAccess class library, is an app.config (and setting.settings file) with a connection string named ConnString1. I always thought that a .DLL couldn't have a app.config/setting.settings ...
2012/01/25
[ "https://Stackoverflow.com/questions/9007801", "https://Stackoverflow.com", "https://Stackoverflow.com/users/591172/" ]
I found the issue: In the above example, I am using the web.config/machine.config to set the connection string for the application. If the connection string isn't defined in the web.config, it defaults to the machine.config. If the connection string isn't defined in the machine.config, it will use the app.config sett...
Difference between Web.config, AppSettings.json and App.config ============================================================== ### Web.config: Web.config is needed when you want to host your application on IIS. Web.config is a mandatory config file for IIS to configure how it will behave as a reverse proxy in front of...
54,429,977
Is it possible to add color on approve and decline, basically green for approve and red for declined? I've tried looking it up but I can't seem to find a way to do it. Here's the php code: ``` <?php if(isset($_POST['approve'])) { $msg = "Approved"; $approval="Approved"; } if(isset($_...
2019/01/29
[ "https://Stackoverflow.com/questions/54429977", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10957768/" ]
It is possible in unity to give prefabs a tag. It is then possible to access all prefabs with a specific tag. This is a great way to deal with multiple prefabs as it allows you to group prefabs in whatever way you want. This is a javascript snippet, but it applies to c# as well. ```js function makechild(){ objs = ...
in c# ``` GameObject[] spaceinvader; int length; // Start is called before the first frame update void Start() { spaceinvader = GameObject.FindGameObjectsWithTag("your tag"); length = spaceinvader.Length; } // Update is called once per frame void increasespeed() { for (int i = 0; i < length; i++) { ...
36,650,153
I found this directive for filtering a field for currency, so a user just needs to type and the decimal is implied. It works well, except that a user is able to put in a letter if they press a letter twice. I don't want them to be able to put in a letter at all. I tried changing the `type="number"` but then it would ...
2016/04/15
[ "https://Stackoverflow.com/questions/36650153", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4945793/" ]
The right term for this is overload resolution preferences, and second overload is chosen because it is a better match. It appeared to be more challenging than I expected to put together a code which would make sure proper overload was selected. Here it is: ``` #include <type_traits> #include <iostream> template<type...
Provide an argument that has a better match: ``` int main(){ Derived<int> v1; f(v1); // in 2 f((Base<int>&)v1); // in 1 } ``` In this case `f(v1)` will resolve to `f<Base<int>>(v1)` and `f((Base<int>&)v1)` to `f<int>(v1)`
36,650,153
I found this directive for filtering a field for currency, so a user just needs to type and the decimal is implied. It works well, except that a user is able to put in a letter if they press a letter twice. I don't want them to be able to put in a letter at all. I tried changing the `type="number"` but then it would ...
2016/04/15
[ "https://Stackoverflow.com/questions/36650153", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4945793/" ]
With custom traits ``` template <typename T> std::true_type derive_from_base_impl(const Base<T>*); std::false_type derive_from_base_impl(...); template <typename T> using derive_from_base = decltype(derive_from_base_impl(std::declval<T*>())); static_assert(!derive_from_base<int>::value, ""); static_assert(derive_fro...
Provide an argument that has a better match: ``` int main(){ Derived<int> v1; f(v1); // in 2 f((Base<int>&)v1); // in 1 } ``` In this case `f(v1)` will resolve to `f<Base<int>>(v1)` and `f((Base<int>&)v1)` to `f<int>(v1)`
36,650,153
I found this directive for filtering a field for currency, so a user just needs to type and the decimal is implied. It works well, except that a user is able to put in a letter if they press a letter twice. I don't want them to be able to put in a letter at all. I tried changing the `type="number"` but then it would ...
2016/04/15
[ "https://Stackoverflow.com/questions/36650153", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4945793/" ]
The answer is quite simple, all you have to do is prevent the second template to be instantiated for a certain class, which can be done quickly using `std::enable_if_t` from the type\_traits header: Template 2 becomes this, and Template 1 remains unchanged ``` //template 2 template<typename T2, std::enable_if_t<!std:...
Provide an argument that has a better match: ``` int main(){ Derived<int> v1; f(v1); // in 2 f((Base<int>&)v1); // in 1 } ``` In this case `f(v1)` will resolve to `f<Base<int>>(v1)` and `f((Base<int>&)v1)` to `f<int>(v1)`
36,650,153
I found this directive for filtering a field for currency, so a user just needs to type and the decimal is implied. It works well, except that a user is able to put in a letter if they press a letter twice. I don't want them to be able to put in a letter at all. I tried changing the `type="number"` but then it would ...
2016/04/15
[ "https://Stackoverflow.com/questions/36650153", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4945793/" ]
The right term for this is overload resolution preferences, and second overload is chosen because it is a better match. It appeared to be more challenging than I expected to put together a code which would make sure proper overload was selected. Here it is: ``` #include <type_traits> #include <iostream> template<type...
The answer is quite simple, all you have to do is prevent the second template to be instantiated for a certain class, which can be done quickly using `std::enable_if_t` from the type\_traits header: Template 2 becomes this, and Template 1 remains unchanged ``` //template 2 template<typename T2, std::enable_if_t<!std:...
36,650,153
I found this directive for filtering a field for currency, so a user just needs to type and the decimal is implied. It works well, except that a user is able to put in a letter if they press a letter twice. I don't want them to be able to put in a letter at all. I tried changing the `type="number"` but then it would ...
2016/04/15
[ "https://Stackoverflow.com/questions/36650153", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4945793/" ]
With custom traits ``` template <typename T> std::true_type derive_from_base_impl(const Base<T>*); std::false_type derive_from_base_impl(...); template <typename T> using derive_from_base = decltype(derive_from_base_impl(std::declval<T*>())); static_assert(!derive_from_base<int>::value, ""); static_assert(derive_fro...
The answer is quite simple, all you have to do is prevent the second template to be instantiated for a certain class, which can be done quickly using `std::enable_if_t` from the type\_traits header: Template 2 becomes this, and Template 1 remains unchanged ``` //template 2 template<typename T2, std::enable_if_t<!std:...
51,486,875
I have a desktop application to modify some xml files that are under source control. The program should be able to get the files, modify them and make a checkin. I already know how to do all that with tf; however, I don't know how to run the developer command prompt for visual studio using code. Also, the program will ...
2018/07/23
[ "https://Stackoverflow.com/questions/51486875", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8565789/" ]
According to your description, you want to pull down files from TFS server and then check in changed files programmatically. You could use TFS client API to achieve this. Suggest you go through Buck Hodges's blog which shows how to create a workspace, pend changes, check in those changes. Please refer **[Team Founda...
You can install on the computers the [Team Explorer Everywhere](https://github.com/Microsoft/team-explorer-everywhere), it gives you the ability to use TFS command line (the "tf" commands) without Visual Studio.
36,748,517
I'm trying to run a dotnet core 1.0 console app inside AWS lambda. This is just something I was doing for interest sake, however I've ran into a few issues. my dotnet core app looks like this: ``` using System; namespace ConsoleApplication { public class Program { public static int Main(string[] args...
2016/04/20
[ "https://Stackoverflow.com/questions/36748517", "https://Stackoverflow.com", "https://Stackoverflow.com/users/824434/" ]
I had the exactly same error. I suspect this is because the binary was compiled on Ubuntu, not on Amazon Linux. I also setup Amazon Linux that AWS Lambda (based on Red Hat) actually runs on. However, build wasn't successful. Here's the error message I've got: ``` [ec2-user@ip-172-31-35-226 helloworld]$ sudo dotnet bu...
Although i can not comment on .net core, I am using golang in lambda the same way, and was able to compile it on ubuntu and run it on lambda just fine. I had to set these params before compiling and it then worked: set GOOS=linux set GOARCH=amd64
36,748,517
I'm trying to run a dotnet core 1.0 console app inside AWS lambda. This is just something I was doing for interest sake, however I've ran into a few issues. my dotnet core app looks like this: ``` using System; namespace ConsoleApplication { public class Program { public static int Main(string[] args...
2016/04/20
[ "https://Stackoverflow.com/questions/36748517", "https://Stackoverflow.com", "https://Stackoverflow.com/users/824434/" ]
You may also be running into an issue where the executable within your zip uploaded to lambda is not assigned the linux execute permission. You won't be able to spawn your child process and execute it without this permission. Unfortunately this is difficult to assign with standard zip utilities available on Windows. S...
Although i can not comment on .net core, I am using golang in lambda the same way, and was able to compile it on ubuntu and run it on lambda just fine. I had to set these params before compiling and it then worked: set GOOS=linux set GOARCH=amd64
21,472,178
While setting up Active Admin and running the resource generate an Admin page for `orders ( $> rails generate active_admin:resource Orders )` . I get this warning when I try and run the rails server ``` /Users/Kenneth/Desktop/U2K/app/admin/orders.rb:1:in `<top (required)>': uninitialized constant Orders (NameError)...
2014/01/31
[ "https://Stackoverflow.com/questions/21472178", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2990470/" ]
Do you have the corresponding app/**model**/order.rb? I believe you'll also need to change app/admin/orders.rb -> order.rb And change line 1 in app/admin/order.rb to be singular, not plural. So: ``` ActiveAdmin.register Order do ... ```
You must create model first if your model name is **`rails g model Order model_no:integer`** then use same name with model like **`rails g active_admin:resource Order`** and resource name always singular form.
58,894,035
**Goal**: I am trying to parse the postman\_echo collection json and persist the result into a new json copy on disk, resulting the same file as the original one. I prefer built-in data structure from the language, but using json library should be good too. Not sure Antlr4 is a better way. ***follow-up question*** ...
2019/11/16
[ "https://Stackoverflow.com/questions/58894035", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1611102/" ]
An alternative to what zoran mentioned is to create a case class if the structure is not too dynamic (with Play JSON). This would make it easier to compare the result. ``` case class MyObject( queryString: List[KeyValue], method: String, url: String, httpVersion: String ) ... and so on object MyObject { i...
I'm not sure if I understand your question well, but if you are trying to iterate over json string, you might try something like this: ``` import play.api.libs.json.{JsObject, JsValue, Json} import scala.util.{Failure, Success, Try} object JsonParser extends App { val postman_coolections = "./resources/scal...
58,894,035
**Goal**: I am trying to parse the postman\_echo collection json and persist the result into a new json copy on disk, resulting the same file as the original one. I prefer built-in data structure from the language, but using json library should be good too. Not sure Antlr4 is a better way. ***follow-up question*** ...
2019/11/16
[ "https://Stackoverflow.com/questions/58894035", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1611102/" ]
An alternative to what zoran mentioned is to create a case class if the structure is not too dynamic (with Play JSON). This would make it easier to compare the result. ``` case class MyObject( queryString: List[KeyValue], method: String, url: String, httpVersion: String ) ... and so on object MyObject { i...
There are multiple problems in your parser and most of them are that you are trying to use default parser to handle Json object as string. For example, in Request you are handling header as Seq[String] when it's actually Seq of (key, value) pairs. For this particular case, you should change it to something like this: ...
58,894,035
**Goal**: I am trying to parse the postman\_echo collection json and persist the result into a new json copy on disk, resulting the same file as the original one. I prefer built-in data structure from the language, but using json library should be good too. Not sure Antlr4 is a better way. ***follow-up question*** ...
2019/11/16
[ "https://Stackoverflow.com/questions/58894035", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1611102/" ]
An alternative to what zoran mentioned is to create a case class if the structure is not too dynamic (with Play JSON). This would make it easier to compare the result. ``` case class MyObject( queryString: List[KeyValue], method: String, url: String, httpVersion: String ) ... and so on object MyObject { i...
A satisfactory solution is posted in the github link above in the question.
667,724
Suppose $X$ is some space with a regular probability measure $\mu$, and let $A \subseteq \mathbb{R}^{n} \times X$ be some open set (in the product topology). Is the function that measures the sections, $f(t)=\mu(A^t)$, continuous? ($A^t=\{x \in X: (t,x)\in A\}$) To avoid problematic sets, I also assume that the secti...
2014/02/07
[ "https://math.stackexchange.com/questions/667724", "https://math.stackexchange.com", "https://math.stackexchange.com/users/10312/" ]
Let $X = [0,1]$ be equipped with the Lebesgue measure and let $A$ be the set in $\mathbb{R}\times[0,1]$ which is the union of the rectangles $\mathbb{R}\times (\frac{1}{3}, \frac{2}{3})$ and $(0,1) \times (\frac{1}{4}, \frac{3}{4})$. This is a union of open sets and hence open. Moreover, every section is an open interv...
Correct me if I am wrong but here are some steps that I think should lead you to the result: we can show that the property is true on A generators of opens, and that the property still holds when expanding to more general opens if you see what I mean Let's assume that A is of the form $]a, b[ x U$ where U is an open o...
4,672,615
**The background:** Step 1 -> We have a box that runs unit and functional tests of an application by running it in test mode with a specific configuration. Step 2 -> Upon success of Step 1, we run integration tests of an application by running it in test mode with different configuration set, in another box. S...
2011/01/12
[ "https://Stackoverflow.com/questions/4672615", "https://Stackoverflow.com", "https://Stackoverflow.com/users/498604/" ]
In my experience, environment variables are the configuration option of last-resort. They absolutely have their place, but applications should generally check some other more reliable and explicitly intentional configuration option first. I would highly recommend loading configuration from a YAML file and only use an e...
At my company, we actually have both, in a way. We have a Rails app that can point at one of many different installations of another piece of software and use the API from that installation. To specify an installation, about 5 variables need to be set. We had each of these variables as separate environment variables,...
4,672,615
**The background:** Step 1 -> We have a box that runs unit and functional tests of an application by running it in test mode with a specific configuration. Step 2 -> Upon success of Step 1, we run integration tests of an application by running it in test mode with different configuration set, in another box. S...
2011/01/12
[ "https://Stackoverflow.com/questions/4672615", "https://Stackoverflow.com", "https://Stackoverflow.com/users/498604/" ]
In my experience, environment variables are the configuration option of last-resort. They absolutely have their place, but applications should generally check some other more reliable and explicitly intentional configuration option first. I would highly recommend loading configuration from a YAML file and only use an e...
After a lot of Googling in vain, discussions with some Rails folks and some brainstorming, I have made changes to the code such that I have **"A config file per rails mode, externalizing the application configurations to a YML file, which in my case remains outside of the Rails environment"** Follow through the self-e...
37,954
What is the name of this thing? I am trying to find it by keywords like "hex hey reduction" etc. but so far no results. My problem is that the plastic socket is easily damaged and I want to find a similar item, but made from metal only. [![enter image description here](https://i.stack.imgur.com/FdFyE.jpg)](https://i....
2020/10/02
[ "https://engineering.stackexchange.com/questions/37954", "https://engineering.stackexchange.com", "https://engineering.stackexchange.com/users/28890/" ]
Another name you might find it is [Hex bit adapter](https://www.google.com/search?q=hex+bit+adapter&tbm=isch&ved=2ahUKEwjxgOny9ZXsAhUJ2aQKHbRtAB0Q2-cCegQIABAA&oq=hex+bit+adapter&gs_lcp=CgNpbWcQAzICCAAyBggAEAcQHjIGCAAQBRAeMgYIABAIEB4yBggAEAgQHjIGCAAQCBAeMgQIABAYOgQIIxAnOggIABAIEAcQHlDFhDVY0KA1YJ2iNWgBcAB4AYABwQaIAecVkgE...
Male to female hex adapter would be what I would start with, then start adding in dimensions.
2,985,241
**The Ideal** Using rvm, it would be awesome to be able to have multiple Rubies on one webserver, and through some sort of server configuration, be able to assign Ruby versions to different Rails/Sinatra/etc apps on a per-project basis. I am aware, from rvm's documentation, that Passenger only works with one Ruby at ...
2010/06/06
[ "https://Stackoverflow.com/questions/2985241", "https://Stackoverflow.com", "https://Stackoverflow.com/users/62066/" ]
You could use Thin or Unicorn with Nginx. You could than write a god script or some other startup script to set the ruby version per project (or simply start Thin/Unicorn manually).
What about keeping all your projects (or at least those on one server) on the same ruby version? Be it using an old version or upgrading old projects? I think, this way you have the fewest problems.
2,985,241
**The Ideal** Using rvm, it would be awesome to be able to have multiple Rubies on one webserver, and through some sort of server configuration, be able to assign Ruby versions to different Rails/Sinatra/etc apps on a per-project basis. I am aware, from rvm's documentation, that Passenger only works with one Ruby at ...
2010/06/06
[ "https://Stackoverflow.com/questions/2985241", "https://Stackoverflow.com", "https://Stackoverflow.com/users/62066/" ]
You could use Thin or Unicorn with Nginx. You could than write a god script or some other startup script to set the ruby version per project (or simply start Thin/Unicorn manually).
The compromise is possible. You can it this a variety of ways but probably the easiest is a reverse proxy combined with as many chrooted ruby+webserver+rails installs as you find convenient.
2,985,241
**The Ideal** Using rvm, it would be awesome to be able to have multiple Rubies on one webserver, and through some sort of server configuration, be able to assign Ruby versions to different Rails/Sinatra/etc apps on a per-project basis. I am aware, from rvm's documentation, that Passenger only works with one Ruby at ...
2010/06/06
[ "https://Stackoverflow.com/questions/2985241", "https://Stackoverflow.com", "https://Stackoverflow.com/users/62066/" ]
Use multiple small virtual machines?
What about keeping all your projects (or at least those on one server) on the same ruby version? Be it using an old version or upgrading old projects? I think, this way you have the fewest problems.
2,985,241
**The Ideal** Using rvm, it would be awesome to be able to have multiple Rubies on one webserver, and through some sort of server configuration, be able to assign Ruby versions to different Rails/Sinatra/etc apps on a per-project basis. I am aware, from rvm's documentation, that Passenger only works with one Ruby at ...
2010/06/06
[ "https://Stackoverflow.com/questions/2985241", "https://Stackoverflow.com", "https://Stackoverflow.com/users/62066/" ]
Use multiple small virtual machines?
The compromise is possible. You can it this a variety of ways but probably the easiest is a reverse proxy combined with as many chrooted ruby+webserver+rails installs as you find convenient.
2,985,241
**The Ideal** Using rvm, it would be awesome to be able to have multiple Rubies on one webserver, and through some sort of server configuration, be able to assign Ruby versions to different Rails/Sinatra/etc apps on a per-project basis. I am aware, from rvm's documentation, that Passenger only works with one Ruby at ...
2010/06/06
[ "https://Stackoverflow.com/questions/2985241", "https://Stackoverflow.com", "https://Stackoverflow.com/users/62066/" ]
Use multiple small virtual machines?
If you're using Mac OS X, you may want to check out [POW!](http://pow.cx/), which can handle multiple rubies. There's a linux alternative called [hoof](https://github.com/pyromaniac/hoof/), which isn't as developed but is getting close.
2,985,241
**The Ideal** Using rvm, it would be awesome to be able to have multiple Rubies on one webserver, and through some sort of server configuration, be able to assign Ruby versions to different Rails/Sinatra/etc apps on a per-project basis. I am aware, from rvm's documentation, that Passenger only works with one Ruby at ...
2010/06/06
[ "https://Stackoverflow.com/questions/2985241", "https://Stackoverflow.com", "https://Stackoverflow.com/users/62066/" ]
check this post: [Phusion Passenger & running multiple Ruby versions](http://blog.phusion.nl/2010/09/21/phusion-passenger-running-multiple-ruby-versions/) from official Phusion blog. It's solve the problem by use Passenger Standalone as reverse proxy.
Use multiple small virtual machines?
2,985,241
**The Ideal** Using rvm, it would be awesome to be able to have multiple Rubies on one webserver, and through some sort of server configuration, be able to assign Ruby versions to different Rails/Sinatra/etc apps on a per-project basis. I am aware, from rvm's documentation, that Passenger only works with one Ruby at ...
2010/06/06
[ "https://Stackoverflow.com/questions/2985241", "https://Stackoverflow.com", "https://Stackoverflow.com/users/62066/" ]
check this post: [Phusion Passenger & running multiple Ruby versions](http://blog.phusion.nl/2010/09/21/phusion-passenger-running-multiple-ruby-versions/) from official Phusion blog. It's solve the problem by use Passenger Standalone as reverse proxy.
What about keeping all your projects (or at least those on one server) on the same ruby version? Be it using an old version or upgrading old projects? I think, this way you have the fewest problems.
2,985,241
**The Ideal** Using rvm, it would be awesome to be able to have multiple Rubies on one webserver, and through some sort of server configuration, be able to assign Ruby versions to different Rails/Sinatra/etc apps on a per-project basis. I am aware, from rvm's documentation, that Passenger only works with one Ruby at ...
2010/06/06
[ "https://Stackoverflow.com/questions/2985241", "https://Stackoverflow.com", "https://Stackoverflow.com/users/62066/" ]
check this post: [Phusion Passenger & running multiple Ruby versions](http://blog.phusion.nl/2010/09/21/phusion-passenger-running-multiple-ruby-versions/) from official Phusion blog. It's solve the problem by use Passenger Standalone as reverse proxy.
You could use Thin or Unicorn with Nginx. You could than write a god script or some other startup script to set the ruby version per project (or simply start Thin/Unicorn manually).
2,985,241
**The Ideal** Using rvm, it would be awesome to be able to have multiple Rubies on one webserver, and through some sort of server configuration, be able to assign Ruby versions to different Rails/Sinatra/etc apps on a per-project basis. I am aware, from rvm's documentation, that Passenger only works with one Ruby at ...
2010/06/06
[ "https://Stackoverflow.com/questions/2985241", "https://Stackoverflow.com", "https://Stackoverflow.com/users/62066/" ]
You could use Thin or Unicorn with Nginx. You could than write a god script or some other startup script to set the ruby version per project (or simply start Thin/Unicorn manually).
If you're using Mac OS X, you may want to check out [POW!](http://pow.cx/), which can handle multiple rubies. There's a linux alternative called [hoof](https://github.com/pyromaniac/hoof/), which isn't as developed but is getting close.
2,985,241
**The Ideal** Using rvm, it would be awesome to be able to have multiple Rubies on one webserver, and through some sort of server configuration, be able to assign Ruby versions to different Rails/Sinatra/etc apps on a per-project basis. I am aware, from rvm's documentation, that Passenger only works with one Ruby at ...
2010/06/06
[ "https://Stackoverflow.com/questions/2985241", "https://Stackoverflow.com", "https://Stackoverflow.com/users/62066/" ]
check this post: [Phusion Passenger & running multiple Ruby versions](http://blog.phusion.nl/2010/09/21/phusion-passenger-running-multiple-ruby-versions/) from official Phusion blog. It's solve the problem by use Passenger Standalone as reverse proxy.
The compromise is possible. You can it this a variety of ways but probably the easiest is a reverse proxy combined with as many chrooted ruby+webserver+rails installs as you find convenient.
1,527,839
There are many books and articles that prove [Sperner's Lemma](https://en.wikipedia.org/wiki/Sperner's_lemma/ "Sperner's Lemma"). Almost all that I have looked up happily take the following as obvious. > > If $\mathcal{S}$ is a simplicial subdivision of the standard $n$-simplex, then every $(n-1)$-simplex of $\mathca...
2015/11/13
[ "https://math.stackexchange.com/questions/1527839", "https://math.stackexchange.com", "https://math.stackexchange.com/users/254302/" ]
It depends on what you mean by a "simplicial subdivision". I can think of two different definitions, leading to two different outcomes for your question. In one definition, a "simplicial subdivision" is obtained from the original decomposition into simplices by repeating some kind of elementary subdivision. The iterat...
I presume this answer is untimely, but I recently faced the exact same issue. It turns out that more is true: 1. Every $(n-1)$-dimensional subsimplex in $\mathcal S$ that lies fully in the boundary of the “big” simplex is a face of *precisely one* $n$-dimensional subsimplex in $\mathcal S$. 2. Every $(n-1)$-dimensiona...
1,527,839
There are many books and articles that prove [Sperner's Lemma](https://en.wikipedia.org/wiki/Sperner's_lemma/ "Sperner's Lemma"). Almost all that I have looked up happily take the following as obvious. > > If $\mathcal{S}$ is a simplicial subdivision of the standard $n$-simplex, then every $(n-1)$-simplex of $\mathca...
2015/11/13
[ "https://math.stackexchange.com/questions/1527839", "https://math.stackexchange.com", "https://math.stackexchange.com/users/254302/" ]
It depends on what you mean by a "simplicial subdivision". I can think of two different definitions, leading to two different outcomes for your question. In one definition, a "simplicial subdivision" is obtained from the original decomposition into simplices by repeating some kind of elementary subdivision. The iterat...
Nice to see old friends like @Lee Mosher here! As far as I can tell, the usual definition of a simplicial subdivision in the Sperner case is a finite collection of simplices which cover $\Delta^n$ and where the intersection of any two of these simplices is either empty or a face (of any dimension $<n$) of both. The sub...
1,527,839
There are many books and articles that prove [Sperner's Lemma](https://en.wikipedia.org/wiki/Sperner's_lemma/ "Sperner's Lemma"). Almost all that I have looked up happily take the following as obvious. > > If $\mathcal{S}$ is a simplicial subdivision of the standard $n$-simplex, then every $(n-1)$-simplex of $\mathca...
2015/11/13
[ "https://math.stackexchange.com/questions/1527839", "https://math.stackexchange.com", "https://math.stackexchange.com/users/254302/" ]
I presume this answer is untimely, but I recently faced the exact same issue. It turns out that more is true: 1. Every $(n-1)$-dimensional subsimplex in $\mathcal S$ that lies fully in the boundary of the “big” simplex is a face of *precisely one* $n$-dimensional subsimplex in $\mathcal S$. 2. Every $(n-1)$-dimensiona...
Nice to see old friends like @Lee Mosher here! As far as I can tell, the usual definition of a simplicial subdivision in the Sperner case is a finite collection of simplices which cover $\Delta^n$ and where the intersection of any two of these simplices is either empty or a face (of any dimension $<n$) of both. The sub...
15,262,025
can someone give me help on a simple jQuery code that when clicked different radio bottuon then display the different content. <http://jsfiddle.net/AXsVY/> **HTML** ``` <label class="radio inline"> <input id="up_radio" type="radio" name="optionsRadios" value="update" checked> Update </label> <label class="...
2013/03/07
[ "https://Stackoverflow.com/questions/15262025", "https://Stackoverflow.com", "https://Stackoverflow.com/users/531924/" ]
<http://jsfiddle.net/AXsVY/2/> Use on change not on click. Click triggers change, but the user could also tab across and hit an arrow key. It will always `change`. ``` $('input[name="optionsRadios"]').on('change', function(){ if ($(this).val()=='update') { //change to "show update" $("#cont").te...
``` $("input:radio[name=optionsRadios]").click(function() { var value = $(this).val(); if(value="update") $("#cont").text("show update"); else $("#cont").text("show update other"); }); ```
15,262,025
can someone give me help on a simple jQuery code that when clicked different radio bottuon then display the different content. <http://jsfiddle.net/AXsVY/> **HTML** ``` <label class="radio inline"> <input id="up_radio" type="radio" name="optionsRadios" value="update" checked> Update </label> <label class="...
2013/03/07
[ "https://Stackoverflow.com/questions/15262025", "https://Stackoverflow.com", "https://Stackoverflow.com/users/531924/" ]
<http://jsfiddle.net/AXsVY/2/> Use on change not on click. Click triggers change, but the user could also tab across and hit an arrow key. It will always `change`. ``` $('input[name="optionsRadios"]').on('change', function(){ if ($(this).val()=='update') { //change to "show update" $("#cont").te...
Solved, based on your approach.. There are more optimizations you could do, but I left it mostly as-is: <http://jsfiddle.net/digitalextremist/mqrHs/> Here's the code outside a fiddle: ``` $(".radio input[type='radio']").on( 'click', function(){ if ($("#up_radio").is(":checked")) { $("#cont").html( "show...
15,262,025
can someone give me help on a simple jQuery code that when clicked different radio bottuon then display the different content. <http://jsfiddle.net/AXsVY/> **HTML** ``` <label class="radio inline"> <input id="up_radio" type="radio" name="optionsRadios" value="update" checked> Update </label> <label class="...
2013/03/07
[ "https://Stackoverflow.com/questions/15262025", "https://Stackoverflow.com", "https://Stackoverflow.com/users/531924/" ]
Solved, based on your approach.. There are more optimizations you could do, but I left it mostly as-is: <http://jsfiddle.net/digitalextremist/mqrHs/> Here's the code outside a fiddle: ``` $(".radio input[type='radio']").on( 'click', function(){ if ($("#up_radio").is(":checked")) { $("#cont").html( "show...
``` $("input:radio[name=optionsRadios]").click(function() { var value = $(this).val(); if(value="update") $("#cont").text("show update"); else $("#cont").text("show update other"); }); ```
53,669,048
I don't know what to do regarding this: I updated to the latest gradle from here: <https://bintray.com/android/android-tools/com.google.gms.google-services/> I have the latest gradle plugin 3.2.1. Also updated to latest google play libraries from here: <https://developers.google.com/android/guides/setup> And Firebase: ...
2018/12/07
[ "https://Stackoverflow.com/questions/53669048", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1307987/" ]
I made a clean android app and added the same manifest, and then played with the build.gradle file. I noticed that removing: `implementation 'com.google.android.gms:play-services-analytics:16.0.4'` worked. So I google a bit and found here the latest version: <https://developers.google.com/android/guides/releases> I ...
Try to implement **multidex** in your project. It will solve your problem. I am facing the same problem in some project while adding too many libraries in the project. To enable multidex in your project visit below link: [Enable Multidex](https://developer.android.com/studio/build/multidex) I hope it will resolve yo...
3,926,559
> > Two circles $C\_1$ and $C\_2$ of radii $10$ cm and $8$ cm are respectively are tangent to each other internally at a point $A$. $AD$ is the diameter of $C\_1$ and $P$ and $M$ are points on $C\_1$,$C\_2$ respectively such that $PM$ is tangent to $C\_2$ . If $PM = \sqrt{20}$ and $\angle PAD = x^\circ$, find $x$. > ...
2020/11/28
[ "https://math.stackexchange.com/questions/3926559", "https://math.stackexchange.com", "https://math.stackexchange.com/users/772237/" ]
$OK = 10 - 8 = 2$, $KP = 10, OP = \sqrt{84}$ Using cosine law, $84 = 2^2 + 10^2 - 40 \cos \angle AKP \implies cos \angle AKP = \frac{1}{2}$ $\angle AKP = 60^0$ $\angle PAD = \frac{1}{2}(180^0 - 60^0) = 60^0$ **EDIT: Just using Pythagoras,** Drop perp from $P$ to $AK$ which meets $AK$ at say, $X$ and $KX = x$. Th...
Note $2x =180^\circ-\angle PKO$ and apply the cosine rule $$\cos 2x=-\cos\angle PKO = - \frac{KO^2+KP^2 - PO^2}{2\cdot KO\cdot KP} $$ Plug in $KO=2$, $KP=10 $ and $OP^2={8^2+20}=84$ to get $\cos 2x =-\frac12$, yielding $x =60^\circ$.
28,132,972
I have a code to fill my combo box but every time i close the form the list is being doubled, if i have a list from my database of English, Mathematics, Science after i close the form and open it again the list showing is now English, Mathematics, Science, English, Mathematics, Science HERE IS THE CODE, ``` Call ...
2015/01/25
[ "https://Stackoverflow.com/questions/28132972", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4439987/" ]
The problem is not in the method you are using to bind the `combobox`. in each time it binds that's why you are getting duplicate records in the database. to avoid this please clear the `combobox` before each bind, like the following: ``` Call OpenDB() cmbSubject.Items.Clear ' extra statement added to clear the item c...
``` Public Class frmRegistration Dim obj As New Entity.Registration Dim bus As New Business.Registration Private Sub BtnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnSave.Click BindingSource1.EndEdit() bus.Save(obj) RefreshGrid() MsgBox("S...
40,494,175
I am trying to create a view in MySQL. I want it to display the user email, first-lastname, their DOB, and their current age. I only want to show the users that are over 21 years of age. This is what I have: ``` CREATE VIEW 'valid_Users' AS SELECT Persons.Email AS Email, Persons.FName + ' ' + Persons.LName AS Name, ...
2016/11/08
[ "https://Stackoverflow.com/questions/40494175", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3483444/" ]
Try: ``` CREATE VIEW 'valid_Users' AS SELECT Persons.Email AS Email, Persons.FName + ' ' + Persons.LName AS Name, Persons.DOB AS Birth_Date, DATE_FORMAT(FROM_DAYS(DATEDIFF(NOW(), Persons.DOB)), "%Y")+0 AS Current_Age' FROM Persons WHERE DATE_FORMAT(FROM_DAYS(DATEDIFF(NOW(), Persons.DOB)), "%Y")+0 > 21; ``` OR: ```...
I presume you want something like this: ``` CREATE VIEW valid_Users AS SELECT p.Email, CONCAT(p.FName, ' ', p.LName) AS Name, p.DOB AS BirthDate, TIMESTAMPDIFF('year', p.DOB, CURDATE()) AS CurrentAge FROM Persons p WHERE p.DOB < CURDATE() - INTERVAL 21 YEARS; ```
40,494,175
I am trying to create a view in MySQL. I want it to display the user email, first-lastname, their DOB, and their current age. I only want to show the users that are over 21 years of age. This is what I have: ``` CREATE VIEW 'valid_Users' AS SELECT Persons.Email AS Email, Persons.FName + ' ' + Persons.LName AS Name, ...
2016/11/08
[ "https://Stackoverflow.com/questions/40494175", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3483444/" ]
Try: ``` CREATE VIEW 'valid_Users' AS SELECT Persons.Email AS Email, Persons.FName + ' ' + Persons.LName AS Name, Persons.DOB AS Birth_Date, DATE_FORMAT(FROM_DAYS(DATEDIFF(NOW(), Persons.DOB)), "%Y")+0 AS Current_Age' FROM Persons WHERE DATE_FORMAT(FROM_DAYS(DATEDIFF(NOW(), Persons.DOB)), "%Y")+0 > 21; ``` OR: ```...
Well try switching parameters: ``` SELECT DATEDIFF(NOW(), Persons.DOB) AS days; ``` tell us what do you get?
12,033,167
I am developing website(HTML, javascript, jQuery, Ajax, css) in which, I am using basic authentication in spring in server side. I am sending Basic="Base64 Endcoded Username & password" in Authorization header of HTTP request. Login works fine on correct username & password. But on failure, it shows me a default promp...
2012/08/20
[ "https://Stackoverflow.com/questions/12033167", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1230359/" ]
After so much of hurdle .. finally I have done it. I have posted it on my blog <http://swapgo20.wordpress.com/2012/10/21/website-spring-security-basic-authorization-in-javascript/>
By default, the class `AuthenticationEntryPoint` redirects user to the login page when there is a failure in the authentication process. To change the default behavior and provide a custom Authentication Failure page, you can specify an entry in your security.xml file ``` <form-login login-processing-url="your-login-c...
235,745
In a project, we have a file that contains something like a script which we need to parse. At the moment the validation is tough since we have an array of functions returing `variable` and taking `variableList` (basically `std::variant<>`and vector of variants, see definition below) I am trying to have function meta...
2020/01/16
[ "https://codereview.stackexchange.com/questions/235745", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/150137/" ]
Prefer `enum class` with a name, and probably rename the enums, e.g. `BOOL_TYPE` becomes `TYPE::BOOL` or however you'd like to do the naming. Why do you want them to be an unnamed enum type? --- You're printing an error to cout when there's an error. At the very least, print to cerr, so that someone running this migh...
What do you think of this? Add script functions to a function map like this: ``` function_map["function name"] = MakeScriptFunction<ReturnType, ArgumentTypes...>(fn); ``` call them like this: ``` // |arg 0 |arg 1|arg 2| arg 3| function_map["foo"]({"foo string", 69.0, 666, false}); //...
235,745
In a project, we have a file that contains something like a script which we need to parse. At the moment the validation is tough since we have an array of functions returing `variable` and taking `variableList` (basically `std::variant<>`and vector of variants, see definition below) I am trying to have function meta...
2020/01/16
[ "https://codereview.stackexchange.com/questions/235745", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/150137/" ]
Prefer `enum class` with a name, and probably rename the enums, e.g. `BOOL_TYPE` becomes `TYPE::BOOL` or however you'd like to do the naming. Why do you want them to be an unnamed enum type? --- You're printing an error to cout when there's an error. At the very least, print to cerr, so that someone running this migh...
I ended up with something like this: ``` template<std::size_t N, typename T> inline std::enable_if_t<N == 0, bool> typeCheck(variableList& list) noexcept { if (false == std::holds_alternative<std::tuple_element_t<N, T>>(list[N])) { std::cout << "Function type check failed for " << N << ". element." << ...
235,745
In a project, we have a file that contains something like a script which we need to parse. At the moment the validation is tough since we have an array of functions returing `variable` and taking `variableList` (basically `std::variant<>`and vector of variants, see definition below) I am trying to have function meta...
2020/01/16
[ "https://codereview.stackexchange.com/questions/235745", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/150137/" ]
Prefer `enum class` with a name, and probably rename the enums, e.g. `BOOL_TYPE` becomes `TYPE::BOOL` or however you'd like to do the naming. Why do you want them to be an unnamed enum type? --- You're printing an error to cout when there's an error. At the very least, print to cerr, so that someone running this migh...
Fix the warnings ================ ```none 235745.cpp: In member function ‘variable Function::operator()(variableList&&)’: 235745.cpp:43:49: warning: value computed is not used [-Wunused-value] 43 | if ((indexes[0] & 0x80) ? i.index() != (indexes[0] & 0x03), idx++ : i.index() != indexes[idx++]) | ...
235,745
In a project, we have a file that contains something like a script which we need to parse. At the moment the validation is tough since we have an array of functions returing `variable` and taking `variableList` (basically `std::variant<>`and vector of variants, see definition below) I am trying to have function meta...
2020/01/16
[ "https://codereview.stackexchange.com/questions/235745", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/150137/" ]
What do you think of this? Add script functions to a function map like this: ``` function_map["function name"] = MakeScriptFunction<ReturnType, ArgumentTypes...>(fn); ``` call them like this: ``` // |arg 0 |arg 1|arg 2| arg 3| function_map["foo"]({"foo string", 69.0, 666, false}); //...
I ended up with something like this: ``` template<std::size_t N, typename T> inline std::enable_if_t<N == 0, bool> typeCheck(variableList& list) noexcept { if (false == std::holds_alternative<std::tuple_element_t<N, T>>(list[N])) { std::cout << "Function type check failed for " << N << ". element." << ...
235,745
In a project, we have a file that contains something like a script which we need to parse. At the moment the validation is tough since we have an array of functions returing `variable` and taking `variableList` (basically `std::variant<>`and vector of variants, see definition below) I am trying to have function meta...
2020/01/16
[ "https://codereview.stackexchange.com/questions/235745", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/150137/" ]
What do you think of this? Add script functions to a function map like this: ``` function_map["function name"] = MakeScriptFunction<ReturnType, ArgumentTypes...>(fn); ``` call them like this: ``` // |arg 0 |arg 1|arg 2| arg 3| function_map["foo"]({"foo string", 69.0, 666, false}); //...
Fix the warnings ================ ```none 235745.cpp: In member function ‘variable Function::operator()(variableList&&)’: 235745.cpp:43:49: warning: value computed is not used [-Wunused-value] 43 | if ((indexes[0] & 0x80) ? i.index() != (indexes[0] & 0x03), idx++ : i.index() != indexes[idx++]) | ...
47,065,749
This is my code: ``` a_list = [lambda x: x**n for n in range(1, 5)] for q in a_list: print(q(3)) ``` I want to list 3 to the power of 1 to 4, but the result is: ``` 27 27 27 27 ``` Could you help me fix it? Thank you very much! (I use python 3)
2017/11/02
[ "https://Stackoverflow.com/questions/47065749", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8768668/" ]
You want to preserve the argument as a default in the lambda: ``` [lambda x, *, n=n: x**n for n in range(1, 5)] ``` And then: ``` >>> for q in a: print(q(3)) 3 9 27 81 ``` Using the [`functools`](https://docs.python.org/3/library/functools.html#module-functools) module: ``` from functools import partial [pa...
Rassar answer is good! Another way to do it is used [`functools.partial`](https://docs.python.org/2/library/functools.html#functools.partial) in order to set the `n`: ``` from functools import partial a_list = [partial(lambda n, x: x**n, n) for n in range(1, 5)] for q in a_list: print(q(3)) ``` partial is taki...
71,734,836
I'm using a Laravel 8 for website developement, and on the next part of code, I execute a query: ``` $assig = DB::table('table') ->where('table.column', '=', "oneValue") ->select('anfunctionOnDatabase(2,table.columDesc)') ->get(); ``` but it no works. How I need call to database function on laravel? Thanks
2022/04/04
[ "https://Stackoverflow.com/questions/71734836", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11351638/" ]
Use selectRaw() like this; ``` $assig = DB::table('table') ->where('table.column', '=', "oneValue") ->selectRaw('anfunctionOnDatabase(2,table.columDesc)') ->get(); ```
Use : DB::raw : ``` $assig = DB::table('table') ->where('table.column', '=', "oneValue") ->select(DB::raw("anfunctionOnDatabase(2,table.columDesc)")) ->get(); ```
987,967
I have an form input element and want to change its title attribute. This has to be easy as pie, but for some reason I cannot find how to do this. How is this done, and where and how should I be searching on how to do this?
2009/06/12
[ "https://Stackoverflow.com/questions/987967", "https://Stackoverflow.com", "https://Stackoverflow.com/users/62085/" ]
I beleive ``` $("#myElement").attr("title", "new title value") ``` or ``` $("#myElement").prop("title", "new title value") ``` should do the trick... I think you can find all the core functions in the [jQuery Docs](http://docs.jquery.com/Main_Page), although I hate the formatting.
If you are creating a `div` and trying to add a `title` to it. Try ``` var myDiv= document.createElement("div"); myDiv.setAttribute('title','mytitle'); ```
987,967
I have an form input element and want to change its title attribute. This has to be easy as pie, but for some reason I cannot find how to do this. How is this done, and where and how should I be searching on how to do this?
2009/06/12
[ "https://Stackoverflow.com/questions/987967", "https://Stackoverflow.com", "https://Stackoverflow.com/users/62085/" ]
Before we write any code, let's discuss the difference between attributes and properties. Attributes are the settings you apply to elements in your *HTML markup*; the browser then parses the markup and creates DOM objects of various types that contain *properties* initialized with the values of the attributes. On DOM o...
In jquery ui modal dialogs you need to use this construct: ``` $( "#my_dialog" ).dialog( "option", "title", "my new title" ); ```
987,967
I have an form input element and want to change its title attribute. This has to be easy as pie, but for some reason I cannot find how to do this. How is this done, and where and how should I be searching on how to do this?
2009/06/12
[ "https://Stackoverflow.com/questions/987967", "https://Stackoverflow.com", "https://Stackoverflow.com/users/62085/" ]
Before we write any code, let's discuss the difference between attributes and properties. Attributes are the settings you apply to elements in your *HTML markup*; the browser then parses the markup and creates DOM objects of various types that contain *properties* initialized with the values of the attributes. On DOM o...
``` jqueryTitle({ title: 'New Title' }); ``` for first title: ``` jqueryTitle('destroy'); ``` <https://github.com/ertaserdi/jQuery-Title>
987,967
I have an form input element and want to change its title attribute. This has to be easy as pie, but for some reason I cannot find how to do this. How is this done, and where and how should I be searching on how to do this?
2009/06/12
[ "https://Stackoverflow.com/questions/987967", "https://Stackoverflow.com", "https://Stackoverflow.com/users/62085/" ]
Another option, if you prefer, would be to get the DOM element from the jQuery object and use standard DOM accessors on it: ``` $("#myElement")[0].title = "new title value"; ``` The "jQuery way", as mentioned by others, is to use the attr() method. See the API documentation for attr() [here](http://docs.jquery.com/A...
If you are creating a `div` and trying to add a `title` to it. Try ``` var myDiv= document.createElement("div"); myDiv.setAttribute('title','mytitle'); ```
987,967
I have an form input element and want to change its title attribute. This has to be easy as pie, but for some reason I cannot find how to do this. How is this done, and where and how should I be searching on how to do this?
2009/06/12
[ "https://Stackoverflow.com/questions/987967", "https://Stackoverflow.com", "https://Stackoverflow.com/users/62085/" ]
I beleive ``` $("#myElement").attr("title", "new title value") ``` or ``` $("#myElement").prop("title", "new title value") ``` should do the trick... I think you can find all the core functions in the [jQuery Docs](http://docs.jquery.com/Main_Page), although I hate the formatting.
Another option, if you prefer, would be to get the DOM element from the jQuery object and use standard DOM accessors on it: ``` $("#myElement")[0].title = "new title value"; ``` The "jQuery way", as mentioned by others, is to use the attr() method. See the API documentation for attr() [here](http://docs.jquery.com/A...
987,967
I have an form input element and want to change its title attribute. This has to be easy as pie, but for some reason I cannot find how to do this. How is this done, and where and how should I be searching on how to do this?
2009/06/12
[ "https://Stackoverflow.com/questions/987967", "https://Stackoverflow.com", "https://Stackoverflow.com/users/62085/" ]
Before we write any code, let's discuss the difference between attributes and properties. Attributes are the settings you apply to elements in your *HTML markup*; the browser then parses the markup and creates DOM objects of various types that contain *properties* initialized with the values of the attributes. On DOM o...
If you are creating a `div` and trying to add a `title` to it. Try ``` var myDiv= document.createElement("div"); myDiv.setAttribute('title','mytitle'); ```
987,967
I have an form input element and want to change its title attribute. This has to be easy as pie, but for some reason I cannot find how to do this. How is this done, and where and how should I be searching on how to do this?
2009/06/12
[ "https://Stackoverflow.com/questions/987967", "https://Stackoverflow.com", "https://Stackoverflow.com/users/62085/" ]
In jquery ui modal dialogs you need to use this construct: ``` $( "#my_dialog" ).dialog( "option", "title", "my new title" ); ```
Another option, if you prefer, would be to get the DOM element from the jQuery object and use standard DOM accessors on it: ``` $("#myElement")[0].title = "new title value"; ``` The "jQuery way", as mentioned by others, is to use the attr() method. See the API documentation for attr() [here](http://docs.jquery.com/A...
987,967
I have an form input element and want to change its title attribute. This has to be easy as pie, but for some reason I cannot find how to do this. How is this done, and where and how should I be searching on how to do this?
2009/06/12
[ "https://Stackoverflow.com/questions/987967", "https://Stackoverflow.com", "https://Stackoverflow.com/users/62085/" ]
In jquery ui modal dialogs you need to use this construct: ``` $( "#my_dialog" ).dialog( "option", "title", "my new title" ); ```
As an addition to @Cᴏʀʏ answer, make sure the title of the tooltip has not already been set manually in the HTML element. In my case, the span class for the tooltip already had a fixed tittle text, because of this my JQuery function `$('[data-toggle="tooltip"]').prop('title', 'your new title');` did not work. When I ...
987,967
I have an form input element and want to change its title attribute. This has to be easy as pie, but for some reason I cannot find how to do this. How is this done, and where and how should I be searching on how to do this?
2009/06/12
[ "https://Stackoverflow.com/questions/987967", "https://Stackoverflow.com", "https://Stackoverflow.com/users/62085/" ]
Another option, if you prefer, would be to get the DOM element from the jQuery object and use standard DOM accessors on it: ``` $("#myElement")[0].title = "new title value"; ``` The "jQuery way", as mentioned by others, is to use the attr() method. See the API documentation for attr() [here](http://docs.jquery.com/A...
``` jqueryTitle({ title: 'New Title' }); ``` for first title: ``` jqueryTitle('destroy'); ``` <https://github.com/ertaserdi/jQuery-Title>
987,967
I have an form input element and want to change its title attribute. This has to be easy as pie, but for some reason I cannot find how to do this. How is this done, and where and how should I be searching on how to do this?
2009/06/12
[ "https://Stackoverflow.com/questions/987967", "https://Stackoverflow.com", "https://Stackoverflow.com/users/62085/" ]
Before we write any code, let's discuss the difference between attributes and properties. Attributes are the settings you apply to elements in your *HTML markup*; the browser then parses the markup and creates DOM objects of various types that contain *properties* initialized with the values of the attributes. On DOM o...
I beleive ``` $("#myElement").attr("title", "new title value") ``` or ``` $("#myElement").prop("title", "new title value") ``` should do the trick... I think you can find all the core functions in the [jQuery Docs](http://docs.jquery.com/Main_Page), although I hate the formatting.
28,714,249
Hie Everyone! My question is to count no. of rows from mysql query and store in `$var`. Table - Table\_nm / fields- UserID, Username, Serialno, Address. php coding part: ``` $DB=Function();//this function is to connect to database. $sql="select UserID,Username,Serialno,Address from Table_nm where UserID='1' and ...
2015/02/25
[ "https://Stackoverflow.com/questions/28714249", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4596929/" ]
this might solve your problem ``` $sql=mysql_query("select UserID,Username,Serialno,Address from Table_nm where UserID='1' and Username='name' and Serialno='20' and Address='Delhi'"); $var = mysql_num_rows($sql); ```
This will be correct if you have php < 5.5: ``` $sql="select UserID,Username,Serialno,Address from Table_nm where UserID='1' and Username='name' and Serialno='20' and Address='Delhi' "; $result = mysql_query($sql); $var = mysql_num_rows($result); ``` Mysql extension is depricated from php 5.5 so you need to use mysq...
41,587,858
I have a form in php and i need to validate the form. So i tried these code, but am not getting any validation message. Nothing is being displayed. What is the error that i am getting ``` <form class="" method="post" action=""> <div class ="col-md-3" style="clear:both;"> <label style="font-size:12px;"> Yo...
2017/01/11
[ "https://Stackoverflow.com/questions/41587858", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5361831/" ]
You just need to check the validation above the html not below :)
In your the else is placed wrong @coder. **I works fine for me** **NewBie can u plz check this** ``` <?php $nameError =""; if(isset($_POST['submit'])) ``` { ``` if (empty($_POST["AS_Name"])) { $nameError = "Name is required"; ``` } else { $name = $\_POST["AS\_Name"]; ``` if (!preg_match("/^[a-zA-Z ]*$/",$n...
41,587,858
I have a form in php and i need to validate the form. So i tried these code, but am not getting any validation message. Nothing is being displayed. What is the error that i am getting ``` <form class="" method="post" action=""> <div class ="col-md-3" style="clear:both;"> <label style="font-size:12px;"> Yo...
2017/01/11
[ "https://Stackoverflow.com/questions/41587858", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5361831/" ]
Make the following changes ``` <?php $nameError =""; if(isset($_POST['submit'])) { if (empty($_POST["AS_Name"])) { $nameError = "Name is required"; } else { $name = test_input($_POST["AS_Name"]); // check name only contains letters and whitespace if (!preg_match("/^[a-zA-Z ]*$/",$name)...
In your the else is placed wrong @coder. **I works fine for me** **NewBie can u plz check this** ``` <?php $nameError =""; if(isset($_POST['submit'])) ``` { ``` if (empty($_POST["AS_Name"])) { $nameError = "Name is required"; ``` } else { $name = $\_POST["AS\_Name"]; ``` if (!preg_match("/^[a-zA-Z ]*$/",$n...
1,876,502
Do you know any resource/s that teaches design patterns by scenario. Ex : One day x person needs a converting A/C tool between different country resources..... Answer : Adapter Pattern .. because.... Thanks.
2009/12/09
[ "https://Stackoverflow.com/questions/1876502", "https://Stackoverflow.com", "https://Stackoverflow.com/users/174005/" ]
[Design Patterns](https://rads.stackoverflow.com/amzn/click/com/0201633612), Gang of Four.
Along with Head-First-Design-Patterns and GoF Design Patterns. I suggest This list of books below: * **Refactoring To Patterns** by *Joshua Kerievsky* * **Refactoring: Improving the Design of Existing Code** by *Martin Fowler, Kent Beck (Contributor), John Brant (Contributor), William Opdyke, don Roberts* * **C# 3.0...
1,876,502
Do you know any resource/s that teaches design patterns by scenario. Ex : One day x person needs a converting A/C tool between different country resources..... Answer : Adapter Pattern .. because.... Thanks.
2009/12/09
[ "https://Stackoverflow.com/questions/1876502", "https://Stackoverflow.com", "https://Stackoverflow.com/users/174005/" ]
[Design Patterns](https://rads.stackoverflow.com/amzn/click/com/0201633612), Gang of Four.
I recommend this book: [http://www.amazon.com/Applied-Java-Patterns-Stephen-Stelting/dp/0130935387](https://rads.stackoverflow.com/amzn/click/com/0130935387) If you need an online info: <http://sourcemaking.com/design_patterns>, <http://www.oodesign.com/>
1,876,502
Do you know any resource/s that teaches design patterns by scenario. Ex : One day x person needs a converting A/C tool between different country resources..... Answer : Adapter Pattern .. because.... Thanks.
2009/12/09
[ "https://Stackoverflow.com/questions/1876502", "https://Stackoverflow.com", "https://Stackoverflow.com/users/174005/" ]
[Design Patterns](https://rads.stackoverflow.com/amzn/click/com/0201633612), Gang of Four.
Get the book from this guy. He explains 23 design patterns in under 100 pages and with nice simple examples. Link: [Design Patterns in C#](https://rads.stackoverflow.com/amzn/click/com/B008ZT9MOI) And after you have read this for first time get this cheat-sheet in order to help you when you revisit the topic (almost ...
1,876,502
Do you know any resource/s that teaches design patterns by scenario. Ex : One day x person needs a converting A/C tool between different country resources..... Answer : Adapter Pattern .. because.... Thanks.
2009/12/09
[ "https://Stackoverflow.com/questions/1876502", "https://Stackoverflow.com", "https://Stackoverflow.com/users/174005/" ]
In a language agnostic point of view, you should buy definitely this (easy to learn through examples): [http://www.amazon.com/First-Design-Patterns-Elisabeth-Freeman/dp/0596007124](https://rads.stackoverflow.com/amzn/click/com/0596007124) or Refactoring To Patterns for a more cause-and-effect approach: [http:/...
Along with Head-First-Design-Patterns and GoF Design Patterns. I suggest This list of books below: * **Refactoring To Patterns** by *Joshua Kerievsky* * **Refactoring: Improving the Design of Existing Code** by *Martin Fowler, Kent Beck (Contributor), John Brant (Contributor), William Opdyke, don Roberts* * **C# 3.0...
1,876,502
Do you know any resource/s that teaches design patterns by scenario. Ex : One day x person needs a converting A/C tool between different country resources..... Answer : Adapter Pattern .. because.... Thanks.
2009/12/09
[ "https://Stackoverflow.com/questions/1876502", "https://Stackoverflow.com", "https://Stackoverflow.com/users/174005/" ]
In a language agnostic point of view, you should buy definitely this (easy to learn through examples): [http://www.amazon.com/First-Design-Patterns-Elisabeth-Freeman/dp/0596007124](https://rads.stackoverflow.com/amzn/click/com/0596007124) or Refactoring To Patterns for a more cause-and-effect approach: [http:/...
I recommend this book: [http://www.amazon.com/Applied-Java-Patterns-Stephen-Stelting/dp/0130935387](https://rads.stackoverflow.com/amzn/click/com/0130935387) If you need an online info: <http://sourcemaking.com/design_patterns>, <http://www.oodesign.com/>