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 |
|---|---|---|---|---|---|
27,941,661 | I have a template class where each template argument stands for one type of value the internal computation can handle. Templates (instead of function overloading) are needed because the values are passed as boost::any and their types are not clear before runtime.
To properly cast to the correct types, I would like to... | 2015/01/14 | [
"https://Stackoverflow.com/questions/27941661",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1101674/"
] | As you have already been hinted, the best way is to use a tuple:
```
template<typename ...AcceptedTypes> // e.g. MyClass<T1, T2>
class MyClass {
std::tuple<std::vector<AcceptedTypes>...> vectors;
};
```
This is the only way to multiply the "fields" because you cannot magically make it spell up the field names. A... | Here is a less than perfectly efficient implementation using `boost::variant`:
```
template<typename ... Ts>
using variant_vector = boost::variant< std::vector<Ts>... >;
template<typename ...Ts>
struct MyClass {
using var_vec = variant_vector<Ts...>;
std::array<var_vec, sizeof...(Ts)> vecs;
};
```
we create a v... |
27,941,661 | I have a template class where each template argument stands for one type of value the internal computation can handle. Templates (instead of function overloading) are needed because the values are passed as boost::any and their types are not clear before runtime.
To properly cast to the correct types, I would like to... | 2015/01/14 | [
"https://Stackoverflow.com/questions/27941661",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1101674/"
] | An alternate solution that doesn't use tuples is to use CRTP to create a class hierarchy where each base class is a specialization for one of the types:
```
#include <iostream>
#include <string>
template<class L, class... R> class My_class;
template<class L>
class My_class<L>
{
public:
protected:
L get()
{
... | Here is a less than perfectly efficient implementation using `boost::variant`:
```
template<typename ... Ts>
using variant_vector = boost::variant< std::vector<Ts>... >;
template<typename ...Ts>
struct MyClass {
using var_vec = variant_vector<Ts...>;
std::array<var_vec, sizeof...(Ts)> vecs;
};
```
we create a v... |
27,941,661 | I have a template class where each template argument stands for one type of value the internal computation can handle. Templates (instead of function overloading) are needed because the values are passed as boost::any and their types are not clear before runtime.
To properly cast to the correct types, I would like to... | 2015/01/14 | [
"https://Stackoverflow.com/questions/27941661",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1101674/"
] | There is a proposal to allow this kind of expansion, with the intuitive syntax: [P1858R1 Generalized pack declaration and usage](https://wg21.link/p1858r1). You can also initialize the members and access them by index. You can even support structured bindings by writing `using... tuple_element = /*...*/`:
```
template... | Here is a less than perfectly efficient implementation using `boost::variant`:
```
template<typename ... Ts>
using variant_vector = boost::variant< std::vector<Ts>... >;
template<typename ...Ts>
struct MyClass {
using var_vec = variant_vector<Ts...>;
std::array<var_vec, sizeof...(Ts)> vecs;
};
```
we create a v... |
27,941,661 | I have a template class where each template argument stands for one type of value the internal computation can handle. Templates (instead of function overloading) are needed because the values are passed as boost::any and their types are not clear before runtime.
To properly cast to the correct types, I would like to... | 2015/01/14 | [
"https://Stackoverflow.com/questions/27941661",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1101674/"
] | As you have already been hinted, the best way is to use a tuple:
```
template<typename ...AcceptedTypes> // e.g. MyClass<T1, T2>
class MyClass {
std::tuple<std::vector<AcceptedTypes>...> vectors;
};
```
This is the only way to multiply the "fields" because you cannot magically make it spell up the field names. A... | An alternate solution that doesn't use tuples is to use CRTP to create a class hierarchy where each base class is a specialization for one of the types:
```
#include <iostream>
#include <string>
template<class L, class... R> class My_class;
template<class L>
class My_class<L>
{
public:
protected:
L get()
{
... |
27,941,661 | I have a template class where each template argument stands for one type of value the internal computation can handle. Templates (instead of function overloading) are needed because the values are passed as boost::any and their types are not clear before runtime.
To properly cast to the correct types, I would like to... | 2015/01/14 | [
"https://Stackoverflow.com/questions/27941661",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1101674/"
] | As you have already been hinted, the best way is to use a tuple:
```
template<typename ...AcceptedTypes> // e.g. MyClass<T1, T2>
class MyClass {
std::tuple<std::vector<AcceptedTypes>...> vectors;
};
```
This is the only way to multiply the "fields" because you cannot magically make it spell up the field names. A... | There is a proposal to allow this kind of expansion, with the intuitive syntax: [P1858R1 Generalized pack declaration and usage](https://wg21.link/p1858r1). You can also initialize the members and access them by index. You can even support structured bindings by writing `using... tuple_element = /*...*/`:
```
template... |
27,941,661 | I have a template class where each template argument stands for one type of value the internal computation can handle. Templates (instead of function overloading) are needed because the values are passed as boost::any and their types are not clear before runtime.
To properly cast to the correct types, I would like to... | 2015/01/14 | [
"https://Stackoverflow.com/questions/27941661",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1101674/"
] | An alternate solution that doesn't use tuples is to use CRTP to create a class hierarchy where each base class is a specialization for one of the types:
```
#include <iostream>
#include <string>
template<class L, class... R> class My_class;
template<class L>
class My_class<L>
{
public:
protected:
L get()
{
... | There is a proposal to allow this kind of expansion, with the intuitive syntax: [P1858R1 Generalized pack declaration and usage](https://wg21.link/p1858r1). You can also initialize the members and access them by index. You can even support structured bindings by writing `using... tuple_element = /*...*/`:
```
template... |
7,949,781 | I've been scouring SO and Google but haven't found anything helpful yet.
We're updating our existing iOS project to build against iOS 5.
Our project has two targets, the first is our static library and the second is a Unit Test application (GHUnit).
When building the unit test target it successfully compiles the sta... | 2011/10/31 | [
"https://Stackoverflow.com/questions/7949781",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/509035/"
] | This worked for me well (catch the settings with bold):
 | In my case I was building for device. Switching to simulator worked like charm, but I have no clue why it is different. :-) |
7,949,781 | I've been scouring SO and Google but haven't found anything helpful yet.
We're updating our existing iOS project to build against iOS 5.
Our project has two targets, the first is our static library and the second is a Unit Test application (GHUnit).
When building the unit test target it successfully compiles the sta... | 2011/10/31 | [
"https://Stackoverflow.com/questions/7949781",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/509035/"
] | In my case, I had to add `--coverage` to the `CMAKE_EXE_LINKER_FLAGS`
on Apple Clang `Apple LLVM version 9.0.0 (clang-900.0.39.2)`. That seems to have fixed it.
None of the above solutions worked.
The article below mentions it:
<https://asmaloney.com/2017/01/code/code-coverage-of-unit-tests-using-qt-5-on-macos/> | In my case I was building for device. Switching to simulator worked like charm, but I have no clue why it is different. :-) |
7,949,781 | I've been scouring SO and Google but haven't found anything helpful yet.
We're updating our existing iOS project to build against iOS 5.
Our project has two targets, the first is our static library and the second is a Unit Test application (GHUnit).
When building the unit test target it successfully compiles the sta... | 2011/10/31 | [
"https://Stackoverflow.com/questions/7949781",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/509035/"
] | This worked for me well (catch the settings with bold):
 | If you don't need the code coverage, you can complete disable it by using the following settings, thus avoiding the attempted calls to those functions.
```
GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = NO
GCC_GENERATE_TEST_COVERAGE_FILES = NO
``` |
7,949,781 | I've been scouring SO and Google but haven't found anything helpful yet.
We're updating our existing iOS project to build against iOS 5.
Our project has two targets, the first is our static library and the second is a Unit Test application (GHUnit).
When building the unit test target it successfully compiles the sta... | 2011/10/31 | [
"https://Stackoverflow.com/questions/7949781",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/509035/"
] | This worked for me well (catch the settings with bold):
 | I Had the same error : Just add "libGoogleAnalyticsServices.a" into your files |
7,949,781 | I've been scouring SO and Google but haven't found anything helpful yet.
We're updating our existing iOS project to build against iOS 5.
Our project has two targets, the first is our static library and the second is a Unit Test application (GHUnit).
When building the unit test target it successfully compiles the sta... | 2011/10/31 | [
"https://Stackoverflow.com/questions/7949781",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/509035/"
] | llvm\_gcda\_start\_file and co are added by LLVM compiler for code coverage and unit testing.
adding -lprofile\_rt to Linker Flags in your project settings should solve this error.
(older tutorial might suggest -lgcov which is for Xcode 3 and GCC)
According to [Code Coverage on Xcode 4.4.1](https://stackoverflow.com... | I Had the same error : Just add "libGoogleAnalyticsServices.a" into your files |
7,949,781 | I've been scouring SO and Google but haven't found anything helpful yet.
We're updating our existing iOS project to build against iOS 5.
Our project has two targets, the first is our static library and the second is a Unit Test application (GHUnit).
When building the unit test target it successfully compiles the sta... | 2011/10/31 | [
"https://Stackoverflow.com/questions/7949781",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/509035/"
] | If you don't need the code coverage, you can complete disable it by using the following settings, thus avoiding the attempted calls to those functions.
```
GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = NO
GCC_GENERATE_TEST_COVERAGE_FILES = NO
``` | I Had the same error : Just add "libGoogleAnalyticsServices.a" into your files |
7,949,781 | I've been scouring SO and Google but haven't found anything helpful yet.
We're updating our existing iOS project to build against iOS 5.
Our project has two targets, the first is our static library and the second is a Unit Test application (GHUnit).
When building the unit test target it successfully compiles the sta... | 2011/10/31 | [
"https://Stackoverflow.com/questions/7949781",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/509035/"
] | This worked for me well (catch the settings with bold):
 | llvm\_gcda\_start\_file and co are added by LLVM compiler for code coverage and unit testing.
adding -lprofile\_rt to Linker Flags in your project settings should solve this error.
(older tutorial might suggest -lgcov which is for Xcode 3 and GCC)
According to [Code Coverage on Xcode 4.4.1](https://stackoverflow.com... |
7,949,781 | I've been scouring SO and Google but haven't found anything helpful yet.
We're updating our existing iOS project to build against iOS 5.
Our project has two targets, the first is our static library and the second is a Unit Test application (GHUnit).
When building the unit test target it successfully compiles the sta... | 2011/10/31 | [
"https://Stackoverflow.com/questions/7949781",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/509035/"
] | In my case, I had to add `--coverage` to the `CMAKE_EXE_LINKER_FLAGS`
on Apple Clang `Apple LLVM version 9.0.0 (clang-900.0.39.2)`. That seems to have fixed it.
None of the above solutions worked.
The article below mentions it:
<https://asmaloney.com/2017/01/code/code-coverage-of-unit-tests-using-qt-5-on-macos/> | I Had the same error : Just add "libGoogleAnalyticsServices.a" into your files |
7,949,781 | I've been scouring SO and Google but haven't found anything helpful yet.
We're updating our existing iOS project to build against iOS 5.
Our project has two targets, the first is our static library and the second is a Unit Test application (GHUnit).
When building the unit test target it successfully compiles the sta... | 2011/10/31 | [
"https://Stackoverflow.com/questions/7949781",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/509035/"
] | If you don't need the code coverage, you can complete disable it by using the following settings, thus avoiding the attempted calls to those functions.
```
GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = NO
GCC_GENERATE_TEST_COVERAGE_FILES = NO
``` | In my case I was building for device. Switching to simulator worked like charm, but I have no clue why it is different. :-) |
7,949,781 | I've been scouring SO and Google but haven't found anything helpful yet.
We're updating our existing iOS project to build against iOS 5.
Our project has two targets, the first is our static library and the second is a Unit Test application (GHUnit).
When building the unit test target it successfully compiles the sta... | 2011/10/31 | [
"https://Stackoverflow.com/questions/7949781",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/509035/"
] | This worked for me well (catch the settings with bold):
 | In my case, I had to add `--coverage` to the `CMAKE_EXE_LINKER_FLAGS`
on Apple Clang `Apple LLVM version 9.0.0 (clang-900.0.39.2)`. That seems to have fixed it.
None of the above solutions worked.
The article below mentions it:
<https://asmaloney.com/2017/01/code/code-coverage-of-unit-tests-using-qt-5-on-macos/> |
10,694,716 | I'm struggling to understand something that i'm sure is pretty basic. I've searched around everywhere and can't find a solution to my problem.
The most related stackoverflow question I found was this one: [How do I call remote API using Phonegap for Android?](https://stackoverflow.com/questions/9464563/how-do-i-call-... | 2012/05/22 | [
"https://Stackoverflow.com/questions/10694716",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1034747/"
] | The problem is you are testing from the file protocol in FireFox. FireFox is keeping your request from working because it is a [Cross-site XMLHttpRequest](https://developer.mozilla.org/En/Using_XMLHttpRequest#Cross-site_XMLHttpRequest). Some version of FireFox will allow you to [enable cross site XHR's](http://dirolf.c... | I just ran
<http://www.grouped.com/api?f=user_exists&email=ryan@ensomniac.com>
via my web browser and got the correct JSON response. Your localhost must have problems communicating with the real world wide web, or something in your code is preventing the response. I didn't really look over the code to check for error... |
10,694,716 | I'm struggling to understand something that i'm sure is pretty basic. I've searched around everywhere and can't find a solution to my problem.
The most related stackoverflow question I found was this one: [How do I call remote API using Phonegap for Android?](https://stackoverflow.com/questions/9464563/how-do-i-call-... | 2012/05/22 | [
"https://Stackoverflow.com/questions/10694716",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1034747/"
] | The problem is you are testing from the file protocol in FireFox. FireFox is keeping your request from working because it is a [Cross-site XMLHttpRequest](https://developer.mozilla.org/En/Using_XMLHttpRequest#Cross-site_XMLHttpRequest). Some version of FireFox will allow you to [enable cross site XHR's](http://dirolf.c... | You probably ran into a cross-domain restriction. Which platform are you developing on? On iOS you might have to add something like that to your `Cordova.plist`:
```
<key>ExternalHosts</key>
<array>
<key>grouped</key>
<string>www.grouped.com</string>
</array>
```
For Android it's buggy, and your best bet is ... |
10,694,716 | I'm struggling to understand something that i'm sure is pretty basic. I've searched around everywhere and can't find a solution to my problem.
The most related stackoverflow question I found was this one: [How do I call remote API using Phonegap for Android?](https://stackoverflow.com/questions/9464563/how-do-i-call-... | 2012/05/22 | [
"https://Stackoverflow.com/questions/10694716",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1034747/"
] | The problem is you are testing from the file protocol in FireFox. FireFox is keeping your request from working because it is a [Cross-site XMLHttpRequest](https://developer.mozilla.org/En/Using_XMLHttpRequest#Cross-site_XMLHttpRequest). Some version of FireFox will allow you to [enable cross site XHR's](http://dirolf.c... | You should use `request.responseText` to get the response body from the server. |
57,699,598 | I have an array as such:
```
$d = [
0 => [
0 => 'lorem',
1 => 'dorem',
3 => '',
4 => 'ipsum'
],
1 => [
0 => 'test',
1 => 'rere',
3 => '',
4 => 'youp'
]
];
```
My issue is that I need to remove empty values from the array. How would I go ... | 2019/08/28 | [
"https://Stackoverflow.com/questions/57699598",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/151438/"
] | For some reason on iOS 13 specifically on the iPad in compact traitCollections the call to the delegate to see if it should collapse is happening BEFORE viewDidLoad is called on the UISplitViewController and so when it makes that call, your delegate is not set, and the method never gets called.
If you're creating your... | You need to add this in the function "scene" in the class "SceneDelegate":
>
> splitViewController.delegate = self
>
>
>
for example:
```
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.Conne... |
57,699,598 | I have an array as such:
```
$d = [
0 => [
0 => 'lorem',
1 => 'dorem',
3 => '',
4 => 'ipsum'
],
1 => [
0 => 'test',
1 => 'rere',
3 => '',
4 => 'youp'
]
];
```
My issue is that I need to remove empty values from the array. How would I go ... | 2019/08/28 | [
"https://Stackoverflow.com/questions/57699598",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/151438/"
] | I have an Xcode project - now for iOS 13 - that uses a tab bar controller with relationships to five split view controllers, each with their own master detail (table) views and controllers.
Previously - iOS 12.x and earlier, in fact back when I was writing Objective-C - my split view controller delegate was set in cod... | You need to add this in the function "scene" in the class "SceneDelegate":
>
> splitViewController.delegate = self
>
>
>
for example:
```
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.Conne... |
57,699,598 | I have an array as such:
```
$d = [
0 => [
0 => 'lorem',
1 => 'dorem',
3 => '',
4 => 'ipsum'
],
1 => [
0 => 'test',
1 => 'rere',
3 => '',
4 => 'youp'
]
];
```
My issue is that I need to remove empty values from the array. How would I go ... | 2019/08/28 | [
"https://Stackoverflow.com/questions/57699598",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/151438/"
] | Well, I think the answer should cover the iOS14 now.
If you find the delegate method is not be called.
```
func splitViewController(_ splitViewController: UISplitViewController, collapseSecondary secondaryViewController:UIViewController, onto primaryViewController:UIViewController) -> Bool {
...
}
```
maybe... | You need to add this in the function "scene" in the class "SceneDelegate":
>
> splitViewController.delegate = self
>
>
>
for example:
```
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.Conne... |
57,699,598 | I have an array as such:
```
$d = [
0 => [
0 => 'lorem',
1 => 'dorem',
3 => '',
4 => 'ipsum'
],
1 => [
0 => 'test',
1 => 'rere',
3 => '',
4 => 'youp'
]
];
```
My issue is that I need to remove empty values from the array. How would I go ... | 2019/08/28 | [
"https://Stackoverflow.com/questions/57699598",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/151438/"
] | For some reason on iOS 13 specifically on the iPad in compact traitCollections the call to the delegate to see if it should collapse is happening BEFORE viewDidLoad is called on the UISplitViewController and so when it makes that call, your delegate is not set, and the method never gets called.
If you're creating your... | I have an Xcode project - now for iOS 13 - that uses a tab bar controller with relationships to five split view controllers, each with their own master detail (table) views and controllers.
Previously - iOS 12.x and earlier, in fact back when I was writing Objective-C - my split view controller delegate was set in cod... |
57,699,598 | I have an array as such:
```
$d = [
0 => [
0 => 'lorem',
1 => 'dorem',
3 => '',
4 => 'ipsum'
],
1 => [
0 => 'test',
1 => 'rere',
3 => '',
4 => 'youp'
]
];
```
My issue is that I need to remove empty values from the array. How would I go ... | 2019/08/28 | [
"https://Stackoverflow.com/questions/57699598",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/151438/"
] | For some reason on iOS 13 specifically on the iPad in compact traitCollections the call to the delegate to see if it should collapse is happening BEFORE viewDidLoad is called on the UISplitViewController and so when it makes that call, your delegate is not set, and the method never gets called.
If you're creating your... | Well, I think the answer should cover the iOS14 now.
If you find the delegate method is not be called.
```
func splitViewController(_ splitViewController: UISplitViewController, collapseSecondary secondaryViewController:UIViewController, onto primaryViewController:UIViewController) -> Bool {
...
}
```
maybe... |
57,699,598 | I have an array as such:
```
$d = [
0 => [
0 => 'lorem',
1 => 'dorem',
3 => '',
4 => 'ipsum'
],
1 => [
0 => 'test',
1 => 'rere',
3 => '',
4 => 'youp'
]
];
```
My issue is that I need to remove empty values from the array. How would I go ... | 2019/08/28 | [
"https://Stackoverflow.com/questions/57699598",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/151438/"
] | For some reason on iOS 13 specifically on the iPad in compact traitCollections the call to the delegate to see if it should collapse is happening BEFORE viewDidLoad is called on the UISplitViewController and so when it makes that call, your delegate is not set, and the method never gets called.
If you're creating your... | ```
override func awakeFromNib() {
super.awakeFromNib()
splitViewController?.delegate = self
splitViewController?.preferredDisplayMode = .allVisible
}
//MARK: Split View Controller Delegate
func splitViewController(_ splitViewController: UISplitViewController, collapseSecondary secondaryViewContr... |
57,699,598 | I have an array as such:
```
$d = [
0 => [
0 => 'lorem',
1 => 'dorem',
3 => '',
4 => 'ipsum'
],
1 => [
0 => 'test',
1 => 'rere',
3 => '',
4 => 'youp'
]
];
```
My issue is that I need to remove empty values from the array. How would I go ... | 2019/08/28 | [
"https://Stackoverflow.com/questions/57699598",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/151438/"
] | I have an Xcode project - now for iOS 13 - that uses a tab bar controller with relationships to five split view controllers, each with their own master detail (table) views and controllers.
Previously - iOS 12.x and earlier, in fact back when I was writing Objective-C - my split view controller delegate was set in cod... | ```
override func awakeFromNib() {
super.awakeFromNib()
splitViewController?.delegate = self
splitViewController?.preferredDisplayMode = .allVisible
}
//MARK: Split View Controller Delegate
func splitViewController(_ splitViewController: UISplitViewController, collapseSecondary secondaryViewContr... |
57,699,598 | I have an array as such:
```
$d = [
0 => [
0 => 'lorem',
1 => 'dorem',
3 => '',
4 => 'ipsum'
],
1 => [
0 => 'test',
1 => 'rere',
3 => '',
4 => 'youp'
]
];
```
My issue is that I need to remove empty values from the array. How would I go ... | 2019/08/28 | [
"https://Stackoverflow.com/questions/57699598",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/151438/"
] | Well, I think the answer should cover the iOS14 now.
If you find the delegate method is not be called.
```
func splitViewController(_ splitViewController: UISplitViewController, collapseSecondary secondaryViewController:UIViewController, onto primaryViewController:UIViewController) -> Bool {
...
}
```
maybe... | ```
override func awakeFromNib() {
super.awakeFromNib()
splitViewController?.delegate = self
splitViewController?.preferredDisplayMode = .allVisible
}
//MARK: Split View Controller Delegate
func splitViewController(_ splitViewController: UISplitViewController, collapseSecondary secondaryViewContr... |
33,328,830 | I have an object which has duplicate values so i used delete new\_object[1] to delete the value but when I see this in console its showing undefined in object 0800
```
["293", undefined, "298", "297"]
``` | 2015/10/25 | [
"https://Stackoverflow.com/questions/33328830",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2647198/"
] | You should use
```
arr.splice(index, 1);
```
`delete` only removes the element, but keeps the indexes. [This question](https://stackoverflow.com/questions/5767325/remove-a-particular-element-from-an-array-in-javascript) is similar in nature and provides more information. | I think you should use *[splice](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/splice)*
```
a = ["1","2","3"];
a.splice(1,0)
console.log(a) //["1","3"]
``` |
33,328,830 | I have an object which has duplicate values so i used delete new\_object[1] to delete the value but when I see this in console its showing undefined in object 0800
```
["293", undefined, "298", "297"]
``` | 2015/10/25 | [
"https://Stackoverflow.com/questions/33328830",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2647198/"
] | You should use
```
arr.splice(index, 1);
```
`delete` only removes the element, but keeps the indexes. [This question](https://stackoverflow.com/questions/5767325/remove-a-particular-element-from-an-array-in-javascript) is similar in nature and provides more information. | var test = [1,2,3,4];
delete test[1];
now if you print the test variable, you will get
=> [ 1, , 3, 4 ]
================
that is why you have got undefined
like everyone here is answering, you should use splice
test.splice(1,1);
and now print the test variable will give you
=> [ 1, 3, 4, 5 ]
================= |
33,328,830 | I have an object which has duplicate values so i used delete new\_object[1] to delete the value but when I see this in console its showing undefined in object 0800
```
["293", undefined, "298", "297"]
``` | 2015/10/25 | [
"https://Stackoverflow.com/questions/33328830",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2647198/"
] | You should use
```
arr.splice(index, 1);
```
`delete` only removes the element, but keeps the indexes. [This question](https://stackoverflow.com/questions/5767325/remove-a-particular-element-from-an-array-in-javascript) is similar in nature and provides more information. | you need to use **splice()** in order to remove the value from the array. What you are doing is simply setting it to undefined.
```
var myArray = ['295', '296', '297', '298'];
// removes 1 element from index 2
var removed = myArray.splice(2, 1);
// myArray is ['295', '296', '298'];
// removed is ['297']
```
**Refer... |
60,628,230 | I am using the MongoDB shell to execute the query in the below query.
```
db.analytics.aggregate(
[{ "$match": { "community": ObjectId("5e1ad5b6910a72a9bd02ccc8") } },
{
"$project": {
"_id": 1, "date": 1, "week": { "$week": "$date" },
"total": { "$add": ["$data.postCount", "$dat... | 2020/03/11 | [
"https://Stackoverflow.com/questions/60628230",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11160365/"
] | Simply add `[nzData]="['']"` to your subtable
This messag is visible when `nzData` is empty in `nz-table`
```
<nz-table [nzData]="['']">
<thead>
<tr>
<th nzWidth="25%">Location Code</th>
<th nzWidth="25%">Location Description</th>
<th nzWidth="25%">Device Code</th>
<th nzWidth="25%">Device Descri... | Just add `nzTemplateMode` to your nz-table
```
<nz-table nzTemplateMode>
<thead>
<tr>
<th>Company</th>
<th>Contact</th>
<th>Country</th>
</tr>
</thead>
<tbody>
<tr>
<td>Alfreds Futterkiste</td>
<td>Maria Anders</td>
<td>Germany</td>
</tr>
</tbody>
</nz-table... |
47,519,945 | For example, if I have a decimal of 10.205 and I subtracted 0.305 of it, then it should be displayed as 09.900 instead of 9.9, as all unnecessary digits before and after should become zeros.
So maybe it would be good having a method that will calculate 10205 - 305 (= 9900) and then return a converted decimal string "0... | 2017/11/27 | [
"https://Stackoverflow.com/questions/47519945",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7003760/"
] | If I write this code:
```
decimal x = 10.205m;
decimal y = 0.305m;
decimal z = x - y;
Console.WriteLine(z);
```
The output is `9.900`. No need to do anything special.
Now, if I do `decimal.GetBits(z)` on the above `z` I get `int[] { 9900, 0, 0, 196608 }`.
But, if I redefine `z` as `z = 9.9` and do a `decimal.Get... | I built this Extension method:
```
public static decimal getDecimalFixed(decimal amount, decimal subtract)
{
var parts = amount.ToString().Split('.');
decimal sum = amount - subtract;
// get's a string of zeros using the same amount of digits
string part1zeros = new String('0', parts[0].Length);
... |
15,090,942 | I have a tag A in which when clicked on, it appends another tag B to perform an action B on click. So when I click on tag B, action B is performed. However, the `.on` method does not seems to be working on the dynamically created tag B.
My html and jquery for tag A is as below:
```
<a id="address" class="add_address... | 2013/02/26 | [
"https://Stackoverflow.com/questions/15090942",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/992618/"
] | You have to add the selector parameter, otherwise the event is directly bound instead of delegated, which only works if the element already exists (so it doesn't work for dynamically loaded content).
See <http://api.jquery.com/on/#direct-and-delegated-events>
Change your code to
```
$(document.body).on('click', '.up... | You are missing the selector in the `.on` function:
```
.on(eventType, selector, function)
```
This selector is very important!
<http://api.jquery.com/on/>
>
> If new HTML is being injected into the page, select the elements and
> attach event handlers after the new HTML is placed into the page. Or,
> **use del... |
5,132 | What is the quickest and best way to export a plot image from Mathematica to a $\LaTeX$ Editor? Is there something quicker than exporting it to an image and then including it in the $\LaTeX$ document? | 2012/05/04 | [
"https://mathematica.stackexchange.com/questions/5132",
"https://mathematica.stackexchange.com",
"https://mathematica.stackexchange.com/users/1148/"
] | The absolutely fastest way I know to get high-quality `latex` output is:
* Make sure you use **LyX** as the editor (<http://www.lyx.org/>)
* In MMA, highlight the plot, select "Copy as ... PDF" from the `Edit` menu
* In Lyx, paste wherever you want, that's it.
* The `PDF` will be saved under a default numbered file na... | The way I do this is by creating a directory structure like the following:
```none
project
project/figures
```
The LaTeX file is in `project`, the figures are in `figures`. I put the notebook(s) used to generate the figures in `project` as well, but you can make a separate directory for them.
The notebooks start wi... |
5,132 | What is the quickest and best way to export a plot image from Mathematica to a $\LaTeX$ Editor? Is there something quicker than exporting it to an image and then including it in the $\LaTeX$ document? | 2012/05/04 | [
"https://mathematica.stackexchange.com/questions/5132",
"https://mathematica.stackexchange.com",
"https://mathematica.stackexchange.com/users/1148/"
] | One way to speed up the workflow is to batch process all your images and even formulas if you have many. Basically do all your work in the *Mathematica* notebook placing distinct graphics, formulas and text in separate cells. Then choose **File > Save As...** and pick **LaTeX Document (\*.tex)** from the drop down menu... | The way I do this is by creating a directory structure like the following:
```none
project
project/figures
```
The LaTeX file is in `project`, the figures are in `figures`. I put the notebook(s) used to generate the figures in `project` as well, but you can make a separate directory for them.
The notebooks start wi... |
5,132 | What is the quickest and best way to export a plot image from Mathematica to a $\LaTeX$ Editor? Is there something quicker than exporting it to an image and then including it in the $\LaTeX$ document? | 2012/05/04 | [
"https://mathematica.stackexchange.com/questions/5132",
"https://mathematica.stackexchange.com",
"https://mathematica.stackexchange.com/users/1148/"
] | I usually `Export` to hi-res PNG bitmaps for ease of use (there are a number of discussions on how best to export high-quality images on this forum. Take a peek at the right column of this page under "Related"). Personally I like notebooks that do not need any mouse-clicking or any other user interaction to produce out... | The way I do this is by creating a directory structure like the following:
```none
project
project/figures
```
The LaTeX file is in `project`, the figures are in `figures`. I put the notebook(s) used to generate the figures in `project` as well, but you can make a separate directory for them.
The notebooks start wi... |
5,132 | What is the quickest and best way to export a plot image from Mathematica to a $\LaTeX$ Editor? Is there something quicker than exporting it to an image and then including it in the $\LaTeX$ document? | 2012/05/04 | [
"https://mathematica.stackexchange.com/questions/5132",
"https://mathematica.stackexchange.com",
"https://mathematica.stackexchange.com/users/1148/"
] | I usually `Export` to hi-res PNG bitmaps for ease of use (there are a number of discussions on how best to export high-quality images on this forum. Take a peek at the right column of this page under "Related"). Personally I like notebooks that do not need any mouse-clicking or any other user interaction to produce out... | If you create a notebook with some plots and then save it as LaTeX, not only will the images all be generated but so will LaTeX code that you can use to include those images. |
5,132 | What is the quickest and best way to export a plot image from Mathematica to a $\LaTeX$ Editor? Is there something quicker than exporting it to an image and then including it in the $\LaTeX$ document? | 2012/05/04 | [
"https://mathematica.stackexchange.com/questions/5132",
"https://mathematica.stackexchange.com",
"https://mathematica.stackexchange.com/users/1148/"
] | If you create a notebook with some plots and then save it as LaTeX, not only will the images all be generated but so will LaTeX code that you can use to include those images. | The way I do this is by creating a directory structure like the following:
```none
project
project/figures
```
The LaTeX file is in `project`, the figures are in `figures`. I put the notebook(s) used to generate the figures in `project` as well, but you can make a separate directory for them.
The notebooks start wi... |
5,132 | What is the quickest and best way to export a plot image from Mathematica to a $\LaTeX$ Editor? Is there something quicker than exporting it to an image and then including it in the $\LaTeX$ document? | 2012/05/04 | [
"https://mathematica.stackexchange.com/questions/5132",
"https://mathematica.stackexchange.com",
"https://mathematica.stackexchange.com/users/1148/"
] | I usually `Export` to hi-res PNG bitmaps for ease of use (there are a number of discussions on how best to export high-quality images on this forum. Take a peek at the right column of this page under "Related"). Personally I like notebooks that do not need any mouse-clicking or any other user interaction to produce out... | One way to speed up the workflow is to batch process all your images and even formulas if you have many. Basically do all your work in the *Mathematica* notebook placing distinct graphics, formulas and text in separate cells. Then choose **File > Save As...** and pick **LaTeX Document (\*.tex)** from the drop down menu... |
5,132 | What is the quickest and best way to export a plot image from Mathematica to a $\LaTeX$ Editor? Is there something quicker than exporting it to an image and then including it in the $\LaTeX$ document? | 2012/05/04 | [
"https://mathematica.stackexchange.com/questions/5132",
"https://mathematica.stackexchange.com",
"https://mathematica.stackexchange.com/users/1148/"
] | I usually `Export` to hi-res PNG bitmaps for ease of use (there are a number of discussions on how best to export high-quality images on this forum. Take a peek at the right column of this page under "Related"). Personally I like notebooks that do not need any mouse-clicking or any other user interaction to produce out... | I just figured out the following workaround imitating the psfrag convenience while avoiding intense programming or additional software:
1. Create a new PlotTheme as described [here](https://mathematica.stackexchange.com/questions/54545/is-it-possible-to-define-a-new-plottheme?newreg=152b31896aa843649f4693beeb69c7a1). ... |
5,132 | What is the quickest and best way to export a plot image from Mathematica to a $\LaTeX$ Editor? Is there something quicker than exporting it to an image and then including it in the $\LaTeX$ document? | 2012/05/04 | [
"https://mathematica.stackexchange.com/questions/5132",
"https://mathematica.stackexchange.com",
"https://mathematica.stackexchange.com/users/1148/"
] | One way to speed up the workflow is to batch process all your images and even formulas if you have many. Basically do all your work in the *Mathematica* notebook placing distinct graphics, formulas and text in separate cells. Then choose **File > Save As...** and pick **LaTeX Document (\*.tex)** from the drop down menu... | I just figured out the following workaround imitating the psfrag convenience while avoiding intense programming or additional software:
1. Create a new PlotTheme as described [here](https://mathematica.stackexchange.com/questions/54545/is-it-possible-to-define-a-new-plottheme?newreg=152b31896aa843649f4693beeb69c7a1). ... |
5,132 | What is the quickest and best way to export a plot image from Mathematica to a $\LaTeX$ Editor? Is there something quicker than exporting it to an image and then including it in the $\LaTeX$ document? | 2012/05/04 | [
"https://mathematica.stackexchange.com/questions/5132",
"https://mathematica.stackexchange.com",
"https://mathematica.stackexchange.com/users/1148/"
] | If you create a notebook with some plots and then save it as LaTeX, not only will the images all be generated but so will LaTeX code that you can use to include those images. | I just figured out the following workaround imitating the psfrag convenience while avoiding intense programming or additional software:
1. Create a new PlotTheme as described [here](https://mathematica.stackexchange.com/questions/54545/is-it-possible-to-define-a-new-plottheme?newreg=152b31896aa843649f4693beeb69c7a1). ... |
5,132 | What is the quickest and best way to export a plot image from Mathematica to a $\LaTeX$ Editor? Is there something quicker than exporting it to an image and then including it in the $\LaTeX$ document? | 2012/05/04 | [
"https://mathematica.stackexchange.com/questions/5132",
"https://mathematica.stackexchange.com",
"https://mathematica.stackexchange.com/users/1148/"
] | The absolutely fastest way I know to get high-quality `latex` output is:
* Make sure you use **LyX** as the editor (<http://www.lyx.org/>)
* In MMA, highlight the plot, select "Copy as ... PDF" from the `Edit` menu
* In Lyx, paste wherever you want, that's it.
* The `PDF` will be saved under a default numbered file na... | I just figured out the following workaround imitating the psfrag convenience while avoiding intense programming or additional software:
1. Create a new PlotTheme as described [here](https://mathematica.stackexchange.com/questions/54545/is-it-possible-to-define-a-new-plottheme?newreg=152b31896aa843649f4693beeb69c7a1). ... |
20,499,334 | i m using the Discrete Bar chart (NVD3 Library) to display chart in my site.
while showing graph everything is fine, but my problem is that how to change the decimal values to integers.
values that are showing in y-axis displaying integer values.
although which array i used to display values having integer values. js... | 2013/12/10 | [
"https://Stackoverflow.com/questions/20499334",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1675130/"
] | use this,
```
chart.yAxis.tickFormat(d3.format(',f'));
```
to convert decimals value into integer for y-axis
```
chart.xAxis.tickFormat(d3.format(',f'));
```
to convert decimals value into integer for x-axis
```
chart.valueFormat(d3.format('d'));
```
to convert decimals value into integer, that takes input by... | You can't do this directly in NVD3, but by selecting the `text` elements manually and changing the text, you can. The following code, run after the chart has been generated, will take care of that.
```
d3.selectAll(".nv-y.nv-axis")
.selectAll("text[text-anchor=end]")
.text(function() { return Math.round(d3.select(... |
20,499,334 | i m using the Discrete Bar chart (NVD3 Library) to display chart in my site.
while showing graph everything is fine, but my problem is that how to change the decimal values to integers.
values that are showing in y-axis displaying integer values.
although which array i used to display values having integer values. js... | 2013/12/10 | [
"https://Stackoverflow.com/questions/20499334",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1675130/"
] | chart.valueFormat(d3.format('d'));
this shows the exact values as in the data table
(it may be integer or float)
to show the exact vale on showValue option you can use
.valueFormat(d3.format('.0')); | You can't do this directly in NVD3, but by selecting the `text` elements manually and changing the text, you can. The following code, run after the chart has been generated, will take care of that.
```
d3.selectAll(".nv-y.nv-axis")
.selectAll("text[text-anchor=end]")
.text(function() { return Math.round(d3.select(... |
20,499,334 | i m using the Discrete Bar chart (NVD3 Library) to display chart in my site.
while showing graph everything is fine, but my problem is that how to change the decimal values to integers.
values that are showing in y-axis displaying integer values.
although which array i used to display values having integer values. js... | 2013/12/10 | [
"https://Stackoverflow.com/questions/20499334",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1675130/"
] | Further to answer by @moaz-ateeq, in [angular-nvd3](http://krispo.github.io/angular-nvd3/#/) this would look like
```
yAxis: {
tickFormat: function(d){ return d3.format(',f')(d) }
}
``` | You can't do this directly in NVD3, but by selecting the `text` elements manually and changing the text, you can. The following code, run after the chart has been generated, will take care of that.
```
d3.selectAll(".nv-y.nv-axis")
.selectAll("text[text-anchor=end]")
.text(function() { return Math.round(d3.select(... |
20,499,334 | i m using the Discrete Bar chart (NVD3 Library) to display chart in my site.
while showing graph everything is fine, but my problem is that how to change the decimal values to integers.
values that are showing in y-axis displaying integer values.
although which array i used to display values having integer values. js... | 2013/12/10 | [
"https://Stackoverflow.com/questions/20499334",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1675130/"
] | use this,
```
chart.yAxis.tickFormat(d3.format(',f'));
```
to convert decimals value into integer for y-axis
```
chart.xAxis.tickFormat(d3.format(',f'));
```
to convert decimals value into integer for x-axis
```
chart.valueFormat(d3.format('d'));
```
to convert decimals value into integer, that takes input by... | chart.valueFormat(d3.format('d'));
this shows the exact values as in the data table
(it may be integer or float)
to show the exact vale on showValue option you can use
.valueFormat(d3.format('.0')); |
20,499,334 | i m using the Discrete Bar chart (NVD3 Library) to display chart in my site.
while showing graph everything is fine, but my problem is that how to change the decimal values to integers.
values that are showing in y-axis displaying integer values.
although which array i used to display values having integer values. js... | 2013/12/10 | [
"https://Stackoverflow.com/questions/20499334",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1675130/"
] | use this,
```
chart.yAxis.tickFormat(d3.format(',f'));
```
to convert decimals value into integer for y-axis
```
chart.xAxis.tickFormat(d3.format(',f'));
```
to convert decimals value into integer for x-axis
```
chart.valueFormat(d3.format('d'));
```
to convert decimals value into integer, that takes input by... | Further to answer by @moaz-ateeq, in [angular-nvd3](http://krispo.github.io/angular-nvd3/#/) this would look like
```
yAxis: {
tickFormat: function(d){ return d3.format(',f')(d) }
}
``` |
52,381,172 | INTRO:
FIRST: I Know about [How to fix "Headers already sent" error in PHP](https://stackoverflow.com/questions/8028957/how-to-fix-headers-already-sent-error-in-php)
My question isn't about why it doesn't work. I know why it doesn't work, there is output before header();. My question is why it works for a guy in a YT ... | 2018/09/18 | [
"https://Stackoverflow.com/questions/52381172",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10179563/"
] | that error only occurs when something is sent back to the browser **before** you try to send headers.
You have multiple php tags at the top of your page, there's white space between them. Also, you are sending text back in your header file.
copying your code straight out of your post, there is a space between your 2... | Why we get this type error
```
Cannot modify header information - headers already sent by
```
1. New line characters or spaces are before `<?php`
**Solution:** Remove everything before `<?php`
2. BOM (Byte-Order-Mark ) in `utf-8 encoded` PHP files
**Solution:** Change the file encoding to "without BOM" (e.g. usin... |
52,381,172 | INTRO:
FIRST: I Know about [How to fix "Headers already sent" error in PHP](https://stackoverflow.com/questions/8028957/how-to-fix-headers-already-sent-error-in-php)
My question isn't about why it doesn't work. I know why it doesn't work, there is output before header();. My question is why it works for a guy in a YT ... | 2018/09/18 | [
"https://Stackoverflow.com/questions/52381172",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10179563/"
] | that error only occurs when something is sent back to the browser **before** you try to send headers.
You have multiple php tags at the top of your page, there's white space between them. Also, you are sending text back in your header file.
copying your code straight out of your post, there is a space between your 2... | You can use [output buffering control](http://php.net/manual/en/book.outcontrol.php) to prevent header being sent out prematurely. The video you reference probably used it. Or else he has to use it to make it functional.
For example,
```php
<?php
ob_start(); // start buffering all "echo" to an output buffer
?>
<htm... |
52,381,172 | INTRO:
FIRST: I Know about [How to fix "Headers already sent" error in PHP](https://stackoverflow.com/questions/8028957/how-to-fix-headers-already-sent-error-in-php)
My question isn't about why it doesn't work. I know why it doesn't work, there is output before header();. My question is why it works for a guy in a YT ... | 2018/09/18 | [
"https://Stackoverflow.com/questions/52381172",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10179563/"
] | that error only occurs when something is sent back to the browser **before** you try to send headers.
You have multiple php tags at the top of your page, there's white space between them. Also, you are sending text back in your header file.
copying your code straight out of your post, there is a space between your 2... | So to sum up we couldn't figure out, why it works for the guy in the video. Thank you everyone for trying to figure it out. Theories are:
1. He edited to video so it seemed it worked with this version of the code
2. There is and ob\_start(); and ob\_end\_flush(); somewhere in the code and it isn't visible in the video |
52,381,172 | INTRO:
FIRST: I Know about [How to fix "Headers already sent" error in PHP](https://stackoverflow.com/questions/8028957/how-to-fix-headers-already-sent-error-in-php)
My question isn't about why it doesn't work. I know why it doesn't work, there is output before header();. My question is why it works for a guy in a YT ... | 2018/09/18 | [
"https://Stackoverflow.com/questions/52381172",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10179563/"
] | You can use [output buffering control](http://php.net/manual/en/book.outcontrol.php) to prevent header being sent out prematurely. The video you reference probably used it. Or else he has to use it to make it functional.
For example,
```php
<?php
ob_start(); // start buffering all "echo" to an output buffer
?>
<htm... | Why we get this type error
```
Cannot modify header information - headers already sent by
```
1. New line characters or spaces are before `<?php`
**Solution:** Remove everything before `<?php`
2. BOM (Byte-Order-Mark ) in `utf-8 encoded` PHP files
**Solution:** Change the file encoding to "without BOM" (e.g. usin... |
52,381,172 | INTRO:
FIRST: I Know about [How to fix "Headers already sent" error in PHP](https://stackoverflow.com/questions/8028957/how-to-fix-headers-already-sent-error-in-php)
My question isn't about why it doesn't work. I know why it doesn't work, there is output before header();. My question is why it works for a guy in a YT ... | 2018/09/18 | [
"https://Stackoverflow.com/questions/52381172",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10179563/"
] | You can use [output buffering control](http://php.net/manual/en/book.outcontrol.php) to prevent header being sent out prematurely. The video you reference probably used it. Or else he has to use it to make it functional.
For example,
```php
<?php
ob_start(); // start buffering all "echo" to an output buffer
?>
<htm... | So to sum up we couldn't figure out, why it works for the guy in the video. Thank you everyone for trying to figure it out. Theories are:
1. He edited to video so it seemed it worked with this version of the code
2. There is and ob\_start(); and ob\_end\_flush(); somewhere in the code and it isn't visible in the video |
1,449,927 | I have in my crontab the following
`15 */4 * * * ...`
My original intent was that I would run ... every 4 hours from when the computer boots up. If I power on at 8 am, it would run at 8, 12, 16, 20, ...; if I power on at 9am it would run at 9, 13, 17, 21, ...
My observation is that crontab seems to divide the hour b... | 2023/01/12 | [
"https://askubuntu.com/questions/1449927",
"https://askubuntu.com",
"https://askubuntu.com/users/1029729/"
] | This is something that might more easily be done on current Ubuntu systems using a [systemd timer](https://www.freedesktop.org/software/systemd/man/systemd.timer.html#).
Following the [monotonic timer](https://wiki.archlinux.org/title/Systemd/Timers#Monotonic_timer) example in the [archlinux wiki](https://wiki.archlin... | The number after `/` is called a step value and it starts counting from hour `00` to hour `23` for hours ... So:
```
15 */4 * * * ...
```
translates to *at minute 15 past every 4th hour starting from hour `00`* ... **not** from reboot.
You might want:
```
@reboot sleep 4h ...
```
That is wait for 4 hours after... |
1,449,927 | I have in my crontab the following
`15 */4 * * * ...`
My original intent was that I would run ... every 4 hours from when the computer boots up. If I power on at 8 am, it would run at 8, 12, 16, 20, ...; if I power on at 9am it would run at 9, 13, 17, 21, ...
My observation is that crontab seems to divide the hour b... | 2023/01/12 | [
"https://askubuntu.com/questions/1449927",
"https://askubuntu.com",
"https://askubuntu.com/users/1029729/"
] | The number after `/` is called a step value and it starts counting from hour `00` to hour `23` for hours ... So:
```
15 */4 * * * ...
```
translates to *at minute 15 past every 4th hour starting from hour `00`* ... **not** from reboot.
You might want:
```
@reboot sleep 4h ...
```
That is wait for 4 hours after... | Have you considered the use of at as a scheduler?
At boot time, run a script that schedules an 'at' job four hours hence and passes the time it ran to something the at job can read (e.g. a file somewhere, e.g. within the at job itself, e.g. a parameter passed to the 'at' job, there are many ways you can pass the param... |
1,449,927 | I have in my crontab the following
`15 */4 * * * ...`
My original intent was that I would run ... every 4 hours from when the computer boots up. If I power on at 8 am, it would run at 8, 12, 16, 20, ...; if I power on at 9am it would run at 9, 13, 17, 21, ...
My observation is that crontab seems to divide the hour b... | 2023/01/12 | [
"https://askubuntu.com/questions/1449927",
"https://askubuntu.com",
"https://askubuntu.com/users/1029729/"
] | This is something that might more easily be done on current Ubuntu systems using a [systemd timer](https://www.freedesktop.org/software/systemd/man/systemd.timer.html#).
Following the [monotonic timer](https://wiki.archlinux.org/title/Systemd/Timers#Monotonic_timer) example in the [archlinux wiki](https://wiki.archlin... | Have you considered the use of at as a scheduler?
At boot time, run a script that schedules an 'at' job four hours hence and passes the time it ran to something the at job can read (e.g. a file somewhere, e.g. within the at job itself, e.g. a parameter passed to the 'at' job, there are many ways you can pass the param... |
18,031,842 | I am writing a select statement to fetch some records i am interested in but the `OR` statement should come last in the pecking order and should be there to improve the other conditions specified.
In this statement for instance
```
select * from the_temp where the_temp_club_id = 1 OR 2 OR 3 OR 4 AND the_temp_membersh... | 2013/08/03 | [
"https://Stackoverflow.com/questions/18031842",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2420583/"
] | you could use `IN` better then `OR`
```
where the_temp_club_id in ( 1,2,3,4)
AND the_temp_membership_year=2000 AND the_temp_name='one'
``` | ```
select * from the_temp where (the_temp_club_id = 1 OR the_temp_club_id = 2 OR the_temp_club_id= 3 OR the_temp_club_id = 4) AND the_temp_membership_year=2000 AND the_temp_name='one';
```
Try This |
18,031,842 | I am writing a select statement to fetch some records i am interested in but the `OR` statement should come last in the pecking order and should be there to improve the other conditions specified.
In this statement for instance
```
select * from the_temp where the_temp_club_id = 1 OR 2 OR 3 OR 4 AND the_temp_membersh... | 2013/08/03 | [
"https://Stackoverflow.com/questions/18031842",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2420583/"
] | you could use `IN` better then `OR`
```
where the_temp_club_id in ( 1,2,3,4)
AND the_temp_membership_year=2000 AND the_temp_name='one'
``` | Here is [Working example](http://www.sqlfiddle.com/#!2/67037/1)
```
SELECT * FROM THE_TEMP
WHERE THE_TEMP_CLUB_ID IN (1, 2, 3,4)
AND THE_TEMP_MEMBERSHIP_YEAR = 2000
AND THE_TEMP_NAME = 'one';
``` |
18,031,842 | I am writing a select statement to fetch some records i am interested in but the `OR` statement should come last in the pecking order and should be there to improve the other conditions specified.
In this statement for instance
```
select * from the_temp where the_temp_club_id = 1 OR 2 OR 3 OR 4 AND the_temp_membersh... | 2013/08/03 | [
"https://Stackoverflow.com/questions/18031842",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2420583/"
] | you could use `IN` better then `OR`
```
where the_temp_club_id in ( 1,2,3,4)
AND the_temp_membership_year=2000 AND the_temp_name='one'
``` | >
> The select statement should show all the records where the\_temp\_name = one only and the other conditions should be secondary.
>
>
>
So you want to select all records where `the_temp_name = one` or records with other conditions. You are probably looking for this:
```
SELECT * FROM the_temp
WHERE the_temp_na... |
18,031,842 | I am writing a select statement to fetch some records i am interested in but the `OR` statement should come last in the pecking order and should be there to improve the other conditions specified.
In this statement for instance
```
select * from the_temp where the_temp_club_id = 1 OR 2 OR 3 OR 4 AND the_temp_membersh... | 2013/08/03 | [
"https://Stackoverflow.com/questions/18031842",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2420583/"
] | Here is [Working example](http://www.sqlfiddle.com/#!2/67037/1)
```
SELECT * FROM THE_TEMP
WHERE THE_TEMP_CLUB_ID IN (1, 2, 3,4)
AND THE_TEMP_MEMBERSHIP_YEAR = 2000
AND THE_TEMP_NAME = 'one';
``` | ```
select * from the_temp where (the_temp_club_id = 1 OR the_temp_club_id = 2 OR the_temp_club_id= 3 OR the_temp_club_id = 4) AND the_temp_membership_year=2000 AND the_temp_name='one';
```
Try This |
18,031,842 | I am writing a select statement to fetch some records i am interested in but the `OR` statement should come last in the pecking order and should be there to improve the other conditions specified.
In this statement for instance
```
select * from the_temp where the_temp_club_id = 1 OR 2 OR 3 OR 4 AND the_temp_membersh... | 2013/08/03 | [
"https://Stackoverflow.com/questions/18031842",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2420583/"
] | >
> The select statement should show all the records where the\_temp\_name = one only and the other conditions should be secondary.
>
>
>
So you want to select all records where `the_temp_name = one` or records with other conditions. You are probably looking for this:
```
SELECT * FROM the_temp
WHERE the_temp_na... | ```
select * from the_temp where (the_temp_club_id = 1 OR the_temp_club_id = 2 OR the_temp_club_id= 3 OR the_temp_club_id = 4) AND the_temp_membership_year=2000 AND the_temp_name='one';
```
Try This |
53,957,037 | I have added swiftLint to my Project and also added .swiftlint.yml file with all rules but some of rule of file not working in my project like excluded and line length. i want to exclude pod from Linting so i have added following code in .swiftlint.yml file
`excluded: # paths to ignore during linting. Takes precedence... | 2018/12/28 | [
"https://Stackoverflow.com/questions/53957037",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6030528/"
] | I can't really understand what do you want to achieve, however, I want to note:
1. Within the callback function you can check the condition of your values.
2. Return the values. At the moment you are not returning anything, and probably you are have an array with `undefined` values | You can use ternary operator like below for cleaner code
```
let results = dates.filter(e => {
return (
is_filter_by_arrival_date ?
// verify your condition for arrival date
e.arrival_date <= arrival_to && e.arrival_date >= arrival_to
:
true
) && (
is_filter_by_dept_date ?
// verify... |
53,957,037 | I have added swiftLint to my Project and also added .swiftlint.yml file with all rules but some of rule of file not working in my project like excluded and line length. i want to exclude pod from Linting so i have added following code in .swiftlint.yml file
`excluded: # paths to ignore during linting. Takes precedence... | 2018/12/28 | [
"https://Stackoverflow.com/questions/53957037",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6030528/"
] | I can't really understand what do you want to achieve, however, I want to note:
1. Within the callback function you can check the condition of your values.
2. Return the values. At the moment you are not returning anything, and probably you are have an array with `undefined` values | ```
let results = dates.filter(e => {
if(is_filter_by_arrival_date && is_filter_by_dept_date){
return ( e.arrival_date <= arrival_to && e.arrival_date >= arrival_from &&
e.departure_date <= dept_to && e.departure_date > = dept_from);
}
else if(is_filter_by_arrival_date){
return e.arrival_date... |
53,957,037 | I have added swiftLint to my Project and also added .swiftlint.yml file with all rules but some of rule of file not working in my project like excluded and line length. i want to exclude pod from Linting so i have added following code in .swiftlint.yml file
`excluded: # paths to ignore during linting. Takes precedence... | 2018/12/28 | [
"https://Stackoverflow.com/questions/53957037",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6030528/"
] | I can't really understand what do you want to achieve, however, I want to note:
1. Within the callback function you can check the condition of your values.
2. Return the values. At the moment you are not returning anything, and probably you are have an array with `undefined` values | Just add the other filter as well? Also `e.arrival_date <= arrival_to && e.arrival_date >= arrival_to` is the same as `e.arrival_date === arrival_to`, since only that exact date can match. A date can never be both > and < than another date at the same time. So somthing like this might work:
```js
const dates = [
{a... |
53,957,037 | I have added swiftLint to my Project and also added .swiftlint.yml file with all rules but some of rule of file not working in my project like excluded and line length. i want to exclude pod from Linting so i have added following code in .swiftlint.yml file
`excluded: # paths to ignore during linting. Takes precedence... | 2018/12/28 | [
"https://Stackoverflow.com/questions/53957037",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6030528/"
] | I can't really understand what do you want to achieve, however, I want to note:
1. Within the callback function you can check the condition of your values.
2. Return the values. At the moment you are not returning anything, and probably you are have an array with `undefined` values | Just use some boolean algebra. `bypass || condition` will evaluate to true if `bypass` is set, otherwise whatever `condition` is:
```
const result = dates.filter(({ arrivalDate, departureDate }) => {
const arrivalFits = arrivalDate <= arrivalTo && arrivalDate >= arrivalTo;
const departureFits = departureDate... |
2,503,026 | >
> Claim:
> $$\sum\_{k=0}^{n} \frac{x^k}{k!} < e^x, \qquad \forall x > 0$$
>
>
>
Proof:
Let $f(x)=e^x$. Then the Taylor series gives
$$f(x) = \sum\_{k=0}^{\infty} \frac{x^k}{k!}$$
$$= \sum\_{k=0}^{n} \frac{x^k}{k!} + \sum\_{k=n+1}^{\infty} \frac{x^k}{k!}$$
Now, because $x>0$, $$\sum\_{n+1}^{\infty} \frac{x^... | 2017/11/03 | [
"https://math.stackexchange.com/questions/2503026",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/396746/"
] | I guess we agree on $
e^{a + i \phi} = e^{a} \cdot e^{i \phi}
$. So let's look at the latter term with imaginary exponents.
Imaginary exponents are indeed of a different quality then real ones. Maybe your best approach is to realize that the justification for the "magic" Euler equation
$$
e^{i \phi} = \cos(\phi) + i ... | Actually, I think your fundamental mistake is to think too fundamentally without thinking more fundamentally :P. The problem is deep rooted in how we define exponentiation.
This used to confuse me for some time :) I hope this answer helps you and anybody else that might stumble upon my answer!
A Simpler Problem
====... |
2,503,026 | >
> Claim:
> $$\sum\_{k=0}^{n} \frac{x^k}{k!} < e^x, \qquad \forall x > 0$$
>
>
>
Proof:
Let $f(x)=e^x$. Then the Taylor series gives
$$f(x) = \sum\_{k=0}^{\infty} \frac{x^k}{k!}$$
$$= \sum\_{k=0}^{n} \frac{x^k}{k!} + \sum\_{k=n+1}^{\infty} \frac{x^k}{k!}$$
Now, because $x>0$, $$\sum\_{n+1}^{\infty} \frac{x^... | 2017/11/03 | [
"https://math.stackexchange.com/questions/2503026",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/396746/"
] | I think it would be helpful for you to let go of the idea (at least in complex analysis) that $a^b$ means multiplying $a$ $b$ times by itself. Rather, exponentiation starts at the function $\exp : \mathbb C \to \mathbb C$, which you probably usually denote as $\exp(a) = e^a$. Then (once you have chosen a branch of the ... | >
> $x^n$ is just $n$ multiplications of $x$
>
>
>
This is not *understanding exponentiation*; it is merely the reduction of exponentiation into other terms.
Reducing new concepts (in special cases) to familiar terms is a common *first step* to understanding something, but one eventually needs to proceed from the... |
2,503,026 | >
> Claim:
> $$\sum\_{k=0}^{n} \frac{x^k}{k!} < e^x, \qquad \forall x > 0$$
>
>
>
Proof:
Let $f(x)=e^x$. Then the Taylor series gives
$$f(x) = \sum\_{k=0}^{\infty} \frac{x^k}{k!}$$
$$= \sum\_{k=0}^{n} \frac{x^k}{k!} + \sum\_{k=n+1}^{\infty} \frac{x^k}{k!}$$
Now, because $x>0$, $$\sum\_{n+1}^{\infty} \frac{x^... | 2017/11/03 | [
"https://math.stackexchange.com/questions/2503026",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/396746/"
] | I guess we agree on $
e^{a + i \phi} = e^{a} \cdot e^{i \phi}
$. So let's look at the latter term with imaginary exponents.
Imaginary exponents are indeed of a different quality then real ones. Maybe your best approach is to realize that the justification for the "magic" Euler equation
$$
e^{i \phi} = \cos(\phi) + i ... | >
> $x^n$ is just $n$ multiplications of $x$
>
>
>
This is not *understanding exponentiation*; it is merely the reduction of exponentiation into other terms.
Reducing new concepts (in special cases) to familiar terms is a common *first step* to understanding something, but one eventually needs to proceed from the... |
2,503,026 | >
> Claim:
> $$\sum\_{k=0}^{n} \frac{x^k}{k!} < e^x, \qquad \forall x > 0$$
>
>
>
Proof:
Let $f(x)=e^x$. Then the Taylor series gives
$$f(x) = \sum\_{k=0}^{\infty} \frac{x^k}{k!}$$
$$= \sum\_{k=0}^{n} \frac{x^k}{k!} + \sum\_{k=n+1}^{\infty} \frac{x^k}{k!}$$
Now, because $x>0$, $$\sum\_{n+1}^{\infty} \frac{x^... | 2017/11/03 | [
"https://math.stackexchange.com/questions/2503026",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/396746/"
] | I think it would be helpful for you to let go of the idea (at least in complex analysis) that $a^b$ means multiplying $a$ $b$ times by itself. Rather, exponentiation starts at the function $\exp : \mathbb C \to \mathbb C$, which you probably usually denote as $\exp(a) = e^a$. Then (once you have chosen a branch of the ... | Actually, I think your fundamental mistake is to think too fundamentally without thinking more fundamentally :P. The problem is deep rooted in how we define exponentiation.
This used to confuse me for some time :) I hope this answer helps you and anybody else that might stumble upon my answer!
A Simpler Problem
====... |
2,503,026 | >
> Claim:
> $$\sum\_{k=0}^{n} \frac{x^k}{k!} < e^x, \qquad \forall x > 0$$
>
>
>
Proof:
Let $f(x)=e^x$. Then the Taylor series gives
$$f(x) = \sum\_{k=0}^{\infty} \frac{x^k}{k!}$$
$$= \sum\_{k=0}^{n} \frac{x^k}{k!} + \sum\_{k=n+1}^{\infty} \frac{x^k}{k!}$$
Now, because $x>0$, $$\sum\_{n+1}^{\infty} \frac{x^... | 2017/11/03 | [
"https://math.stackexchange.com/questions/2503026",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/396746/"
] | In brief: thinking of exponentiation as repeated multiplication is equivalent to the identity $a^{m+n}=a^ma^n$. But focusing on the latter equation instead of the former concept allows us to expand exponentiation beyond the concept of "multiply the base $n$ times", to negative, rational, real, and complex exponents. As... | Actually, I think your fundamental mistake is to think too fundamentally without thinking more fundamentally :P. The problem is deep rooted in how we define exponentiation.
This used to confuse me for some time :) I hope this answer helps you and anybody else that might stumble upon my answer!
A Simpler Problem
====... |
2,503,026 | >
> Claim:
> $$\sum\_{k=0}^{n} \frac{x^k}{k!} < e^x, \qquad \forall x > 0$$
>
>
>
Proof:
Let $f(x)=e^x$. Then the Taylor series gives
$$f(x) = \sum\_{k=0}^{\infty} \frac{x^k}{k!}$$
$$= \sum\_{k=0}^{n} \frac{x^k}{k!} + \sum\_{k=n+1}^{\infty} \frac{x^k}{k!}$$
Now, because $x>0$, $$\sum\_{n+1}^{\infty} \frac{x^... | 2017/11/03 | [
"https://math.stackexchange.com/questions/2503026",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/396746/"
] | >
> $x^n$ is just $n$ multiplications of $x$
>
>
>
This is not *understanding exponentiation*; it is merely the reduction of exponentiation into other terms.
Reducing new concepts (in special cases) to familiar terms is a common *first step* to understanding something, but one eventually needs to proceed from the... | Actually, I think your fundamental mistake is to think too fundamentally without thinking more fundamentally :P. The problem is deep rooted in how we define exponentiation.
This used to confuse me for some time :) I hope this answer helps you and anybody else that might stumble upon my answer!
A Simpler Problem
====... |
2,503,026 | >
> Claim:
> $$\sum\_{k=0}^{n} \frac{x^k}{k!} < e^x, \qquad \forall x > 0$$
>
>
>
Proof:
Let $f(x)=e^x$. Then the Taylor series gives
$$f(x) = \sum\_{k=0}^{\infty} \frac{x^k}{k!}$$
$$= \sum\_{k=0}^{n} \frac{x^k}{k!} + \sum\_{k=n+1}^{\infty} \frac{x^k}{k!}$$
Now, because $x>0$, $$\sum\_{n+1}^{\infty} \frac{x^... | 2017/11/03 | [
"https://math.stackexchange.com/questions/2503026",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/396746/"
] | In brief: thinking of exponentiation as repeated multiplication is equivalent to the identity $a^{m+n}=a^ma^n$. But focusing on the latter equation instead of the former concept allows us to expand exponentiation beyond the concept of "multiply the base $n$ times", to negative, rational, real, and complex exponents. As... | I guess we agree on $
e^{a + i \phi} = e^{a} \cdot e^{i \phi}
$. So let's look at the latter term with imaginary exponents.
Imaginary exponents are indeed of a different quality then real ones. Maybe your best approach is to realize that the justification for the "magic" Euler equation
$$
e^{i \phi} = \cos(\phi) + i ... |
2,503,026 | >
> Claim:
> $$\sum\_{k=0}^{n} \frac{x^k}{k!} < e^x, \qquad \forall x > 0$$
>
>
>
Proof:
Let $f(x)=e^x$. Then the Taylor series gives
$$f(x) = \sum\_{k=0}^{\infty} \frac{x^k}{k!}$$
$$= \sum\_{k=0}^{n} \frac{x^k}{k!} + \sum\_{k=n+1}^{\infty} \frac{x^k}{k!}$$
Now, because $x>0$, $$\sum\_{n+1}^{\infty} \frac{x^... | 2017/11/03 | [
"https://math.stackexchange.com/questions/2503026",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/396746/"
] | My intuition about this works best when I consider it as manipulating the vector $(1,0)$ on the complex plane by performing two separate actions on it:
1. Scaling it based on the real part (with $\phi=0$ being the identity, positive values stretching it and negative values shrinking it).
2. Rotating it based on the im... | A famous result in mathematics is Euler's Formula: $$e^{i\theta}=i\sin(\theta)+\cos(\theta)$$ Complex exponentials are used to parametize points in the complex plane so a point $$x+iy=re^{i\theta}=r(\cos(\theta)+i\sin(\theta))$$ So the function $e^{i\theta}$ can be viewed as a circle in the complex plane with radius $1... |
2,503,026 | >
> Claim:
> $$\sum\_{k=0}^{n} \frac{x^k}{k!} < e^x, \qquad \forall x > 0$$
>
>
>
Proof:
Let $f(x)=e^x$. Then the Taylor series gives
$$f(x) = \sum\_{k=0}^{\infty} \frac{x^k}{k!}$$
$$= \sum\_{k=0}^{n} \frac{x^k}{k!} + \sum\_{k=n+1}^{\infty} \frac{x^k}{k!}$$
Now, because $x>0$, $$\sum\_{n+1}^{\infty} \frac{x^... | 2017/11/03 | [
"https://math.stackexchange.com/questions/2503026",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/396746/"
] | I guess we agree on $
e^{a + i \phi} = e^{a} \cdot e^{i \phi}
$. So let's look at the latter term with imaginary exponents.
Imaginary exponents are indeed of a different quality then real ones. Maybe your best approach is to realize that the justification for the "magic" Euler equation
$$
e^{i \phi} = \cos(\phi) + i ... | My intuition about this works best when I consider it as manipulating the vector $(1,0)$ on the complex plane by performing two separate actions on it:
1. Scaling it based on the real part (with $\phi=0$ being the identity, positive values stretching it and negative values shrinking it).
2. Rotating it based on the im... |
2,503,026 | >
> Claim:
> $$\sum\_{k=0}^{n} \frac{x^k}{k!} < e^x, \qquad \forall x > 0$$
>
>
>
Proof:
Let $f(x)=e^x$. Then the Taylor series gives
$$f(x) = \sum\_{k=0}^{\infty} \frac{x^k}{k!}$$
$$= \sum\_{k=0}^{n} \frac{x^k}{k!} + \sum\_{k=n+1}^{\infty} \frac{x^k}{k!}$$
Now, because $x>0$, $$\sum\_{n+1}^{\infty} \frac{x^... | 2017/11/03 | [
"https://math.stackexchange.com/questions/2503026",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/396746/"
] | In brief: thinking of exponentiation as repeated multiplication is equivalent to the identity $a^{m+n}=a^ma^n$. But focusing on the latter equation instead of the former concept allows us to expand exponentiation beyond the concept of "multiply the base $n$ times", to negative, rational, real, and complex exponents. As... | A famous result in mathematics is Euler's Formula: $$e^{i\theta}=i\sin(\theta)+\cos(\theta)$$ Complex exponentials are used to parametize points in the complex plane so a point $$x+iy=re^{i\theta}=r(\cos(\theta)+i\sin(\theta))$$ So the function $e^{i\theta}$ can be viewed as a circle in the complex plane with radius $1... |
40,184,918 | I was about to use the existing Serilog's SQL Server sink but I realized that the latest pre-release and stable versions do not support ASP.NET Core.
Is there an alternative to this sink? What am I supposed to do? Should I write a new sink? | 2016/10/21 | [
"https://Stackoverflow.com/questions/40184918",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/89558/"
] | I can't tell you what you're *supposed* do, but I can describe a couple options. The Sql Server Serilog provider on GitHub would be a better place to ask the question of what they *intend* to do.
Serilog is indeed on the .Net Core train, as many, many other mainstream .Net projects are. You are correct that as of toda... | I guess the question is not really technical, but rather a philosophical one, then I do not propose an answer, but consideration:
In my humble opinion, Microsoft with its Silverlight killing, UWP orientation and "escape to clouds", admitted defeat of its entire concept of proprietary software development, so liberatio... |
40,184,918 | I was about to use the existing Serilog's SQL Server sink but I realized that the latest pre-release and stable versions do not support ASP.NET Core.
Is there an alternative to this sink? What am I supposed to do? Should I write a new sink? | 2016/10/21 | [
"https://Stackoverflow.com/questions/40184918",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/89558/"
] | The [Serilog sink for SQL Server](https://github.com/serilog/serilog-sinks-mssqlserver) depends on some types not yet in .NET Core. Work started to refactor the sink and remove the dependencies, but since then, the types in question have been added to the next .NET Core version:
<https://github.com/dotnet/corefx/pull/... | I guess the question is not really technical, but rather a philosophical one, then I do not propose an answer, but consideration:
In my humble opinion, Microsoft with its Silverlight killing, UWP orientation and "escape to clouds", admitted defeat of its entire concept of proprietary software development, so liberatio... |
40,184,918 | I was about to use the existing Serilog's SQL Server sink but I realized that the latest pre-release and stable versions do not support ASP.NET Core.
Is there an alternative to this sink? What am I supposed to do? Should I write a new sink? | 2016/10/21 | [
"https://Stackoverflow.com/questions/40184918",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/89558/"
] | The [Serilog sink for SQL Server](https://github.com/serilog/serilog-sinks-mssqlserver) depends on some types not yet in .NET Core. Work started to refactor the sink and remove the dependencies, but since then, the types in question have been added to the next .NET Core version:
<https://github.com/dotnet/corefx/pull/... | I can't tell you what you're *supposed* do, but I can describe a couple options. The Sql Server Serilog provider on GitHub would be a better place to ask the question of what they *intend* to do.
Serilog is indeed on the .Net Core train, as many, many other mainstream .Net projects are. You are correct that as of toda... |
39,884,559 | The [Apple docs](https://developer.apple.com/library/content/releasenotes/General/ValidateAppStoreReceipt/Chapters/ValidateLocally.html) on receipt validation say to perform receipt validation immediately after launch. This amounts to checking for data at the path returned by `[[NSBundle mainBundle] appStoreRecieptURL]... | 2016/10/05 | [
"https://Stackoverflow.com/questions/39884559",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/412107/"
] | you don't *need* to do so, that is optional only and could be done on iOS7+, if you interested in doing that.
briefly, implementing the validation is purely a **financial** decision, and even if you validate recipes you are recommended not to disable the content in case of failure as the validation could fail in stand... | The reasons I would give are:
1. The user can change their product if you are using subscription groups from outside of your app.
2. An auto-renewing subscription can renew outside of your app.
3. The app does not receive transactions initiated outside of the app until the app restarts.
4. The user can make purchases ... |
39,884,559 | The [Apple docs](https://developer.apple.com/library/content/releasenotes/General/ValidateAppStoreReceipt/Chapters/ValidateLocally.html) on receipt validation say to perform receipt validation immediately after launch. This amounts to checking for data at the path returned by `[[NSBundle mainBundle] appStoreRecieptURL]... | 2016/10/05 | [
"https://Stackoverflow.com/questions/39884559",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/412107/"
] | The reasons I would give are:
1. The user can change their product if you are using subscription groups from outside of your app.
2. An auto-renewing subscription can renew outside of your app.
3. The app does not receive transactions initiated outside of the app until the app restarts.
4. The user can make purchases ... | It's not necessary, but beneficial for the following reasons:
1. You'll always get the definite set of purchased products and not require the user to manually restore the products.
2. You have (limited) fraud protection, especially if you combine local and remote validation.
3. It's way more simple to compute the expi... |
39,884,559 | The [Apple docs](https://developer.apple.com/library/content/releasenotes/General/ValidateAppStoreReceipt/Chapters/ValidateLocally.html) on receipt validation say to perform receipt validation immediately after launch. This amounts to checking for data at the path returned by `[[NSBundle mainBundle] appStoreRecieptURL]... | 2016/10/05 | [
"https://Stackoverflow.com/questions/39884559",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/412107/"
] | you don't *need* to do so, that is optional only and could be done on iOS7+, if you interested in doing that.
briefly, implementing the validation is purely a **financial** decision, and even if you validate recipes you are recommended not to disable the content in case of failure as the validation could fail in stand... | You would generally only validate the receipt to prevent piracy by users who haven't bought your app or if you are using auto renewing subscriptions.
Whilst you can interrogate the receipt for IAP information, its actually easier (and required by app review) to give a button somewhere to "restore previous purchases" a... |
39,884,559 | The [Apple docs](https://developer.apple.com/library/content/releasenotes/General/ValidateAppStoreReceipt/Chapters/ValidateLocally.html) on receipt validation say to perform receipt validation immediately after launch. This amounts to checking for data at the path returned by `[[NSBundle mainBundle] appStoreRecieptURL]... | 2016/10/05 | [
"https://Stackoverflow.com/questions/39884559",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/412107/"
] | You would generally only validate the receipt to prevent piracy by users who haven't bought your app or if you are using auto renewing subscriptions.
Whilst you can interrogate the receipt for IAP information, its actually easier (and required by app review) to give a button somewhere to "restore previous purchases" a... | It's not necessary, but beneficial for the following reasons:
1. You'll always get the definite set of purchased products and not require the user to manually restore the products.
2. You have (limited) fraud protection, especially if you combine local and remote validation.
3. It's way more simple to compute the expi... |
39,884,559 | The [Apple docs](https://developer.apple.com/library/content/releasenotes/General/ValidateAppStoreReceipt/Chapters/ValidateLocally.html) on receipt validation say to perform receipt validation immediately after launch. This amounts to checking for data at the path returned by `[[NSBundle mainBundle] appStoreRecieptURL]... | 2016/10/05 | [
"https://Stackoverflow.com/questions/39884559",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/412107/"
] | you don't *need* to do so, that is optional only and could be done on iOS7+, if you interested in doing that.
briefly, implementing the validation is purely a **financial** decision, and even if you validate recipes you are recommended not to disable the content in case of failure as the validation could fail in stand... | The simple answer to your question is **NO, It is not necessary**.
Here is the **detailed explanation** for you.
1. According to Apple Documentation [here](https://developer.apple.com/library/content/releasenotes/General/ValidateAppStoreReceipt/Introduction.html), apple has given two methods of validating the receipt... |
39,884,559 | The [Apple docs](https://developer.apple.com/library/content/releasenotes/General/ValidateAppStoreReceipt/Chapters/ValidateLocally.html) on receipt validation say to perform receipt validation immediately after launch. This amounts to checking for data at the path returned by `[[NSBundle mainBundle] appStoreRecieptURL]... | 2016/10/05 | [
"https://Stackoverflow.com/questions/39884559",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/412107/"
] | The simple answer to your question is **NO, It is not necessary**.
Here is the **detailed explanation** for you.
1. According to Apple Documentation [here](https://developer.apple.com/library/content/releasenotes/General/ValidateAppStoreReceipt/Introduction.html), apple has given two methods of validating the receipt... | It's not necessary, but beneficial for the following reasons:
1. You'll always get the definite set of purchased products and not require the user to manually restore the products.
2. You have (limited) fraud protection, especially if you combine local and remote validation.
3. It's way more simple to compute the expi... |
39,884,559 | The [Apple docs](https://developer.apple.com/library/content/releasenotes/General/ValidateAppStoreReceipt/Chapters/ValidateLocally.html) on receipt validation say to perform receipt validation immediately after launch. This amounts to checking for data at the path returned by `[[NSBundle mainBundle] appStoreRecieptURL]... | 2016/10/05 | [
"https://Stackoverflow.com/questions/39884559",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/412107/"
] | you don't *need* to do so, that is optional only and could be done on iOS7+, if you interested in doing that.
briefly, implementing the validation is purely a **financial** decision, and even if you validate recipes you are recommended not to disable the content in case of failure as the validation could fail in stand... | It's not necessary, but beneficial for the following reasons:
1. You'll always get the definite set of purchased products and not require the user to manually restore the products.
2. You have (limited) fraud protection, especially if you combine local and remote validation.
3. It's way more simple to compute the expi... |
11,965,097 | I am creating a module of my website where I can display images in "albums", much like facebook.
For storing/grouping images, I planned on having them in the `~/Images` folder inside my application's structure. Is this considered bad practice, or will it open up my application to any security vulnerabilities? I read t... | 2012/08/15 | [
"https://Stackoverflow.com/questions/11965097",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/783284/"
] | Depending on the performance of your server, you may want to consider storing your images into a database using BLOB
<https://dev.mysql.com/doc/refman/5.0/en/blob.html>
Images can be easily sorted, organized, categorized without the need to worry about folder structures and folder permissions. Simply use your PHP/AJA... | Since you can easily as a user check where the images are stored once the application is in production, where you store the images does not matter as much as what permissions you set to the folder(s) that the images are stored in. |
11,965,097 | I am creating a module of my website where I can display images in "albums", much like facebook.
For storing/grouping images, I planned on having them in the `~/Images` folder inside my application's structure. Is this considered bad practice, or will it open up my application to any security vulnerabilities? I read t... | 2012/08/15 | [
"https://Stackoverflow.com/questions/11965097",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/783284/"
] | All three of the answers here are good. There is no preferred storage for uploaded images, it's all up to you based on your requirements.
As [Henhealg says](https://stackoverflow.com/a/11965147/304832), don't store them in App\_Data. If you put them here, they will not be accessible from the web. For example, the foll... | Since you can easily as a user check where the images are stored once the application is in production, where you store the images does not matter as much as what permissions you set to the folder(s) that the images are stored in. |
11,965,097 | I am creating a module of my website where I can display images in "albums", much like facebook.
For storing/grouping images, I planned on having them in the `~/Images` folder inside my application's structure. Is this considered bad practice, or will it open up my application to any security vulnerabilities? I read t... | 2012/08/15 | [
"https://Stackoverflow.com/questions/11965097",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/783284/"
] | Depending on the performance of your server, you may want to consider storing your images into a database using BLOB
<https://dev.mysql.com/doc/refman/5.0/en/blob.html>
Images can be easily sorted, organized, categorized without the need to worry about folder structures and folder permissions. Simply use your PHP/AJA... | I would use file system as you are saying but store it outside of the application folder as you are saying it is bad practice. I agree with this - when i do deployments I prefer to delete everything and drop in the new code and keep the web.config file that way I always have a clean environment and it is much easier to... |
11,965,097 | I am creating a module of my website where I can display images in "albums", much like facebook.
For storing/grouping images, I planned on having them in the `~/Images` folder inside my application's structure. Is this considered bad practice, or will it open up my application to any security vulnerabilities? I read t... | 2012/08/15 | [
"https://Stackoverflow.com/questions/11965097",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/783284/"
] | All three of the answers here are good. There is no preferred storage for uploaded images, it's all up to you based on your requirements.
As [Henhealg says](https://stackoverflow.com/a/11965147/304832), don't store them in App\_Data. If you put them here, they will not be accessible from the web. For example, the foll... | Depending on the performance of your server, you may want to consider storing your images into a database using BLOB
<https://dev.mysql.com/doc/refman/5.0/en/blob.html>
Images can be easily sorted, organized, categorized without the need to worry about folder structures and folder permissions. Simply use your PHP/AJA... |
11,965,097 | I am creating a module of my website where I can display images in "albums", much like facebook.
For storing/grouping images, I planned on having them in the `~/Images` folder inside my application's structure. Is this considered bad practice, or will it open up my application to any security vulnerabilities? I read t... | 2012/08/15 | [
"https://Stackoverflow.com/questions/11965097",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/783284/"
] | All three of the answers here are good. There is no preferred storage for uploaded images, it's all up to you based on your requirements.
As [Henhealg says](https://stackoverflow.com/a/11965147/304832), don't store them in App\_Data. If you put them here, they will not be accessible from the web. For example, the foll... | I would use file system as you are saying but store it outside of the application folder as you are saying it is bad practice. I agree with this - when i do deployments I prefer to delete everything and drop in the new code and keep the web.config file that way I always have a clean environment and it is much easier to... |
19,822 | What could the link be between the «white performance bars show» below and the «actual size of the rocket»?
The quote below seems to imply there is one.
But isn't that white scale purely arbitrary? It’s my current understanding that SpaceX could have increased the scale of the bar across the board so that Saturn V per... | 2017/01/16 | [
"https://space.stackexchange.com/questions/19822",
"https://space.stackexchange.com",
"https://space.stackexchange.com/users/6852/"
] | Completing on Hobbes answer, user sol3tosol4 seems to have nailed my last misunderstanding.
A simple edit to Elon's quote, make it a nice gems of information:
*«It's the first time the [ITS] rocket [... payload to LEO]
will [actually] exceed the ~~physical size~~ [dry mass] of the rocket»*
>
> Sometimes Elo... | The white bars are payload in kg. They look roughly proportional to me, so in that sense they're accurate. The size of the white bars vs. the dimensions of the rocket is misleading. The performance bar is one-dimensional. The rockets, on the other hand, grow in 3 dimensions. So when you compare a Falcon 9 to a Saturn V... |
1,630,519 | for example, I want the textfield input number only. my idea is when the user typing, it will call a javascript to check whether it is valid, if it is not valid, I delete the text which is just entered. But I think it is very complex to do so. Is there any simple way to do so? | 2009/10/27 | [
"https://Stackoverflow.com/questions/1630519",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/148978/"
] | Put a validation on submit. | The script to do this is here. It's a pretty common requirement.
<http://javascript.internet.com/forms/validate-numeric-only.html> |
1,630,519 | for example, I want the textfield input number only. my idea is when the user typing, it will call a javascript to check whether it is valid, if it is not valid, I delete the text which is just entered. But I think it is very complex to do so. Is there any simple way to do so? | 2009/10/27 | [
"https://Stackoverflow.com/questions/1630519",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/148978/"
] | Put a validation on submit. | I think, like o.k.w said, jQuery Masking would be a good choice because of 2 things:
1. jQuery is solid and fast
2. Masking is more user friendly than just deleting user input on the fly without any notification. Masking gives them a graphical reference of what type of input is expected and what the input might look l... |
1,630,519 | for example, I want the textfield input number only. my idea is when the user typing, it will call a javascript to check whether it is valid, if it is not valid, I delete the text which is just entered. But I think it is very complex to do so. Is there any simple way to do so? | 2009/10/27 | [
"https://Stackoverflow.com/questions/1630519",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/148978/"
] | JQuery Masking could be a good choice: <http://digitalbush.com/projects/masked-input-plugin/> | The script to do this is here. It's a pretty common requirement.
<http://javascript.internet.com/forms/validate-numeric-only.html> |
1,630,519 | for example, I want the textfield input number only. my idea is when the user typing, it will call a javascript to check whether it is valid, if it is not valid, I delete the text which is just entered. But I think it is very complex to do so. Is there any simple way to do so? | 2009/10/27 | [
"https://Stackoverflow.com/questions/1630519",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/148978/"
] | JQuery Masking could be a good choice: <http://digitalbush.com/projects/masked-input-plugin/> | I think, like o.k.w said, jQuery Masking would be a good choice because of 2 things:
1. jQuery is solid and fast
2. Masking is more user friendly than just deleting user input on the fly without any notification. Masking gives them a graphical reference of what type of input is expected and what the input might look l... |
29,990,144 | I was trying to move the load of my style.css in the footer of my wordpress theme.
I have already done something similar with 2 js files and it works fine, they load in the footer:
```
function my_init() {
if (!is_admin()) {
wp_deregister_script('jquery');
wp_register_script('jquery', 'http://www.s... | 2015/05/01 | [
"https://Stackoverflow.com/questions/29990144",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2849663/"
] | Try this:
```
add_action('wp_footer', 'my_init');
```
or since you have add parameter `true` in your script callback function:
```
add_action('wp_enqueue_scripts', 'my_init');
```
You may go here <http://wordpress.stackexchange.com> if you need help around wordpress programming. | replace
```
add_action('init', 'my_init');
```
with
```
add_action('wp_footer', 'my_init', 100);
``` |
8,410,608 | I am having a String like "A AND B OR C AND ( D OR E)". I just want to parse the logical expression here, is there any Java Api for the same.
Here A,B,C... are in the form of string,string,string (i.e key,value,operator) | 2011/12/07 | [
"https://Stackoverflow.com/questions/8410608",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/588747/"
] | First you will need to fix the grammar of the expression that you are going to accept. What you have written:
>
> "A AND B OR C AND ( D OR E)"
>
>
>
is an example string of your language. So first you will need to define your language which can be defined using [BNF](http://en.wikipedia.org/wiki/Backus%E2%80%93Na... | Use Spring Expression - supports AND OR NOT |
63,188,406 | We have a master branch `m` where we have a linear history and merge in typically relatively short lived feature branches `F1`, `F2`, ... like so:
```
* 343b52f - (11 days ago) Merge branch 'F495' into 'master' - Torque
|\
| * 52fc5a2 - (11 days ago) Add various QOL tools to make working inside Docker more convenien... | 2020/07/31 | [
"https://Stackoverflow.com/questions/63188406",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1202894/"
] | To develop a new feature -
Checkout latest `LD`:
```
git checkout LD
```
Create a new feature branch:
```
git checkout -b f500
```
Do some stuff in the feature branch:
```
git add ...
git commit ...
git add ...
git commit ...
```
Now that you want to have these changes in master, perform a rebase:
```
git re... | The easiest way would be to manage to somehow commit the code in master.
You can still exclude it from your production releases ; depending on the language you use, you can :
* explicitly exclude the directory `debuglogger` from your release tar.gz
* explicitly exclude the code for class `DebugLogger` when compiling ... |
8,357,936 | There is some sort of DNS error on my clients website that is hosted by HeartInternet. For some reason the site does not appear unless `www.` is specified explicitly.
Works: <http://www.elmhaven-marina.co.uk>
Doesn't Work: <http://elmhaven-marina.co.uk>
How can this error be fixed? | 2011/12/02 | [
"https://Stackoverflow.com/questions/8357936",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/656172/"
] | ```
$list = mysql_query("SELECT id, post_title, post_date
FROM wp_posts
WHERE post_title LIKE '%$searchpattern%') ORDER BY post_date;");
```
You have unexpected ")" before the "ORDER" operator. | You have an open bracket before the ORDER BY. Maybe that's what causing the problem |
70,780,584 | Can someone point me to what to use for FlinkKafkaProducer in newer versions of Flink as it has been deprecated?
I have some code like this:
```java
FlinkKafkaProducer<String> myKafkaProducer = new FlinkKafkaProducer<String>(
"kafka-producer", // target topic
new SimpleStringSchema(), //... | 2022/01/20 | [
"https://Stackoverflow.com/questions/70780584",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7120087/"
] | FlinkKafkaProducer has been deprecated
Flink recommends using the new source and sink api in the latest version
Reference to <https://nightlies.apache.org/flink/flink-docs-master/docs/connectors/datastream/kafka/>
```
DataStream<String> stream = ...
KafkaSink<String> sink = KafkaSink.<String>builder()
.setB... | The Flink 1.14 release notes contain details about `KafkaSink`, which is the successor of `FlinkKafkaProducer`. This includes a migration guide. You can find it at <https://nightlies.apache.org/flink/flink-docs-release-1.14/release-notes/flink-1.14/#port-kafkasink-to-new-unified-sink-api-flip-143> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.