qid int64 1 74.7M | question stringlengths 0 58.3k | date stringlengths 10 10 | metadata list | response_j stringlengths 2 48.3k | response_k stringlengths 2 40.5k |
|---|---|---|---|---|---|
46,689,384 | There is a css file and I want to make two things:
1) Remove all webkit keyframes and surrounding whitespace characters like:
```
@keyframes outToLeft {
to {
opacity: 0;
-webkit-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0);
}
}
```
2) Remove all webkit pre... | 2017/10/11 | [
"https://Stackoverflow.com/questions/46689384",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7013674/"
] | You need to add permission to your manifest first
```
<uses-permission android:name="android.permission.CALL_PHONE" />
```
After permission added in manifest following code would work fine for you "Number\_to\_call" will be youe number that is need to be replaced
```
val call = Intent(Intent.ACTION_DIAL)
call.set... | You need to add the run time permission. [Download the source code from here](http://deepshikhapuri.blogspot.in/2017/11/runtime-permission-in-android-kotlin.html)
//Click function of layout:
```
rl_call.setOnClickListener {
if (boolean_call) {
phonecall()
}else {
fn_permissio... |
46,689,384 | There is a css file and I want to make two things:
1) Remove all webkit keyframes and surrounding whitespace characters like:
```
@keyframes outToLeft {
to {
opacity: 0;
-webkit-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0);
}
}
```
2) Remove all webkit pre... | 2017/10/11 | [
"https://Stackoverflow.com/questions/46689384",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7013674/"
] | You need to add permission to your manifest first
```
<uses-permission android:name="android.permission.CALL_PHONE" />
```
After permission added in manifest following code would work fine for you "Number\_to\_call" will be youe number that is need to be replaced
```
val call = Intent(Intent.ACTION_DIAL)
call.set... | First you need to add permission to your `manifest` first :
```
<uses-permission android:name="android.permission.CALL_PHONE" />
```
This bit of code is used on the place of your method :
```
fun buChargeEvent(view: View) {
var number: Int = txtCharge.text.toString().toInt()
val callIntent = Intent(Intent.A... |
46,689,384 | There is a css file and I want to make two things:
1) Remove all webkit keyframes and surrounding whitespace characters like:
```
@keyframes outToLeft {
to {
opacity: 0;
-webkit-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0);
}
}
```
2) Remove all webkit pre... | 2017/10/11 | [
"https://Stackoverflow.com/questions/46689384",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7013674/"
] | You need to add permission to your manifest first
```
<uses-permission android:name="android.permission.CALL_PHONE" />
```
After permission added in manifest following code would work fine for you "Number\_to\_call" will be youe number that is need to be replaced
```
val call = Intent(Intent.ACTION_DIAL)
call.set... | **This is the complete code for runtime permissions for Call Phone**
>
> **Step 1**:- add permission in manifest
>
>
>
```
<uses-permission android:name="android.permission.CALL_PHONE" />
```
>
> **Step 2**:- Call this method `checkAndroidVersion()` in `onCreate()`
>
>
>
```
fun checkAndroidVersion() {
... |
46,689,384 | There is a css file and I want to make two things:
1) Remove all webkit keyframes and surrounding whitespace characters like:
```
@keyframes outToLeft {
to {
opacity: 0;
-webkit-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0);
}
}
```
2) Remove all webkit pre... | 2017/10/11 | [
"https://Stackoverflow.com/questions/46689384",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7013674/"
] | You need to add the run time permission. [Download the source code from here](http://deepshikhapuri.blogspot.in/2017/11/runtime-permission-in-android-kotlin.html)
//Click function of layout:
```
rl_call.setOnClickListener {
if (boolean_call) {
phonecall()
}else {
fn_permissio... | **This is the complete code for runtime permissions for Call Phone**
>
> **Step 1**:- add permission in manifest
>
>
>
```
<uses-permission android:name="android.permission.CALL_PHONE" />
```
>
> **Step 2**:- Call this method `checkAndroidVersion()` in `onCreate()`
>
>
>
```
fun checkAndroidVersion() {
... |
46,689,384 | There is a css file and I want to make two things:
1) Remove all webkit keyframes and surrounding whitespace characters like:
```
@keyframes outToLeft {
to {
opacity: 0;
-webkit-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0);
}
}
```
2) Remove all webkit pre... | 2017/10/11 | [
"https://Stackoverflow.com/questions/46689384",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7013674/"
] | First you need to add permission to your `manifest` first :
```
<uses-permission android:name="android.permission.CALL_PHONE" />
```
This bit of code is used on the place of your method :
```
fun buChargeEvent(view: View) {
var number: Int = txtCharge.text.toString().toInt()
val callIntent = Intent(Intent.A... | **This is the complete code for runtime permissions for Call Phone**
>
> **Step 1**:- add permission in manifest
>
>
>
```
<uses-permission android:name="android.permission.CALL_PHONE" />
```
>
> **Step 2**:- Call this method `checkAndroidVersion()` in `onCreate()`
>
>
>
```
fun checkAndroidVersion() {
... |
23,222,762 | I'm writing a library that uses [Function Hooking](http://en.wikipedia.org/wiki/Hooking) to inspect the arguments sent from 3rd-party code to a 3rd-party library. The caller and callee are both written in C, and the hooking is accomplished by providing the loader with an array of pairs of function pointers.
Initially,... | 2014/04/22 | [
"https://Stackoverflow.com/questions/23222762",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/773/"
] | You need a correlated subselect, as @IanBjorhovde mentioned:
```
update ssa.psa_xtn xtn
set xtn.c_id =
(
select psa.c_id
from ccc.p_s_a psa
where psa.a_id = xtn.a_id
)
``` | You may want to consider looking at the `MERGE` statement:
```
MERGE INTO ssa.psa_xtn xtn
using ccc.p_s_a psa
on (xtn.a_id = psa.a_id)
when matched then update set xtn.c_id = psa.c_id;
```
It offers a lot more flexibility that a correlated subselect, and also provides the ability to perform upserts (update ... |
46,393,867 | I have several scripts(jobs) that run on a linux system (bash scripts or python scripts). Each script is continuously performing the same task over and over again, with some sleep in between (performing a task, then sleeping for a while, then performing the task again).
I want to have a web interface where I can at le... | 2017/09/24 | [
"https://Stackoverflow.com/questions/46393867",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8527441/"
] | To quote [Java 9's javadoc](https://docs.oracle.com/javase/9/docs/api/java/lang/Class.html#newInstance--):
>
> The call
>
>
> `clazz.newInstance()`
>
>
> can be replaced by
>
>
> `clazz.getDeclaredConstructor().newInstance()`
>
>
> | ```
Class.getDeclaredConstructor(...).newInstance(...)
```
Refer to [Google errorprone's documentation](http://errorprone.info/bugpattern/ClassNewInstance) (for example) for a description of why. |
55,595 | In my beamer block the title always comes left alined. Is that possible to make the title of the block centered?
```
\documentclass[final, 12pt]{beamer}
\usepackage[size=custom,width=120,height=120,scale=1.7,orientation=portrait]{beamerposter}
\usepackage{ragged2e}
\usepackage{graphicx}
\usepackage{lipsum}
\u... | 2012/05/13 | [
"https://tex.stackexchange.com/questions/55595",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/10060/"
] | Actually - I found a much easier way of centering the title within a block. I have to say, I'm not sure if this is sort of hacky, but it works.
```
\begin{block}{\centering 1. Introduction}
...
...
\end{block}
```
I'm imagining it would work similarly for your varblock environment.
```
\begin{varblock}[35cm]{\cente... | Change your definition of `varblock` to
```
\newenvironment<>{varblock}[2][\textwidth]{%
\setlength{\textwidth}{#1}
\begin{actionenv}#3%
\def\insertblocktitle{\centering#2\par}%
\par%
\usebeamertemplate{block begin}}
{\par%
\usebeamertemplate{block end}%
\end{actionenv}}
``` |
55,595 | In my beamer block the title always comes left alined. Is that possible to make the title of the block centered?
```
\documentclass[final, 12pt]{beamer}
\usepackage[size=custom,width=120,height=120,scale=1.7,orientation=portrait]{beamerposter}
\usepackage{ragged2e}
\usepackage{graphicx}
\usepackage{lipsum}
\u... | 2012/05/13 | [
"https://tex.stackexchange.com/questions/55595",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/10060/"
] | Change your definition of `varblock` to
```
\newenvironment<>{varblock}[2][\textwidth]{%
\setlength{\textwidth}{#1}
\begin{actionenv}#3%
\def\insertblocktitle{\centering#2\par}%
\par%
\usebeamertemplate{block begin}}
{\par%
\usebeamertemplate{block end}%
\end{actionenv}}
``` | As the `block begin` beamertemplate sets the font associated with `block title` before outputting the block title, one can hijack this function to sneak in a `\centering` command instead of redefining the entire template:
```
\setbeamerfont{block title}{size={\centering}}
```
This will directly affect all three type... |
55,595 | In my beamer block the title always comes left alined. Is that possible to make the title of the block centered?
```
\documentclass[final, 12pt]{beamer}
\usepackage[size=custom,width=120,height=120,scale=1.7,orientation=portrait]{beamerposter}
\usepackage{ragged2e}
\usepackage{graphicx}
\usepackage{lipsum}
\u... | 2012/05/13 | [
"https://tex.stackexchange.com/questions/55595",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/10060/"
] | Actually - I found a much easier way of centering the title within a block. I have to say, I'm not sure if this is sort of hacky, but it works.
```
\begin{block}{\centering 1. Introduction}
...
...
\end{block}
```
I'm imagining it would work similarly for your varblock environment.
```
\begin{varblock}[35cm]{\cente... | As the `block begin` beamertemplate sets the font associated with `block title` before outputting the block title, one can hijack this function to sneak in a `\centering` command instead of redefining the entire template:
```
\setbeamerfont{block title}{size={\centering}}
```
This will directly affect all three type... |
29,553 | Is it possible for a Reform Jew to violate a mitzva in the Torah or break halacha, like breaking shabbos by doing melacha ('labor')? After all, from what I understand, Reform Jews don't believe in a requirement to keep mitzvos; thus, I don't understand how a Reform Jew can violate something there's no requirement to ke... | 2013/06/24 | [
"https://judaism.stackexchange.com/questions/29553",
"https://judaism.stackexchange.com",
"https://judaism.stackexchange.com/users/1059/"
] | Yes, a Reform Jew can absolutely transgress a mitzvah. That Reform doesn't say up front "here are all the mitzvot you must accept" does not mean that no Reform Jew accepts any. Reform (as taught today; I can't speak to early history) isn't about rejecting mitzvot.
A Reform Jew reaches an understanding of halacha throu... | It is possible for a Reform Jew to break Shabbos. From the perspective of traditional Judaism, it doesn't matter whether they believe in the laws. If they don't follow them, they are transgressing.
From a Reform perspective, your description of Reform Judaism is inaccurate. The fact that hilchot Shabbos exist is indis... |
64,159,919 | I have two Pandas series which I merged using the following code:
```
HS4_Tariffs_16=pd.concat([df_tariff_HS4_16_PT,df_tariff_HS4_16_MFN],axis=1)
```
If you are wondering why I used concat in place of merge, the error 'Series' object has no attribute 'merge' showed up when I used merge.
So anyway, I merged the two s... | 2020/10/01 | [
"https://Stackoverflow.com/questions/64159919",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14375190/"
] | The OnWillPop scope expects you to give it a proper function so try doing any one of these 2 changes
**CHANGE1**
```
return WillPopScope(
onWillPop:(){
widget.returnIndex;
},
child: Scaffold(
));
```
OR
**CHANGE2**
```
void returnIndex(){//Future<void> if it is a future objec... | I can't comment yet, but to add on to the above answer:
WillPopScope does indeed look for a future in response to onWillPop, so you'll need to take that into account as you define a(n async) function / assign a value of a Future. |
1,383,737 | I've got a WiiU/Swtich GameCube USB adapter that I'd like to plug into my computer (device 1) as well as my Nintendo Switch (device 2) and have both devices recognize that USB adapter and the controller plugged into it.
I have seen some products that allow you to switch between the two devices but they won’t work for ... | 2018/12/15 | [
"https://superuser.com/questions/1383737",
"https://superuser.com",
"https://superuser.com/users/319595/"
] | No, you cannot connect one (slave) USB device to two or more (master or host) USB systems. That's impossible given how the USB bus works. And that's why you have switches like the one you describe; if it was simpler, people wouldn't need those switches.
The "splicing two USB wires" hardware hack will only work as long... | I cannot say with 100% certainty, but *very highly* doubt this will work.
Electrically, you could connect the device that way, splitting the send and receive wires to the computer and the Switch. With two physical connections, it is possible the voltage could drop below necessary levels and cause connection issues.
H... |
19,490,552 | For an object of class `CheckToString`, when I give the object or the `objectName.toString()` as an argument to `System.out.println()` ie try to print it, i get the output as follows:
```
CheckToString@19821f
```
Here, the text after '@' is the hashCode, what all does it comprise of and what is the best practice o... | 2013/10/21 | [
"https://Stackoverflow.com/questions/19490552",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2575434/"
] | >
> what all does it comprise of
>
>
>
It comprises "the unsigned hexadecimal representation of the hash code of the object", as it says in the [Javadoc](http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html#toString%28%29).
>
> does it contains memory address of the object
>
>
>
No. Also documented... | In `java.lang.Object`'s hashcode it basically returns the memory address.(32 bit hexadecimal).
```
what is the best practice of overriding hashCode()?
```
When you start using collections then there would be time you want to match one object to another. As you may know two different objects can't be same but by over... |
19,490,552 | For an object of class `CheckToString`, when I give the object or the `objectName.toString()` as an argument to `System.out.println()` ie try to print it, i get the output as follows:
```
CheckToString@19821f
```
Here, the text after '@' is the hashCode, what all does it comprise of and what is the best practice o... | 2013/10/21 | [
"https://Stackoverflow.com/questions/19490552",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2575434/"
] | This is there in the Java docs
>
> As much as is reasonably practical, the hashCode method defined by class Object does return distinct integers for distinct objects. (This is typically implemented by converting the internal address of the object into an integer, but this implementation technique is not required by t... | In `java.lang.Object`'s hashcode it basically returns the memory address.(32 bit hexadecimal).
```
what is the best practice of overriding hashCode()?
```
When you start using collections then there would be time you want to match one object to another. As you may know two different objects can't be same but by over... |
19,490,552 | For an object of class `CheckToString`, when I give the object or the `objectName.toString()` as an argument to `System.out.println()` ie try to print it, i get the output as follows:
```
CheckToString@19821f
```
Here, the text after '@' is the hashCode, what all does it comprise of and what is the best practice o... | 2013/10/21 | [
"https://Stackoverflow.com/questions/19490552",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2575434/"
] | Going by the spec, there is no relationship between hashcode and memory location. However a memory address of an object could be a good (if not better) value for a hashcode.
The general contract of hashCode is:
>
> Whenever it is invoked on the same object more than once during an
> execution of a Java application,... | In `java.lang.Object`'s hashcode it basically returns the memory address.(32 bit hexadecimal).
```
what is the best practice of overriding hashCode()?
```
When you start using collections then there would be time you want to match one object to another. As you may know two different objects can't be same but by over... |
19,490,552 | For an object of class `CheckToString`, when I give the object or the `objectName.toString()` as an argument to `System.out.println()` ie try to print it, i get the output as follows:
```
CheckToString@19821f
```
Here, the text after '@' is the hashCode, what all does it comprise of and what is the best practice o... | 2013/10/21 | [
"https://Stackoverflow.com/questions/19490552",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2575434/"
] | As the Javadoc specify. hashcode is nothing but integer converted internal address.
>
> As much as is reasonably practical, the hashCode method defined by class Object does return distinct integers for distinct objects. (This is typically implemented by converting the internal address of the object into an integer, b... | In `java.lang.Object`'s hashcode it basically returns the memory address.(32 bit hexadecimal).
```
what is the best practice of overriding hashCode()?
```
When you start using collections then there would be time you want to match one object to another. As you may know two different objects can't be same but by over... |
20,844,659 | I'd like to know how other people are automating their JavaScript build process in CMS website builds.
I currently use Grunt to automate SASS->CSS minification which works really well because your not overwriting your sass files with compressed code.
You can't really do the same thing with JavaScript though because y... | 2013/12/30 | [
"https://Stackoverflow.com/questions/20844659",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/180405/"
] | Rewrite your
```
$bdd->exec('UPDATE Trajet SET name = \'echo $_SESSION[\'name\'];\'');
```
to
```
$bdd->exec("UPDATE Trajet SET name = ".$_SESSION['name']);
``` | you should have:
```
$bdd->exec("UPDATE Trajet SET name = ".$_SESSION['name']);
```
not:
```
$bdd->exec('UPDATE Trajet SET name = \'echo $_SESSION[\'name\'];\'');
``` |
3,013,664 | >
> For what values of $a$ and $b$ is the following limit true?
> $$\lim\_{x\to0}\left(\frac{\tan2x}{x^3}+\frac{a}{x^2}+\frac{\sin bx}{x}\right)=0$$
>
>
>
This question is really confusing me. I know that $\tan(2x)/x^3$ approaches infinity as $x$ goes to $0$ (L'Hôpital's). I also understand that $\sin(bx)/x$ goes... | 2018/11/26 | [
"https://math.stackexchange.com/questions/3013664",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/533510/"
] | Since $\lim\_{x\to 0}\dfrac{\sin bx} {x} =b$ the given condition is equivalent to $$\lim\_{x\to 0}\frac{\tan 2x+ax}{x^3}=-b$$ or $$\lim\_{x\to 0}\frac{\tan 2x-2x}{x^3}+\frac{a+2}{x^2}=-b$$ Substituting $t=2x$ we get $$\lim\_{t\to 0}8\cdot \frac{\tan t-t} {t^3}+\dfrac{4a+8}{t^2}=-b$$ The first fraction tends to $1/3$ (a... | First, notice that your limit exists if and only if it exists without the last term (since, as you said, the limit of the last term exists).
You have
$$\tag1
\frac{\tan2x}{x^3}+\frac a{x^2}=\frac{\tan2x+ax}{x^3}.
$$
Note that if $a\ne0$ you cannot apply L'Hôpital. The expression in $(1)$ is, close to $0$,
$$\tag2
\... |
3,013,664 | >
> For what values of $a$ and $b$ is the following limit true?
> $$\lim\_{x\to0}\left(\frac{\tan2x}{x^3}+\frac{a}{x^2}+\frac{\sin bx}{x}\right)=0$$
>
>
>
This question is really confusing me. I know that $\tan(2x)/x^3$ approaches infinity as $x$ goes to $0$ (L'Hôpital's). I also understand that $\sin(bx)/x$ goes... | 2018/11/26 | [
"https://math.stackexchange.com/questions/3013664",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/533510/"
] | First, notice that your limit exists if and only if it exists without the last term (since, as you said, the limit of the last term exists).
You have
$$\tag1
\frac{\tan2x}{x^3}+\frac a{x^2}=\frac{\tan2x+ax}{x^3}.
$$
Note that if $a\ne0$ you cannot apply L'Hôpital. The expression in $(1)$ is, close to $0$,
$$\tag2
\... | We have that
$$\frac{\tan (2x)}{x^3}+\frac{a}{x^2}+\frac{\sin bx}{x}=\frac{\tan (2x)+ax+x^2\sin bx}{x^3}$$
and from here since $x^2\sin bx\sim bx^3$ and $\tan (2x)\sim 2x$ we need $a=-2$ as a necessary condition for the limit to exist then we can consider by standard limits
$$\frac{\tan (2x)-2x+x^2\sin bx}{x^3}=8\fr... |
3,013,664 | >
> For what values of $a$ and $b$ is the following limit true?
> $$\lim\_{x\to0}\left(\frac{\tan2x}{x^3}+\frac{a}{x^2}+\frac{\sin bx}{x}\right)=0$$
>
>
>
This question is really confusing me. I know that $\tan(2x)/x^3$ approaches infinity as $x$ goes to $0$ (L'Hôpital's). I also understand that $\sin(bx)/x$ goes... | 2018/11/26 | [
"https://math.stackexchange.com/questions/3013664",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/533510/"
] | Since $\lim\_{x\to 0}\dfrac{\sin bx} {x} =b$ the given condition is equivalent to $$\lim\_{x\to 0}\frac{\tan 2x+ax}{x^3}=-b$$ or $$\lim\_{x\to 0}\frac{\tan 2x-2x}{x^3}+\frac{a+2}{x^2}=-b$$ Substituting $t=2x$ we get $$\lim\_{t\to 0}8\cdot \frac{\tan t-t} {t^3}+\dfrac{4a+8}{t^2}=-b$$ The first fraction tends to $1/3$ (a... | Using the usual Taylor series for
$$y=\frac{\tan(2x)}{x^3}+\frac{a}{x^2}+\frac{\sin (bx)}{x}=\frac{\tan(2x)+ax+x^2\sin (bx)}{x^3}$$ The numerator write
$$\left(2 x+\frac{8 x^3}{3}+\frac{64 x^5}{15}+O\left(x^7\right) \right)+a x+x^2\left(b x-\frac{b^3 x^3}{6}+\frac{b^5 x^5}{120}+O\left(x^7\right) \right)$$ that is to sa... |
3,013,664 | >
> For what values of $a$ and $b$ is the following limit true?
> $$\lim\_{x\to0}\left(\frac{\tan2x}{x^3}+\frac{a}{x^2}+\frac{\sin bx}{x}\right)=0$$
>
>
>
This question is really confusing me. I know that $\tan(2x)/x^3$ approaches infinity as $x$ goes to $0$ (L'Hôpital's). I also understand that $\sin(bx)/x$ goes... | 2018/11/26 | [
"https://math.stackexchange.com/questions/3013664",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/533510/"
] | Since $\lim\_{x\to 0}\dfrac{\sin bx} {x} =b$ the given condition is equivalent to $$\lim\_{x\to 0}\frac{\tan 2x+ax}{x^3}=-b$$ or $$\lim\_{x\to 0}\frac{\tan 2x-2x}{x^3}+\frac{a+2}{x^2}=-b$$ Substituting $t=2x$ we get $$\lim\_{t\to 0}8\cdot \frac{\tan t-t} {t^3}+\dfrac{4a+8}{t^2}=-b$$ The first fraction tends to $1/3$ (a... | We have that
$$\frac{\tan (2x)}{x^3}+\frac{a}{x^2}+\frac{\sin bx}{x}=\frac{\tan (2x)+ax+x^2\sin bx}{x^3}$$
and from here since $x^2\sin bx\sim bx^3$ and $\tan (2x)\sim 2x$ we need $a=-2$ as a necessary condition for the limit to exist then we can consider by standard limits
$$\frac{\tan (2x)-2x+x^2\sin bx}{x^3}=8\fr... |
3,013,664 | >
> For what values of $a$ and $b$ is the following limit true?
> $$\lim\_{x\to0}\left(\frac{\tan2x}{x^3}+\frac{a}{x^2}+\frac{\sin bx}{x}\right)=0$$
>
>
>
This question is really confusing me. I know that $\tan(2x)/x^3$ approaches infinity as $x$ goes to $0$ (L'Hôpital's). I also understand that $\sin(bx)/x$ goes... | 2018/11/26 | [
"https://math.stackexchange.com/questions/3013664",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/533510/"
] | Using the usual Taylor series for
$$y=\frac{\tan(2x)}{x^3}+\frac{a}{x^2}+\frac{\sin (bx)}{x}=\frac{\tan(2x)+ax+x^2\sin (bx)}{x^3}$$ The numerator write
$$\left(2 x+\frac{8 x^3}{3}+\frac{64 x^5}{15}+O\left(x^7\right) \right)+a x+x^2\left(b x-\frac{b^3 x^3}{6}+\frac{b^5 x^5}{120}+O\left(x^7\right) \right)$$ that is to sa... | We have that
$$\frac{\tan (2x)}{x^3}+\frac{a}{x^2}+\frac{\sin bx}{x}=\frac{\tan (2x)+ax+x^2\sin bx}{x^3}$$
and from here since $x^2\sin bx\sim bx^3$ and $\tan (2x)\sim 2x$ we need $a=-2$ as a necessary condition for the limit to exist then we can consider by standard limits
$$\frac{\tan (2x)-2x+x^2\sin bx}{x^3}=8\fr... |
57,752,517 | How would I read deep JSON data nested deep inside a file? I've tried different methods and can't seem to get this to work.
```html
<template>
<div>
<div v-for="edu in info" :key="edu">
<div>{{ edu.section.title }}</div> // this is what im trying to get to work
</div>
<div cla... | 2019/09/02 | [
"https://Stackoverflow.com/questions/57752517",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8322364/"
] | how about that?
```
select * from(
select col1,col2,col3,row_number() over (partition by col1,col2 order by col3 desc) rn from a
) where rn>1
``` | The way I understood it:
```
SQL> with test (id, col1, col2) as
2 (select 123123, to_date('23.07.2019 22:00', 'dd.mm.yyyy hh24:mi'), to_date('31.12.9999 00:00', 'dd.mm.yyyy hh24:mi') from dual union all
3 select 123123, to_date('23.07.2019 22:00', 'dd.mm.yyyy hh24:mi'), to_date('04.07.2019 00:00', 'dd.mm.yy... |
57,752,517 | How would I read deep JSON data nested deep inside a file? I've tried different methods and can't seem to get this to work.
```html
<template>
<div>
<div v-for="edu in info" :key="edu">
<div>{{ edu.section.title }}</div> // this is what im trying to get to work
</div>
<div cla... | 2019/09/02 | [
"https://Stackoverflow.com/questions/57752517",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8322364/"
] | how about that?
```
select * from(
select col1,col2,col3,row_number() over (partition by col1,col2 order by col3 desc) rn from a
) where rn>1
``` | I don't think the other answers are correct, because they do not explicitly check for the maximum date.
You can get your desired results most simply with:
```
select t.*
from t
where t.col3 <> '9999-12-31 00:00:00';
```
I need to assume that you really want to require that the maximum date is present (because you m... |
57,752,517 | How would I read deep JSON data nested deep inside a file? I've tried different methods and can't seem to get this to work.
```html
<template>
<div>
<div v-for="edu in info" :key="edu">
<div>{{ edu.section.title }}</div> // this is what im trying to get to work
</div>
<div cla... | 2019/09/02 | [
"https://Stackoverflow.com/questions/57752517",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8322364/"
] | The way I understood it:
```
SQL> with test (id, col1, col2) as
2 (select 123123, to_date('23.07.2019 22:00', 'dd.mm.yyyy hh24:mi'), to_date('31.12.9999 00:00', 'dd.mm.yyyy hh24:mi') from dual union all
3 select 123123, to_date('23.07.2019 22:00', 'dd.mm.yyyy hh24:mi'), to_date('04.07.2019 00:00', 'dd.mm.yy... | I don't think the other answers are correct, because they do not explicitly check for the maximum date.
You can get your desired results most simply with:
```
select t.*
from t
where t.col3 <> '9999-12-31 00:00:00';
```
I need to assume that you really want to require that the maximum date is present (because you m... |
547,629 | I've got some SQL which performs complex logic on combinations of GL account numbers and cost centers like this:
```
WHEN (@IntGLAcct In (
882001, 882025, 83000154, 83000155, 83000120, 83000130,
83000140, 83000157, 83000010, 83000159, 83000160, 83000161,
83000162, 83000011, 83000166, 83000168, 83000169, 82504... | 2009/02/13 | [
"https://Stackoverflow.com/questions/547629",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18255/"
] | Try this:
```
Array.IndexOf(New Integer() {90605, 90607, 90610}, IntGLAcct) >-1
``` | What if you used a conditional split transform on your incoming data set and then used expressions or something similar (I'm not sure if your GL Accounts are fixed or if you're going to dynamically pass them in) to apply to the results? You can then take the resulting data from that and process as necessary. |
63,976,246 | My function that asks the user to input a 7 character number. but when i define it, it wont run. reason why? any help is appreciated.
```
def eticketNum():
while True:
eTickNum = input('please enter eticket number:')
if len(eTickNum) == 7:
break
print ('Sorry, entry is invalid. ... | 2020/09/20 | [
"https://Stackoverflow.com/questions/63976246",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14306496/"
] | You have to call the function,
add a `eticketNum()` to the last line of your code, It will be something like this:
```
def eticketNum():
# your code
eticketNum()
```
**edit:**
if you want to use return value:
```
def eticketNum():
# your code
x = eticketNum()
# do whatever you want with 'x' variable.
... | Indentation is not correct, select what's after the def line and hit "tab" on your keyboard should work fine it's the alternative for {} if java |
9,129,109 | Can I use a Java Project in an Android Project even if some classes from the java project are not recognized in a normal android project? For example javax.xml package?
There are 2 possibilities as I see it:
1. Either create a jar with that java project and import it in android
2. Or reference the project in androi... | 2012/02/03 | [
"https://Stackoverflow.com/questions/9129109",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1140656/"
] | ~~If you are using Eclipse (with the ADT plugin) you can reference the Java project in the build path of your Android project. This will package those classes in your .apk output and allow you to use them in your app.~~
As you pointed out in your comments; referencing a Java project as an Android library will not work... | It finally worked, my biggest issue was the url i was passing to HttpPost and ksoap2 with SAP did not work for me at all.
```
private void testCallingService() {
DefaultHttpClient httpclient = new DefaultHttpClient();
httpclient.getCredentialsProvider().setCredentials(
new AuthScope("ip here", port... |
107,003 | I see a lot of question about scams with the same premises:
1. Someone puts money in your account.
2. You send money somewhere.
3. They take their money back, while you lost your money.
I don't know a whole lot about banking and money transfers, but it seems odd to me that they can retract money back while you can't... | 2019/03/27 | [
"https://money.stackexchange.com/questions/107003",
"https://money.stackexchange.com",
"https://money.stackexchange.com/users/83829/"
] | Some payment methods people are able to cancel or the money doesn't fully exist until 'cleared', some not.
This scam works by sending you money via one that *can* such as a check, followed by you sending them money back via one that *can't*, typically Western Union, cash in person or via crypto etc.
They then cancel... | Sometimes the scammer doesn't even need to intentionally cancel the original payment. They might send you a check, which you deposit in your account. Your bank accepts the check and it may even post to your account because the bank assumes that it is legitimate (and it does appear that way at first). A couple days/week... |
107,003 | I see a lot of question about scams with the same premises:
1. Someone puts money in your account.
2. You send money somewhere.
3. They take their money back, while you lost your money.
I don't know a whole lot about banking and money transfers, but it seems odd to me that they can retract money back while you can't... | 2019/03/27 | [
"https://money.stackexchange.com/questions/107003",
"https://money.stackexchange.com",
"https://money.stackexchange.com/users/83829/"
] | Here’s what happens:
When you thought the scammer deposited money in your account, it didn’t really happen. It was essentially fake money. This could happen in a few different ways. It could be that the scammer gave you a bad/fake check, which isn’t discovered until several days after you deposited it. Banks don’t kno... | Some payment methods people are able to cancel or the money doesn't fully exist until 'cleared', some not.
This scam works by sending you money via one that *can* such as a check, followed by you sending them money back via one that *can't*, typically Western Union, cash in person or via crypto etc.
They then cancel... |
107,003 | I see a lot of question about scams with the same premises:
1. Someone puts money in your account.
2. You send money somewhere.
3. They take their money back, while you lost your money.
I don't know a whole lot about banking and money transfers, but it seems odd to me that they can retract money back while you can't... | 2019/03/27 | [
"https://money.stackexchange.com/questions/107003",
"https://money.stackexchange.com",
"https://money.stackexchange.com/users/83829/"
] | Some payment methods people are able to cancel or the money doesn't fully exist until 'cleared', some not.
This scam works by sending you money via one that *can* such as a check, followed by you sending them money back via one that *can't*, typically Western Union, cash in person or via crypto etc.
They then cancel... | The only entity who can revert done money transfer is the bank itself, and they will do it only if there was something very wrong with the transfer itself, for example transfer resulted from system failure or the money came from criminal activity (from the account, that was closed by the law enforcement).
However, if... |
107,003 | I see a lot of question about scams with the same premises:
1. Someone puts money in your account.
2. You send money somewhere.
3. They take their money back, while you lost your money.
I don't know a whole lot about banking and money transfers, but it seems odd to me that they can retract money back while you can't... | 2019/03/27 | [
"https://money.stackexchange.com/questions/107003",
"https://money.stackexchange.com",
"https://money.stackexchange.com/users/83829/"
] | Some payment methods people are able to cancel or the money doesn't fully exist until 'cleared', some not.
This scam works by sending you money via one that *can* such as a check, followed by you sending them money back via one that *can't*, typically Western Union, cash in person or via crypto etc.
They then cancel... | >
> How do scammers [do something...], while you can’t?
>
>
>
A major factor here is the willingness to commit a crime, particularly fraud. For example, you can reverse a credit card charge by calling the customer service number and complaining that a purchase was unauthorized or fraudulent. Normal people do not l... |
107,003 | I see a lot of question about scams with the same premises:
1. Someone puts money in your account.
2. You send money somewhere.
3. They take their money back, while you lost your money.
I don't know a whole lot about banking and money transfers, but it seems odd to me that they can retract money back while you can't... | 2019/03/27 | [
"https://money.stackexchange.com/questions/107003",
"https://money.stackexchange.com",
"https://money.stackexchange.com/users/83829/"
] | Here’s what happens:
When you thought the scammer deposited money in your account, it didn’t really happen. It was essentially fake money. This could happen in a few different ways. It could be that the scammer gave you a bad/fake check, which isn’t discovered until several days after you deposited it. Banks don’t kno... | Sometimes the scammer doesn't even need to intentionally cancel the original payment. They might send you a check, which you deposit in your account. Your bank accepts the check and it may even post to your account because the bank assumes that it is legitimate (and it does appear that way at first). A couple days/week... |
107,003 | I see a lot of question about scams with the same premises:
1. Someone puts money in your account.
2. You send money somewhere.
3. They take their money back, while you lost your money.
I don't know a whole lot about banking and money transfers, but it seems odd to me that they can retract money back while you can't... | 2019/03/27 | [
"https://money.stackexchange.com/questions/107003",
"https://money.stackexchange.com",
"https://money.stackexchange.com/users/83829/"
] | Sometimes the scammer doesn't even need to intentionally cancel the original payment. They might send you a check, which you deposit in your account. Your bank accepts the check and it may even post to your account because the bank assumes that it is legitimate (and it does appear that way at first). A couple days/week... | The only entity who can revert done money transfer is the bank itself, and they will do it only if there was something very wrong with the transfer itself, for example transfer resulted from system failure or the money came from criminal activity (from the account, that was closed by the law enforcement).
However, if... |
107,003 | I see a lot of question about scams with the same premises:
1. Someone puts money in your account.
2. You send money somewhere.
3. They take their money back, while you lost your money.
I don't know a whole lot about banking and money transfers, but it seems odd to me that they can retract money back while you can't... | 2019/03/27 | [
"https://money.stackexchange.com/questions/107003",
"https://money.stackexchange.com",
"https://money.stackexchange.com/users/83829/"
] | >
> How do scammers [do something...], while you can’t?
>
>
>
A major factor here is the willingness to commit a crime, particularly fraud. For example, you can reverse a credit card charge by calling the customer service number and complaining that a purchase was unauthorized or fraudulent. Normal people do not l... | Sometimes the scammer doesn't even need to intentionally cancel the original payment. They might send you a check, which you deposit in your account. Your bank accepts the check and it may even post to your account because the bank assumes that it is legitimate (and it does appear that way at first). A couple days/week... |
107,003 | I see a lot of question about scams with the same premises:
1. Someone puts money in your account.
2. You send money somewhere.
3. They take their money back, while you lost your money.
I don't know a whole lot about banking and money transfers, but it seems odd to me that they can retract money back while you can't... | 2019/03/27 | [
"https://money.stackexchange.com/questions/107003",
"https://money.stackexchange.com",
"https://money.stackexchange.com/users/83829/"
] | Here’s what happens:
When you thought the scammer deposited money in your account, it didn’t really happen. It was essentially fake money. This could happen in a few different ways. It could be that the scammer gave you a bad/fake check, which isn’t discovered until several days after you deposited it. Banks don’t kno... | The only entity who can revert done money transfer is the bank itself, and they will do it only if there was something very wrong with the transfer itself, for example transfer resulted from system failure or the money came from criminal activity (from the account, that was closed by the law enforcement).
However, if... |
107,003 | I see a lot of question about scams with the same premises:
1. Someone puts money in your account.
2. You send money somewhere.
3. They take their money back, while you lost your money.
I don't know a whole lot about banking and money transfers, but it seems odd to me that they can retract money back while you can't... | 2019/03/27 | [
"https://money.stackexchange.com/questions/107003",
"https://money.stackexchange.com",
"https://money.stackexchange.com/users/83829/"
] | Here’s what happens:
When you thought the scammer deposited money in your account, it didn’t really happen. It was essentially fake money. This could happen in a few different ways. It could be that the scammer gave you a bad/fake check, which isn’t discovered until several days after you deposited it. Banks don’t kno... | >
> How do scammers [do something...], while you can’t?
>
>
>
A major factor here is the willingness to commit a crime, particularly fraud. For example, you can reverse a credit card charge by calling the customer service number and complaining that a purchase was unauthorized or fraudulent. Normal people do not l... |
107,003 | I see a lot of question about scams with the same premises:
1. Someone puts money in your account.
2. You send money somewhere.
3. They take their money back, while you lost your money.
I don't know a whole lot about banking and money transfers, but it seems odd to me that they can retract money back while you can't... | 2019/03/27 | [
"https://money.stackexchange.com/questions/107003",
"https://money.stackexchange.com",
"https://money.stackexchange.com/users/83829/"
] | >
> How do scammers [do something...], while you can’t?
>
>
>
A major factor here is the willingness to commit a crime, particularly fraud. For example, you can reverse a credit card charge by calling the customer service number and complaining that a purchase was unauthorized or fraudulent. Normal people do not l... | The only entity who can revert done money transfer is the bank itself, and they will do it only if there was something very wrong with the transfer itself, for example transfer resulted from system failure or the money came from criminal activity (from the account, that was closed by the law enforcement).
However, if... |
15,677 | I'd like to know if someone ported the bibliography styles used in revtex 4.1 (like apsrev4-1.bst) so they can be used in other classes, like book.
Thanks in advance! | 2011/04/12 | [
"https://tex.stackexchange.com/questions/15677",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/4844/"
] | It looks if the revtex bst's are highly customized for for the class file. I have found that the following gives more or less the same output with a standard class
```
\usepackage[sort&compress,numbers]{natbib}
\bibliographystyle{apsrev4-1}
\usepackage{doi}%<----------
\usepackage{hyperref}
```
It also needs an addi... | I haven't been able to make the `@CONTROL` sequences work as above, but I found a way to tweak `apsrev4-1.bst` to output what you want. First, copy `apsrev4-1.bst` to a new file named, for example, `apsrev4-1_custom.bst`, and put it in the same directory as your `tex` file. In it, find the function `control.init`, and ... |
34,048,513 | Below is my code:
```
gem_package 'cucumber' do
clear_sources true
source https://chefrubyaehq.kdc.example.com/
gem_binary '/opt/chef/embedded/bin/gem'
action :install
end
```
And I am getting the following error:
```
FATAL: zng937-test/recipes/default.rb:43: unknown regexp options - chfrbyahq
FATAL: ... | 2015/12/02 | [
"https://Stackoverflow.com/questions/34048513",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1666529/"
] | You need to put the source (`https://chefrubyaehq.kdc.capitalone.com/`) inside quotes to make it a string. Either single or double quotes is fine for this case. | Just as the message says.
* Your regex `//chefrubyaehq` is invalid. Ruby regex only has `i`, `o`, `x`, `m` options.
* You forgot to put a period after your regex `/\n gem_binary '/` before the method `opt`.
And when you fix those, you will still encounter more errors. |
315,313 | I'm making a machine learning model (right now I'm using average weighted neural networks) to predict a binary variable. I have historical data on which I can train this model, but when new models are trained and used for predictions about the "real future", there will be some bias in the selection of the data that wil... | 2017/11/23 | [
"https://stats.stackexchange.com/questions/315313",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/155702/"
] | You have two continuous variables: sets of predicted probabilities. You can use standard methods to assess the agreement between two continuous variables. I would start by using [Bland-Altman methods](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4470095/). Note that these are primarily qualitative, though. If you want ... | It depends on the context of your audience. I think a really nice simple way to explain to non statistical audiences is to compute your predictions with both models (0 or 1) and see what % of the predictions are the same. Otherwise you can compare the RMS value between them (again using the predictions or the probabili... |
30,837,055 | I 'm intending to fix bugs on Elastic Search open-source project. I forked it and cloned the forked copy . Then I imported it as Maven project on Eclipse and then did Maven build . So far so good.
I opened ElasticSearchF.java file and tried to run it as a Java application.(This is as per directions written in <http://... | 2015/06/15 | [
"https://Stackoverflow.com/questions/30837055",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/783893/"
] | I got help from the developer community in <https://github.com/elastic/elasticsearch/issues/12737> and was able to debug it.
procedure in short would be :
1) Search for the file Elasticsearch.java/ElasticsearchF.java inside the package org.elasticsearch.bootstrap .
2) Right click -> Run Configurations...
3) In the... | Edit your debug/run configurations,put it on the vm arguments:
-Des.path.home=C:\github\elasticsearch\
change the C:\github\elasticsearch\ to your elasticsearch root path
the reason is some arguments in the elasticsearch.bat is missed when you debug/run it in eclipse |
47,115,816 | Description
===========
I have a docker container with this
**nginx.conf**
```
server {
listen 80;
index index.php index.html;
root /var/www/public;
location / {
try_files $uri /index.php?$args;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_... | 2017/11/04 | [
"https://Stackoverflow.com/questions/47115816",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4480164/"
] | All **volumes** and other directory settings ideally point to the same location. In your nginx.conf you have root /var/www/public; but in your yal you use /var/www. That might be you problem.
As for steps to proceed, you can check what directories your service actually uses by using the command the following command a... | start your container with docker exec -it xxxxxx bash
once you do that you will be inside the container. Now check your files if they are at the location you are putting them according to your docker-compose file. |
6,324 | Is it accurate to call the [mapReduce](http://en.wikipedia.org/wiki/MapReduce) framework a type of [bulk synchronous parallel](http://en.wikipedia.org/wiki/Bulk_Synchronous_Parallel) programming framework with no local memory retention within processors between synchronizations? If not, what parallel programming model ... | 2011/04/29 | [
"https://cstheory.stackexchange.com/questions/6324",
"https://cstheory.stackexchange.com",
"https://cstheory.stackexchange.com/users/4590/"
] | In section 2 of <http://arxiv.org/abs/1101.1902>, the authors define a model of MapReduce that is intentionally structured like BSP. They prove simulation theorems as well. May be a good place to start. | Since in MapReduce there is a simple and structured graph underlying the computation, this can IMHO classified as a data-flow model. |
6,324 | Is it accurate to call the [mapReduce](http://en.wikipedia.org/wiki/MapReduce) framework a type of [bulk synchronous parallel](http://en.wikipedia.org/wiki/Bulk_Synchronous_Parallel) programming framework with no local memory retention within processors between synchronizations? If not, what parallel programming model ... | 2011/04/29 | [
"https://cstheory.stackexchange.com/questions/6324",
"https://cstheory.stackexchange.com",
"https://cstheory.stackexchange.com/users/4590/"
] | In section 2 of <http://arxiv.org/abs/1101.1902>, the authors define a model of MapReduce that is intentionally structured like BSP. They prove simulation theorems as well. May be a good place to start. | Yes, my opinion is that classical MapReduce is a BSP model (and therefore has its inherent limitations on the maximum possible parallel performance that can be achieved). However, newer work on MapReduce seems to be focused on looser notions of synchronization, which would take this "generalized MapReduce" out of the s... |
6,324 | Is it accurate to call the [mapReduce](http://en.wikipedia.org/wiki/MapReduce) framework a type of [bulk synchronous parallel](http://en.wikipedia.org/wiki/Bulk_Synchronous_Parallel) programming framework with no local memory retention within processors between synchronizations? If not, what parallel programming model ... | 2011/04/29 | [
"https://cstheory.stackexchange.com/questions/6324",
"https://cstheory.stackexchange.com",
"https://cstheory.stackexchange.com/users/4590/"
] | Yes, my opinion is that classical MapReduce is a BSP model (and therefore has its inherent limitations on the maximum possible parallel performance that can be achieved). However, newer work on MapReduce seems to be focused on looser notions of synchronization, which would take this "generalized MapReduce" out of the s... | Since in MapReduce there is a simple and structured graph underlying the computation, this can IMHO classified as a data-flow model. |
9,815,901 | I recently saw an image of an app that was capable of displaying a view above the status bar and was also able to cover it with a view.
I know you can get a view right below the status bar from a view with align parent top. But how would you get a view on top of the status bar??
[Example](http://tombarrasso.com/wordp... | 2012/03/22 | [
"https://Stackoverflow.com/questions/9815901",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1190019/"
] | The answer by @Sadeshkumar is incorrect for ICS and above (perhaps GB as well).
A view created with `TYPE_SYSTEM_ALERT` and `FLAG_LAYOUT_IN_SCREEN` is covered by the `StatusBar`.
To get an overlay on top of the `StatusBar`, you need to use `TYPE_SYSTEM_OVERLAY` instead of `TYPE_SYSTEM_ALERT`.
The problem being then... | ```
int statusBarHeight = (int) Math.ceil(25 * getResources().getDisplayMetrics().density);
View statusBarView = new View(MyActivity.this);
statusBarView.setBackgroundColor(Color.GREEN);
WindowManager.LayoutParams params = null;
params = new WindowManager.LayoutParams(WindowManager.LayoutParams.FILL_PARENT,s... |
9,815,901 | I recently saw an image of an app that was capable of displaying a view above the status bar and was also able to cover it with a view.
I know you can get a view right below the status bar from a view with align parent top. But how would you get a view on top of the status bar??
[Example](http://tombarrasso.com/wordp... | 2012/03/22 | [
"https://Stackoverflow.com/questions/9815901",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1190019/"
] | A view created with `TYPE_SYSTEM_ERROR` and `FLAG_LAYOUT_IN_SCREEN` is covered by the `StatusBar`. | ```
int statusBarHeight = (int) Math.ceil(25 * getResources().getDisplayMetrics().density);
View statusBarView = new View(MyActivity.this);
statusBarView.setBackgroundColor(Color.GREEN);
WindowManager.LayoutParams params = null;
params = new WindowManager.LayoutParams(WindowManager.LayoutParams.FILL_PARENT,s... |
9,815,901 | I recently saw an image of an app that was capable of displaying a view above the status bar and was also able to cover it with a view.
I know you can get a view right below the status bar from a view with align parent top. But how would you get a view on top of the status bar??
[Example](http://tombarrasso.com/wordp... | 2012/03/22 | [
"https://Stackoverflow.com/questions/9815901",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1190019/"
] | **Disable the System Status Bar - Without Root**
------------------------------------------------
---
After two full days of searching through SO posts and reading the Android docs over and over.. Here is the solution that I came up with. (tested)
```
mView= new TextView(this); ... | ```
int statusBarHeight = (int) Math.ceil(25 * getResources().getDisplayMetrics().density);
View statusBarView = new View(MyActivity.this);
statusBarView.setBackgroundColor(Color.GREEN);
WindowManager.LayoutParams params = null;
params = new WindowManager.LayoutParams(WindowManager.LayoutParams.FILL_PARENT,s... |
9,815,901 | I recently saw an image of an app that was capable of displaying a view above the status bar and was also able to cover it with a view.
I know you can get a view right below the status bar from a view with align parent top. But how would you get a view on top of the status bar??
[Example](http://tombarrasso.com/wordp... | 2012/03/22 | [
"https://Stackoverflow.com/questions/9815901",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1190019/"
] | The answer by @Sadeshkumar is incorrect for ICS and above (perhaps GB as well).
A view created with `TYPE_SYSTEM_ALERT` and `FLAG_LAYOUT_IN_SCREEN` is covered by the `StatusBar`.
To get an overlay on top of the `StatusBar`, you need to use `TYPE_SYSTEM_OVERLAY` instead of `TYPE_SYSTEM_ALERT`.
The problem being then... | A view created with `TYPE_SYSTEM_ERROR` and `FLAG_LAYOUT_IN_SCREEN` is covered by the `StatusBar`. |
9,815,901 | I recently saw an image of an app that was capable of displaying a view above the status bar and was also able to cover it with a view.
I know you can get a view right below the status bar from a view with align parent top. But how would you get a view on top of the status bar??
[Example](http://tombarrasso.com/wordp... | 2012/03/22 | [
"https://Stackoverflow.com/questions/9815901",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1190019/"
] | **Disable the System Status Bar - Without Root**
------------------------------------------------
---
After two full days of searching through SO posts and reading the Android docs over and over.. Here is the solution that I came up with. (tested)
```
mView= new TextView(this); ... | A view created with `TYPE_SYSTEM_ERROR` and `FLAG_LAYOUT_IN_SCREEN` is covered by the `StatusBar`. |
1,079,320 | I am having trouble playing HEVC 1080p file on my system. I don't have a really strong PC, but I will give the facts:
* Ram: 2GB
* OS: Win 7 ultimate
* processor: Pentium(R) Dual-Core T4500 @2.3Ghz
* Graphic Chipset: Intel GMA4500M
I tried the latest version of the said three players to no avail. My players can smoot... | 2016/05/21 | [
"https://superuser.com/questions/1079320",
"https://superuser.com",
"https://superuser.com/users/526065/"
] | You are going to find some slowdown on a machine running Windows 7 with only 2GB of RAM, a Pentium(R) Dual-Core T4500 @2.3Ghz and an Intel GMA4500M when running high-quality, heavily compressed video. The reason you're able to play normal `.mkv` files more smoothly is likely to do with the level of compression. This fr... | I have no problem playing HEVC 720p videos but I have a similar problem when playing H.265 1080p videos.
* Win 7 Home
* 2 GB RAM
* Celeron® Dual-Core CPU T3500 @ 2.1 GHz.
The solution:
Install [HandBrake](https://handbrake.fr/downloads.php). Select your video and convert your HEVC video to H.264
The solution work... |
1,079,320 | I am having trouble playing HEVC 1080p file on my system. I don't have a really strong PC, but I will give the facts:
* Ram: 2GB
* OS: Win 7 ultimate
* processor: Pentium(R) Dual-Core T4500 @2.3Ghz
* Graphic Chipset: Intel GMA4500M
I tried the latest version of the said three players to no avail. My players can smoot... | 2016/05/21 | [
"https://superuser.com/questions/1079320",
"https://superuser.com",
"https://superuser.com/users/526065/"
] | You are going to find some slowdown on a machine running Windows 7 with only 2GB of RAM, a Pentium(R) Dual-Core T4500 @2.3Ghz and an Intel GMA4500M when running high-quality, heavily compressed video. The reason you're able to play normal `.mkv` files more smoothly is likely to do with the level of compression. This fr... | I have also same issue so for the workaround
i install [KM Player](http://filehippo.com/download_kmplayer/) and it works fine |
1,079,320 | I am having trouble playing HEVC 1080p file on my system. I don't have a really strong PC, but I will give the facts:
* Ram: 2GB
* OS: Win 7 ultimate
* processor: Pentium(R) Dual-Core T4500 @2.3Ghz
* Graphic Chipset: Intel GMA4500M
I tried the latest version of the said three players to no avail. My players can smoot... | 2016/05/21 | [
"https://superuser.com/questions/1079320",
"https://superuser.com",
"https://superuser.com/users/526065/"
] | You are going to find some slowdown on a machine running Windows 7 with only 2GB of RAM, a Pentium(R) Dual-Core T4500 @2.3Ghz and an Intel GMA4500M when running high-quality, heavily compressed video. The reason you're able to play normal `.mkv` files more smoothly is likely to do with the level of compression. This fr... | try CCCP with their media player.
<http://www.cccp-project.net/>
When setting up the settings, go to video codec-> hardware decoding -> directx(native)-> check hevc and uhd-> apply.
works fine with me. |
1,079,320 | I am having trouble playing HEVC 1080p file on my system. I don't have a really strong PC, but I will give the facts:
* Ram: 2GB
* OS: Win 7 ultimate
* processor: Pentium(R) Dual-Core T4500 @2.3Ghz
* Graphic Chipset: Intel GMA4500M
I tried the latest version of the said three players to no avail. My players can smoot... | 2016/05/21 | [
"https://superuser.com/questions/1079320",
"https://superuser.com",
"https://superuser.com/users/526065/"
] | I have no problem playing HEVC 720p videos but I have a similar problem when playing H.265 1080p videos.
* Win 7 Home
* 2 GB RAM
* Celeron® Dual-Core CPU T3500 @ 2.1 GHz.
The solution:
Install [HandBrake](https://handbrake.fr/downloads.php). Select your video and convert your HEVC video to H.264
The solution work... | I have also same issue so for the workaround
i install [KM Player](http://filehippo.com/download_kmplayer/) and it works fine |
1,079,320 | I am having trouble playing HEVC 1080p file on my system. I don't have a really strong PC, but I will give the facts:
* Ram: 2GB
* OS: Win 7 ultimate
* processor: Pentium(R) Dual-Core T4500 @2.3Ghz
* Graphic Chipset: Intel GMA4500M
I tried the latest version of the said three players to no avail. My players can smoot... | 2016/05/21 | [
"https://superuser.com/questions/1079320",
"https://superuser.com",
"https://superuser.com/users/526065/"
] | Firstly install [Windows 10](https://www.microsoft.com/en-in/software-download/windows10) instead of using outdated Windows 7. If you don't want to buy use [this](https://www.wikihow.com/Turn-Off-Windows-Activation).
Install *CNX player* and [HEVC video extension](https://www.microsoft.com/en-us/store/p/hevc-video-ext... | I have no problem playing HEVC 720p videos but I have a similar problem when playing H.265 1080p videos.
* Win 7 Home
* 2 GB RAM
* Celeron® Dual-Core CPU T3500 @ 2.1 GHz.
The solution:
Install [HandBrake](https://handbrake.fr/downloads.php). Select your video and convert your HEVC video to H.264
The solution work... |
1,079,320 | I am having trouble playing HEVC 1080p file on my system. I don't have a really strong PC, but I will give the facts:
* Ram: 2GB
* OS: Win 7 ultimate
* processor: Pentium(R) Dual-Core T4500 @2.3Ghz
* Graphic Chipset: Intel GMA4500M
I tried the latest version of the said three players to no avail. My players can smoot... | 2016/05/21 | [
"https://superuser.com/questions/1079320",
"https://superuser.com",
"https://superuser.com/users/526065/"
] | I have no problem playing HEVC 720p videos but I have a similar problem when playing H.265 1080p videos.
* Win 7 Home
* 2 GB RAM
* Celeron® Dual-Core CPU T3500 @ 2.1 GHz.
The solution:
Install [HandBrake](https://handbrake.fr/downloads.php). Select your video and convert your HEVC video to H.264
The solution work... | try CCCP with their media player.
<http://www.cccp-project.net/>
When setting up the settings, go to video codec-> hardware decoding -> directx(native)-> check hevc and uhd-> apply.
works fine with me. |
1,079,320 | I am having trouble playing HEVC 1080p file on my system. I don't have a really strong PC, but I will give the facts:
* Ram: 2GB
* OS: Win 7 ultimate
* processor: Pentium(R) Dual-Core T4500 @2.3Ghz
* Graphic Chipset: Intel GMA4500M
I tried the latest version of the said three players to no avail. My players can smoot... | 2016/05/21 | [
"https://superuser.com/questions/1079320",
"https://superuser.com",
"https://superuser.com/users/526065/"
] | Firstly install [Windows 10](https://www.microsoft.com/en-in/software-download/windows10) instead of using outdated Windows 7. If you don't want to buy use [this](https://www.wikihow.com/Turn-Off-Windows-Activation).
Install *CNX player* and [HEVC video extension](https://www.microsoft.com/en-us/store/p/hevc-video-ext... | I have also same issue so for the workaround
i install [KM Player](http://filehippo.com/download_kmplayer/) and it works fine |
1,079,320 | I am having trouble playing HEVC 1080p file on my system. I don't have a really strong PC, but I will give the facts:
* Ram: 2GB
* OS: Win 7 ultimate
* processor: Pentium(R) Dual-Core T4500 @2.3Ghz
* Graphic Chipset: Intel GMA4500M
I tried the latest version of the said three players to no avail. My players can smoot... | 2016/05/21 | [
"https://superuser.com/questions/1079320",
"https://superuser.com",
"https://superuser.com/users/526065/"
] | Firstly install [Windows 10](https://www.microsoft.com/en-in/software-download/windows10) instead of using outdated Windows 7. If you don't want to buy use [this](https://www.wikihow.com/Turn-Off-Windows-Activation).
Install *CNX player* and [HEVC video extension](https://www.microsoft.com/en-us/store/p/hevc-video-ext... | try CCCP with their media player.
<http://www.cccp-project.net/>
When setting up the settings, go to video codec-> hardware decoding -> directx(native)-> check hevc and uhd-> apply.
works fine with me. |
117,590 | Ubuntu 9.10 USB Pendrive everything works good even after `sudo apt-get update` and I try to `sudo apt-get install dsniff` and I get the following message:
```
ubuntu@ubuntu:~$ sudo apt-get install dsniff
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find p... | 2012/03/31 | [
"https://askubuntu.com/questions/117590",
"https://askubuntu.com",
"https://askubuntu.com/users/52828/"
] | The reason why you can't find the package you want is because 9.10 has reached its end of life and its repository has been removed - actually its been moved.
You can follow the instructions provided in this question and answer for installing `dsniff` for 9.10.
* [Installing software on an old Ubuntu version that's n... | Try to install dsniff from a deb package.
<http://packages.debian.org/search?keywords=dsniff> |
3,942,496 | $F$ is CDF (probability distribution function)
$\int \_{\mathbb{R}}[F(x+c) - F(x)] dx $
$= \int \_{\mathbb{R}}F(x+c) dx -\int \_{\mathbb{R}} F(x) dx$ ( **(by linearity of the integral)**
$=\int \_{\mathbb{R}}F(x) dx -\int \_{\mathbb{R}}F(x) dx $ **( By change of variables theorem )**
$=0$
For change of variables w... | 2020/12/10 | [
"https://math.stackexchange.com/questions/3942496",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/709039/"
] | 1. When the function is rational, *the standard procedure* is to start with finding its *expansion into partial fractions*. In the present case, you get $$f(z)=\dfrac{1}{z(z-1)}=\dfrac{1}{z-1}-\dfrac{1}{z}.$$ Hence, making use of *your substitution* $w=z-1$ (or $z=1+w$), we obtain
\begin{align}
\dfrac{1}{z-1}-\dfrac... | It is not clear for what you are using $w = z-1$ and the link between $f(z)$ and the remainder of your argument is unclear. However, you have nearly got the right answer.
Instead, you could justify the result by writing,
\begin{align}
f(z) &= \frac{1}{z(z-1)} \\
&= \frac{1}{(z-1)^2(1+\frac{1}{z-1})}
\end{align}
and wh... |
3,009,452 | Let $f\_n(x)$, for all n>=1, be a sequence of non-negative continuous functions on [0,1] such that
$$\lim\_{n→\infty}\int^1\_0 f\_n (x)dx=0$$
Which of the following is always correct ?
A. $f\_n→0$ uniformly on $[0,1]$
B. $f\_n$ may not converge uniformly but converges to $0$ pointwise
C. $f\_n$ will converge poi... | 2018/11/22 | [
"https://math.stackexchange.com/questions/3009452",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/517603/"
] | A. You could also consider $f\_n(x) = x^n.$
B. Let $f\_n$ be the line-segment graph connecting the points $(0,1), (1/n,0), (1,0).$ This sequence does not converge to $0$ at $x=0.$
C. Let $f\_n$ be as in B. Then consider the sequence $f\_1,0,f\_2,0,f\_3,0,\dots.$ At $x=0,$ this sequence is $1,0,1,0,\dots.$
D. See C. | >
> I can find example where **all four** statements are true ...
>
>
>
All four?
It seems that the statements are worded in a way that (independent of the rest of the question) **exactly** one of the four statements must be true.
>
> ... but can't find any counterexample.
>
>
>
I even found an example for ... |
3,009,452 | Let $f\_n(x)$, for all n>=1, be a sequence of non-negative continuous functions on [0,1] such that
$$\lim\_{n→\infty}\int^1\_0 f\_n (x)dx=0$$
Which of the following is always correct ?
A. $f\_n→0$ uniformly on $[0,1]$
B. $f\_n$ may not converge uniformly but converges to $0$ pointwise
C. $f\_n$ will converge poi... | 2018/11/22 | [
"https://math.stackexchange.com/questions/3009452",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/517603/"
] | Expanding on the comment I made.
**Hint:** Think of placing the peak of your isosceles triangle alternating between two (or maybe infinitely many) pre-determined points.
**Solution:** A more elaborate construction of isosceles triangles suffice to build a sequence of $f\_n$ that does not converge. Each $f\_n$ can be ... | >
> I can find example where **all four** statements are true ...
>
>
>
All four?
It seems that the statements are worded in a way that (independent of the rest of the question) **exactly** one of the four statements must be true.
>
> ... but can't find any counterexample.
>
>
>
I even found an example for ... |
30,672,355 | I have the following html
```html
<ul id="report">
<li class="suite">
<h1>Level 2</h1>
<ul>
<li class="test pass fast">
<h2>it first</h2>
<pre style="display: none;">
<code>('hello').should.be.a('string');</code>
</pre>
</li>
</ul>
</li>
</ul>
```
I want ... | 2015/06/05 | [
"https://Stackoverflow.com/questions/30672355",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4966168/"
] | Will work for any H2 element inside `ul#report`
```
var main_ul = document.querySelector("#report");
main_ul.onclick = function(event){
var elm = event.target;
if(elm.tagName === "H2"){
var pre = elm.nextElementSibling; // tada magic!
changeStyle(pre);
}
};
``` | You can make use of `getElementsByTagName` like this:
```js
var flag = 0
document.getElementsByTagName('h2')[0].onclick = function() {
if (flag == 1) {
document.getElementsByTagName('pre')[0].style.display = "none";
flag = 0;
} else {
document.getElementsByTagName('pre')[0].style.display = "block... |
30,672,355 | I have the following html
```html
<ul id="report">
<li class="suite">
<h1>Level 2</h1>
<ul>
<li class="test pass fast">
<h2>it first</h2>
<pre style="display: none;">
<code>('hello').should.be.a('string');</code>
</pre>
</li>
</ul>
</li>
</ul>
```
I want ... | 2015/06/05 | [
"https://Stackoverflow.com/questions/30672355",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4966168/"
] | If you want to make sure you're getting the sibling `pre` element, just do this (see the [jsfiddle](http://jsfiddle.net/t89vb06h/1)):
```
document.getElementsByTagName('h2')[0].addEventListener('click', function(e) {
var pre = e.target.nextElementSibling;
pre.style.display = pre.style.display === 'block' ? 'n... | You can make use of `getElementsByTagName` like this:
```js
var flag = 0
document.getElementsByTagName('h2')[0].onclick = function() {
if (flag == 1) {
document.getElementsByTagName('pre')[0].style.display = "none";
flag = 0;
} else {
document.getElementsByTagName('pre')[0].style.display = "block... |
30,672,355 | I have the following html
```html
<ul id="report">
<li class="suite">
<h1>Level 2</h1>
<ul>
<li class="test pass fast">
<h2>it first</h2>
<pre style="display: none;">
<code>('hello').should.be.a('string');</code>
</pre>
</li>
</ul>
</li>
</ul>
```
I want ... | 2015/06/05 | [
"https://Stackoverflow.com/questions/30672355",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4966168/"
] | Will work for any H2 element inside `ul#report`
```
var main_ul = document.querySelector("#report");
main_ul.onclick = function(event){
var elm = event.target;
if(elm.tagName === "H2"){
var pre = elm.nextElementSibling; // tada magic!
changeStyle(pre);
}
};
``` | You can do something like this
```
var report = document.getElementById("report"); // <--- get the parent
var h2 = report.getElementsByTagName('h2')[0]; // <--- search for h2 within parent
var pre = report.getElementsByTagName('pre')[0];// <--- search for pre within parent
h2.addEventListener('click', function(){ ... |
30,672,355 | I have the following html
```html
<ul id="report">
<li class="suite">
<h1>Level 2</h1>
<ul>
<li class="test pass fast">
<h2>it first</h2>
<pre style="display: none;">
<code>('hello').should.be.a('string');</code>
</pre>
</li>
</ul>
</li>
</ul>
```
I want ... | 2015/06/05 | [
"https://Stackoverflow.com/questions/30672355",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4966168/"
] | If you want to make sure you're getting the sibling `pre` element, just do this (see the [jsfiddle](http://jsfiddle.net/t89vb06h/1)):
```
document.getElementsByTagName('h2')[0].addEventListener('click', function(e) {
var pre = e.target.nextElementSibling;
pre.style.display = pre.style.display === 'block' ? 'n... | You can do something like this
```
var report = document.getElementById("report"); // <--- get the parent
var h2 = report.getElementsByTagName('h2')[0]; // <--- search for h2 within parent
var pre = report.getElementsByTagName('pre')[0];// <--- search for pre within parent
h2.addEventListener('click', function(){ ... |
30,672,355 | I have the following html
```html
<ul id="report">
<li class="suite">
<h1>Level 2</h1>
<ul>
<li class="test pass fast">
<h2>it first</h2>
<pre style="display: none;">
<code>('hello').should.be.a('string');</code>
</pre>
</li>
</ul>
</li>
</ul>
```
I want ... | 2015/06/05 | [
"https://Stackoverflow.com/questions/30672355",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4966168/"
] | If you want to make sure you're getting the sibling `pre` element, just do this (see the [jsfiddle](http://jsfiddle.net/t89vb06h/1)):
```
document.getElementsByTagName('h2')[0].addEventListener('click', function(e) {
var pre = e.target.nextElementSibling;
pre.style.display = pre.style.display === 'block' ? 'n... | Will work for any H2 element inside `ul#report`
```
var main_ul = document.querySelector("#report");
main_ul.onclick = function(event){
var elm = event.target;
if(elm.tagName === "H2"){
var pre = elm.nextElementSibling; // tada magic!
changeStyle(pre);
}
};
``` |
387,079 | I am a PhD student in algebraic topology, and I would like to learn something about **group cohomology**.
The final goal would be to present one or two seminars on this topic, in order to give my mates a gently introduction to this subject and at the same time showing them some striking result/application of this theo... | 2021/03/21 | [
"https://mathoverflow.net/questions/387079",
"https://mathoverflow.net",
"https://mathoverflow.net/users/169319/"
] | Brown: *Lectures on the cohomology of groups*.
Adem: *Lectures on the cohomology of finite groups.*
Carlson: *The cohomology of groups* (from Handbook of Algebra, Vol.1, 1996).
Rotman: *Homology of groups* (chapter 9 from one of his algebra books that I forget the name). | Chapter 2 of [these notes](https://www.jmilne.org/math/CourseNotes/cft.html) by Milne have been helpful to me. |
5,817,179 | Why doesn't the `Map` interface in Java have a `removeAll(Collection<?> c)` method to remove keys, like it has `map.remove(Object)`?
I know I can always do `map.keySet().removeAll(..)` .. but is this a reason that `Map` doesn't have `removeAll()` and encourages us to go with `map.keySet().removeAll(..)` ? | 2011/04/28 | [
"https://Stackoverflow.com/questions/5817179",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/617612/"
] | The philosophy behind the collections APIs is to be as small and simple as possible. The Collection views on Map allow you to perform this operation already, so there is no need for an extra method.
The [keySet](http://download.oracle.com/javase/6/docs/api/java/util/Map.html#keySet%28%29) method returns a *view* of th... | Because Map is not Collection, not extends Collection interface. Maps implementations USE collection interface to provide they own functionallity.
Think about situation like this:
* you have Map with removeAll(..) method.
* vou call this method and map removes...
* so what they should remove? Keys, values or pairs - ... |
65,577,358 | Currently, I can only use `jpeg` & `png` exports like:
```js
stageRef.current?.getStage().toDataURL({ mimeType: 'image/jpeg', quality: 1 })
stageRef.current?.getStage().toDataURL({ mimeType: 'image/png', quality: 1 })
```
I want to export Canvas to `svg` as well as `pdf` like [Figma](https://figma.com) does it.
I f... | 2021/01/05 | [
"https://Stackoverflow.com/questions/65577358",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6141587/"
] | `stage.toDataURL()` is using [canvas.toDataURL() API](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toDataURL) to do the export. Most of the browsers support only `jpg` and `png` formats.
For SVG or PDF exports you have to write your own implementation.
For PDF exports you may use external librar... | `toDataUrl()` exports a bitmap, rather than a vector.
You can generate an svg by using the canvas2svg package.
You can set your Layer's context equal to a c2s instance, rendering it, and resetting your Layer's ref to what it was previously, as shown [here](https://stackoverflow.com/questions/70841507/react-konva-cust... |
31,057,012 | I have a camera app where I am trying to limit the capture length to **exactly** 15 seconds.
I have tried two different approaches, and neither of them are working to my satisfaction.
The first approach is to fire a repeating timer every second:
```
self.timer = [NSTimer scheduledTimerWithTimeInterval:1 target:self ... | 2015/06/25 | [
"https://Stackoverflow.com/questions/31057012",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1226095/"
] | NSTimer is not guaranteed to fire when you want it to, just after you want it to fire:
From Apple's docs:
>
> A timer is not a real-time mechanism; it fires only when one of the run loop modes to which the timer has been added is running and able to check if the timer’s firing time has passed. Because of the various... | Thanks to Paul and Linuxious for their comments and answers... and Rory for thinking outside the box (intriguing option).
And yes, in the end it is clear that NSTimer isn't sufficient by itself for this.
In the end, I listen for the captureOutput delegate method to fire, test for the length of the asset, and trim the... |
56,657,176 | I've spent a better part of a day trying to figure out the correct JSON body and arguments to update an OU; I'm actually trying to rename an OU. I'm close but in any case, the solution has so far escaped me.
I've referenced these docs so far:
* <https://developers.google.com/admin-sdk/directory/v1/reference/orgunits... | 2019/06/18 | [
"https://Stackoverflow.com/questions/56657176",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8508242/"
] | If you use the `patch` endpoint you only need to pass in the fields you want to change:
```
AdminDirectory.Orgunits.patch({
name: 'New Name'
}, customerId, ouIdOrPath);
``` | It worked for me. Do not pass the Unit Path org as it is automatically adjusted by the api based on the "name" field
```
var orgUnit = new OrgUnit()
{
Name = "new name",
Description = "new description"
};
var request = service.Orgunits.Patch(orgUnit, customerId, orgUnitPath);
request.Execute();
``` |
117,093 | Suppose we have a convex lens for a middle school physics experiment, a screen, and an object being imaged, under what state will we find the hyperfocal state?
The screen is the imaged screen. It can be a movie screen or a white piece of paper.
The lens can be imaged on the screen. In hyperfocal distance, what is the... | 2020/05/20 | [
"https://photo.stackexchange.com/questions/117093",
"https://photo.stackexchange.com",
"https://photo.stackexchange.com/users/91249/"
] | "Hyperfocal" refers to the condition where depth of field allows the lens to be "in focus" from some minimum distance to infinity.
This depends on a core assumption: the size of the acceptable "circle of confusion," which is determined by the actual aperture diameter and lens focal length, but also by the amount of en... | Your question seems to be based upon an assumption that a human viewer can see the difference between "blurry" and "in focus" at the system limits of a lens system. This is usually far from the case without magnifying the results by a large factor.
>
> Can we use the imaging of the convex lens on the screen to explai... |
170,636 | Is it possible to make a report which would show the assignees of a bunch of Permission Sets ? I'm guessing the only way to do it would be to build a report based upon the PermissionSetAssignment object, but I don't think that's possible.
So is my only option Workbench? | 2017/04/19 | [
"https://salesforce.stackexchange.com/questions/170636",
"https://salesforce.stackexchange.com",
"https://salesforce.stackexchange.com/users/2550/"
] | No, it's obviously not your *only* option. It might be the simplest/most feasible, though.
That said, it wouldn't be incredibly complicated to run a script to email a CSV to yourself. Here's a simple POC:
```
List<String> rows = new List<String> { 'Username,PermissionSet.Name' };
for (PermissionSetAssignment assignme... | If you are on Windows, you should take a look at the power query plugin for excel.
You can dump a filtered set of permissionSetAssignment records to one table, the user object to another table, and do some simple vlookups to get the info you are after.
One click to refresh the data. |
170,636 | Is it possible to make a report which would show the assignees of a bunch of Permission Sets ? I'm guessing the only way to do it would be to build a report based upon the PermissionSetAssignment object, but I don't think that's possible.
So is my only option Workbench? | 2017/04/19 | [
"https://salesforce.stackexchange.com/questions/170636",
"https://salesforce.stackexchange.com",
"https://salesforce.stackexchange.com/users/2550/"
] | No, it's obviously not your *only* option. It might be the simplest/most feasible, though.
That said, it wouldn't be incredibly complicated to run a script to email a CSV to yourself. Here's a simple POC:
```
List<String> rows = new List<String> { 'Username,PermissionSet.Name' };
for (PermissionSetAssignment assignme... | When I run this in Developer Console "Execute Anonymous", I get an error, which is fixed if I just add 1 more line before the last sendEmail() line:
The last 3 lines need to be:
```
email.setFileAttachments(attachments);
email.saveAsActivity=false; //<----- this line is missing in the code above
Messaging.sendEmail(n... |
170,636 | Is it possible to make a report which would show the assignees of a bunch of Permission Sets ? I'm guessing the only way to do it would be to build a report based upon the PermissionSetAssignment object, but I don't think that's possible.
So is my only option Workbench? | 2017/04/19 | [
"https://salesforce.stackexchange.com/questions/170636",
"https://salesforce.stackexchange.com",
"https://salesforce.stackexchange.com/users/2550/"
] | If you are on Windows, you should take a look at the power query plugin for excel.
You can dump a filtered set of permissionSetAssignment records to one table, the user object to another table, and do some simple vlookups to get the info you are after.
One click to refresh the data. | When I run this in Developer Console "Execute Anonymous", I get an error, which is fixed if I just add 1 more line before the last sendEmail() line:
The last 3 lines need to be:
```
email.setFileAttachments(attachments);
email.saveAsActivity=false; //<----- this line is missing in the code above
Messaging.sendEmail(n... |
582,616 | I am working on a surge protection circuit. My schematic is shown below.
In this design, I used 3 poles GDT 350V DC spark ([this one](https://www.digikey.com/en/products/detail/bourns-inc/2026-35-C2LF/1220301?s=N4IgTCBcDa4AxgGwFoDMBWZBhMAZAYiALoC%2BQA)) over at the beginning, followed by some varistors (V1, V2, V3, V4... | 2021/08/22 | [
"https://electronics.stackexchange.com/questions/582616",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/242736/"
] | For comparison you can [see](https://www.littelfuse.com/%7E/media/electronics/datasheets/gas_discharge_tubes/littelfuse_gdt_ac_cg3_datasheet.pdf.pdf) that a GDT for 240VAC mains has a rated DC breakdown voltage of 600VDC, compared to your's 350VDC. The same also applies to all of your varistors, they should have a brea... | At 400V input a 350V GDT would turn on and short out the fuses. If I remember right the GDT should be at a much higher voltage (check the regulatory requirements for your product like IEC61010) |
26,113 | A couple days ago I booted up Left 4 Dead, but then heard a pop and my computer turned off. It smelled like dead electronics so I unplugged the computer. I figured it was a power supply failure, so I ordered a new Corsair HX520 and tried to install it today, hoping that was the only thing that needed replacing.
Howeve... | 2009/08/20 | [
"https://superuser.com/questions/26113",
"https://superuser.com",
"https://superuser.com/users/5206/"
] | The fans dying does not necessarily mean that the CPU and GPU are dead. It looks like either the CPU or Motherboard is fried, but unfortunately unless you can see visible damage (burnt wires, blown capacitors, etc.) you are pretty much going to have to test each component individually. Have a buddy with a similar syste... | Sounds like your motherboard went. Are you sure the pop was from the power supply and not a cap on the motherboard? |
26,113 | A couple days ago I booted up Left 4 Dead, but then heard a pop and my computer turned off. It smelled like dead electronics so I unplugged the computer. I figured it was a power supply failure, so I ordered a new Corsair HX520 and tried to install it today, hoping that was the only thing that needed replacing.
Howeve... | 2009/08/20 | [
"https://superuser.com/questions/26113",
"https://superuser.com",
"https://superuser.com/users/5206/"
] | If you have another computer or a friend's, you could test the Video card on it.
But looks like your motherboard is dead though. | Sounds like your motherboard went. Are you sure the pop was from the power supply and not a cap on the motherboard? |
26,113 | A couple days ago I booted up Left 4 Dead, but then heard a pop and my computer turned off. It smelled like dead electronics so I unplugged the computer. I figured it was a power supply failure, so I ordered a new Corsair HX520 and tried to install it today, hoping that was the only thing that needed replacing.
Howeve... | 2009/08/20 | [
"https://superuser.com/questions/26113",
"https://superuser.com",
"https://superuser.com/users/5206/"
] | Final outcome: PSU, system drive, motherboard, CPU and GPU were all dead. The memory survived, and a tech at Fry's repair department said that if you don't see burn marks on memory, it probably is fine and can withstand power surges.
Also if you try a fried CPU in a perfectly good motherboard, *it can kill the motherb... | Sounds like your motherboard went. Are you sure the pop was from the power supply and not a cap on the motherboard? |
26,113 | A couple days ago I booted up Left 4 Dead, but then heard a pop and my computer turned off. It smelled like dead electronics so I unplugged the computer. I figured it was a power supply failure, so I ordered a new Corsair HX520 and tried to install it today, hoping that was the only thing that needed replacing.
Howeve... | 2009/08/20 | [
"https://superuser.com/questions/26113",
"https://superuser.com",
"https://superuser.com/users/5206/"
] | I have the same problem .Because of a power surge from the power supply my GIGABYTE motherboard fried with no sign of burn or capacitor leaking,but fortunately my CPU and RAM are working good.I bought a new power supply and ASUS motherboard and they work efficiently with the survived components. | Sounds like your motherboard went. Are you sure the pop was from the power supply and not a cap on the motherboard? |
26,113 | A couple days ago I booted up Left 4 Dead, but then heard a pop and my computer turned off. It smelled like dead electronics so I unplugged the computer. I figured it was a power supply failure, so I ordered a new Corsair HX520 and tried to install it today, hoping that was the only thing that needed replacing.
Howeve... | 2009/08/20 | [
"https://superuser.com/questions/26113",
"https://superuser.com",
"https://superuser.com/users/5206/"
] | Final outcome: PSU, system drive, motherboard, CPU and GPU were all dead. The memory survived, and a tech at Fry's repair department said that if you don't see burn marks on memory, it probably is fine and can withstand power surges.
Also if you try a fried CPU in a perfectly good motherboard, *it can kill the motherb... | The fans dying does not necessarily mean that the CPU and GPU are dead. It looks like either the CPU or Motherboard is fried, but unfortunately unless you can see visible damage (burnt wires, blown capacitors, etc.) you are pretty much going to have to test each component individually. Have a buddy with a similar syste... |
26,113 | A couple days ago I booted up Left 4 Dead, but then heard a pop and my computer turned off. It smelled like dead electronics so I unplugged the computer. I figured it was a power supply failure, so I ordered a new Corsair HX520 and tried to install it today, hoping that was the only thing that needed replacing.
Howeve... | 2009/08/20 | [
"https://superuser.com/questions/26113",
"https://superuser.com",
"https://superuser.com/users/5206/"
] | Final outcome: PSU, system drive, motherboard, CPU and GPU were all dead. The memory survived, and a tech at Fry's repair department said that if you don't see burn marks on memory, it probably is fine and can withstand power surges.
Also if you try a fried CPU in a perfectly good motherboard, *it can kill the motherb... | If you have another computer or a friend's, you could test the Video card on it.
But looks like your motherboard is dead though. |
26,113 | A couple days ago I booted up Left 4 Dead, but then heard a pop and my computer turned off. It smelled like dead electronics so I unplugged the computer. I figured it was a power supply failure, so I ordered a new Corsair HX520 and tried to install it today, hoping that was the only thing that needed replacing.
Howeve... | 2009/08/20 | [
"https://superuser.com/questions/26113",
"https://superuser.com",
"https://superuser.com/users/5206/"
] | Final outcome: PSU, system drive, motherboard, CPU and GPU were all dead. The memory survived, and a tech at Fry's repair department said that if you don't see burn marks on memory, it probably is fine and can withstand power surges.
Also if you try a fried CPU in a perfectly good motherboard, *it can kill the motherb... | I have the same problem .Because of a power surge from the power supply my GIGABYTE motherboard fried with no sign of burn or capacitor leaking,but fortunately my CPU and RAM are working good.I bought a new power supply and ASUS motherboard and they work efficiently with the survived components. |
169,680 | I am trying to recreate this device [**from**](http://www.google.com/patents/US6899667):


The housing 14 is shown with a control panel 16 for purposes of illustration. In one embodiment of this invention, the... | 2015/05/08 | [
"https://electronics.stackexchange.com/questions/169680",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/76095/"
] | >
> I've searched the internet to answer this but get confused with all the math. Could someone recommend the proper npn transistor chip to use for this and the values of resistors R4,R5,R6? Trying to get an output of 12v - 1amp dc pulse to the coil.
>
>
>
Q1 can be almost any small NPN bipolar transistor.You MAY ... | >
> as in fig. 2 if I put the 5 volt pulse to the base of NPN bipolar junction transistor Q1, and supply the collector with 12 volts - 1 amp, can I expect the output transistor to bring the dc pulse to 12 volts - 1 amp? Is this how the amplifier works?
>
>
>
Yes. Feed the 5V DC pulse directly to resistor R4. |
73,812,056 | **Scenario 1**
I have the following code I am trying to mock the function `setup_logger()` but if the logger is declared outside the function I am getting an error.
The source file `my_source.py:`
```
from pda.utils.logging import setup_logger
logger = setup_logger()
def some_method():
some_code
```
The test f... | 2022/09/22 | [
"https://Stackoverflow.com/questions/73812056",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2910567/"
] | As you have lists, you cannot vectorize the operation.
A list comprehension might be the fastest:
```
from itertools import chain
df['out'] = [list(chain.from_iterable(x[1:])) for x in df.itertuples()]
```
Example:
```
A B C out
0 [a, b, c] [1, 4, a] [x, y] ... | As an alternative to @mozway 's answer, you could try something like this:
```
df = pd.DataFrame({'A': [['a', 'b', 'c'], ['e', 'f', 'g','g']], 'B' : [['1', '4', 'a'], ['5', 'a']]})
df['C'] = df.sum(axis=1).astype(str)
```
use 'astype' as required for list contents |
73,812,056 | **Scenario 1**
I have the following code I am trying to mock the function `setup_logger()` but if the logger is declared outside the function I am getting an error.
The source file `my_source.py:`
```
from pda.utils.logging import setup_logger
logger = setup_logger()
def some_method():
some_code
```
The test f... | 2022/09/22 | [
"https://Stackoverflow.com/questions/73812056",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2910567/"
] | As you have lists, you cannot vectorize the operation.
A list comprehension might be the fastest:
```
from itertools import chain
df['out'] = [list(chain.from_iterable(x[1:])) for x in df.itertuples()]
```
Example:
```
A B C out
0 [a, b, c] [1, 4, a] [x, y] ... | you can use the apply method
```
df['C']=df.apply(lambda x: [' '.join(i) for i in list(x[df.columns.to_list()])], axis=1)
``` |
73,812,056 | **Scenario 1**
I have the following code I am trying to mock the function `setup_logger()` but if the logger is declared outside the function I am getting an error.
The source file `my_source.py:`
```
from pda.utils.logging import setup_logger
logger = setup_logger()
def some_method():
some_code
```
The test f... | 2022/09/22 | [
"https://Stackoverflow.com/questions/73812056",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2910567/"
] | As an alternative to @mozway 's answer, you could try something like this:
```
df = pd.DataFrame({'A': [['a', 'b', 'c'], ['e', 'f', 'g','g']], 'B' : [['1', '4', 'a'], ['5', 'a']]})
df['C'] = df.sum(axis=1).astype(str)
```
use 'astype' as required for list contents | you can use the apply method
```
df['C']=df.apply(lambda x: [' '.join(i) for i in list(x[df.columns.to_list()])], axis=1)
``` |
2,978,684 | Which configuration management tool is the best for FPGA designs, specifically Xilinx FPGA's programmed with VHDL and C for the embedded (microblaze) software? | 2010/06/05 | [
"https://Stackoverflow.com/questions/2978684",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/358966/"
] | There isn't a "best", but configuration control solutions that work for software will be OK for FPGAs - the flow is very similar. I use Subversion at work and git at home, and [wrote a little on 'why' at my blog](http://parallelpoints.com/node/70).
In other answers, binary files keep getting mentioned - the only binar... | I suggest CM tools that support version labeling and binary files. Most Software CM applications are fine with ASCII text files. They may just store a "difference" file rather than the entire file for updates.
My recommendations: PVCS, ClearCase and Subversion. DO NOT USE Microsoft SourceSafe. I don't like it because... |
2,978,684 | Which configuration management tool is the best for FPGA designs, specifically Xilinx FPGA's programmed with VHDL and C for the embedded (microblaze) software? | 2010/06/05 | [
"https://Stackoverflow.com/questions/2978684",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/358966/"
] | There isn't a "best", but configuration control solutions that work for software will be OK for FPGAs - the flow is very similar. I use Subversion at work and git at home, and [wrote a little on 'why' at my blog](http://parallelpoints.com/node/70).
In other answers, binary files keep getting mentioned - the only binar... | We use Perforce, and its great. You can have your code that lives in Linux-land checked in side-by-side with your Specs and Docs that live in Windows-land. And you get branching, labels, etc.
I've seen everything from Clearcase to RCS used, and it is really all okay for this kind of thing. The important thing is to ge... |
2,978,684 | Which configuration management tool is the best for FPGA designs, specifically Xilinx FPGA's programmed with VHDL and C for the embedded (microblaze) software? | 2010/06/05 | [
"https://Stackoverflow.com/questions/2978684",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/358966/"
] | I don't think it much matters what revision control tool you use -- anything that you would consider good in general will probably be OK here. I personally use Git for a sizable Verilog + software project, and I'm quite happy with it.
What will bite you in the ass -- no matter what version control you use -- is this: ... | I've seen Perforce and Subversion used in a couple of FPGA-intensive companies. |
2,978,684 | Which configuration management tool is the best for FPGA designs, specifically Xilinx FPGA's programmed with VHDL and C for the embedded (microblaze) software? | 2010/06/05 | [
"https://Stackoverflow.com/questions/2978684",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/358966/"
] | I don't think it much matters what revision control tool you use -- anything that you would consider good in general will probably be OK here. I personally use Git for a sizable Verilog + software project, and I'm quite happy with it.
What will bite you in the ass -- no matter what version control you use -- is this: ... | Previously I used Subversion but have switched to git two years ago. Git handles FPGA design files just as well as it handles every other text and binary file. Git is all you need for version controlling your files and artifacts.
For building the designs, I recommend just using a single ISE project called "ise" (livin... |
2,978,684 | Which configuration management tool is the best for FPGA designs, specifically Xilinx FPGA's programmed with VHDL and C for the embedded (microblaze) software? | 2010/06/05 | [
"https://Stackoverflow.com/questions/2978684",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/358966/"
] | I don't think it much matters what revision control tool you use -- anything that you would consider good in general will probably be OK here. I personally use Git for a sizable Verilog + software project, and I'm quite happy with it.
What will bite you in the ass -- no matter what version control you use -- is this: ... | We use Perforce, and its great. You can have your code that lives in Linux-land checked in side-by-side with your Specs and Docs that live in Windows-land. And you get branching, labels, etc.
I've seen everything from Clearcase to RCS used, and it is really all okay for this kind of thing. The important thing is to ge... |
2,978,684 | Which configuration management tool is the best for FPGA designs, specifically Xilinx FPGA's programmed with VHDL and C for the embedded (microblaze) software? | 2010/06/05 | [
"https://Stackoverflow.com/questions/2978684",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/358966/"
] | I don't think it much matters what revision control tool you use -- anything that you would consider good in general will probably be OK here. I personally use Git for a sizable Verilog + software project, and I'm quite happy with it.
What will bite you in the ass -- no matter what version control you use -- is this: ... | I have personally used Perforce, Subverion, git and ClearCase for FPGA projects. Since VHDL and C are just text files, any works fine. However be sure to capture the other project and contraint files and any libraries you use.
Also think about what to do with the outputs, e.g. log file and bitstreams. Both tend to be ... |
2,978,684 | Which configuration management tool is the best for FPGA designs, specifically Xilinx FPGA's programmed with VHDL and C for the embedded (microblaze) software? | 2010/06/05 | [
"https://Stackoverflow.com/questions/2978684",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/358966/"
] | There isn't a "best", but configuration control solutions that work for software will be OK for FPGAs - the flow is very similar. I use Subversion at work and git at home, and [wrote a little on 'why' at my blog](http://parallelpoints.com/node/70).
In other answers, binary files keep getting mentioned - the only binar... | I've seen Perforce and Subversion used in a couple of FPGA-intensive companies. |
2,978,684 | Which configuration management tool is the best for FPGA designs, specifically Xilinx FPGA's programmed with VHDL and C for the embedded (microblaze) software? | 2010/06/05 | [
"https://Stackoverflow.com/questions/2978684",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/358966/"
] | There isn't a "best", but configuration control solutions that work for software will be OK for FPGAs - the flow is very similar. I use Subversion at work and git at home, and [wrote a little on 'why' at my blog](http://parallelpoints.com/node/70).
In other answers, binary files keep getting mentioned - the only binar... | Previously I used Subversion but have switched to git two years ago. Git handles FPGA design files just as well as it handles every other text and binary file. Git is all you need for version controlling your files and artifacts.
For building the designs, I recommend just using a single ISE project called "ise" (livin... |
2,978,684 | Which configuration management tool is the best for FPGA designs, specifically Xilinx FPGA's programmed with VHDL and C for the embedded (microblaze) software? | 2010/06/05 | [
"https://Stackoverflow.com/questions/2978684",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/358966/"
] | There isn't a "best", but configuration control solutions that work for software will be OK for FPGAs - the flow is very similar. I use Subversion at work and git at home, and [wrote a little on 'why' at my blog](http://parallelpoints.com/node/70).
In other answers, binary files keep getting mentioned - the only binar... | I have personally used Perforce, Subverion, git and ClearCase for FPGA projects. Since VHDL and C are just text files, any works fine. However be sure to capture the other project and contraint files and any libraries you use.
Also think about what to do with the outputs, e.g. log file and bitstreams. Both tend to be ... |
2,978,684 | Which configuration management tool is the best for FPGA designs, specifically Xilinx FPGA's programmed with VHDL and C for the embedded (microblaze) software? | 2010/06/05 | [
"https://Stackoverflow.com/questions/2978684",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/358966/"
] | There isn't a "best", but configuration control solutions that work for software will be OK for FPGAs - the flow is very similar. I use Subversion at work and git at home, and [wrote a little on 'why' at my blog](http://parallelpoints.com/node/70).
In other answers, binary files keep getting mentioned - the only binar... | I don't think it much matters what revision control tool you use -- anything that you would consider good in general will probably be OK here. I personally use Git for a sizable Verilog + software project, and I'm quite happy with it.
What will bite you in the ass -- no matter what version control you use -- is this: ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.