qid int64 1 74.7M | question stringlengths 0 58.3k | date stringlengths 10 10 | metadata list | response_j stringlengths 2 48.3k | response_k stringlengths 2 40.5k |
|---|---|---|---|---|---|
39,768,347 | i tried this way but geting a bad request
```
var id = localStorage.getItem('sessionId');
$.ajax({
method:'POST',
url:'video/ratings?sessionId='+id+'',
data:{"videoId":"5757e6e41b0a244b256ac1d7","rating":"5"},
success:function(data){
console.log(data);
}
}... | 2016/09/29 | [
"https://Stackoverflow.com/questions/39768347",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6694856/"
] | The answer was contained in the code from the link posted by Haukinger:
```
object actual =
container.Resolve<IDatarecordSerializer>(
new ParameterOverride(
"type",
new InjectionParameter(typeof(string))
)
);
``` | In fact, Unity explicitly treats `Type` values in a `ParameterOverride` not as literal values but as types that should themselves be resolved. And then it tries to resolve an instance of type `string` and fails, obviously.
`ParameterOverride` stores the value in a `InjectionParameterValue` instance, which it turn inte... |
39,768,347 | i tried this way but geting a bad request
```
var id = localStorage.getItem('sessionId');
$.ajax({
method:'POST',
url:'video/ratings?sessionId='+id+'',
data:{"videoId":"5757e6e41b0a244b256ac1d7","rating":"5"},
success:function(data){
console.log(data);
}
}... | 2016/09/29 | [
"https://Stackoverflow.com/questions/39768347",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6694856/"
] | The answer was contained in the code from the link posted by Haukinger:
```
object actual =
container.Resolve<IDatarecordSerializer>(
new ParameterOverride(
"type",
new InjectionParameter(typeof(string))
)
);
``` | The simpler way out is to register a factory :
given:
```
internal interface ITyped
{
Type Type { get; }
}
internal class Typed : ITyped
{
public Typed(Type type)
{
Type = type;
}
public Type Type { get; }
}
```
Fty:
```
internal class TypedFactory : ITypedFactory
{
public ITyped ... |
43,700,000 | I am trying to parse JSON that is submitted from a `POST` request into a struct in a web service to send email. The following JSON is submitted in the body of the request.
```
{
"body": {
"template": "abctemplate.html",
"params": {
"name": "Chase",
"email": "1234@gmail.com"
}
},
"to": [
... | 2017/04/29 | [
"https://Stackoverflow.com/questions/43700000",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5527640/"
] | Change warrior.h to: (i.e. correct include guards)
```
#ifndef WARRIOR_H
#define WARRIOR_H
#include "fighter.h"
class warrior{
public:
warrior();
~warrior();
void special(fighter);
private:
};
#endif
```
Or better still use `#pragma once` if supported | The incorrectly named guards were making it not include the warrior file. Thank you @1201ProgramAlarm |
43,700,000 | I am trying to parse JSON that is submitted from a `POST` request into a struct in a web service to send email. The following JSON is submitted in the body of the request.
```
{
"body": {
"template": "abctemplate.html",
"params": {
"name": "Chase",
"email": "1234@gmail.com"
}
},
"to": [
... | 2017/04/29 | [
"https://Stackoverflow.com/questions/43700000",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5527640/"
] | Change warrior.h to: (i.e. correct include guards)
```
#ifndef WARRIOR_H
#define WARRIOR_H
#include "fighter.h"
class warrior{
public:
warrior();
~warrior();
void special(fighter);
private:
};
#endif
```
Or better still use `#pragma once` if supported | You need to use different include guard symbols of different .h files.
"fighter.h" defines `FIGHTER_H`, so when that #if check is encountered in "warrior.h" the definition of the `class warrior` is skipped. |
43,700,000 | I am trying to parse JSON that is submitted from a `POST` request into a struct in a web service to send email. The following JSON is submitted in the body of the request.
```
{
"body": {
"template": "abctemplate.html",
"params": {
"name": "Chase",
"email": "1234@gmail.com"
}
},
"to": [
... | 2017/04/29 | [
"https://Stackoverflow.com/questions/43700000",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5527640/"
] | You need to use different include guard symbols of different .h files.
"fighter.h" defines `FIGHTER_H`, so when that #if check is encountered in "warrior.h" the definition of the `class warrior` is skipped. | The incorrectly named guards were making it not include the warrior file. Thank you @1201ProgramAlarm |
11,042,313 | I would like to know if the following code are valid.
The original intension is that, I like a base class that dispatch calls to a certain member to either derived class members if it is there or fall back to default behaviors if derived class does not have this member. Another use is that this base class can be used ... | 2012/06/14 | [
"https://Stackoverflow.com/questions/11042313",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/794424/"
] | >
> Where does the void (B::\*)() and &B::call come from?
>
>
>
The type of a pointer to member is not the type on which you obtained such pointer, but the type on which the member is defined.
```
struct base { int x; };
struct derived : base {};
int main() {
std::cout << std::is_same< decltype(&derived::x), i... | Your instantiation of `SFINAE` is expecting the function pointer template argument to be of type `void (D2::*)()`, but instead is of type `void (B<D2>::*)()` (because `call` is not overidden in `D2`, it uses the one defined in `B<D2>`).
**Edit**
It is not the instantiation of `template <typename D>
void call (SFINA... |
11,226,074 | I'm making a desktop app in Java Swing using the Netbeans platform. I want to convert a 16 bit gray scale image to an RGB image. How can I do that? | 2012/06/27 | [
"https://Stackoverflow.com/questions/11226074",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1235362/"
] | Generally this (calling TerminateThread) is a bad thing to do because a thread may allocate some resources (i.e., file descriptors) which will be unavailable until the whole process terminate. Even more, the CloseHandle does not stop the thread.
If you have some lengthy operation inside your thread, then at least use ... | Best thing is to read the docs carefully. Win32 API is well documented.
from [MSDN on CreateThread in the Remarks section](http://msdn.microsoft.com/en-us/library/ms885186.aspx) it says
>
> Thread execution begins at the function specified by the lpStartAddr
> parameter. If this function returns, the DWORD return v... |
11,226,074 | I'm making a desktop app in Java Swing using the Netbeans platform. I want to convert a 16 bit gray scale image to an RGB image. How can I do that? | 2012/06/27 | [
"https://Stackoverflow.com/questions/11226074",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1235362/"
] | CloseHandle() does not destroy, terminate or supspend the thread, it only destroys the handle itself (so then you don't have a handle to kill the thread or wait on it). The thread continues to work normally (I have utilised this in numerous cases), and the only way to stop it is either exit the thread function (ThreadP... | Generally this (calling TerminateThread) is a bad thing to do because a thread may allocate some resources (i.e., file descriptors) which will be unavailable until the whole process terminate. Even more, the CloseHandle does not stop the thread.
If you have some lengthy operation inside your thread, then at least use ... |
11,226,074 | I'm making a desktop app in Java Swing using the Netbeans platform. I want to convert a 16 bit gray scale image to an RGB image. How can I do that? | 2012/06/27 | [
"https://Stackoverflow.com/questions/11226074",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1235362/"
] | CloseHandle() does not destroy, terminate or supspend the thread, it only destroys the handle itself (so then you don't have a handle to kill the thread or wait on it). The thread continues to work normally (I have utilised this in numerous cases), and the only way to stop it is either exit the thread function (ThreadP... | Best thing is to read the docs carefully. Win32 API is well documented.
from [MSDN on CreateThread in the Remarks section](http://msdn.microsoft.com/en-us/library/ms885186.aspx) it says
>
> Thread execution begins at the function specified by the lpStartAddr
> parameter. If this function returns, the DWORD return v... |
28,106,720 | I am using a `ListView` and refreshing it when swiping down with `SwipeRefresh`, it works fine till here. The problem occurs when I try to set a `TextView` on `mListview.setEmptyView()` the `Refresh Icon` is not shown while swiping.
It looks like it is under the `TextView`. However if I don't put that `TextView` on th... | 2015/01/23 | [
"https://Stackoverflow.com/questions/28106720",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2175647/"
] | ```
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingLeft="@dimen/padding_light"
android:paddingRight="@dimen/pad... | As long as your `SwipeRefreshLayout` and your `TextView` are under same `RelativeLayout` one of them will be on top of each other.
I would try to put it at the same level as your `ListView`, then both of them inside a container, inside `SwipeRefreshLayout`. And since `SwipeRefreshLayout` is the single item in the layo... |
28,106,720 | I am using a `ListView` and refreshing it when swiping down with `SwipeRefresh`, it works fine till here. The problem occurs when I try to set a `TextView` on `mListview.setEmptyView()` the `Refresh Icon` is not shown while swiping.
It looks like it is under the `TextView`. However if I don't put that `TextView` on th... | 2015/01/23 | [
"https://Stackoverflow.com/questions/28106720",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2175647/"
] | ```
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingLeft="@dimen/padding_light"
android:paddingRight="@dimen/pad... | You can try to put a `ListView` or `RecyclerView` into a `ScrollView`. For me it did the trick.
```
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/swipeRefreshLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true">
<Scr... |
866,044 | When I open steam, it tells me that I need to download additional packages.
First it says:
Failed to fetch <http://dep.playonlinux.com/dists/precise/Release>
Unable to find expected entry 'main/binary-armhf/Packages' in Release
file.
Then here are the packages it cannot locate:
```
E: Unable to locate packag... | 2016/12/30 | [
"https://askubuntu.com/questions/866044",
"https://askubuntu.com",
"https://askubuntu.com/users/636402/"
] | In the end I found this killer oneliner:
```
sed -i '1795,$ {/PaTtErN/d}' file.log
```
be careful with the `-i` flag and read the manual before trying | Possible with `AWK` , too:
```
bash-4.3$ cat input.txt
line one
and another line
running out of ideas for text
Oh, look , banana !
some more lines
this is boring
But what is not boring ? text processing !
bash-4.3$ awk 'NR<4; NR>4 && $0!~/banana/' input.txt
line one
and another line
running out of ideas for text
som... |
30,092,150 | I had a strange problems during the set padding to `EditText`. xml looks like this:
```
<EditText
android:layout_width="270dp"
android:layout_height="55dp"
android:ems="10"
android:id="@+id/etEmail"
android:textStyle="bold"
android:layout_gravity="center_vertical"
android:textColor="#FFFFFF... | 2015/05/07 | [
"https://Stackoverflow.com/questions/30092150",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2876662/"
] | EditText padding via xml doesn't work after update to API level 21.
But EditText padding works, if it define programmatically.
```
editText.setPadding(10, 0, 0, 0);
```
You can track this issue on [android issue tracker.](https://code.google.com/p/android/issues/detail?id=77982)
There are some other alternates ... | This is dpi device problem. Make use of "dimen" folder, give different dp for various device screen sizes. Sure this will solve your problem.
```
android:paddingLeft="@dimen/yourValueName"
``` |
30,092,150 | I had a strange problems during the set padding to `EditText`. xml looks like this:
```
<EditText
android:layout_width="270dp"
android:layout_height="55dp"
android:ems="10"
android:id="@+id/etEmail"
android:textStyle="bold"
android:layout_gravity="center_vertical"
android:textColor="#FFFFFF... | 2015/05/07 | [
"https://Stackoverflow.com/questions/30092150",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2876662/"
] | I've noticed this on the HTC One X. This doesn't fix your particular issue, but changing `paddingStart` to `paddingLeft` worked for me. | This is dpi device problem. Make use of "dimen" folder, give different dp for various device screen sizes. Sure this will solve your problem.
```
android:paddingLeft="@dimen/yourValueName"
``` |
30,092,150 | I had a strange problems during the set padding to `EditText`. xml looks like this:
```
<EditText
android:layout_width="270dp"
android:layout_height="55dp"
android:ems="10"
android:id="@+id/etEmail"
android:textStyle="bold"
android:layout_gravity="center_vertical"
android:textColor="#FFFFFF... | 2015/05/07 | [
"https://Stackoverflow.com/questions/30092150",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2876662/"
] | EditText padding via xml doesn't work after update to API level 21.
But EditText padding works, if it define programmatically.
```
editText.setPadding(10, 0, 0, 0);
```
You can track this issue on [android issue tracker.](https://code.google.com/p/android/issues/detail?id=77982)
There are some other alternates ... | I've noticed this on the HTC One X. This doesn't fix your particular issue, but changing `paddingStart` to `paddingLeft` worked for me. |
259,287 | This works
----------
Normally, `zsh`'s tab completion works well.
```
$ touch foo-1-bar foo-2-bar
$ touch f<Tab>
$ touch foo--bar
^ cursor here
```
Pressing `Tab` again brings up a menu from which I can select files.
```
$ touch foo--bar
foo-1-bar foo-2-bar
```
This doesn't
------------
However, t... | 2016/02/02 | [
"https://unix.stackexchange.com/questions/259287",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/18887/"
] | As per the comments, I tried disabling `oh-my-zsh`, which fixed this problem. I then went through the `oh-my-zsh` source, selectively disabling modules.
I previously had `CASE_SENSITIVE="true"`, but commenting out this line fixed it for me. Apparently it's a [known bug](https://github.com/robbyrussell/oh-my-zsh/issues... | Personally, I prefer this solution much more - <http://zsh.sourceforge.net/FAQ/zshfaq04.html#l50>,
It works like completion in tcsh, and completes words, that are before cursor only.
Just use
```
bindkey '\CI' expand-or-complete-prefix
```
instead of
```
bindkey '\CI' expand-or-complete
```
(Which is by ... |
259,287 | This works
----------
Normally, `zsh`'s tab completion works well.
```
$ touch foo-1-bar foo-2-bar
$ touch f<Tab>
$ touch foo--bar
^ cursor here
```
Pressing `Tab` again brings up a menu from which I can select files.
```
$ touch foo--bar
foo-1-bar foo-2-bar
```
This doesn't
------------
However, t... | 2016/02/02 | [
"https://unix.stackexchange.com/questions/259287",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/18887/"
] | As per the comments, I tried disabling `oh-my-zsh`, which fixed this problem. I then went through the `oh-my-zsh` source, selectively disabling modules.
I previously had `CASE_SENSITIVE="true"`, but commenting out this line fixed it for me. Apparently it's a [known bug](https://github.com/robbyrussell/oh-my-zsh/issues... | Another option is setting COMPLETE\_IN\_WORD as described on the same page - <http://zsh.sourceforge.net/FAQ/zshfaq04.html#l50>.
```
setopt complete_in_word
```
This will try to fill in the word at the point of the cursor, and all the characters after the point of the cursor will be replaced with what is filled. |
259,287 | This works
----------
Normally, `zsh`'s tab completion works well.
```
$ touch foo-1-bar foo-2-bar
$ touch f<Tab>
$ touch foo--bar
^ cursor here
```
Pressing `Tab` again brings up a menu from which I can select files.
```
$ touch foo--bar
foo-1-bar foo-2-bar
```
This doesn't
------------
However, t... | 2016/02/02 | [
"https://unix.stackexchange.com/questions/259287",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/18887/"
] | Personally, I prefer this solution much more - <http://zsh.sourceforge.net/FAQ/zshfaq04.html#l50>,
It works like completion in tcsh, and completes words, that are before cursor only.
Just use
```
bindkey '\CI' expand-or-complete-prefix
```
instead of
```
bindkey '\CI' expand-or-complete
```
(Which is by ... | Another option is setting COMPLETE\_IN\_WORD as described on the same page - <http://zsh.sourceforge.net/FAQ/zshfaq04.html#l50>.
```
setopt complete_in_word
```
This will try to fill in the word at the point of the cursor, and all the characters after the point of the cursor will be replaced with what is filled. |
5,237,259 | Is there anyway to randomly place a MovieClip/Sprite on an irregularly shaped object?
For a rectangle, it seems pretty straightforward (i.e. use Math.random with the range being the coordinates of an object)...but what if say, you would like to avoid placing objects in the center? | 2011/03/08 | [
"https://Stackoverflow.com/questions/5237259",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/147915/"
] | It's less that Ruby on Rails handles the concurrent requests as it is the server that is running Ruby on Rails that handles the concurrent requests. When I say a server that is running Ruby on Rails I am referring to Phusion Passenger, Mongrel or WEBrick in combination with Apache or Nginx for example. In most cases co... | You need to run a threaded server like Puma on a threaded Ruby like JRuby for that. Otherwise it's just the server creating processes instead of threads, like Pushion Passenger. Of course, you need to write thread safe code for that, which can be very hard to develop and mantain. For this reason most of the people stic... |
995,896 | I'm trying to set up a simple SSH server, but the port is still filtered even after port forwarding. (I've set up SSH to use port 1338 instead of default 22.)
We can see that the port is filtered by running a Nmap scan on the local IP (where the port is open) and then on the external IP.
Running nmap on local IP:
``... | 2019/12/17 | [
"https://serverfault.com/questions/995896",
"https://serverfault.com",
"https://serverfault.com/users/552311/"
] | It turns out my ISP was using [Carrier-grade NAT](https://en.wikipedia.org/wiki/Carrier-grade_NAT), which essentially means I have a private IP address. The solution was to call them and ask for a public IP address. | You can run into numerous issues if you are scanning a public ip that is forwarded to the machine you are scanning from. Numerous routing and network address translation issues can occur. To start out, I'd recommend you scan the ip and port from a machine outside of your firewall, and monitor the traffic at the destina... |
995,896 | I'm trying to set up a simple SSH server, but the port is still filtered even after port forwarding. (I've set up SSH to use port 1338 instead of default 22.)
We can see that the port is filtered by running a Nmap scan on the local IP (where the port is open) and then on the external IP.
Running nmap on local IP:
``... | 2019/12/17 | [
"https://serverfault.com/questions/995896",
"https://serverfault.com",
"https://serverfault.com/users/552311/"
] | You can run into numerous issues if you are scanning a public ip that is forwarded to the machine you are scanning from. Numerous routing and network address translation issues can occur. To start out, I'd recommend you scan the ip and port from a machine outside of your firewall, and monitor the traffic at the destina... | In Asus router you have to go to "Administration" and then in "System" in the bottom enable the ssh access choosing the ip of your server (destination ip). |
995,896 | I'm trying to set up a simple SSH server, but the port is still filtered even after port forwarding. (I've set up SSH to use port 1338 instead of default 22.)
We can see that the port is filtered by running a Nmap scan on the local IP (where the port is open) and then on the external IP.
Running nmap on local IP:
``... | 2019/12/17 | [
"https://serverfault.com/questions/995896",
"https://serverfault.com",
"https://serverfault.com/users/552311/"
] | It turns out my ISP was using [Carrier-grade NAT](https://en.wikipedia.org/wiki/Carrier-grade_NAT), which essentially means I have a private IP address. The solution was to call them and ask for a public IP address. | In Asus router you have to go to "Administration" and then in "System" in the bottom enable the ssh access choosing the ip of your server (destination ip). |
23,852 | I've seen others use Bitwise-OR to combine flags before:
```
#define RUN 0x01
#define JUMP 0x02
#define SHOOT 0x04
const byte madPerson = RUN | JUMP | SHOOT;
```
That's also the way I do it.
But I've also seen some (not as many) combine flags using addition:
```
#define RUN 0x01
#define JUMP 0x02
#define SHOOT 0x... | 2010/12/05 | [
"https://softwareengineering.stackexchange.com/questions/23852",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/6440/"
] | Bitwise-OR.
===========
Addition is dangerous.
Consider an example where a bandit is a person, and an angry bandit is a bandit that speaks and shoots. Later, you decide all bandits should shoot, but you've forgotten about the angry bandit definition and don't remove its shooting flag.
```
#define PERSON 1 << 0
#defi... | bitwise-OR conveys the intent more clearly
also, bitwise-OR *should* be more efficient |
9,551,646 | I have a run time issue when i debugged my script.
It says :
```
Unhandled exception at 0x002a4f8e in test2.exe: 0xC0000094: Integer division by zero.
```
Although the line in question is a rand number generation.
```
if((rand() % miss) < 3){ //line 40
int phit = (rand()% hit);
} else {
bool pmiss = true;
}
... | 2012/03/04 | [
"https://Stackoverflow.com/questions/9551646",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1076743/"
] | You are re-declaring `miss` at line 30. That variable will be local to the *if* statement. *Therefore, the global `miss` will still have a value of zero.* Take out all those `int`, and also the `bool` inside the `if` statements! Like this:
```
if(user_weapon == 'k'){
... | The % (modulus) is the remnant of the division. So you divide a by b in a%b and get the remnant from it. If b is 0 (like in this case), you get an error.
Division by 0 is illegal and causes a cosmic disturbance (or code crash).
try setting the variable to another value. |
9,551,646 | I have a run time issue when i debugged my script.
It says :
```
Unhandled exception at 0x002a4f8e in test2.exe: 0xC0000094: Integer division by zero.
```
Although the line in question is a rand number generation.
```
if((rand() % miss) < 3){ //line 40
int phit = (rand()% hit);
} else {
bool pmiss = true;
}
... | 2012/03/04 | [
"https://Stackoverflow.com/questions/9551646",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1076743/"
] | line 29 and 32 should be
```
miss = 5
miss = 2
```
you are declaring a new local variable miss inside the if scope which means you are not changing the one declared at line 6 | The % (modulus) is the remnant of the division. So you divide a by b in a%b and get the remnant from it. If b is 0 (like in this case), you get an error.
Division by 0 is illegal and causes a cosmic disturbance (or code crash).
try setting the variable to another value. |
9,551,646 | I have a run time issue when i debugged my script.
It says :
```
Unhandled exception at 0x002a4f8e in test2.exe: 0xC0000094: Integer division by zero.
```
Although the line in question is a rand number generation.
```
if((rand() % miss) < 3){ //line 40
int phit = (rand()% hit);
} else {
bool pmiss = true;
}
... | 2012/03/04 | [
"https://Stackoverflow.com/questions/9551646",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1076743/"
] | You are re-declaring `miss` at line 30. That variable will be local to the *if* statement. *Therefore, the global `miss` will still have a value of zero.* Take out all those `int`, and also the `bool` inside the `if` statements! Like this:
```
if(user_weapon == 'k'){
... | line 29 and 32 should be
```
miss = 5
miss = 2
```
you are declaring a new local variable miss inside the if scope which means you are not changing the one declared at line 6 |
43,589,322 | A client of mine has 2 PLC processors and wants the newer PLC to control a motor that the older one already controls. They are phasing out the older PLC but prefer to add logic to the newer PLC as time goes on (I know this sounds strange). My question is: Can I simply connect the output wire from the newer output signa... | 2017/04/24 | [
"https://Stackoverflow.com/questions/43589322",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7913887/"
] | If the output cards are relay cards, and the common is linked between the two PLC's, then you should be OK.
I would recommend taking both outputs down to a diode terminal, just to be safe | No, to connect both to same motor coil contact is unsafe and would not be best practice. The correct way is to have both old and new ControlLogix 5000 processors on the same Ethernet network. Then on old controller make desired tag global consumable and on the new controller, add an 'OR" branch with old controller tag ... |
661,545 | Background
----------
I think I am close to getting my POSTFIX setup to my liking. I've run some SMTP online checks and my SMTP passes all the basic security tests.
I get a certificate warning in Thunderbird. I am using a temporary self-signed certificate, so I know why the certificate exception comes up. That isn't ... | 2015/01/22 | [
"https://serverfault.com/questions/661545",
"https://serverfault.com",
"https://serverfault.com/users/164355/"
] | Well, looks like you are confusing SMTPD with SMTP. These two beast has different purpose in postfix terms. `smtpd` was SMTP server used for receiving email, it bind to specific port (for example 25, 587, 465). `smtp` was SMTP client used for sending email, it connect to SMTP server port.
Another confusion here is abo... | Apart from the postfix configuration you should use a tool like <https://www.wireshark.org/> to check what is really going on during the transfer. You should also see STARTTLS and (un-)encrypted traffic. |
661,545 | Background
----------
I think I am close to getting my POSTFIX setup to my liking. I've run some SMTP online checks and my SMTP passes all the basic security tests.
I get a certificate warning in Thunderbird. I am using a temporary self-signed certificate, so I know why the certificate exception comes up. That isn't ... | 2015/01/22 | [
"https://serverfault.com/questions/661545",
"https://serverfault.com",
"https://serverfault.com/users/164355/"
] | The parameter `-o smtpd_tls_wrappermode=yes` was causing the mail server to not respond to the `sumission` protocol. As soon as I removed that parameter in master.cf the EHLO got a response to the telnet on port 587 and Thunderbird mail client successfully sent the mail on port 587 instead of 25. So here now is my mast... | Apart from the postfix configuration you should use a tool like <https://www.wireshark.org/> to check what is really going on during the transfer. You should also see STARTTLS and (un-)encrypted traffic. |
661,545 | Background
----------
I think I am close to getting my POSTFIX setup to my liking. I've run some SMTP online checks and my SMTP passes all the basic security tests.
I get a certificate warning in Thunderbird. I am using a temporary self-signed certificate, so I know why the certificate exception comes up. That isn't ... | 2015/01/22 | [
"https://serverfault.com/questions/661545",
"https://serverfault.com",
"https://serverfault.com/users/164355/"
] | Well, looks like you are confusing SMTPD with SMTP. These two beast has different purpose in postfix terms. `smtpd` was SMTP server used for receiving email, it bind to specific port (for example 25, 587, 465). `smtp` was SMTP client used for sending email, it connect to SMTP server port.
Another confusion here is abo... | The parameter `-o smtpd_tls_wrappermode=yes` was causing the mail server to not respond to the `sumission` protocol. As soon as I removed that parameter in master.cf the EHLO got a response to the telnet on port 587 and Thunderbird mail client successfully sent the mail on port 587 instead of 25. So here now is my mast... |
15,724,872 | I am implementing a basic sync strategy for a multi-client application that needs to support offline data access. I am using @Chris' suggestion in his answer to [this question](https://stackoverflow.com/questions/5035132/how-to-sync-iphone-core-data-with-web-server-and-then-push-to-other-devices) (not required reading)... | 2013/03/30 | [
"https://Stackoverflow.com/questions/15724872",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/225253/"
] | You need to do a few things to get this to work:
1. Set the `allowClear` and `placeholder` options in an options object that you use when initializing the widget:
```
$ ->
$("#practice_toolkeeper")
.select2({
allowClear: true,
placeholder: 'Select type question'
})
.select2('v... | *For My Developer Fellas Landed here*
Suppose You are using [Formtastic](https://github.com/justinfrench/formtastic) Normally with Active Admin You can pass during declaration
```
f.input :your_select_2_field, { as: :select2, collection: ['a', 'b'], include_blank: 'Select Nothing'}
```
**Concentrate On Curly Braces... |
22,959 | In [Psalm 74](https://www.esv.org/Psalm+74/):12 (ESV) we read "Yet God my King is from of old, ...".
While I understand that to mean something like "Yet God my King is from ancient times", why would translators use the phrase "is from of old". The more I look at that phrase, the less it seems to make sense. The phrase ... | 2016/06/15 | [
"https://hermeneutics.stackexchange.com/questions/22959",
"https://hermeneutics.stackexchange.com",
"https://hermeneutics.stackexchange.com/users/1991/"
] | Job 29:2
English Standard Version
>
> “Oh, that I were as in the months of **old** [H6924], as in the days when God watched over me,
>
>
>
Psalm 74:12 English Standard Version
>
> Yet God my King is from of **old** [H6924], working salvation in the midst of the earth.
>
>
>
Why would translators use the phr... | The hebrew word is קדמ and the correct translation is something like 'from the old'. It means more than anicent, this word hints towards creation. The topic of creation is then picked up in V 13-17. Furthermore קדמ is used rather frequently in the psalms of Asaph (Ps 50.73-83), like in Ps 78, where it is mentioned seve... |
25,087 | I notice a lot of sites host their resources on a separate domain from the main site, e.g. StackExchange using sstatic.net, Barnes & Noble using imagesbn.com, etc.
I understand that there are benefits to putting your static resources on a separate host, possibly with an efficient static-file web server like nginx, fre... | 2012/01/26 | [
"https://webmasters.stackexchange.com/questions/25087",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/2139/"
] | Aside from use of CDNs, using separate domains for static data also means:
1. You can use a lightweight web server that doesn't have to load all the modules/extensions that your dynamic content web server has to load on every single request. Not having to scan each directory in the URI path to read .htaccess files als... | Another reason for rendering static files from an alternate domain is to provide an additional security control through isolated web origins. [The browser's same-origin policy controls](https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy) ensure that content loaded from the alternate domain is disa... |
25,087 | I notice a lot of sites host their resources on a separate domain from the main site, e.g. StackExchange using sstatic.net, Barnes & Noble using imagesbn.com, etc.
I understand that there are benefits to putting your static resources on a separate host, possibly with an efficient static-file web server like nginx, fre... | 2012/01/26 | [
"https://webmasters.stackexchange.com/questions/25087",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/2139/"
] | Lèse majesté covered the main points, but to expand further I'd add that having a single domain for all the various Stack Exchange sites means that someone browsing them will only download static content such as JavaScripts once. Going to Superuser, for example, a user will use the cached content since it is from the s... | Another reason for rendering static files from an alternate domain is to provide an additional security control through isolated web origins. [The browser's same-origin policy controls](https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy) ensure that content loaded from the alternate domain is disa... |
25,087 | I notice a lot of sites host their resources on a separate domain from the main site, e.g. StackExchange using sstatic.net, Barnes & Noble using imagesbn.com, etc.
I understand that there are benefits to putting your static resources on a separate host, possibly with an efficient static-file web server like nginx, fre... | 2012/01/26 | [
"https://webmasters.stackexchange.com/questions/25087",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/2139/"
] | Many sites have quite a lot of cookies set, these cookies have the purpose of supporting some kind of state.
By putting the static (stateless) resources on a completely different domain you can reduce the size of the http requests. In some cases there are so many cookie that a single http request takes two TCP packets... | The main reason are cookies. What Niels suggested in his answer is only a minor consequence, and not the real reason. Without cookies, the request size is smaller, so it is saving some bandwidth.
However, the real difference comes from browser cache. Since content is static (i.e. does not change), browsers can cache i... |
25,087 | I notice a lot of sites host their resources on a separate domain from the main site, e.g. StackExchange using sstatic.net, Barnes & Noble using imagesbn.com, etc.
I understand that there are benefits to putting your static resources on a separate host, possibly with an efficient static-file web server like nginx, fre... | 2012/01/26 | [
"https://webmasters.stackexchange.com/questions/25087",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/2139/"
] | Lèse majesté covered the main points, but to expand further I'd add that having a single domain for all the various Stack Exchange sites means that someone browsing them will only download static content such as JavaScripts once. Going to Superuser, for example, a user will use the cached content since it is from the s... | Older browsers are restricted to just two parallel downloads per hostname.
Splitting a web page's elements across multiple domains is called [domain sharding](http://www.stevesouders.com/blog/2009/05/12/sharding-dominant-domains/). Doing this allows more resources to be downloaded in parallel, reducing the overall pag... |
25,087 | I notice a lot of sites host their resources on a separate domain from the main site, e.g. StackExchange using sstatic.net, Barnes & Noble using imagesbn.com, etc.
I understand that there are benefits to putting your static resources on a separate host, possibly with an efficient static-file web server like nginx, fre... | 2012/01/26 | [
"https://webmasters.stackexchange.com/questions/25087",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/2139/"
] | Aside from use of CDNs, using separate domains for static data also means:
1. You can use a lightweight web server that doesn't have to load all the modules/extensions that your dynamic content web server has to load on every single request. Not having to scan each directory in the URI path to read .htaccess files als... | Older browsers are restricted to just two parallel downloads per hostname.
Splitting a web page's elements across multiple domains is called [domain sharding](http://www.stevesouders.com/blog/2009/05/12/sharding-dominant-domains/). Doing this allows more resources to be downloaded in parallel, reducing the overall pag... |
25,087 | I notice a lot of sites host their resources on a separate domain from the main site, e.g. StackExchange using sstatic.net, Barnes & Noble using imagesbn.com, etc.
I understand that there are benefits to putting your static resources on a separate host, possibly with an efficient static-file web server like nginx, fre... | 2012/01/26 | [
"https://webmasters.stackexchange.com/questions/25087",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/2139/"
] | The main reason are cookies. What Niels suggested in his answer is only a minor consequence, and not the real reason. Without cookies, the request size is smaller, so it is saving some bandwidth.
However, the real difference comes from browser cache. Since content is static (i.e. does not change), browsers can cache i... | Another reason for rendering static files from an alternate domain is to provide an additional security control through isolated web origins. [The browser's same-origin policy controls](https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy) ensure that content loaded from the alternate domain is disa... |
25,087 | I notice a lot of sites host their resources on a separate domain from the main site, e.g. StackExchange using sstatic.net, Barnes & Noble using imagesbn.com, etc.
I understand that there are benefits to putting your static resources on a separate host, possibly with an efficient static-file web server like nginx, fre... | 2012/01/26 | [
"https://webmasters.stackexchange.com/questions/25087",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/2139/"
] | Many sites have quite a lot of cookies set, these cookies have the purpose of supporting some kind of state.
By putting the static (stateless) resources on a completely different domain you can reduce the size of the http requests. In some cases there are so many cookie that a single http request takes two TCP packets... | Lèse majesté covered the main points, but to expand further I'd add that having a single domain for all the various Stack Exchange sites means that someone browsing them will only download static content such as JavaScripts once. Going to Superuser, for example, a user will use the cached content since it is from the s... |
25,087 | I notice a lot of sites host their resources on a separate domain from the main site, e.g. StackExchange using sstatic.net, Barnes & Noble using imagesbn.com, etc.
I understand that there are benefits to putting your static resources on a separate host, possibly with an efficient static-file web server like nginx, fre... | 2012/01/26 | [
"https://webmasters.stackexchange.com/questions/25087",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/2139/"
] | Aside from use of CDNs, using separate domains for static data also means:
1. You can use a lightweight web server that doesn't have to load all the modules/extensions that your dynamic content web server has to load on every single request. Not having to scan each directory in the URI path to read .htaccess files als... | The main reason are cookies. What Niels suggested in his answer is only a minor consequence, and not the real reason. Without cookies, the request size is smaller, so it is saving some bandwidth.
However, the real difference comes from browser cache. Since content is static (i.e. does not change), browsers can cache i... |
25,087 | I notice a lot of sites host their resources on a separate domain from the main site, e.g. StackExchange using sstatic.net, Barnes & Noble using imagesbn.com, etc.
I understand that there are benefits to putting your static resources on a separate host, possibly with an efficient static-file web server like nginx, fre... | 2012/01/26 | [
"https://webmasters.stackexchange.com/questions/25087",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/2139/"
] | Many sites have quite a lot of cookies set, these cookies have the purpose of supporting some kind of state.
By putting the static (stateless) resources on a completely different domain you can reduce the size of the http requests. In some cases there are so many cookie that a single http request takes two TCP packets... | Another reason for rendering static files from an alternate domain is to provide an additional security control through isolated web origins. [The browser's same-origin policy controls](https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy) ensure that content loaded from the alternate domain is disa... |
25,087 | I notice a lot of sites host their resources on a separate domain from the main site, e.g. StackExchange using sstatic.net, Barnes & Noble using imagesbn.com, etc.
I understand that there are benefits to putting your static resources on a separate host, possibly with an efficient static-file web server like nginx, fre... | 2012/01/26 | [
"https://webmasters.stackexchange.com/questions/25087",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/2139/"
] | Many sites have quite a lot of cookies set, these cookies have the purpose of supporting some kind of state.
By putting the static (stateless) resources on a completely different domain you can reduce the size of the http requests. In some cases there are so many cookie that a single http request takes two TCP packets... | Aside from use of CDNs, using separate domains for static data also means:
1. You can use a lightweight web server that doesn't have to load all the modules/extensions that your dynamic content web server has to load on every single request. Not having to scan each directory in the URI path to read .htaccess files als... |
48,208,576 | I have a Huawei Modem connected to my VB.net project
all AT Commands work such as `CONNECT`, `READ` and `SEND SMS`
The only thing that I cannot work with is the `DELETE SMS`
I have this code:
```
With SerialPort1
.Write("AT")
Threading.Thread.Sleep(1000)
.Write("AT+CMGF=1")
Threading.Thread.Sleep(100... | 2018/01/11 | [
"https://Stackoverflow.com/questions/48208576",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7795195/"
] | This might be a bit dirty, but maybe you want to implement a check like described in <http://allthingssmitty.com/2016/09/12/checking-if-font-awesome-loaded/>.
As soon as that returns true, you initialize your map.
P.S. Is there a specific reason that you use an icon font? Why don't you use an SVG icon? | You might be able to get away with redrawing the map using `setTimeout`
```
setTimeout(function(){ map.render(); }, 1000);
```
Though it's probably best to use something that waits for everything to load before drawing. See the top answer here if you can use jQuery here [Is it possible to wait until all javascript f... |
30,085,362 | So I have a project checkout out and the master branch points to one repo, while the site-development branch points to another repo.
The site-development branch points to a repo with a remote name of site.
When I do a `git pull site master` I see:
```
$ git pull site master
From github.com:AdamKyle/freya-framework-s... | 2015/05/06 | [
"https://Stackoverflow.com/questions/30085362",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1270259/"
] | I believe that your local copy of master is behind the master on "site".
I made two repos for demonstration:
```
$ git status
On branch asdf
nothing to commit, working directory clean
$ git pull site master
From file:///tmp/site
* branch master -> FETCH_HEAD
Already up-to-date.
$ git push site maste... | Use the --force flag.
```
git push site master --force
``` |
18,031,801 | This is related to:
[Why does "echo '2' . print(2) + 3" print 521?](https://stackoverflow.com/questions/13176046/why-does-echo-2-print2-3-print-521)
I was wondering why
print(99) + print(99) + print(99) + print(99);
shows 99100100100....
I'd like to learn about the quirks of PHP. | 2013/08/03 | [
"https://Stackoverflow.com/questions/18031801",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/785309/"
] | The `print` function produces output and then (see [documentation](http://php.net/manual/en/function.print.php)) returns the value 1. To further complicate things, the `print` function is a language construct (see the documentation) which does not require the parenthesis.
So, if you had the statement
```
print(99) + ... | Because, [from the docs](http://php.net/print),
`print` …
>
> Returns **1**, always
>
>
> |
18,031,801 | This is related to:
[Why does "echo '2' . print(2) + 3" print 521?](https://stackoverflow.com/questions/13176046/why-does-echo-2-print2-3-print-521)
I was wondering why
print(99) + print(99) + print(99) + print(99);
shows 99100100100....
I'd like to learn about the quirks of PHP. | 2013/08/03 | [
"https://Stackoverflow.com/questions/18031801",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/785309/"
] | Print is not a function, so `print(99)` is the same as `print 99`. We can remove the parentheses for clarity.
```
print 99 + print 99 + print 99 + print 99;
```
The expression is evaluated from the right, so it becomes
```
print (99 + print (99 + print (99 + print 99)));
```
The rightmost `print` executes first, ... | Because, [from the docs](http://php.net/print),
`print` …
>
> Returns **1**, always
>
>
> |
18,031,801 | This is related to:
[Why does "echo '2' . print(2) + 3" print 521?](https://stackoverflow.com/questions/13176046/why-does-echo-2-print2-3-print-521)
I was wondering why
print(99) + print(99) + print(99) + print(99);
shows 99100100100....
I'd like to learn about the quirks of PHP. | 2013/08/03 | [
"https://Stackoverflow.com/questions/18031801",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/785309/"
] | The `print` function produces output and then (see [documentation](http://php.net/manual/en/function.print.php)) returns the value 1. To further complicate things, the `print` function is a language construct (see the documentation) which does not require the parenthesis.
So, if you had the statement
```
print(99) + ... | Because `print()` **always returns 1**. Check the [php manual](http://php.net/manual/en/function.print.php)
This is unlike echo() which does not return the value.
Both `print()` and `echo()` are not actual functions but language constructs. |
18,031,801 | This is related to:
[Why does "echo '2' . print(2) + 3" print 521?](https://stackoverflow.com/questions/13176046/why-does-echo-2-print2-3-print-521)
I was wondering why
print(99) + print(99) + print(99) + print(99);
shows 99100100100....
I'd like to learn about the quirks of PHP. | 2013/08/03 | [
"https://Stackoverflow.com/questions/18031801",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/785309/"
] | Print is not a function, so `print(99)` is the same as `print 99`. We can remove the parentheses for clarity.
```
print 99 + print 99 + print 99 + print 99;
```
The expression is evaluated from the right, so it becomes
```
print (99 + print (99 + print (99 + print 99)));
```
The rightmost `print` executes first, ... | Because `print()` **always returns 1**. Check the [php manual](http://php.net/manual/en/function.print.php)
This is unlike echo() which does not return the value.
Both `print()` and `echo()` are not actual functions but language constructs. |
18,031,801 | This is related to:
[Why does "echo '2' . print(2) + 3" print 521?](https://stackoverflow.com/questions/13176046/why-does-echo-2-print2-3-print-521)
I was wondering why
print(99) + print(99) + print(99) + print(99);
shows 99100100100....
I'd like to learn about the quirks of PHP. | 2013/08/03 | [
"https://Stackoverflow.com/questions/18031801",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/785309/"
] | Print is not a function, so `print(99)` is the same as `print 99`. We can remove the parentheses for clarity.
```
print 99 + print 99 + print 99 + print 99;
```
The expression is evaluated from the right, so it becomes
```
print (99 + print (99 + print (99 + print 99)));
```
The rightmost `print` executes first, ... | The `print` function produces output and then (see [documentation](http://php.net/manual/en/function.print.php)) returns the value 1. To further complicate things, the `print` function is a language construct (see the documentation) which does not require the parenthesis.
So, if you had the statement
```
print(99) + ... |
56,707,543 | I have a tab delimited file `abc.txt`
```
contig score guide
1:100-101 7 AAA
1:100-101 6 BBB
1:100-101 5 CCC
1:100-101 4 DDD
1:100-101 3 EEE
1:100-101 2 FFF
1:100-101 1 GGG
1:100-101 90 HHH
1:100-101 111 III
1:100-101 1111 JJJ
1:200-203 503.5333333 KKK
1:200-203 570.7212121... | 2019/06/21 | [
"https://Stackoverflow.com/questions/56707543",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9017953/"
] | You could take advantage of the fact that the `Worksheet.Cells` collection only contains entries with cells that have "content", i.e. Value, styling, etc. So if you have a sheet like this:
[](https://i.stack.imgur.com/yeboa.png)
And did something li... | You can use the Dimension property on the worksheet to find out what the used range is.
Then you can run a Linq query on that range with a condition checking if a cells value is not null. |
13,262,558 | There are two schemas in MySQL. For example `db1` and `db2`.
They have same structure of tables and different data to each other.
Now I want to merge data on `db1` with data on `db2`.
I tried below:
1. `mysqldump` from `db1` with no drop table option.
2. Import dumpfile into `db2` to use RESOURCE command.
But it d... | 2012/11/07 | [
"https://Stackoverflow.com/questions/13262558",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1345414/"
] | It seems like you have the gist of it. Cascades is where the focus should be for any beginner building native BlackBerry 10 applications from scratch. It provides high level tools and APIs for UI development and integration with other elements of the platform (BBM, sensors, notifications, etc.) It will let you easily c... | Basically, Native is for if you are writing a game or porting and existing app. You have to build all of the UI stuff yourself. Cascades is for normal app developers. You get a lot of really nice UI components with implicit animations for free, and you can work at a higher level language (Qt for application logic, QML ... |
59,994,566 | I'm working on a web application with files saved on the server. How can I display the PDF file using php?
**Attempt #1 :**
$psFilePath looks like : I:/www/wwwpasroot/netclinic/dev/csst/PE1000054684 - Version1.pdf
```
echo "<embed src='$psFilePath' type='application/pdf' height='300px' width='100%'>";
```
Result... | 2020/01/30 | [
"https://Stackoverflow.com/questions/59994566",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11144086/"
] | ### TL;DR
You have the wrong `git diff`. You want `git diff --staged` or `git diff --cached` (these are synonyms).
### Long
Your pre-commit hook contains this line:
```
FILES=$(git diff --name-only)
```
Look at [the documentation for `git diff`](https://git-scm.com/docs/git-diff). Near the top, it says, in part:
... | You want to use `git diff --staged --name-only` instead of `git diff --name-only`
the former will check the files which are about to be committed whereas the latter only checks the *unstaged* (not to be committed) files |
131,751 | Hi I have a table that has start and end columns that has the values
```
Start End
9 10
11 19
29 44
45 51
56 60
```
Now if I give the range like `15 to 60` I need to return the values that not being covered in the above range.
The output I am expecting is - `20,21,22,23,24,25,26,27,28,5... | 2016/03/09 | [
"https://dba.stackexchange.com/questions/131751",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/89222/"
] | In postgresql:
```
CREATE TABLE ranges
(n1 int,
n2 int);
INSERT INTO ranges
VALUES (9,10),(11,19),(29,44),(45,51),(56,60);
SELECT n FROM ranges
RIGHT JOIN generate_series(15,60) n
ON (n1 <= n AND n <= n2) WHERE n1 IS NULL;
``` | I use tables that have a dimdate or count data to do this kind of calculation, but you could also do this using the identity column of a table that has at least 60 sequential identities.
Your other option is to select 60 or so rows from another table, and use the RowNumber() function. You would then right join to that... |
131,751 | Hi I have a table that has start and end columns that has the values
```
Start End
9 10
11 19
29 44
45 51
56 60
```
Now if I give the range like `15 to 60` I need to return the values that not being covered in the above range.
The output I am expecting is - `20,21,22,23,24,25,26,27,28,5... | 2016/03/09 | [
"https://dba.stackexchange.com/questions/131751",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/89222/"
] | In postgresql:
```
CREATE TABLE ranges
(n1 int,
n2 int);
INSERT INTO ranges
VALUES (9,10),(11,19),(29,44),(45,51),(56,60);
SELECT n FROM ranges
RIGHT JOIN generate_series(15,60) n
ON (n1 <= n AND n <= n2) WHERE n1 IS NULL;
``` | This a solution for MS SQL Server 2008 and above
As alluded to by @Zane, this is best achieved using a numbers table, which for this exercise we'll create and populate with 100 numbers. If you already have your own Numbers table, feel free to substitute it in the final query,
```
if object_id('tempdb..#nums') is not ... |
66,389,960 | I am trying to reproduce this logic but using material-ui useStyle
```
<div className={'container ' + (state.unlocked ? 'containerUnlocked' : '')}>
```
I imagined it would be something similar to this :
```
<div className={`${classes.container} + ${state.unlocked} ? ${classes.spacious} : ''`}>
```
But it does... | 2021/02/26 | [
"https://Stackoverflow.com/questions/66389960",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11149106/"
] | The comments here have done a great job explaining why this doesn't work. Here's an elaboration a bit more on why the multiplication technique does work, and why the division technique doesn't.
Let's begin with multiplication. Suppose you want to compute 200 × 10. You could compute that by evaluating 200 × (9 + 1), or... | I assume that efficiency is not a concern here, that it is just for fun (or a homework?).
As explained already, you cannot divide by 10 with bit shifting as easily as you can multiply by 10.
However, It is quite possible to use bit shifting for such a division, except that more shiftings are necessary.
For example, ... |
66,389,960 | I am trying to reproduce this logic but using material-ui useStyle
```
<div className={'container ' + (state.unlocked ? 'containerUnlocked' : '')}>
```
I imagined it would be something similar to this :
```
<div className={`${classes.container} + ${state.unlocked} ? ${classes.spacious} : ''`}>
```
But it does... | 2021/02/26 | [
"https://Stackoverflow.com/questions/66389960",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11149106/"
] | The comments here have done a great job explaining why this doesn't work. Here's an elaboration a bit more on why the multiplication technique does work, and why the division technique doesn't.
Let's begin with multiplication. Suppose you want to compute 200 × 10. You could compute that by evaluating 200 × (9 + 1), or... | You've gotten good answers, but allow me to offer another view of this that might be simpler. This was the multiplication:
```
a = 20<<3
b = 20<<1
a + b
```
And you wanted to do division like this:
```
a = 20>>3
b = 20>>1
a + b
```
The problem here is that you only have reversed the individual parts. You ne... |
66,389,960 | I am trying to reproduce this logic but using material-ui useStyle
```
<div className={'container ' + (state.unlocked ? 'containerUnlocked' : '')}>
```
I imagined it would be something similar to this :
```
<div className={`${classes.container} + ${state.unlocked} ? ${classes.spacious} : ''`}>
```
But it does... | 2021/02/26 | [
"https://Stackoverflow.com/questions/66389960",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11149106/"
] | I assume that efficiency is not a concern here, that it is just for fun (or a homework?).
As explained already, you cannot divide by 10 with bit shifting as easily as you can multiply by 10.
However, It is quite possible to use bit shifting for such a division, except that more shiftings are necessary.
For example, ... | You've gotten good answers, but allow me to offer another view of this that might be simpler. This was the multiplication:
```
a = 20<<3
b = 20<<1
a + b
```
And you wanted to do division like this:
```
a = 20>>3
b = 20>>1
a + b
```
The problem here is that you only have reversed the individual parts. You ne... |
10,428,663 | I have a class that I want to extend the WPF Window class. I cant find the class to extend. I think it's in the `System.Windows` namespace, but I have no access to it. Can anyone help.
Please let me know if you require anymore information.
I am building the project as a class library.
Current references are:
```
M... | 2012/05/03 | [
"https://Stackoverflow.com/questions/10428663",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/589195/"
] | You need to add a reference to PresentationFramework (in PresentationFramework.dll) | The [Window](http://msdn.microsoft.com/en-us/library/system.windows.window.aspx) class is declared in the PresentationFramework.dll assembly, so you need to add a reference to that. |
18,581,110 | Since the iOS SDK 3.0 of Google Analytics has been released, plenty of changes have been made with the API. There is one big problem we encounter that has to do with the anonymize IP feature.
In Germany one has to anonymize the IPs by law when using some tracking framework. With the previous version of the SDK (2.0) i... | 2013/09/02 | [
"https://Stackoverflow.com/questions/18581110",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1517077/"
] | Work for me:
```
[tracker set:kGAIAnonymizeIp value:[@NO stringValue]];
```
or
```
[tracker set:kGAIAnonymizeIp value:[@YES stringValue]];
``` | I am trying the following method:
```
[self.tracker set:@"kGAIAnonymizeIp" value:@"YES"];
```
If I did
```
[self.tracker set:kGAIAnonymizeIp value:@"YES"];
```
like in the other answer on here, it gave me an error saying the kGAIAnonymizeIp is an undeclared identifier.
Not sure if what I did works or is even ... |
18,581,110 | Since the iOS SDK 3.0 of Google Analytics has been released, plenty of changes have been made with the API. There is one big problem we encounter that has to do with the anonymize IP feature.
In Germany one has to anonymize the IPs by law when using some tracking framework. With the previous version of the SDK (2.0) i... | 2013/09/02 | [
"https://Stackoverflow.com/questions/18581110",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1517077/"
] | Work for me:
```
[tracker set:kGAIAnonymizeIp value:[@NO stringValue]];
```
or
```
[tracker set:kGAIAnonymizeIp value:[@YES stringValue]];
``` | You're getting an error with `kGAIAnonymizeIp` because it's defined in `GAIFields.h`, which isn't normally imported.
First import the header:
```
#import "GAIFields.h"
```
Then set the value:
```
[tracker set:kGAIAnonymizeIp value:[@YES stringValue]];
``` |
18,581,110 | Since the iOS SDK 3.0 of Google Analytics has been released, plenty of changes have been made with the API. There is one big problem we encounter that has to do with the anonymize IP feature.
In Germany one has to anonymize the IPs by law when using some tracking framework. With the previous version of the SDK (2.0) i... | 2013/09/02 | [
"https://Stackoverflow.com/questions/18581110",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1517077/"
] | Work for me:
```
[tracker set:kGAIAnonymizeIp value:[@NO stringValue]];
```
or
```
[tracker set:kGAIAnonymizeIp value:[@YES stringValue]];
``` | `[tracker set:kGAIAnonymizeIp value:@"1"];`
See the [Anonymize IP](https://developers.google.com/analytics/devguides/collection/ios/v3/advanced#anonymizeIp) section of the Google Analytics iOS v3 SDK documentation. |
18,581,110 | Since the iOS SDK 3.0 of Google Analytics has been released, plenty of changes have been made with the API. There is one big problem we encounter that has to do with the anonymize IP feature.
In Germany one has to anonymize the IPs by law when using some tracking framework. With the previous version of the SDK (2.0) i... | 2013/09/02 | [
"https://Stackoverflow.com/questions/18581110",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1517077/"
] | Work for me:
```
[tracker set:kGAIAnonymizeIp value:[@NO stringValue]];
```
or
```
[tracker set:kGAIAnonymizeIp value:[@YES stringValue]];
``` | Update for Google Analytics 4 from its [documentation](https://support.google.com/firebase/answer/9019185?hl=en#IP):
>
> In Google Analytics 4, IP anonymization is not necessary since IP
> addresses are not logged or stored.
>
>
> |
18,581,110 | Since the iOS SDK 3.0 of Google Analytics has been released, plenty of changes have been made with the API. There is one big problem we encounter that has to do with the anonymize IP feature.
In Germany one has to anonymize the IPs by law when using some tracking framework. With the previous version of the SDK (2.0) i... | 2013/09/02 | [
"https://Stackoverflow.com/questions/18581110",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1517077/"
] | You're getting an error with `kGAIAnonymizeIp` because it's defined in `GAIFields.h`, which isn't normally imported.
First import the header:
```
#import "GAIFields.h"
```
Then set the value:
```
[tracker set:kGAIAnonymizeIp value:[@YES stringValue]];
``` | I am trying the following method:
```
[self.tracker set:@"kGAIAnonymizeIp" value:@"YES"];
```
If I did
```
[self.tracker set:kGAIAnonymizeIp value:@"YES"];
```
like in the other answer on here, it gave me an error saying the kGAIAnonymizeIp is an undeclared identifier.
Not sure if what I did works or is even ... |
18,581,110 | Since the iOS SDK 3.0 of Google Analytics has been released, plenty of changes have been made with the API. There is one big problem we encounter that has to do with the anonymize IP feature.
In Germany one has to anonymize the IPs by law when using some tracking framework. With the previous version of the SDK (2.0) i... | 2013/09/02 | [
"https://Stackoverflow.com/questions/18581110",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1517077/"
] | `[tracker set:kGAIAnonymizeIp value:@"1"];`
See the [Anonymize IP](https://developers.google.com/analytics/devguides/collection/ios/v3/advanced#anonymizeIp) section of the Google Analytics iOS v3 SDK documentation. | I am trying the following method:
```
[self.tracker set:@"kGAIAnonymizeIp" value:@"YES"];
```
If I did
```
[self.tracker set:kGAIAnonymizeIp value:@"YES"];
```
like in the other answer on here, it gave me an error saying the kGAIAnonymizeIp is an undeclared identifier.
Not sure if what I did works or is even ... |
18,581,110 | Since the iOS SDK 3.0 of Google Analytics has been released, plenty of changes have been made with the API. There is one big problem we encounter that has to do with the anonymize IP feature.
In Germany one has to anonymize the IPs by law when using some tracking framework. With the previous version of the SDK (2.0) i... | 2013/09/02 | [
"https://Stackoverflow.com/questions/18581110",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1517077/"
] | You're getting an error with `kGAIAnonymizeIp` because it's defined in `GAIFields.h`, which isn't normally imported.
First import the header:
```
#import "GAIFields.h"
```
Then set the value:
```
[tracker set:kGAIAnonymizeIp value:[@YES stringValue]];
``` | Update for Google Analytics 4 from its [documentation](https://support.google.com/firebase/answer/9019185?hl=en#IP):
>
> In Google Analytics 4, IP anonymization is not necessary since IP
> addresses are not logged or stored.
>
>
> |
18,581,110 | Since the iOS SDK 3.0 of Google Analytics has been released, plenty of changes have been made with the API. There is one big problem we encounter that has to do with the anonymize IP feature.
In Germany one has to anonymize the IPs by law when using some tracking framework. With the previous version of the SDK (2.0) i... | 2013/09/02 | [
"https://Stackoverflow.com/questions/18581110",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1517077/"
] | `[tracker set:kGAIAnonymizeIp value:@"1"];`
See the [Anonymize IP](https://developers.google.com/analytics/devguides/collection/ios/v3/advanced#anonymizeIp) section of the Google Analytics iOS v3 SDK documentation. | Update for Google Analytics 4 from its [documentation](https://support.google.com/firebase/answer/9019185?hl=en#IP):
>
> In Google Analytics 4, IP anonymization is not necessary since IP
> addresses are not logged or stored.
>
>
> |
69,348,931 | I am trying to create a diagram in PlantUML and can't get my head around connecting two actons.
The source code looks like this:
```
@startuml
skinparam rectangleBorderThickness 1
|#orange|Registrar|
#lightgray:**Introduce document to the system**;
:Register Document;
if (Work on the document is required?) then (Yes)... | 2021/09/27 | [
"https://Stackoverflow.com/questions/69348931",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12467038/"
] | Basically you can do that. A Decision is an ActivityNode and can behavior. Usually the behavior of a Decision is of limited nature. So in your case I'd guess it would be "document smells goot; fine" or "smells bad; do it again". However, this would not make the diagram much clearer or easier to read. I would just leave... | **NB** This is the answer for the previous question of the OP where he wanted a direct ControlFlow from `Perform tasks...` to `Archive document`
I don't know whether PlantUML would allow this, but if it does not it would be right. If you create the ControlFlow as you sketched this would cause the middle Action to crea... |
34,134,741 | i am working in regex my regex is `/\[([^]\s]+).([^]]+)\]/g` this works great in PHP for `[http://sdgdssd.com fghdfhdhhd]`
but when i use this regex for javascript it do not match with this input string
my input is `[http://sdgdssd.com fghdfhdhhd]` | 2015/12/07 | [
"https://Stackoverflow.com/questions/34134741",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4693437/"
] | In JavaScript regex, you must **always** escape the `]` inside a character class:
```
\[([^\]\s]+).([^\]]+)\]
```
See the [regex demo](https://regex101.com/r/wY4lR7/1)
JS parsed `[^]` as \*any character including a newline in your regex, and the final character class `]` symbol as a literal `]`.
In this regard, *J... | I would like to add this little fact about translating PHP `preg_replace` Regex in JavaScript `.replace` Regex :
```
<?php preg_replace("/([^0-9\,\.\-])/i";"";"-1 220 025.47 $"); ?>
Result : "-1220025.47"
```
with PHP, you have to use the quotes `"..."` around the Regex, a point comma to separate the Regex with the ... |
65,794,520 | So, I was wondering if it possible to do the next thing in c#:
I have a DB model - let's say it is `Car`:
```
public class Car {
public string Id {get;set;}
public string Name {get;set}
}
```
And a DbSet for this type in `someDbContext`:
```
public DbSet<Car> Cars {get;set;}
```
And also I have a `CarDto`
`... | 2021/01/19 | [
"https://Stackoverflow.com/questions/65794520",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7545390/"
] | If you just want to handle rewriting property accesses, you can use an `ExpressionVisitor` which looks a bit like this:
```
public class Program
{
public static void Main()
{
Expression<Func<Car, bool>> expr = x => x.Name == "BMW";
var replaced = ReplaceParameter<CarDto>(expr);
}
priva... | You have a whole bunch of options:
1. Derive your Dto class from the context class. That way you can use polymorphism as normal.
2. Extract an interface and implement it in both your Dto and context classes. Same as above then, use polymorphism.
3. Use duck-typing. In C#, that's done with the `dynamic` keyword. You lo... |
12,445 | I know ため can be translated into English as "for" such-and-such.
But is it appropriate to use it to thank some one for doing something?
For example, "Thank you for your email address." Would it be grammatically accurate to say: メールアドレスためありがとうございます。
Google translate seems to understand the sentence perfectly fine. B... | 2013/07/30 | [
"https://japanese.stackexchange.com/questions/12445",
"https://japanese.stackexchange.com",
"https://japanese.stackexchange.com/users/3681/"
] | Using ため as the 'for' in 'thank you for' is strange.
Off the top of my head I can think of 4 ways we normally use ありがとう to say thanks for something.
>
> 1. masu-stem of the verb + ありがとう (this one's particularly formal)
>
> メールアドレスを教えていただき有難う御座います。
>
> Thank you for telling me your email address.
> 2. te-form... | It might be easier to understand the usage if you think of `ため` as "for the sake of (smb/smth)".
>
> 会社{かいしゃ}の**ため**に働{はたら}く
>
> Work **in interests** of the company [=for the sake of the company]
>
>
> 彼女{かのじょ}は娘{むすめ}の**ため**なら何でもやる
>
> She will do anything **for** her daughter. [=for the sake of her daugh... |
10,643,229 | I have a URL which gives an xml output. It requires a username and password which I can access through a browser using the format:
>
> <http://username:password@url.com>
>
>
>
However when I try to access it through a php file I get a 403 forbidden:
```
$url = "http://username:password@url.com";
$xml = @simpl... | 2012/05/17 | [
"https://Stackoverflow.com/questions/10643229",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1083813/"
] | The format -- <http://username:password@url.com> -- is a convention the browser understands; but if you're making an HTTP request programmatically, you'll need to set the HTTP Headers for basic authentication. I don't think \*simplexml\_load\_file\* supports HTTP headers, but you could try using for example:
```
fopen... | <http://pear.php.net/package/HTTP_Request2> allows you to do a
```
$basicAuthRequest = new HTTP_Request2('http://user:password@url.com');
```
There's also an example of using curl to set the `CURL_USERPWD` of the request [here](https://stackoverflow.com/a/5192086/705198) |
10,643,229 | I have a URL which gives an xml output. It requires a username and password which I can access through a browser using the format:
>
> <http://username:password@url.com>
>
>
>
However when I try to access it through a php file I get a 403 forbidden:
```
$url = "http://username:password@url.com";
$xml = @simpl... | 2012/05/17 | [
"https://Stackoverflow.com/questions/10643229",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1083813/"
] | You should try something like this :
```
$url = "http://username:password@url.com";
$xml = file_get_contents($url);
$data = new SimpleXMLElement($xml);
``` | The format -- <http://username:password@url.com> -- is a convention the browser understands; but if you're making an HTTP request programmatically, you'll need to set the HTTP Headers for basic authentication. I don't think \*simplexml\_load\_file\* supports HTTP headers, but you could try using for example:
```
fopen... |
10,643,229 | I have a URL which gives an xml output. It requires a username and password which I can access through a browser using the format:
>
> <http://username:password@url.com>
>
>
>
However when I try to access it through a php file I get a 403 forbidden:
```
$url = "http://username:password@url.com";
$xml = @simpl... | 2012/05/17 | [
"https://Stackoverflow.com/questions/10643229",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1083813/"
] | The format -- <http://username:password@url.com> -- is a convention the browser understands; but if you're making an HTTP request programmatically, you'll need to set the HTTP Headers for basic authentication. I don't think \*simplexml\_load\_file\* supports HTTP headers, but you could try using for example:
```
fopen... | but it loads only integers. not loaded strings in xml content. refer the below set of result.
```
[2] => SimpleXMLElement Object
(
[id] => 145894
[name] => SimpleXMLElement Object
(
)
[description] => SimpleXMLElement... |
10,643,229 | I have a URL which gives an xml output. It requires a username and password which I can access through a browser using the format:
>
> <http://username:password@url.com>
>
>
>
However when I try to access it through a php file I get a 403 forbidden:
```
$url = "http://username:password@url.com";
$xml = @simpl... | 2012/05/17 | [
"https://Stackoverflow.com/questions/10643229",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1083813/"
] | For XML with basic auth URL try this
```
$username = 'admin';
$password = 'mypass';
$server = 'myserver.com';
$context = stream_context_create(array(
'http' => array(
'header' => "Authorization: Basic " . base64_encode("$username:$password")
)
)
);
$data = file_get_contents("http://$s... | The format -- <http://username:password@url.com> -- is a convention the browser understands; but if you're making an HTTP request programmatically, you'll need to set the HTTP Headers for basic authentication. I don't think \*simplexml\_load\_file\* supports HTTP headers, but you could try using for example:
```
fopen... |
10,643,229 | I have a URL which gives an xml output. It requires a username and password which I can access through a browser using the format:
>
> <http://username:password@url.com>
>
>
>
However when I try to access it through a php file I get a 403 forbidden:
```
$url = "http://username:password@url.com";
$xml = @simpl... | 2012/05/17 | [
"https://Stackoverflow.com/questions/10643229",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1083813/"
] | You should try something like this :
```
$url = "http://username:password@url.com";
$xml = file_get_contents($url);
$data = new SimpleXMLElement($xml);
``` | <http://pear.php.net/package/HTTP_Request2> allows you to do a
```
$basicAuthRequest = new HTTP_Request2('http://user:password@url.com');
```
There's also an example of using curl to set the `CURL_USERPWD` of the request [here](https://stackoverflow.com/a/5192086/705198) |
10,643,229 | I have a URL which gives an xml output. It requires a username and password which I can access through a browser using the format:
>
> <http://username:password@url.com>
>
>
>
However when I try to access it through a php file I get a 403 forbidden:
```
$url = "http://username:password@url.com";
$xml = @simpl... | 2012/05/17 | [
"https://Stackoverflow.com/questions/10643229",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1083813/"
] | For XML with basic auth URL try this
```
$username = 'admin';
$password = 'mypass';
$server = 'myserver.com';
$context = stream_context_create(array(
'http' => array(
'header' => "Authorization: Basic " . base64_encode("$username:$password")
)
)
);
$data = file_get_contents("http://$s... | <http://pear.php.net/package/HTTP_Request2> allows you to do a
```
$basicAuthRequest = new HTTP_Request2('http://user:password@url.com');
```
There's also an example of using curl to set the `CURL_USERPWD` of the request [here](https://stackoverflow.com/a/5192086/705198) |
10,643,229 | I have a URL which gives an xml output. It requires a username and password which I can access through a browser using the format:
>
> <http://username:password@url.com>
>
>
>
However when I try to access it through a php file I get a 403 forbidden:
```
$url = "http://username:password@url.com";
$xml = @simpl... | 2012/05/17 | [
"https://Stackoverflow.com/questions/10643229",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1083813/"
] | You should try something like this :
```
$url = "http://username:password@url.com";
$xml = file_get_contents($url);
$data = new SimpleXMLElement($xml);
``` | but it loads only integers. not loaded strings in xml content. refer the below set of result.
```
[2] => SimpleXMLElement Object
(
[id] => 145894
[name] => SimpleXMLElement Object
(
)
[description] => SimpleXMLElement... |
10,643,229 | I have a URL which gives an xml output. It requires a username and password which I can access through a browser using the format:
>
> <http://username:password@url.com>
>
>
>
However when I try to access it through a php file I get a 403 forbidden:
```
$url = "http://username:password@url.com";
$xml = @simpl... | 2012/05/17 | [
"https://Stackoverflow.com/questions/10643229",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1083813/"
] | You should try something like this :
```
$url = "http://username:password@url.com";
$xml = file_get_contents($url);
$data = new SimpleXMLElement($xml);
``` | For XML with basic auth URL try this
```
$username = 'admin';
$password = 'mypass';
$server = 'myserver.com';
$context = stream_context_create(array(
'http' => array(
'header' => "Authorization: Basic " . base64_encode("$username:$password")
)
)
);
$data = file_get_contents("http://$s... |
10,643,229 | I have a URL which gives an xml output. It requires a username and password which I can access through a browser using the format:
>
> <http://username:password@url.com>
>
>
>
However when I try to access it through a php file I get a 403 forbidden:
```
$url = "http://username:password@url.com";
$xml = @simpl... | 2012/05/17 | [
"https://Stackoverflow.com/questions/10643229",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1083813/"
] | For XML with basic auth URL try this
```
$username = 'admin';
$password = 'mypass';
$server = 'myserver.com';
$context = stream_context_create(array(
'http' => array(
'header' => "Authorization: Basic " . base64_encode("$username:$password")
)
)
);
$data = file_get_contents("http://$s... | but it loads only integers. not loaded strings in xml content. refer the below set of result.
```
[2] => SimpleXMLElement Object
(
[id] => 145894
[name] => SimpleXMLElement Object
(
)
[description] => SimpleXMLElement... |
93,117 | I started a Yahoo! mail account a while ago. This was meant to be just a throwaway/spam email account. However, because it was easy to pass around, I ended up depending on it quite heavily.
Since I didn't pay attention while filling the account creation form I am wondering if it is possible/how to change your Secret ... | 2016/05/24 | [
"https://webapps.stackexchange.com/questions/93117",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/124364/"
] | I no longer see a Secret Question for you to answer in order to get a password changed. They now verify it is you by using a secondary email address to send you a code or they will text you a code to your phone number to verify it is you. Those are both in the upper right of the screen under the gear and then account i... | 1. Go to Yahoo Mail. Visit the Yahoo Mail website using any web browser on your computer.
2. Sign In. Enter your Yahoo ID or username and password in the fields provided. Click the “Sign In” button to access your account.
3. Go to Account Info. Click the gear button on the top right corner of the page to display a menu... |
93,117 | I started a Yahoo! mail account a while ago. This was meant to be just a throwaway/spam email account. However, because it was easy to pass around, I ended up depending on it quite heavily.
Since I didn't pay attention while filling the account creation form I am wondering if it is possible/how to change your Secret ... | 2016/05/24 | [
"https://webapps.stackexchange.com/questions/93117",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/124364/"
] | I no longer see a Secret Question for you to answer in order to get a password changed. They now verify it is you by using a secondary email address to send you a code or they will text you a code to your phone number to verify it is you. Those are both in the upper right of the screen under the gear and then account i... | Yahoo has recently removed the security questions, instead they want your personal phone number. Here's some info [from a Yahoo rep in their Help forum](https://forums.yahoo.net/t5/Account-security/how-do-I-change-my-security-questions/td-p/11483):
>
> The security of your Yahoo account is our top priority. Because o... |
93,117 | I started a Yahoo! mail account a while ago. This was meant to be just a throwaway/spam email account. However, because it was easy to pass around, I ended up depending on it quite heavily.
Since I didn't pay attention while filling the account creation form I am wondering if it is possible/how to change your Secret ... | 2016/05/24 | [
"https://webapps.stackexchange.com/questions/93117",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/124364/"
] | 1. Go to Yahoo Mail. Visit the Yahoo Mail website using any web browser on your computer.
2. Sign In. Enter your Yahoo ID or username and password in the fields provided. Click the “Sign In” button to access your account.
3. Go to Account Info. Click the gear button on the top right corner of the page to display a menu... | Yahoo has recently removed the security questions, instead they want your personal phone number. Here's some info [from a Yahoo rep in their Help forum](https://forums.yahoo.net/t5/Account-security/how-do-I-change-my-security-questions/td-p/11483):
>
> The security of your Yahoo account is our top priority. Because o... |
35,504,630 | The normal tools we use for error tracking native apps don't really work since the crash reports contain minified js. The tools we use for web apps don't seem to support react native. Are there services that do support react native and if not do we have any other options to get useful crash reports? | 2016/02/19 | [
"https://Stackoverflow.com/questions/35504630",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/109306/"
] | Heads up that [Bugsnag](https://www.bugsnag.com) released [official support for React Native](https://github.com/bugsnag/bugsnag-react-native) to get crash and error data on both the js layer and the underlying OS.
It does handle minified JS using sourcemaps. These can be hosted by you and referenced from Bugsnag or h... | Bug snag - <https://docs.bugsnag.com/platforms/react-native/react-native/>
Crashlytics - <https://www.npmjs.com/package/@react-native-firebase/crashlytics>
This are tools used for React native to report bugs. Hope it helps ! Thank you |
35,504,630 | The normal tools we use for error tracking native apps don't really work since the crash reports contain minified js. The tools we use for web apps don't seem to support react native. Are there services that do support react native and if not do we have any other options to get useful crash reports? | 2016/02/19 | [
"https://Stackoverflow.com/questions/35504630",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/109306/"
] | Sentry and BugSnag both have dedicated SDKs for React Native:
<https://github.com/getsentry/react-native-sentry> ([doc](https://docs.sentry.io/clients/react-native/))
<https://github.com/bugsnag/bugsnag-react-native> ([doc](https://docs.bugsnag.com/platforms/react-native/))
They both handle sourcemaps. | I know of two ways this is being done. First, Crashyltics. I use it, but it requires a few tweaks apparently to bubble up the javascript side of the fence. Here's a great article by delivery.com on what's involved with that...
[Add Crashlytics to your React Native iOS app](https://medium.com/delivery-com-engineering/a... |
35,504,630 | The normal tools we use for error tracking native apps don't really work since the crash reports contain minified js. The tools we use for web apps don't seem to support react native. Are there services that do support react native and if not do we have any other options to get useful crash reports? | 2016/02/19 | [
"https://Stackoverflow.com/questions/35504630",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/109306/"
] | [TL/DR]
We created a react-native-bugsnag lib before the official bugsnag lib was out, but it's now deprecated.
Use the official instead.
[Long version]
~~We were also looking for a way to report errors on react-native and since I was not really happy with the existing solutions I found (Crashlytics, and sentry), ... | Bug snag - <https://docs.bugsnag.com/platforms/react-native/react-native/>
Crashlytics - <https://www.npmjs.com/package/@react-native-firebase/crashlytics>
This are tools used for React native to report bugs. Hope it helps ! Thank you |
35,504,630 | The normal tools we use for error tracking native apps don't really work since the crash reports contain minified js. The tools we use for web apps don't seem to support react native. Are there services that do support react native and if not do we have any other options to get useful crash reports? | 2016/02/19 | [
"https://Stackoverflow.com/questions/35504630",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/109306/"
] | Sentry and BugSnag both have dedicated SDKs for React Native:
<https://github.com/getsentry/react-native-sentry> ([doc](https://docs.sentry.io/clients/react-native/))
<https://github.com/bugsnag/bugsnag-react-native> ([doc](https://docs.bugsnag.com/platforms/react-native/))
They both handle sourcemaps. | Bug snag - <https://docs.bugsnag.com/platforms/react-native/react-native/>
Crashlytics - <https://www.npmjs.com/package/@react-native-firebase/crashlytics>
This are tools used for React native to report bugs. Hope it helps ! Thank you |
35,504,630 | The normal tools we use for error tracking native apps don't really work since the crash reports contain minified js. The tools we use for web apps don't seem to support react native. Are there services that do support react native and if not do we have any other options to get useful crash reports? | 2016/02/19 | [
"https://Stackoverflow.com/questions/35504630",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/109306/"
] | [Instabug](https://instabug.com/) and [AppCenter](https://appcenter.ms/apps) now both provide react-native crash reporting tools with js de-obfuscation, but I haven't tested any of the 2 for crash reports. | Bug snag - <https://docs.bugsnag.com/platforms/react-native/react-native/>
Crashlytics - <https://www.npmjs.com/package/@react-native-firebase/crashlytics>
This are tools used for React native to report bugs. Hope it helps ! Thank you |
35,504,630 | The normal tools we use for error tracking native apps don't really work since the crash reports contain minified js. The tools we use for web apps don't seem to support react native. Are there services that do support react native and if not do we have any other options to get useful crash reports? | 2016/02/19 | [
"https://Stackoverflow.com/questions/35504630",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/109306/"
] | Heads up that [Bugsnag](https://www.bugsnag.com) released [official support for React Native](https://github.com/bugsnag/bugsnag-react-native) to get crash and error data on both the js layer and the underlying OS.
It does handle minified JS using sourcemaps. These can be hosted by you and referenced from Bugsnag or h... | I know of two ways this is being done. First, Crashyltics. I use it, but it requires a few tweaks apparently to bubble up the javascript side of the fence. Here's a great article by delivery.com on what's involved with that...
[Add Crashlytics to your React Native iOS app](https://medium.com/delivery-com-engineering/a... |
35,504,630 | The normal tools we use for error tracking native apps don't really work since the crash reports contain minified js. The tools we use for web apps don't seem to support react native. Are there services that do support react native and if not do we have any other options to get useful crash reports? | 2016/02/19 | [
"https://Stackoverflow.com/questions/35504630",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/109306/"
] | Heads up that [Bugsnag](https://www.bugsnag.com) released [official support for React Native](https://github.com/bugsnag/bugsnag-react-native) to get crash and error data on both the js layer and the underlying OS.
It does handle minified JS using sourcemaps. These can be hosted by you and referenced from Bugsnag or h... | [TL/DR]
We created a react-native-bugsnag lib before the official bugsnag lib was out, but it's now deprecated.
Use the official instead.
[Long version]
~~We were also looking for a way to report errors on react-native and since I was not really happy with the existing solutions I found (Crashlytics, and sentry), ... |
35,504,630 | The normal tools we use for error tracking native apps don't really work since the crash reports contain minified js. The tools we use for web apps don't seem to support react native. Are there services that do support react native and if not do we have any other options to get useful crash reports? | 2016/02/19 | [
"https://Stackoverflow.com/questions/35504630",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/109306/"
] | Heads up that [Bugsnag](https://www.bugsnag.com) released [official support for React Native](https://github.com/bugsnag/bugsnag-react-native) to get crash and error data on both the js layer and the underlying OS.
It does handle minified JS using sourcemaps. These can be hosted by you and referenced from Bugsnag or h... | Also now React Native + Code Push + Bugsnag for a really pleasant bug fixing relationship
<https://blog.bugsnag.com/react-native-plus-code-push/> |
35,504,630 | The normal tools we use for error tracking native apps don't really work since the crash reports contain minified js. The tools we use for web apps don't seem to support react native. Are there services that do support react native and if not do we have any other options to get useful crash reports? | 2016/02/19 | [
"https://Stackoverflow.com/questions/35504630",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/109306/"
] | Sentry and BugSnag both have dedicated SDKs for React Native:
<https://github.com/getsentry/react-native-sentry> ([doc](https://docs.sentry.io/clients/react-native/))
<https://github.com/bugsnag/bugsnag-react-native> ([doc](https://docs.bugsnag.com/platforms/react-native/))
They both handle sourcemaps. | [Instabug](https://instabug.com/) and [AppCenter](https://appcenter.ms/apps) now both provide react-native crash reporting tools with js de-obfuscation, but I haven't tested any of the 2 for crash reports. |
35,504,630 | The normal tools we use for error tracking native apps don't really work since the crash reports contain minified js. The tools we use for web apps don't seem to support react native. Are there services that do support react native and if not do we have any other options to get useful crash reports? | 2016/02/19 | [
"https://Stackoverflow.com/questions/35504630",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/109306/"
] | [TL/DR]
We created a react-native-bugsnag lib before the official bugsnag lib was out, but it's now deprecated.
Use the official instead.
[Long version]
~~We were also looking for a way to report errors on react-native and since I was not really happy with the existing solutions I found (Crashlytics, and sentry), ... | Also now React Native + Code Push + Bugsnag for a really pleasant bug fixing relationship
<https://blog.bugsnag.com/react-native-plus-code-push/> |
27,171,589 | I'm trying to use subprocess to read a file stored in a remote server.
```
import subprocess
import sys
ssh = subprocess.Popen(['ssh', 'hjh:passwd@myserver', 'cat', 'data/test.txt'],
shell=False,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
result = ssh.stdo... | 2014/11/27 | [
"https://Stackoverflow.com/questions/27171589",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1702564/"
] | I suppose that Windows is unable to find the SSH executable. Check what happens when you type `ssh` in the `cmd.exe`. Try adding a full path to the SSH client executable in the Popen call or add SSH's directory to the PATH environment variable. | It seems like "ssh" cannot be resolved. I would either fully qualify the location to the ssh executable in the Popen constructor call and/or it is in the searchable PATH. |
45,163,559 | I'm struggling around with Silex and its Project Structure. I'm using PHP for around 10 years now, but I always used tools like Np++. Now I get started with PhpStorm and I feel like a total newbie.
What I'm trying, is to create a Silex Project. After starting a new Composer Project I get the following Structure:
```
... | 2017/07/18 | [
"https://Stackoverflow.com/questions/45163559",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1919880/"
] | Ok so I found a solution to this `LockServerFile` is the equivalent of hitting the `Edit Workbook` button.
When opening with VBA you can follow the open command with:
```
Workbooks.Open ThisWorkbook.Sheets("Filelist").Cells(i, 2)
ActiveWorkbook.LockServerFile
```
Solved my problem for now if anyone comes across a s... | `ActiveWorkbook.LockServerFile`
The above code will lock that workbook for editing.
You can edit the workbook and you can save it.
But when you try to open the workbook again by manually, the changes you had done will not reflect in that sheet. |
13,357,851 | I have an object hierarchy like this (dismissing all fields like id, setters/getters, etc.):
```
@Entity
class A {
@OneToOne(cascade=CascadeType.ALL)
private B b;
}
@Entity
class B {
@OneToOne(cascade=CascadeType.ALL)
private A a;
@OneToOne(cascade=CascadeType.ALL)
private C c;
}
@Entity
cla... | 2012/11/13 | [
"https://Stackoverflow.com/questions/13357851",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/53321/"
] | You may facing a problem with stdafx.h issue
At least you should try to put `#include "stdafx.h` before every other include
Or
you could try to set your project property to not use stdafx.h
```
1. right click on project and select Properties
2. go to C/C++ -> Precompiled Headers
3. select "Not Using Precompiled Hea... | Try making it as simple as possible. Then add parts back until you find your error.
Does this work?
```
#include "complex.h"
int main()
{
Complex c(3.0, -1.0);
return 0;
};
``` |
13,357,851 | I have an object hierarchy like this (dismissing all fields like id, setters/getters, etc.):
```
@Entity
class A {
@OneToOne(cascade=CascadeType.ALL)
private B b;
}
@Entity
class B {
@OneToOne(cascade=CascadeType.ALL)
private A a;
@OneToOne(cascade=CascadeType.ALL)
private C c;
}
@Entity
cla... | 2012/11/13 | [
"https://Stackoverflow.com/questions/13357851",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/53321/"
] | You may facing a problem with stdafx.h issue
At least you should try to put `#include "stdafx.h` before every other include
Or
you could try to set your project property to not use stdafx.h
```
1. right click on project and select Properties
2. go to C/C++ -> Precompiled Headers
3. select "Not Using Precompiled Hea... | ```
#include <complex>
#include "complex.h"
```
That's a bad smell. It's possible that both those #include files use the same name for the header guard.
Try changing yours like this.
```
#ifndef MY_COMPLEX_H
#define MY_COMPLEX_H
```
.. And maybe rename your module from "complex" to something else, to avoid clashe... |
13,357,851 | I have an object hierarchy like this (dismissing all fields like id, setters/getters, etc.):
```
@Entity
class A {
@OneToOne(cascade=CascadeType.ALL)
private B b;
}
@Entity
class B {
@OneToOne(cascade=CascadeType.ALL)
private A a;
@OneToOne(cascade=CascadeType.ALL)
private C c;
}
@Entity
cla... | 2012/11/13 | [
"https://Stackoverflow.com/questions/13357851",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/53321/"
] | I think the problem is in your Complex.cpp. If there are errors compiling the code of the class, the class is unknown and so the identifier Complex, too.
After a quick view, everthing seem to be correct but your operator functions have some errors:
Incorrect:
```
//addition
Complex Complex::operator+(const ... | Try making it as simple as possible. Then add parts back until you find your error.
Does this work?
```
#include "complex.h"
int main()
{
Complex c(3.0, -1.0);
return 0;
};
``` |
13,357,851 | I have an object hierarchy like this (dismissing all fields like id, setters/getters, etc.):
```
@Entity
class A {
@OneToOne(cascade=CascadeType.ALL)
private B b;
}
@Entity
class B {
@OneToOne(cascade=CascadeType.ALL)
private A a;
@OneToOne(cascade=CascadeType.ALL)
private C c;
}
@Entity
cla... | 2012/11/13 | [
"https://Stackoverflow.com/questions/13357851",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/53321/"
] | ```
#include <complex>
#include "complex.h"
```
That's a bad smell. It's possible that both those #include files use the same name for the header guard.
Try changing yours like this.
```
#ifndef MY_COMPLEX_H
#define MY_COMPLEX_H
```
.. And maybe rename your module from "complex" to something else, to avoid clashe... | Try making it as simple as possible. Then add parts back until you find your error.
Does this work?
```
#include "complex.h"
int main()
{
Complex c(3.0, -1.0);
return 0;
};
``` |
13,357,851 | I have an object hierarchy like this (dismissing all fields like id, setters/getters, etc.):
```
@Entity
class A {
@OneToOne(cascade=CascadeType.ALL)
private B b;
}
@Entity
class B {
@OneToOne(cascade=CascadeType.ALL)
private A a;
@OneToOne(cascade=CascadeType.ALL)
private C c;
}
@Entity
cla... | 2012/11/13 | [
"https://Stackoverflow.com/questions/13357851",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/53321/"
] | I think the problem is in your Complex.cpp. If there are errors compiling the code of the class, the class is unknown and so the identifier Complex, too.
After a quick view, everthing seem to be correct but your operator functions have some errors:
Incorrect:
```
//addition
Complex Complex::operator+(const ... | ```
#include <complex>
#include "complex.h"
```
That's a bad smell. It's possible that both those #include files use the same name for the header guard.
Try changing yours like this.
```
#ifndef MY_COMPLEX_H
#define MY_COMPLEX_H
```
.. And maybe rename your module from "complex" to something else, to avoid clashe... |
57,341,298 | I created some custom component based on ConstraintLayout in Android Studio. First I created base abstract class called MyButton where I do some basic stuff (e.g. get references to my components). Next I created derived class called MySpecialButton that extends MyButton, but I have strange behavior when I attach onClic... | 2019/08/03 | [
"https://Stackoverflow.com/questions/57341298",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10116324/"
] | The scopeKey is 'scope' by default. You don't need to set it again.
For me it worked by doing server side change.
When I put string value in scope, it does not work
```
$data['scope'] = "admin";
```
But when I changed it to array, `$auth.hasScope('admin')` works;
```
$data['scope'] = array("admin", "test");
```
... | `scopeKey: 'scope'` should not be placed inside `strategies` object.
Put it directly in the `auth` object.
Take a look at [default config](https://github.com/nuxt-community/auth-module/blob/master/lib/module/defaults.js).
P.S. You can even delete this property from your `auth` config object, because `'scope'` is def... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.