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 |
|---|---|---|---|---|---|
6,508,519 | I want a user to be able to access objects (could be JSON or XML) using a restful syntax rather than having to use query strings.
So instead of `http://mywebsite.com/objects/get=obj1&get=obj2&get=someotherobject/` they could do something like `http://mywebsite.com/objects/obj1/obj2/` and the xml/JSON would be returned... | 2011/06/28 | [
"https://Stackoverflow.com/questions/6508519",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/277140/"
] | You need to install [Microsoft SQL Server Compact 4.0](http://www.microsoft.com/download/en/details.aspx?id=17876). | <http://forums.asp.net/t/1679349.aspx/1>
CypressBender
Re: Unable to retrieve metadata for \* Unable to find the requested .Net Framework Data Provider....
Aug 08, 2011 07:44 PM|LINK
I installed Microsoft SQL Server Compact 4.0, and that fixed the problem for me.
<http://www.microsoft.com/download/en/details.aspx?id=... |
44,718,405 | Is there a way to programmatically highlight/select text that is inside a TextInput component? | 2017/06/23 | [
"https://Stackoverflow.com/questions/44718405",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5890903/"
] | You can use `selectTextOnFocus` to achieve this. This will ensure that all text inside the `TextInput` is highlighted when the field is tapped into. | I don't know if there's a better way, but I found a workaround. The text has to be focused first. Here's an example
```
import React { Component } from 'react';
import { Button, TextInput, findNodeHandle } from 'react-native';
import TextInputState from 'react-native/lib/TextInputState';
class MyComponent extends Com... |
44,718,405 | Is there a way to programmatically highlight/select text that is inside a TextInput component? | 2017/06/23 | [
"https://Stackoverflow.com/questions/44718405",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5890903/"
] | You can use `selectTextOnFocus` to achieve this. This will ensure that all text inside the `TextInput` is highlighted when the field is tapped into. | `this.inputRef.focus()` sets focus to the `TextInput` component, and then the flag you set in the attributes `selectTextOnFocus` does the rest. |
44,718,405 | Is there a way to programmatically highlight/select text that is inside a TextInput component? | 2017/06/23 | [
"https://Stackoverflow.com/questions/44718405",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5890903/"
] | You can use `selectTextOnFocus` to achieve this. This will ensure that all text inside the `TextInput` is highlighted when the field is tapped into. | I'm here to share my findings. In a List, you might encounter that `selectTextOnFocus` is broken. In this case you can use this method `selection`. From React-Native I found this:
[](https://i.stack.imgur.com/wYR4O.png)
In my case I had trouble with ... |
44,718,405 | Is there a way to programmatically highlight/select text that is inside a TextInput component? | 2017/06/23 | [
"https://Stackoverflow.com/questions/44718405",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5890903/"
] | Actually you can, by accessing textInput's method by refs.
`<TextInput ref={input => this.myInput = input} selectTextOnFocus style={{height: 100, width: 100}} defaultValue='Hey there' />`
and where you want to select all text programmatically you can
`this.myInput.focus()`
works on iOS, not sure about android.
-... | I don't know if there's a better way, but I found a workaround. The text has to be focused first. Here's an example
```
import React { Component } from 'react';
import { Button, TextInput, findNodeHandle } from 'react-native';
import TextInputState from 'react-native/lib/TextInputState';
class MyComponent extends Com... |
44,718,405 | Is there a way to programmatically highlight/select text that is inside a TextInput component? | 2017/06/23 | [
"https://Stackoverflow.com/questions/44718405",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5890903/"
] | Actually you can, by accessing textInput's method by refs.
`<TextInput ref={input => this.myInput = input} selectTextOnFocus style={{height: 100, width: 100}} defaultValue='Hey there' />`
and where you want to select all text programmatically you can
`this.myInput.focus()`
works on iOS, not sure about android.
-... | `this.inputRef.focus()` sets focus to the `TextInput` component, and then the flag you set in the attributes `selectTextOnFocus` does the rest. |
44,718,405 | Is there a way to programmatically highlight/select text that is inside a TextInput component? | 2017/06/23 | [
"https://Stackoverflow.com/questions/44718405",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5890903/"
] | Actually you can, by accessing textInput's method by refs.
`<TextInput ref={input => this.myInput = input} selectTextOnFocus style={{height: 100, width: 100}} defaultValue='Hey there' />`
and where you want to select all text programmatically you can
`this.myInput.focus()`
works on iOS, not sure about android.
-... | I'm here to share my findings. In a List, you might encounter that `selectTextOnFocus` is broken. In this case you can use this method `selection`. From React-Native I found this:
[](https://i.stack.imgur.com/wYR4O.png)
In my case I had trouble with ... |
44,718,405 | Is there a way to programmatically highlight/select text that is inside a TextInput component? | 2017/06/23 | [
"https://Stackoverflow.com/questions/44718405",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5890903/"
] | I don't know if there's a better way, but I found a workaround. The text has to be focused first. Here's an example
```
import React { Component } from 'react';
import { Button, TextInput, findNodeHandle } from 'react-native';
import TextInputState from 'react-native/lib/TextInputState';
class MyComponent extends Com... | `this.inputRef.focus()` sets focus to the `TextInput` component, and then the flag you set in the attributes `selectTextOnFocus` does the rest. |
44,718,405 | Is there a way to programmatically highlight/select text that is inside a TextInput component? | 2017/06/23 | [
"https://Stackoverflow.com/questions/44718405",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5890903/"
] | I don't know if there's a better way, but I found a workaround. The text has to be focused first. Here's an example
```
import React { Component } from 'react';
import { Button, TextInput, findNodeHandle } from 'react-native';
import TextInputState from 'react-native/lib/TextInputState';
class MyComponent extends Com... | I'm here to share my findings. In a List, you might encounter that `selectTextOnFocus` is broken. In this case you can use this method `selection`. From React-Native I found this:
[](https://i.stack.imgur.com/wYR4O.png)
In my case I had trouble with ... |
44,718,405 | Is there a way to programmatically highlight/select text that is inside a TextInput component? | 2017/06/23 | [
"https://Stackoverflow.com/questions/44718405",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5890903/"
] | I'm here to share my findings. In a List, you might encounter that `selectTextOnFocus` is broken. In this case you can use this method `selection`. From React-Native I found this:
[](https://i.stack.imgur.com/wYR4O.png)
In my case I had trouble with ... | `this.inputRef.focus()` sets focus to the `TextInput` component, and then the flag you set in the attributes `selectTextOnFocus` does the rest. |
13,334,933 | I'm trying to print a array to a particular id in my page. I have the array print out just fine but cannot figure out how to get it to print to that id.
This Prints what i want out:
```
for(var i=0;i<playerCards.length;i++){
document.write('<img src="images/cards/card-' + playerCards[i] + '.jpg" width="58" height... | 2012/11/11 | [
"https://Stackoverflow.com/questions/13334933",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1218333/"
] | ```
var str = '';
for(var i = 0; i < playerCards.length; i++){
str += '<img src="images/cards/card-' + playerCards[i] + '.jpg" width="58" height="79" alt="playercards" />';
}
document.getElementById("player").innerHTML = str;
``` | Here:
```
document.getElementById( 'player' ).innerHTML = playerCards.map(function ( card ) {
return '<img src="images/cards/card-' +card + '.jpg" width="58" height="79" alt="playercards"> ';
}).join( '' );
```
Note that, in order to be able to select the `#player` element, you have to execute this code *after* ... |
29,867,935 | I am trying to loop through my array and find all the numbers that are repeating more than once:
E.G: if there is `1 1 2 3 4`
It should print saying "1 repeats more than once"
Here is my code and so far what I have tried, however it prints all duplicates and keep going, if there is `4 4 4 4 3 6 5 6 9`, it will print... | 2015/04/25 | [
"https://Stackoverflow.com/questions/29867935",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4699450/"
] | You perform the check for every single item of the array, including the first `4`, the second `4` and so on. That's why it just doesn't stop and it prints the message multiple times per duplicated element.
You're saying you cannot use a `Set` and that you don't want to sort your data. My suggestion is that you loop ov... | This problem is much simpler and likely faster to solve using a collection. However, as requested here's an answer that uses "just simple array[s]" and no sorting. I've tried not to change your code too much but I refuse to leak resources in the case of an exception.
```
import java.io.*;
import java.util.Arrays;
impo... |
29,867,935 | I am trying to loop through my array and find all the numbers that are repeating more than once:
E.G: if there is `1 1 2 3 4`
It should print saying "1 repeats more than once"
Here is my code and so far what I have tried, however it prints all duplicates and keep going, if there is `4 4 4 4 3 6 5 6 9`, it will print... | 2015/04/25 | [
"https://Stackoverflow.com/questions/29867935",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4699450/"
] | I would use a `HashMap` to store the value I encounter in the array, with the count as a value. So if you encounter a 4, you would look it up in the `HashMap`, if it doesn't exist, you would add it with a value of 1, otherwise increment the value returned.
You can the loop over the `HashMap` and get all the values an... | ```
Integer[] ints = {1, 1, 2, 3, 4};
System.out.println(new HashSet<Integer>(Arrays.asList(ints)));
```
Output: [1, 2, 3, 4] |
29,867,935 | I am trying to loop through my array and find all the numbers that are repeating more than once:
E.G: if there is `1 1 2 3 4`
It should print saying "1 repeats more than once"
Here is my code and so far what I have tried, however it prints all duplicates and keep going, if there is `4 4 4 4 3 6 5 6 9`, it will print... | 2015/04/25 | [
"https://Stackoverflow.com/questions/29867935",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4699450/"
] | You perform the check for every single item of the array, including the first `4`, the second `4` and so on. That's why it just doesn't stop and it prints the message multiple times per duplicated element.
You're saying you cannot use a `Set` and that you don't want to sort your data. My suggestion is that you loop ov... | ```
Integer[] ints = {1, 1, 2, 3, 4};
System.out.println(new HashSet<Integer>(Arrays.asList(ints)));
```
Output: [1, 2, 3, 4] |
29,867,935 | I am trying to loop through my array and find all the numbers that are repeating more than once:
E.G: if there is `1 1 2 3 4`
It should print saying "1 repeats more than once"
Here is my code and so far what I have tried, however it prints all duplicates and keep going, if there is `4 4 4 4 3 6 5 6 9`, it will print... | 2015/04/25 | [
"https://Stackoverflow.com/questions/29867935",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4699450/"
] | I would use a `HashMap` to store the value I encounter in the array, with the count as a value. So if you encounter a 4, you would look it up in the `HashMap`, if it doesn't exist, you would add it with a value of 1, otherwise increment the value returned.
You can the loop over the `HashMap` and get all the values an... | This problem is much simpler and likely faster to solve using a collection. However, as requested here's an answer that uses "just simple array[s]" and no sorting. I've tried not to change your code too much but I refuse to leak resources in the case of an exception.
```
import java.io.*;
import java.util.Arrays;
impo... |
29,867,935 | I am trying to loop through my array and find all the numbers that are repeating more than once:
E.G: if there is `1 1 2 3 4`
It should print saying "1 repeats more than once"
Here is my code and so far what I have tried, however it prints all duplicates and keep going, if there is `4 4 4 4 3 6 5 6 9`, it will print... | 2015/04/25 | [
"https://Stackoverflow.com/questions/29867935",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4699450/"
] | Just add the number you will find duplicated to some structure like `HashSet` or `HashMap` so you can find it later when you will detect another duplication.
```java
Set<Integer> printed = new HashSet<Integer>();
for(int i=0; i<buffer.length; i++) {
for(int k=i+1; k<buffer.length; k++) {
if(buffer[k] == b... | I would use a `HashMap` to store the value I encounter in the array, with the count as a value. So if you encounter a 4, you would look it up in the `HashMap`, if it doesn't exist, you would add it with a value of 1, otherwise increment the value returned.
You can the loop over the `HashMap` and get all the values an... |
29,867,935 | I am trying to loop through my array and find all the numbers that are repeating more than once:
E.G: if there is `1 1 2 3 4`
It should print saying "1 repeats more than once"
Here is my code and so far what I have tried, however it prints all duplicates and keep going, if there is `4 4 4 4 3 6 5 6 9`, it will print... | 2015/04/25 | [
"https://Stackoverflow.com/questions/29867935",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4699450/"
] | Just add the number you will find duplicated to some structure like `HashSet` or `HashMap` so you can find it later when you will detect another duplication.
```java
Set<Integer> printed = new HashSet<Integer>();
for(int i=0; i<buffer.length; i++) {
for(int k=i+1; k<buffer.length; k++) {
if(buffer[k] == b... | This problem is much simpler and likely faster to solve using a collection. However, as requested here's an answer that uses "just simple array[s]" and no sorting. I've tried not to change your code too much but I refuse to leak resources in the case of an exception.
```
import java.io.*;
import java.util.Arrays;
impo... |
29,867,935 | I am trying to loop through my array and find all the numbers that are repeating more than once:
E.G: if there is `1 1 2 3 4`
It should print saying "1 repeats more than once"
Here is my code and so far what I have tried, however it prints all duplicates and keep going, if there is `4 4 4 4 3 6 5 6 9`, it will print... | 2015/04/25 | [
"https://Stackoverflow.com/questions/29867935",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4699450/"
] | Just add the number you will find duplicated to some structure like `HashSet` or `HashMap` so you can find it later when you will detect another duplication.
```java
Set<Integer> printed = new HashSet<Integer>();
for(int i=0; i<buffer.length; i++) {
for(int k=i+1; k<buffer.length; k++) {
if(buffer[k] == b... | Using the **apache commons** CollectionUtils.getCardinalityMap(collection):
```
final Integer[] buffer = {1, 2, 3, 4, 5, 6, 7, 2, 1, 7, 9, 1, 1, 3};
final List<Integer> list = Arrays.asList(buffer);
final Map<Integer, Integer> cardinalityMap = CollectionUtils.getCardinalityMap(list);
for (final Map.Entry<Integ... |
29,867,935 | I am trying to loop through my array and find all the numbers that are repeating more than once:
E.G: if there is `1 1 2 3 4`
It should print saying "1 repeats more than once"
Here is my code and so far what I have tried, however it prints all duplicates and keep going, if there is `4 4 4 4 3 6 5 6 9`, it will print... | 2015/04/25 | [
"https://Stackoverflow.com/questions/29867935",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4699450/"
] | Just add the number you will find duplicated to some structure like `HashSet` or `HashMap` so you can find it later when you will detect another duplication.
```java
Set<Integer> printed = new HashSet<Integer>();
for(int i=0; i<buffer.length; i++) {
for(int k=i+1; k<buffer.length; k++) {
if(buffer[k] == b... | ```
Integer[] ints = {1, 1, 2, 3, 4};
System.out.println(new HashSet<Integer>(Arrays.asList(ints)));
```
Output: [1, 2, 3, 4] |
29,867,935 | I am trying to loop through my array and find all the numbers that are repeating more than once:
E.G: if there is `1 1 2 3 4`
It should print saying "1 repeats more than once"
Here is my code and so far what I have tried, however it prints all duplicates and keep going, if there is `4 4 4 4 3 6 5 6 9`, it will print... | 2015/04/25 | [
"https://Stackoverflow.com/questions/29867935",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4699450/"
] | I would use a `HashMap` to store the value I encounter in the array, with the count as a value. So if you encounter a 4, you would look it up in the `HashMap`, if it doesn't exist, you would add it with a value of 1, otherwise increment the value returned.
You can the loop over the `HashMap` and get all the values an... | Using the **apache commons** CollectionUtils.getCardinalityMap(collection):
```
final Integer[] buffer = {1, 2, 3, 4, 5, 6, 7, 2, 1, 7, 9, 1, 1, 3};
final List<Integer> list = Arrays.asList(buffer);
final Map<Integer, Integer> cardinalityMap = CollectionUtils.getCardinalityMap(list);
for (final Map.Entry<Integ... |
29,867,935 | I am trying to loop through my array and find all the numbers that are repeating more than once:
E.G: if there is `1 1 2 3 4`
It should print saying "1 repeats more than once"
Here is my code and so far what I have tried, however it prints all duplicates and keep going, if there is `4 4 4 4 3 6 5 6 9`, it will print... | 2015/04/25 | [
"https://Stackoverflow.com/questions/29867935",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4699450/"
] | Just add the number you will find duplicated to some structure like `HashSet` or `HashMap` so you can find it later when you will detect another duplication.
```java
Set<Integer> printed = new HashSet<Integer>();
for(int i=0; i<buffer.length; i++) {
for(int k=i+1; k<buffer.length; k++) {
if(buffer[k] == b... | You perform the check for every single item of the array, including the first `4`, the second `4` and so on. That's why it just doesn't stop and it prints the message multiple times per duplicated element.
You're saying you cannot use a `Set` and that you don't want to sort your data. My suggestion is that you loop ov... |
20,270,245 | Is it possible using jQuery to select a `<tr>` (which I have no class target to) right before another `<tr>` which I can target with a class '`active`'.
The list can be displayed in a random order, below is an example, so I can't use `nth` to target where it falls here, it needs to be based on the superseding `<tr cla... | 2013/11/28 | [
"https://Stackoverflow.com/questions/20270245",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1176352/"
] | Try this:
```
var apiKey = '6b5c02819a985881e46287c6507a9800';
var lati = 50;
var longi = 25;
var url = 'https://api.forecast.io/forecast/' + apiKey + '/' + lati + ',' + longi + '?callback=?&units=ca';
var fetchForecast = function () {
var counter = 0;
var skycons = new Skycons({
... | When using the string from Forecast.io you have to enclose it in quotes. Where you are using `icon` which substitutes something like `partly-cloudy-night`, when you pass it into sky cons it has to be in quotes. Hope that makes sense. |
20,270,245 | Is it possible using jQuery to select a `<tr>` (which I have no class target to) right before another `<tr>` which I can target with a class '`active`'.
The list can be displayed in a random order, below is an example, so I can't use `nth` to target where it falls here, it needs to be based on the superseding `<tr cla... | 2013/11/28 | [
"https://Stackoverflow.com/questions/20270245",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1176352/"
] | Try this:
```
var apiKey = '6b5c02819a985881e46287c6507a9800';
var lati = 50;
var longi = 25;
var url = 'https://api.forecast.io/forecast/' + apiKey + '/' + lati + ',' + longi + '?callback=?&units=ca';
var fetchForecast = function () {
var counter = 0;
var skycons = new Skycons({
... | i have same problem i was fix it with set string type of wheater.
```
var icon = String(data.currently.icon);
``` |
60,949,620 | Below is REACT code for details page
Ticket is a primary object, and what i want to do is when downloading add the ticket name as .pdf filename.
So i need a solution to pass the concrete ticket name to the handleDownload function
In the render section there are no problem declaring ticket.ticketName etc. But with on... | 2020/03/31 | [
"https://Stackoverflow.com/questions/60949620",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13101436/"
] | you should get more information how to access fields, register and other data in typoscript.
if you have a property you mostly can modify the way to get other information than a constant text.
In your example it is the `key` property where constants are not meaningful.
if you want to access a field of the 'current' ... | Found the answer. As far as I can tell, `CASE` works on `stdwrap.cObjects` and so the code
```
10 = CASE
10 {
key.data = {register:count_menuItems}
...
}
```
should be
```
stdWrap.cObject = CASE
stdWrap.cObject {
key.data = register:count_menuItems
if.isTrue.data = register:count_menuItems
...
}
`... |
48,811,569 | Inspired by: [How to protect against CSRF by default in ASP.NET MVC 4?](https://stackoverflow.com/questions/9965342/how-to-protect-against-csrf-by-default-in-asp-net-mvc-4)
Is there a way to achieve the same result in ASP.NET Core? | 2018/02/15 | [
"https://Stackoverflow.com/questions/48811569",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7505329/"
] | You can apply `AutoValidateAntiforgeryTokenAttribute` as a global filter in `Startup.ConfigureServices()`, so it applies to all of your routes automatically:
```
services.AddMvc(options =>
options.Filters.Add(new AutoValidateAntiforgeryTokenAttribute()));
```
Note that `AutoValidateAntiforgeryTokenAttribute` on... | Another way to protect from CSRF for good is not using cookies for authentication at all. If that is a possibility I would try checking token authentication and implement it. No cookie, no CSRF.
As far as I know it's not a big deal to have JWT token auth e.g. with Core. |
22,330,009 | I want to validate if user tapped on **Call** button or **Cancel** button after telprompt
Current code:
```
NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"telprompt://%@", [personDetails valueForKey:@"phone"]]];
[[UIApplication sharedApplication] openURL:url];
```
How can I do so? | 2014/03/11 | [
"https://Stackoverflow.com/questions/22330009",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3049559/"
] | First `telprompt:` is not a documented URL schema and should not be used. Since Apple can change the way it used at any moment.
Second since data is passed back to your app, you will not be able to detect a if call was made. You might be able to detect if you use the [`CoreTelephony`](https://developer.apple.com/libr... | ```
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(called:) name:@"UIApplicationSuspendedNotification" object:nil];
-(void)called:(NSNotification *) notification
{
NSLog(@"Tapped Call button");
}
```
if Call button was tapped then application will be terminated and go into background s... |
22,330,009 | I want to validate if user tapped on **Call** button or **Cancel** button after telprompt
Current code:
```
NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"telprompt://%@", [personDetails valueForKey:@"phone"]]];
[[UIApplication sharedApplication] openURL:url];
```
How can I do so? | 2014/03/11 | [
"https://Stackoverflow.com/questions/22330009",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3049559/"
] | First `telprompt:` is not a documented URL schema and should not be used. Since Apple can change the way it used at any moment.
Second since data is passed back to your app, you will not be able to detect a if call was made. You might be able to detect if you use the [`CoreTelephony`](https://developer.apple.com/libr... | For my case, I used `tel://` instead of using `telprompt://` and make my own `UIAlertView`. This way you could detect if the call option is tapped from the `UIAlertView`'s delegate. |
22,330,009 | I want to validate if user tapped on **Call** button or **Cancel** button after telprompt
Current code:
```
NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"telprompt://%@", [personDetails valueForKey:@"phone"]]];
[[UIApplication sharedApplication] openURL:url];
```
How can I do so? | 2014/03/11 | [
"https://Stackoverflow.com/questions/22330009",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3049559/"
] | ```
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(called:) name:@"UIApplicationSuspendedNotification" object:nil];
-(void)called:(NSNotification *) notification
{
NSLog(@"Tapped Call button");
}
```
if Call button was tapped then application will be terminated and go into background s... | For my case, I used `tel://` instead of using `telprompt://` and make my own `UIAlertView`. This way you could detect if the call option is tapped from the `UIAlertView`'s delegate. |
48,986,999 | Initialized the project using [start.spring.io](http://start.spring.io)
Added **WEB,JPA,H2** dependencies then tried to run the `MainApplication.java` using `Jdk 9` and got the following **error log**
```
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _`... | 2018/02/26 | [
"https://Stackoverflow.com/questions/48986999",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4107038/"
] | You need to add the JAXB dependency (as not provided any longer by default in Java 9) and **you have to** use Spring Boot 2 :
```xml
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.0</version>
</dependency>
```
Note that if you use Java 10, you would have e... | @Ratha : For Java12 (referred to your [comment](https://stackoverflow.com/questions/48986999/classnotfoundexception-for-javax-xml-bind-jaxbexception-with-spring-boot-when-sw/60371962#comment106790145_52019668)) this dependency list works:
```xml
<dependencies>
<...>
<dependency>
<groupI... |
48,986,999 | Initialized the project using [start.spring.io](http://start.spring.io)
Added **WEB,JPA,H2** dependencies then tried to run the `MainApplication.java` using `Jdk 9` and got the following **error log**
```
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _`... | 2018/02/26 | [
"https://Stackoverflow.com/questions/48986999",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4107038/"
] | You need to add the JAXB dependency (as not provided any longer by default in Java 9) and **you have to** use Spring Boot 2 :
```xml
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.0</version>
</dependency>
```
Note that if you use Java 10, you would have e... | The accepted answer is right, just wanted to point out I was having the same issue during Tomcat 9 startup while migrating a web project to OpenJDK11. In my case got the following stack trace:
```
SEVERE [main] com.sun.faces.config.ConfigureListener.contextInitialized Critical error during deployment:
java.lan... |
48,986,999 | Initialized the project using [start.spring.io](http://start.spring.io)
Added **WEB,JPA,H2** dependencies then tried to run the `MainApplication.java` using `Jdk 9` and got the following **error log**
```
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _`... | 2018/02/26 | [
"https://Stackoverflow.com/questions/48986999",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4107038/"
] | You need to add the JAXB dependency (as not provided any longer by default in Java 9) and **you have to** use Spring Boot 2 :
```xml
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.0</version>
</dependency>
```
Note that if you use Java 10, you would have e... | Add following dependency in pom.xml file
```
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.1</version>
</dependency>
``` |
48,986,999 | Initialized the project using [start.spring.io](http://start.spring.io)
Added **WEB,JPA,H2** dependencies then tried to run the `MainApplication.java` using `Jdk 9` and got the following **error log**
```
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _`... | 2018/02/26 | [
"https://Stackoverflow.com/questions/48986999",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4107038/"
] | Added below dependency and resolve the issue
```
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.0</version>
</dependency>
``` | The accepted answer is right, just wanted to point out I was having the same issue during Tomcat 9 startup while migrating a web project to OpenJDK11. In my case got the following stack trace:
```
SEVERE [main] com.sun.faces.config.ConfigureListener.contextInitialized Critical error during deployment:
java.lan... |
48,986,999 | Initialized the project using [start.spring.io](http://start.spring.io)
Added **WEB,JPA,H2** dependencies then tried to run the `MainApplication.java` using `Jdk 9` and got the following **error log**
```
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _`... | 2018/02/26 | [
"https://Stackoverflow.com/questions/48986999",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4107038/"
] | Add below maven dependencies in you pom.xml and the issue will get resolve. in Java9/10 JaxB modules has been removed, hence need to add manually.
```
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.2.11</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind<... | Add following dependency in pom.xml file
```
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.1</version>
</dependency>
``` |
48,986,999 | Initialized the project using [start.spring.io](http://start.spring.io)
Added **WEB,JPA,H2** dependencies then tried to run the `MainApplication.java` using `Jdk 9` and got the following **error log**
```
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _`... | 2018/02/26 | [
"https://Stackoverflow.com/questions/48986999",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4107038/"
] | Added below dependency and resolve the issue
```
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.0</version>
</dependency>
``` | Or for Gradle add the dependency
```
compile group: 'javax.xml.bind', name: 'jaxb-api', version: '2.3.1'
``` |
48,986,999 | Initialized the project using [start.spring.io](http://start.spring.io)
Added **WEB,JPA,H2** dependencies then tried to run the `MainApplication.java` using `Jdk 9` and got the following **error log**
```
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _`... | 2018/02/26 | [
"https://Stackoverflow.com/questions/48986999",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4107038/"
] | Added below dependency and resolve the issue
```
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.0</version>
</dependency>
``` | @Ratha : For Java12 (referred to your [comment](https://stackoverflow.com/questions/48986999/classnotfoundexception-for-javax-xml-bind-jaxbexception-with-spring-boot-when-sw/60371962#comment106790145_52019668)) this dependency list works:
```xml
<dependencies>
<...>
<dependency>
<groupI... |
48,986,999 | Initialized the project using [start.spring.io](http://start.spring.io)
Added **WEB,JPA,H2** dependencies then tried to run the `MainApplication.java` using `Jdk 9` and got the following **error log**
```
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _`... | 2018/02/26 | [
"https://Stackoverflow.com/questions/48986999",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4107038/"
] | Or for Gradle add the dependency
```
compile group: 'javax.xml.bind', name: 'jaxb-api', version: '2.3.1'
``` | @Ratha : For Java12 (referred to your [comment](https://stackoverflow.com/questions/48986999/classnotfoundexception-for-javax-xml-bind-jaxbexception-with-spring-boot-when-sw/60371962#comment106790145_52019668)) this dependency list works:
```xml
<dependencies>
<...>
<dependency>
<groupI... |
48,986,999 | Initialized the project using [start.spring.io](http://start.spring.io)
Added **WEB,JPA,H2** dependencies then tried to run the `MainApplication.java` using `Jdk 9` and got the following **error log**
```
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _`... | 2018/02/26 | [
"https://Stackoverflow.com/questions/48986999",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4107038/"
] | Added below dependency and resolve the issue
```
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.0</version>
</dependency>
``` | Add following dependency in pom.xml file
```
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.1</version>
</dependency>
``` |
48,986,999 | Initialized the project using [start.spring.io](http://start.spring.io)
Added **WEB,JPA,H2** dependencies then tried to run the `MainApplication.java` using `Jdk 9` and got the following **error log**
```
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _`... | 2018/02/26 | [
"https://Stackoverflow.com/questions/48986999",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4107038/"
] | Added below dependency and resolve the issue
```
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.0</version>
</dependency>
``` | Add below maven dependencies in you pom.xml and the issue will get resolve. in Java9/10 JaxB modules has been removed, hence need to add manually.
```
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.2.11</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind<... |
275,573 | Is there any research on learning a bijective function from data?
For example, let's imagine that we're trying to learn to assign four random musicians to instruments in a band. We have:
* lead guitar
* rhythm guitar
* drums
* bass
We can rate any musician on say 5 quantifiable skills (timing, creativity, guitar, dr... | 2017/04/24 | [
"https://stats.stackexchange.com/questions/275573",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/109890/"
] | 1. Are you doing a PCA or an EFA? You say that you do a factor analysis and use a direct oblimin rotation, but you also note that you are extracting components. PCA and EFA rely on different theoretical assumptions, and one should not use an oblique rotation for a PCA, as it goes against the fundamental point of the PC... | I can't really say without looking at your loadings or the corresponding eigenvalue of your single factor. If I had to guess, though, your issue might be that your items are not that related. Just running a single factor should give you no trouble.
Again, take this with a grain of salt since its a little tough to eva... |
14,612,774 | I use Node (latest version) + Express, also latest Version. I have 2 folders, public and secured. The secured folder should only be accessible after login.
I've create a login system by myself, now I wonder how I can secure the route to this "secure-folder".
I was thining about setting a static route to my "secured" ... | 2013/01/30 | [
"https://Stackoverflow.com/questions/14612774",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/867432/"
] | Specify a different folder for your private statics on a separate route
```
app.use(express.static(path.join(__dirname, 'public')));
app.use('/private', express.static(path.join(__dirname, 'private')));
```
Then you can use your middleware on each request
```
app.all('/private/*', function(req, res, next) {
if (r... | before your first app.use,
add something like
```
app.use(function(req, res, next) {
if (req.url.match(/^\/secured\//)) {
return requireLogin(req, res, next);
}
next();
})
``` |
3,431,985 | I haven't seen quite this scenario on a card drawing problem on here. I'm trying to figure out the probabilities for a card game I'm developing. There are 3 separate decks with 15 cards each. In each deck there are 2 'white cards' let's say and we're interested in drawing those. So if I draw 3 cards from each of the de... | 2019/11/12 | [
"https://math.stackexchange.com/questions/3431985",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/724350/"
] | Notice that the probability of drawing **at least one white card** is the same as $1$ minus the probability of drawing **no white cards**:
$$
P\left(\text{at least $1$ white card}\right) = 1 - P\left(\text{no white cards}\right)$$
---
The probability that no white cards are drawn when taking three cards from a singl... | So I was messing around with it more and talking to a friend about it. Can anyone tell me if this is correct...
$P(W) = 1 - P(W')$
$ = 1 - \left(\frac{^{13}C\_3}{^{15}C\_3}\right)^3 $
Which comes out to $P(W) = 0.752$
It just seems quite high to me. |
63,860,489 | I'm try to do something like this
```
def noAsyncPrint(c):
sleep(random.uniform(1,10))
print(c)
chars = ['a','b','c']
for c in chars:
noAsyncPrint(c)
```
getting this output
```
a, b, c
```
How I get some random order??
thank you :)
edit to be clear about my example
\*\*It's just basic example fo... | 2020/09/12 | [
"https://Stackoverflow.com/questions/63860489",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13423845/"
] | you can use `ThreadPool` from [multiprocessing.pool](https://docs.python.org/3.7/library/multiprocessing.html#multiprocessing.pool.Pool) :
```
from multiprocessing.pool import ThreadPool
from time import sleep
import random
def noAsyncPrint(c):
sleep(random.uniform(1,10))
print(c)
chars = ['a','b','c']
with... | You might want to use the [asyncio library](https://docs.python.org/3/library/asyncio.html). Checkout this [guide](https://realpython.com/async-io-python/) for a nice walk-through. The following example uses the `gather()` function to schedule the `async_print()` in a concurrent fashion. I also added logging with time ... |
63,860,489 | I'm try to do something like this
```
def noAsyncPrint(c):
sleep(random.uniform(1,10))
print(c)
chars = ['a','b','c']
for c in chars:
noAsyncPrint(c)
```
getting this output
```
a, b, c
```
How I get some random order??
thank you :)
edit to be clear about my example
\*\*It's just basic example fo... | 2020/09/12 | [
"https://Stackoverflow.com/questions/63860489",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13423845/"
] | you can use `ThreadPool` from [multiprocessing.pool](https://docs.python.org/3.7/library/multiprocessing.html#multiprocessing.pool.Pool) :
```
from multiprocessing.pool import ThreadPool
from time import sleep
import random
def noAsyncPrint(c):
sleep(random.uniform(1,10))
print(c)
chars = ['a','b','c']
with... | in the numpy library, there is a function for random order, called `np.random.suffle()`
```
import numpy as np # import the numpy lybrary
def noAsyncPrint(c):
sleep(random.uniform(1,10))
print(c)
chars = np.array(['a','b','c']) #make it a np array
random_chars = np.random.suffle(chars) # shuffle it!
for c i... |
11,752,582 | I have created this javascript which generates a random number ranging from 0-20. What I want to do is create a text field where the user has 4 attempts to guess the generated number. How would I do this?
```
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional... | 2012/08/01 | [
"https://Stackoverflow.com/questions/11752582",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1404603/"
] | You could use a global to track state. However, the security of this is weak, as the user could simply reload the page to circumvent the limit. What you really need to do then is track state on the server side (e.g. database) and then use e.g. an Ajax Call on the browser to do the checking :)
```
<script type="text/ja... | One way is to put the generated number into an element that is hidden. Keep a count of the attempts, when the user either gets it right or reaches 4 attempts, show the value and whether or not they guessed correctly. Perhaps also show the number of attempts.
Include a reset button to reset the counter and generate a n... |
11,752,582 | I have created this javascript which generates a random number ranging from 0-20. What I want to do is create a text field where the user has 4 attempts to guess the generated number. How would I do this?
```
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional... | 2012/08/01 | [
"https://Stackoverflow.com/questions/11752582",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1404603/"
] | You could use a global to track state. However, the security of this is weak, as the user could simply reload the page to circumvent the limit. What you really need to do then is track state on the server side (e.g. database) and then use e.g. an Ajax Call on the browser to do the checking :)
```
<script type="text/ja... | Rather than using a text field, why not try using the [prompt()](http://www.w3schools.com/jsref/met_win_prompt.asp) function? Here's a basic idea for the control flow:
1. Generate your random number and store it in a variable.
2. Create some variable like *correct* and set it to false.
3. Prompt the user for a guess i... |
22,915,951 | ```
public void Post(IEnumerable<int> ids)
{
foreach (var id in ids)
{
string postIdVal = AddPublicationOnMonster(id);
string url = string.Format("http://jobview.monster.com/getjob.aspx?JobID={0}", postIdVal);
System.Diagnostics.Process.Start(url); ;
}... | 2014/04/07 | [
"https://Stackoverflow.com/questions/22915951",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2576121/"
] | Found the answer elsewhere.
You have to set a camera also.
Here is a sample camera init :
```
MKMapCamera *newCamera = [[self.mapView camera] copy];
[newCamera setPitch:45.0];
[newCamera setHeading:90.0];
[newCamera setAltitude:500.0];
[self.mapView setCamera:newCamera animated:YES];
``` | Please see Discussion here at apple document.
[<https://developer.apple.com/documentation/mapkit/mkmapview/1452277-camera#discussion][1]>
You have to play with the pitch property to toggle between the 2D and 3D map view |
4,227,167 | Question: In how many ways can 3 vertices be selected from a decagon so no two are consecutive?
Once I choose one of the vertices, since the adjacent ones are ruled out, I now have 7 vertices to choose my next one from. Similarly, the next time around, I will have 4 vertices to choose from. Additionally, I accounted f... | 2021/08/18 | [
"https://math.stackexchange.com/questions/4227167",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/959489/"
] | Let's try your strategy with 6 elements
XXXXXX
In the first case, I select one as you told at random:
XX(X)XXX
Now for the second, suppose I take this choice:
XX(X)XX(X)
Then you see there is no where I can keep the third such that all three are not adjacent.
But suppose, I took this other choice:
XX(X)X(X)X
C... | Number the vertices clockwise from $1-10$
Make $3$ blocks of chosen-unchosen, looking clockwise, $\,\boxed{\circ\bullet}$
so there are now $3$ paired units and $4$ single units.
The block formation ensures that two *chosen* vertices can't now be adjacent, wherever the blocks might be placed.
The blocks can be pla... |
55,210,994 | i've an unexpected issue trying to remove child entity from parent single database record.
After doing some tests we have replicated the problem.
Our C# code use Northwind database.
```
NWModel context = new NWModel();
Orders order = context.Orders.Where(w => w.OrderID == 10248).FirstOrDefault();
context.Entry(order).... | 2019/03/17 | [
"https://Stackoverflow.com/questions/55210994",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8339959/"
] | Your first line starts at `(0,0)` and got to `(50, -50)`, thus goes 50 units in **X** and **Y** direction. But you second ist going from `(0,-50)` to `(50,50)`, thus goes 50 units in **X** direction and **100 units** in **Y** direction. Additionally your right and left have no effect.
One possible solution would be:
... | Another approach you can take is to avoid `setposition()` altogether and think like a turtle. That is, crawl forward, backward and turn rather than teleport:
```
import turtle as t
t.right(45)
t.forward(70)
t.backward(140)
t.forward(70)
t.left(90)
t.forward(70)
t.backward(140)
t.hideturtle()
t.done()
``` |
459 | Big part of my training is maintaining control of your body even though I feel physical pain. There are usually two situations, in physical pain while still having energy to fight, and in physical pain while being exhausted.
How do you train attacks/defense while in physical pain?
Are there safe ways to cause a lot... | 2012/02/12 | [
"https://martialarts.stackexchange.com/questions/459",
"https://martialarts.stackexchange.com",
"https://martialarts.stackexchange.com/users/-1/"
] | A lot of disclaimers apply here because different types of pain tend to mean different things and while you can ignore some of them to an extent, you want to be careful not to ignore things too much your you may find yourself with a serious injury on your hands. I'm going to run down the short list of issues that I've ... | What kind of pain? There are many kinds. Beyond the obvious "mental / emotional / physical", there are many kinds of each. The awareness of this will get you started on the path to understanding.
When is there too much pain? When there is so much pain that you can't think. When your world disappears, and your body, an... |
459 | Big part of my training is maintaining control of your body even though I feel physical pain. There are usually two situations, in physical pain while still having energy to fight, and in physical pain while being exhausted.
How do you train attacks/defense while in physical pain?
Are there safe ways to cause a lot... | 2012/02/12 | [
"https://martialarts.stackexchange.com/questions/459",
"https://martialarts.stackexchange.com",
"https://martialarts.stackexchange.com/users/-1/"
] | >
> *All of the above cause intense pain for few seconds and than go away to the point where I'm able to refocus and become more aware of what is happening around me.*
>
>
>
Of course they do - they are supposed to, your body doesn't like being hit in those spots!
You can mitigate some of these to a certain degr... | What kind of pain? There are many kinds. Beyond the obvious "mental / emotional / physical", there are many kinds of each. The awareness of this will get you started on the path to understanding.
When is there too much pain? When there is so much pain that you can't think. When your world disappears, and your body, an... |
459 | Big part of my training is maintaining control of your body even though I feel physical pain. There are usually two situations, in physical pain while still having energy to fight, and in physical pain while being exhausted.
How do you train attacks/defense while in physical pain?
Are there safe ways to cause a lot... | 2012/02/12 | [
"https://martialarts.stackexchange.com/questions/459",
"https://martialarts.stackexchange.com",
"https://martialarts.stackexchange.com/users/-1/"
] | I want to make sure I hit every part of this, so I'm going to make heavy use of quotes here...
First, we need to answer an unasked question: ***What is pain?***
This is important first off since, in order to work through pain, you have to understand pain. Pain is a nervous-system response to intense or damaging stimu... | What kind of pain? There are many kinds. Beyond the obvious "mental / emotional / physical", there are many kinds of each. The awareness of this will get you started on the path to understanding.
When is there too much pain? When there is so much pain that you can't think. When your world disappears, and your body, an... |
459 | Big part of my training is maintaining control of your body even though I feel physical pain. There are usually two situations, in physical pain while still having energy to fight, and in physical pain while being exhausted.
How do you train attacks/defense while in physical pain?
Are there safe ways to cause a lot... | 2012/02/12 | [
"https://martialarts.stackexchange.com/questions/459",
"https://martialarts.stackexchange.com",
"https://martialarts.stackexchange.com/users/-1/"
] | What kind of pain? There are many kinds. Beyond the obvious "mental / emotional / physical", there are many kinds of each. The awareness of this will get you started on the path to understanding.
When is there too much pain? When there is so much pain that you can't think. When your world disappears, and your body, an... | I'm glad you clarified your question.
The question I see there is not "how can I overcome pain" but "can I overcome (partial) paralysis?".
The answer is simple: no, you can't. Weak spots are just that, weak, and should be defended.
Your problem is not - apparently - the simple pain. |
459 | Big part of my training is maintaining control of your body even though I feel physical pain. There are usually two situations, in physical pain while still having energy to fight, and in physical pain while being exhausted.
How do you train attacks/defense while in physical pain?
Are there safe ways to cause a lot... | 2012/02/12 | [
"https://martialarts.stackexchange.com/questions/459",
"https://martialarts.stackexchange.com",
"https://martialarts.stackexchange.com/users/-1/"
] | I want to make sure I hit every part of this, so I'm going to make heavy use of quotes here...
First, we need to answer an unasked question: ***What is pain?***
This is important first off since, in order to work through pain, you have to understand pain. Pain is a nervous-system response to intense or damaging stimu... | A lot of disclaimers apply here because different types of pain tend to mean different things and while you can ignore some of them to an extent, you want to be careful not to ignore things too much your you may find yourself with a serious injury on your hands. I'm going to run down the short list of issues that I've ... |
459 | Big part of my training is maintaining control of your body even though I feel physical pain. There are usually two situations, in physical pain while still having energy to fight, and in physical pain while being exhausted.
How do you train attacks/defense while in physical pain?
Are there safe ways to cause a lot... | 2012/02/12 | [
"https://martialarts.stackexchange.com/questions/459",
"https://martialarts.stackexchange.com",
"https://martialarts.stackexchange.com/users/-1/"
] | A lot of disclaimers apply here because different types of pain tend to mean different things and while you can ignore some of them to an extent, you want to be careful not to ignore things too much your you may find yourself with a serious injury on your hands. I'm going to run down the short list of issues that I've ... | I'm glad you clarified your question.
The question I see there is not "how can I overcome pain" but "can I overcome (partial) paralysis?".
The answer is simple: no, you can't. Weak spots are just that, weak, and should be defended.
Your problem is not - apparently - the simple pain. |
459 | Big part of my training is maintaining control of your body even though I feel physical pain. There are usually two situations, in physical pain while still having energy to fight, and in physical pain while being exhausted.
How do you train attacks/defense while in physical pain?
Are there safe ways to cause a lot... | 2012/02/12 | [
"https://martialarts.stackexchange.com/questions/459",
"https://martialarts.stackexchange.com",
"https://martialarts.stackexchange.com/users/-1/"
] | I want to make sure I hit every part of this, so I'm going to make heavy use of quotes here...
First, we need to answer an unasked question: ***What is pain?***
This is important first off since, in order to work through pain, you have to understand pain. Pain is a nervous-system response to intense or damaging stimu... | >
> *All of the above cause intense pain for few seconds and than go away to the point where I'm able to refocus and become more aware of what is happening around me.*
>
>
>
Of course they do - they are supposed to, your body doesn't like being hit in those spots!
You can mitigate some of these to a certain degr... |
459 | Big part of my training is maintaining control of your body even though I feel physical pain. There are usually two situations, in physical pain while still having energy to fight, and in physical pain while being exhausted.
How do you train attacks/defense while in physical pain?
Are there safe ways to cause a lot... | 2012/02/12 | [
"https://martialarts.stackexchange.com/questions/459",
"https://martialarts.stackexchange.com",
"https://martialarts.stackexchange.com/users/-1/"
] | >
> *All of the above cause intense pain for few seconds and than go away to the point where I'm able to refocus and become more aware of what is happening around me.*
>
>
>
Of course they do - they are supposed to, your body doesn't like being hit in those spots!
You can mitigate some of these to a certain degr... | I'm glad you clarified your question.
The question I see there is not "how can I overcome pain" but "can I overcome (partial) paralysis?".
The answer is simple: no, you can't. Weak spots are just that, weak, and should be defended.
Your problem is not - apparently - the simple pain. |
459 | Big part of my training is maintaining control of your body even though I feel physical pain. There are usually two situations, in physical pain while still having energy to fight, and in physical pain while being exhausted.
How do you train attacks/defense while in physical pain?
Are there safe ways to cause a lot... | 2012/02/12 | [
"https://martialarts.stackexchange.com/questions/459",
"https://martialarts.stackexchange.com",
"https://martialarts.stackexchange.com/users/-1/"
] | I want to make sure I hit every part of this, so I'm going to make heavy use of quotes here...
First, we need to answer an unasked question: ***What is pain?***
This is important first off since, in order to work through pain, you have to understand pain. Pain is a nervous-system response to intense or damaging stimu... | I'm glad you clarified your question.
The question I see there is not "how can I overcome pain" but "can I overcome (partial) paralysis?".
The answer is simple: no, you can't. Weak spots are just that, weak, and should be defended.
Your problem is not - apparently - the simple pain. |
29,045,500 | In the code, you can see that there is register of state ( reg [N-1] State). i want to access the 10 bits of state in 10 different signal or register or we can say wires. how is this possible. ??
i used assign statement but i want to make a logic for clock.
This gives an error
Line 33: Syntax error near "<="
```
mod... | 2015/03/14 | [
"https://Stackoverflow.com/questions/29045500",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4286661/"
] | Not sure if this helps but I save my bitmapped images to parse like this, this is after taking the photo with the camera.
```
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
byte[] image_byte_array;
if (requestCode == REQUEST_IMAGE_CAPTURE && resultCode == RESULT_OK) ... | i have a similar code in my proyect, and i save the image of an user on Parse with this and show in a ParseImageView, and it work:
```
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == RESULT_LOAD_IMAGE &&... |
35,871,602 | So I installed CentOs in a VM and then elastic search, I set up it's network as bridge.
Elasticsearch 1.7.3 is of course running.
I can SSH to it without issue however curl is not working
```
curl '163.113.183.229:9200/_cat/indices?v'
curl: (7) couldn't connect to host
```
What can I look at to identify the proble... | 2016/03/08 | [
"https://Stackoverflow.com/questions/35871602",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2105339/"
] | You can use javascript as
```
function sendMail()
{
var body = document.getElementById("contact_message").value;
window.location.href = "mailto:mail@example.org?subject=Mail request&body="+body;
}
```
Call function as
```
<a class="submit" onclick="sendMail()">Send mail</a>
``` | ```js
function MyFunction(){
var email = document.getElementById("input").value;
window.location.href = "mailto:" + email + "?subject=Test email&body=Testing email";
}
```
```html
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<input type="text" id="input"/>
<button onclick="MyFunction()">Click</button... |
8,287,341 | How to animate the movement of annotations on the MKMapView?
When position of annotation is changed, then annotation moving to other position with animation? | 2011/11/27 | [
"https://Stackoverflow.com/questions/8287341",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/183527/"
] | [This](https://stackoverflow.com/questions/8564013/animate-removal-of-annotations/8564097#8564097) question has the answer.
Simply wrapping coordinate change in UIView animateWithDuration seems to work fine:
```
[UIView animateWithDuration:0.3f
animations:^{
myAnnotation.coordinate = newCoordinat... | You need to use these delegate methods for that `setRegion:animated:` & `regionThatFits:`
```
[mapView setRegion:region animated:YES];
[mapView regionThatFits:region];
```
Also mind you that the map update doesn't work with animation when using SIMULATOR. When you try `setCenterCoordinate:animated:` on the device, i... |
3,011 | In the series [*A Song of Ice and Fire*](http://en.wikipedia.org/wiki/A_Song_of_Ice_and_Fire), dragons always occur in groups of three - The three conquering dragons, the three eggs etc.
Somewhere, it's also implied that there should be three dragon-controllers (I forgot where, but this is what I remember).
>
> So ... | 2011/04/25 | [
"https://scifi.stackexchange.com/questions/3011",
"https://scifi.stackexchange.com",
"https://scifi.stackexchange.com/users/947/"
] | The most common suggestion for the third head is
>
> Tyrion.
>
>
> | While Mike's answer is correct , I want to say that most of the discussions seem to be weak.
>
> I believe it much more likely that Daenerys' brother was the third head. After all, nowhere does it say that one of the heads can't die after he/she is born.
>
>
> |
3,011 | In the series [*A Song of Ice and Fire*](http://en.wikipedia.org/wiki/A_Song_of_Ice_and_Fire), dragons always occur in groups of three - The three conquering dragons, the three eggs etc.
Somewhere, it's also implied that there should be three dragon-controllers (I forgot where, but this is what I remember).
>
> So ... | 2011/04/25 | [
"https://scifi.stackexchange.com/questions/3011",
"https://scifi.stackexchange.com",
"https://scifi.stackexchange.com/users/947/"
] | The most common suggestion for the third head is
>
> Tyrion.
>
>
> | >
> In Book 4, Maester Aemon, dying, says to Sam that he thought he'd be the third.
>
>
> |
3,011 | In the series [*A Song of Ice and Fire*](http://en.wikipedia.org/wiki/A_Song_of_Ice_and_Fire), dragons always occur in groups of three - The three conquering dragons, the three eggs etc.
Somewhere, it's also implied that there should be three dragon-controllers (I forgot where, but this is what I remember).
>
> So ... | 2011/04/25 | [
"https://scifi.stackexchange.com/questions/3011",
"https://scifi.stackexchange.com",
"https://scifi.stackexchange.com/users/947/"
] | The most common suggestion for the third head is
>
> Tyrion.
>
>
> | Now that *A Dance with Dragons* has been released I believe it's worth adding another answer to this question.
***A Dance with Dragons*** spoiler
---
>
> It seems more likely now that one of the dragons is Aegon Targaryen. Aegon Targaryen was the second child and only son of Prince Rhaegar Targaryen and Elia Marte... |
3,011 | In the series [*A Song of Ice and Fire*](http://en.wikipedia.org/wiki/A_Song_of_Ice_and_Fire), dragons always occur in groups of three - The three conquering dragons, the three eggs etc.
Somewhere, it's also implied that there should be three dragon-controllers (I forgot where, but this is what I remember).
>
> So ... | 2011/04/25 | [
"https://scifi.stackexchange.com/questions/3011",
"https://scifi.stackexchange.com",
"https://scifi.stackexchange.com/users/947/"
] | The most common suggestion for the third head is
>
> Tyrion.
>
>
> | Spoiler:
It has been discussed. The most popular contenders for the third head are:
>
> 1. Tyrion (he has a fascination with dragons, also there is a theory that Tyrion may unknowingly be the son of Aerys and Joanna)
>
> 2. Bran (he's a powerful warg and maybe dragons can be warged, also he has a connection wit... |
3,011 | In the series [*A Song of Ice and Fire*](http://en.wikipedia.org/wiki/A_Song_of_Ice_and_Fire), dragons always occur in groups of three - The three conquering dragons, the three eggs etc.
Somewhere, it's also implied that there should be three dragon-controllers (I forgot where, but this is what I remember).
>
> So ... | 2011/04/25 | [
"https://scifi.stackexchange.com/questions/3011",
"https://scifi.stackexchange.com",
"https://scifi.stackexchange.com/users/947/"
] | Now that *A Dance with Dragons* has been released I believe it's worth adding another answer to this question.
***A Dance with Dragons*** spoiler
---
>
> It seems more likely now that one of the dragons is Aegon Targaryen. Aegon Targaryen was the second child and only son of Prince Rhaegar Targaryen and Elia Marte... | While Mike's answer is correct , I want to say that most of the discussions seem to be weak.
>
> I believe it much more likely that Daenerys' brother was the third head. After all, nowhere does it say that one of the heads can't die after he/she is born.
>
>
> |
3,011 | In the series [*A Song of Ice and Fire*](http://en.wikipedia.org/wiki/A_Song_of_Ice_and_Fire), dragons always occur in groups of three - The three conquering dragons, the three eggs etc.
Somewhere, it's also implied that there should be three dragon-controllers (I forgot where, but this is what I remember).
>
> So ... | 2011/04/25 | [
"https://scifi.stackexchange.com/questions/3011",
"https://scifi.stackexchange.com",
"https://scifi.stackexchange.com/users/947/"
] | Now that *A Dance with Dragons* has been released I believe it's worth adding another answer to this question.
***A Dance with Dragons*** spoiler
---
>
> It seems more likely now that one of the dragons is Aegon Targaryen. Aegon Targaryen was the second child and only son of Prince Rhaegar Targaryen and Elia Marte... | >
> In Book 4, Maester Aemon, dying, says to Sam that he thought he'd be the third.
>
>
> |
3,011 | In the series [*A Song of Ice and Fire*](http://en.wikipedia.org/wiki/A_Song_of_Ice_and_Fire), dragons always occur in groups of three - The three conquering dragons, the three eggs etc.
Somewhere, it's also implied that there should be three dragon-controllers (I forgot where, but this is what I remember).
>
> So ... | 2011/04/25 | [
"https://scifi.stackexchange.com/questions/3011",
"https://scifi.stackexchange.com",
"https://scifi.stackexchange.com/users/947/"
] | Now that *A Dance with Dragons* has been released I believe it's worth adding another answer to this question.
***A Dance with Dragons*** spoiler
---
>
> It seems more likely now that one of the dragons is Aegon Targaryen. Aegon Targaryen was the second child and only son of Prince Rhaegar Targaryen and Elia Marte... | Spoiler:
It has been discussed. The most popular contenders for the third head are:
>
> 1. Tyrion (he has a fascination with dragons, also there is a theory that Tyrion may unknowingly be the son of Aerys and Joanna)
>
> 2. Bran (he's a powerful warg and maybe dragons can be warged, also he has a connection wit... |
93 | Software Escrow (SE) is about getting a 3rd party involved, trusted by 2 parties, where pieces of software components (Artefacts?) get deposited, with al sorts of "strings attached".
If you know a bit about SCM (Software Change Management), then you'll understand (as I like to explain it) it's a special kind of SCM. B... | 2017/03/11 | [
"https://devops.meta.stackexchange.com/questions/93",
"https://devops.meta.stackexchange.com",
"https://devops.meta.stackexchange.com/users/40/"
] | As for any pay only software, with some luck someone with enough expertise may be able to answer your question.
As long as the question describe a real problem with enough details and background I see no reason to bring them off topic, but therés a good chance you won't get an answer as the question about got smudge a... | Depositing to a Software Escrow is fundamentally just another variation of a delivery in the software development process. Which can considered for automation.
I'd definitely consider it on-topic for DevOps. |
296,442 | We use SASS when building custom themes, and sometimes clients need a quick change made which is easier to do on the server rather than locally and pushing new changes. To that end, we've installed SASS on our server to watch for file changes. The problem is, if we use the WordPress Appearance Editor to edit SASS files... | 2018/03/11 | [
"https://wordpress.stackexchange.com/questions/296442",
"https://wordpress.stackexchange.com",
"https://wordpress.stackexchange.com/users/90498/"
] | The WordPress theme/plugin (file) editor uses [CodeMirror](http://codemirror.net/) for syntax highlighting, and with the hook [`wp_enqueue_code_editor`](https://developer.wordpress.org/reference/functions/wp_enqueue_code_editor/) (which is available starting from WordPress version 4.9.0), you can filter the default Cod... | The wordpress editor should not be used, end of story. In addition to forcing a security hole, how do you git the changes, how do you test them before applying to production??
The proper solution is to teach your clients the way of the GIT (command line in general), failing that, if all that is needed is CSS changes, ... |
6,131,764 | I'm facing a strange issue. I have a method which populates an array with some data (fetchData) (quite a lot actually and it's a bit slow). I'm using the array to build the rows of the table.
I've tried calling fetchData in a number of places in my code, at various times in the construction of the view and I always s... | 2011/05/25 | [
"https://Stackoverflow.com/questions/6131764",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/87336/"
] | Your load method must be blocking the UI. You should move it to another thread and let the data load there. You can instantiate the thread in `viewDidLoad`.
This is a skeleton code for that you need to (using GCD)
```
dispatch_queue_t downloadQueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
disp... | It possible that you could add a timer to delay the call somewhere in your `viewDidAppear` method. For example:
```
- (void)viewDidAppear:(BOOL)animated {
[NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(fetchData) userInfo:nil repeats:NO];
}
```
This will give your app time to load the... |
6,131,764 | I'm facing a strange issue. I have a method which populates an array with some data (fetchData) (quite a lot actually and it's a bit slow). I'm using the array to build the rows of the table.
I've tried calling fetchData in a number of places in my code, at various times in the construction of the view and I always s... | 2011/05/25 | [
"https://Stackoverflow.com/questions/6131764",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/87336/"
] | Your load method must be blocking the UI. You should move it to another thread and let the data load there. You can instantiate the thread in `viewDidLoad`.
This is a skeleton code for that you need to (using GCD)
```
dispatch_queue_t downloadQueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
disp... | I was having the same issue with a table view not loading initially, but it worked n another .m file I had. Here is the one that worked:
add this to your viewDidLoad:
```
NSError *error = nil;
if (![[self fetchedResultsController] performFetch:&error]) {
NSLog(@"Unresolved error %@, %@", error, [error userInfo]);... |
6,131,764 | I'm facing a strange issue. I have a method which populates an array with some data (fetchData) (quite a lot actually and it's a bit slow). I'm using the array to build the rows of the table.
I've tried calling fetchData in a number of places in my code, at various times in the construction of the view and I always s... | 2011/05/25 | [
"https://Stackoverflow.com/questions/6131764",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/87336/"
] | It possible that you could add a timer to delay the call somewhere in your `viewDidAppear` method. For example:
```
- (void)viewDidAppear:(BOOL)animated {
[NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(fetchData) userInfo:nil repeats:NO];
}
```
This will give your app time to load the... | I was having the same issue with a table view not loading initially, but it worked n another .m file I had. Here is the one that worked:
add this to your viewDidLoad:
```
NSError *error = nil;
if (![[self fetchedResultsController] performFetch:&error]) {
NSLog(@"Unresolved error %@, %@", error, [error userInfo]);... |
68,051,284 | I have the following URL queryString `index.html?cars=honda+nissan&price=90+60+70` and need to remove all the characters `=, +, &`. When I chain the split it returns `split is not a function`
Desired output;
```
honda
nissan
90
60
70
```
JS:
```
const urlSearch = window.location.search;
const param = urlSearch.spl... | 2021/06/19 | [
"https://Stackoverflow.com/questions/68051284",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/992731/"
] | Since your initial string is JSON, you can easily parse it with `json_decode()`. Then just iterate through the array and `explode()` the `"val"` by the delimiter `,,` and add it to an array.
```
<?php
$string = '[{"val":"agent,,james,,89","number":0,"dID":0}, {"val":"house,,Villa,,389m","number":1,"dID":2}]';
$json ... | You have an accepted answer, but I was bored:
```
$result = array_map(function($v) {
return explode(',,', $v['val']);
}, json_decode($string, true));
``` |
2,342,682 | I know that over a field, every non-invertible matrix is a zero divisor. Does the same hold for matrices over an arbitrary commutative ring? | 2017/07/01 | [
"https://math.stackexchange.com/questions/2342682",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/360858/"
] | In $p$-adics any integer ending with $0$ is noninvertible, but a zero product requires a zero factor. Multiplication of two $p$-adic integers with only a finite number of total terminal zero digits gives a product with only that number of terminal zeroes. | The determinant makes sense for matrices over a commutative ring $R$ and it's easy to prove that the square matrix $A$ is invertible if and only if $\det A$ is invertible in the base ring.
On the other hand, if $d=\det A$ is not a zero divisor, then it becomes invertible in the full ring of quotients $Q(R)$ of $R$ (th... |
2,342,682 | I know that over a field, every non-invertible matrix is a zero divisor. Does the same hold for matrices over an arbitrary commutative ring? | 2017/07/01 | [
"https://math.stackexchange.com/questions/2342682",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/360858/"
] | In the case of $1\times 1$ matrices, which are just elements of the ring, you are asking whether every non-unit in a ring must be a zero divisor. This is obviously false, for instance, in the ring $\mathbb{Z}$. | The determinant makes sense for matrices over a commutative ring $R$ and it's easy to prove that the square matrix $A$ is invertible if and only if $\det A$ is invertible in the base ring.
On the other hand, if $d=\det A$ is not a zero divisor, then it becomes invertible in the full ring of quotients $Q(R)$ of $R$ (th... |
15,955,157 | I have two tables in mysql.
* Table 1 contains a column called `app_id`
* Table 2 contains a column called `id`
I need to create a query that will show all table 1 columns for any row where `app_id` is not present in table 1's id. For example:
Table 1:
```
app_id
1
2
3
4
5
```
Table 2:
```
id ... | 2013/04/11 | [
"https://Stackoverflow.com/questions/15955157",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1316445/"
] | You could do
```
SELECT app_id FROM tableOne WHERE app_id NOT IN(SELECT id from tableTwo)
``` | Just do a left join, then select rows that don't match:
```
SELECT * FROM table_1 LEFT JOIN table_2 ON table_1.app_id = table_2.id WHERE table_2.id IS NULL;
``` |
43,066,220 | I've noticed that connection strings link is missing on settings section in Azure Portal.
I was following [this tutorial](https://learn.microsoft.com/en-us/azure/documentdb/documentdb-connect-mongodb-account "This tutorial") in order to use .NET mongodb driver to work with Azure DocumentDB.
Look at the image below(fr... | 2017/03/28 | [
"https://Stackoverflow.com/questions/43066220",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6002830/"
] | The `Connection Strings` option appears when you configure a database with MongoDB compatibility (which you must choose when creating your new database:
[](https://i.stack.imgur.com/SeSqs.jpg)
Once you do this, you'll then have the `Connection String` option:... | I've managed to build my connection string by comparing the tutorial screen shots and the information that is on my Azure Portal. I've navigate to **Keys** link, and used the **Primary Key** as **Password** but that's not very obvious since the word may confuse the reader.
Also the **Port 10250** that is shown in the ... |
306,193 | I am unable to partially select text in titles.
For example, if I want to select `processing a sorted array` part of the following title, I must start from the left or the right, I cannot partially select it because it's a link.
[](https://i.stack.imgur.com/snNbr.p... | 2015/09/16 | [
"https://meta.stackoverflow.com/questions/306193",
"https://meta.stackoverflow.com",
"https://meta.stackoverflow.com/users/1004708/"
] | Assuming Windows, hold the `Alt` key while selecting text that are also links, it's a standard browser feature. See [How to Select Hyperlink Text in Google Chrome?](//superuser.com/q/173200):
>
> Pressing ALT while selecting text prevents hyperlinks being followed, and therefore allows all or partial text in links t... | I never use the title for anything other than reading and editing but this doesn't seem to be too hard. Let me demonstrate with a drawring
[](https://i.stack.imgur.com/Vh97q.png) |
37,732,822 | Im new to node, javascript and what not and I ran in to a no Access-control-allow-origin error when trying to do a get using XMLHttpRequest. Ive looked everywhere for a solution but nothing seems to be working.
Any suggestions would be great. I would appreciate everything I really want to be able to get better at node... | 2016/06/09 | [
"https://Stackoverflow.com/questions/37732822",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3646746/"
] | I suspect that it's an order of operations issue:
```
!is.na(x) %>% sum
```
is evaluating to
```
!(is.na(x) %>% sum)
```
Which is equivalent to `TRUE` | Although I accepted @C-Z\_ 's answer I want to add another to provide context on this. Thanks to @rawr for directing me to `?Syntax`.
Basically `%>%` is considered to be an operator, like `%in%` and as such it has to obey the order of operations. On the `Syntax` help page this corresponds to the `%any%` operator (i.e.... |
37,732,822 | Im new to node, javascript and what not and I ran in to a no Access-control-allow-origin error when trying to do a get using XMLHttpRequest. Ive looked everywhere for a solution but nothing seems to be working.
Any suggestions would be great. I would appreciate everything I really want to be able to get better at node... | 2016/06/09 | [
"https://Stackoverflow.com/questions/37732822",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3646746/"
] | I suspect that it's an order of operations issue:
```
!is.na(x) %>% sum
```
is evaluating to
```
!(is.na(x) %>% sum)
```
Which is equivalent to `TRUE` | You can also use the "not" alias from the magrittr package:
```
> is.na(1:20) %>% not %>% sum
```
[1] 20 |
37,732,822 | Im new to node, javascript and what not and I ran in to a no Access-control-allow-origin error when trying to do a get using XMLHttpRequest. Ive looked everywhere for a solution but nothing seems to be working.
Any suggestions would be great. I would appreciate everything I really want to be able to get better at node... | 2016/06/09 | [
"https://Stackoverflow.com/questions/37732822",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3646746/"
] | Although I accepted @C-Z\_ 's answer I want to add another to provide context on this. Thanks to @rawr for directing me to `?Syntax`.
Basically `%>%` is considered to be an operator, like `%in%` and as such it has to obey the order of operations. On the `Syntax` help page this corresponds to the `%any%` operator (i.e.... | You can also use the "not" alias from the magrittr package:
```
> is.na(1:20) %>% not %>% sum
```
[1] 20 |
26,250,353 | hy all help me pleass..
I have quetions, how to grab text in event onlcik suing simple html dom for example :
I have see in website like this
```html
<a id="inquiry-agent-phone" class="tooltiped-links" data-toggle="tooltip" data-placement="right" onclick="scigineer_func('call');inquiryAgentPhoneLeads('xxx', 'xxx', 'x... | 2014/10/08 | [
"https://Stackoverflow.com/questions/26250353",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3974085/"
] | Make sure to enable the **Allow less secure apps** option in Google account setting at <https://google.com/settings/security/lesssecureapps> -- from the second half of 2014, this is required to authenticate with Gmail SMTP using basic authentication.
Alternatively, you can keep the above option disabled and implement ... | It seems from your code that you'r enabling SSL by `smtp.EnableSsl = true;`.
If you want to do it by same way, use 465 port.
Below is the resolved answer link for relative problem:
[How can I send emails through SSL SMTP with the .NET Framework?](https://stackoverflow.com/questions/1011245/how-can-i-send-emails-throug... |
24,047,236 | I've got a form and when it's not filled out properly, Rails wraps it in a "field\_with\_errors" class. I've got a css.scss file in which I import Bootstrap, and I want to extend field\_with\_errors to use Bootstrap 3's form validation styling. I found this
```
.field_with_errors {
@extend .control-group;
@ext... | 2014/06/04 | [
"https://Stackoverflow.com/questions/24047236",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1172720/"
] | Alright, I'm a big ol' bootstrap noob, but I've found the problem. Here are all the references to has-error in the bootstrap source code
```
.has-error .help-block,
.has-error .control-label,
.has-error .radio,
.has-error .checkbox,
.has-error .radio-inline,
.has-error .checkbox-inline {
color: #a94442;
}
.has-error... | You can use this snippet:
`.field-with-errors { @extend .has-error; }` |
4,487,089 | I have a script that is somehow inserts line breaks into the end of the data that is being inserted in SQL. I don't see anything in the script that is adding a line break.
Is there a way to strip all line breaks inside the INSERT statement? I can't imagine what could be doing this.
Thanks,
Mike | 2010/12/20 | [
"https://Stackoverflow.com/questions/4487089",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/547794/"
] | Apply `TRIM()` mysql function to the needed fields.
```
INSERT INTO table (field) VALUES (TRIM('foobar'))
```
where `foobar` is your data.
But better I would suggest to find why that script adds those newlines. | Thanks for the quick answers guys. I ended up using the php trim function right before the data insert - that worked. |
23,121,962 | So I have made a form with CodeIgniter and it does uses CodeIgniter's form validation
class to validate input fields. I have a total of 6 input fields which all are
required fields.
I would like to show the same error of "This field is required" even
if there are multiple empty fields, but right now it will show the... | 2014/04/16 | [
"https://Stackoverflow.com/questions/23121962",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2411636/"
] | Here is an example that returns the errors in a JSON string to process with jQuery, you have to load the form validation helper.
Load the library:
```
$this->load->library('form_validation');
/* Outputto Json Format */
$this->output->set_content_type('application_json');
/* Validate Form Data... | Off the top of my head, you could try using individual errors.
In your view:
```
<?php
$form_errors = array(
form_error('field_1'),
form_error('field_2'),
form_error('field_3'),
form_error('field_4'),
form_error('field_5'),
form_error('field_6')
);
$error =... |
139,991 | >
> When I was 11, my sister bought our father a ''World Greatest Dad's''
> coffee mug, and frankly, the man **coasted** until the day he died.
>
>
>
This sentence comes from a piece of line of Sheldon in The Big Bang Theory. The meaning of coast as a intransitive verb below, and pls interpret it in this particul... | 2017/08/23 | [
"https://ell.stackexchange.com/questions/139991",
"https://ell.stackexchange.com",
"https://ell.stackexchange.com/users/56715/"
] | In this context "to coast" has the same meaning as the idiomatic expression ["to rest on one's laurels"](http://www.phrases.org.uk/meanings/rest-on-his-laurels.html): *To be satisfied with one's past success and to consider further effort unnecessary.*
In this case, the character in the show is saying that his father ... | Definition #4 fits the use accurately. It refers to someone who has rested on his laurels (to use another phrase), and "coasted" through life or career based on prior accomplishments. |
58,187,832 | Code speaks more than thousand words, so...
This is undefined behaviour for mutating a `const int`:
```
struct foo {
int x;
void modify() { x = 3; }
};
void test_foo(const foo& f) {
const_cast<foo&>(f).modify();
}
int main(){
const foo f{2};
test_foo(f);
}
```
What about this:
```
struct bar ... | 2019/10/01 | [
"https://Stackoverflow.com/questions/58187832",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4117728/"
] | The behaviour of your code is well-defined.
The only thing that matters is if you actually modify the object. You don't. All you do is call a member function, and that function does not modify the object. | In the C++14 standard N4296 that I have access to we see a note in 5.2.11/6:
>
> [ Note: Depending on the type of the object, a write operation through
> the pointer, lvalue or pointer to data member resulting from a
> const\_cast that casts away a const-qualifier74 may produce undefined
> behavior (7.1.6.1). —end... |
7,608,159 | I have an html page called test.html, here is it's content:
```
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head>
<title></title> </head> <body style="margin: 0; padding: 0; background: #d9d9d... | 2011/09/30 | [
"https://Stackoverflow.com/questions/7608159",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/520712/"
] | If you want to replace your body with fetched HTML, this should do it.
```
$.get("test.html", function (data) {
$(body).html(data);
});
```
**EDIT:**
Missread your question.
It'd suggest you to use json or .replace() instead.
Example: `alert(data.replace(/^.*?\<body\>(.*?)\<\/body\>.*$/, "$1")... | I am not sure of the solution, but I think I can shed some light on the problem...
From here: <http://api.jquery.com/jQuery/>
>
> When passing in complex HTML, some browsers may not generate a DOM
> that exactly replicates the HTML source provided. As mentioned, we use
> the browser's .innerHTML property to parse ... |
594,709 | [RFC 1034](https://serverfault.com/a/82606/87017) requires us to assign at least two IP addresses for DNS servers. However, redundancy can already be achieved by a single IP address if we use anycast addressing. BGP anycast seems to scale well into hundreds or even thousands of servers.
If so, why do we still need mul... | 2014/05/13 | [
"https://serverfault.com/questions/594709",
"https://serverfault.com",
"https://serverfault.com/users/87017/"
] | A single anycast IP address does not give you the same redundancy as two unicast IP addresses in distinct IP prefixes would.
Often the hardest problem for redundancy is not when something fails completely, but rather when it is misbehaving just enough to still pass the health checks, but not actually be functional.
I... | The RFC 1034 only states that you require two DNS servers. This isn't a mandatory requirement, but a recommendation, so do with it what you will.
Regardless, if you want HA, your 2 DNS servers can be assigned the same IP using anycast, and the only thing your end users would notice when one DNS server fails, is a momen... |
594,709 | [RFC 1034](https://serverfault.com/a/82606/87017) requires us to assign at least two IP addresses for DNS servers. However, redundancy can already be achieved by a single IP address if we use anycast addressing. BGP anycast seems to scale well into hundreds or even thousands of servers.
If so, why do we still need mul... | 2014/05/13 | [
"https://serverfault.com/questions/594709",
"https://serverfault.com",
"https://serverfault.com/users/87017/"
] | A single anycast IP address does not give you the same redundancy as two unicast IP addresses in distinct IP prefixes would.
Often the hardest problem for redundancy is not when something fails completely, but rather when it is misbehaving just enough to still pass the health checks, but not actually be functional.
I... | Best practice is to use at least two addresses from different prefixes and giving them a name under two different TLDs. Both those addresses can be anycast if you want. Having only one IP address will give you a single point of failure. If the routing to that address doesn't work (configuration error, an anycast instan... |
212,251 | I want to generate host names for example from my patter like this: `inc-[tnc][app|web][1-10]` where it should output like below:
```
inc-tapp1
inc-tapp2
.
.
inc-tapp10
inc-napp1
.
.
inc-capp10
inc-tweb1
.
.
inc-cweb10
```
Here t,n,c represents our datacenters in texas, new york and california. | 2015/06/25 | [
"https://unix.stackexchange.com/questions/212251",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/104377/"
] | Just use bash expansion.
```
$ echo inc-{t,n,c}{app,web}{1..10}
inc-tapp1 inc-tapp2 inc-tapp3 inc-tapp4 inc-tapp5 inc-tapp6 inc-tapp7 inc-tapp8 inc-tapp9 inc-tapp10 inc-tweb1 inc-tweb2 inc-tweb3 inc-tweb4 inc-tweb5 inc-tweb6 inc-tweb7 inc-tweb8 inc-tweb9 inc-tweb10 inc-napp1 inc-napp2 inc-napp3 inc-napp4 inc-napp5 inc... | You can use shell brace expansion
```
bash$ echo a{d,c,b}e
ade ace abe
```
<http://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html#Brace-Expansion> |
7,622,213 | There are many ways to see if a value exists using PHP. There's isset, !=false, !==false, !empty, etc. Which one will be the best (fast and accurate) one to use in the following situation?
```
if($_GET['test'])
...
``` | 2011/10/01 | [
"https://Stackoverflow.com/questions/7622213",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/599184/"
] | `if (isset($_GET['test'])) {
// use value
}` | ```
if(array_key_exists($_GET, "test"))
```
array\_key\_exists return true if a key exists in an array,
isset will return true if the key/variable exists and is not null. |
7,622,213 | There are many ways to see if a value exists using PHP. There's isset, !=false, !==false, !empty, etc. Which one will be the best (fast and accurate) one to use in the following situation?
```
if($_GET['test'])
...
``` | 2011/10/01 | [
"https://Stackoverflow.com/questions/7622213",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/599184/"
] | ```
if(array_key_exists($_GET, "test"))
```
array\_key\_exists return true if a key exists in an array,
isset will return true if the key/variable exists and is not null. | isset function only checks for its avaliability you have to use empty function too in order to see if it is set and not empty also as:
```
if (isset($_GET['test']) && !empty($_GET['test'])) {
``` |
7,622,213 | There are many ways to see if a value exists using PHP. There's isset, !=false, !==false, !empty, etc. Which one will be the best (fast and accurate) one to use in the following situation?
```
if($_GET['test'])
...
``` | 2011/10/01 | [
"https://Stackoverflow.com/questions/7622213",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/599184/"
] | `if (isset($_GET['test'])) {
// use value
}` | Isset is probably best because it checks if the url contains a "?test=". If you want to make sure it is not empty you have to check further. |
7,622,213 | There are many ways to see if a value exists using PHP. There's isset, !=false, !==false, !empty, etc. Which one will be the best (fast and accurate) one to use in the following situation?
```
if($_GET['test'])
...
``` | 2011/10/01 | [
"https://Stackoverflow.com/questions/7622213",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/599184/"
] | `if (isset($_GET['test'])) {
// use value
}` | isset function only checks for its avaliability you have to use empty function too in order to see if it is set and not empty also as:
```
if (isset($_GET['test']) && !empty($_GET['test'])) {
``` |
7,622,213 | There are many ways to see if a value exists using PHP. There's isset, !=false, !==false, !empty, etc. Which one will be the best (fast and accurate) one to use in the following situation?
```
if($_GET['test'])
...
``` | 2011/10/01 | [
"https://Stackoverflow.com/questions/7622213",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/599184/"
] | `if (isset($_GET['test'])) {
// use value
}` | I'd go with the php5 one type of get:
```
$test = filter_input(INPUT_GET, 'test', FILTER_SANITIZE_STRING);
if($test){
//do something
}
```
Reference [here](http://www.php.net/manual/en/function.filter-input.php), you can validate and sanitize with them. you can use "filter\_input\_array" for the full input types. |
7,622,213 | There are many ways to see if a value exists using PHP. There's isset, !=false, !==false, !empty, etc. Which one will be the best (fast and accurate) one to use in the following situation?
```
if($_GET['test'])
...
``` | 2011/10/01 | [
"https://Stackoverflow.com/questions/7622213",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/599184/"
] | Isset is probably best because it checks if the url contains a "?test=". If you want to make sure it is not empty you have to check further. | isset function only checks for its avaliability you have to use empty function too in order to see if it is set and not empty also as:
```
if (isset($_GET['test']) && !empty($_GET['test'])) {
``` |
7,622,213 | There are many ways to see if a value exists using PHP. There's isset, !=false, !==false, !empty, etc. Which one will be the best (fast and accurate) one to use in the following situation?
```
if($_GET['test'])
...
``` | 2011/10/01 | [
"https://Stackoverflow.com/questions/7622213",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/599184/"
] | I'd go with the php5 one type of get:
```
$test = filter_input(INPUT_GET, 'test', FILTER_SANITIZE_STRING);
if($test){
//do something
}
```
Reference [here](http://www.php.net/manual/en/function.filter-input.php), you can validate and sanitize with them. you can use "filter\_input\_array" for the full input types. | isset function only checks for its avaliability you have to use empty function too in order to see if it is set and not empty also as:
```
if (isset($_GET['test']) && !empty($_GET['test'])) {
``` |
37,534 | I have a slightly high pH, 7.2. Nothing bad but I would like to bring it down a little. I was looking at two elements/products whatever you want to call them. One was Aluminum Sulfate and the other was Sulfur.
The things I know is it does not take near as much S to bring down pH, were it does take a lot of AlS.
But ... | 2018/03/14 | [
"https://gardening.stackexchange.com/questions/37534",
"https://gardening.stackexchange.com",
"https://gardening.stackexchange.com/users/14214/"
] | Lowering soil ph isn't a one off treatment - it needs to be ongoing, with frequent soil tests to check its not getting too low. Sulphur is the safest from a planting point of view, but takes longer to work in cold weather. Aluminium sulphate works more quickly, but its easy to overdose - it can build up in the soil to ... | The classic old method: manure, especially on your case, where you have a nearly neutral soil. But in general fertilizers acidify the soil, so often this is enough for vegetable garden (one fertilize near seedling). Not doing lawn scarifier helps (also this remove acidity, which is bad for lawn in a acid soil, but not ... |
37,534 | I have a slightly high pH, 7.2. Nothing bad but I would like to bring it down a little. I was looking at two elements/products whatever you want to call them. One was Aluminum Sulfate and the other was Sulfur.
The things I know is it does not take near as much S to bring down pH, were it does take a lot of AlS.
But ... | 2018/03/14 | [
"https://gardening.stackexchange.com/questions/37534",
"https://gardening.stackexchange.com",
"https://gardening.stackexchange.com/users/14214/"
] | Lowering soil ph isn't a one off treatment - it needs to be ongoing, with frequent soil tests to check its not getting too low. Sulphur is the safest from a planting point of view, but takes longer to work in cold weather. Aluminium sulphate works more quickly, but its easy to overdose - it can build up in the soil to ... | Applying elemental sulfur, or brimstone, to acidify alkaline soil with a high lime content is not cost effective. Bacteria act on the sulfur to turn it into sulfuric acid which acidifies the soil temporarily but then the carbonates present in the soil will return the pH back to what it was before.
[![acidification usi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.