qid int64 1 74.7M | question stringlengths 0 58.3k | date stringlengths 10 10 | metadata list | response_j stringlengths 2 48.3k | response_k stringlengths 2 40.5k |
|---|---|---|---|---|---|
3,124,568 | Q) Let $P\_{1},P\_{2},$ and $P\_{3}$ denote, respectively, the planes defined by
$a\_{1}x + b\_{1}y + c\_{1}z =\alpha\_{1}$
$a\_{2}x + b\_{2}y + c\_{2}z = \alpha \_{2}$
$a\_{3}x + b\_{3}y + c\_{3}z = \alpha \_{3}$
It is given that $P\_{1},P\_{2},$ and $P\_{3}$ intersect exactly at one point when $\alpha \_{1}= \al... | 2019/02/24 | [
"https://math.stackexchange.com/questions/3124568",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/559765/"
] | The key thing you pointed out is that $Ax = b$ having a unique solution for some $b$ shows that the columns of $A$ are linearly independent. In particular, the columns of $A$ are three linearly independent vectors in $\mathbb{R}^3$, so they actually form a full basis for $\mathbb{R}^3$. By the definition of a basis, ev... | The values of $\alpha\_i$ are irrelevant, only that the planes intersect at a unique point. The coefficient matrix is thus of full rank, and for any given $\alpha\_i$ said matrix can be inverted and left-multiplied with the $\alpha\_i$ vector to yield a unique solution for $x,y,z$. Thus B is the correct answer. |
3,124,568 | Q) Let $P\_{1},P\_{2},$ and $P\_{3}$ denote, respectively, the planes defined by
$a\_{1}x + b\_{1}y + c\_{1}z =\alpha\_{1}$
$a\_{2}x + b\_{2}y + c\_{2}z = \alpha \_{2}$
$a\_{3}x + b\_{3}y + c\_{3}z = \alpha \_{3}$
It is given that $P\_{1},P\_{2},$ and $P\_{3}$ intersect exactly at one point when $\alpha \_{1}= \al... | 2019/02/24 | [
"https://math.stackexchange.com/questions/3124568",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/559765/"
] | The key thing you pointed out is that $Ax = b$ having a unique solution for some $b$ shows that the columns of $A$ are linearly independent. In particular, the columns of $A$ are three linearly independent vectors in $\mathbb{R}^3$, so they actually form a full basis for $\mathbb{R}^3$. By the definition of a basis, ev... | Since $Ax=b$ has unique solution for a particular $b$, we know that $A$ is invertible; i.e. $A^{-1}$ exists. Therefore, no matter what other $b$ you pick, there will still be the solution $x=A^{-1}b$ to the equation. Can you continue? |
3,124,568 | Q) Let $P\_{1},P\_{2},$ and $P\_{3}$ denote, respectively, the planes defined by
$a\_{1}x + b\_{1}y + c\_{1}z =\alpha\_{1}$
$a\_{2}x + b\_{2}y + c\_{2}z = \alpha \_{2}$
$a\_{3}x + b\_{3}y + c\_{3}z = \alpha \_{3}$
It is given that $P\_{1},P\_{2},$ and $P\_{3}$ intersect exactly at one point when $\alpha \_{1}= \al... | 2019/02/24 | [
"https://math.stackexchange.com/questions/3124568",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/559765/"
] | The key thing you pointed out is that $Ax = b$ having a unique solution for some $b$ shows that the columns of $A$ are linearly independent. In particular, the columns of $A$ are three linearly independent vectors in $\mathbb{R}^3$, so they actually form a full basis for $\mathbb{R}^3$. By the definition of a basis, ev... | Changing any of the $\alpha$ constants is equivalent to a simple translation of the corresponding plane in space. Translating any plane just moves the point of intersection around. As you are never changing the orientation of the planes, they will only ever intersect at a point. |
3,124,568 | Q) Let $P\_{1},P\_{2},$ and $P\_{3}$ denote, respectively, the planes defined by
$a\_{1}x + b\_{1}y + c\_{1}z =\alpha\_{1}$
$a\_{2}x + b\_{2}y + c\_{2}z = \alpha \_{2}$
$a\_{3}x + b\_{3}y + c\_{3}z = \alpha \_{3}$
It is given that $P\_{1},P\_{2},$ and $P\_{3}$ intersect exactly at one point when $\alpha \_{1}= \al... | 2019/02/24 | [
"https://math.stackexchange.com/questions/3124568",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/559765/"
] | The values of $\alpha\_i$ are irrelevant, only that the planes intersect at a unique point. The coefficient matrix is thus of full rank, and for any given $\alpha\_i$ said matrix can be inverted and left-multiplied with the $\alpha\_i$ vector to yield a unique solution for $x,y,z$. Thus B is the correct answer. | Since $Ax=b$ has unique solution for a particular $b$, we know that $A$ is invertible; i.e. $A^{-1}$ exists. Therefore, no matter what other $b$ you pick, there will still be the solution $x=A^{-1}b$ to the equation. Can you continue? |
3,124,568 | Q) Let $P\_{1},P\_{2},$ and $P\_{3}$ denote, respectively, the planes defined by
$a\_{1}x + b\_{1}y + c\_{1}z =\alpha\_{1}$
$a\_{2}x + b\_{2}y + c\_{2}z = \alpha \_{2}$
$a\_{3}x + b\_{3}y + c\_{3}z = \alpha \_{3}$
It is given that $P\_{1},P\_{2},$ and $P\_{3}$ intersect exactly at one point when $\alpha \_{1}= \al... | 2019/02/24 | [
"https://math.stackexchange.com/questions/3124568",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/559765/"
] | The values of $\alpha\_i$ are irrelevant, only that the planes intersect at a unique point. The coefficient matrix is thus of full rank, and for any given $\alpha\_i$ said matrix can be inverted and left-multiplied with the $\alpha\_i$ vector to yield a unique solution for $x,y,z$. Thus B is the correct answer. | Changing any of the $\alpha$ constants is equivalent to a simple translation of the corresponding plane in space. Translating any plane just moves the point of intersection around. As you are never changing the orientation of the planes, they will only ever intersect at a point. |
57,308,726 | I need to be able to copy/paste csv files from one directory to another, to name the first column, and to get only 3 rows of the whole file, and the whole this to be run every 24 hours.
I have already done the first two points copy/paste from one directory to another and name the first column but I struggle to complet... | 2019/08/01 | [
"https://Stackoverflow.com/questions/57308726",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11869071/"
] | try this code
**HTML**
```
<section id="shortspecs-section">
<div class="left">
<div class="shortspecs specs-big">
<img src="https://static.mobilemultimedia.be/mmu/products/no-phone_300.jpg">
</div>
</div>
<div class="right">
<div class="shortspecs specs-small">
<img src="https://static.mobilemultimedia... | You could put the `specs-small` together in a `div` with an set width.
Then you give the `.specs-small { width: 90px; display: inline-block;}`
see codepen: <https://codepen.io/anon/pen/OKgGGe> |
57,308,726 | I need to be able to copy/paste csv files from one directory to another, to name the first column, and to get only 3 rows of the whole file, and the whole this to be run every 24 hours.
I have already done the first two points copy/paste from one directory to another and name the first column but I struggle to complet... | 2019/08/01 | [
"https://Stackoverflow.com/questions/57308726",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11869071/"
] | Please try this code..
**css**
```
*,
*:after,
*:before {
margin: 0;
padding: 0;
/* Removes padding behaviour on widths */
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
body {
background-color:#000;
}
#shortspecs-section {
margin:10px;
}
.specs-big {
widt... | You could put the `specs-small` together in a `div` with an set width.
Then you give the `.specs-small { width: 90px; display: inline-block;}`
see codepen: <https://codepen.io/anon/pen/OKgGGe> |
25,064,157 | I have UITextFields and UIText Views on the same view controller. I'm using this:
```
-(void)textFieldDidBeginEditing:(UITextField *)textField
{
CGRect textFieldRect = [self.view.window convertRect:textField.bounds fromView:textField];
CGRect viewRect = [self.view.window convertRect:self.view.bounds fromView:... | 2014/07/31 | [
"https://Stackoverflow.com/questions/25064157",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3413391/"
] | Implement the `UITextViewDelegate` methods to know when the keyboard appears and move the content.
```
– textViewDidBeginEditing:
– textViewDidEndEditing:
```
Right now you are only implementing the `UITextFieldDelegate` methods. That's why it works for text fields and does not work for text views. | If you want to move elements around on the screen and animate them when the keyboard is shown / hidden you are better off listening to the NSNotifications that are sent.
```
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardShown:) name:UIKeyboardWillShowNotification object:nil];
[[NSNo... |
63,329,644 | I am trying to create a macro so if I press F11, it would highlight the cell yellow.
I tried the following but it doesn't seem to work when I press F11.
```
Private Sub Workbook_Open()
Application.OnKey "{F11}", "Yellow"
End Sub
Private Sub Yellow()
With Selection.Interior
.Color = 65535
End With
E... | 2020/08/09 | [
"https://Stackoverflow.com/questions/63329644",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10230628/"
] | As you put the code of the OnKey Action into the module of `ThisWorkbook`, you have to call it like that
```
Application.OnKey "{F11}", "ThisWorkbook.Yellow"
``` | The `Sub` to be called must be **in a standard module**. Or it must be called specifying the Sheet/Workbook module name, too.
```
Sub Yellow()
Selection.Interior.Color = 65535
End Sub
``` |
72,151,720 | Creating Auth application using express mongoose and passport js.
after adding mail verification using nodemailer server sptoped adding user from req.user to res.locals.currentUser can be seen from middleware. before adding email verification it was functioning correctly.
```
app.use(express.urlencoded({ extended:... | 2022/05/07 | [
"https://Stackoverflow.com/questions/72151720",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18418797/"
] | The problem was: I was working in a local environment and had set the session cookie to `secure`.
Since Localhost runs on HTTP and not HTTPS, the browser was not sending the session cookie to the Application after the App redirected, which prevented Passport from loading the session data and creating the `req.user` ke... | Everything in `req` and `res` expires at the end of the request, only `req.session` is written to the session store (`sessionObject`) and from there carried over to the next request.
If you want to keep the current user in the session, write it to `req.session.currentUser`. Then you need `passport.js` and `req.user` o... |
26,535,375 | I am trying to use the non-restoring algorithm for computing the square root of a floating point number.
For instance, say `x = 1001`, the square root is `31.6386`
**I want to calculate this square root** *using the non-restoring method*.
I tried following the method in the paper:
>
> [Implementation of Single Pre... | 2014/10/23 | [
"https://Stackoverflow.com/questions/26535375",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/688463/"
] | I think the easiest thing here is to have each worker process consume from two `Queue` objects. One is a browser specific `Queue`, and the other a shared "generic" `Queue`. That way, you can have 40 processes consume from a Chrome `Queue`, and then switch to the generic `Queue` once its drained, and also have 40 proces... | Using `pool.apply_async` can be thought of very much like manually setting up each of the calls made under the hood by the `map` in your previous question. You simply add all the tasks to the pool, and it blasts through them as new worker processes become available. You can use the same one-function-per-browser approac... |
22,774 | I have a 19 liter carboy, and put a 18 liter wort. 10 hours later I woke up and noticed carboy overflow krausen all over it.
I am concerned whether air lock will clogged down and explode. I will not have a hose for another 6-7 hours, so blow-off tube is not an answer. I cleaned the air lock a few times, and it keeps o... | 2018/04/10 | [
"https://homebrew.stackexchange.com/questions/22774",
"https://homebrew.stackexchange.com",
"https://homebrew.stackexchange.com/users/14496/"
] | Few tricks for temporary fix.
Swirling every so often can get kausen to drop back in.
Nitrile glove with a pin hole in a finger will work for a DYI air relief cover, should limit the mess. Latex will work too but not recommended due to their odor. | You could do either of your suggestions, or if your carboy fits in a bucket, just let it overflow through the airlock until the blowoff tube arrives. |
22,774 | I have a 19 liter carboy, and put a 18 liter wort. 10 hours later I woke up and noticed carboy overflow krausen all over it.
I am concerned whether air lock will clogged down and explode. I will not have a hose for another 6-7 hours, so blow-off tube is not an answer. I cleaned the air lock a few times, and it keeps o... | 2018/04/10 | [
"https://homebrew.stackexchange.com/questions/22774",
"https://homebrew.stackexchange.com",
"https://homebrew.stackexchange.com/users/14496/"
] | You could do either of your suggestions, or if your carboy fits in a bucket, just let it overflow through the airlock until the blowoff tube arrives. | You could remove the cap and tape a piece of foil or plastic wrap partially over the opening. I’ve done this with Saisons to prevent back pressure stalling fermentation. |
22,774 | I have a 19 liter carboy, and put a 18 liter wort. 10 hours later I woke up and noticed carboy overflow krausen all over it.
I am concerned whether air lock will clogged down and explode. I will not have a hose for another 6-7 hours, so blow-off tube is not an answer. I cleaned the air lock a few times, and it keeps o... | 2018/04/10 | [
"https://homebrew.stackexchange.com/questions/22774",
"https://homebrew.stackexchange.com",
"https://homebrew.stackexchange.com/users/14496/"
] | Few tricks for temporary fix.
Swirling every so often can get kausen to drop back in.
Nitrile glove with a pin hole in a finger will work for a DYI air relief cover, should limit the mess. Latex will work too but not recommended due to their odor. | Have you considered using [FermCap](https://www.northernbrewer.com/fermcap-s-1-oz)? It will reduce the Krausen without hurting the beer. |
22,774 | I have a 19 liter carboy, and put a 18 liter wort. 10 hours later I woke up and noticed carboy overflow krausen all over it.
I am concerned whether air lock will clogged down and explode. I will not have a hose for another 6-7 hours, so blow-off tube is not an answer. I cleaned the air lock a few times, and it keeps o... | 2018/04/10 | [
"https://homebrew.stackexchange.com/questions/22774",
"https://homebrew.stackexchange.com",
"https://homebrew.stackexchange.com/users/14496/"
] | Few tricks for temporary fix.
Swirling every so often can get kausen to drop back in.
Nitrile glove with a pin hole in a finger will work for a DYI air relief cover, should limit the mess. Latex will work too but not recommended due to their odor. | You could remove the cap and tape a piece of foil or plastic wrap partially over the opening. I’ve done this with Saisons to prevent back pressure stalling fermentation. |
22,774 | I have a 19 liter carboy, and put a 18 liter wort. 10 hours later I woke up and noticed carboy overflow krausen all over it.
I am concerned whether air lock will clogged down and explode. I will not have a hose for another 6-7 hours, so blow-off tube is not an answer. I cleaned the air lock a few times, and it keeps o... | 2018/04/10 | [
"https://homebrew.stackexchange.com/questions/22774",
"https://homebrew.stackexchange.com",
"https://homebrew.stackexchange.com/users/14496/"
] | Have you considered using [FermCap](https://www.northernbrewer.com/fermcap-s-1-oz)? It will reduce the Krausen without hurting the beer. | You could remove the cap and tape a piece of foil or plastic wrap partially over the opening. I’ve done this with Saisons to prevent back pressure stalling fermentation. |
32,358,599 | When an **ItemView** is listening to a model other than its model (this.model), do I simply need to turn off listeners within the **remove** function? And set their reference to null? I wonder if the **ItemView** will be safely destroyed, or if I'll be in trouble later when tons of views like this will be created / des... | 2015/09/02 | [
"https://Stackoverflow.com/questions/32358599",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/651987/"
] | You can use a user variable to add a counter of each row of a name, then just select the rows where the counter is less than or equal to 2 (untested):-
```
SELECT some_name, some_number
FROM
(
SELECT some_name, some_number, @cnt=(@some_name = some_name, @cnt + 1, 1) AS cnt, @some_name:=some_name
FROM
(
... | This partially solved my problem:
```
set @num := 0, @name := '';
select distinct number, name
from (
select number, name,
@num := if(@name = name, @num +1, 1) as row_number,
@name := name as dummy
from karian2
) as x where x.row_number <= 2;
```
It fails some time to return 2 results becaus... |
32,358,599 | When an **ItemView** is listening to a model other than its model (this.model), do I simply need to turn off listeners within the **remove** function? And set their reference to null? I wonder if the **ItemView** will be safely destroyed, or if I'll be in trouble later when tons of views like this will be created / des... | 2015/09/02 | [
"https://Stackoverflow.com/questions/32358599",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/651987/"
] | you could try this,
```
select some_name,some_number from yourTable t
where
(select count(*) from yourTable
where
some_number<=t.some_number and some_name=t.some_name)<3
``` | This partially solved my problem:
```
set @num := 0, @name := '';
select distinct number, name
from (
select number, name,
@num := if(@name = name, @num +1, 1) as row_number,
@name := name as dummy
from karian2
) as x where x.row_number <= 2;
```
It fails some time to return 2 results becaus... |
45,451,578 | I have requirement to handle events on browser like back, refresh and close on cross browser. The problem is my customer want a different logic for each of those events.
For back button, this solution is quite fine:
* <https://stackoverflow.com/a/36786695/3462243>
but Now it's hard to distinguish between refresh and... | 2017/08/02 | [
"https://Stackoverflow.com/questions/45451578",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3462243/"
] | You might want to use Cookies/window.sessionStorage.
You can set a cookie without an explicit expiration date so that it is available only for the current session (which is valid till user closes the browser window).
You can also use sessionStorage object, it stores the data for only one session. The data is delet... | ```
tabOrBrowserStillAliveInterval;
constructor() {
// do some action if the browser or last opened tab was closed (in 15sec after closing)
if (this.wasBrowserOrTabClosed()) {
// do some action
}
// every 15sec update browserOrTabActiveTimestamp property with new timestamp
this.setBrowserOrTabActiveTime... |
54,924,635 | I'm trying to use setState after I did a fetch on an api so I can load it into react.
The problem is that it is a async function so I can't use it inside the class itself.
How can I still change the state from outside the class itself?
I have a function `async function getUsers() {}` and in the class that's just under... | 2019/02/28 | [
"https://Stackoverflow.com/questions/54924635",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7178832/"
] | Try
```
System.out.println(myByteString.toString("UTF-8"));
```
or whatever encoding you are using.
Check out this link:
[Google Developers: Class ByteString](https://developers.google.com/protocol-buffers/docs/reference/java/com/google/protobuf/ByteString#toString-java.nio.charset.Charset-) | If you are sure that you will be using UTF-8 then you can simply use
```
myByteString.toStringUtf8()
```
or
If you are not sure about the charset refer this [page](https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true) and use something similar to Luk's answer
```
myByteString.to... |
54,924,635 | I'm trying to use setState after I did a fetch on an api so I can load it into react.
The problem is that it is a async function so I can't use it inside the class itself.
How can I still change the state from outside the class itself?
I have a function `async function getUsers() {}` and in the class that's just under... | 2019/02/28 | [
"https://Stackoverflow.com/questions/54924635",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7178832/"
] | Try
```
System.out.println(myByteString.toString("UTF-8"));
```
or whatever encoding you are using.
Check out this link:
[Google Developers: Class ByteString](https://developers.google.com/protocol-buffers/docs/reference/java/com/google/protobuf/ByteString#toString-java.nio.charset.Charset-) | you need call:
```
Base64.encodeToString(myByteString.toByteArray(), Base64.DEFAULT)
``` |
54,924,635 | I'm trying to use setState after I did a fetch on an api so I can load it into react.
The problem is that it is a async function so I can't use it inside the class itself.
How can I still change the state from outside the class itself?
I have a function `async function getUsers() {}` and in the class that's just under... | 2019/02/28 | [
"https://Stackoverflow.com/questions/54924635",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7178832/"
] | If you are sure that you will be using UTF-8 then you can simply use
```
myByteString.toStringUtf8()
```
or
If you are not sure about the charset refer this [page](https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true) and use something similar to Luk's answer
```
myByteString.to... | you need call:
```
Base64.encodeToString(myByteString.toByteArray(), Base64.DEFAULT)
``` |
31,747,390 | I've used AddPoint repeatedly on a scatter Highchart to show some data evolution, using
```
setinterval()
```
When the chart updates the axes' ranges as a consequence of the presence of new data points, the chart sometimes "twitches" as the data distribution is not longer well balanced around the origin:
<http://js... | 2015/07/31 | [
"https://Stackoverflow.com/questions/31747390",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1257529/"
] | ```
var list = oc.All(s=> s.KommaSeperatedString.Contains(s)).ToList<MyCollection>();
```
If you want to construct another `ObservableCollection`:
```
var observableCollection = new ObservableCollection<MyCollection>(myList);
``` | You are comparing against a string, you should try to convert it to a list first. Lists are far more flexible for this kind of filtering.
```
s.Split(',').ToList();
``` |
25,311,258 | Using the JSON from this URL(weather station data stored): <https://dataproxy.mtcc.ie/v1.5/api/fs/weather_polygons>
How do I get the data for the station "N25 Midleton Bypass"?
I can process the URL, just down know how can I echo the data?
My coding is:
```
$json_string = 'https://dataproxy.mtcc.ie/v1.5/api/fs/we... | 2014/08/14 | [
"https://Stackoverflow.com/questions/25311258",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3941828/"
] | You'll need to loop through the data to get the station your after then break out of the loop. Or if you want properties for all stations can use $properties within the loop
```
foreach($obj['features'] as $feature) {
if ($feature['properties']['name'] == 'N25 Midleton Bypass') {
$properties = $feature['properti... | >
> **just down know how can I echo the data?**
>
>
>
As the `var_dump` function tells you, you can access your data by simply accessing its fields, like this:
```
// echo wind_speed
echo $obj->wind_speed;
// echo name
echo $obj->name
// echo air_temperature_legend
echo $obj->air_temperature_legend;
// echo ma... |
52,161,964 | How can I implement an optional parameter to an AWS Glue Job?
I have created a job that currently have a string parameter (an ISO 8601 date string) as an input that is used in the ETL job. I would like to make this parameter optional, so that the job use a default value if it is not provided (e.g. using [datetime.now]... | 2018/09/04 | [
"https://Stackoverflow.com/questions/52161964",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/303598/"
] | Wrapping [matsev's answer](https://stackoverflow.com/a/52298107/2863603) in a function:
```
def get_glue_env_var(key, default="none"):
if f'--{key}' in sys.argv:
return getResolvedOptions(sys.argv, [key])[key]
else:
return default
``` | If you're using the interface, you must provide your parameter names starting with "--" like "--TABLE\_NAME", rather than "TABLE\_NAME", then you can use them like the following (python) code:
```
args = getResolvedOptions(sys.argv, ['JOB_NAME', 'TABLE_NAME'])
table_name = args['TABLE_NAME']
``` |
52,161,964 | How can I implement an optional parameter to an AWS Glue Job?
I have created a job that currently have a string parameter (an ISO 8601 date string) as an input that is used in the ETL job. I would like to make this parameter optional, so that the job use a default value if it is not provided (e.g. using [datetime.now]... | 2018/09/04 | [
"https://Stackoverflow.com/questions/52161964",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/303598/"
] | [matsev](https://stackoverflow.com/users/303598/matsev) and [Yuriy](https://stackoverflow.com/a/52272137/303598) solutions is fine if you have only one field which is optional.
I wrote a wrapper function for python that is more generic and handle different corner cases (mandatory fields and/or optional fields with val... | I don't see a way to have optional parameters, but you can specify default parameters on the job itself, and then if you don't pass that parameter when you run the job, your job will receive the default value (note that the default value can't be blank). |
52,161,964 | How can I implement an optional parameter to an AWS Glue Job?
I have created a job that currently have a string parameter (an ISO 8601 date string) as an input that is used in the ETL job. I would like to make this parameter optional, so that the job use a default value if it is not provided (e.g. using [datetime.now]... | 2018/09/04 | [
"https://Stackoverflow.com/questions/52161964",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/303598/"
] | I don't see a way to have optional parameters, but you can specify default parameters on the job itself, and then if you don't pass that parameter when you run the job, your job will receive the default value (note that the default value can't be blank). | It's possible to create a Step Function that starts the same Glue job with different parameters. The state machine starts with a Choice state and uses different number of inputs depending on which is present.
```
stepFunctions:
stateMachines:
taskMachine:
role:
Fn::GetAtt: [ TaskExecutor, Arn ]
... |
52,161,964 | How can I implement an optional parameter to an AWS Glue Job?
I have created a job that currently have a string parameter (an ISO 8601 date string) as an input that is used in the ETL job. I would like to make this parameter optional, so that the job use a default value if it is not provided (e.g. using [datetime.now]... | 2018/09/04 | [
"https://Stackoverflow.com/questions/52161964",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/303598/"
] | [matsev](https://stackoverflow.com/users/303598/matsev) and [Yuriy](https://stackoverflow.com/a/52272137/303598) solutions is fine if you have only one field which is optional.
I wrote a wrapper function for python that is more generic and handle different corner cases (mandatory fields and/or optional fields with val... | Wrapping [matsev's answer](https://stackoverflow.com/a/52298107/2863603) in a function:
```
def get_glue_env_var(key, default="none"):
if f'--{key}' in sys.argv:
return getResolvedOptions(sys.argv, [key])[key]
else:
return default
``` |
52,161,964 | How can I implement an optional parameter to an AWS Glue Job?
I have created a job that currently have a string parameter (an ISO 8601 date string) as an input that is used in the ETL job. I would like to make this parameter optional, so that the job use a default value if it is not provided (e.g. using [datetime.now]... | 2018/09/04 | [
"https://Stackoverflow.com/questions/52161964",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/303598/"
] | [matsev](https://stackoverflow.com/users/303598/matsev) and [Yuriy](https://stackoverflow.com/a/52272137/303598) solutions is fine if you have only one field which is optional.
I wrote a wrapper function for python that is more generic and handle different corner cases (mandatory fields and/or optional fields with val... | If you're using the interface, you must provide your parameter names starting with "--" like "--TABLE\_NAME", rather than "TABLE\_NAME", then you can use them like the following (python) code:
```
args = getResolvedOptions(sys.argv, ['JOB_NAME', 'TABLE_NAME'])
table_name = args['TABLE_NAME']
``` |
52,161,964 | How can I implement an optional parameter to an AWS Glue Job?
I have created a job that currently have a string parameter (an ISO 8601 date string) as an input that is used in the ETL job. I would like to make this parameter optional, so that the job use a default value if it is not provided (e.g. using [datetime.now]... | 2018/09/04 | [
"https://Stackoverflow.com/questions/52161964",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/303598/"
] | Porting [Yuriy's answer](https://stackoverflow.com/a/52272137/303598) to Python solved my problem:
```
if ('--{}'.format('ISO_8601_STRING') in sys.argv):
args = getResolvedOptions(sys.argv, ['ISO_8601_STRING'])
else:
args = {'ISO_8601_STRING': datetime.datetime.now().isoformat()}
``` | There is a workaround to have optional parameters. The idea is to examine arguments before resolving them (Scala):
```
val argName = 'ISO_8601_STRING'
var argValue = null
if (sysArgs.contains(s"--$argName"))
argValue = GlueArgParser.getResolvedOptions(sysArgs, Array(argName))(argName)
``` |
52,161,964 | How can I implement an optional parameter to an AWS Glue Job?
I have created a job that currently have a string parameter (an ISO 8601 date string) as an input that is used in the ETL job. I would like to make this parameter optional, so that the job use a default value if it is not provided (e.g. using [datetime.now]... | 2018/09/04 | [
"https://Stackoverflow.com/questions/52161964",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/303598/"
] | Porting [Yuriy's answer](https://stackoverflow.com/a/52272137/303598) to Python solved my problem:
```
if ('--{}'.format('ISO_8601_STRING') in sys.argv):
args = getResolvedOptions(sys.argv, ['ISO_8601_STRING'])
else:
args = {'ISO_8601_STRING': datetime.datetime.now().isoformat()}
``` | It's possible to create a Step Function that starts the same Glue job with different parameters. The state machine starts with a Choice state and uses different number of inputs depending on which is present.
```
stepFunctions:
stateMachines:
taskMachine:
role:
Fn::GetAtt: [ TaskExecutor, Arn ]
... |
52,161,964 | How can I implement an optional parameter to an AWS Glue Job?
I have created a job that currently have a string parameter (an ISO 8601 date string) as an input that is used in the ETL job. I would like to make this parameter optional, so that the job use a default value if it is not provided (e.g. using [datetime.now]... | 2018/09/04 | [
"https://Stackoverflow.com/questions/52161964",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/303598/"
] | Porting [Yuriy's answer](https://stackoverflow.com/a/52272137/303598) to Python solved my problem:
```
if ('--{}'.format('ISO_8601_STRING') in sys.argv):
args = getResolvedOptions(sys.argv, ['ISO_8601_STRING'])
else:
args = {'ISO_8601_STRING': datetime.datetime.now().isoformat()}
``` | If you're using the interface, you must provide your parameter names starting with "--" like "--TABLE\_NAME", rather than "TABLE\_NAME", then you can use them like the following (python) code:
```
args = getResolvedOptions(sys.argv, ['JOB_NAME', 'TABLE_NAME'])
table_name = args['TABLE_NAME']
``` |
52,161,964 | How can I implement an optional parameter to an AWS Glue Job?
I have created a job that currently have a string parameter (an ISO 8601 date string) as an input that is used in the ETL job. I would like to make this parameter optional, so that the job use a default value if it is not provided (e.g. using [datetime.now]... | 2018/09/04 | [
"https://Stackoverflow.com/questions/52161964",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/303598/"
] | [matsev](https://stackoverflow.com/users/303598/matsev) and [Yuriy](https://stackoverflow.com/a/52272137/303598) solutions is fine if you have only one field which is optional.
I wrote a wrapper function for python that is more generic and handle different corner cases (mandatory fields and/or optional fields with val... | There is a workaround to have optional parameters. The idea is to examine arguments before resolving them (Scala):
```
val argName = 'ISO_8601_STRING'
var argValue = null
if (sysArgs.contains(s"--$argName"))
argValue = GlueArgParser.getResolvedOptions(sysArgs, Array(argName))(argName)
``` |
52,161,964 | How can I implement an optional parameter to an AWS Glue Job?
I have created a job that currently have a string parameter (an ISO 8601 date string) as an input that is used in the ETL job. I would like to make this parameter optional, so that the job use a default value if it is not provided (e.g. using [datetime.now]... | 2018/09/04 | [
"https://Stackoverflow.com/questions/52161964",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/303598/"
] | There is a workaround to have optional parameters. The idea is to examine arguments before resolving them (Scala):
```
val argName = 'ISO_8601_STRING'
var argValue = null
if (sysArgs.contains(s"--$argName"))
argValue = GlueArgParser.getResolvedOptions(sysArgs, Array(argName))(argName)
``` | I don't see a way to have optional parameters, but you can specify default parameters on the job itself, and then if you don't pass that parameter when you run the job, your job will receive the default value (note that the default value can't be blank). |
20,473,408 | I am not sure what is wrong so I just thought of asking you all. I want to validate some variables via JS before I send them to my PHP Script, but somehow it's not working as I want and I am not sure why. Here my example code :
HTML
```
<script src="jadd.js" type="text/javascript"></script>
<form name="jadd" action="... | 2013/12/09 | [
"https://Stackoverflow.com/questions/20473408",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1809417/"
] | You have ~~two problems~~edited your question.
1. When you programatically submit a form, you won't trigger the submit event. Use a real submit button (`<input type="submit">`), not a link with JavaScript instead of an HTTP URI. (You can use CSS to make a button look like a link if you really want to).
2. ~~You are tr... | Try using `vf_addjob()` instead of `vf()`
should be :
```
onsubmit="return vf_addjob()"
``` |
20,473,408 | I am not sure what is wrong so I just thought of asking you all. I want to validate some variables via JS before I send them to my PHP Script, but somehow it's not working as I want and I am not sure why. Here my example code :
HTML
```
<script src="jadd.js" type="text/javascript"></script>
<form name="jadd" action="... | 2013/12/09 | [
"https://Stackoverflow.com/questions/20473408",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1809417/"
] | You have ~~two problems~~edited your question.
1. When you programatically submit a form, you won't trigger the submit event. Use a real submit button (`<input type="submit">`), not a link with JavaScript instead of an HTTP URI. (You can use CSS to make a button look like a link if you really want to).
2. ~~You are tr... | 1. Remove your `a href...` button.
2. Add inside the `form` this `<input type="submit" value="click me">`
Should look like this:
```
<script src="jadd.js" type="text/javascript"></script>
<form name="jadd" action="./func/add_job.php" method="post" onsubmit="return vf()">
...
<input type="text" size="100" maxlength="1... |
15,610,609 | Am working the app for tattoolater in that i required to convert an image(which is taken from camera or selected from gallery)into tattoo...
my requirement is like the following

I found a sample code from github
`https://github.com/DrewDahlman/Ima... | 2013/03/25 | [
"https://Stackoverflow.com/questions/15610609",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1196394/"
] | you need a difference filter:
1) you calc the horizontal difference (here you'll have vertical segments)
2) you calc the vertical difference (here, horizontal segments)
3) you OR the two maps, finding the outlines
4) recreate a Bitmap object, if you wish to do so
something like (EDITED):
```
int[] pixels;
int wid... | You can use this:
```
public static Bitmap ConvertToBlackAndWhite(Bitmap sampleBitmap) {
ColorMatrix bwMatrix = new ColorMatrix();
bwMatrix.setSaturation(0);
final ColorMatrixColorFilter colorFilter = new ColorMatrixColorFilter(
bwMatrix);
Bitmap rBitmap = sampleBitmap.... |
288,360 | We are planning to move to SP online and have a small site with a big document library having versioning enabled.
We don't need to invest in a paid tool for such small site and are thinking to use SharePoint free migration tool from the Microsoft. Does the SP Migration Tool support files migration with version? | 2020/12/29 | [
"https://sharepoint.stackexchange.com/questions/288360",
"https://sharepoint.stackexchange.com",
"https://sharepoint.stackexchange.com/users/94218/"
] | If you are talking about [SharePoint Migration Tool](https://docs.microsoft.com/en-us/sharepointmigration/introducing-the-sharepoint-migration-tool?WT.mc_id=M365-MVP-5002973) **(SPMT)**, so the answer is **YES**.
The **Version** is a supported item in SharePoint Migration Tool, and it will be preserved based on your s... | Keeping versions/Version History is fully [supported](https://docs.microsoft.com/en-us/sharepointmigration/what-is-supported-spmt#features) while using SPMT.
One more thing you should know, if you choose to migrate all versions with the contents, make sure you have all documents/items approved/published when you have ... |
39,499,204 | I've been coding for a few days now and decided to take on an exercise. One which calculates the total of five items and calculates the tax.
In this particular exercise, I've managed to display the names of the items, and their prices , however, the sales tax and total aren't being displayed. I know this is a very bas... | 2016/09/14 | [
"https://Stackoverflow.com/questions/39499204",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6832570/"
] | Since you already have the URL set in `ViewBag.URL`, you can just go ahead and use a HTML anchor `<a>`. You've already solved the problem an action link was designed to solve. So, just do:
```
<a href="@ViewBag.URL"> Back to previous page</a>
``` | Have you considered simply making the browser go back to it's previous page?
```
<a href="javascript:void(0);" onclick="history.go(-1);">Back</a>
```
That way it will truly go back to the previous page, rather than the "Index" controller specifically, regardless of what link you came from. Keep in mind though, (as P... |
5,306,833 | So this is the code I have:
```
[dataCenter.tempPalette replaceObjectAtIndex:9 withObject:selectedColour];
```
Object 9 does exist, and it's currently an int (not sure if that matters). selectedColour is also an int. dataCenter.tempPalette is a NSMutableArray.
The error it gives me is this:
Passing argument 2 of '... | 2011/03/15 | [
"https://Stackoverflow.com/questions/5306833",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/561395/"
] | ints aren't objects. If you want to store integers in an NSMutableArray, you'll need to turn them into NSNumbers first using +[NSNumber numberWithInt:]. The error message is complaining that you're passing an int where a pointer (to an object) is required. | The second param of replaceObjectAtIndex needs to be a valid pointer to an object. From your description, it sounds like you are trying to pass in an int value ( selectedColour ), which is not a valid reference to an object.
I believe, instead of passing in the selectedColour int value, you want to pass a reference t... |
139,722 | I've installed conky using `sudo apt-get install conky-all` and followed this [tutorial](http://www.unixmen.com/configure-conky-lua-in-ubuntu-11-10-12-04-fedora-debian-and-linuxmint-howto-conky/) to configure. The configuration works properly in Unity desktop in Ubuntu 12.04 and everything seems OK, However using Gnome... | 2012/05/20 | [
"https://askubuntu.com/questions/139722",
"https://askubuntu.com",
"https://askubuntu.com/users/64451/"
] | Just replace `own_window_type override` with following lines:
```
own_window_type normal
own_window_argb_visual yes
```
and use following command to start conky automatically at startup:
```
bash -c "sleep 20; conky"
``` | try some of these parameters, specially the own\_window\_type:
```
update_interval 3
total_run_times 0
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
....
draw_outline no
draw_borders no
draw_graph_borders no
```
Al... |
139,722 | I've installed conky using `sudo apt-get install conky-all` and followed this [tutorial](http://www.unixmen.com/configure-conky-lua-in-ubuntu-11-10-12-04-fedora-debian-and-linuxmint-howto-conky/) to configure. The configuration works properly in Unity desktop in Ubuntu 12.04 and everything seems OK, However using Gnome... | 2012/05/20 | [
"https://askubuntu.com/questions/139722",
"https://askubuntu.com",
"https://askubuntu.com/users/64451/"
] | I created a little script that runs conky delayed. I'm not sure why, but there is some kind of problems by running it just when the computer starts.
So create a script (hidden in your home folder, in this case) with
```
gedit ~/.conkystart.sh
```
then add:
```
#!/bin/bash
sleep 30; conky
exit
```
and give it the ... | try some of these parameters, specially the own\_window\_type:
```
update_interval 3
total_run_times 0
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
....
draw_outline no
draw_borders no
draw_graph_borders no
```
Al... |
139,722 | I've installed conky using `sudo apt-get install conky-all` and followed this [tutorial](http://www.unixmen.com/configure-conky-lua-in-ubuntu-11-10-12-04-fedora-debian-and-linuxmint-howto-conky/) to configure. The configuration works properly in Unity desktop in Ubuntu 12.04 and everything seems OK, However using Gnome... | 2012/05/20 | [
"https://askubuntu.com/questions/139722",
"https://askubuntu.com",
"https://askubuntu.com/users/64451/"
] | try some of these parameters, specially the own\_window\_type:
```
update_interval 3
total_run_times 0
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
....
draw_outline no
draw_borders no
draw_graph_borders no
```
Al... | I was having this problem too, i think you are trying to use conky-colors. The answer of Basharat Sial is almost there.
My conky-colors configuration was:
`./conky-colors --lang=english --theme=blue --cpu=4 --swap --updates --proc=3 --clock=modern --nvidia --calendar --network --ubuntu`
I have to remove the *--ubun... |
139,722 | I've installed conky using `sudo apt-get install conky-all` and followed this [tutorial](http://www.unixmen.com/configure-conky-lua-in-ubuntu-11-10-12-04-fedora-debian-and-linuxmint-howto-conky/) to configure. The configuration works properly in Unity desktop in Ubuntu 12.04 and everything seems OK, However using Gnome... | 2012/05/20 | [
"https://askubuntu.com/questions/139722",
"https://askubuntu.com",
"https://askubuntu.com/users/64451/"
] | What you need script for? Just launch it like this by adding to Startup list.
```
conky -p 20 -c /home/{username}/.conkyrc
``` | try some of these parameters, specially the own\_window\_type:
```
update_interval 3
total_run_times 0
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
....
draw_outline no
draw_borders no
draw_graph_borders no
```
Al... |
139,722 | I've installed conky using `sudo apt-get install conky-all` and followed this [tutorial](http://www.unixmen.com/configure-conky-lua-in-ubuntu-11-10-12-04-fedora-debian-and-linuxmint-howto-conky/) to configure. The configuration works properly in Unity desktop in Ubuntu 12.04 and everything seems OK, However using Gnome... | 2012/05/20 | [
"https://askubuntu.com/questions/139722",
"https://askubuntu.com",
"https://askubuntu.com/users/64451/"
] | Just replace `own_window_type override` with following lines:
```
own_window_type normal
own_window_argb_visual yes
```
and use following command to start conky automatically at startup:
```
bash -c "sleep 20; conky"
``` | I created a little script that runs conky delayed. I'm not sure why, but there is some kind of problems by running it just when the computer starts.
So create a script (hidden in your home folder, in this case) with
```
gedit ~/.conkystart.sh
```
then add:
```
#!/bin/bash
sleep 30; conky
exit
```
and give it the ... |
139,722 | I've installed conky using `sudo apt-get install conky-all` and followed this [tutorial](http://www.unixmen.com/configure-conky-lua-in-ubuntu-11-10-12-04-fedora-debian-and-linuxmint-howto-conky/) to configure. The configuration works properly in Unity desktop in Ubuntu 12.04 and everything seems OK, However using Gnome... | 2012/05/20 | [
"https://askubuntu.com/questions/139722",
"https://askubuntu.com",
"https://askubuntu.com/users/64451/"
] | Just replace `own_window_type override` with following lines:
```
own_window_type normal
own_window_argb_visual yes
```
and use following command to start conky automatically at startup:
```
bash -c "sleep 20; conky"
``` | I was having this problem too, i think you are trying to use conky-colors. The answer of Basharat Sial is almost there.
My conky-colors configuration was:
`./conky-colors --lang=english --theme=blue --cpu=4 --swap --updates --proc=3 --clock=modern --nvidia --calendar --network --ubuntu`
I have to remove the *--ubun... |
139,722 | I've installed conky using `sudo apt-get install conky-all` and followed this [tutorial](http://www.unixmen.com/configure-conky-lua-in-ubuntu-11-10-12-04-fedora-debian-and-linuxmint-howto-conky/) to configure. The configuration works properly in Unity desktop in Ubuntu 12.04 and everything seems OK, However using Gnome... | 2012/05/20 | [
"https://askubuntu.com/questions/139722",
"https://askubuntu.com",
"https://askubuntu.com/users/64451/"
] | Just replace `own_window_type override` with following lines:
```
own_window_type normal
own_window_argb_visual yes
```
and use following command to start conky automatically at startup:
```
bash -c "sleep 20; conky"
``` | What you need script for? Just launch it like this by adding to Startup list.
```
conky -p 20 -c /home/{username}/.conkyrc
``` |
139,722 | I've installed conky using `sudo apt-get install conky-all` and followed this [tutorial](http://www.unixmen.com/configure-conky-lua-in-ubuntu-11-10-12-04-fedora-debian-and-linuxmint-howto-conky/) to configure. The configuration works properly in Unity desktop in Ubuntu 12.04 and everything seems OK, However using Gnome... | 2012/05/20 | [
"https://askubuntu.com/questions/139722",
"https://askubuntu.com",
"https://askubuntu.com/users/64451/"
] | I created a little script that runs conky delayed. I'm not sure why, but there is some kind of problems by running it just when the computer starts.
So create a script (hidden in your home folder, in this case) with
```
gedit ~/.conkystart.sh
```
then add:
```
#!/bin/bash
sleep 30; conky
exit
```
and give it the ... | I was having this problem too, i think you are trying to use conky-colors. The answer of Basharat Sial is almost there.
My conky-colors configuration was:
`./conky-colors --lang=english --theme=blue --cpu=4 --swap --updates --proc=3 --clock=modern --nvidia --calendar --network --ubuntu`
I have to remove the *--ubun... |
139,722 | I've installed conky using `sudo apt-get install conky-all` and followed this [tutorial](http://www.unixmen.com/configure-conky-lua-in-ubuntu-11-10-12-04-fedora-debian-and-linuxmint-howto-conky/) to configure. The configuration works properly in Unity desktop in Ubuntu 12.04 and everything seems OK, However using Gnome... | 2012/05/20 | [
"https://askubuntu.com/questions/139722",
"https://askubuntu.com",
"https://askubuntu.com/users/64451/"
] | What you need script for? Just launch it like this by adding to Startup list.
```
conky -p 20 -c /home/{username}/.conkyrc
``` | I was having this problem too, i think you are trying to use conky-colors. The answer of Basharat Sial is almost there.
My conky-colors configuration was:
`./conky-colors --lang=english --theme=blue --cpu=4 --swap --updates --proc=3 --clock=modern --nvidia --calendar --network --ubuntu`
I have to remove the *--ubun... |
48,535,978 | I have 2 separate columns, 'ATFTE' and 'SATFTE'. Using these two columns, I have to perform division and store the result in a separate column (say Pyramid). I am trying to use isnull function, because in many cases, the denominator is 0 and bringing it in a subquery. It shows error - 'Invalid Column name' - ATFTE and ... | 2018/01/31 | [
"https://Stackoverflow.com/questions/48535978",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6914098/"
] | Currently it is assigning the last value as all parameter have same name.
You can use `[]` after variable name , it will create newcoach array with all values within it.
```
$test = "newcoach[]=6&newcoach[]=11&newcoach[]=12&newcoach[]=13&newcoach[]=14";
echo '<pre>';
parse_str($test,$result);
print_r($result);
```
... | Use this function
```
function proper_parse_str($str) {
# result array
$arr = array();
# split on outer delimiter
$pairs = explode('&', $str);
# loop through each pair
foreach ($pairs as $i) {
# split into name and value
list($name,$value) = explode('=', $i, 2);
# if name already exists
... |
48,535,978 | I have 2 separate columns, 'ATFTE' and 'SATFTE'. Using these two columns, I have to perform division and store the result in a separate column (say Pyramid). I am trying to use isnull function, because in many cases, the denominator is 0 and bringing it in a subquery. It shows error - 'Invalid Column name' - ATFTE and ... | 2018/01/31 | [
"https://Stackoverflow.com/questions/48535978",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6914098/"
] | Since you set your argument **newcoach** multiple times, parse\_str will only return the last one. If you want parse\_str to parse your variable as an array you need to supply it in this format with a '**[ ]**' suffix:
```
$newcoach = "newcoach[]=6&newcoach[]=11&newcoach[]=12&newcoach[]=13&newcoach[]=14";
```
**Exam... | Use this function
```
function proper_parse_str($str) {
# result array
$arr = array();
# split on outer delimiter
$pairs = explode('&', $str);
# loop through each pair
foreach ($pairs as $i) {
# split into name and value
list($name,$value) = explode('=', $i, 2);
# if name already exists
... |
48,535,978 | I have 2 separate columns, 'ATFTE' and 'SATFTE'. Using these two columns, I have to perform division and store the result in a separate column (say Pyramid). I am trying to use isnull function, because in many cases, the denominator is 0 and bringing it in a subquery. It shows error - 'Invalid Column name' - ATFTE and ... | 2018/01/31 | [
"https://Stackoverflow.com/questions/48535978",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6914098/"
] | Since you set your argument **newcoach** multiple times, parse\_str will only return the last one. If you want parse\_str to parse your variable as an array you need to supply it in this format with a '**[ ]**' suffix:
```
$newcoach = "newcoach[]=6&newcoach[]=11&newcoach[]=12&newcoach[]=13&newcoach[]=14";
```
**Exam... | Currently it is assigning the last value as all parameter have same name.
You can use `[]` after variable name , it will create newcoach array with all values within it.
```
$test = "newcoach[]=6&newcoach[]=11&newcoach[]=12&newcoach[]=13&newcoach[]=14";
echo '<pre>';
parse_str($test,$result);
print_r($result);
```
... |
254,210 | I am trying to find out whether the following baryons can exist:
$$ |X\rangle = \frac{|u u u\rangle + |d d d\rangle + |s s s\rangle}{\sqrt{3}} $$
$$ |Y\rangle = \frac{|u u u\rangle + |d d d\rangle - 2|s s s\rangle}{\sqrt{6}} $$
I haven't found in any baryon-list such a quark-configuration, but I don't know of any rea... | 2016/05/05 | [
"https://physics.stackexchange.com/questions/254210",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/55327/"
] | It's a good question, and the answer is surprisingly simple and physical. There is indeed no fundamental objection to having a superposition of particles of different charge. But it turns out this is not stable. This is basically due to wavefunction collapse, or more sophisticatedly, due to decoherence.
Imagine havin... | The electric charges of the states $\:|uuu⟩,|ddd⟩,|sss⟩\:$ are $\:+2,−1,−1\:$ respectively. More exactly these baryon states are the baryons $\:Δ++,Δ−,Ω−\:$. If $\:|X⟩\:$ or $\:|Y⟩\:$ would represent a baryon what would be the electric charge of this particle ? And electric charge is one of many quantum numbers. This p... |
254,210 | I am trying to find out whether the following baryons can exist:
$$ |X\rangle = \frac{|u u u\rangle + |d d d\rangle + |s s s\rangle}{\sqrt{3}} $$
$$ |Y\rangle = \frac{|u u u\rangle + |d d d\rangle - 2|s s s\rangle}{\sqrt{6}} $$
I haven't found in any baryon-list such a quark-configuration, but I don't know of any rea... | 2016/05/05 | [
"https://physics.stackexchange.com/questions/254210",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/55327/"
] | OK, since my name was taken in vain I suppose I am obliged to clarify my comment further.
My invitation was to *contrast* charge oscillations to strangeness oscillations in the $K^0-\bar{K}^0$ system, not to use the latter to argue for the former. The finally mutated question I am addressing is “*Why are there no char... | The electric charges of the states $\:|uuu⟩,|ddd⟩,|sss⟩\:$ are $\:+2,−1,−1\:$ respectively. More exactly these baryon states are the baryons $\:Δ++,Δ−,Ω−\:$. If $\:|X⟩\:$ or $\:|Y⟩\:$ would represent a baryon what would be the electric charge of this particle ? And electric charge is one of many quantum numbers. This p... |
254,210 | I am trying to find out whether the following baryons can exist:
$$ |X\rangle = \frac{|u u u\rangle + |d d d\rangle + |s s s\rangle}{\sqrt{3}} $$
$$ |Y\rangle = \frac{|u u u\rangle + |d d d\rangle - 2|s s s\rangle}{\sqrt{6}} $$
I haven't found in any baryon-list such a quark-configuration, but I don't know of any rea... | 2016/05/05 | [
"https://physics.stackexchange.com/questions/254210",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/55327/"
] | It's a good question, and the answer is surprisingly simple and physical. There is indeed no fundamental objection to having a superposition of particles of different charge. But it turns out this is not stable. This is basically due to wavefunction collapse, or more sophisticatedly, due to decoherence.
Imagine havin... | OK, since my name was taken in vain I suppose I am obliged to clarify my comment further.
My invitation was to *contrast* charge oscillations to strangeness oscillations in the $K^0-\bar{K}^0$ system, not to use the latter to argue for the former. The finally mutated question I am addressing is “*Why are there no char... |
9,144,005 | I have strange problem with modal widows in ASP.NET MVC. I created a link which is responsible for showing up modal window. The modal window shows up and contains one button - save button. I attached a click eventhandler to this button in order to save the content of the window and then close it. The whole mechanizm lo... | 2012/02/04 | [
"https://Stackoverflow.com/questions/9144005",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1091717/"
] | Or even better move the line which binds the event:
```
}
$('#btnSave').live("click", onButtonSaveClick);
});
});
```
down one line thus:
```
}
});
$('#btnSave').live("click", onButtonSaveClick);
});
```
The problem is that you're calling live every time you create a new dialog... | To `unbind` a `live` event handler use `die` method. Try this.
```
$("#btnSave").die("click");
```
`.die()` reference: <http://api.jquery.com/die/> |
9,144,005 | I have strange problem with modal widows in ASP.NET MVC. I created a link which is responsible for showing up modal window. The modal window shows up and contains one button - save button. I attached a click eventhandler to this button in order to save the content of the window and then close it. The whole mechanizm lo... | 2012/02/04 | [
"https://Stackoverflow.com/questions/9144005",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1091717/"
] | To `unbind` a `live` event handler use `die` method. Try this.
```
$("#btnSave").die("click");
```
`.die()` reference: <http://api.jquery.com/die/> | I found that, in order to have validation on the modal window, I was including a bundle on the modal dialog like this:
```
@Scripts.Render("~/bundles/jqueryval")
```
I did this because validation failed when the validation bundle was loaded only on the parent page.
My jqueryval bundle includes three files:
```
bu... |
9,144,005 | I have strange problem with modal widows in ASP.NET MVC. I created a link which is responsible for showing up modal window. The modal window shows up and contains one button - save button. I attached a click eventhandler to this button in order to save the content of the window and then close it. The whole mechanizm lo... | 2012/02/04 | [
"https://Stackoverflow.com/questions/9144005",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1091717/"
] | Or even better move the line which binds the event:
```
}
$('#btnSave').live("click", onButtonSaveClick);
});
});
```
down one line thus:
```
}
});
$('#btnSave').live("click", onButtonSaveClick);
});
```
The problem is that you're calling live every time you create a new dialog... | I found that, in order to have validation on the modal window, I was including a bundle on the modal dialog like this:
```
@Scripts.Render("~/bundles/jqueryval")
```
I did this because validation failed when the validation bundle was loaded only on the parent page.
My jqueryval bundle includes three files:
```
bu... |
10,007,422 | What is the right regex to
create this url: domain.nl/projecten/scheidingswanden from
```
http://www.domain.nl/?module=projectencat&action=scheidingswanden
```
**in other words: replace the variable names ?module= and &action= with slashes**
**but also the other way around
because the frontcontroller needs to read... | 2012/04/04 | [
"https://Stackoverflow.com/questions/10007422",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/133418/"
] | Put the variable outside the function and than get the value
```
var getWidth ;
var getHeight ;
$(function(){
var slideBox = {
gb: $('#box'),
init: function() {
sb = this,
getBox = sb.gb,
getWidth = getBox.width(),
getHeight = ge... | If you are gonna use them a lot, I would made them a property of the object. |
10,007,422 | What is the right regex to
create this url: domain.nl/projecten/scheidingswanden from
```
http://www.domain.nl/?module=projectencat&action=scheidingswanden
```
**in other words: replace the variable names ?module= and &action= with slashes**
**but also the other way around
because the frontcontroller needs to read... | 2012/04/04 | [
"https://Stackoverflow.com/questions/10007422",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/133418/"
] | Put the variable outside the function and than get the value
```
var getWidth ;
var getHeight ;
$(function(){
var slideBox = {
gb: $('#box'),
init: function() {
sb = this,
getBox = sb.gb,
getWidth = getBox.width(),
getHeight = ge... | Your variables seem unnecessary, you can access everything you need to like this:
<http://jsfiddle.net/4WfZa/6/>. If you do need to store them you can always add them to the slideBox object and then populate them in init. This way the variables are stored against the object and can be used in any of the functions withi... |
10,007,422 | What is the right regex to
create this url: domain.nl/projecten/scheidingswanden from
```
http://www.domain.nl/?module=projectencat&action=scheidingswanden
```
**in other words: replace the variable names ?module= and &action= with slashes**
**but also the other way around
because the frontcontroller needs to read... | 2012/04/04 | [
"https://Stackoverflow.com/questions/10007422",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/133418/"
] | If you are gonna use them a lot, I would made them a property of the object. | Your variables seem unnecessary, you can access everything you need to like this:
<http://jsfiddle.net/4WfZa/6/>. If you do need to store them you can always add them to the slideBox object and then populate them in init. This way the variables are stored against the object and can be used in any of the functions withi... |
37,335,301 | I have set up a digital ocean droplet that is a reverse proxy server using nginx and node. I used this tutorial from digital ocean as a starting point
<https://www.digitalocean.com/community/tutorials/how-to-set-up-a-node-js-application-for-production-on-ubuntu-14-04>.
I have also set up ssl with lets encrypt. The ... | 2016/05/19 | [
"https://Stackoverflow.com/questions/37335301",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5219987/"
] | It turns out the error message I was getting was inaccurate. The issue was not header setting. It turned out that I needed to make the request with jsonp and I needed to handle the incoming data differently. An error in the function called by app.js was erroring and causing the connection to time out. This resulted in ... | You're almost there.
You have to think of the proxy as an external server as well as your Node.js application.
So, in short, you need to add a header to your nginx configuration.
Take a look at this link,
<https://gist.github.com/pauloricardomg/7084524>
In case this ever gets deleted:
```
#
# Acts as a nginx HTTPS... |
37,335,301 | I have set up a digital ocean droplet that is a reverse proxy server using nginx and node. I used this tutorial from digital ocean as a starting point
<https://www.digitalocean.com/community/tutorials/how-to-set-up-a-node-js-application-for-production-on-ubuntu-14-04>.
I have also set up ssl with lets encrypt. The ... | 2016/05/19 | [
"https://Stackoverflow.com/questions/37335301",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5219987/"
] | It turns out the error message I was getting was inaccurate. The issue was not header setting. It turned out that I needed to make the request with jsonp and I needed to handle the incoming data differently. An error in the function called by app.js was erroring and causing the connection to time out. This resulted in ... | Pull Nginx out of this equation. It doesn't have anything to do with your CORs problem if your setup is as similar to mine as I believe it is. I see that you're using the `cors` module, but you're not actually using it that I can see.
Your settings are simply enough that you might be able to get away with the defaults... |
34,099,173 | I'm working at a online form, but i can't do it run
Somebody can help me with this?
This is my problem:
the following from address failed: villarrealbli01@gmail.com : called mail() without being connected
I don´t know if my code isn´t working or what, i´m using PHP Mailer, and this is my PHP code
```
<?php
$mail_g... | 2015/12/04 | [
"https://Stackoverflow.com/questions/34099173",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5544393/"
] | Can you try with this config? :
```
$mail->SMTPSecure = "tls";
$mail->Port = 587;
```
Or
```
$mail->SMTPSecure = "ssl";
$mail->Port = 465;
``` | You've got your port & protocol mismatched. port 465 is for ssl and port 587 is for tls.
```
$mail->SMTPSecure = "tls"; // port 587
$mail->SMTPSecure = "ssl"; // port 465
```
Also use this code `$mail->SMTPDebug = 1` to enable debug |
70,559,754 | So basically I am using the `showModalBottomSheet` widget to show a full screen container that has a `GestureDetector` that runs this onTap:
```
onTap: () {
final String testText = "Sup";
Navigator.of(context).pop(testText);
}
```
This obviously returns the text when I `await` the result when I call `showModalBo... | 2022/01/02 | [
"https://Stackoverflow.com/questions/70559754",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13704230/"
] | you can declare positions with inline if statement :
```
double positions = textBox3.Text == "short" ?
Convert.ToDouble(textBox2.Text) * (-1) :
Convert.ToDouble(textBox2.Text);
```
if you want do something else when textBox3.Text == "Long" :
```
double positions = textBox3.Text == "short" ?
Convert.ToDouble(te... | You can negate the `position`. This way you only need 1 operation.
`if (textBox3.Text == "Long" || textBox3.Text == "Short") { positions = positions * -1; }`
Ideally you want to do this in a method and pass a string parameter. |
70,559,754 | So basically I am using the `showModalBottomSheet` widget to show a full screen container that has a `GestureDetector` that runs this onTap:
```
onTap: () {
final String testText = "Sup";
Navigator.of(context).pop(testText);
}
```
This obviously returns the text when I `await` the result when I call `showModalBo... | 2022/01/02 | [
"https://Stackoverflow.com/questions/70559754",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13704230/"
] | you only need 1 statement, another statement doestn't do anything
```
if (textBox3.Text == "Short") positions = -positions;
```
or you can put everytning in one line
```
double positions = textBox3.Text == "Short" ?
- Convert.ToDouble(textBox2.Text) : Convert.ToDouble(textBox2.Text);
``` | You can negate the `position`. This way you only need 1 operation.
`if (textBox3.Text == "Long" || textBox3.Text == "Short") { positions = positions * -1; }`
Ideally you want to do this in a method and pass a string parameter. |
67,845,184 | This may seem like a dumb question at first, but nothing's been working so I need help.
In this code I have I am getting an error:
```
board_img = Image.open("ChessBoard.png")
start_x = 22
start_y = 1200
cell_size = 162
offset = cell_size//4
font = ImageFont.truetype("F25_font.ttf", 31)
draw = ImageDraw.Draw(board_im... | 2021/06/05 | [
"https://Stackoverflow.com/questions/67845184",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14607476/"
] | If I understood your question correctly I think it should be enough if you set `panel: "shared"` in the `presentation` field of the task json. This will prevent multiple terminals from stacking and they should all try to use the same one.
Source: <https://code.visualstudio.com/docs/editor/tasks#_output-behavior> | Go to `.vscode/tasks.json`
change `panel` value to `shared`
```
prefrence : {
"panel": "shared"
}
``` |
107,243 | I just read that someone did steal 69000 bitcoins and 'vanished' with it. But how it that possible?
As far as I know, the complete chain of transactions is always visible to everyone. So at any given time you know where these 69000 bitcoins are, to which 'account' they have been moved. So you just need to follow where... | 2021/06/25 | [
"https://bitcoin.stackexchange.com/questions/107243",
"https://bitcoin.stackexchange.com",
"https://bitcoin.stackexchange.com/users/3801/"
] | **tl;dr:**
* The blockchain doesn't always show where the money is.
* You often can't follow the money to an identifiable organisation.
* Many organisations can often, and sometimes must, ignore requests.
---
>
> **at any given time you know where these 69000 bitcoins are,**
>
>
>
It isn't that easy. Let me quo... | >
> As far as I know, the complete chain of transactions is always visible to everyone.
>
>
>
True
>
> So at any given time you know where these 69000 bitcoins are, to which 'account' they have been moved.
>
>
>
Bitcoin is based on UTXO, it has no accounts. You can follow the transactions and check unspent t... |
107,243 | I just read that someone did steal 69000 bitcoins and 'vanished' with it. But how it that possible?
As far as I know, the complete chain of transactions is always visible to everyone. So at any given time you know where these 69000 bitcoins are, to which 'account' they have been moved. So you just need to follow where... | 2021/06/25 | [
"https://bitcoin.stackexchange.com/questions/107243",
"https://bitcoin.stackexchange.com",
"https://bitcoin.stackexchange.com/users/3801/"
] | **tl;dr:**
* The blockchain doesn't always show where the money is.
* You often can't follow the money to an identifiable organisation.
* Many organisations can often, and sometimes must, ignore requests.
---
>
> **at any given time you know where these 69000 bitcoins are,**
>
>
>
It isn't that easy. Let me quo... | >
> So you just need to follow where these bitcoins go until they are
> being transferred to a bank or a service, and then you can ask them
> who got that service.
>
>
>
Except when you do this you end up at a bunch of homeless guys in Kharkiv who have been paid $100 to borrow their face to sign up for exchanges w... |
5,269,773 | I can't get my Controller action method to get hit when I click 'Detail View' tab, or any tab for that matter. However, I can get the action method to hit if I comment out `return false;` in the javascript section, but then my 'Selected' tab is not maintained.
```
<script type="text/javascript">
$(document).ready(func... | 2011/03/11 | [
"https://Stackoverflow.com/questions/5269773",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/577789/"
] | By returning false you are canceling the default link action which is to send a request to your controller action. So if you do this you will need to manually send a request (AJAX?) and use the results from this request to modify the DOM. For example:
```
$('.test').click(function () {
$('.test').remov... | The code was good. But i think try to make **li** tag with unique id. |
2,551,577 | I was looking for the general solution of the differential equation $$(D^5 + D^4 -7D^3 - 11D^2 - 8D - 12)y = 0$$
**My work**
We need to get the auxillary equation of the given differential equation above...
The auxillary equation would be:
$$r^5 + r^4 - 7r^3 - 11r^2 - 8r - 12 = 0$$
We need to get the roots of the ... | 2017/12/05 | [
"https://math.stackexchange.com/questions/2551577",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/442587/"
] | Hint: Since you know that two roots are $-2$ and $3$, you can exploit factoring by grouping or polynomial long division:
\begin{align}\begin{aligned}
&r^5+r^4-7r^3-11r^2-8r-12 \\&\quad= r^5+2r^4-r^4-2r^3-5r^3-10r^2-r^2-2r-6r-12\\
&\quad= (r+2)(r^4-r^3-5r^2-r-6)\\
&\quad= (r+2)(r^4-3r^3+2r^3-6r^2+r^2-3r+2r-6)\\
&\quad=... | $(r+2)^2(r-3)(r^2+1)$
We have one double root and one pair of complex roots.
With complex roots:
$Ae^{it} + Be^{-it} = C\_1 \cos t+ C\_2\sin t$
are solutions
With roots of multiplicity.
$C\_3^{-2t}+ C\_4te^{-2t}$ will be solutions. |
15,743 | If i press a bunch of key sequences like this:
```
/term<cr>
```
and there are five matches on the screen currently, i will have to press `n` five times to see the next search result that is not on the screen. Is there a single key (or two) that I can press to emulate pressing `n` five times in the situation? | 2018/03/29 | [
"https://vi.stackexchange.com/questions/15743",
"https://vi.stackexchange.com",
"https://vi.stackexchange.com/users/11136/"
] | `Ctrl`+`F` `n`
Scroll one page forward (downward) in the buffer, then find next match.
It's not the most elegant solution, but it *is* simple, and it doesn't require you to think of the appropriate count for your `n` motion.
You can also go the other way with `Ctrl`+`B` `N`.
Since you asked for a single key, you ca... | n/N support counts, You can use 5n. I recommend to read `:h n`. |
15,743 | If i press a bunch of key sequences like this:
```
/term<cr>
```
and there are five matches on the screen currently, i will have to press `n` five times to see the next search result that is not on the screen. Is there a single key (or two) that I can press to emulate pressing `n` five times in the situation? | 2018/03/29 | [
"https://vi.stackexchange.com/questions/15743",
"https://vi.stackexchange.com",
"https://vi.stackexchange.com/users/11136/"
] | You could use Ln to search next instance on the next page and HN to search previous instance on previous page.
L - Jump to bottom of the screen
H - Jump to the top of the screen
You can map these to any shortcut you want. | n/N support counts, You can use 5n. I recommend to read `:h n`. |
15,743 | If i press a bunch of key sequences like this:
```
/term<cr>
```
and there are five matches on the screen currently, i will have to press `n` five times to see the next search result that is not on the screen. Is there a single key (or two) that I can press to emulate pressing `n` five times in the situation? | 2018/03/29 | [
"https://vi.stackexchange.com/questions/15743",
"https://vi.stackexchange.com",
"https://vi.stackexchange.com/users/11136/"
] | `Ctrl`+`F` `n`
Scroll one page forward (downward) in the buffer, then find next match.
It's not the most elegant solution, but it *is* simple, and it doesn't require you to think of the appropriate count for your `n` motion.
You can also go the other way with `Ctrl`+`B` `N`.
Since you asked for a single key, you ca... | You could use Ln to search next instance on the next page and HN to search previous instance on previous page.
L - Jump to bottom of the screen
H - Jump to the top of the screen
You can map these to any shortcut you want. |
15,743 | If i press a bunch of key sequences like this:
```
/term<cr>
```
and there are five matches on the screen currently, i will have to press `n` five times to see the next search result that is not on the screen. Is there a single key (or two) that I can press to emulate pressing `n` five times in the situation? | 2018/03/29 | [
"https://vi.stackexchange.com/questions/15743",
"https://vi.stackexchange.com",
"https://vi.stackexchange.com/users/11136/"
] | `Ctrl`+`F` `n`
Scroll one page forward (downward) in the buffer, then find next match.
It's not the most elegant solution, but it *is* simple, and it doesn't require you to think of the appropriate count for your `n` motion.
You can also go the other way with `Ctrl`+`B` `N`.
Since you asked for a single key, you ca... | Heres the out put from `:h n`
```
n Repeat the latest "/" or "?" [count] times.
If the cursor doesn't move the search is repeated with
count + 1.
last-pattern {Vi: no count}
```
You can just use `5n` to go forward or `5N... |
15,743 | If i press a bunch of key sequences like this:
```
/term<cr>
```
and there are five matches on the screen currently, i will have to press `n` five times to see the next search result that is not on the screen. Is there a single key (or two) that I can press to emulate pressing `n` five times in the situation? | 2018/03/29 | [
"https://vi.stackexchange.com/questions/15743",
"https://vi.stackexchange.com",
"https://vi.stackexchange.com/users/11136/"
] | You could use Ln to search next instance on the next page and HN to search previous instance on previous page.
L - Jump to bottom of the screen
H - Jump to the top of the screen
You can map these to any shortcut you want. | Heres the out put from `:h n`
```
n Repeat the latest "/" or "?" [count] times.
If the cursor doesn't move the search is repeated with
count + 1.
last-pattern {Vi: no count}
```
You can just use `5n` to go forward or `5N... |
52,384,142 | Below is a code I made in Python for our lab activity which makes a triangle.
```
side = input("Input side: ")
def triangle(x):
print ((x - 1)*" "),"*"
asterisk = "*"
space = side
for i in range(x):
asterisk = "**" + asterisk
space = (space-1) * " "
print space,aste... | 2018/09/18 | [
"https://Stackoverflow.com/questions/52384142",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10379664/"
] | Try this in C17 then fill right and down.
```
=INDEX($A$3:$Z$12, MATCH($A17, $A$3:$A$12, 0), AGGREGATE(15, 7, (COLUMN(1:1)+MATCH($B17, $1:$1, 0)-2)/($2:$2=C$16), 1))
```
[](https://i.stack.imgur.com/uRZ3U.png) | For cell C17: `IF(B17="USER_A",VLookup(A17,A3:C12,2,0),VLookup(A17,A3:E12,4,0))`
For cell D17: `IF(B17="USER_A",VLookup(A17,A3:C12,3,0),VLookup(A17,A3:E12,5,0))`
In this formula replace `A3:C12` and `A3:E12` with your appropriate table range, then drag these down. |
49,811,854 | I have enum:
```
export enum Roles {
user = 10,
editor = 30,
admin = 50,
}
```
I import it to one of my services:
```
import { Roles } from '../enums/roles';
```
And use in service method:
```
this.writeRole(
Roles.user,
);
```
And when i call this method in my app, in console i got error: `Canno... | 2018/04/13 | [
"https://Stackoverflow.com/questions/49811854",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7325495/"
] | This error is usually bound to your IDE : let's take for instance Visual studio code (I'm using it and apparently you do too)
When you create a file, VSCode adds it to its index. It allows you to CtrlP to open a file.
But when you move it, VSCode doesn't rebuild its index. This means it imports your file from a wron... | In your service / component - just do "enum = Enum":
```
roles = Roles
``` |
47,787,106 | Hi I have been following the [tutorials in youtube](https://www.youtube.com/watch?v=DKuGU5CYV_E&t=159s) it uses CLI container to add an org. Since using CLI container is not recommended to have in production environment how to add an org into the existing network withput using cli container | 2017/12/13 | [
"https://Stackoverflow.com/questions/47787106",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5542616/"
] | try this
```
WITH CTE
AS
(
SELECT
SeqNo = ROW_NUMBER() OVER(PARTITION BY LastName,FirstName ORDER BY DateTo DESC),
*
FROM Guests
)
SELECT
*
FROM CTE
WHERE SeqNo = 1
```
This query will return the latest records for each user, if there are multiple records for a first name + last name ... | Try:
```
SELECT
A.LASTNAME, A.FIRSTNAME, A.DATEFROM, A.DATETO, A.ROOMNUMBER, A.CITY, A.COUNTRY, A.STATUS, A.DAYS
FROM
(SELECT LASTNAME, FIRSTNAME, MAX(DATETO) AS MOST_RECENT_STAY
FROM YOUR_TABLE
GROUP BY LASTNAME, FIRSTNAME) Z
INNER JOIN
YOUR_TABLE A
ON Z.LASTNAME = A.LASTNAME AND Z.FIRSTNAME = A.FIRSTNAME AND Z.MOS... |
47,787,106 | Hi I have been following the [tutorials in youtube](https://www.youtube.com/watch?v=DKuGU5CYV_E&t=159s) it uses CLI container to add an org. Since using CLI container is not recommended to have in production environment how to add an org into the existing network withput using cli container | 2017/12/13 | [
"https://Stackoverflow.com/questions/47787106",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5542616/"
] | I think this the simpliest solution...:
```
select top 1 * from MY_VIEW
where lastname = 'Collins' and firstname = 'Frank'
order by dateto desc
```
or more edible:
```
select top 1 * from MY_VIEW
where lastname + ' ' + firstname = 'Collins Frank'
order by dateto desc
``` | try this
```
WITH CTE
AS
(
SELECT
SeqNo = ROW_NUMBER() OVER(PARTITION BY LastName,FirstName ORDER BY DateTo DESC),
*
FROM Guests
)
SELECT
*
FROM CTE
WHERE SeqNo = 1
```
This query will return the latest records for each user, if there are multiple records for a first name + last name ... |
47,787,106 | Hi I have been following the [tutorials in youtube](https://www.youtube.com/watch?v=DKuGU5CYV_E&t=159s) it uses CLI container to add an org. Since using CLI container is not recommended to have in production environment how to add an org into the existing network withput using cli container | 2017/12/13 | [
"https://Stackoverflow.com/questions/47787106",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5542616/"
] | try this
```
WITH CTE
AS
(
SELECT
SeqNo = ROW_NUMBER() OVER(PARTITION BY LastName,FirstName ORDER BY DateTo DESC),
*
FROM Guests
)
SELECT
*
FROM CTE
WHERE SeqNo = 1
```
This query will return the latest records for each user, if there are multiple records for a first name + last name ... | You don't need CTE, just use `TOP WITH TIES` + `ROW_NUMBER()`
```
SELECT TOP 1 WITH TIES *
FROM guests
ORDER BY ROW_NUMBER() OVER(PARTITION BY lastname, firstname ORDER BY dateto DESC)
``` |
47,787,106 | Hi I have been following the [tutorials in youtube](https://www.youtube.com/watch?v=DKuGU5CYV_E&t=159s) it uses CLI container to add an org. Since using CLI container is not recommended to have in production environment how to add an org into the existing network withput using cli container | 2017/12/13 | [
"https://Stackoverflow.com/questions/47787106",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5542616/"
] | I think this the simpliest solution...:
```
select top 1 * from MY_VIEW
where lastname = 'Collins' and firstname = 'Frank'
order by dateto desc
```
or more edible:
```
select top 1 * from MY_VIEW
where lastname + ' ' + firstname = 'Collins Frank'
order by dateto desc
``` | Try:
```
SELECT
A.LASTNAME, A.FIRSTNAME, A.DATEFROM, A.DATETO, A.ROOMNUMBER, A.CITY, A.COUNTRY, A.STATUS, A.DAYS
FROM
(SELECT LASTNAME, FIRSTNAME, MAX(DATETO) AS MOST_RECENT_STAY
FROM YOUR_TABLE
GROUP BY LASTNAME, FIRSTNAME) Z
INNER JOIN
YOUR_TABLE A
ON Z.LASTNAME = A.LASTNAME AND Z.FIRSTNAME = A.FIRSTNAME AND Z.MOS... |
47,787,106 | Hi I have been following the [tutorials in youtube](https://www.youtube.com/watch?v=DKuGU5CYV_E&t=159s) it uses CLI container to add an org. Since using CLI container is not recommended to have in production environment how to add an org into the existing network withput using cli container | 2017/12/13 | [
"https://Stackoverflow.com/questions/47787106",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5542616/"
] | I think this the simpliest solution...:
```
select top 1 * from MY_VIEW
where lastname = 'Collins' and firstname = 'Frank'
order by dateto desc
```
or more edible:
```
select top 1 * from MY_VIEW
where lastname + ' ' + firstname = 'Collins Frank'
order by dateto desc
``` | You don't need CTE, just use `TOP WITH TIES` + `ROW_NUMBER()`
```
SELECT TOP 1 WITH TIES *
FROM guests
ORDER BY ROW_NUMBER() OVER(PARTITION BY lastname, firstname ORDER BY dateto DESC)
``` |
16,712,172 | I copied below code from [this](http://blogs.msdn.com/b/csharpfaq/archive/2012/06/26/understanding-a-simple-async-program.aspx) link.But when I am compiling this code I am getting an **entry point cannot be marked with the 'async' modifier**. How can I make this code compilable?
```
class Program
{
static async vo... | 2013/05/23 | [
"https://Stackoverflow.com/questions/16712172",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | The error message is exactly right: the `Main()` method cannot be `async`, because when `Main()` returns, the application usually ends.
If you want to make a console application that uses `async`, a simple solution is to create an `async` version of `Main()` and synchronously `Wait()` on that from the real `Main()`:
... | The difference between the code in the link's example and yours, is that you're trying to mark the `Main()` method with an `async` modifier - this is not allowed, and the error says that exactly - the `Main()` method is the "entry point" to the application (it's the method that is executed when your application starts)... |
16,712,172 | I copied below code from [this](http://blogs.msdn.com/b/csharpfaq/archive/2012/06/26/understanding-a-simple-async-program.aspx) link.But when I am compiling this code I am getting an **entry point cannot be marked with the 'async' modifier**. How can I make this code compilable?
```
class Program
{
static async vo... | 2013/05/23 | [
"https://Stackoverflow.com/questions/16712172",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | Starting from C# 7.1 there are 4 new signatures for `Main` method which allow to make it `async`([Source](https://blogs.msdn.microsoft.com/mazhou/2017/05/30/c-7-series-part-2-async-main/), [Source 2](https://www.infoq.com/news/2017/06/CSharp-7.1-a), [Source 3](https://github.com/dotnet/csharplang/milestone/5)):
```
pu... | The difference between the code in the link's example and yours, is that you're trying to mark the `Main()` method with an `async` modifier - this is not allowed, and the error says that exactly - the `Main()` method is the "entry point" to the application (it's the method that is executed when your application starts)... |
16,712,172 | I copied below code from [this](http://blogs.msdn.com/b/csharpfaq/archive/2012/06/26/understanding-a-simple-async-program.aspx) link.But when I am compiling this code I am getting an **entry point cannot be marked with the 'async' modifier**. How can I make this code compilable?
```
class Program
{
static async vo... | 2013/05/23 | [
"https://Stackoverflow.com/questions/16712172",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | I'm using C# 8 and its working fine.
------------------------------------
```
static async Task Main(string[] args)
{
var response = await SomeAsyncFunc();
Console.WriteLine("Async response", response);
}
```
**OR without "await" keyword.**
```
static void Main(string[] args)
{
var response = SomeAsyncFunc... | The difference between the code in the link's example and yours, is that you're trying to mark the `Main()` method with an `async` modifier - this is not allowed, and the error says that exactly - the `Main()` method is the "entry point" to the application (it's the method that is executed when your application starts)... |
16,712,172 | I copied below code from [this](http://blogs.msdn.com/b/csharpfaq/archive/2012/06/26/understanding-a-simple-async-program.aspx) link.But when I am compiling this code I am getting an **entry point cannot be marked with the 'async' modifier**. How can I make this code compilable?
```
class Program
{
static async vo... | 2013/05/23 | [
"https://Stackoverflow.com/questions/16712172",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | The error message is exactly right: the `Main()` method cannot be `async`, because when `Main()` returns, the application usually ends.
If you want to make a console application that uses `async`, a simple solution is to create an `async` version of `Main()` and synchronously `Wait()` on that from the real `Main()`:
... | Starting from C# 7.1 there are 4 new signatures for `Main` method which allow to make it `async`([Source](https://blogs.msdn.microsoft.com/mazhou/2017/05/30/c-7-series-part-2-async-main/), [Source 2](https://www.infoq.com/news/2017/06/CSharp-7.1-a), [Source 3](https://github.com/dotnet/csharplang/milestone/5)):
```
pu... |
16,712,172 | I copied below code from [this](http://blogs.msdn.com/b/csharpfaq/archive/2012/06/26/understanding-a-simple-async-program.aspx) link.But when I am compiling this code I am getting an **entry point cannot be marked with the 'async' modifier**. How can I make this code compilable?
```
class Program
{
static async vo... | 2013/05/23 | [
"https://Stackoverflow.com/questions/16712172",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | The error message is exactly right: the `Main()` method cannot be `async`, because when `Main()` returns, the application usually ends.
If you want to make a console application that uses `async`, a simple solution is to create an `async` version of `Main()` and synchronously `Wait()` on that from the real `Main()`:
... | Wrap your async code in `MainAsync()` - which is an async function
then call `MainAsync().GetAwaiter().GetResult();` |
16,712,172 | I copied below code from [this](http://blogs.msdn.com/b/csharpfaq/archive/2012/06/26/understanding-a-simple-async-program.aspx) link.But when I am compiling this code I am getting an **entry point cannot be marked with the 'async' modifier**. How can I make this code compilable?
```
class Program
{
static async vo... | 2013/05/23 | [
"https://Stackoverflow.com/questions/16712172",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | The error message is exactly right: the `Main()` method cannot be `async`, because when `Main()` returns, the application usually ends.
If you want to make a console application that uses `async`, a simple solution is to create an `async` version of `Main()` and synchronously `Wait()` on that from the real `Main()`:
... | I'm using C# 8 and its working fine.
------------------------------------
```
static async Task Main(string[] args)
{
var response = await SomeAsyncFunc();
Console.WriteLine("Async response", response);
}
```
**OR without "await" keyword.**
```
static void Main(string[] args)
{
var response = SomeAsyncFunc... |
16,712,172 | I copied below code from [this](http://blogs.msdn.com/b/csharpfaq/archive/2012/06/26/understanding-a-simple-async-program.aspx) link.But when I am compiling this code I am getting an **entry point cannot be marked with the 'async' modifier**. How can I make this code compilable?
```
class Program
{
static async vo... | 2013/05/23 | [
"https://Stackoverflow.com/questions/16712172",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | Starting from C# 7.1 there are 4 new signatures for `Main` method which allow to make it `async`([Source](https://blogs.msdn.microsoft.com/mazhou/2017/05/30/c-7-series-part-2-async-main/), [Source 2](https://www.infoq.com/news/2017/06/CSharp-7.1-a), [Source 3](https://github.com/dotnet/csharplang/milestone/5)):
```
pu... | Wrap your async code in `MainAsync()` - which is an async function
then call `MainAsync().GetAwaiter().GetResult();` |
16,712,172 | I copied below code from [this](http://blogs.msdn.com/b/csharpfaq/archive/2012/06/26/understanding-a-simple-async-program.aspx) link.But when I am compiling this code I am getting an **entry point cannot be marked with the 'async' modifier**. How can I make this code compilable?
```
class Program
{
static async vo... | 2013/05/23 | [
"https://Stackoverflow.com/questions/16712172",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | Starting from C# 7.1 there are 4 new signatures for `Main` method which allow to make it `async`([Source](https://blogs.msdn.microsoft.com/mazhou/2017/05/30/c-7-series-part-2-async-main/), [Source 2](https://www.infoq.com/news/2017/06/CSharp-7.1-a), [Source 3](https://github.com/dotnet/csharplang/milestone/5)):
```
pu... | I'm using C# 8 and its working fine.
------------------------------------
```
static async Task Main(string[] args)
{
var response = await SomeAsyncFunc();
Console.WriteLine("Async response", response);
}
```
**OR without "await" keyword.**
```
static void Main(string[] args)
{
var response = SomeAsyncFunc... |
16,712,172 | I copied below code from [this](http://blogs.msdn.com/b/csharpfaq/archive/2012/06/26/understanding-a-simple-async-program.aspx) link.But when I am compiling this code I am getting an **entry point cannot be marked with the 'async' modifier**. How can I make this code compilable?
```
class Program
{
static async vo... | 2013/05/23 | [
"https://Stackoverflow.com/questions/16712172",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | I'm using C# 8 and its working fine.
------------------------------------
```
static async Task Main(string[] args)
{
var response = await SomeAsyncFunc();
Console.WriteLine("Async response", response);
}
```
**OR without "await" keyword.**
```
static void Main(string[] args)
{
var response = SomeAsyncFunc... | Wrap your async code in `MainAsync()` - which is an async function
then call `MainAsync().GetAwaiter().GetResult();` |
35,880,006 | I'm creating an interactive `jupyter notebook` with [`ipython widgets`](https://github.com/ipython/ipywidgets) and want the user to select from a certain number of checkboxes. I'm using the code below to visualize the [`HBox`](https://ipython.org/ipython-doc/3/api/generated/IPython.html.widgets.widget_box.html) that co... | 2016/03/08 | [
"https://Stackoverflow.com/questions/35880006",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/907921/"
] | I was having the same issue with the widgets and after toying around with the various Box properties, here is what I came up with:
You need to set the following properties:
* `display`: 'inline-flex'
* `flex_flow`: 'row wrap'
This worked for me with any number of checkboxes (I tried up to 100). On the other hand, se... | You can use percentage for the width (and height):
```
cb_cont = widgets.HBox(background_color='red',height='100px',width='100%')
```
and set `cb_cont.overflow_x = 'auto'` |
7,436 | Фраза из КВН: "Скучно тут у вас. Пойду(,) в плен схожу". А нужна ли запятая после "пойду"? | 2012/08/10 | [
"https://rus.stackexchange.com/questions/7436",
"https://rus.stackexchange.com",
"https://rus.stackexchange.com/users/3/"
] | В словаре Шведовой обнаружила такое пояснение: **Сбрендить** - из *с-брендить*, ср. диал. *брендить*, экспрессивный вариант к *бердить*, производн. от *бёрдо* ‘часть ткацкого станка’; развитие знач.: ‘качаться как бёрдо’ > ‘пятиться назад’ > ‘отставать, не надеяться на собственные силы’ > ‘трусить’. | От слова "бред" -- "сбредить" -- сказать бред, потом переиначилось. |
3,996,844 | Hello
Suppose I have 3 references that goes one after another i.e [1][2][3].
But I want to see [1]-[3].
What should I do.
Thank you. | 2010/10/22 | [
"https://Stackoverflow.com/questions/3996844",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/466056/"
] | There are ways to change how bibtex formats your citations. One way is to use the [cite](https://ctan.org/pkg/cite) package. Another is the [natbib](http://ctan.org/pkg/natbib) package perhaps with the sort&compress option (i.e., \usepackage[sort&compress]{natbib}). Many publications also have their own styles that wil... | If you put more than one tag in your `\cite` command, such as:
```
\cite{pugh1, pugh2, barneymcgrew}
```
these will be listed together within the same square brackets, and look something like [1,4,9] in the final document. If some or all of the references which you cite turn out to have sequential numbers, this will... |
3,996,844 | Hello
Suppose I have 3 references that goes one after another i.e [1][2][3].
But I want to see [1]-[3].
What should I do.
Thank you. | 2010/10/22 | [
"https://Stackoverflow.com/questions/3996844",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/466056/"
] | If you put more than one tag in your `\cite` command, such as:
```
\cite{pugh1, pugh2, barneymcgrew}
```
these will be listed together within the same square brackets, and look something like [1,4,9] in the final document. If some or all of the references which you cite turn out to have sequential numbers, this will... | Using `\cite` package would probably resolve your problem.
You could add either of the following lines to your code:
```
\usepackage{cite}
\usepackage[noadjust]{cite}
``` |
3,996,844 | Hello
Suppose I have 3 references that goes one after another i.e [1][2][3].
But I want to see [1]-[3].
What should I do.
Thank you. | 2010/10/22 | [
"https://Stackoverflow.com/questions/3996844",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/466056/"
] | If you put more than one tag in your `\cite` command, such as:
```
\cite{pugh1, pugh2, barneymcgrew}
```
these will be listed together within the same square brackets, and look something like [1,4,9] in the final document. If some or all of the references which you cite turn out to have sequential numbers, this will... | ```
\usepackage{cite}
...
\bibliographystyle{unsrt}
```
worked well for me! |
3,996,844 | Hello
Suppose I have 3 references that goes one after another i.e [1][2][3].
But I want to see [1]-[3].
What should I do.
Thank you. | 2010/10/22 | [
"https://Stackoverflow.com/questions/3996844",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/466056/"
] | If you put more than one tag in your `\cite` command, such as:
```
\cite{pugh1, pugh2, barneymcgrew}
```
these will be listed together within the same square brackets, and look something like [1,4,9] in the final document. If some or all of the references which you cite turn out to have sequential numbers, this will... | If you're using biblatex, you can use the `numeric-comp` style (see [Section 3.3.1](https://mirror.unpad.ac.id/ctan/macros/latex/contrib/biblatex/doc/biblatex.pdf#subsection.3.3) of the documentation)
```tex
\usepackage[style=numeric-comp]{biblatex}
```
This will sort (and compress) the numbers inside the citation `... |
3,996,844 | Hello
Suppose I have 3 references that goes one after another i.e [1][2][3].
But I want to see [1]-[3].
What should I do.
Thank you. | 2010/10/22 | [
"https://Stackoverflow.com/questions/3996844",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/466056/"
] | There are ways to change how bibtex formats your citations. One way is to use the [cite](https://ctan.org/pkg/cite) package. Another is the [natbib](http://ctan.org/pkg/natbib) package perhaps with the sort&compress option (i.e., \usepackage[sort&compress]{natbib}). Many publications also have their own styles that wil... | Using `\cite` package would probably resolve your problem.
You could add either of the following lines to your code:
```
\usepackage{cite}
\usepackage[noadjust]{cite}
``` |
3,996,844 | Hello
Suppose I have 3 references that goes one after another i.e [1][2][3].
But I want to see [1]-[3].
What should I do.
Thank you. | 2010/10/22 | [
"https://Stackoverflow.com/questions/3996844",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/466056/"
] | There are ways to change how bibtex formats your citations. One way is to use the [cite](https://ctan.org/pkg/cite) package. Another is the [natbib](http://ctan.org/pkg/natbib) package perhaps with the sort&compress option (i.e., \usepackage[sort&compress]{natbib}). Many publications also have their own styles that wil... | ```
\usepackage{cite}
...
\bibliographystyle{unsrt}
```
worked well for me! |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.