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 |
|---|---|---|---|---|---|
55,692,850 | I'm using Firebase Phone Auth to identify the user, the sms is received but I need to change the SMS sender name (Not the template) in mobile, is there anyway to change the sender name or the messaging service?
The sms is received like:
`Phonecode
106109 is your verification code for MyAppName`
what I need is:
`MyAp... | 2019/04/15 | [
"https://Stackoverflow.com/questions/55692850",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1475574/"
] | As for now, We simply **can't change the template nor sender name/number.** We can only **see** in which template user will get SMS.
[](https://i.stack.imgur.com/nYe9X.png)
Additional Info:
* Until your app gets live, your format will be \***%LOGIN\... | Go to Firebase>Authentication>Templates>Password Reset> Put %APP\_NAME% |
55,692,850 | I'm using Firebase Phone Auth to identify the user, the sms is received but I need to change the SMS sender name (Not the template) in mobile, is there anyway to change the sender name or the messaging service?
The sms is received like:
`Phonecode
106109 is your verification code for MyAppName`
what I need is:
`MyAp... | 2019/04/15 | [
"https://Stackoverflow.com/questions/55692850",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1475574/"
] | the app name displayed in the SMS can't be changed manually (neither can you modify the template).
**The app name is retrieved from the play store/app store once the app is live in the store**.
This wasn't 100% clear to me after reading Rumit's answer.
here is the response from the firebase support about this ma... | Go to Firebase>Authentication>Templates>Password Reset> Put %APP\_NAME% |
55,692,850 | I'm using Firebase Phone Auth to identify the user, the sms is received but I need to change the SMS sender name (Not the template) in mobile, is there anyway to change the sender name or the messaging service?
The sms is received like:
`Phonecode
106109 is your verification code for MyAppName`
what I need is:
`MyAp... | 2019/04/15 | [
"https://Stackoverflow.com/questions/55692850",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1475574/"
] | This is the response I got from Firebase support team as of March 19, 2021.
[](https://i.stack.imgur.com/xwFdi.png) | Go to Firebase>Authentication>Templates>Password Reset> Put %APP\_NAME% |
55,692,850 | I'm using Firebase Phone Auth to identify the user, the sms is received but I need to change the SMS sender name (Not the template) in mobile, is there anyway to change the sender name or the messaging service?
The sms is received like:
`Phonecode
106109 is your verification code for MyAppName`
what I need is:
`MyAp... | 2019/04/15 | [
"https://Stackoverflow.com/questions/55692850",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1475574/"
] | As for now, We simply **can't change the template nor sender name/number.** We can only **see** in which template user will get SMS.
[](https://i.stack.imgur.com/nYe9X.png)
Additional Info:
* Until your app gets live, your format will be \***%LOGIN\... | hi am also using firebase messages for send otp on mobile numbers. I also want to show my app name in text message but there is a firebase document that you can't change body of message in firebase. You can select the language from the Firebase console, however this is a per project setting and you can't modify the tem... |
55,692,850 | I'm using Firebase Phone Auth to identify the user, the sms is received but I need to change the SMS sender name (Not the template) in mobile, is there anyway to change the sender name or the messaging service?
The sms is received like:
`Phonecode
106109 is your verification code for MyAppName`
what I need is:
`MyAp... | 2019/04/15 | [
"https://Stackoverflow.com/questions/55692850",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1475574/"
] | the app name displayed in the SMS can't be changed manually (neither can you modify the template).
**The app name is retrieved from the play store/app store once the app is live in the store**.
This wasn't 100% clear to me after reading Rumit's answer.
here is the response from the firebase support about this ma... | hi am also using firebase messages for send otp on mobile numbers. I also want to show my app name in text message but there is a firebase document that you can't change body of message in firebase. You can select the language from the Firebase console, however this is a per project setting and you can't modify the tem... |
55,692,850 | I'm using Firebase Phone Auth to identify the user, the sms is received but I need to change the SMS sender name (Not the template) in mobile, is there anyway to change the sender name or the messaging service?
The sms is received like:
`Phonecode
106109 is your verification code for MyAppName`
what I need is:
`MyAp... | 2019/04/15 | [
"https://Stackoverflow.com/questions/55692850",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1475574/"
] | This is the response I got from Firebase support team as of March 19, 2021.
[](https://i.stack.imgur.com/xwFdi.png) | hi am also using firebase messages for send otp on mobile numbers. I also want to show my app name in text message but there is a firebase document that you can't change body of message in firebase. You can select the language from the Firebase console, however this is a per project setting and you can't modify the tem... |
30 | What is the difference caused by using “nope” instead of ”no”?
Is it used because “nope” sounds better and not straight like “no”? In some situations, it feels like *nope* is better to use than *no* even though it adds 2 more characters. What is the reason why many use it? | 2013/01/23 | [
"https://ell.stackexchange.com/questions/30",
"https://ell.stackexchange.com",
"https://ell.stackexchange.com/users/4/"
] | "Nope" is informal. You wouldn't usually want to use it, for example, answering questions for a job interview, but it would be an appropriate answer to a friend's question "Have you seen that movie yet?" | I think the context has a lot to do with how the word Nope is perceived:
1. Somebody asks you for something.
>
> - Will you do something for me?
> - Nope. << Rude
>
>
>
2. Somebody asks for information.
>
> - Is your name Sam?
> - Nope. << Playful / informal
>
>
>
Maybe the word Nope implies a casual, rel... |
30 | What is the difference caused by using “nope” instead of ”no”?
Is it used because “nope” sounds better and not straight like “no”? In some situations, it feels like *nope* is better to use than *no* even though it adds 2 more characters. What is the reason why many use it? | 2013/01/23 | [
"https://ell.stackexchange.com/questions/30",
"https://ell.stackexchange.com",
"https://ell.stackexchange.com/users/4/"
] | From [here](https://english.stackexchange.com/a/59658/31820), they have no difference in meaning; but *nope* is more informal, only used in a sense of opposite to *yes* (or *yup*). Also, *nope* is not used often in writing.
You wouldn't say "there were nope errors", for example. | "Nope" is informal. You wouldn't usually want to use it, for example, answering questions for a job interview, but it would be an appropriate answer to a friend's question "Have you seen that movie yet?" |
30 | What is the difference caused by using “nope” instead of ”no”?
Is it used because “nope” sounds better and not straight like “no”? In some situations, it feels like *nope* is better to use than *no* even though it adds 2 more characters. What is the reason why many use it? | 2013/01/23 | [
"https://ell.stackexchange.com/questions/30",
"https://ell.stackexchange.com",
"https://ell.stackexchange.com/users/4/"
] | The first and most important point to note it that it's *very* informal (more so than using contractions such as my ***it's*** there, for example).
The main reason for using it at all stems from that "extreme informality". It normally conveys a *relaxed attitude* on the part of the speaker. Depending on context, it ca... | Nope is used informally, normally during chat where you want to give a quick, fluid answer to a question without halting it like 'No' would.
They both mean the same thing, and 'Nope' is very rarely written. |
30 | What is the difference caused by using “nope” instead of ”no”?
Is it used because “nope” sounds better and not straight like “no”? In some situations, it feels like *nope* is better to use than *no* even though it adds 2 more characters. What is the reason why many use it? | 2013/01/23 | [
"https://ell.stackexchange.com/questions/30",
"https://ell.stackexchange.com",
"https://ell.stackexchange.com/users/4/"
] | Nope is used informally, normally during chat where you want to give a quick, fluid answer to a question without halting it like 'No' would.
They both mean the same thing, and 'Nope' is very rarely written. | I think there is a subtle difference between emphatic and dismissive or terminal. And I think that nope is often used in the latter two ways. Think of how the lips must close together and this gives nope its terminal feeling in a physical way. Pursed lips. Can't pry them open. Not going to change. |
30 | What is the difference caused by using “nope” instead of ”no”?
Is it used because “nope” sounds better and not straight like “no”? In some situations, it feels like *nope* is better to use than *no* even though it adds 2 more characters. What is the reason why many use it? | 2013/01/23 | [
"https://ell.stackexchange.com/questions/30",
"https://ell.stackexchange.com",
"https://ell.stackexchange.com/users/4/"
] | I agree with the person who says that nope is dismissive and slightly rude and I would add that a text nope feels rude to the recipient. It feels like a "final" no. | I think there is a subtle difference between emphatic and dismissive or terminal. And I think that nope is often used in the latter two ways. Think of how the lips must close together and this gives nope its terminal feeling in a physical way. Pursed lips. Can't pry them open. Not going to change. |
30 | What is the difference caused by using “nope” instead of ”no”?
Is it used because “nope” sounds better and not straight like “no”? In some situations, it feels like *nope* is better to use than *no* even though it adds 2 more characters. What is the reason why many use it? | 2013/01/23 | [
"https://ell.stackexchange.com/questions/30",
"https://ell.stackexchange.com",
"https://ell.stackexchange.com/users/4/"
] | "Nope" is informal. You wouldn't usually want to use it, for example, answering questions for a job interview, but it would be an appropriate answer to a friend's question "Have you seen that movie yet?" | Nope is used informally, normally during chat where you want to give a quick, fluid answer to a question without halting it like 'No' would.
They both mean the same thing, and 'Nope' is very rarely written. |
30 | What is the difference caused by using “nope” instead of ”no”?
Is it used because “nope” sounds better and not straight like “no”? In some situations, it feels like *nope* is better to use than *no* even though it adds 2 more characters. What is the reason why many use it? | 2013/01/23 | [
"https://ell.stackexchange.com/questions/30",
"https://ell.stackexchange.com",
"https://ell.stackexchange.com/users/4/"
] | From [here](https://english.stackexchange.com/a/59658/31820), they have no difference in meaning; but *nope* is more informal, only used in a sense of opposite to *yes* (or *yup*). Also, *nope* is not used often in writing.
You wouldn't say "there were nope errors", for example. | 'Nope' is a variant of 'no' (exclamation).
First known use: 1888 ([M-W](https://www.merriam-webster.com/dictionary/nope#h1))
Phonologically, pronunciation can explain where the P came from.
Suppose someone asked you a question and you said 'No'. You'd usually pause after saying 'No' (exclamation) with your lips alr... |
30 | What is the difference caused by using “nope” instead of ”no”?
Is it used because “nope” sounds better and not straight like “no”? In some situations, it feels like *nope* is better to use than *no* even though it adds 2 more characters. What is the reason why many use it? | 2013/01/23 | [
"https://ell.stackexchange.com/questions/30",
"https://ell.stackexchange.com",
"https://ell.stackexchange.com/users/4/"
] | The first and most important point to note it that it's *very* informal (more so than using contractions such as my ***it's*** there, for example).
The main reason for using it at all stems from that "extreme informality". It normally conveys a *relaxed attitude* on the part of the speaker. Depending on context, it ca... | I think the context has a lot to do with how the word Nope is perceived:
1. Somebody asks you for something.
>
> - Will you do something for me?
> - Nope. << Rude
>
>
>
2. Somebody asks for information.
>
> - Is your name Sam?
> - Nope. << Playful / informal
>
>
>
Maybe the word Nope implies a casual, rel... |
30 | What is the difference caused by using “nope” instead of ”no”?
Is it used because “nope” sounds better and not straight like “no”? In some situations, it feels like *nope* is better to use than *no* even though it adds 2 more characters. What is the reason why many use it? | 2013/01/23 | [
"https://ell.stackexchange.com/questions/30",
"https://ell.stackexchange.com",
"https://ell.stackexchange.com/users/4/"
] | In my opinion Nope is a dismissive and slightly rude version of no. Nope should never be used in a professional context e.g. it should never be used as an option for web site or search engine users to select as a response to a question, because it makes the company using it look un-professional and rude to their custom... | I agree with the person who says that nope is dismissive and slightly rude and I would add that a text nope feels rude to the recipient. It feels like a "final" no. |
30 | What is the difference caused by using “nope” instead of ”no”?
Is it used because “nope” sounds better and not straight like “no”? In some situations, it feels like *nope* is better to use than *no* even though it adds 2 more characters. What is the reason why many use it? | 2013/01/23 | [
"https://ell.stackexchange.com/questions/30",
"https://ell.stackexchange.com",
"https://ell.stackexchange.com/users/4/"
] | "Nope" is informal. You wouldn't usually want to use it, for example, answering questions for a job interview, but it would be an appropriate answer to a friend's question "Have you seen that movie yet?" | *Nope* is an informal variant of one of the meanings *No* which is:
>
> 3 : not so —used to express negation, dissent, denial, or refusal (**e.g.** no, I'm not going)
>
> [Webster-Merriam](http://www.merriam-webster.com/dictionary/no)
>
>
>
That is why, we can only use it for *Yes/No questions*. |
66,449,027 | I am trying to separate English characters from non-English characters . But I see numbers are not retained. I want to use it in `re.compile`. Any way to do it?
**Code**:
```
import re
a = 'Этап 51 Stage 51'
eng = re.compile(r'[^\u0041-\u024f]')
b=eng.sub(' ',a)
print('eng is >',b)
noneng = re.compile(r'[\u0041-\u0... | 2021/03/03 | [
"https://Stackoverflow.com/questions/66449027",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | Your first regular expression matches any character with a character code not between the hex values `41` and `24f`. The non-english characters in your input string are outside of this range. The 10 standard numeric digits have character codes between `30` and `39` hex, so they are also outside this range. So the first... | `maketrans/translate` is generally faster than regular expressions for this kind of thing.
```
import string
noASCII = str.maketrans('','',string.printable) # ASCII only (not all unicode)
def onlyENG(a):
return a.translate(str.maketrans('','',a.translate(noASCII)))
noLetters = str.maketrans('','',string.ascii_le... |
3,120,125 | I want to gain a strong validity for formal definition of divergence compare to my version.
I'll explain my current understanding below. I hope someone can help me rectifying error I made.
I was guessing out definition of divergence at a point with epsilon-delta proof
(more specifically for case: $\lim\_{x\to a}$ f(x)... | 2019/02/20 | [
"https://math.stackexchange.com/questions/3120125",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/405096/"
] | Your question is quite hard to understand but I'll try my best to answer it.
You are trying to find a definition for $ \lim\_{x\to a} f(x) = + \infty$. i.e. a good definition for " if $x$ approaches $a$ then the function $f$ grows arbitrarily. The correct definition is
$$ \forall M > 0, \exists \delta > 0 : \vert x-... | No, it does not work. Consider the function $f$ given by $f(x)=1$. Then by your definition for all $r\in\mathbb{R}$ we have $\lim\_{x\rightarrow 0}f(x)=r$.
To show this let $\delta>0$ randomly given and note that for $\varepsilon=2+|r|$ we have
$$|f(x)-r|\leq 1+|r|<\varepsilon$$
for all $|x|<\delta$. You will have s... |
22,272,816 | I've come through a lot of articles and even questions on SO which state that that in PHP, because of the fact that regular expressions are represented using strings, you must escape all backslashes. But for some reason, the following returns true without failing:
```
preg_match('/^\w+\d+$/','abcdef123456')
```
How ... | 2014/03/08 | [
"https://Stackoverflow.com/questions/22272816",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1344955/"
] | According to [PHP String - Manual - Single quoted](http://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.single):
>
> To specify a literal single quote, escape it with a backslash (\). To
> specify a literal backslash, double it (\\). **All other instances of
> backslash will be treate... | Because you're using single quotes. In fact, with double quotes it doesn't matter here because `\w` has no special meaning in a PHP string and therefor is left as `\w`. |
67,295,618 | I have this stateless date of birth input class, read-only. When tapped, it will show a date picker and after the user picked a date, it will send the value to the bloc state, and it will change the state and the value so it shows the picked date from the date picker.
This is the code:
```
class DateOfBirthInput exten... | 2021/04/28 | [
"https://Stackoverflow.com/questions/67295618",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4586585/"
] | Currently, you are trying to access the SignupBloc from the signup bloc's builder context, the `context` variable because both of your stateless widget's context and blocbuilder's context are named as `context`
Rename one of your contexts to something else, either `build(BuildContext context)` or `builder: (context, s... | Try this change.
```
builder: (ctx, state) {
//...
ctx.read<SignUpBloc>.add(DateOfBirthChanged(dateOfBirthDisplay: dateOfBirth, dateOfBirth: datePicker));
},
``` |
52,357,925 | I'm trying to implement a simple paging system with c# and cosmos on my Vue front end, but i'm not really sure the best way to implement a the paging when the user wants to go back.
For going forward i'm using the continuation token, so cosmos know where i have got up to, but i'm not really sure on the best way to wor... | 2018/09/16 | [
"https://Stackoverflow.com/questions/52357925",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19638/"
] | I have tried to create a python 2 / 3 answer.
python 2 `input` interprets your input, converting to integers if possible for instance. So you cannot have an integer AND a string. When entering `quit`, since `quit` isn't known by the interpreter, you get a `NameError`
The only way to make it work would be to type `"qu... | The main error in your code is that `input` returns a string and you are comparing it to integers. By example `'6'` is not equal to `6`.
Although, you could simplify your code greatly by comparing the input to a tuple of allowed value. This will be both shorter and more extendable.
```
from random import randint
whi... |
52,357,925 | I'm trying to implement a simple paging system with c# and cosmos on my Vue front end, but i'm not really sure the best way to implement a the paging when the user wants to go back.
For going forward i'm using the continuation token, so cosmos know where i have got up to, but i'm not really sure on the best way to wor... | 2018/09/16 | [
"https://Stackoverflow.com/questions/52357925",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19638/"
] | There's an easy fix. But first, the code, as posted above, does not work. Since ROLL is a string, the numbers in the if/elif statements need to be strings, too.
The solution (one easy solution) is to have an extra if statement for the "quit" case and then finish the while loop early using "continue", like so:
```
imp... | The main error in your code is that `input` returns a string and you are comparing it to integers. By example `'6'` is not equal to `6`.
Although, you could simplify your code greatly by comparing the input to a tuple of allowed value. This will be both shorter and more extendable.
```
from random import randint
whi... |
940,705 | I just installed Ubuntu 16.-04 on a brand new HP laptop, apparently with an Intel WiFi interface (WiFi/Bluetooth combined).
Unfortunately I cannot see anything about the WiFi adapter and WiFi does not work at all. Everything else, including Ethernet works fine.
Can anyone help me with that? I already tried many diffe... | 2017/07/28 | [
"https://askubuntu.com/questions/940705",
"https://askubuntu.com",
"https://askubuntu.com/users/393804/"
] | You have the 4.4 kernel. It doesn't support this Intel adapter. You probably installed Ubuntu from the original 16.04 ISO.
If you have a wired internet connection (it looks like you have updated your system), then install the [HWE kernel](https://wiki.ubuntu.com/Kernel/LTSEnablementStack) by running
```
sudo apt inst... | Open terminal and type in:
```
sudo tee /etc/modprobe.d/rtl8723be.conf <<< "options rtl8723be ant_sel=1"
```
And reboot!
If the problem is still not solved, then try changing it to `ant_sel=2`. |
65,676,306 | I am wondering what is the better solution to get differences between two `List<Dictionary<string, string>>` using lambda linq with C#.
I am trying to use an expression like this but get an empty result even though both list are the same
```
var result = actualOutputList.Where(a => expectedOutputList.
Any... | 2021/01/12 | [
"https://Stackoverflow.com/questions/65676306",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13725442/"
] | You can create an `IEqualityComparer` subclass for `Dictionary`:
```
public class DictionaryEqualityComparer<TKey, TValue> : IEqualityComparer<Dictionary<TKey, TValue>> {
public bool Equals(Dictionary<TKey, TValue> d1, Dictionary<TKey, TValue> d2) {
if (ReferenceEquals(d1, d2))
return true;
... | Also, are you sure you need to compare a list of dictionaries??
It would be good if you can give us in INPUT and expected OUTPUT example just to clarify what you expect to happen.
the below will return only the key for `a` as this is the only one that matches in both dictionaries. if you change the value of the key `... |
22,592,244 | I am trying to trigger `$window.open(url, windowName, attributes);` in my angular app with a ng-click
I have defined a directive and wrap window.open in a function trigger thanks to an ng-click linked to a button on my template:
```
myApp.directive('myModal', ['$log', function ($log, $window) {
return {
r... | 2014/03/23 | [
"https://Stackoverflow.com/questions/22592244",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2641547/"
] | You cannot inject window using link, you can simply use the native JavaScript **window** object
**example:**
js:
```
var app=angular.module('App', []);
app.directive('myModal', ['$log', function ($log) {
return {
restrict: 'EA',
link: function (scope,element) {
scope.openWindow = fun... | You should do it like this:
```
myApp.directive('myModal', ['$log', '$window', function ($log, $window) {
return {
restrict: 'E',
templateUrl: 'modal-tpl',
replace: true,
transclude: true,
link: function (scope) {
scope.openWindow = function(){
... |
17,128,389 | The code below will find intersection of 2 lines and return the point object. If point is only ever going to be created by IntersectionOf2Lines class, should i make point a nested class ? If not then why not ? Thanks
```
class Point {
private final int x;
private final int y;
public Point(int x, int y) {
... | 2013/06/15 | [
"https://Stackoverflow.com/questions/17128389",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2458372/"
] | If the Point class is not needed by any other class and the Point class don't need access to the private class members of IntersectionOf2Lines, then you could make the Point class a *static nested class*.
A *static nested class* is a lighter inner class that has no access to the super class members and is often used l... | If `Point` is only created by `IntersectionOf2Lines`, I would implement it as a *static nested class*: This way you can declare the constructor to be `private`:
```
public class IntersectionOf2Lines {
static class Point {
private final int x;
private final int y;
private Point(int x, int y... |
17,128,389 | The code below will find intersection of 2 lines and return the point object. If point is only ever going to be created by IntersectionOf2Lines class, should i make point a nested class ? If not then why not ? Thanks
```
class Point {
private final int x;
private final int y;
public Point(int x, int y) {
... | 2013/06/15 | [
"https://Stackoverflow.com/questions/17128389",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2458372/"
] | If the Point class is not needed by any other class and the Point class don't need access to the private class members of IntersectionOf2Lines, then you could make the Point class a *static nested class*.
A *static nested class* is a lighter inner class that has no access to the super class members and is often used l... | Mathematically, Line is made of number of points. If you are creating Point class outside, you can use it to show point on particular line, end points of line, so it should be a normal class and not nested class to IntersectionOf2Lines. |
27,107 | I just had my 7 month old male cat neutered 4 days ago but now his sister has gone in heat and he is chasing and mounting her.
Since he is only newly fixed can he still get her pregnant?
Should I lock them away from each other? | 2020/02/17 | [
"https://pets.stackexchange.com/questions/27107",
"https://pets.stackexchange.com",
"https://pets.stackexchange.com/users/17356/"
] | He can impregnate her for a short period after neutering.
Separate them from each other at this early stage.
When a cat is neutered the testicles are removed, making the cat unable to create sperm. The residual sperm can still impregnate a female cat. A search shows different time frames for which this residual spe... | Yes, a [neutered male cat can still get a female pregnant](https://learnaboutcat.com/can-a-neutered-male-cat-still-get-a-female-pregnant/). Your male cat's genital tract will still contain testosterone and sperm for **at least six weeks after neutering**. Therefore, he is still capable of impregnating female cats. If y... |
72,153,235 | I have a data in following format:
```
ID time0 obs_num recorded_dt
1 2009-01-01 A 2009-01-01
1 2009-01-01 D 2009-01-31
1 2009-01-01 B 2009-01-05
2 2005-02-02 B 2005-02-03
```
I want to calculate columns based on days difference for up to a month in reference to t... | 2022/05/07 | [
"https://Stackoverflow.com/questions/72153235",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12306332/"
] | ```html
<header>
<div class="logo">
<a href=""><img src="Images/samsung-logo.png" alt="Samsung Logo" width="150"></a>
<ul class="menubalk">
<li><a href="#">Contact</a></li>
<li><a href="#">Assortiment</a></li>
</ul>
</div>
</header>
<div class="bg">
<video src=... | The reason why your anchor tags are not working is a combination of using `display: inline;` styles and `position: absolute;`. To fix this issue, update your styles to be accurate to [this](https://jsfiddle.net/x7jnLpue/3/) JSFiddle. I have also corrected some of your syntax. |
72,153,235 | I have a data in following format:
```
ID time0 obs_num recorded_dt
1 2009-01-01 A 2009-01-01
1 2009-01-01 D 2009-01-31
1 2009-01-01 B 2009-01-05
2 2005-02-02 B 2005-02-03
```
I want to calculate columns based on days difference for up to a month in reference to t... | 2022/05/07 | [
"https://Stackoverflow.com/questions/72153235",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12306332/"
] | The reason why your anchor tags are not working is a combination of using `display: inline;` styles and `position: absolute;`. To fix this issue, update your styles to be accurate to [this](https://jsfiddle.net/x7jnLpue/3/) JSFiddle. I have also corrected some of your syntax. | 1. using `div` in `a` tag is semantically incorrect. You should use `span` tag.
2. don't use `li` in `a` tag. Use `a` in `li` tag.
3. if you want to use `div` in `a` tag just use:
```
<div style="cursor: pointer;" onclick="window.location='http://google.com';">
Hello world
</div>
```
or use:
```
<a href="http://goo... |
72,153,235 | I have a data in following format:
```
ID time0 obs_num recorded_dt
1 2009-01-01 A 2009-01-01
1 2009-01-01 D 2009-01-31
1 2009-01-01 B 2009-01-05
2 2005-02-02 B 2005-02-03
```
I want to calculate columns based on days difference for up to a month in reference to t... | 2022/05/07 | [
"https://Stackoverflow.com/questions/72153235",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12306332/"
] | ```html
<header>
<div class="logo">
<a href=""><img src="Images/samsung-logo.png" alt="Samsung Logo" width="150"></a>
<ul class="menubalk">
<li><a href="#">Contact</a></li>
<li><a href="#">Assortiment</a></li>
</ul>
</div>
</header>
<div class="bg">
<video src=... | 1. using `div` in `a` tag is semantically incorrect. You should use `span` tag.
2. don't use `li` in `a` tag. Use `a` in `li` tag.
3. if you want to use `div` in `a` tag just use:
```
<div style="cursor: pointer;" onclick="window.location='http://google.com';">
Hello world
</div>
```
or use:
```
<a href="http://goo... |
38,579,096 | I recently started making a gem for one of my projects, however when it gets to a certain part while running it will just stop executing and go right to the end and returns an empty array. The problem is in the parse\_results function
```
def parse_results(result)
puts result
result_hash = Hash.new
result_hash["... | 2016/07/25 | [
"https://Stackoverflow.com/questions/38579096",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3998383/"
] | Here's one option with an `outer join`:
```
select *
from apps
left join markets
on markets.app_id = apps.id
where markets.app_id is null or
markets.code = 'US'
```
* [SQL Fiddle Demo](http://sqlfiddle.com/#!9/ed8b6f/1) | As a note, you don't seem to want information about apps, so you could do:
```
select a.*
from apps a
where not exists (select 1 from markets m where m.app_id = a.id) or
exists (select 1 from markets m where m.app_id = a.id and m.code = 'US');
``` |
17,583,965 | ```
class Inventory(object):
def __init__(self):
self.inventory = {
'cash': 500,
'paycheck': 1,
'savings': 1000,
'current_car': 0,
'possible_cars': ['Chevy', 'Honda', 'BMW'],
'car_cost': [0, 100, 200],
'current_house': 0,
... | 2013/07/11 | [
"https://Stackoverflow.com/questions/17583965",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2570777/"
] | First, that isn't the error that your code produces. In your version you have `'status': status()` but on SO you wrote `'status': self.status()`. In any case, if you fix that you still have a problem,
```
AttributeError: 'Inventory' object has no attribute 'inventory'
```
The reason you get that error is because Pyt... | I tried copying & pasting your code into my Python interpreter and I get a different error:
```
>>> inv = new Inventory()
File "<stdin>", line 1
inv = new Inventory()
^
SyntaxError: invalid syntax
>>> inv = Inventory()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>... |
17,583,965 | ```
class Inventory(object):
def __init__(self):
self.inventory = {
'cash': 500,
'paycheck': 1,
'savings': 1000,
'current_car': 0,
'possible_cars': ['Chevy', 'Honda', 'BMW'],
'car_cost': [0, 100, 200],
'current_house': 0,
... | 2013/07/11 | [
"https://Stackoverflow.com/questions/17583965",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2570777/"
] | First, that isn't the error that your code produces. In your version you have `'status': status()` but on SO you wrote `'status': self.status()`. In any case, if you fix that you still have a problem,
```
AttributeError: 'Inventory' object has no attribute 'inventory'
```
The reason you get that error is because Pyt... | I got a different error, but I believe the solution would be the same:
```
class Inventory(object):
def __init__(self):
self.inventory = {
'cash': 500,
'paycheck': 1,
'savings': 1000,
'current_car': 0,
'possible_cars': ['Chevy', 'Honda', 'BMW'],
... |
17,583,965 | ```
class Inventory(object):
def __init__(self):
self.inventory = {
'cash': 500,
'paycheck': 1,
'savings': 1000,
'current_car': 0,
'possible_cars': ['Chevy', 'Honda', 'BMW'],
'car_cost': [0, 100, 200],
'current_house': 0,
... | 2013/07/11 | [
"https://Stackoverflow.com/questions/17583965",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2570777/"
] | I got a different error, but I believe the solution would be the same:
```
class Inventory(object):
def __init__(self):
self.inventory = {
'cash': 500,
'paycheck': 1,
'savings': 1000,
'current_car': 0,
'possible_cars': ['Chevy', 'Honda', 'BMW'],
... | I tried copying & pasting your code into my Python interpreter and I get a different error:
```
>>> inv = new Inventory()
File "<stdin>", line 1
inv = new Inventory()
^
SyntaxError: invalid syntax
>>> inv = Inventory()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>... |
4,239,361 | I'm getting a "SAXParseException: Unexpected end of document" error when trying to parse an xml document on android.
The document in question is from the google weather api, but it seems to throw the same error regardless of the xml file in question (as long as the xml is valid) so I suspect it's a problem with my ap... | 2010/11/21 | [
"https://Stackoverflow.com/questions/4239361",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1505600/"
] | Looking at your code it seems that you are trying to fetch the file off a computer on your network. Have you tried to open that URL in a browser to check if it is really sending the XML file?
Alternatively you can also check with Wireshark what answer your phone gets. My guess is that you simply don't get the XML docu... | Solved (sort of)...
I saw sax.parser could also take in a uri directly (instead of the input stream).
As soon as I tried that, it parsed okay, and the code was a whole lot shorter =)
Thanks for the help.
```
String weatherFeed = "http://192.168.1.66:8000/google.xml";
DocumentBuilderFactory dbf = DocumentBuilder... |
4,239,361 | I'm getting a "SAXParseException: Unexpected end of document" error when trying to parse an xml document on android.
The document in question is from the google weather api, but it seems to throw the same error regardless of the xml file in question (as long as the xml is valid) so I suspect it's a problem with my ap... | 2010/11/21 | [
"https://Stackoverflow.com/questions/4239361",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1505600/"
] | Looking at your code it seems that you are trying to fetch the file off a computer on your network. Have you tried to open that URL in a browser to check if it is really sending the XML file?
Alternatively you can also check with Wireshark what answer your phone gets. My guess is that you simply don't get the XML docu... | Your problem may have been caused by an encoding issue.
Try creating your inputStream via a ByteArrayInputStream with UTF-8 encoding like below and see if that works. This, (below), is what I had to use when I had a String of XML, but it may still be an issue via the inputestream you are using.
```
String sData = "..... |
37,785,839 | I want to send a HTTP response via scapy to a target system. I know scapy uses layered implementation to create a packet like IP/TCP/ETHER. To send a simple TCP packet we can use the following scapy script.
```
#!/usr/bin/python
from scapy.all import *
ip=IP(src="10.10.1.207", dst="10.10.1.60")
payload="Hello World"... | 2016/06/13 | [
"https://Stackoverflow.com/questions/37785839",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5985341/"
] | **Edit: this is outdated. Since Scapy 2.4.3 you can use [the http layer](https://scapy.readthedocs.io/en/latest/layers/http.html)**
Scapy does not have a native HTTP layer dissector, however, you can send an HTTP request/response easily as it is a textual protocol:
```
RESP = "HTTP/1.1 200 OK\r\n"
RESP += "Server: e... | Although, Scapy does not have native support for HTTP Layer but there is a python module available for extending the functionality of Scapy to support HTTP layer. The module name is "scapy-http" and can be found on github at [invernizzi/scapy-http](https://github.com/invernizzi/scapy-http).
You can install it using ... |
37,785,839 | I want to send a HTTP response via scapy to a target system. I know scapy uses layered implementation to create a packet like IP/TCP/ETHER. To send a simple TCP packet we can use the following scapy script.
```
#!/usr/bin/python
from scapy.all import *
ip=IP(src="10.10.1.207", dst="10.10.1.60")
payload="Hello World"... | 2016/06/13 | [
"https://Stackoverflow.com/questions/37785839",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5985341/"
] | **Edit: this is outdated. Since Scapy 2.4.3 you can use [the http layer](https://scapy.readthedocs.io/en/latest/layers/http.html)**
Scapy does not have a native HTTP layer dissector, however, you can send an HTTP request/response easily as it is a textual protocol:
```
RESP = "HTTP/1.1 200 OK\r\n"
RESP += "Server: e... | As mentioned by Jeff Bencteux's answer, http layer is now available on scapy. This can be easily done by this, here's an example:
```
>>>import scapy.all as S
>>>S.load_layer("http") # without this, http might not be loaded as default
>>> pkg = S.IP() / S.TCP() / HTTP() / HTTPResponse(Server="exampleServer") / "<html... |
37,785,839 | I want to send a HTTP response via scapy to a target system. I know scapy uses layered implementation to create a packet like IP/TCP/ETHER. To send a simple TCP packet we can use the following scapy script.
```
#!/usr/bin/python
from scapy.all import *
ip=IP(src="10.10.1.207", dst="10.10.1.60")
payload="Hello World"... | 2016/06/13 | [
"https://Stackoverflow.com/questions/37785839",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5985341/"
] | Although, Scapy does not have native support for HTTP Layer but there is a python module available for extending the functionality of Scapy to support HTTP layer. The module name is "scapy-http" and can be found on github at [invernizzi/scapy-http](https://github.com/invernizzi/scapy-http).
You can install it using ... | As mentioned by Jeff Bencteux's answer, http layer is now available on scapy. This can be easily done by this, here's an example:
```
>>>import scapy.all as S
>>>S.load_layer("http") # without this, http might not be loaded as default
>>> pkg = S.IP() / S.TCP() / HTTP() / HTTPResponse(Server="exampleServer") / "<html... |
28,796,887 | I've registered a custom type handler for Dapper to Json serialize a string. This works as expected. However, whilst coding, I discovered two pieces of code after refactoring, the latter one which didn't trigger the datatype handler, but should in my opinion, so what's the difference?
First the code that works as expe... | 2015/03/01 | [
"https://Stackoverflow.com/questions/28796887",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3791372/"
] | I am going to assume that the compile-time type (i.e. declaration type) of `val` is `System.Object`. I will explain why the two situations are not equivalent.
One must be careful to distinguish between the compile-time type of a variable and the actual run-time type (which is found by `.GetType()`).
In the first piec... | Assuming there is no implicit conversion available between JsonString and String, the code in the second example won't work. If there is an implicit conversion available, you need to provide more information about the exception that is occurring.
WIth no conversion available between JsonString, a variable declared wit... |
32,225,867 | I'm confused as to how should I do CSRF protection. I have separate frontend (angularjs) and backend (Spring). They are deployed in completely separate places, and are communicating by REST.
My problem is as follows. Angular refuses to send my CSRF cookie cross domain - all I can send is CSRF header. I've tried adding... | 2015/08/26 | [
"https://Stackoverflow.com/questions/32225867",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1959095/"
] | Your code blocks seems ok. Have you tried `"Access-Control-Allow-Origin", "http://localhost:9000"` change to this `*`.
BTW [it's a bug in chrome pointing localhost with its port](http://code.google.com/p/chromium/issues/detail?id=67743) which won't fix([SO discussion](https://stackoverflow.com/questions/10883211/deadl... | Working for me, with the following code
1. Server side, I have coded the [CSRF](https://spring.io/guides/tutorials/spring-security-and-angular-js/#_csrf_protection) and [CORS](https://spring.io/guides/tutorials/spring-security-and-angular-js/#_cors_negotiation) filters as described in the official [Spring Angular](htt... |
15,158,252 | Assuming I am working with the following JSON of locations:
```
var beaches = [
['Bondi Beach', -33.890542, 151.274856, 4],
['Coogee Beach', -33.923036, 151.259052, 5],
['Cronulla Beach', -34.028249, 151.157507, 3],
['Manly Beach', -33.80010128657071, 151.28747820854187, 2],
['Maroubra Beach', -33.950198, 15... | 2013/03/01 | [
"https://Stackoverflow.com/questions/15158252",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/84433/"
] | The [Google Maps API v3 contains a method for displaying a set of markers](https://developers.google.com/maps/documentation/javascript/reference#Map):
>
> fitBounds(bounds:LatLngBounds) - None - Sets the viewport to contain the given bounds.
>
>
>
Add all your markers to a google.maps.LatLngBounds object, then ca... | [Here's](http://jsfiddle.net/b9qud/2/) a quick way to add the markers to a LatLngBounds and grab the center of the box. This will at the very least show you all the markers you've got. The rectangle and 'C' marker are to show you what the bounding box and center look like.
```
var bounds = new google.maps.LatLngBounds... |
59,202,421 | **Use-Case Scenario**
I have a client with low-income residents. These residents can fill out a paper form with a bunch of check boxes.
It has one section for "Education" (GED, diploma, associates, etc) and another for "Skills" (HVAC, plumbing, etc)
Employers reach out to my client, and for example ask for all thei... | 2019/12/05 | [
"https://Stackoverflow.com/questions/59202421",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11870961/"
] | For this simple case, where you only want to filter by yes/no columns, you don't have to use VBA. It's more flexible (and perhaps efficient) though.
Create a search form (let's call it `frmSearch`), with unbound check boxes for all skills (`chkHVAC`, `chkGED` etc.)
Then you can use a single query that covers all skil... | More explicitly:
we start with a table structure like:
[](https://i.stack.imgur.com/dmjFR.jpg)
Then we create a search form so the database users don't have to learn to use access.
[]... |
56,616,111 | i'm running my node.js app on the linux server using PM2, with a config file, like this:
```
PM2 start mywebsite.config.js
```
all is good. but now i want to add jenkins to the picture.
i'm running a pipeline project in jenkins, using Jenkinsfile.
All working fine except for the last command, that should restart th... | 2019/06/16 | [
"https://Stackoverflow.com/questions/56616111",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1941285/"
] | Instead of restarting PM2 through you jenkins code, let PM2 do it by itself, using the watch flag. in your config file, set watch to be true.
You may want to add a relatively new flag called watch-ignore. that's an array, with files to be ignored by the watch. add your log file and error file to this list. otherwise, a... | To run `pm2 restart all` from Jenkins you need to:
1. Configure your system to run sudo from jenkins
(<https://sgoyal.net/2016/11/18/run-a-shell-from-jenkins-using-sudo-ubuntu/>)
2. Make a symbolic link to the .pm2/ folder, in my case(Ubuntu) it was at /root/.pm2 so i run
`sudo ln -s /root/.pm2/ /var/lib/jenkins/`
N... |
56,616,111 | i'm running my node.js app on the linux server using PM2, with a config file, like this:
```
PM2 start mywebsite.config.js
```
all is good. but now i want to add jenkins to the picture.
i'm running a pipeline project in jenkins, using Jenkinsfile.
All working fine except for the last command, that should restart th... | 2019/06/16 | [
"https://Stackoverflow.com/questions/56616111",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1941285/"
] | Instead of restarting PM2 through you jenkins code, let PM2 do it by itself, using the watch flag. in your config file, set watch to be true.
You may want to add a relatively new flag called watch-ignore. that's an array, with files to be ignored by the watch. add your log file and error file to this list. otherwise, a... | ```
BUILD_ID=dontKillMe PM2 start mywebsite.config.js
```
Jenkins kills the pm2 daemon to be created by the build.
You should put the keyword to prevent killing daemon by Jenkins. |
16,122,432 | I wrote a program that monitors an IMAP email account. It runs on a schedule, on a laptop that I travel with. Sometimes it runs when my internet connection is through my mobile device, which has a metered connection (that is, I pay by the GB), and I don't want it to, because it uses a lot of bandwidth, and it can wait ... | 2013/04/20 | [
"https://Stackoverflow.com/questions/16122432",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/349974/"
] | A brief search of MSDN found the NetworkInformation.GetInternetConnectionProfile function. It looks like it's officially part of the Metro interface, but I have heard that desktop applications can access most of the Metro libraries. | In 2021 you can use the powershell .NET framework and a registery KEY like that to test if your ethernet connection is set to metered:
```
$definition = @"
using System;
using System.Runtime.InteropServices;
namespace Win32Api
{
public class NtDll
{
[DllImport("ntdll.dll", EntryPoint="RtlAdjustPrivil... |
47,156,112 | So I have a CF whose Schema looks something like this :
```
CREATE TABLE "emp" (
id text,
column1 text,
column2 text,
PRIMARY KEY (id, column1, column2)
)
```
I have an entry which looks like this and I want to delete it :
```
20aff8144049 | name | someValue
```
So i tried this command :
```
Delete column2 from ... | 2017/11/07 | [
"https://Stackoverflow.com/questions/47156112",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6606789/"
] | >
> Subscription Upgrade/Downgrade
>
>
>
With the In-app Billing API, users can upgrade or downgrade a subscription during its active period. When the user does this, the active subscription is canceled and a new subscription is created. ***The unused balance of the old subscription is applied on a pro-rated basis... | <https://developer.android.com/google/play/billing/billing_subscriptions.html>
please read the 6th point, user wont be charged 2nd time as per android Documentation, read below.
>
> Users can upgrade or downgrade a subscription in the middle of a
> subscription period. The old subscription's cost is pro-rated, and... |
19,184 | I want to access any current file quickly. Therefore I want to build a function that put a file the register.
I've started with this function:
```
(defun tmp-register ()
""" put the current buffer in the temporary register """
(interactive)
(set-register , ?q (file . buffer-file-name))
)
```
but it fails as expec... | 2015/12/31 | [
"https://emacs.stackexchange.com/questions/19184",
"https://emacs.stackexchange.com",
"https://emacs.stackexchange.com/users/9340/"
] | OK, I have updated my answer to save the file being visited by the current buffer.
Try this slight variation on your original function:
```
(defun tmp-register ()
""" put the current buffer in the temporary register """
(interactive)
(set-register ?q (cons 'file buffer-file-name)))
```
After calling this fun... | 1. "*I want to access any current file quickly. Therefore I want to build a function that put a file the register.*"
I hope you realize that Emacs-Lisp "registers" are not computer registers. There is nothing inherently super-quick about them. A Lisp register is essentially a pointer to an object in memory, like a var... |
57,525,795 | I have a userform with a multi-column ListBox and a ComboBox. The ListBox by default shows a full set of data. The ComboBox contains values from one of the columns in the ListBox. Selection of a value from the ComboBox filters the ListBox data.
When this change to the ListBox happens, I want to Debug.Print "A message.... | 2019/08/16 | [
"https://Stackoverflow.com/questions/57525795",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6792620/"
] | >
> When this change to the ListBox happens, I want to Debug.Print "A message..." but with no success.
>
>
>
**Reason**
The `ListBox_Change` event handler is executed only when the row selection changes (Any row whether selected or unselected in the ListBox is clicked) and **NOT** when the Listbox is cleared or a... | Why not put the debug.print in the combo box when you select a value. While changing the row source, show the message as well. |
19,925,749 | I'm trying to grab a window by the process name and focus it, then take a screenshot of it. It works perfectly unless I have Teamviewer open (not even while using teamviewer to screenshare, just when teamviewer is running)
When teamviewer is running the window isn't focused or brought to the foreground, and the rect i... | 2013/11/12 | [
"https://Stackoverflow.com/questions/19925749",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2259727/"
] | go to [this](http://www.willis-owen.co.uk/2011/11/dynamic-select-box-with-cakephp-2-0/). this helped me to do the dependent drop down list. it provies a details step by step process. | I think you need to set autoRender to false otherwise it will try to render the template at app/View/Project/getbycustomer.ctp. Also, you probably want to return or print JSON. Ther are probably several ways to do this, but I have something similar that is working and the controller action is basically this:
```
publi... |
54,637,113 | Here is my code:
```py
test_list= [
["Romeo and Juliet","Shakespeare"],
["Othello","Play"],
["Macbeth","Tragedy"]
]
value = "Tragedy"
print(test_list.index(value))
```
As a result I get “ValueError: ‘Tragedy’ is not in list
I’d come to the conclusion that .index only works for 1D arrays? But then how ... | 2019/02/11 | [
"https://Stackoverflow.com/questions/54637113",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11046950/"
] | Loop through your list and search each sublist for the string.
```
Testlist = [
["Romeo and Juliet","Shakespeare"],
["Othello","Play"],
["Macbeth","Tragedy"]
]
Value = "Tragedy"
for index, lst in enumerate(Testlist):
if Value in lst:
print( index, lst... | You can also use the map operator:
```py
# Get a boolean array - true if sublist contained the lookup value
value_in_sublist = map(lambda x: value in x, test_list)
# Get the index of the first True
print(value_in_sublist.index(True))
``` |
54,637,113 | Here is my code:
```py
test_list= [
["Romeo and Juliet","Shakespeare"],
["Othello","Play"],
["Macbeth","Tragedy"]
]
value = "Tragedy"
print(test_list.index(value))
```
As a result I get “ValueError: ‘Tragedy’ is not in list
I’d come to the conclusion that .index only works for 1D arrays? But then how ... | 2019/02/11 | [
"https://Stackoverflow.com/questions/54637113",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11046950/"
] | Loop through your list and search each sublist for the string.
```
Testlist = [
["Romeo and Juliet","Shakespeare"],
["Othello","Play"],
["Macbeth","Tragedy"]
]
Value = "Tragedy"
for index, lst in enumerate(Testlist):
if Value in lst:
print( index, lst... | You can also use `numpy`:
```
import numpy as np
test_list = np.array(test_list)
value = 'Tragedy'
print(np.where(test_list == value))
```
Output:
```
(array([2]), array([1]))
```
If you have multiple occurences of an element, then `np.where` will give you a list of indices for all the occurences. |
54,637,113 | Here is my code:
```py
test_list= [
["Romeo and Juliet","Shakespeare"],
["Othello","Play"],
["Macbeth","Tragedy"]
]
value = "Tragedy"
print(test_list.index(value))
```
As a result I get “ValueError: ‘Tragedy’ is not in list
I’d come to the conclusion that .index only works for 1D arrays? But then how ... | 2019/02/11 | [
"https://Stackoverflow.com/questions/54637113",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11046950/"
] | Loop through your list and search each sublist for the string.
```
Testlist = [
["Romeo and Juliet","Shakespeare"],
["Othello","Play"],
["Macbeth","Tragedy"]
]
Value = "Tragedy"
for index, lst in enumerate(Testlist):
if Value in lst:
print( index, lst... | numpy arrays may help in your specific case
```
import numpy
test_array = numpy.array(Testlist)
value = "Tragedy"
numpy.where(test_array==value)
# you will get (array([2]), array([1]))
``` |
41,289,940 | 
I can't seem to get the entire row highlighted. Whatever row is the one with the sorted\_1 class on it doesn't take the selected highlight when I mark it active. Even when manually setting the background on the cell when it is sorted doesn't produce a result. Any thought... | 2016/12/22 | [
"https://Stackoverflow.com/questions/41289940",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4390401/"
] | ```
table.dataTable td.sorting_1,
table.dataTable td.sorting_2,
table.dataTable td.sorting_3,
table.dataTable th.sorting_1,
table.dataTable th.sorting_2,
table.dataTable th.sorting_3 {
background: none !important;
}
```
Seems that this was the issue. I'm using an internal stylesheet that is stock on these project... | Add style definition for `td`:
```
.active td {
background: red !important;
}
```
also you can add this style
```
tr:not(.active):hover td {
background: #e99 !important;
}
```
**[jsfiddle](http://jsfiddle.net/6xjwjwjq/2/)** |
63,092,165 | I have a very simple question that is essentially as stated in the title.
**When implementing a JWT authentication scheme that incorporates short-lived access tokens and longer term refresh tokens, should these two token types be signed with different secrets?**
I have been learning more about this authentication sch... | 2020/07/25 | [
"https://Stackoverflow.com/questions/63092165",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13190130/"
] | **Answer:** No
**Why?**
2 tokens we're speaking of are
1. access token
2. refresh token
Cryptographically there is no upper-bound on key-usage that I'm aware of for either HMAC, RSA or ECDSA. So signing with the same key is totally reasonable to protect from [existential forgery](https://en.wikipedia.org/wiki/Digit... | My intuition tells me to separate the secrets for the two tokens. But not because of security reasons. I mean, if on of the secrets leaks then you are done. And the attack surface is IMHO the same if there is one secret or two.
The reason for me to keep the secrets apart would be usability and error prevention. Develo... |
63,092,165 | I have a very simple question that is essentially as stated in the title.
**When implementing a JWT authentication scheme that incorporates short-lived access tokens and longer term refresh tokens, should these two token types be signed with different secrets?**
I have been learning more about this authentication sch... | 2020/07/25 | [
"https://Stackoverflow.com/questions/63092165",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13190130/"
] | **Answer:** No
**Why?**
2 tokens we're speaking of are
1. access token
2. refresh token
Cryptographically there is no upper-bound on key-usage that I'm aware of for either HMAC, RSA or ECDSA. So signing with the same key is totally reasonable to protect from [existential forgery](https://en.wikipedia.org/wiki/Digit... | From cryptographic aspect I can agree with the accepted answer.
But one thing to think about is, that if you are using the same secret, you should care how you validate the refresh token. If you just check that the JWT is valid, one could send an access token as the refresh token and obtain a new access token from an ... |
2,932,704 | Assume you have a list item, `<li id="foo">` which you want to fade from one color to another when moused over, and that you are using jQuery. This is fairly easy:
```
$('li#foo').bind('mouseenter' , function(e) {
$(this).animate({backgroundColor: '#F00'} , 300);
});
```
**However, what if you wanted to get th... | 2010/05/28 | [
"https://Stackoverflow.com/questions/2932704",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/86381/"
] | I'm pretty sure javascript can't read your style-sheet.
If you want a certain property from the style-sheet that does not occur anywhere on the page, you will have to add an invisible element that has that style applied, either at page-load time in the html or with javascript whenever you want.
It does seem a bit the... | You need the **[color plugin to animate background color](http://plugins.jquery.com/project/color)**. |
2,932,704 | Assume you have a list item, `<li id="foo">` which you want to fade from one color to another when moused over, and that you are using jQuery. This is fairly easy:
```
$('li#foo').bind('mouseenter' , function(e) {
$(this).animate({backgroundColor: '#F00'} , 300);
});
```
**However, what if you wanted to get th... | 2010/05/28 | [
"https://Stackoverflow.com/questions/2932704",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/86381/"
] | I'm pretty sure javascript can't read your style-sheet.
If you want a certain property from the style-sheet that does not occur anywhere on the page, you will have to add an invisible element that has that style applied, either at page-load time in the html or with javascript whenever you want.
It does seem a bit the... | You should be able to simply do:
```
$(this).css('background-color')
```
If you want to get the color AFTER its been updated, add it to the callback, like:
```
$('li#foo').bind('mouseenter' , function(e) {
$(this).animate({backgroundColor: '#F00'} , 300,function(){
alert($(this).css('background-color'));
... |
2,932,704 | Assume you have a list item, `<li id="foo">` which you want to fade from one color to another when moused over, and that you are using jQuery. This is fairly easy:
```
$('li#foo').bind('mouseenter' , function(e) {
$(this).animate({backgroundColor: '#F00'} , 300);
});
```
**However, what if you wanted to get th... | 2010/05/28 | [
"https://Stackoverflow.com/questions/2932704",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/86381/"
] | I'm pretty sure javascript can't read your style-sheet.
If you want a certain property from the style-sheet that does not occur anywhere on the page, you will have to add an invisible element that has that style applied, either at page-load time in the html or with javascript whenever you want.
It does seem a bit the... | I've played around a little with Calvin's idea, and this is what I got:
Assuming the following CSS:
```
#somediv .bar em {
color: #080;
}
```
You can create the elements virtually and get the style information that way:
```
$('<div id="somediv"><span class="bar"><em>')
.find('em').css('color')
```
[Watch... |
52,273,134 | As per my knowledge group by clause is executed before the select statement.
So if we have a sum() function in a select statement,when is that function exactly executed?
for eg in the below query
```
select c1,sum(c2)
from table
group by c1;
```
is sum(c2) executed when the grouping takes place?If yes,then how do... | 2018/09/11 | [
"https://Stackoverflow.com/questions/52273134",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7045339/"
] | >
> As per my knowledge group by clause is executed before the select statement.
>
>
>
This is incorrect. The only "ordering" implicit in an SQL statement is the logical order of interpretation of the query. This specifies that identifiers are first interpreted based on the `FROM` clause, then the `WHERE` clause, ... | Aggregate functions in SQL is executed after GROUP BY clause. |
646,464 | I'm trying to draw this region of the plane
*D* = {(*x,y*) ∈ ℝ2 : *x* ∈ [*a,b*], −x2 +*x* ≤ y ≤ −*x*3+2*x*; 0 ≤ *x* ≤ 1}
this is what I've at the moment
```
\documentclass[preview, convert={size=598x414,outext=.png}]{standalone}
\usepackage{pgfplots,tikz}
\pgfplotsset{compat=1.12}
\begin{document}
\begin... | 2022/06/02 | [
"https://tex.stackexchange.com/questions/646464",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/204480/"
] | All you need are some minor tweaks to your code.
```
\documentclass[border=5mm]{standalone}
\usepackage{pgfplots}
\usepgfplotslibrary{fillbetween}
\pgfplotsset{compat=1.18}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
xmax=1.1,
axis lines=center,
... | A way of doing it with MetaPost,included in a LuaLaTeX program, for whom it may interest, using the `buildcycle` macro of Plain MetaPost.
```
\documentclass[border=2mm]{standalone}
\usepackage{luamplib}
\mplibsetformat{metafun}
\mplibnumbersystem{decimal}
\mplibtextextlabel{enable}
\begin{document}
\begin... |
646,464 | I'm trying to draw this region of the plane
*D* = {(*x,y*) ∈ ℝ2 : *x* ∈ [*a,b*], −x2 +*x* ≤ y ≤ −*x*3+2*x*; 0 ≤ *x* ≤ 1}
this is what I've at the moment
```
\documentclass[preview, convert={size=598x414,outext=.png}]{standalone}
\usepackage{pgfplots,tikz}
\pgfplotsset{compat=1.12}
\begin{document}
\begin... | 2022/06/02 | [
"https://tex.stackexchange.com/questions/646464",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/204480/"
] | Here is an improved version of @kabenyuk's variant, where we do not need the extra line to close the filled area.
```
\documentclass[border=5mm]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
\usepgfplotslibrary{fillbetween}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
... | A way of doing it with MetaPost,included in a LuaLaTeX program, for whom it may interest, using the `buildcycle` macro of Plain MetaPost.
```
\documentclass[border=2mm]{standalone}
\usepackage{luamplib}
\mplibsetformat{metafun}
\mplibnumbersystem{decimal}
\mplibtextextlabel{enable}
\begin{document}
\begin... |
30,313,839 | Im making an application that uses a lot of constructors, and I understood that you cant use the Drag and Drop tool of netbeans for making a constructor, and i thought it was good idea to learn how to code fully organized windows, anyways I read a DEITEL Java book that uses a method for adding objects to the container,... | 2015/05/18 | [
"https://Stackoverflow.com/questions/30313839",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4661237/"
] | The order in which you do things is very important. It pointless doing something like...
```
objcontainer = new JPanel();
esquema = new GridBagLayout();
// Add a bunch of stuff
objcontainer.setLayout(esquema);
```
You've basically added components to a container (which is using a `FlowLayout`) and then changed the l... | >
> it worked separating only by one gridy. But when I put it 2 or more away that the last object it just stays like if I put 1.
>
>
>
If you mean that jumping the value of `gridy` doesn't do anything than you're right, it's intended. The grid only consists of rows and columns which have components in them.
Examp... |
52,668,990 | I run a Ansible Playbook that gathers machine specific information and store the date within a file. One for each host. So I end up with a buch of files which should now be send to my Docker-Based Application for further processing.
Actuall I need to store it in a specific folder and create a volume so the container i... | 2018/10/05 | [
"https://Stackoverflow.com/questions/52668990",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8254022/"
] | You could use any of the following methods:
1. Ansible non-SSH docker connection with standard Ansible `file/copy` modules. Example taken from from [Ansible documentation](https://docs.ansible.com/ansible/latest/user_guide/intro_inventory.html#non-ssh-connection-types):
```default
- name: create jenkins container
d... | I don't have a docker environment to test this out, but I think you could do it from the host with a `docker run` on a `bash` image that:
* Binds the host's directory in which the file you want to copy is (I assumed we are copying `/path/to/filename/on/host`). I bound that directory to `/tmp/source/` inside the contai... |
52,668,990 | I run a Ansible Playbook that gathers machine specific information and store the date within a file. One for each host. So I end up with a buch of files which should now be send to my Docker-Based Application for further processing.
Actuall I need to store it in a specific folder and create a volume so the container i... | 2018/10/05 | [
"https://Stackoverflow.com/questions/52668990",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8254022/"
] | I don't have a docker environment to test this out, but I think you could do it from the host with a `docker run` on a `bash` image that:
* Binds the host's directory in which the file you want to copy is (I assumed we are copying `/path/to/filename/on/host`). I bound that directory to `/tmp/source/` inside the contai... | I wish we could do it with a built-in module, but unless we have one, you can add a file into a named volume in a single task:
```
- name: actual config file is in the volume
command:
cmd: docker run --rm -iv your-config-volume:/v busybox sh -c 'cat > /v/config.yml'
stdin: "{{ lookup('file', 'config.yml') | ... |
52,668,990 | I run a Ansible Playbook that gathers machine specific information and store the date within a file. One for each host. So I end up with a buch of files which should now be send to my Docker-Based Application for further processing.
Actuall I need to store it in a specific folder and create a volume so the container i... | 2018/10/05 | [
"https://Stackoverflow.com/questions/52668990",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8254022/"
] | You could use any of the following methods:
1. Ansible non-SSH docker connection with standard Ansible `file/copy` modules. Example taken from from [Ansible documentation](https://docs.ansible.com/ansible/latest/user_guide/intro_inventory.html#non-ssh-connection-types):
```default
- name: create jenkins container
d... | I wish we could do it with a built-in module, but unless we have one, you can add a file into a named volume in a single task:
```
- name: actual config file is in the volume
command:
cmd: docker run --rm -iv your-config-volume:/v busybox sh -c 'cat > /v/config.yml'
stdin: "{{ lookup('file', 'config.yml') | ... |
13,434,881 | I'm doing a cross domain request for IE using the XDomainRequest in this way:
```
<div id="result"></div>
<script type="text/javascript">
var urlToOpen;
var openxUrl = "http://DOMAIN.com/www/delivery/apu.php";
if ($j.browser.msie && window.XDomainRequest) {
// Use Microsoft XDR
var xdr = new XDomainRe... | 2012/11/17 | [
"https://Stackoverflow.com/questions/13434881",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/879073/"
] | Download [SLF4J](http://slf4j.org/download.html) and put the slf4j-api-1.7.2.jar file onto your class path. | Download SLF4J and put the slf4j-api-1.7.25.jar, slf4j-simple-1.7.25.jar files into application class path.
This will help to resolve this exception along with following exception SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". |
13,434,881 | I'm doing a cross domain request for IE using the XDomainRequest in this way:
```
<div id="result"></div>
<script type="text/javascript">
var urlToOpen;
var openxUrl = "http://DOMAIN.com/www/delivery/apu.php";
if ($j.browser.msie && window.XDomainRequest) {
// Use Microsoft XDR
var xdr = new XDomainRe... | 2012/11/17 | [
"https://Stackoverflow.com/questions/13434881",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/879073/"
] | you might be added the apache-log4j-2.7-bin jars.
Just Remove all those Jars and keep only
```
log4j-1.2.16.jar
slf4j-api-1.7.6.jar
slf4j-simple-1.7.6.jar
xuggle-xuggler-5.4.jar
``` | Download SLF4J and put the slf4j-api-1.7.25.jar, slf4j-simple-1.7.25.jar files into application class path.
This will help to resolve this exception along with following exception SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". |
13,434,881 | I'm doing a cross domain request for IE using the XDomainRequest in this way:
```
<div id="result"></div>
<script type="text/javascript">
var urlToOpen;
var openxUrl = "http://DOMAIN.com/www/delivery/apu.php";
if ($j.browser.msie && window.XDomainRequest) {
// Use Microsoft XDR
var xdr = new XDomainRe... | 2012/11/17 | [
"https://Stackoverflow.com/questions/13434881",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/879073/"
] | Download SLF4J and put the slf4j-api-1.7.25.jar, slf4j-simple-1.7.25.jar files into application class path.
This will help to resolve this exception along with following exception SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". | Check your configuration file (.xml file). The first line in this must start with the declaration of XML version and encoding.
Otherwise, you will get the same error util unless you have included all the required .jar files. |
13,434,881 | I'm doing a cross domain request for IE using the XDomainRequest in this way:
```
<div id="result"></div>
<script type="text/javascript">
var urlToOpen;
var openxUrl = "http://DOMAIN.com/www/delivery/apu.php";
if ($j.browser.msie && window.XDomainRequest) {
// Use Microsoft XDR
var xdr = new XDomainRe... | 2012/11/17 | [
"https://Stackoverflow.com/questions/13434881",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/879073/"
] | The following combination of jars is working for me:
log4j-1.2.16.jar
slf4j-api-1.7.6.jar
slf4j-simple-1.7.6.jar
xuggle-xuggler-5.4.jar | you might be added the apache-log4j-2.7-bin jars.
Just Remove all those Jars and keep only
```
log4j-1.2.16.jar
slf4j-api-1.7.6.jar
slf4j-simple-1.7.6.jar
xuggle-xuggler-5.4.jar
``` |
13,434,881 | I'm doing a cross domain request for IE using the XDomainRequest in this way:
```
<div id="result"></div>
<script type="text/javascript">
var urlToOpen;
var openxUrl = "http://DOMAIN.com/www/delivery/apu.php";
if ($j.browser.msie && window.XDomainRequest) {
// Use Microsoft XDR
var xdr = new XDomainRe... | 2012/11/17 | [
"https://Stackoverflow.com/questions/13434881",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/879073/"
] | Download [SLF4J](http://slf4j.org/download.html) and put the slf4j-api-1.7.2.jar file onto your class path. | Cause Could be un-availability of dependency jars or version conflicts.
The following jars combination worked fine for me:
xuggle-xuggler-5.4.jar
slf4j-api-1.6.4.jar
logback-core-1.0.0.jar
logback-classic-1.0.0.jar |
13,434,881 | I'm doing a cross domain request for IE using the XDomainRequest in this way:
```
<div id="result"></div>
<script type="text/javascript">
var urlToOpen;
var openxUrl = "http://DOMAIN.com/www/delivery/apu.php";
if ($j.browser.msie && window.XDomainRequest) {
// Use Microsoft XDR
var xdr = new XDomainRe... | 2012/11/17 | [
"https://Stackoverflow.com/questions/13434881",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/879073/"
] | Download [SLF4J](http://slf4j.org/download.html) and put the slf4j-api-1.7.2.jar file onto your class path. | Check your configuration file (.xml file). The first line in this must start with the declaration of XML version and encoding.
Otherwise, you will get the same error util unless you have included all the required .jar files. |
13,434,881 | I'm doing a cross domain request for IE using the XDomainRequest in this way:
```
<div id="result"></div>
<script type="text/javascript">
var urlToOpen;
var openxUrl = "http://DOMAIN.com/www/delivery/apu.php";
if ($j.browser.msie && window.XDomainRequest) {
// Use Microsoft XDR
var xdr = new XDomainRe... | 2012/11/17 | [
"https://Stackoverflow.com/questions/13434881",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/879073/"
] | The following combination of jars is working for me:
log4j-1.2.16.jar
slf4j-api-1.7.6.jar
slf4j-simple-1.7.6.jar
xuggle-xuggler-5.4.jar | Cause Could be un-availability of dependency jars or version conflicts.
The following jars combination worked fine for me:
xuggle-xuggler-5.4.jar
slf4j-api-1.6.4.jar
logback-core-1.0.0.jar
logback-classic-1.0.0.jar |
13,434,881 | I'm doing a cross domain request for IE using the XDomainRequest in this way:
```
<div id="result"></div>
<script type="text/javascript">
var urlToOpen;
var openxUrl = "http://DOMAIN.com/www/delivery/apu.php";
if ($j.browser.msie && window.XDomainRequest) {
// Use Microsoft XDR
var xdr = new XDomainRe... | 2012/11/17 | [
"https://Stackoverflow.com/questions/13434881",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/879073/"
] | Download [SLF4J](http://slf4j.org/download.html) and put the slf4j-api-1.7.2.jar file onto your class path. | you might be added the apache-log4j-2.7-bin jars.
Just Remove all those Jars and keep only
```
log4j-1.2.16.jar
slf4j-api-1.7.6.jar
slf4j-simple-1.7.6.jar
xuggle-xuggler-5.4.jar
``` |
13,434,881 | I'm doing a cross domain request for IE using the XDomainRequest in this way:
```
<div id="result"></div>
<script type="text/javascript">
var urlToOpen;
var openxUrl = "http://DOMAIN.com/www/delivery/apu.php";
if ($j.browser.msie && window.XDomainRequest) {
// Use Microsoft XDR
var xdr = new XDomainRe... | 2012/11/17 | [
"https://Stackoverflow.com/questions/13434881",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/879073/"
] | Cause Could be un-availability of dependency jars or version conflicts.
The following jars combination worked fine for me:
xuggle-xuggler-5.4.jar
slf4j-api-1.6.4.jar
logback-core-1.0.0.jar
logback-classic-1.0.0.jar | Check your configuration file (.xml file). The first line in this must start with the declaration of XML version and encoding.
Otherwise, you will get the same error util unless you have included all the required .jar files. |
13,434,881 | I'm doing a cross domain request for IE using the XDomainRequest in this way:
```
<div id="result"></div>
<script type="text/javascript">
var urlToOpen;
var openxUrl = "http://DOMAIN.com/www/delivery/apu.php";
if ($j.browser.msie && window.XDomainRequest) {
// Use Microsoft XDR
var xdr = new XDomainRe... | 2012/11/17 | [
"https://Stackoverflow.com/questions/13434881",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/879073/"
] | Download [SLF4J](http://slf4j.org/download.html) and put the slf4j-api-1.7.2.jar file onto your class path. | The following combination of jars is working for me:
log4j-1.2.16.jar
slf4j-api-1.7.6.jar
slf4j-simple-1.7.6.jar
xuggle-xuggler-5.4.jar |
20,108,746 | I would like to parse blocks of text (not paragraphs) that can be separated by more than two `\n` characters. For instance:
```
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Morbi quam nunc, pretium quis tincidunt in, tincidunt vel arcu.
Class aptent taciti sociosqu ad litora torquent per conubia nostra.
... | 2013/11/20 | [
"https://Stackoverflow.com/questions/20108746",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/576333/"
] | ```
import re
re.split(r'\n{2,}', string)
```
You can specify repetition in a couple of ways:
* `*` - repeat the previous element zero or more times
* `+` - repeat the previous element one or more times
* `{m,n}` - repeat the previous element between `m` and `n` times, `m` defaults to 0 if not provided, `n` defaults... | `re.split("\n\n+",my_text)` ... I think would work
you could also do
```
map(lambda x:x.strip(),my_string.split("\n\n"))
```
and that should work fine without a regex |
8,357,637 | I have a page at [http://www.problemio.com/problems/problem.php](http://www.problemio.com/problems/problem.php?problem_id=49),
and you see on the bottom-right I have a teal image. It is really a link and in that link I can't seem to get the text color to appear white.
Here is my CSS:
```
.button
{
display: block;... | 2011/12/02 | [
"https://Stackoverflow.com/questions/8357637",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/731255/"
] | It appears that you're trying to override the styling of the `a:link` class Try:
**Option 1:**
Here is the class you're trying to override:
```
a:link {
color: #3686A7;
text-decoration: none;
}
```
You need to add `!important` to the end of your style declaration:
```
.button {
color: white !important... | In your `.button` class, use this: `color: white !important;`. The problem happens because the `a` style declaration is applied after the `.button` declaration, in effect cancelling the color you have set in favor of the link 's color property. Using `!important` ensures the `color` rule is applied over any other. |
8,357,637 | I have a page at [http://www.problemio.com/problems/problem.php](http://www.problemio.com/problems/problem.php?problem_id=49),
and you see on the bottom-right I have a teal image. It is really a link and in that link I can't seem to get the text color to appear white.
Here is my CSS:
```
.button
{
display: block;... | 2011/12/02 | [
"https://Stackoverflow.com/questions/8357637",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/731255/"
] | That's because `a:link` (line 95) is more specific than `.button` (line 109).
You can fix it by changing the rule to
```
.button,
a:link.button {
/* rules */
}
```
Tips:
* While using `!important` will work, it is a silly workaround that will eventually get you in trouble, and it is actually a misuse - <http:/... | It appears that you're trying to override the styling of the `a:link` class Try:
**Option 1:**
Here is the class you're trying to override:
```
a:link {
color: #3686A7;
text-decoration: none;
}
```
You need to add `!important` to the end of your style declaration:
```
.button {
color: white !important... |
8,357,637 | I have a page at [http://www.problemio.com/problems/problem.php](http://www.problemio.com/problems/problem.php?problem_id=49),
and you see on the bottom-right I have a teal image. It is really a link and in that link I can't seem to get the text color to appear white.
Here is my CSS:
```
.button
{
display: block;... | 2011/12/02 | [
"https://Stackoverflow.com/questions/8357637",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/731255/"
] | It appears that you're trying to override the styling of the `a:link` class Try:
**Option 1:**
Here is the class you're trying to override:
```
a:link {
color: #3686A7;
text-decoration: none;
}
```
You need to add `!important` to the end of your style declaration:
```
.button {
color: white !important... | That's because you have another class in common\_elements.css that has higher priority than .button
```
a:link
{
color: #3686A7;
text-decoration: none;
}
```
Try making your .button more prioritized by `!important` |
8,357,637 | I have a page at [http://www.problemio.com/problems/problem.php](http://www.problemio.com/problems/problem.php?problem_id=49),
and you see on the bottom-right I have a teal image. It is really a link and in that link I can't seem to get the text color to appear white.
Here is my CSS:
```
.button
{
display: block;... | 2011/12/02 | [
"https://Stackoverflow.com/questions/8357637",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/731255/"
] | That's because `a:link` (line 95) is more specific than `.button` (line 109).
You can fix it by changing the rule to
```
.button,
a:link.button {
/* rules */
}
```
Tips:
* While using `!important` will work, it is a silly workaround that will eventually get you in trouble, and it is actually a misuse - <http:/... | In your `.button` class, use this: `color: white !important;`. The problem happens because the `a` style declaration is applied after the `.button` declaration, in effect cancelling the color you have set in favor of the link 's color property. Using `!important` ensures the `color` rule is applied over any other. |
8,357,637 | I have a page at [http://www.problemio.com/problems/problem.php](http://www.problemio.com/problems/problem.php?problem_id=49),
and you see on the bottom-right I have a teal image. It is really a link and in that link I can't seem to get the text color to appear white.
Here is my CSS:
```
.button
{
display: block;... | 2011/12/02 | [
"https://Stackoverflow.com/questions/8357637",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/731255/"
] | That's because `a:link` (line 95) is more specific than `.button` (line 109).
You can fix it by changing the rule to
```
.button,
a:link.button {
/* rules */
}
```
Tips:
* While using `!important` will work, it is a silly workaround that will eventually get you in trouble, and it is actually a misuse - <http:/... | That's because you have another class in common\_elements.css that has higher priority than .button
```
a:link
{
color: #3686A7;
text-decoration: none;
}
```
Try making your .button more prioritized by `!important` |
32,364 | I have seen the following argument in several places:
>
> Consciousness cannot be an illusion, and it surely exists.
>
>
> An illusion is perceiving something to be true when this something is not actually the case. "Perceiving" and "being conscious of" can be taken to be synonymous, so saying that consciousness is... | 2016/02/24 | [
"https://philosophy.stackexchange.com/questions/32364",
"https://philosophy.stackexchange.com",
"https://philosophy.stackexchange.com/users/19486/"
] | 1) Taken your question literally: One does not need to argue that consciousness exists. Everybody when awake is conscious and experiences consciousness.
One can discuss whether every perception is a conscious perception. Because we know that humans can also be triggered by unconscious stimuli. This kind of stimulatio... | Anaxogoras, of Clyzomanae in Asia Minor, around 500 BC write of *nous* as an ordering force in the cosmos:
>
> B12: *Nous* is unlimited and self-ruling and has been mixed with no thing; but is alone itself, by itself ... and *nous* has control over all things that have soul, both the larger and the smaller; and *nous... |
32,364 | I have seen the following argument in several places:
>
> Consciousness cannot be an illusion, and it surely exists.
>
>
> An illusion is perceiving something to be true when this something is not actually the case. "Perceiving" and "being conscious of" can be taken to be synonymous, so saying that consciousness is... | 2016/02/24 | [
"https://philosophy.stackexchange.com/questions/32364",
"https://philosophy.stackexchange.com",
"https://philosophy.stackexchange.com/users/19486/"
] | Anaxogoras, of Clyzomanae in Asia Minor, around 500 BC write of *nous* as an ordering force in the cosmos:
>
> B12: *Nous* is unlimited and self-ruling and has been mixed with no thing; but is alone itself, by itself ... and *nous* has control over all things that have soul, both the larger and the smaller; and *nous... | Upanishads are earlier recorded arguments on consciousness and other internal phenomena.
You can browse various translations of these scriptures in English.
P.S. It seems any reference to Indian Philosophies are getting negative voting on this site.
Edit: Aitareya Upanisad from the rigveda which is older than any gi... |
32,364 | I have seen the following argument in several places:
>
> Consciousness cannot be an illusion, and it surely exists.
>
>
> An illusion is perceiving something to be true when this something is not actually the case. "Perceiving" and "being conscious of" can be taken to be synonymous, so saying that consciousness is... | 2016/02/24 | [
"https://philosophy.stackexchange.com/questions/32364",
"https://philosophy.stackexchange.com",
"https://philosophy.stackexchange.com/users/19486/"
] | 1) Taken your question literally: One does not need to argue that consciousness exists. Everybody when awake is conscious and experiences consciousness.
One can discuss whether every perception is a conscious perception. Because we know that humans can also be triggered by unconscious stimuli. This kind of stimulatio... | Upanishads would be the earliest. One of the *Mahavakyas* ('Great Sayings') of the Upanishads (there are 4 in total) is *Prajnanam Brahma* - Consciousness is Brahman. It appears in the *Aitareya Upanishad* III. i. 3. The *Aitareya Upanishad* is part of the *Rig Veda*, considered by many as the oldest Veda. Most conside... |
32,364 | I have seen the following argument in several places:
>
> Consciousness cannot be an illusion, and it surely exists.
>
>
> An illusion is perceiving something to be true when this something is not actually the case. "Perceiving" and "being conscious of" can be taken to be synonymous, so saying that consciousness is... | 2016/02/24 | [
"https://philosophy.stackexchange.com/questions/32364",
"https://philosophy.stackexchange.com",
"https://philosophy.stackexchange.com/users/19486/"
] | Upanishads would be the earliest. One of the *Mahavakyas* ('Great Sayings') of the Upanishads (there are 4 in total) is *Prajnanam Brahma* - Consciousness is Brahman. It appears in the *Aitareya Upanishad* III. i. 3. The *Aitareya Upanishad* is part of the *Rig Veda*, considered by many as the oldest Veda. Most conside... | Upanishads are earlier recorded arguments on consciousness and other internal phenomena.
You can browse various translations of these scriptures in English.
P.S. It seems any reference to Indian Philosophies are getting negative voting on this site.
Edit: Aitareya Upanisad from the rigveda which is older than any gi... |
32,364 | I have seen the following argument in several places:
>
> Consciousness cannot be an illusion, and it surely exists.
>
>
> An illusion is perceiving something to be true when this something is not actually the case. "Perceiving" and "being conscious of" can be taken to be synonymous, so saying that consciousness is... | 2016/02/24 | [
"https://philosophy.stackexchange.com/questions/32364",
"https://philosophy.stackexchange.com",
"https://philosophy.stackexchange.com/users/19486/"
] | 1) Taken your question literally: One does not need to argue that consciousness exists. Everybody when awake is conscious and experiences consciousness.
One can discuss whether every perception is a conscious perception. Because we know that humans can also be triggered by unconscious stimuli. This kind of stimulatio... | Upanishads are earlier recorded arguments on consciousness and other internal phenomena.
You can browse various translations of these scriptures in English.
P.S. It seems any reference to Indian Philosophies are getting negative voting on this site.
Edit: Aitareya Upanisad from the rigveda which is older than any gi... |
54,715,515 | is there a way to convert stream to buffer in sync mode?
I need to get it like:
```
let newBuffer = outputStream.getDataSync();
```
rather than `outputStream.on('data'...` like below
```
let newBuffer = convertStream(outputStream);
function convertStream(strm) {
return new Promise((resolve, reject) => {
cons... | 2019/02/15 | [
"https://Stackoverflow.com/questions/54715515",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3460523/"
] | You could potentially use `await` by wrapping the the call to `convertStream()` in an [Immediately Invoked Async Function Expression](http://2ality.com/2016/10/async-function-tips.html#immediately-invoked-async-function-expressions).
```js
function foo() {
return Promise.resolve('bar');
}
(async function() { con... | It is said that asynchrony is contagious: as soon as you have one asynchronous bit in your flow, all the dependent flow needs to be asynchronous. Streams are asynchronous by nature, so you can only simplify your code via synchronous-looking async-await.
BTW, the [asynchronous iterator interface for streams](https://no... |
54,715,515 | is there a way to convert stream to buffer in sync mode?
I need to get it like:
```
let newBuffer = outputStream.getDataSync();
```
rather than `outputStream.on('data'...` like below
```
let newBuffer = convertStream(outputStream);
function convertStream(strm) {
return new Promise((resolve, reject) => {
cons... | 2019/02/15 | [
"https://Stackoverflow.com/questions/54715515",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3460523/"
] | A Stream is a flow of data. You cannot get a buffer synchronously, as the data in the stream might already started flowing, or will arrive somewhen.
>
> I cannot use await for convertStream because the function I call it from is not async
>
>
>
Then make that function you call from async? | It is said that asynchrony is contagious: as soon as you have one asynchronous bit in your flow, all the dependent flow needs to be asynchronous. Streams are asynchronous by nature, so you can only simplify your code via synchronous-looking async-await.
BTW, the [asynchronous iterator interface for streams](https://no... |
54,715,515 | is there a way to convert stream to buffer in sync mode?
I need to get it like:
```
let newBuffer = outputStream.getDataSync();
```
rather than `outputStream.on('data'...` like below
```
let newBuffer = convertStream(outputStream);
function convertStream(strm) {
return new Promise((resolve, reject) => {
cons... | 2019/02/15 | [
"https://Stackoverflow.com/questions/54715515",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3460523/"
] | How about still using stream and async, but also using async iterator (`for await`)?
```
async function collectStream()
let whole = [];
for await (const chunk of outputStream) {
whole.push(chunk);
}
return whole;
}
// another async function somewhere
async function main() {
await collectSt... | It is said that asynchrony is contagious: as soon as you have one asynchronous bit in your flow, all the dependent flow needs to be asynchronous. Streams are asynchronous by nature, so you can only simplify your code via synchronous-looking async-await.
BTW, the [asynchronous iterator interface for streams](https://no... |
48,767,380 | We are using docker container for .net core. When we execute build command from window's power shell go the following error message:
hcsshim: timeout waiting for notification extra info
[](https://i.stack.imgur.com/beoKn.png)
Here is our docker file... | 2018/02/13 | [
"https://Stackoverflow.com/questions/48767380",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9167469/"
] | So I had this issue now for a couple of days and couldn't really pin point it down.
What did the trick for me was:
* Uninstalling docker
* Removing all docker folders
* Removing the windows features Containers and Hyper-v
* Restart
* Reinstall docker
* Let docker handle the Windows features
* Restart
And that's it..... | I think in my case the fix was that I needed to run Windows Powershell in Admin mode. However following @halbherz's answer. I uninstalled docker for windows. Un-installation wasn't easy. For uninstalling I had to do following:
* First I tried to uninstall it using uninstaller which got stuck for
like forever in the en... |
48,767,380 | We are using docker container for .net core. When we execute build command from window's power shell go the following error message:
hcsshim: timeout waiting for notification extra info
[](https://i.stack.imgur.com/beoKn.png)
Here is our docker file... | 2018/02/13 | [
"https://Stackoverflow.com/questions/48767380",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9167469/"
] | So I had this issue now for a couple of days and couldn't really pin point it down.
What did the trick for me was:
* Uninstalling docker
* Removing all docker folders
* Removing the windows features Containers and Hyper-v
* Restart
* Reinstall docker
* Let docker handle the Windows features
* Restart
And that's it..... | solution worked for me: (windows 10, windows containers)
1. uninstall hyper-v (windows features)
2. restart pc
3. install hyper-v (windows features)
4. restart pc
and it worked to build my container |
124,892 | [](https://i.stack.imgur.com/asb8h.jpg)
When I add edge loop to this, angle is already broken. How do you make 1 and 2 edge loops parallel each other? | 2018/12/11 | [
"https://blender.stackexchange.com/questions/124892",
"https://blender.stackexchange.com",
"https://blender.stackexchange.com/users/61360/"
] | Whether or not you have just created it, if you want to make an edge-loop parallel to an adjacent one, slide the loop with `G``G`. Now hitting `E` will make the loop parallel to one side or the other. Hitting `F` will flip which side. Hitting `E` again will revert to the default behaviour: interpolating between its ori... | Assuming you used `CTRL-R` Loop Cut
In edit mode
After loop cut is finished. Scale along an axis with number `0`. Hopefully X or Y or Z will work.
`sx0`
`sy0`
`sz0`
or use
[Knife Cut] `k`with cut through ON `z`
the keystrokes are also indicated in the 3D View
[, you are all sorts of screwed.
If your adversary has the ability to read memory at a distance accurately (ie. [TEMPEST](http://en.wikipedia.org/wiki/TEMPEST)), you are all sorts o... | Yes it certainly is, especially since you quite trivially can debug an application. Most code dealing with encryption and unsafe data use char arrays instead of strings. By using char arrays, you can overwrite the memory with sensitive details, limiting the lifetime of the sensitive data. |
2,016,250 | I'm working on a Java password manager and I currently have all of the user's data, after being decrypted from a file, sitting around in memory at all times and stored plainly as a String for displaying in the UI etc.
Is this a security risk in any way? I'm particularly concerned with someone "dumping" or reading the ... | 2010/01/06 | [
"https://Stackoverflow.com/questions/2016250",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/242405/"
] | If your adversary has the ability to run arbitrary code on your target machine (with the debug privileges required to dump a process image), you are all sorts of screwed.
If your adversary has the ability to read memory at a distance accurately (ie. [TEMPEST](http://en.wikipedia.org/wiki/TEMPEST)), you are all sorts o... | In theory, you cannot protect anything in memory completely. Some group out there managed to deep freeze the memory chips and read their contents 4 hours after the computer was turned off. Even without going to such lengths, a debugger and a breakpoint at just the right time will do the trick.
Practically though, just... |
2,016,250 | I'm working on a Java password manager and I currently have all of the user's data, after being decrypted from a file, sitting around in memory at all times and stored plainly as a String for displaying in the UI etc.
Is this a security risk in any way? I'm particularly concerned with someone "dumping" or reading the ... | 2010/01/06 | [
"https://Stackoverflow.com/questions/2016250",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/242405/"
] | If your adversary has the ability to run arbitrary code on your target machine (with the debug privileges required to dump a process image), you are all sorts of screwed.
If your adversary has the ability to read memory at a distance accurately (ie. [TEMPEST](http://en.wikipedia.org/wiki/TEMPEST)), you are all sorts o... | It is worth noting that the OS might decide to swap memory to disk, where it might remain for quite a while. Of course, reading the swap file requires strong priviledges, but who knows? The user's laptop might get stolen ... |
50,656 | Whenever I hear someone like, say, Daniel Dennett say that consciousness is an "illusion", I'm always left pretty much stumped. Firstly, both the terms "consciousness" and "illusion" are generally left undefined, although this is more apparent with the term "illusion". With this, I have to use the default definitions o... | 2018/04/06 | [
"https://philosophy.stackexchange.com/questions/50656",
"https://philosophy.stackexchange.com",
"https://philosophy.stackexchange.com/users/-1/"
] | I can't deny myself (the 'I' or the consciousness of being myself). Can you? If you say "Yes", you would never have asked your question. In other words, this question must be asked unconsciously. If you say "Yes" again, why can't you say the consciousness for asking this question is somewhere else? So....
**One can de... | When I run across problematic statements of this sort, I always prefer to follow Wittgenstein and look for the error in language that lies behind it. This is precisely the kind of 'philosophy' he thought needed therapy more than analysis.
The first step in that Wittgensteinian therapy is to step back and consider what... |
50,656 | Whenever I hear someone like, say, Daniel Dennett say that consciousness is an "illusion", I'm always left pretty much stumped. Firstly, both the terms "consciousness" and "illusion" are generally left undefined, although this is more apparent with the term "illusion". With this, I have to use the default definitions o... | 2018/04/06 | [
"https://philosophy.stackexchange.com/questions/50656",
"https://philosophy.stackexchange.com",
"https://philosophy.stackexchange.com/users/-1/"
] | I can't deny myself (the 'I' or the consciousness of being myself). Can you? If you say "Yes", you would never have asked your question. In other words, this question must be asked unconsciously. If you say "Yes" again, why can't you say the consciousness for asking this question is somewhere else? So....
**One can de... | Your scepticism of Dennett is well-grounded. Claims similar to Dennetts were given by Skinner under the rubric of behavioral psychology where one supposed thinking things (*res cogitans*) were merely things, that is automatons, and one was not supposed to ask a man about his inner self, his *telos* or his intentions, o... |
50,656 | Whenever I hear someone like, say, Daniel Dennett say that consciousness is an "illusion", I'm always left pretty much stumped. Firstly, both the terms "consciousness" and "illusion" are generally left undefined, although this is more apparent with the term "illusion". With this, I have to use the default definitions o... | 2018/04/06 | [
"https://philosophy.stackexchange.com/questions/50656",
"https://philosophy.stackexchange.com",
"https://philosophy.stackexchange.com/users/-1/"
] | This phrasing is used by different philosophers for different purposes, so one must take the phrase in context. However, in general, it is used in reference to the idea that consciousness is a thing which is separable from other things.
Denett argues that consciousness does not exist except as an image which describes... | When I run across problematic statements of this sort, I always prefer to follow Wittgenstein and look for the error in language that lies behind it. This is precisely the kind of 'philosophy' he thought needed therapy more than analysis.
The first step in that Wittgensteinian therapy is to step back and consider what... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.