qid int64 20 74.4M | question stringlengths 36 16.3k | date stringlengths 10 10 | metadata listlengths 3 3 | response_j stringlengths 33 24k | response_k stringlengths 33 23k |
|---|---|---|---|---|---|
2,332,712 | Let $M$ , $N$, and $P$ be smooth manifolds with or without boundary.
Every constant map $c: M\rightarrow N$ is smooth.
**Proof:** Let $c: M \rightarrow N$ be a constant map. Let $p \in M$. Smoothness of $c$ means there are charts $(U,\phi)$ of $p$ and $(V,\psi)$ of $c(p)$ such that $c(U) \subseteq V$ and $\psi \circ... | 2017/06/22 | [
"https://math.stackexchange.com/questions/2332712",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/203845/"
] | We have chosen some chart $\phi \colon U \rightarrow \phi(U) \subseteq \mathbb{R}^n$ on $M$ and a chart $\psi \colon V \rightarrow \psi(V) \subseteq \mathbb{R}^m$ on $N$. We want to show that $\psi \circ c \circ \phi^{-1}$ is smooth given $c$ is constant.
Hints: 1. What is the domain and codomain of the map $\psi \ci... | Hint: You just need to write it down clearly. $c$ is smooth requires you to show that $\phi \circ c \circ \psi^-$ is smooth. Now as $c$ is constant,for all arguments, you are left with $\phi(y)$ in the end. Now this is just a constant. Use definition of smoothness now |
2,332,712 | Let $M$ , $N$, and $P$ be smooth manifolds with or without boundary.
Every constant map $c: M\rightarrow N$ is smooth.
**Proof:** Let $c: M \rightarrow N$ be a constant map. Let $p \in M$. Smoothness of $c$ means there are charts $(U,\phi)$ of $p$ and $(V,\psi)$ of $c(p)$ such that $c(U) \subseteq V$ and $\psi \circ... | 2017/06/22 | [
"https://math.stackexchange.com/questions/2332712",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/203845/"
] | We have chosen some chart $\phi \colon U \rightarrow \phi(U) \subseteq \mathbb{R}^n$ on $M$ and a chart $\psi \colon V \rightarrow \psi(V) \subseteq \mathbb{R}^m$ on $N$. We want to show that $\psi \circ c \circ \phi^{-1}$ is smooth given $c$ is constant.
Hints: 1. What is the domain and codomain of the map $\psi \ci... | ***Every constant map is smooth.***
>
> Say $f:M \rightarrow N $ is a constant map. Here $f$ is smooth because the coaordinate representation of $f$ i.e $\theta f\phi^{-1} :R^{m}\rightarrow R^n$ is a constant map as a map between 2 euclidean spaces where $(u,\phi)$ and $(v,\theta)$ are charts around $p$ and $q$ respe... |
446,618 | 
This was my grandfather’s and have no idea what it is only that it is some piece of physics equipment!
The main black cylinder doesn’t seem like it wants to rotate but not sure if it should? | 2018/12/11 | [
"https://physics.stackexchange.com/questions/446618",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/37250/"
] | It looks like an [induction coil](https://en.wikipedia.org/wiki/Induction_coil) with the make and break device at the bottom and a switch right at the bottom. If you connect it up to an accumulator, be very, very careful as the output between the two balls, when separate, could be lethal. Also the electrical insulation... | It is a spark radio transmitter.
The first working radios.
Video: <https://www.youtube.com/watch?v=YSf93g0heUA>
Pics: <https://www.google.com/search?q=spark+radio+transmitter&source=lnms&tbm=isch&sa=X&ved=0ahUKEwi-68m5vJjfAhXMx1kKHVuUASQQ_AUIDygC&biw=1920&bih=930>
This one looks awfully similar and might give you so... |
35,287 | hello.
I am looking for tensor manipulation software that would allow me:
* declare indices
* declare results of contraction (or simplification rules)
* allow algebraic simplifications and expansion
* index renaming
So far I have found Maxima to satisfy my requirement more or less, <http://maxima.sourceforge.net/doc... | 2010/08/11 | [
"https://mathoverflow.net/questions/35287",
"https://mathoverflow.net",
"https://mathoverflow.net/users/5925/"
] | I think that everything in your list (except the Python interface) can be found in Kasper Peeters' [Cadabra](http://cadabra.phi-sci.com/).
As for a Python interface, there are two directions:
1. [It is planned](http://cadabra.phi-sci.com/ideas.html) to add an interface layer to Cadabra to either Maxima or SymPy - in... | I think your best bet is a physics oriented package which I think is just called R or maybe Reduce. Meanwhile, here is the msri page of documentation for most packages currently available there.
<http://www.msri.org/about/computing/mathdocs>
$$ $$
<http://en.wikipedia.org/wiki/FORM_(symbolic_manipulation_system)>
$$ $$... |
46,934,653 | we are facing an issue in production that the 'Content-Length' header is not being sent, even if we hard-code it in the headers properties, so we are receiving back from the server the 411 Length Required error.
We are using:
* Axios 0.16.2
* NodeJS 6.10
* Application deployed inside AWS Lambda environment
The code ... | 2017/10/25 | [
"https://Stackoverflow.com/questions/46934653",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/513808/"
] | You can specify the .py file form which you wish to import in the code itself by adding a statement `sc.addPyFile(Path)`.
The path passed can be either a local file, a file in HDFS (or other Hadoop-supported filesystems), or an HTTP, HTTPS or FTP URI.
Then use `from add_num import add_two_nos` | You need to include a zip containing add\_num.py in your spark-submit command.
```
./bin/spark-submit --py-files sources.zip /Users/workflow/test_task.py
```
When submitting a python application to spark, all the source files imported by the main function/file(here test\_task.py) should be packed in a egg or zip fo... |
30,957,706 | I am trying to modify Javascripts Array type with a method which will push a value to an array only if its is not already present.
Here is my code:
```
// add a method conditionally
Array.prototype.method = function (name, func){
if(!this.prototype[name]){
this.prototype[name] = func;
return this;... | 2015/06/20 | [
"https://Stackoverflow.com/questions/30957706",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1652010/"
] | When you're putting a method on `Array.prototype` the method will be available on the instances of Array.
```
// Add the custom method
Array.prototype.method = function() {
console.log('XXX');
}
var foo = [];
// prints XXX
foo.method();
``` | Borrowing from Andy & Nihey I have arrived at the following solution which modifies the Array type making 'xadd' conditionally available to all instances of Array
```
if (!('xpush' in Array.prototype)) {
Array.prototype.xpush = function(value){
if(this.indexOf(value) === -1){
this.push(value);
};
r... |
30,957,706 | I am trying to modify Javascripts Array type with a method which will push a value to an array only if its is not already present.
Here is my code:
```
// add a method conditionally
Array.prototype.method = function (name, func){
if(!this.prototype[name]){
this.prototype[name] = func;
return this;... | 2015/06/20 | [
"https://Stackoverflow.com/questions/30957706",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1652010/"
] | First I would run a check to see if the method is already on the array. Don't go overridding existing prototype methods. In addition, you're not adding `func` to the prototype - you're adding it to the instances you'll be creating.
```
if (!('method' in Array.prototype)) {
Array.prototype.method = function (name, ... | Borrowing from Andy & Nihey I have arrived at the following solution which modifies the Array type making 'xadd' conditionally available to all instances of Array
```
if (!('xpush' in Array.prototype)) {
Array.prototype.xpush = function(value){
if(this.indexOf(value) === -1){
this.push(value);
};
r... |
18,380,463 | Recently I'm working on a new project and `UTF-8` is a must. I don't know why I'm facing this, but it is really strange to me. I really tried everything I knew, but the problem remains.
I'm sending a JSON string to my servlet and here is the servlet part:
```
protected void doGet(HttpServletRequest request, HttpServl... | 2013/08/22 | [
"https://Stackoverflow.com/questions/18380463",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1773265/"
] | `String data = request.getParameter("mainData");`
request.getParameter() already decodes mainData parameter. No further decoding is necessary: `URLDecoder.decode(data, "UTF-8")`
If you still want to get raw mainData parameter value use [request.getQueryString()](http://docs.oracle.com/javaee/6/api/javax/servlet/http/... | Try running your java process with the -Dfile.encoding=UTF-8 parameter. |
42,623 | Every once in a while, my eighth-inch audio jack will slip loose and I'll seemingly lose only the voice part of a track -- leaving somewhat of a "karaoke" version. What I would guess about how audio plugs work suggests that I'd be making this up; however, I've asked and others tell me they've experienced this as well.
... | 2012/10/02 | [
"https://electronics.stackexchange.com/questions/42623",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/13714/"
] | When the plug starts to slip out of the jack, very often it's the ground contact (sleeve) that breaks its connection first, leaving the two "hot" leads (left and right, tip and ring) still connected.
With the ground open like this, both earpieces still get a signal, but now it's the "difference" signal between the lef... | If you look carefully at the jackplug, you'll likely see three (or more) contacts. These are ground (shared), left and right.
I would guess that the vocals are on only one of the stereo tracks (ie. left or right but not both). When the plug comes partially out, you're getting mono. |
42,623 | Every once in a while, my eighth-inch audio jack will slip loose and I'll seemingly lose only the voice part of a track -- leaving somewhat of a "karaoke" version. What I would guess about how audio plugs work suggests that I'd be making this up; however, I've asked and others tell me they've experienced this as well.
... | 2012/10/02 | [
"https://electronics.stackexchange.com/questions/42623",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/13714/"
] | The vocal track, particularly if it is just one singer, is usually found in the centre. This means it is mixed equally into left and right.
If you produce a difference signal, L-R or R-L, then this common mode material (anything mixed in equal proportions to left and right) will be attenuated.
Such a situation can ha... | If you look carefully at the jackplug, you'll likely see three (or more) contacts. These are ground (shared), left and right.
I would guess that the vocals are on only one of the stereo tracks (ie. left or right but not both). When the plug comes partially out, you're getting mono. |
42,623 | Every once in a while, my eighth-inch audio jack will slip loose and I'll seemingly lose only the voice part of a track -- leaving somewhat of a "karaoke" version. What I would guess about how audio plugs work suggests that I'd be making this up; however, I've asked and others tell me they've experienced this as well.
... | 2012/10/02 | [
"https://electronics.stackexchange.com/questions/42623",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/13714/"
] | When the plug starts to slip out of the jack, very often it's the ground contact (sleeve) that breaks its connection first, leaving the two "hot" leads (left and right, tip and ring) still connected.
With the ground open like this, both earpieces still get a signal, but now it's the "difference" signal between the lef... | The vocal track, particularly if it is just one singer, is usually found in the centre. This means it is mixed equally into left and right.
If you produce a difference signal, L-R or R-L, then this common mode material (anything mixed in equal proportions to left and right) will be attenuated.
Such a situation can ha... |
37,590,244 | I am using laravel 5 and having following array:
```
array:3 [▼
0 => 3,
1 => 4,
2 => 5
]
```
Now i wanted to get all values/rows from table say 'X' having id's 3,4,5 | 2016/06/02 | [
"https://Stackoverflow.com/questions/37590244",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2305113/"
] | Try this query
```
$array = [ 0 => 3,1 => 4, 2 => 5];
$results = DB::table('x')
->whereIn('id',$array)
->get();
``` | **You can see the query sample for Laravel 5**
```
$result=DB::table('x')->whereIn('id',[3,4,5])->get();
``` |
114,936 | Say every container and the host itself has its own dedicated, external IP. Is it possible to do this without any problems?
And is this really a good plan? Instead of hosting a database per container, hosting a database per host, for all containers to share?
This question is sort of related to this one: <https://unix... | 2014/02/12 | [
"https://unix.stackexchange.com/questions/114936",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/56196/"
] | I do this exact same thing, I have ~10+ OpenVZ guests and a single instance of MySQL running in one of the 10. This is a good approach if the following things are true:
* All the VM's using this DB won't overload it
* Running multiple individual MySQL instances in their own VMs would be more resource intensive
* All t... | OK, the question is: is it a good plan to have one MySQL-Database on a hardware node to server all VM, or is it better to have the MySQL-Database on a VM.
As always it depends on what are your requirements. If you are paranoid enough and security is most important, then have your DB on a VM. If performance is most imp... |
6,533,242 | I want to add the ability to see the server exception on the client side.
If the server got some exception => i want to show some MessageBox on the client side that will show the exception message ..
How can i do it ? | 2011/06/30 | [
"https://Stackoverflow.com/questions/6533242",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/465558/"
] | First of all, you need to enable your WCF service to return detailed error information. This is OFF by default, for security reasons (you don't want to tell your attackers all the details of your system in your error messages...)
For that, you need to create a new or amend an existing service behavior with the `<Servi... | In addition to the things Marc mentioned you will also want to switch to the HTTP Client Stack in order to avoid the dreaded generic "Not Found" error.
```
bool registerResult = WebRequest.RegisterPrefix("http://", WebRequestCreator.ClientHttp);
``` |
6,533,242 | I want to add the ability to see the server exception on the client side.
If the server got some exception => i want to show some MessageBox on the client side that will show the exception message ..
How can i do it ? | 2011/06/30 | [
"https://Stackoverflow.com/questions/6533242",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/465558/"
] | First of all, you need to enable your WCF service to return detailed error information. This is OFF by default, for security reasons (you don't want to tell your attackers all the details of your system in your error messages...)
For that, you need to create a new or amend an existing service behavior with the `<Servi... | If you are passing the errors to the client you can use a Fault Contract:
Add this attribute to your service contract:
```
[OperationContract]
[FaultContract(typeof(MyCustomException))]
void MyServiceMethod();
```
Create the class for "MyCustomException" containing exactly the information you wish to pa... |
13,159,303 | I'm creating dates from strings with the format 'yyyy-MM-dd' but they're always created on the previous day for some reason. If I set the date as '2012-10-31' the Date object with actually be 30 of October and not 31. For example, this:
```
var d1=new Date('2012-10-31');
```
Will output this:
```
Tue Oct 30 2012 1... | 2012/10/31 | [
"https://Stackoverflow.com/questions/13159303",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/478108/"
] | Both are valid approaches. I tend to favour the first option, because it allows better modularity and quite clear boundaries for high level BC. The second option is the 'standard' way of doing this, it favours let's say a more technical layering, while the first option literally favours a more domain driven layering.
... | do as you see fit. Each bounded context will have a different domain and surely a different application layer, but we may imagine a common Infrastructure layer ou presentation layer. It really depends on your architectural choices, and on the application you are trying to build.
If you want a more precise answer, add ... |
13,159,303 | I'm creating dates from strings with the format 'yyyy-MM-dd' but they're always created on the previous day for some reason. If I set the date as '2012-10-31' the Date object with actually be 30 of October and not 31. For example, this:
```
var d1=new Date('2012-10-31');
```
Will output this:
```
Tue Oct 30 2012 1... | 2012/10/31 | [
"https://Stackoverflow.com/questions/13159303",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/478108/"
] | do as you see fit. Each bounded context will have a different domain and surely a different application layer, but we may imagine a common Infrastructure layer ou presentation layer. It really depends on your architectural choices, and on the application you are trying to build.
If you want a more precise answer, add ... | I think it is not a question about DDD precisely but about an architecture. What kind of coupling between bounded contexts is acceptable/desirable for you.
If all your bounded contexts will:
* be developed in one programming language
* access the same database engine
* be developed by a relatively small team (up to ... |
13,159,303 | I'm creating dates from strings with the format 'yyyy-MM-dd' but they're always created on the previous day for some reason. If I set the date as '2012-10-31' the Date object with actually be 30 of October and not 31. For example, this:
```
var d1=new Date('2012-10-31');
```
Will output this:
```
Tue Oct 30 2012 1... | 2012/10/31 | [
"https://Stackoverflow.com/questions/13159303",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/478108/"
] | Both are valid approaches. I tend to favour the first option, because it allows better modularity and quite clear boundaries for high level BC. The second option is the 'standard' way of doing this, it favours let's say a more technical layering, while the first option literally favours a more domain driven layering.
... | I think it is not a question about DDD precisely but about an architecture. What kind of coupling between bounded contexts is acceptable/desirable for you.
If all your bounded contexts will:
* be developed in one programming language
* access the same database engine
* be developed by a relatively small team (up to ... |
23,406,727 | I'm trying to simulate (very basic & simple) OS process manager subsystem, I have three "processes" (workers) writing something to console (this is an example):
```
public class Message
{
public Message() { }
public void Show()
{
while (true)
{
Co... | 2014/05/01 | [
"https://Stackoverflow.com/questions/23406727",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/492726/"
] | `Thread.Suspend` is evil. It is about as evil as `Thread.Abort`. Almost no code is safe in the presence of being paused at arbitrary, unpredictable locations. It might hold a lock that causes other threads to pause as well. You quickly run into deadlocks or unpredictable stalls in other parts of the system.
Imagine yo... | I manage to solve this problem using static class with array of ManualResetEvent's, where each process is identified by it's unique ID. But I think it's pretty dirty way to do it. I'm open to other ways of accomplishing this.
UPD: added locks to guarantee thread safety
```
public sealed class ControlEvent
{
... |
23,406,727 | I'm trying to simulate (very basic & simple) OS process manager subsystem, I have three "processes" (workers) writing something to console (this is an example):
```
public class Message
{
public Message() { }
public void Show()
{
while (true)
{
Co... | 2014/05/01 | [
"https://Stackoverflow.com/questions/23406727",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/492726/"
] | `Thread.Suspend` is evil. It is about as evil as `Thread.Abort`. Almost no code is safe in the presence of being paused at arbitrary, unpredictable locations. It might hold a lock that causes other threads to pause as well. You quickly run into deadlocks or unpredictable stalls in other parts of the system.
Imagine yo... | The single best advice I can give with regard to `Suspend()` and `Resume()`: Don't use it. You are doing it wrong™.
Whenever you feel a temptation to use `Suspend()` and `Resume()` pairs to control your threads, you should step back immediately and ask yourself, what you are doing here. I understand, that programmers... |
58,181,553 | I have three columns in a pandas dataframe that I want to convert into a single date column. The problem is that one of the columns is day column. I am not able to convert into exact date of that month and year. Can anyone please help me to solve this issue. It looks something like this:
```
BirthMonth BirthYear Da... | 2019/10/01 | [
"https://Stackoverflow.com/questions/58181553",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12061738/"
] | Based on your reply to my first comment I updated my answer as follows. I think this is what you are looking for:
```
import re
import time
import calendar
import numpy as np
days = ['1st Monday', '3rd Tuesday', '4th wednesday']
months = [2, 3, 5]
years = [1990, 2000, 2019]
def extract_numeric(text: str):
return... | **Edit** to match SO new dataframe
My solution using pandas dayofweek function:
```
import numpy as np
import pandas as pd
from datetime import date
from dateutil.relativedelta import relativedelta
#generate dataframe
df=pd.DataFrame({'BirthMonth':[5, 10, 12, 1 ,2],
'BirthYear':[88, 87, 87, 88, 88],
... |
58,181,553 | I have three columns in a pandas dataframe that I want to convert into a single date column. The problem is that one of the columns is day column. I am not able to convert into exact date of that month and year. Can anyone please help me to solve this issue. It looks something like this:
```
BirthMonth BirthYear Da... | 2019/10/01 | [
"https://Stackoverflow.com/questions/58181553",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12061738/"
] | Based on your reply to my first comment I updated my answer as follows. I think this is what you are looking for:
```
import re
import time
import calendar
import numpy as np
days = ['1st Monday', '3rd Tuesday', '4th wednesday']
months = [2, 3, 5]
years = [1990, 2000, 2019]
def extract_numeric(text: str):
return... | use the calendar module to get the `day` from days. then convert `day,monyh,year` to `DateTime`
```
import calendar
import datetime
def get_date(rows):
day = {'monday':0,'tuesday':1,'wednesday':2,'thursday':3,'friday':4,'saturday':5,'sunday':6}
day_num = day.get(rows.days.split()[1].lower())
weekday_num = ... |
58,181,553 | I have three columns in a pandas dataframe that I want to convert into a single date column. The problem is that one of the columns is day column. I am not able to convert into exact date of that month and year. Can anyone please help me to solve this issue. It looks something like this:
```
BirthMonth BirthYear Da... | 2019/10/01 | [
"https://Stackoverflow.com/questions/58181553",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12061738/"
] | Based on your reply to my first comment I updated my answer as follows. I think this is what you are looking for:
```
import re
import time
import calendar
import numpy as np
days = ['1st Monday', '3rd Tuesday', '4th wednesday']
months = [2, 3, 5]
years = [1990, 2000, 2019]
def extract_numeric(text: str):
return... | Not very fast solution(since it involves 2 nested loops) but I hope this solves your question
```
import pandas as pd
import datetime
import calendar
pd.set_option('display.max_rows', 100)
cols = ['day', 'month', 'year']
data = [
['1st Monday', 8, 2015],
['3rd Tuesday', 12, 2017],
['4th Wednesday', 5, 2... |
58,181,553 | I have three columns in a pandas dataframe that I want to convert into a single date column. The problem is that one of the columns is day column. I am not able to convert into exact date of that month and year. Can anyone please help me to solve this issue. It looks something like this:
```
BirthMonth BirthYear Da... | 2019/10/01 | [
"https://Stackoverflow.com/questions/58181553",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12061738/"
] | use the calendar module to get the `day` from days. then convert `day,monyh,year` to `DateTime`
```
import calendar
import datetime
def get_date(rows):
day = {'monday':0,'tuesday':1,'wednesday':2,'thursday':3,'friday':4,'saturday':5,'sunday':6}
day_num = day.get(rows.days.split()[1].lower())
weekday_num = ... | **Edit** to match SO new dataframe
My solution using pandas dayofweek function:
```
import numpy as np
import pandas as pd
from datetime import date
from dateutil.relativedelta import relativedelta
#generate dataframe
df=pd.DataFrame({'BirthMonth':[5, 10, 12, 1 ,2],
'BirthYear':[88, 87, 87, 88, 88],
... |
58,181,553 | I have three columns in a pandas dataframe that I want to convert into a single date column. The problem is that one of the columns is day column. I am not able to convert into exact date of that month and year. Can anyone please help me to solve this issue. It looks something like this:
```
BirthMonth BirthYear Da... | 2019/10/01 | [
"https://Stackoverflow.com/questions/58181553",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12061738/"
] | use the calendar module to get the `day` from days. then convert `day,monyh,year` to `DateTime`
```
import calendar
import datetime
def get_date(rows):
day = {'monday':0,'tuesday':1,'wednesday':2,'thursday':3,'friday':4,'saturday':5,'sunday':6}
day_num = day.get(rows.days.split()[1].lower())
weekday_num = ... | Not very fast solution(since it involves 2 nested loops) but I hope this solves your question
```
import pandas as pd
import datetime
import calendar
pd.set_option('display.max_rows', 100)
cols = ['day', 'month', 'year']
data = [
['1st Monday', 8, 2015],
['3rd Tuesday', 12, 2017],
['4th Wednesday', 5, 2... |
152,286 | I have a genuine question, I am a noob at stocks. from what I have been reading value investors get higher returns than growth investors but then how come the growth etf IVW gets much higher returns than the value index fund VTV. I've looked at other value ETF's but they sucked even more. Is value investing worth the h... | 2022/08/23 | [
"https://money.stackexchange.com/questions/152286",
"https://money.stackexchange.com",
"https://money.stackexchange.com/users/118279/"
] | "Value investing" is essentially looking for stocks that are cheaper than they "should be" by some measure. That ETF tracks an index of *large cap* value stocks,
which may skew the results somewhat, since there may be more smaller "value" stocks that perform better than larger ones.
Also note that the two were largely... | Value investing and value stocks are somewhat different.
Value investing is, like D Stanley says, figuring out what stocks are cheaper than they should be. Warren Buffet does this by reading public financial statements / disclosures that are required to be made available by law.
Value stocks are stocks that make more... |
9,130 | Is it scientifically possible to briefly walk on the moon bare footed?
What possible side effects could there be?
Are these side effects mild enough to make it worth it? | 2015/05/16 | [
"https://space.stackexchange.com/questions/9130",
"https://space.stackexchange.com",
"https://space.stackexchange.com/users/10160/"
] | There are 3 main threats you'd have to account for:
1. Vacuum. This is discussed in the questions @Forgemonkey linked to. Conclusion: brief exposure of the feet only is survivable.
2. Temperature. Surface temperatures on the Moon swing between + 120 and - 150 °C, so you'd have to pick your spot carefully to have a su... | For the record here's a direct quote, from the [same article](http://www.universetoday.com/96208/the-moon-is-toxic/) Hobbes discovered:
>
> “The dust was so abrasive that it actually wore through three layers
> of Kevlar-like material on Jack [Schmitt’s] boot.”
>
>
>
– Professor Larry Taylor, Director of the Pla... |
237,609 | Consider the following:
```
if(a == b or c)
```
In most languages, this would need to be written as:
```
if(a == b or a == c)
```
which is slightly cumbersome and repeats information.
I know my above sample syntax is slightly clunky, but I am sure there are better ways to convey the idea.
Why don't more langua... | 2014/05/01 | [
"https://softwareengineering.stackexchange.com/questions/237609",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/97416/"
] | The syntax issue is – that it requires syntax.
Whatever syntax your language has, people using the language have to learn it. Otherwise they run the risk of seeing code and not knowing what it does. Thus it's generally considered a good thing if a language has a simple syntax that cleanly handles a lot of cases.
In... | The indexOf method, used on an Array, that quite all languages have, allows to compare a value to several others, so i guess a special operator doesn't make much sense.
In javascript that would write :
```
if ( [b, c].indexOf(a) != -1 ) { .... }
``` |
237,609 | Consider the following:
```
if(a == b or c)
```
In most languages, this would need to be written as:
```
if(a == b or a == c)
```
which is slightly cumbersome and repeats information.
I know my above sample syntax is slightly clunky, but I am sure there are better ways to convey the idea.
Why don't more langua... | 2014/05/01 | [
"https://softwareengineering.stackexchange.com/questions/237609",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/97416/"
] | In most languages, this should be trivially achievable by writing an `In` function, so why make it a part of the actual language?
Linq, for example, has `Contains()`.
Alright, for all you pedants, here's my implementation in C#:
```
public static bool In<T>(this T obj, params T[] values)
{
for(int i=0; i < value... | Usually, you want to keep your syntax at a minimum and instead allow such constructs to be defined in the language itself.
For example, in Haskell you can convert any function with two or more arguments into an infix operator using backticks. This allows you to write:
```
if a `elem` [b, c] then ... else ...
```
wh... |
237,609 | Consider the following:
```
if(a == b or c)
```
In most languages, this would need to be written as:
```
if(a == b or a == c)
```
which is slightly cumbersome and repeats information.
I know my above sample syntax is slightly clunky, but I am sure there are better ways to convey the idea.
Why don't more langua... | 2014/05/01 | [
"https://softwareengineering.stackexchange.com/questions/237609",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/97416/"
] | Because it's a non-problem, and solving it brings basically zero benefit, but implementing it brings non-zero cost.
Existing range-based functions and such that practically every language does offer can work perfectly well in this situation if it scales to a size where `a == b || a == c` won't cut it. | In most languages, this should be trivially achievable by writing an `In` function, so why make it a part of the actual language?
Linq, for example, has `Contains()`.
Alright, for all you pedants, here's my implementation in C#:
```
public static bool In<T>(this T obj, params T[] values)
{
for(int i=0; i < value... |
237,609 | Consider the following:
```
if(a == b or c)
```
In most languages, this would need to be written as:
```
if(a == b or a == c)
```
which is slightly cumbersome and repeats information.
I know my above sample syntax is slightly clunky, but I am sure there are better ways to convey the idea.
Why don't more langua... | 2014/05/01 | [
"https://softwareengineering.stackexchange.com/questions/237609",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/97416/"
] | Some languages do have such features. E.g. in Perl6 we can use [Junctions](http://perlcabal.org/syn/S03.html#Junctive_operators), which are “superpositions” of two values:
```perl
if $a == any($b, $c) {
say "yes";
}
# syntactic sugar for the above
if $a == $b | $c {
say "yes";
}
```
Junctions allow us to ex... | The indexOf method, used on an Array, that quite all languages have, allows to compare a value to several others, so i guess a special operator doesn't make much sense.
In javascript that would write :
```
if ( [b, c].indexOf(a) != -1 ) { .... }
``` |
237,609 | Consider the following:
```
if(a == b or c)
```
In most languages, this would need to be written as:
```
if(a == b or a == c)
```
which is slightly cumbersome and repeats information.
I know my above sample syntax is slightly clunky, but I am sure there are better ways to convey the idea.
Why don't more langua... | 2014/05/01 | [
"https://softwareengineering.stackexchange.com/questions/237609",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/97416/"
] | In some (popular) languages `==` operator is not transitive. For instance in JavaScript `0` is equal to both `''` and `'0'`, but then `''` and `'0'` are not equal to eachother. More of such quirks in PHP.
It means that `a == b == c` would add another ambiguity, because it could yield a different result depending on w... | The indexOf method, used on an Array, that quite all languages have, allows to compare a value to several others, so i guess a special operator doesn't make much sense.
In javascript that would write :
```
if ( [b, c].indexOf(a) != -1 ) { .... }
``` |
237,609 | Consider the following:
```
if(a == b or c)
```
In most languages, this would need to be written as:
```
if(a == b or a == c)
```
which is slightly cumbersome and repeats information.
I know my above sample syntax is slightly clunky, but I am sure there are better ways to convey the idea.
Why don't more langua... | 2014/05/01 | [
"https://softwareengineering.stackexchange.com/questions/237609",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/97416/"
] | Some languages do have such features. E.g. in Perl6 we can use [Junctions](http://perlcabal.org/syn/S03.html#Junctive_operators), which are “superpositions” of two values:
```perl
if $a == any($b, $c) {
say "yes";
}
# syntactic sugar for the above
if $a == $b | $c {
say "yes";
}
```
Junctions allow us to ex... | Some languages do offer this -- to an extent.
Maybe not as your *specific* example, but take for example a Python line:
```
def minmax(min, max):
def answer(value):
return max > value > min
return answer
inbounds = minmax(5, 15)
inbounds(7) ##returns True
inbounds(3) ##returns False
inbounds(18) ##r... |
237,609 | Consider the following:
```
if(a == b or c)
```
In most languages, this would need to be written as:
```
if(a == b or a == c)
```
which is slightly cumbersome and repeats information.
I know my above sample syntax is slightly clunky, but I am sure there are better ways to convey the idea.
Why don't more langua... | 2014/05/01 | [
"https://softwareengineering.stackexchange.com/questions/237609",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/97416/"
] | The indexOf method, used on an Array, that quite all languages have, allows to compare a value to several others, so i guess a special operator doesn't make much sense.
In javascript that would write :
```
if ( [b, c].indexOf(a) != -1 ) { .... }
``` | You ask why can't we do this: `if(a == b or c)`
Python does this very efficiently, in fact, most efficiently with `set`:
```
if a in set([b, c]):
then_do_this()
```
For membership testing, 'set' checks that the element's hashes are the same and only then compares for equality, so the elements, b and c, must be ... |
237,609 | Consider the following:
```
if(a == b or c)
```
In most languages, this would need to be written as:
```
if(a == b or a == c)
```
which is slightly cumbersome and repeats information.
I know my above sample syntax is slightly clunky, but I am sure there are better ways to convey the idea.
Why don't more langua... | 2014/05/01 | [
"https://softwareengineering.stackexchange.com/questions/237609",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/97416/"
] | The syntax issue is – that it requires syntax.
Whatever syntax your language has, people using the language have to learn it. Otherwise they run the risk of seeing code and not knowing what it does. Thus it's generally considered a good thing if a language has a simple syntax that cleanly handles a lot of cases.
In... | Because it's a non-problem, and solving it brings basically zero benefit, but implementing it brings non-zero cost.
Existing range-based functions and such that practically every language does offer can work perfectly well in this situation if it scales to a size where `a == b || a == c` won't cut it. |
237,609 | Consider the following:
```
if(a == b or c)
```
In most languages, this would need to be written as:
```
if(a == b or a == c)
```
which is slightly cumbersome and repeats information.
I know my above sample syntax is slightly clunky, but I am sure there are better ways to convey the idea.
Why don't more langua... | 2014/05/01 | [
"https://softwareengineering.stackexchange.com/questions/237609",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/97416/"
] | Because it's a non-problem, and solving it brings basically zero benefit, but implementing it brings non-zero cost.
Existing range-based functions and such that practically every language does offer can work perfectly well in this situation if it scales to a size where `a == b || a == c` won't cut it. | Usually, you want to keep your syntax at a minimum and instead allow such constructs to be defined in the language itself.
For example, in Haskell you can convert any function with two or more arguments into an infix operator using backticks. This allows you to write:
```
if a `elem` [b, c] then ... else ...
```
wh... |
237,609 | Consider the following:
```
if(a == b or c)
```
In most languages, this would need to be written as:
```
if(a == b or a == c)
```
which is slightly cumbersome and repeats information.
I know my above sample syntax is slightly clunky, but I am sure there are better ways to convey the idea.
Why don't more langua... | 2014/05/01 | [
"https://softwareengineering.stackexchange.com/questions/237609",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/97416/"
] | Some languages do have such features. E.g. in Perl6 we can use [Junctions](http://perlcabal.org/syn/S03.html#Junctive_operators), which are “superpositions” of two values:
```perl
if $a == any($b, $c) {
say "yes";
}
# syntactic sugar for the above
if $a == $b | $c {
say "yes";
}
```
Junctions allow us to ex... | "if(a == b or c)" works in most languages: if a == b or if c is not negative, null, or zero.
Complaining that it's verbose misses the point: you shouldn't be piling a dozen things into a conditional. If you need to compare one value to an arbitrary number of other values, then build a subroutine. |
21,045,630 | Regarding to this [tutorial by AppCoda about how to implement a app with UIPageViewController](http://www.appcoda.com/uipageviewcontroller-storyboard-tutorial/) I'd like to use a custom page control element on top of the pages instead of at the bottom.
When I just put a page control element on top of the single views... | 2014/01/10 | [
"https://Stackoverflow.com/questions/21045630",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/66414/"
] | Here is a RxSwift/RxCocoa answer I put together after looking at the other replies.
```
let pages = Variable<[UIViewController]>([])
let currentPageIndex = Variable<Int>(0)
let pendingPageIndex = Variable<(Int, Bool)>(0, false)
let db = DisposeBag()
override func viewDidLoad() {
super.viewDidLoad()
pendingPa... | Here's the Swifty 2 answer very much based on @zerotool's answer above. Just subclass UIPageViewController and then add this override to find the scrollview and resize it. Then grab the page control and move it to the top of everything else. You also need to set the page controls background color to clear. Those last t... |
21,045,630 | Regarding to this [tutorial by AppCoda about how to implement a app with UIPageViewController](http://www.appcoda.com/uipageviewcontroller-storyboard-tutorial/) I'd like to use a custom page control element on top of the pages instead of at the bottom.
When I just put a page control element on top of the single views... | 2014/01/10 | [
"https://Stackoverflow.com/questions/21045630",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/66414/"
] | After further investigation and searching [I found a solution](https://stackoverflow.com/a/19140401/66414), also on stackoverflow.
The key is the following message to send to a custom `UIPageControl` element:
```
[self.view bringSubviewToFront:self.pageControl];
```
[The AppCoda tutorial is the foundation for this ... | The same effect can be achieved simply by subclassing UIPageViewController and overriding viewDidLayoutSubviews as follows:
```
-(void)viewDidLayoutSubviews {
UIView* v = self.view;
NSArray* subviews = v.subviews;
if( [subviews count] == 2 ) {
UIScrollView* sv = nil;
UIPageControl* pc = nil... |
21,045,630 | Regarding to this [tutorial by AppCoda about how to implement a app with UIPageViewController](http://www.appcoda.com/uipageviewcontroller-storyboard-tutorial/) I'd like to use a custom page control element on top of the pages instead of at the bottom.
When I just put a page control element on top of the single views... | 2014/01/10 | [
"https://Stackoverflow.com/questions/21045630",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/66414/"
] | I didn't have the rep to comment on the answer that originated this, but I really like it. I improved the code and converted it to swift for the below subclass of UIPageViewController:
```
class UIPageViewControllerWithOverlayIndicator: UIPageViewController {
override func viewDidLayoutSubviews() {
for sub... | You have to implement a custom `UIPageControl` and add it to the view. As others have mentioned, `view.bringSubviewToFront(pageControl)` must be called.
I have an [example](http://samwize.com/2016/03/08/using-uipageviewcontroller-with-custom-uipagecontrol/) of a view controller with all the code on setting up a custom... |
21,045,630 | Regarding to this [tutorial by AppCoda about how to implement a app with UIPageViewController](http://www.appcoda.com/uipageviewcontroller-storyboard-tutorial/) I'd like to use a custom page control element on top of the pages instead of at the bottom.
When I just put a page control element on top of the single views... | 2014/01/10 | [
"https://Stackoverflow.com/questions/21045630",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/66414/"
] | The same effect can be achieved simply by subclassing UIPageViewController and overriding viewDidLayoutSubviews as follows:
```
-(void)viewDidLayoutSubviews {
UIView* v = self.view;
NSArray* subviews = v.subviews;
if( [subviews count] == 2 ) {
UIScrollView* sv = nil;
UIPageControl* pc = nil... | Here is a RxSwift/RxCocoa answer I put together after looking at the other replies.
```
let pages = Variable<[UIViewController]>([])
let currentPageIndex = Variable<Int>(0)
let pendingPageIndex = Variable<(Int, Bool)>(0, false)
let db = DisposeBag()
override func viewDidLoad() {
super.viewDidLoad()
pendingPa... |
21,045,630 | Regarding to this [tutorial by AppCoda about how to implement a app with UIPageViewController](http://www.appcoda.com/uipageviewcontroller-storyboard-tutorial/) I'd like to use a custom page control element on top of the pages instead of at the bottom.
When I just put a page control element on top of the single views... | 2014/01/10 | [
"https://Stackoverflow.com/questions/21045630",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/66414/"
] | The same effect can be achieved simply by subclassing UIPageViewController and overriding viewDidLayoutSubviews as follows:
```
-(void)viewDidLayoutSubviews {
UIView* v = self.view;
NSArray* subviews = v.subviews;
if( [subviews count] == 2 ) {
UIScrollView* sv = nil;
UIPageControl* pc = nil... | Here's the Swifty 2 answer very much based on @zerotool's answer above. Just subclass UIPageViewController and then add this override to find the scrollview and resize it. Then grab the page control and move it to the top of everything else. You also need to set the page controls background color to clear. Those last t... |
21,045,630 | Regarding to this [tutorial by AppCoda about how to implement a app with UIPageViewController](http://www.appcoda.com/uipageviewcontroller-storyboard-tutorial/) I'd like to use a custom page control element on top of the pages instead of at the bottom.
When I just put a page control element on top of the single views... | 2014/01/10 | [
"https://Stackoverflow.com/questions/21045630",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/66414/"
] | After further investigation and searching [I found a solution](https://stackoverflow.com/a/19140401/66414), also on stackoverflow.
The key is the following message to send to a custom `UIPageControl` element:
```
[self.view bringSubviewToFront:self.pageControl];
```
[The AppCoda tutorial is the foundation for this ... | You have to implement a custom `UIPageControl` and add it to the view. As others have mentioned, `view.bringSubviewToFront(pageControl)` must be called.
I have an [example](http://samwize.com/2016/03/08/using-uipageviewcontroller-with-custom-uipagecontrol/) of a view controller with all the code on setting up a custom... |
21,045,630 | Regarding to this [tutorial by AppCoda about how to implement a app with UIPageViewController](http://www.appcoda.com/uipageviewcontroller-storyboard-tutorial/) I'd like to use a custom page control element on top of the pages instead of at the bottom.
When I just put a page control element on top of the single views... | 2014/01/10 | [
"https://Stackoverflow.com/questions/21045630",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/66414/"
] | After further investigation and searching [I found a solution](https://stackoverflow.com/a/19140401/66414), also on stackoverflow.
The key is the following message to send to a custom `UIPageControl` element:
```
[self.view bringSubviewToFront:self.pageControl];
```
[The AppCoda tutorial is the foundation for this ... | Here's the Swifty 2 answer very much based on @zerotool's answer above. Just subclass UIPageViewController and then add this override to find the scrollview and resize it. Then grab the page control and move it to the top of everything else. You also need to set the page controls background color to clear. Those last t... |
21,045,630 | Regarding to this [tutorial by AppCoda about how to implement a app with UIPageViewController](http://www.appcoda.com/uipageviewcontroller-storyboard-tutorial/) I'd like to use a custom page control element on top of the pages instead of at the bottom.
When I just put a page control element on top of the single views... | 2014/01/10 | [
"https://Stackoverflow.com/questions/21045630",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/66414/"
] | sn3ek Your answer got me most of the way there. I didn't set the current page using the `viewControllerCreation` methods though.
I made my `ViewController also` the delegate of the `UIPageViewController`. Then I set the `PageControl`'s `CurrentPage` in that method. Using the `pageIndex` maintained I'm the `ContentView... | You have to implement a custom `UIPageControl` and add it to the view. As others have mentioned, `view.bringSubviewToFront(pageControl)` must be called.
I have an [example](http://samwize.com/2016/03/08/using-uipageviewcontroller-with-custom-uipagecontrol/) of a view controller with all the code on setting up a custom... |
21,045,630 | Regarding to this [tutorial by AppCoda about how to implement a app with UIPageViewController](http://www.appcoda.com/uipageviewcontroller-storyboard-tutorial/) I'd like to use a custom page control element on top of the pages instead of at the bottom.
When I just put a page control element on top of the single views... | 2014/01/10 | [
"https://Stackoverflow.com/questions/21045630",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/66414/"
] | After further investigation and searching [I found a solution](https://stackoverflow.com/a/19140401/66414), also on stackoverflow.
The key is the following message to send to a custom `UIPageControl` element:
```
[self.view bringSubviewToFront:self.pageControl];
```
[The AppCoda tutorial is the foundation for this ... | sn3ek Your answer got me most of the way there. I didn't set the current page using the `viewControllerCreation` methods though.
I made my `ViewController also` the delegate of the `UIPageViewController`. Then I set the `PageControl`'s `CurrentPage` in that method. Using the `pageIndex` maintained I'm the `ContentView... |
21,045,630 | Regarding to this [tutorial by AppCoda about how to implement a app with UIPageViewController](http://www.appcoda.com/uipageviewcontroller-storyboard-tutorial/) I'd like to use a custom page control element on top of the pages instead of at the bottom.
When I just put a page control element on top of the single views... | 2014/01/10 | [
"https://Stackoverflow.com/questions/21045630",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/66414/"
] | I didn't have the rep to comment on the answer that originated this, but I really like it. I improved the code and converted it to swift for the below subclass of UIPageViewController:
```
class UIPageViewControllerWithOverlayIndicator: UIPageViewController {
override func viewDidLayoutSubviews() {
for sub... | The same effect can be achieved simply by subclassing UIPageViewController and overriding viewDidLayoutSubviews as follows:
```
-(void)viewDidLayoutSubviews {
UIView* v = self.view;
NSArray* subviews = v.subviews;
if( [subviews count] == 2 ) {
UIScrollView* sv = nil;
UIPageControl* pc = nil... |
69,089,637 | I'm using React Native, and I have a functional component that has a function in it.
This child component is located inside another component, on that another component I have a button.
So, When the user clicks the button, I want to execute the function in the child component.
I read about forwardRef (as I saw few que... | 2021/09/07 | [
"https://Stackoverflow.com/questions/69089637",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7868565/"
] | Using a forward ref to give access to a child function can be a solution, but it's not the React way to do it (See [useImperativeHandle hook](https://reactjs.org/docs/hooks-reference.html#useimperativehandle))
Instead, I would change a props of the Popup component to trigger the animation you want to use:
```
import ... | You can define `Animated.value` in the parent component and put it in the props of child component:
```jsx
const Parent = () => {
const translationY = useRef(new Animated.Value(-120)).current;
const displayPopup = useCallback(() => {
Animated.spring(translationY, {
toValue: 100,
useNativeDriver: t... |
69,089,637 | I'm using React Native, and I have a functional component that has a function in it.
This child component is located inside another component, on that another component I have a button.
So, When the user clicks the button, I want to execute the function in the child component.
I read about forwardRef (as I saw few que... | 2021/09/07 | [
"https://Stackoverflow.com/questions/69089637",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7868565/"
] | Using a forward ref to give access to a child function can be a solution, but it's not the React way to do it (See [useImperativeHandle hook](https://reactjs.org/docs/hooks-reference.html#useimperativehandle))
Instead, I would change a props of the Popup component to trigger the animation you want to use:
```
import ... | You can use a `ref` forward it to the child component and use [`useImparativeHandle`](https://reactjs.org/docs/hooks-reference.html#useimperativehandle) in the child to augment the ref so that the parent can invoke it.
Just run this code snippet:
```js
const { useState, useRef, createRef, forwardRef, useImperativeHan... |
31,030,780 | I have an xaml page with 40 rectangles, (4x10 grid), all named in the format r1-1 through to r10-4.
I would like to iterate through these in code:
```
for (int row = 1; row < 10; row++)
{
for (int col = 1; col < 4; col++)
{
...// what do I need here
... | 2015/06/24 | [
"https://Stackoverflow.com/questions/31030780",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/954884/"
] | Although I wouldn't recommend doing this, you can simply iterate through all of the items in the `Grid Panel` if you have a reference to it. Try something like this:
```
foreach (UIElement element in YourGrid.Children)
{
// do something with each element here
}
``` | You can find your control by type or by name:
*By type*:
```
public static IEnumerable<T> FindVisualChildren<T>(DependencyObject depObj) where T : DependencyObject
{
if (depObj != null)
{
for (int i = 0; i < VisualTreeHelper.GetChildrenCount(depObj); i++)
{
DependencyObject child =... |
31,030,780 | I have an xaml page with 40 rectangles, (4x10 grid), all named in the format r1-1 through to r10-4.
I would like to iterate through these in code:
```
for (int row = 1; row < 10; row++)
{
for (int col = 1; col < 4; col++)
{
...// what do I need here
... | 2015/06/24 | [
"https://Stackoverflow.com/questions/31030780",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/954884/"
] | You can get dynamically an element by its name using the following :
```
for (int row = 1; row < 10; row++)
{
for (int col = 1; col < 4; col++)
{
var elt = this.FindName("r" + row + "-" + col);
// do some stuff
}
}
``` | You can find your control by type or by name:
*By type*:
```
public static IEnumerable<T> FindVisualChildren<T>(DependencyObject depObj) where T : DependencyObject
{
if (depObj != null)
{
for (int i = 0; i < VisualTreeHelper.GetChildrenCount(depObj); i++)
{
DependencyObject child =... |
37,810,011 | So at the moment I am doing some iPhone and iPad testing and noticed a very annoying bug in relation to scrolling. So at the moment I have my basic page like so:
```
<body>
<div>
Content of my website...
<button>This button uses jQuery to add a class to the fixed-form div</button>
</div>
<div class="fixed-form">
<f... | 2016/06/14 | [
"https://Stackoverflow.com/questions/37810011",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5929529/"
] | Is your image too large? Try uploading smaller images (a few 100 KBs in size). If that works, try compressing, or reducing the resolution of the image before encoding it. Here is an example: <https://stackoverflow.com/a/20382559/1237117>
Another option is to increase the json size limit at your Web API.
```
<configu... | Try doing a request first to get an empty object from the backend. Set the properties of the object in javascript, and send the modified object back to the server.
```
$scope.model = {};
$http.get(apiPath).then(function(result){
$scope.model = result.data;
});
$scope.model.EncodedImage = base64ImageString;
$scop... |
37,810,011 | So at the moment I am doing some iPhone and iPad testing and noticed a very annoying bug in relation to scrolling. So at the moment I have my basic page like so:
```
<body>
<div>
Content of my website...
<button>This button uses jQuery to add a class to the fixed-form div</button>
</div>
<div class="fixed-form">
<f... | 2016/06/14 | [
"https://Stackoverflow.com/questions/37810011",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5929529/"
] | Is your image too large? Try uploading smaller images (a few 100 KBs in size). If that works, try compressing, or reducing the resolution of the image before encoding it. Here is an example: <https://stackoverflow.com/a/20382559/1237117>
Another option is to increase the json size limit at your Web API.
```
<configu... | You must incresase maxRequestLength under in <httpRuntime ...
I got the answer from [forumAsp net](https://forums.asp.net/t/1999382.aspx?WEB%20API%20Not%20able%20to%20post%20JSON%20file%20larger%20than%207%20MB%20) |
801,993 | After reading "[Java concurrent in practice](http://jcip.net/)" and "[OSGI in practice](http://neilbartlett.name/blog/osgibook/)" I found a specific subject very interesting; Safe Publication. The following is from JCIP:
>
> To publish an object safely, both the reference to the object and the object's state must be ... | 2009/04/29 | [
"https://Stackoverflow.com/questions/801993",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/148909/"
] | Proportionally, it's probably fair to say that very few programmers sufficiently understand synchronization and concurrency. Who knows how many server applications there are out there right now managing financial transactions, medical records, police records, telephony etc etc that are full of synchronization bugs and ... | I would say very few programmers are away of this issue. When was the last code example you have seen that used the volatile keyword? However, most of the other conditioned mentioned - I just took for granted as best practices.
If a developer completely neglects those conditions, they will quickly encounter multi-thre... |
801,993 | After reading "[Java concurrent in practice](http://jcip.net/)" and "[OSGI in practice](http://neilbartlett.name/blog/osgibook/)" I found a specific subject very interesting; Safe Publication. The following is from JCIP:
>
> To publish an object safely, both the reference to the object and the object's state must be ... | 2009/04/29 | [
"https://Stackoverflow.com/questions/801993",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/148909/"
] | It's not a matter of being "evil". It **is** a real problem, and will become much more apparent with the rise of multicore architectures in the coming years. I have seen very real production bugs due to improper synchronization. And to answer your other question, I would say that very few programmers are aware of the i... | My experience (short-terming and consulting in lots of different kinds of environments
Most applications I've seen) agrees with this intuition - I've never seen an entire system clearly architected to manage this problem carefully (well, I've also almost never seen an entire system clearly architected) . I've worked wi... |
801,993 | After reading "[Java concurrent in practice](http://jcip.net/)" and "[OSGI in practice](http://neilbartlett.name/blog/osgibook/)" I found a specific subject very interesting; Safe Publication. The following is from JCIP:
>
> To publish an object safely, both the reference to the object and the object's state must be ... | 2009/04/29 | [
"https://Stackoverflow.com/questions/801993",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/148909/"
] | Proportionally, it's probably fair to say that very few programmers sufficiently understand synchronization and concurrency. Who knows how many server applications there are out there right now managing financial transactions, medical records, police records, telephony etc etc that are full of synchronization bugs and ... | "is this really a real problem?"
Yes absolutely. Even the most trivial web application has to confront issues surrounding concurrency. Servlets are accessed by multiple threads, for example.
The other issue is that threading and concurrency is very hard to handle correctly. It is almost too hard. That is why we are... |
801,993 | After reading "[Java concurrent in practice](http://jcip.net/)" and "[OSGI in practice](http://neilbartlett.name/blog/osgibook/)" I found a specific subject very interesting; Safe Publication. The following is from JCIP:
>
> To publish an object safely, both the reference to the object and the object's state must be ... | 2009/04/29 | [
"https://Stackoverflow.com/questions/801993",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/148909/"
] | It's not a matter of being "evil". It **is** a real problem, and will become much more apparent with the rise of multicore architectures in the coming years. I have seen very real production bugs due to improper synchronization. And to answer your other question, I would say that very few programmers are aware of the i... | I would say very few programmers are away of this issue. When was the last code example you have seen that used the volatile keyword? However, most of the other conditioned mentioned - I just took for granted as best practices.
If a developer completely neglects those conditions, they will quickly encounter multi-thre... |
801,993 | After reading "[Java concurrent in practice](http://jcip.net/)" and "[OSGI in practice](http://neilbartlett.name/blog/osgibook/)" I found a specific subject very interesting; Safe Publication. The following is from JCIP:
>
> To publish an object safely, both the reference to the object and the object's state must be ... | 2009/04/29 | [
"https://Stackoverflow.com/questions/801993",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/148909/"
] | "is this really a real problem?"
Yes absolutely. Even the most trivial web application has to confront issues surrounding concurrency. Servlets are accessed by multiple threads, for example.
The other issue is that threading and concurrency is very hard to handle correctly. It is almost too hard. That is why we are... | My experience (short-terming and consulting in lots of different kinds of environments
Most applications I've seen) agrees with this intuition - I've never seen an entire system clearly architected to manage this problem carefully (well, I've also almost never seen an entire system clearly architected) . I've worked wi... |
801,993 | After reading "[Java concurrent in practice](http://jcip.net/)" and "[OSGI in practice](http://neilbartlett.name/blog/osgibook/)" I found a specific subject very interesting; Safe Publication. The following is from JCIP:
>
> To publish an object safely, both the reference to the object and the object's state must be ... | 2009/04/29 | [
"https://Stackoverflow.com/questions/801993",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/148909/"
] | "is this really a real problem?"
Yes absolutely. Even the most trivial web application has to confront issues surrounding concurrency. Servlets are accessed by multiple threads, for example.
The other issue is that threading and concurrency is very hard to handle correctly. It is almost too hard. That is why we are... | Firstly "safe publication" is not really an idiom (IMO). It comes straight from the language.
There have been cases of problems with unsafe publication, with use of NIO for instance.
Most Java code is very badly written. Threaded code is obviously more difficult than average line-of-business code. |
801,993 | After reading "[Java concurrent in practice](http://jcip.net/)" and "[OSGI in practice](http://neilbartlett.name/blog/osgibook/)" I found a specific subject very interesting; Safe Publication. The following is from JCIP:
>
> To publish an object safely, both the reference to the object and the object's state must be ... | 2009/04/29 | [
"https://Stackoverflow.com/questions/801993",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/148909/"
] | Proportionally, it's probably fair to say that very few programmers sufficiently understand synchronization and concurrency. Who knows how many server applications there are out there right now managing financial transactions, medical records, police records, telephony etc etc that are full of synchronization bugs and ... | It's not a matter of being "evil". It **is** a real problem, and will become much more apparent with the rise of multicore architectures in the coming years. I have seen very real production bugs due to improper synchronization. And to answer your other question, I would say that very few programmers are aware of the i... |
801,993 | After reading "[Java concurrent in practice](http://jcip.net/)" and "[OSGI in practice](http://neilbartlett.name/blog/osgibook/)" I found a specific subject very interesting; Safe Publication. The following is from JCIP:
>
> To publish an object safely, both the reference to the object and the object's state must be ... | 2009/04/29 | [
"https://Stackoverflow.com/questions/801993",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/148909/"
] | Firstly "safe publication" is not really an idiom (IMO). It comes straight from the language.
There have been cases of problems with unsafe publication, with use of NIO for instance.
Most Java code is very badly written. Threaded code is obviously more difficult than average line-of-business code. | I would say very few programmers are away of this issue. When was the last code example you have seen that used the volatile keyword? However, most of the other conditioned mentioned - I just took for granted as best practices.
If a developer completely neglects those conditions, they will quickly encounter multi-thre... |
801,993 | After reading "[Java concurrent in practice](http://jcip.net/)" and "[OSGI in practice](http://neilbartlett.name/blog/osgibook/)" I found a specific subject very interesting; Safe Publication. The following is from JCIP:
>
> To publish an object safely, both the reference to the object and the object's state must be ... | 2009/04/29 | [
"https://Stackoverflow.com/questions/801993",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/148909/"
] | Proportionally, it's probably fair to say that very few programmers sufficiently understand synchronization and concurrency. Who knows how many server applications there are out there right now managing financial transactions, medical records, police records, telephony etc etc that are full of synchronization bugs and ... | My experience (short-terming and consulting in lots of different kinds of environments
Most applications I've seen) agrees with this intuition - I've never seen an entire system clearly architected to manage this problem carefully (well, I've also almost never seen an entire system clearly architected) . I've worked wi... |
801,993 | After reading "[Java concurrent in practice](http://jcip.net/)" and "[OSGI in practice](http://neilbartlett.name/blog/osgibook/)" I found a specific subject very interesting; Safe Publication. The following is from JCIP:
>
> To publish an object safely, both the reference to the object and the object's state must be ... | 2009/04/29 | [
"https://Stackoverflow.com/questions/801993",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/148909/"
] | Proportionally, it's probably fair to say that very few programmers sufficiently understand synchronization and concurrency. Who knows how many server applications there are out there right now managing financial transactions, medical records, police records, telephony etc etc that are full of synchronization bugs and ... | Firstly "safe publication" is not really an idiom (IMO). It comes straight from the language.
There have been cases of problems with unsafe publication, with use of NIO for instance.
Most Java code is very badly written. Threaded code is obviously more difficult than average line-of-business code. |
22,445,382 | I have this exath path saved somewhere:
```
Array
(
[0] => library
[1] => 1
[2] => book
[3] => 0
[4] => title
[5] => 1
)
```
I have some array and I want to change the value on this index:
```
$values[library][1][book][0][title][1] = "new value";
```
I have no idea, how to do this, because... | 2014/03/17 | [
"https://Stackoverflow.com/questions/22445382",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2757937/"
] | Try
```
foreach ($array as $val) {
$indexes .= "[$val]";
}
${'output'.$indexes} = 'something';
```
Or
```
$indexes = '';
foreach ($array as $val) {
$indexes .= "[$val]";
}
$output = 'values'.$indexes;
$$output = 'something';
``` | Are you trying to provide a new value for the title of book 0 in library 1? If so, you will have to search for library "1", with book "0" and then change the value of the "title". So if all your values in the array have the same six entries, start with loc = 0 look at the values at loc+1 (library id), loc+3 (book id) a... |
22,445,382 | I have this exath path saved somewhere:
```
Array
(
[0] => library
[1] => 1
[2] => book
[3] => 0
[4] => title
[5] => 1
)
```
I have some array and I want to change the value on this index:
```
$values[library][1][book][0][title][1] = "new value";
```
I have no idea, how to do this, because... | 2014/03/17 | [
"https://Stackoverflow.com/questions/22445382",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2757937/"
] | Are you trying to provide a new value for the title of book 0 in library 1? If so, you will have to search for library "1", with book "0" and then change the value of the "title". So if all your values in the array have the same six entries, start with loc = 0 look at the values at loc+1 (library id), loc+3 (book id) a... | Just in case you weren't aware of it, the key
$values["library"][1]["book"][0]["title"][1]
Is not the same as the array example in your post. Presuming the array is $values, it has five elements:
```
$values = Array
(
[0] => "library"
[1] => 1
[2] => "book"
[3] => 0
[4] => "title"
[5] => 1
)
... |
22,445,382 | I have this exath path saved somewhere:
```
Array
(
[0] => library
[1] => 1
[2] => book
[3] => 0
[4] => title
[5] => 1
)
```
I have some array and I want to change the value on this index:
```
$values[library][1][book][0][title][1] = "new value";
```
I have no idea, how to do this, because... | 2014/03/17 | [
"https://Stackoverflow.com/questions/22445382",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2757937/"
] | It makes sense to create a function that does this, so:
```
function array_path_set(array & $array, array $path, $newValue) {
$aux =& $array;
foreach ($path as $key) {
if (isset($aux[$key])) {
$aux =& $aux[$key];
} else {
return false;
}
}
$aux = $newValu... | Are you trying to provide a new value for the title of book 0 in library 1? If so, you will have to search for library "1", with book "0" and then change the value of the "title". So if all your values in the array have the same six entries, start with loc = 0 look at the values at loc+1 (library id), loc+3 (book id) a... |
22,445,382 | I have this exath path saved somewhere:
```
Array
(
[0] => library
[1] => 1
[2] => book
[3] => 0
[4] => title
[5] => 1
)
```
I have some array and I want to change the value on this index:
```
$values[library][1][book][0][title][1] = "new value";
```
I have no idea, how to do this, because... | 2014/03/17 | [
"https://Stackoverflow.com/questions/22445382",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2757937/"
] | Are you trying to provide a new value for the title of book 0 in library 1? If so, you will have to search for library "1", with book "0" and then change the value of the "title". So if all your values in the array have the same six entries, start with loc = 0 look at the values at loc+1 (library id), loc+3 (book id) a... | try this ->
```
$keys = array('0'=>'for','1'=>'test','2'=>'only');
$value='ok';
function addArrayPathWithValue($keys,$value,$array = array(),$current =
array())
{
$function = __FUNCTION__;
if (count($current)==0)
{
$keys = array_reverse($keys);
$current = $value;
}
if (count($ke... |
22,445,382 | I have this exath path saved somewhere:
```
Array
(
[0] => library
[1] => 1
[2] => book
[3] => 0
[4] => title
[5] => 1
)
```
I have some array and I want to change the value on this index:
```
$values[library][1][book][0][title][1] = "new value";
```
I have no idea, how to do this, because... | 2014/03/17 | [
"https://Stackoverflow.com/questions/22445382",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2757937/"
] | Try
```
foreach ($array as $val) {
$indexes .= "[$val]";
}
${'output'.$indexes} = 'something';
```
Or
```
$indexes = '';
foreach ($array as $val) {
$indexes .= "[$val]";
}
$output = 'values'.$indexes;
$$output = 'something';
``` | Just in case you weren't aware of it, the key
$values["library"][1]["book"][0]["title"][1]
Is not the same as the array example in your post. Presuming the array is $values, it has five elements:
```
$values = Array
(
[0] => "library"
[1] => 1
[2] => "book"
[3] => 0
[4] => "title"
[5] => 1
)
... |
22,445,382 | I have this exath path saved somewhere:
```
Array
(
[0] => library
[1] => 1
[2] => book
[3] => 0
[4] => title
[5] => 1
)
```
I have some array and I want to change the value on this index:
```
$values[library][1][book][0][title][1] = "new value";
```
I have no idea, how to do this, because... | 2014/03/17 | [
"https://Stackoverflow.com/questions/22445382",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2757937/"
] | It makes sense to create a function that does this, so:
```
function array_path_set(array & $array, array $path, $newValue) {
$aux =& $array;
foreach ($path as $key) {
if (isset($aux[$key])) {
$aux =& $aux[$key];
} else {
return false;
}
}
$aux = $newValu... | Try
```
foreach ($array as $val) {
$indexes .= "[$val]";
}
${'output'.$indexes} = 'something';
```
Or
```
$indexes = '';
foreach ($array as $val) {
$indexes .= "[$val]";
}
$output = 'values'.$indexes;
$$output = 'something';
``` |
22,445,382 | I have this exath path saved somewhere:
```
Array
(
[0] => library
[1] => 1
[2] => book
[3] => 0
[4] => title
[5] => 1
)
```
I have some array and I want to change the value on this index:
```
$values[library][1][book][0][title][1] = "new value";
```
I have no idea, how to do this, because... | 2014/03/17 | [
"https://Stackoverflow.com/questions/22445382",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2757937/"
] | Try
```
foreach ($array as $val) {
$indexes .= "[$val]";
}
${'output'.$indexes} = 'something';
```
Or
```
$indexes = '';
foreach ($array as $val) {
$indexes .= "[$val]";
}
$output = 'values'.$indexes;
$$output = 'something';
``` | try this ->
```
$keys = array('0'=>'for','1'=>'test','2'=>'only');
$value='ok';
function addArrayPathWithValue($keys,$value,$array = array(),$current =
array())
{
$function = __FUNCTION__;
if (count($current)==0)
{
$keys = array_reverse($keys);
$current = $value;
}
if (count($ke... |
22,445,382 | I have this exath path saved somewhere:
```
Array
(
[0] => library
[1] => 1
[2] => book
[3] => 0
[4] => title
[5] => 1
)
```
I have some array and I want to change the value on this index:
```
$values[library][1][book][0][title][1] = "new value";
```
I have no idea, how to do this, because... | 2014/03/17 | [
"https://Stackoverflow.com/questions/22445382",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2757937/"
] | It makes sense to create a function that does this, so:
```
function array_path_set(array & $array, array $path, $newValue) {
$aux =& $array;
foreach ($path as $key) {
if (isset($aux[$key])) {
$aux =& $aux[$key];
} else {
return false;
}
}
$aux = $newValu... | Just in case you weren't aware of it, the key
$values["library"][1]["book"][0]["title"][1]
Is not the same as the array example in your post. Presuming the array is $values, it has five elements:
```
$values = Array
(
[0] => "library"
[1] => 1
[2] => "book"
[3] => 0
[4] => "title"
[5] => 1
)
... |
22,445,382 | I have this exath path saved somewhere:
```
Array
(
[0] => library
[1] => 1
[2] => book
[3] => 0
[4] => title
[5] => 1
)
```
I have some array and I want to change the value on this index:
```
$values[library][1][book][0][title][1] = "new value";
```
I have no idea, how to do this, because... | 2014/03/17 | [
"https://Stackoverflow.com/questions/22445382",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2757937/"
] | It makes sense to create a function that does this, so:
```
function array_path_set(array & $array, array $path, $newValue) {
$aux =& $array;
foreach ($path as $key) {
if (isset($aux[$key])) {
$aux =& $aux[$key];
} else {
return false;
}
}
$aux = $newValu... | try this ->
```
$keys = array('0'=>'for','1'=>'test','2'=>'only');
$value='ok';
function addArrayPathWithValue($keys,$value,$array = array(),$current =
array())
{
$function = __FUNCTION__;
if (count($current)==0)
{
$keys = array_reverse($keys);
$current = $value;
}
if (count($ke... |
32,207 | I have been taking 2-3gm of creatine per day mixed extremely well with 16-17oz lukewarm water, that too on workout days (i.e. I avoid the non-workout days) for at least 2.5 months now. However, I feel that the paunch/belly fat I had, as mentioned in [this post of mine](https://fitness.stackexchange.com/questions/32030/... | 2016/09/19 | [
"https://fitness.stackexchange.com/questions/32207",
"https://fitness.stackexchange.com",
"https://fitness.stackexchange.com/users/22139/"
] | To answer the valid question here:
### Does Creatine cause bloating?
Yes, the water retention usually seen with higher (>10g) loading doses can exceed five pounds (more than two kilograms). Lower doses may cause less water retention. While water mass is not muscle mass (though both count as lean mass), prolonged crea... | It can, but I can't tell for sure it's causing the problem in your case, or the other part of your diet is. The fact is, different diet plans work differently on different people. You may be allergic or intolerant to certain components of your diet, or the supplement you are taking. You get yourself checked by a doctor... |
32,207 | I have been taking 2-3gm of creatine per day mixed extremely well with 16-17oz lukewarm water, that too on workout days (i.e. I avoid the non-workout days) for at least 2.5 months now. However, I feel that the paunch/belly fat I had, as mentioned in [this post of mine](https://fitness.stackexchange.com/questions/32030/... | 2016/09/19 | [
"https://fitness.stackexchange.com/questions/32207",
"https://fitness.stackexchange.com",
"https://fitness.stackexchange.com/users/22139/"
] | To answer the valid question here:
### Does Creatine cause bloating?
Yes, the water retention usually seen with higher (>10g) loading doses can exceed five pounds (more than two kilograms). Lower doses may cause less water retention. While water mass is not muscle mass (though both count as lean mass), prolonged crea... | @JJosaur's answer is correct. Creatine will slightly increase the amount of water your muscles hold. It will not, and in fact, it can not, increase body fat. That is literally impossible. The amount of water bloat that you get will largely depend on your genetic muscle fiber makeup. Since creatine works better with fas... |
57,172,077 | This spreadsheet I am working on tracks trainings. I'm having issues with this because one training counts for itself and fills the requirement for the other. I am trying to apply conditional formatting on column G that turns the cell red if the dates in;
* Column F and G are not within 3 years
* Column G are blank
* ... | 2019/07/23 | [
"https://Stackoverflow.com/questions/57172077",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11826815/"
] | When you build your APK, you will sign the app with a key-store.
Once you create a key-store, you will need to get a `sha256 fingerprint`.
To get the sha256 you will need to run:
`keytool -list -v -keystore /keystore-location/pwa-keystore.ks`
Then, make sure the following route available on your web app, containing... | Add this to your manifest before u port to android:
```
"display": "standalone"
``` |
57,172,077 | This spreadsheet I am working on tracks trainings. I'm having issues with this because one training counts for itself and fills the requirement for the other. I am trying to apply conditional formatting on column G that turns the cell red if the dates in;
* Column F and G are not within 3 years
* Column G are blank
* ... | 2019/07/23 | [
"https://Stackoverflow.com/questions/57172077",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11826815/"
] | The domain `toastmasterstimer.tk` seems to be missing the Digital Asset Links file, necessary to validate ownership and enable fullscreen.
The file needs to be available at `https://toastmasterstimer.tk/.well-known/assetlinks.json`.
You can use the [Statement List Generator and Tester](https://developers.google.com/... | Add this to your manifest before u port to android:
```
"display": "standalone"
``` |
57,172,077 | This spreadsheet I am working on tracks trainings. I'm having issues with this because one training counts for itself and fills the requirement for the other. I am trying to apply conditional formatting on column G that turns the cell red if the dates in;
* Column F and G are not within 3 years
* Column G are blank
* ... | 2019/07/23 | [
"https://Stackoverflow.com/questions/57172077",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11826815/"
] | Is the sha256 fingerprint you entered in your web/.well-known/assetlinks.json
is the same as the one entered in google play console?
(On "Release Management" / "App signing" "App signing certificate")
```
[{
"relation": ["delegate_permission/common.handle_all_urls"],
"target" : { "namespace": "android_app... | Add this to your manifest before u port to android:
```
"display": "standalone"
``` |
57,172,077 | This spreadsheet I am working on tracks trainings. I'm having issues with this because one training counts for itself and fills the requirement for the other. I am trying to apply conditional formatting on column G that turns the cell red if the dates in;
* Column F and G are not within 3 years
* Column G are blank
* ... | 2019/07/23 | [
"https://Stackoverflow.com/questions/57172077",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11826815/"
] | The domain `toastmasterstimer.tk` seems to be missing the Digital Asset Links file, necessary to validate ownership and enable fullscreen.
The file needs to be available at `https://toastmasterstimer.tk/.well-known/assetlinks.json`.
You can use the [Statement List Generator and Tester](https://developers.google.com/... | When you build your APK, you will sign the app with a key-store.
Once you create a key-store, you will need to get a `sha256 fingerprint`.
To get the sha256 you will need to run:
`keytool -list -v -keystore /keystore-location/pwa-keystore.ks`
Then, make sure the following route available on your web app, containing... |
57,172,077 | This spreadsheet I am working on tracks trainings. I'm having issues with this because one training counts for itself and fills the requirement for the other. I am trying to apply conditional formatting on column G that turns the cell red if the dates in;
* Column F and G are not within 3 years
* Column G are blank
* ... | 2019/07/23 | [
"https://Stackoverflow.com/questions/57172077",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11826815/"
] | The domain `toastmasterstimer.tk` seems to be missing the Digital Asset Links file, necessary to validate ownership and enable fullscreen.
The file needs to be available at `https://toastmasterstimer.tk/.well-known/assetlinks.json`.
You can use the [Statement List Generator and Tester](https://developers.google.com/... | Is the sha256 fingerprint you entered in your web/.well-known/assetlinks.json
is the same as the one entered in google play console?
(On "Release Management" / "App signing" "App signing certificate")
```
[{
"relation": ["delegate_permission/common.handle_all_urls"],
"target" : { "namespace": "android_app... |
35,652,459 | First I would like to note that I'm quite a beginner in using MATLABalthough I have some idea of syntax. I am working on a project trying to map the displacement of a particle in the environment. I have already manipulated all the data so it's all down to estetics.
So basically I have two matrices 12 by 19 by 15, in w... | 2016/02/26 | [
"https://Stackoverflow.com/questions/35652459",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5986166/"
] | `org.springframework.web.context.ContextLoaderListener` is a class from Spring framework. As it implements the `ServletContextListener` interface, the servlet container notifies it at startup (`contextInitialized`) and at shutdown (`contextDestroyed`) of a web application.
It is specifically in charge of bootstrapping... | Listeners, in general, are a way for the container to notify your app of events, instead of just web requests.
For example, to be notified when a session is going to time out, you'd extend HttpSessionListener and implement the sessionDestroyed() method. The container would then call that on expiration of the session a... |
36,899,591 | I have a query that takes over 2 seconds.
Here is my table schema:
```
CREATE TABLE `vouchers` (
`id` int(11) NOT NULL,
`voucher_dealer` int(11) NOT NULL,
`voucher_number` varchar(20) NOT NULL,
`voucher_customer_id` int(11) NOT NULL,
`voucher_date` date NOT NULL,
`voucher_added_date` datetime NOT NULL,
... | 2016/04/27 | [
"https://Stackoverflow.com/questions/36899591",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4588796/"
] | You'll want to use MySQLs "EXPLAIN" to determine what's going on and why.
<http://dev.mysql.com/doc/refman/5.7/en/explain.html>
To do so, simply add "EXPLAIN " prior to your statement like this:
```
EXPLAIN select *
from vouchers
where voucher_customer_id = **
and voucher_date between date and date
```
It wi... | Create another index for voucher\_date |
1,568,444 | >
> Let $X$ be locally compact, Hausdorff and non compact. Prove that if $X$ has one “end”, then $X^\wedge - X$ , (where $X^\wedge$ is any Hausdorff compactification), is a continuum (=compact, connected).
>
>
>
**Definition**
Let $X$ be a topological space. An "end" of $X$ assigns, to each compact subspace $K$ of... | 2015/12/09 | [
"https://math.stackexchange.com/questions/1568444",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/289289/"
] | This isn't true in general. For instance, suppose $X=[0,\infty)\sqcup D$, where $D$ is an infinite discrete space. Then $X$ has only one end (the one coming from $[0,\infty)$, since every connected component in $D$ is compact). But you can compactify $X$ as $X^\wedge=[0,\infty]\sqcup E$ for any compactification $E$ of ... | Thank's to everyone, I think I did it. Let me know if you find some mistake.
Let $X$ locally compact, Hausdorff and non-compact. Prove that if $X$ has only one end, then $X^{\*} - X$ for any compactification $X^{\*}$ (Hausdorff) of $X$ is a continuum (=compact, connected).
Solution
Since $X^{\*}$ is a Hausdorff compa... |
67,084,877 | I had been working on a project that uses Firebase Authentication.
Everything worked fine until I updated to Flutter 2.
Now it's telling me that "User" isn't a type. I can't find anything in their changelog that might have caused this error.
```
splashScreenFunction: () async {
//// check if login
... | 2021/04/14 | [
"https://Stackoverflow.com/questions/67084877",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14710307/"
] | try prefixing firebase\_auth import (like firebase\_auth)
```
import 'package:firebase_auth/firebase_auth.dart' as firebase_auth;
.
.
.
//Change
firebase_auth.User result = firebase_auth.FirebaseAuth.instance.currentUser;
``` | The problem seems to have been caused by dependencies not having been well updated to support null-safety. I used [this guide](https://dart.dev/null-safety/migration-guide) to make sure that everything was migrated properly, and then it worked again.
So basically it wasn't working because I updated Flutter and Dart, b... |
70,510 | We recently changed IP schemes from `192.168.x.x` to `10.x.x.x` In doing so, I noticed that the prior network engineer had `ip default-gateway` in the configuration pointing to an old default gateway that no longer exist. I happened to notice this after our maintenance window ended.
```
ip default-gateway 192.168.10.1... | 2020/10/15 | [
"https://networkengineering.stackexchange.com/questions/70510",
"https://networkengineering.stackexchange.com",
"https://networkengineering.stackexchange.com/users/46890/"
] | A router that is configured to route does not use the `ip default-gateway`. It uses the default route, and you have that in the configuration.
Cisco has a document that explains the differences: *[Configuring a Gateway of Last Resort Using IP Commands](https://www.cisco.com/c/en/us/support/docs/ip/routing-information-... | In addition to @RonMaupin's answer: if the defined gateway is unreachable (and even not configured on the network) there's no way that command can be relevant anymore. It can't be used, so it can safely be removed. |
12,992,681 | I don't know if this is possible, I've never really used html canvas, but I am aware of
```
var imgPixels = canvasContext.getImageData(0, 0, canvas.width, canvas.height);
```
but how do I use this to get for example all the pixels with a certain color and change these pixels to white?
So let's say I have a pixel co... | 2012/10/20 | [
"https://Stackoverflow.com/questions/12992681",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/926978/"
] | Do something like this (here's the [canvas cheat sheet](https://websitesetup.org/wp-content/uploads/2015/11/Infopgraphic-CanvasCheatSheet-Final2.pdf)):
```js
const canvas = document.querySelector("canvas");
const context = canvas.getContext("2d");
const { width, height } = canvas;
const gradient = context.createL... | When you get the `getImageData()`, you have an object with `data`, `width` and `height`.
You can loop over `data`, which contains the pixel data. It's available in chunks of 4, which are red, green, blue and alpha respectively.
Therefore, your code could look for *red* pixels (you have to decide what makes a red pixe... |
122,130 | How do I detect a click on a layer and find out information about the layer that was clicked?
Currently I can do the usual binding a popup and adding a click handler on the layer:
```
L.geoJson(data.streets, {
onEachFeature: function(feature, featureLayer) {
featureLayer.bindPopup(feature.properties.name... | 2014/11/14 | [
"https://gis.stackexchange.com/questions/122130",
"https://gis.stackexchange.com",
"https://gis.stackexchange.com/users/39543/"
] | I was assigning layers to a featureGroup, I needed to put the click handler on the featureGroup in order to get a layer reference returned. Putting it on the individual layer didn't work. | the layer is available from the event; in your case `e.layer` returns the layer
alternatively, you save the layer to a variable when you construct it with L.geoJson, then bind your click event later:
```js
var streets = L.geoJson(data.streets, {
onEachFeature: function(feature, featureLayer) {
featureLay... |
39,158,502 | In our TFS server 2013 we have several projects
(Eg : P1, P2, **P3**, P4)
When i'm going to **check in** the codes to a single project **Eg : P3** i'm getting below listed errors in output window of visual studio 2013.
(but team connecting and other source control functions are working fine)
>
> All of the change... | 2016/08/26 | [
"https://Stackoverflow.com/questions/39158502",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2810828/"
] | It looks like something is intercepting the call and blocking it. TFS would normally always return a reponse type of `soap+xml`, `xml` or `json`, the fact you're seeing `text/html` indicates that a HTML error page is presented for some reason.
I suspect it's your Virus scanner locally (if it provides web traffic prote... | As per @jessehouwing I used the fiddler and figured out that below file was blocking by the SonicWALL Gateway Antivirus Service.
**<http://.../tfs/.../VersionControl/v1.0/upload.ashx>**
**<http://.../tfs>**
[](https://i.stack.imgur.com/EIgwg.jpg)
a... |
31,421,844 | How can I get File Object from absolute Path?
The object is like when I get from `$request->file('fileInput')`.
So i can use method like `$file->getClientOriginalName()` or `$file->getClientOriginalExtension()` or something like that.
I can only find the way to get the File Object using `File::allFiles($absoluteFold... | 2015/07/15 | [
"https://Stackoverflow.com/questions/31421844",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4243035/"
] | **Request::file()** method returns objects of the class **UploadedFile**. You can create such object yourself, but it kind of kills the purpose of the class, as it's supposed to be used for, well, uploaded files :) You should use the File class instead that is the parent class of the UploadedFile. You can create such o... | For this you can use
```
Symfony\Component\HttpFoundation\File\UploadedFile
```
But please be aware that you can not use the `move()` function, because on move() it will check, if this file has been uploaded via HTTP.
If you want to bypass this mechanism, you need to do it on your own.
In my application i did it ... |
68,421,527 | I would like to scrape all the comments in this reddit page and then write the data into a csv file. I have written this code.
I noticed that all comments were 'div' elements with a class of 'RichTextJSON-root'.
Code written:
```
from bs4 import BeautifulSoup
import requests
import csv
# Reddit
source = requests.g... | 2021/07/17 | [
"https://Stackoverflow.com/questions/68421527",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16467488/"
] | Very close. The reshaping operation should be a [`pivot_table`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.pivot_table.html) with the aggfunc set to count rather than [`pivot`](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.pivot.html):
```
plot_df = (
df_winter_start.pivot_ta... | Or you could group `df_winter_start` by type and month, counting up the events, and then use seaborn for plotting:
```py
df_counts = df_winter_start[['Disaster_Type',
'month']].value_counts().reset_index(name='count')
df_counts
```
```
Disaster_Type month count
0 Ice ... |
540,937 | What does the `apt-get install ...` command do?
When I enter `apt-get install ...` command, there are some texts appearing on the screen, but that does not have enough information for me. I want to know if any file is created / edited, any service is started and other activities...
Is there any `.sh` file executed wh... | 2014/10/24 | [
"https://askubuntu.com/questions/540937",
"https://askubuntu.com",
"https://askubuntu.com/users/277876/"
] | Mostly, `apt-get` does the following things:
* checks for dependencies (and asks to install them),
* downloads the package, verifies it and then tells `dpkg` to install it.
`dpkg` will:
* extract the package and copy the content to the right location, and check for pre-existing files and modifications on them,
* run... | For the actual *under-the-hood* stuff, you'll need to grab the Apt source. Fairly simple if you have source repositories enabled:
```
apt-get source apt
```
The `apt-get` command itself lives in `cmdline/apt-get.cc`. It's a pain to read through but most of `apt-get`'s actions are spelled out quite extensively in the... |
540,937 | What does the `apt-get install ...` command do?
When I enter `apt-get install ...` command, there are some texts appearing on the screen, but that does not have enough information for me. I want to know if any file is created / edited, any service is started and other activities...
Is there any `.sh` file executed wh... | 2014/10/24 | [
"https://askubuntu.com/questions/540937",
"https://askubuntu.com",
"https://askubuntu.com/users/277876/"
] | Mostly, `apt-get` does the following things:
* checks for dependencies (and asks to install them),
* downloads the package, verifies it and then tells `dpkg` to install it.
`dpkg` will:
* extract the package and copy the content to the right location, and check for pre-existing files and modifications on them,
* run... | **In short**: `apt-get install` does everything that is needed that your system can successfully execute the new installed software application.
**Longer:**
**Preliminaries:**
From the [manpage](http://manpages.ubuntu.com/manpages/trusty/en/man8/apt-get.8.html):
>
> All packages required by the package(s) specif... |
540,937 | What does the `apt-get install ...` command do?
When I enter `apt-get install ...` command, there are some texts appearing on the screen, but that does not have enough information for me. I want to know if any file is created / edited, any service is started and other activities...
Is there any `.sh` file executed wh... | 2014/10/24 | [
"https://askubuntu.com/questions/540937",
"https://askubuntu.com",
"https://askubuntu.com/users/277876/"
] | Mostly, `apt-get` does the following things:
* checks for dependencies (and asks to install them),
* downloads the package, verifies it and then tells `dpkg` to install it.
`dpkg` will:
* extract the package and copy the content to the right location, and check for pre-existing files and modifications on them,
* run... | There are some fantastic answers here which are better than this short one, but something you might consider to help you get a better understanding of the changes made by a package manager is [Docker](https://www.docker.com). You can diff the changes made in a container using `docker diff <container>` and it will show ... |
540,937 | What does the `apt-get install ...` command do?
When I enter `apt-get install ...` command, there are some texts appearing on the screen, but that does not have enough information for me. I want to know if any file is created / edited, any service is started and other activities...
Is there any `.sh` file executed wh... | 2014/10/24 | [
"https://askubuntu.com/questions/540937",
"https://askubuntu.com",
"https://askubuntu.com/users/277876/"
] | **In short**: `apt-get install` does everything that is needed that your system can successfully execute the new installed software application.
**Longer:**
**Preliminaries:**
From the [manpage](http://manpages.ubuntu.com/manpages/trusty/en/man8/apt-get.8.html):
>
> All packages required by the package(s) specif... | For the actual *under-the-hood* stuff, you'll need to grab the Apt source. Fairly simple if you have source repositories enabled:
```
apt-get source apt
```
The `apt-get` command itself lives in `cmdline/apt-get.cc`. It's a pain to read through but most of `apt-get`'s actions are spelled out quite extensively in the... |
540,937 | What does the `apt-get install ...` command do?
When I enter `apt-get install ...` command, there are some texts appearing on the screen, but that does not have enough information for me. I want to know if any file is created / edited, any service is started and other activities...
Is there any `.sh` file executed wh... | 2014/10/24 | [
"https://askubuntu.com/questions/540937",
"https://askubuntu.com",
"https://askubuntu.com/users/277876/"
] | For the actual *under-the-hood* stuff, you'll need to grab the Apt source. Fairly simple if you have source repositories enabled:
```
apt-get source apt
```
The `apt-get` command itself lives in `cmdline/apt-get.cc`. It's a pain to read through but most of `apt-get`'s actions are spelled out quite extensively in the... | There are some fantastic answers here which are better than this short one, but something you might consider to help you get a better understanding of the changes made by a package manager is [Docker](https://www.docker.com). You can diff the changes made in a container using `docker diff <container>` and it will show ... |
540,937 | What does the `apt-get install ...` command do?
When I enter `apt-get install ...` command, there are some texts appearing on the screen, but that does not have enough information for me. I want to know if any file is created / edited, any service is started and other activities...
Is there any `.sh` file executed wh... | 2014/10/24 | [
"https://askubuntu.com/questions/540937",
"https://askubuntu.com",
"https://askubuntu.com/users/277876/"
] | **In short**: `apt-get install` does everything that is needed that your system can successfully execute the new installed software application.
**Longer:**
**Preliminaries:**
From the [manpage](http://manpages.ubuntu.com/manpages/trusty/en/man8/apt-get.8.html):
>
> All packages required by the package(s) specif... | There are some fantastic answers here which are better than this short one, but something you might consider to help you get a better understanding of the changes made by a package manager is [Docker](https://www.docker.com). You can diff the changes made in a container using `docker diff <container>` and it will show ... |
31,499 | Is it possible to attain the first jhana, then remain in first jhana, while walking, talking, eating and performing other daily activities?
Or does one remain in first jhana only while in sitting meditation, then he has to leave the jhana and meditation, before he is able to perform daily activities such as walking, t... | 2019/03/12 | [
"https://buddhism.stackexchange.com/questions/31499",
"https://buddhism.stackexchange.com",
"https://buddhism.stackexchange.com/users/471/"
] | From [AN3.63](https://suttacentral.net/an3.63/en/sujato):
>
> With the giving up of pleasure and pain, and the ending of former happiness and sadness, I enter and remain in the fourth absorption, without pleasure or pain, with pure equanimity and mindfulness.
>
>
> When I’m practicing like this, if I **walk** medit... | It's possible to reach Jhanic states while not formal sitting, yet can be certain "[dangerous](https://www.youtube.com/watch?v=W8hgPSwHnM8)". (while not serious, actually serious warning). Walking is perfect, but one should not train such in a "dangerous" environment for one self and others but only when already walkin... |
31,499 | Is it possible to attain the first jhana, then remain in first jhana, while walking, talking, eating and performing other daily activities?
Or does one remain in first jhana only while in sitting meditation, then he has to leave the jhana and meditation, before he is able to perform daily activities such as walking, t... | 2019/03/12 | [
"https://buddhism.stackexchange.com/questions/31499",
"https://buddhism.stackexchange.com",
"https://buddhism.stackexchange.com/users/471/"
] | From [AN3.63](https://suttacentral.net/an3.63/en/sujato):
>
> With the giving up of pleasure and pain, and the ending of former happiness and sadness, I enter and remain in the fourth absorption, without pleasure or pain, with pure equanimity and mindfulness.
>
>
> When I’m practicing like this, if I **walk** medit... | According to Sutta Jhana formula, you have to sit cross-legged and keeping your body erects, keeping your mindfulness to the front when you are in first Jhana. In first Jhana you have abandoned five hindrances and acquired five Jhana factors vitakka, vicara, pithi, sukha and ekagata. your speech has ceased and no body ... |
31,499 | Is it possible to attain the first jhana, then remain in first jhana, while walking, talking, eating and performing other daily activities?
Or does one remain in first jhana only while in sitting meditation, then he has to leave the jhana and meditation, before he is able to perform daily activities such as walking, t... | 2019/03/12 | [
"https://buddhism.stackexchange.com/questions/31499",
"https://buddhism.stackexchange.com",
"https://buddhism.stackexchange.com/users/471/"
] | From [AN3.63](https://suttacentral.net/an3.63/en/sujato):
>
> With the giving up of pleasure and pain, and the ending of former happiness and sadness, I enter and remain in the fourth absorption, without pleasure or pain, with pure equanimity and mindfulness.
>
>
> When I’m practicing like this, if I **walk** medit... | Perhaps you can stay in Arahattaphla Samadhi while you are walking, talking and eating. |
31,499 | Is it possible to attain the first jhana, then remain in first jhana, while walking, talking, eating and performing other daily activities?
Or does one remain in first jhana only while in sitting meditation, then he has to leave the jhana and meditation, before he is able to perform daily activities such as walking, t... | 2019/03/12 | [
"https://buddhism.stackexchange.com/questions/31499",
"https://buddhism.stackexchange.com",
"https://buddhism.stackexchange.com/users/471/"
] | From [AN3.63](https://suttacentral.net/an3.63/en/sujato):
>
> With the giving up of pleasure and pain, and the ending of former happiness and sadness, I enter and remain in the fourth absorption, without pleasure or pain, with pure equanimity and mindfulness.
>
>
> When I’m practicing like this, if I **walk** medit... | No, it's impossible. That isn't to say that you can't practice walking meditation (or any other technique) in a way that develops the five jhana factors, however. These can be cultivated to quite a significant degree especially if they are done as a supplement to seated meditation. Unfortunately, it's simply not possib... |
31,499 | Is it possible to attain the first jhana, then remain in first jhana, while walking, talking, eating and performing other daily activities?
Or does one remain in first jhana only while in sitting meditation, then he has to leave the jhana and meditation, before he is able to perform daily activities such as walking, t... | 2019/03/12 | [
"https://buddhism.stackexchange.com/questions/31499",
"https://buddhism.stackexchange.com",
"https://buddhism.stackexchange.com/users/471/"
] | From [AN3.63](https://suttacentral.net/an3.63/en/sujato):
>
> With the giving up of pleasure and pain, and the ending of former happiness and sadness, I enter and remain in the fourth absorption, without pleasure or pain, with pure equanimity and mindfulness.
>
>
> When I’m practicing like this, if I **walk** medit... | The First Jhana is just sustained thought and attention on the object, with some sukkha (pleasure, bliss), and some piiti (rapture, ecstacy) which are
"First dhyāna: the first dhyana can be entered when one is secluded from sensuality and unskillful qualities, due to withdrawal and right effort. There is pīti ("raptu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.