qid int64 1 74.6M | question stringlengths 45 24.2k | date stringlengths 10 10 | metadata stringlengths 101 178 | response_j stringlengths 32 23.2k | response_k stringlengths 21 13.2k |
|---|---|---|---|---|---|
2,677,956 | So basically what I'm working with is a database full of phone numbers.
if I get one of those users from that phone database and they sign up to my website I want to automatically associate the number from the database that is already present, how would I go about linking those 2 tables together once a user signs up? | 2010/04/20 | ['https://Stackoverflow.com/questions/2677956', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/301252/'] | Assuming that you have phone number table and users table you need to store the primary keys of both table together
You can do it:
* In a user table, but then you will be able to link only one phone number to a user (and later if you will have to add more then one phone you might end up adding fields like phone\_numb... | So, the database would be structured using composition. Keep a `phone_numbers` table w/ `phone_number_id`, the `users` table w/ `user_id`, and then a `customer_phone_numbers` table that maps user\_ids to phone\_number\_ids. Then your PHP code would do something like this:
```
<?php
$user->save(); // save normal user ... |
47,883,939 | I need to generate a `TSQL` query like this:
```
IF @GenderOfEmployee IS NOT NULL
CASE @GenderOfEmployee = 1
THEN INSERT INTO @NotAllowedGenderOfJobPost (TagID) values (139)
ELSE INSERT INTO @NotAllowedGenderOfJobPost (TagID) values (138)
END;
```
I mean I want have a `CASE` statement in `IF`... | 2017/12/19 | ['https://Stackoverflow.com/questions/47883939', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/-1/'] | Change like this
```
IF @GenderOfEmployee IS NOT NULL
BEGIN
INSERT INTO @NotAllowedGenderOfJobPost (TagID) SELECT CASE WHEN @GenderOfEmployee = 1
THEN 139
ELSE 138
END
END;
``` | There is no need for a `select` to insert the result of a `case` expression:
```
declare @NotAllowedGenderOfJobPost as Table ( TagId Int );
declare @GenderOfEmployee as Int = NULL;
-- Try NULL.
if @GenderOfEmployee is not NULL
insert into @NotAllowedGenderOfJobPost (TagId ) values
( case when @GenderOfEmployee ... |
53,849,604 | how to make regex for number from -100 to 100? Thanks in advance | 2018/12/19 | ['https://Stackoverflow.com/questions/53849604', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/9328454/'] | You can use a regex range generator, such as <http://gamon.webfactional.com/regexnumericrangegenerator/>
I think this regular expression will do it:
```
/^-?([0-9]|[1-8][0-9]|9[0-9]|100)$/
``` | use <https://regex101.com/> for checking your regex.
and use `(?:\b|-)([1-9]{1,2}[0]?|100)\b` expression to print numbers from -100 to 100 |
39,895,319 | I am looking at making a navbar like this in android:
[Scketch of navbar](http://i.stack.imgur.com/NsRSO.png)
Everything is straight forward beside the months.
I want to be able to scroll through the months by dragging or by clicking a month.
I also want the current month to be the one centered on start.
Any suggest... | 2016/10/06 | ['https://Stackoverflow.com/questions/39895319', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5326910/'] | Coverted the above comment as answer. Hope it solves your problem.
Use TabLayout with **app:tabMode=”scrollable”**. You'll find the implementation and code under the topic **Scrollable Tabs** [here](http://www.androidhive.info/2015/09/android-material-design-working-with-tabs/). | ```
ActionBar mActionBar = getActionBar();
mActionBar.setDisplayShowHomeEnabled(false);
mActionBar.setDisplayShowTitleEnabled(false);
LayoutInflater mInflater = LayoutInflater.from(this);
View mCustomView = mInflater.inflate(R.layout.custom_actionbar, null);
mActionBar.setCustomView(mCustomView);
mActionBar.setDisplayS... |
43,918,993 | I get the following error installing sasl in my Bluemix app:
```
Installing collected packages: sasl, thrift-sasl
Running setup.py install for sasl: started
Running setup.py install for sasl: finished with status 'error'
Command "/app/.heroku/python/bin/python -u -c "import setup... | 2017/05/11 | ['https://Stackoverflow.com/questions/43918993', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1033422/'] | Maybe you should install some system libraries before you can install **sasl** refer to <https://pypi.python.org/pypi/sasl/0.1.3>
>
> This library contains C++ code, and will require some additional
> system libraries installed.
>
>
> *Debian/Ubuntu*
>
>
> apt-get install python-dev libsasl2-dev gcc
>
>
> *Cen... | The solution for me was to use pure-sasl and install imypla and thrift\_sasl from application code rather than my requirements.txt:
```
try:
import impyla
except ImportError:
print("Installing missing impyla")
import pip
pip.main(['install', '--no-deps', 'impyla'])
try:
import thrift_sasl
except ... |
43,918,993 | I get the following error installing sasl in my Bluemix app:
```
Installing collected packages: sasl, thrift-sasl
Running setup.py install for sasl: started
Running setup.py install for sasl: finished with status 'error'
Command "/app/.heroku/python/bin/python -u -c "import setup... | 2017/05/11 | ['https://Stackoverflow.com/questions/43918993', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1033422/'] | The solution for me was to use pure-sasl and install imypla and thrift\_sasl from application code rather than my requirements.txt:
```
try:
import impyla
except ImportError:
print("Installing missing impyla")
import pip
pip.main(['install', '--no-deps', 'impyla'])
try:
import thrift_sasl
except ... | I was having similar error -
```
In file included from sasl/saslwrapper.cpp:254:0:
sasl/saslwrapper.h:22:23: fatal error: sasl/sasl.h: No such file or directory
#include <sasl/sasl.h>
^
compilation terminated.
error: command 'gcc' failed with exit status 1
```
Try this thread it was helpful f... |
43,918,993 | I get the following error installing sasl in my Bluemix app:
```
Installing collected packages: sasl, thrift-sasl
Running setup.py install for sasl: started
Running setup.py install for sasl: finished with status 'error'
Command "/app/.heroku/python/bin/python -u -c "import setup... | 2017/05/11 | ['https://Stackoverflow.com/questions/43918993', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1033422/'] | Maybe you should install some system libraries before you can install **sasl** refer to <https://pypi.python.org/pypi/sasl/0.1.3>
>
> This library contains C++ code, and will require some additional
> system libraries installed.
>
>
> *Debian/Ubuntu*
>
>
> apt-get install python-dev libsasl2-dev gcc
>
>
> *Cen... | I was having similar error -
```
In file included from sasl/saslwrapper.cpp:254:0:
sasl/saslwrapper.h:22:23: fatal error: sasl/sasl.h: No such file or directory
#include <sasl/sasl.h>
^
compilation terminated.
error: command 'gcc' failed with exit status 1
```
Try this thread it was helpful f... |
18,342,961 | I have a copy text button that I'm using ZeroClipboard with in order to copy certain text on the page. It works in Chrome and IE but it doesn't copy text in Firefox and the `complete` event is never fired.
My JavaScript for setting up the button looks something like this:
```
ZeroClipboard.setDefaults({
moviePath: ... | 2013/08/20 | ['https://Stackoverflow.com/questions/18342961', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/784368/'] | I'm not sure if this would help, but recently I have been working on using zeroclipboard for more than a month. Sometimes it works but sometimes it fails due to some very tiny things(maybe because I'm very new to javascript and html stuff)...and I understand the upset very well...
In your case, have you ever tried thi... | My dev environment:
* .NET 4.5
* ASP.NET MVC4 with Razor engine
* jQuery
Here is what I did to get Copy to Clipboard to work across 5 browsers:
* FF 23
* IE 10
* Chrome 29
* Safari 5.1.7
* Opera 16
My scenario:
The text I want to copy to clipboard is generated an put in a Div along with html breaks (br).
For the Co... |
18,342,961 | I have a copy text button that I'm using ZeroClipboard with in order to copy certain text on the page. It works in Chrome and IE but it doesn't copy text in Firefox and the `complete` event is never fired.
My JavaScript for setting up the button looks something like this:
```
ZeroClipboard.setDefaults({
moviePath: ... | 2013/08/20 | ['https://Stackoverflow.com/questions/18342961', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/784368/'] | I'm not sure if this would help, but recently I have been working on using zeroclipboard for more than a month. Sometimes it works but sometimes it fails due to some very tiny things(maybe because I'm very new to javascript and html stuff)...and I understand the upset very well...
In your case, have you ever tried thi... | Latest version of zeroclipboard uses event.stopImmediatePropagation which not exists in firefox before version 28.0, it fails with error:
```
event.stopImmediatePropagation is not a function
```
You can see browser comparison here:
<http://compatibility.shwups-cms.ch/de/home?&property=TrackEvent.prototype.stopImmed... |
15,178,165 | I would like to know if there is any IDE or Eclipse Plugin that supports mixed mode debugging. As I searched the term mixed mode, found lot of references debugging VM languages alongside with native code.
But I referring to a feature that is similar to the one available in compiled languages such as C where an user c... | 2013/03/02 | ['https://Stackoverflow.com/questions/15178165', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1391837/'] | I'm a DSL developer and have sort of run into this same issue a number of times.
The only tool i've found has been the [Dr. Garbage](http://www.drgarbage.com/bytecode-visualizer/) tools.
At the current moment, they don't seem to be the best maintained, but they do work with appropriate versions of eclipse. | You don't need debugger to understand how Java code maps to compiled native code. You can use `-XX:+PrintCompilation` JVM flag. See mode info on that in [Stephen Colebourne's blog post](http://blog.joda.org/2011/08/printcompilation-jvm-flag.html) and more detail in Kris Mok [reply to that post](https://gist.github.com/... |
1,864,869 | Sorry, my English is poor, but I have a question. It is usual to find the definition of subgroup as: "We define a subgroup $H$ of a group $G$ to be a nonempty subset $H$ of $G$ such that when the group operation of $G$ is restricted to $H$, $H$ is a group in its own right". But it is known that $A=\left\{\begin{pmatrix... | 2016/07/19 | ['https://math.stackexchange.com/questions/1864869', 'https://math.stackexchange.com', 'https://math.stackexchange.com/users/85966/'] | >
> Can two function be Big-O of each other?
>
>
>
The answer is yes.
One may take $f(n)=n$ and $g(n)=2n+1$, as $ n \to \infty$, one has
$$
\left|\frac{f(n)}{g(n)}\right|=\frac{n}{2n+1}\le \frac12 \implies f=O(g)
$$ and
$$
\left|\frac{g(n)}{f(n)}\right|=\frac{2n+1}{n}\le 3 \implies g=O(f).
$$ | **Is it possible?** Yes. A simple example: $f=g$.
**What does it imply**? This is equivalent to saying that $f=\Theta(g)$. To see why:
If $f=O(g)$, there exists $c>0$ and $N \geq 0$ such that
$$
\forall n \geq N, \qquad f(n) \leq c\cdot g(n) \tag{1}
$$
If $g=O(f)$, there exists $c'>0$ and $N' \geq 0$ such that
$$
\f... |
1,864,869 | Sorry, my English is poor, but I have a question. It is usual to find the definition of subgroup as: "We define a subgroup $H$ of a group $G$ to be a nonempty subset $H$ of $G$ such that when the group operation of $G$ is restricted to $H$, $H$ is a group in its own right". But it is known that $A=\left\{\begin{pmatrix... | 2016/07/19 | ['https://math.stackexchange.com/questions/1864869', 'https://math.stackexchange.com', 'https://math.stackexchange.com/users/85966/'] | >
> Can two function be Big-O of each other?
>
>
>
The answer is yes.
One may take $f(n)=n$ and $g(n)=2n+1$, as $ n \to \infty$, one has
$$
\left|\frac{f(n)}{g(n)}\right|=\frac{n}{2n+1}\le \frac12 \implies f=O(g)
$$ and
$$
\left|\frac{g(n)}{f(n)}\right|=\frac{2n+1}{n}\le 3 \implies g=O(f).
$$ | The following are equivalent:
1. $f(n) = O(g(n))$ and $g(n) = O(f(n))$
2. $f(n) = \Omega(g(n))$ and $g(n) = \Omega(f(n))$ (using the definition from computational complexity theory, not the one from analytic number theory)
3. $f(n) = \Theta(g(n))$. |
1,864,869 | Sorry, my English is poor, but I have a question. It is usual to find the definition of subgroup as: "We define a subgroup $H$ of a group $G$ to be a nonempty subset $H$ of $G$ such that when the group operation of $G$ is restricted to $H$, $H$ is a group in its own right". But it is known that $A=\left\{\begin{pmatrix... | 2016/07/19 | ['https://math.stackexchange.com/questions/1864869', 'https://math.stackexchange.com', 'https://math.stackexchange.com/users/85966/'] | **Is it possible?** Yes. A simple example: $f=g$.
**What does it imply**? This is equivalent to saying that $f=\Theta(g)$. To see why:
If $f=O(g)$, there exists $c>0$ and $N \geq 0$ such that
$$
\forall n \geq N, \qquad f(n) \leq c\cdot g(n) \tag{1}
$$
If $g=O(f)$, there exists $c'>0$ and $N' \geq 0$ such that
$$
\f... | The following are equivalent:
1. $f(n) = O(g(n))$ and $g(n) = O(f(n))$
2. $f(n) = \Omega(g(n))$ and $g(n) = \Omega(f(n))$ (using the definition from computational complexity theory, not the one from analytic number theory)
3. $f(n) = \Theta(g(n))$. |
52,294 | I am a Linux user with a frequent need to ssh into remote computers and keep my session there running while disconnecting. And then later connect back to it from the same or a different 'client' computers. There are a number of programs, *terminal multiplexers*, that solves this problem. I frequently use gnu screen, tm... | 2018/09/21 | ['https://softwarerecs.stackexchange.com/questions/52294', 'https://softwarerecs.stackexchange.com', 'https://softwarerecs.stackexchange.com/users/40595/'] | You might want to clarify what Kind oft "remote desktop" you want:
1. Mirror the screen, i.e. interact with the user session which is currently active on the physical screen.
2. Open a New session exclusively for the remote user.
1.) is the target oft VNC, but also TeamViewer and the likes. It is useful for remote as... | Even today tunneling an X session over SSH works just fine.
On a Mac, you can install the X server from the apple store, Linux/BSD you have it native, and for Windows there are X servers in the app store, or other commercial offerings, or you can use `cygwin-x` |
52,294 | I am a Linux user with a frequent need to ssh into remote computers and keep my session there running while disconnecting. And then later connect back to it from the same or a different 'client' computers. There are a number of programs, *terminal multiplexers*, that solves this problem. I frequently use gnu screen, tm... | 2018/09/21 | ['https://softwarerecs.stackexchange.com/questions/52294', 'https://softwarerecs.stackexchange.com', 'https://softwarerecs.stackexchange.com/users/40595/'] | I think X2Go fits your requirements, based on NX3. <https://wiki.x2go.org/doku.php/start>
I use it and while it's not perfect, it's the best I've found so far.
It may be in your distro's repository. X support only, no Wayland.
Uses ssh, logs in to existing sessions or creates new sessions using remote system accoun... | You might want to clarify what Kind oft "remote desktop" you want:
1. Mirror the screen, i.e. interact with the user session which is currently active on the physical screen.
2. Open a New session exclusively for the remote user.
1.) is the target oft VNC, but also TeamViewer and the likes. It is useful for remote as... |
52,294 | I am a Linux user with a frequent need to ssh into remote computers and keep my session there running while disconnecting. And then later connect back to it from the same or a different 'client' computers. There are a number of programs, *terminal multiplexers*, that solves this problem. I frequently use gnu screen, tm... | 2018/09/21 | ['https://softwarerecs.stackexchange.com/questions/52294', 'https://softwarerecs.stackexchange.com', 'https://softwarerecs.stackexchange.com/users/40595/'] | I think X2Go fits your requirements, based on NX3. <https://wiki.x2go.org/doku.php/start>
I use it and while it's not perfect, it's the best I've found so far.
It may be in your distro's repository. X support only, no Wayland.
Uses ssh, logs in to existing sessions or creates new sessions using remote system accoun... | Even today tunneling an X session over SSH works just fine.
On a Mac, you can install the X server from the apple store, Linux/BSD you have it native, and for Windows there are X servers in the app store, or other commercial offerings, or you can use `cygwin-x` |
33,053,891 | I'm working with this tutorial which uses lambda expressions.
[Spring Boot - Bookmarks](http://spring.io/guides/tutorials/bookmarks/)
But IntelliJ says always: `cannot resolve method(<lambda expression>)`.
What do I have to check?
```
this.accountRepository.findByUsername(userId).orElseThrow(() -> new UserNotFoundE... | 2015/10/10 | ['https://Stackoverflow.com/questions/33053891', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2715720/'] | It looks like your IntelliJ or your project is not setup to use Java 8.
1. Open **Project Structure**
2. Look into **Project Settings | Project**, the value of **Project SDK** should be 1.8
3. Look into **Platform Settings | SDK**, there should be 1.8 listed
It should look something like this:
[
But IntelliJ says always: `cannot resolve method(<lambda expression>)`.
What do I have to check?
```
this.accountRepository.findByUsername(userId).orElseThrow(() -> new UserNotFoundE... | 2015/10/10 | ['https://Stackoverflow.com/questions/33053891', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2715720/'] | It looks like your IntelliJ or your project is not setup to use Java 8.
1. Open **Project Structure**
2. Look into **Project Settings | Project**, the value of **Project SDK** should be 1.8
3. Look into **Platform Settings | SDK**, there should be 1.8 listed
It should look something like this:
[
But IntelliJ says always: `cannot resolve method(<lambda expression>)`.
What do I have to check?
```
this.accountRepository.findByUsername(userId).orElseThrow(() -> new UserNotFoundE... | 2015/10/10 | ['https://Stackoverflow.com/questions/33053891', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2715720/'] | You need to change the "Project language level" to "8 - Lambdas, type annotations etc.". You can find this option in "Project Settings" -> "Project" | In addition to the answers above look into you pom.xml file. Source and target should be 1.8 or higher. e.g.
```
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properti... |
11,232,845 | I used some relative url in my project like `<img src="../images/portal_header.jpg" .../>`, but our consultant insist to ask me change every url to `~/images/...`, and because they are html control, I have to add `runat="server"` tag for each one, So my question is that is it necessary? I have couple master page, it ma... | 2012/06/27 | ['https://Stackoverflow.com/questions/11232845', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1202242/'] | A control can live in any subfolder and be referenced by many different pages in many different subfolders. `../` will not work in every case.
For that reason, you shuold resolve the URLs:
```
ResolveUrl("~/images/myimage.jpg")
```
And, no, you don't have to add `runat="server"`, you could do it like so:
```
<img ... | It depends greatly on context. Using relative URLs works fine as long as the location of the dependent resources isn't expected to change. Turning all of your image tags into controls does give you the benefit of using "~" (App Root) but it also adds overhead to processing on the server.
Your consultant is likely tryi... |
11,232,845 | I used some relative url in my project like `<img src="../images/portal_header.jpg" .../>`, but our consultant insist to ask me change every url to `~/images/...`, and because they are html control, I have to add `runat="server"` tag for each one, So my question is that is it necessary? I have couple master page, it ma... | 2012/06/27 | ['https://Stackoverflow.com/questions/11232845', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1202242/'] | A control can live in any subfolder and be referenced by many different pages in many different subfolders. `../` will not work in every case.
For that reason, you shuold resolve the URLs:
```
ResolveUrl("~/images/myimage.jpg")
```
And, no, you don't have to add `runat="server"`, you could do it like so:
```
<img ... | Not sure which ASP version you're working in, but I use `@Url.Content("~/relativepath")` for ASP4 using MVC3 w/Razor
or `<img src="@Url.Content("~/relativepath")" alt="" />` |
32,505,666 | I'm developing a package and want to import all of the `dplyr` functions, so I added
`#' @import dplyr`
To my function and which generated a namespace which looks like this:
```
`# Generated by roxygen2 (4.1.1): do not edit by hand
export(process_text)
export(quick_match)
import(dplyr)`
```
But then when I load ... | 2015/09/10 | ['https://Stackoverflow.com/questions/32505666', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1499416/'] | You also need to import it in your DESCRIPTION file. Something like this:
```
Package: <name>
Version: <version>
Date: <date>
Title: <title>
Author: <author>
Maintainer: <maintainer>
Depends:
R (>= 2.13.0)
Imports:
dplyr
Description: <description>
License: GPL (>= 2)
``` | Turns out that you need the package to be listed in the Depends as well as the Imports section of the DESCRIPTION file. The following resolved the issue for me.
```
Package: stringmatch
Title: Q-Gram filtering for approximate string matching
Version: 0.0.0.9000
Authors@R:
Description: An implementation of q-gram ... |
25,306,180 | I want to change z order of some views during animation
On Androids above 4.1.2 it works just fine, and on androids below 4.1.2 the Z order doesnt change, the top view remains on top.
This is what i am trying.
```
myView.bringToFront();
((View)myView.getParent()).invalidate();
```
How to make it work on older dev... | 2014/08/14 | ['https://Stackoverflow.com/questions/25306180', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2136812/'] | ```
/**
* Change the view's z order in the tree, so it's on top of other sibling
* views. This ordering change may affect layout, if the parent container
* uses an order-dependent layout scheme (e.g., LinearLayout). Prior
* to {@link android.os.Build.VERSION_CODES#KITKAT} this
* method shoul... | According to this I was simply missing the line
This Simple line work for you
```
yourView.bringToFront();
``` |
25,306,180 | I want to change z order of some views during animation
On Androids above 4.1.2 it works just fine, and on androids below 4.1.2 the Z order doesnt change, the top view remains on top.
This is what i am trying.
```
myView.bringToFront();
((View)myView.getParent()).invalidate();
```
How to make it work on older dev... | 2014/08/14 | ['https://Stackoverflow.com/questions/25306180', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2136812/'] | I tried all that. A RelativeLayout was supposed to be on top of a Button but it just didn't want to obey.
In the end I solved it by adding `android:elevation="2dp"` to the RelativeLayout.
The elevation value is only used in API level 21 and higher. In my case everything below the API level 21 was fine and everything ... | I hope this will be useful for somebody.
None of the above solutions worked for me. Why? Because my view that I wanted to be in the frond had an elevation smaller than other view. So the view with bigger elevation was always in front, no matter what. |
25,306,180 | I want to change z order of some views during animation
On Androids above 4.1.2 it works just fine, and on androids below 4.1.2 the Z order doesnt change, the top view remains on top.
This is what i am trying.
```
myView.bringToFront();
((View)myView.getParent()).invalidate();
```
How to make it work on older dev... | 2014/08/14 | ['https://Stackoverflow.com/questions/25306180', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2136812/'] | I tried all that. A RelativeLayout was supposed to be on top of a Button but it just didn't want to obey.
In the end I solved it by adding `android:elevation="2dp"` to the RelativeLayout.
The elevation value is only used in API level 21 and higher. In my case everything below the API level 21 was fine and everything ... | For Api's 21 or above There is an xml attribute known as `translateZ` which lets you define the elevation level on the view.
You can pretty much use that too.
>
> android:translateZ="30dp"
>
>
>
\*APIs >=21 |
25,306,180 | I want to change z order of some views during animation
On Androids above 4.1.2 it works just fine, and on androids below 4.1.2 the Z order doesnt change, the top view remains on top.
This is what i am trying.
```
myView.bringToFront();
((View)myView.getParent()).invalidate();
```
How to make it work on older dev... | 2014/08/14 | ['https://Stackoverflow.com/questions/25306180', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2136812/'] | For Api's 21 or above There is an xml attribute known as `translateZ` which lets you define the elevation level on the view.
You can pretty much use that too.
>
> android:translateZ="30dp"
>
>
>
\*APIs >=21 | According to this I was simply missing the line
This Simple line work for you
```
yourView.bringToFront();
``` |
25,306,180 | I want to change z order of some views during animation
On Androids above 4.1.2 it works just fine, and on androids below 4.1.2 the Z order doesnt change, the top view remains on top.
This is what i am trying.
```
myView.bringToFront();
((View)myView.getParent()).invalidate();
```
How to make it work on older dev... | 2014/08/14 | ['https://Stackoverflow.com/questions/25306180', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2136812/'] | ```
/**
* Change the view's z order in the tree, so it's on top of other sibling
* views. This ordering change may affect layout, if the parent container
* uses an order-dependent layout scheme (e.g., LinearLayout). Prior
* to {@link android.os.Build.VERSION_CODES#KITKAT} this
* method shoul... | If the parent view is a relativelayout, then it might work or it might not work. I tried `bringToFront`, `requestLayout`, and `removeView; addView`, but no luck. My solution was to put everything inside a framelayout. What I needed on top was moved the buttom of the framelayout with visibility invisible, and then in co... |
25,306,180 | I want to change z order of some views during animation
On Androids above 4.1.2 it works just fine, and on androids below 4.1.2 the Z order doesnt change, the top view remains on top.
This is what i am trying.
```
myView.bringToFront();
((View)myView.getParent()).invalidate();
```
How to make it work on older dev... | 2014/08/14 | ['https://Stackoverflow.com/questions/25306180', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2136812/'] | I hope this will be useful for somebody.
None of the above solutions worked for me. Why? Because my view that I wanted to be in the frond had an elevation smaller than other view. So the view with bigger elevation was always in front, no matter what. | For Api's 21 or above There is an xml attribute known as `translateZ` which lets you define the elevation level on the view.
You can pretty much use that too.
>
> android:translateZ="30dp"
>
>
>
\*APIs >=21 |
25,306,180 | I want to change z order of some views during animation
On Androids above 4.1.2 it works just fine, and on androids below 4.1.2 the Z order doesnt change, the top view remains on top.
This is what i am trying.
```
myView.bringToFront();
((View)myView.getParent()).invalidate();
```
How to make it work on older dev... | 2014/08/14 | ['https://Stackoverflow.com/questions/25306180', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2136812/'] | I hope this will be useful for somebody.
None of the above solutions worked for me. Why? Because my view that I wanted to be in the frond had an elevation smaller than other view. So the view with bigger elevation was always in front, no matter what. | According to this I was simply missing the line
This Simple line work for you
```
yourView.bringToFront();
``` |
25,306,180 | I want to change z order of some views during animation
On Androids above 4.1.2 it works just fine, and on androids below 4.1.2 the Z order doesnt change, the top view remains on top.
This is what i am trying.
```
myView.bringToFront();
((View)myView.getParent()).invalidate();
```
How to make it work on older dev... | 2014/08/14 | ['https://Stackoverflow.com/questions/25306180', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2136812/'] | ```
/**
* Change the view's z order in the tree, so it's on top of other sibling
* views. This ordering change may affect layout, if the parent container
* uses an order-dependent layout scheme (e.g., LinearLayout). Prior
* to {@link android.os.Build.VERSION_CODES#KITKAT} this
* method shoul... | I hope this will be useful for somebody.
None of the above solutions worked for me. Why? Because my view that I wanted to be in the frond had an elevation smaller than other view. So the view with bigger elevation was always in front, no matter what. |
25,306,180 | I want to change z order of some views during animation
On Androids above 4.1.2 it works just fine, and on androids below 4.1.2 the Z order doesnt change, the top view remains on top.
This is what i am trying.
```
myView.bringToFront();
((View)myView.getParent()).invalidate();
```
How to make it work on older dev... | 2014/08/14 | ['https://Stackoverflow.com/questions/25306180', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2136812/'] | I hope this will be useful for somebody.
None of the above solutions worked for me. Why? Because my view that I wanted to be in the frond had an elevation smaller than other view. So the view with bigger elevation was always in front, no matter what. | If the parent view is a relativelayout, then it might work or it might not work. I tried `bringToFront`, `requestLayout`, and `removeView; addView`, but no luck. My solution was to put everything inside a framelayout. What I needed on top was moved the buttom of the framelayout with visibility invisible, and then in co... |
25,306,180 | I want to change z order of some views during animation
On Androids above 4.1.2 it works just fine, and on androids below 4.1.2 the Z order doesnt change, the top view remains on top.
This is what i am trying.
```
myView.bringToFront();
((View)myView.getParent()).invalidate();
```
How to make it work on older dev... | 2014/08/14 | ['https://Stackoverflow.com/questions/25306180', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2136812/'] | If the parent view is a relativelayout, then it might work or it might not work. I tried `bringToFront`, `requestLayout`, and `removeView; addView`, but no luck. My solution was to put everything inside a framelayout. What I needed on top was moved the buttom of the framelayout with visibility invisible, and then in co... | According to this I was simply missing the line
This Simple line work for you
```
yourView.bringToFront();
``` |
17,133,430 | I have a UTF-8 text file which starts with this line:
```
<HEAD><META name=GENERATOR content="MSHTML 10.00.9200.16521"><body>
```
When I read this file with `TFile.ReadAllText` with TEncoding.UTF8:
```
MyStr := TFile.ReadAllText(ThisFileNamePath, TEncoding.UTF8);
```
then the first 3 characters of the text file a... | 2013/06/16 | ['https://Stackoverflow.com/questions/17133430', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1580348/'] | The first three bytes are skipped because the RTL code assumes that the file contains a UTF-8 BOM. Clearly your file does not.
The `TUTF8Encoding` class implements a `GetPreamble` method that specifies the `UTF-8` BOM. And `ReadAllBytes` skips the preamble specified by the encoding that you pass.
One simple solution... | Actually the value you pass to ReadAllText is not the Default Encoding (when you check how it's implemented), it's an enforced encoding if you pass something other than Nil. Internally it calls other method of TEncoding that does have an extra default encoding parameter (for when the foundEncoding var parameter is set ... |
2,109 | **Background**
I'm building a project Gantt, involving multiple teams. In the past I've had a good experience with a Gantt as a means of planning a project but not so much as a means of tracking a project's progress.
I'm trying to figure out what would be the best way to reflect the integration points and dependenc... | 2011/05/08 | ['https://pm.stackexchange.com/questions/2109', 'https://pm.stackexchange.com', 'https://pm.stackexchange.com/users/44/'] | You do not need to use milestones to show the task relationships. In your schedule, once you have determined the sequence of work, based on BOTH hard and soft logic, link them. Link them using FS, SS, FF, with the appropriate leads and lags as appropriate. Baseline it and go.
This should provide you with the control ... | I tend to use milestones to mark key meetings or approvals of work. If there is some sort of formal cut-over process, make it a milestone. |
2,109 | **Background**
I'm building a project Gantt, involving multiple teams. In the past I've had a good experience with a Gantt as a means of planning a project but not so much as a means of tracking a project's progress.
I'm trying to figure out what would be the best way to reflect the integration points and dependenc... | 2011/05/08 | ['https://pm.stackexchange.com/questions/2109', 'https://pm.stackexchange.com', 'https://pm.stackexchange.com/users/44/'] | I've used (and like) a section at the top of the schedule for milestones. This keeps the key milestones visible and easily reportable.
If you really want to use milestones to show links between teams, I would suggest first that the teams -really- be separate teams and not just different roles. For teams that each man... | I tend to use milestones to mark key meetings or approvals of work. If there is some sort of formal cut-over process, make it a milestone. |
2,109 | **Background**
I'm building a project Gantt, involving multiple teams. In the past I've had a good experience with a Gantt as a means of planning a project but not so much as a means of tracking a project's progress.
I'm trying to figure out what would be the best way to reflect the integration points and dependenc... | 2011/05/08 | ['https://pm.stackexchange.com/questions/2109', 'https://pm.stackexchange.com', 'https://pm.stackexchange.com/users/44/'] | Actually, I like how you're planning it. I think part of the problem is that you're now focusing on the aesthetics of the gantt chart as opposed to what it's being used for. Who cares if it 'looks' cluttered? The only real question is - does it make sense to you, and can you quickly and easily see and find the informat... | I tend to use milestones to mark key meetings or approvals of work. If there is some sort of formal cut-over process, make it a milestone. |
2,109 | **Background**
I'm building a project Gantt, involving multiple teams. In the past I've had a good experience with a Gantt as a means of planning a project but not so much as a means of tracking a project's progress.
I'm trying to figure out what would be the best way to reflect the integration points and dependenc... | 2011/05/08 | ['https://pm.stackexchange.com/questions/2109', 'https://pm.stackexchange.com', 'https://pm.stackexchange.com/users/44/'] | You do not need to use milestones to show the task relationships. In your schedule, once you have determined the sequence of work, based on BOTH hard and soft logic, link them. Link them using FS, SS, FF, with the appropriate leads and lags as appropriate. Baseline it and go.
This should provide you with the control ... | How about tracking deliveries between teams and as a separate list? This list would be managed by the program office. Each party would need to mutually agree upon what each delivery will contain and when it will be made. Once they sign up these agreements would be as binding as schedule milestones. This list would be u... |
2,109 | **Background**
I'm building a project Gantt, involving multiple teams. In the past I've had a good experience with a Gantt as a means of planning a project but not so much as a means of tracking a project's progress.
I'm trying to figure out what would be the best way to reflect the integration points and dependenc... | 2011/05/08 | ['https://pm.stackexchange.com/questions/2109', 'https://pm.stackexchange.com', 'https://pm.stackexchange.com/users/44/'] | I've used (and like) a section at the top of the schedule for milestones. This keeps the key milestones visible and easily reportable.
If you really want to use milestones to show links between teams, I would suggest first that the teams -really- be separate teams and not just different roles. For teams that each man... | You do not need to use milestones to show the task relationships. In your schedule, once you have determined the sequence of work, based on BOTH hard and soft logic, link them. Link them using FS, SS, FF, with the appropriate leads and lags as appropriate. Baseline it and go.
This should provide you with the control ... |
2,109 | **Background**
I'm building a project Gantt, involving multiple teams. In the past I've had a good experience with a Gantt as a means of planning a project but not so much as a means of tracking a project's progress.
I'm trying to figure out what would be the best way to reflect the integration points and dependenc... | 2011/05/08 | ['https://pm.stackexchange.com/questions/2109', 'https://pm.stackexchange.com', 'https://pm.stackexchange.com/users/44/'] | You do not need to use milestones to show the task relationships. In your schedule, once you have determined the sequence of work, based on BOTH hard and soft logic, link them. Link them using FS, SS, FF, with the appropriate leads and lags as appropriate. Baseline it and go.
This should provide you with the control ... | Actually, I like how you're planning it. I think part of the problem is that you're now focusing on the aesthetics of the gantt chart as opposed to what it's being used for. Who cares if it 'looks' cluttered? The only real question is - does it make sense to you, and can you quickly and easily see and find the informat... |
2,109 | **Background**
I'm building a project Gantt, involving multiple teams. In the past I've had a good experience with a Gantt as a means of planning a project but not so much as a means of tracking a project's progress.
I'm trying to figure out what would be the best way to reflect the integration points and dependenc... | 2011/05/08 | ['https://pm.stackexchange.com/questions/2109', 'https://pm.stackexchange.com', 'https://pm.stackexchange.com/users/44/'] | I've used (and like) a section at the top of the schedule for milestones. This keeps the key milestones visible and easily reportable.
If you really want to use milestones to show links between teams, I would suggest first that the teams -really- be separate teams and not just different roles. For teams that each man... | How about tracking deliveries between teams and as a separate list? This list would be managed by the program office. Each party would need to mutually agree upon what each delivery will contain and when it will be made. Once they sign up these agreements would be as binding as schedule milestones. This list would be u... |
2,109 | **Background**
I'm building a project Gantt, involving multiple teams. In the past I've had a good experience with a Gantt as a means of planning a project but not so much as a means of tracking a project's progress.
I'm trying to figure out what would be the best way to reflect the integration points and dependenc... | 2011/05/08 | ['https://pm.stackexchange.com/questions/2109', 'https://pm.stackexchange.com', 'https://pm.stackexchange.com/users/44/'] | Actually, I like how you're planning it. I think part of the problem is that you're now focusing on the aesthetics of the gantt chart as opposed to what it's being used for. Who cares if it 'looks' cluttered? The only real question is - does it make sense to you, and can you quickly and easily see and find the informat... | How about tracking deliveries between teams and as a separate list? This list would be managed by the program office. Each party would need to mutually agree upon what each delivery will contain and when it will be made. Once they sign up these agreements would be as binding as schedule milestones. This list would be u... |
2,109 | **Background**
I'm building a project Gantt, involving multiple teams. In the past I've had a good experience with a Gantt as a means of planning a project but not so much as a means of tracking a project's progress.
I'm trying to figure out what would be the best way to reflect the integration points and dependenc... | 2011/05/08 | ['https://pm.stackexchange.com/questions/2109', 'https://pm.stackexchange.com', 'https://pm.stackexchange.com/users/44/'] | I've used (and like) a section at the top of the schedule for milestones. This keeps the key milestones visible and easily reportable.
If you really want to use milestones to show links between teams, I would suggest first that the teams -really- be separate teams and not just different roles. For teams that each man... | Actually, I like how you're planning it. I think part of the problem is that you're now focusing on the aesthetics of the gantt chart as opposed to what it's being used for. Who cares if it 'looks' cluttered? The only real question is - does it make sense to you, and can you quickly and easily see and find the informat... |
354,242 | I want to `\foreach` on a list and create task (via package [`tasks`](https://www.ctan.org/pkg/tasks)) inside a question. A MWE:
```
\documentclass{article}
\usepackage[magyar]{babel}
\usepackage[utf8x]{inputenc}
\usepackage{t1enc}
\usepackage{exsheets}
\usepackage{pgffor}
\usepackage{fp}
\def\pontlist{
2/3/1/4/,
5/1/... | 2017/02/16 | ['https://tex.stackexchange.com/questions/354242', 'https://tex.stackexchange.com', 'https://tex.stackexchange.com/users/8836/'] | It is a question of whether your text font has such a character. If you look in the log file you will find
>
> `Missing character: There is no π (U+03C0) in font [lmroman12-regular]:+tlig;!`
>
>
>
In your case pi represents a mathematical entity and in normal text with unicode input you can use
```
This is $π... | This typesets pi and gives an error message when using \SI. SI does not recognize pi as the number 3.14159....
```
\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{fontspec}
\setmainfont{DejaVu Serif}
\usepackage{siunitx} %Einheiten
\begin{document}
This is π.
\SI{π/2}{\radian} %... |
354,242 | I want to `\foreach` on a list and create task (via package [`tasks`](https://www.ctan.org/pkg/tasks)) inside a question. A MWE:
```
\documentclass{article}
\usepackage[magyar]{babel}
\usepackage[utf8x]{inputenc}
\usepackage{t1enc}
\usepackage{exsheets}
\usepackage{pgffor}
\usepackage{fp}
\def\pontlist{
2/3/1/4/,
5/1/... | 2017/02/16 | ['https://tex.stackexchange.com/questions/354242', 'https://tex.stackexchange.com', 'https://tex.stackexchange.com/users/8836/'] | It is a question of whether your text font has such a character. If you look in the log file you will find
>
> `Missing character: There is no π (U+03C0) in font [lmroman12-regular]:+tlig;!`
>
>
>
In your case pi represents a mathematical entity and in normal text with unicode input you can use
```
This is $π... | TeX only loops if you respond to the error message
```
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! siunitx error: "invalid-token-in-number"
!
! Invalid token 'π' in numerical input.
!
! See the siunitx documentation for further information.
!
! For immediate help type H <return>.
!............................ |
23,231,397 | I want to find out which widget is in a given direction in GTK+, i.e. doing what the "move-focus" signal does, but without actually changing the focus. What I have in mind is a function that takes a GtkWidget \* and a GtkDirectionType and returns the GtkWidget in the given direction (if any).
What I want this for is t... | 2014/04/22 | ['https://Stackoverflow.com/questions/23231397', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3332264/'] | Failing any other approach, the way I'm going forward with is to copy a selected set of static functions from the library implementation of GtkContainer and put them in a file in my own application, modifying them to suit my needs.
More specifically, the function gtk\_container\_focus\_sort\_left\_right() and any loca... | Assuming the directions you care about are "Forward" and "Backward", it sounds like you want to use [`gtk_container_get_focus_chain()`](https://developer.gnome.org/gtk3/stable/GtkContainer.html#gtk-container-get-focus-chain) on the frame: it does pretty much what it says on the tin: you get a list of widgets in order o... |
41,768,980 | I'm currently using SQL server 2008 R2(SP1) and SQL server 2008 (SP3) and the applications using these servers are storing the credentials in a plain text json file. My issue is I need to store user credentials as access is only allowed to authorized users.
How should I go about this? Could I sub out the credentials w... | 2017/01/20 | ['https://Stackoverflow.com/questions/41768980', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5537602/'] | You can create alert window outside your application by using WindowManager api
[What is WindowManager in android?](https://stackoverflow.com/questions/19846541/what-is-windowmanager-in-android)
Code Snippet
```
WindowManager.LayoutParams p = new WindowManager.LayoutParams(
// Shrink the window to wrap the content r... | make a consistent alarm manager service class, and research on alert.dialogue activity. After displaying message through box check this link below
[Execute function after 5 seconds in Android](https://stackoverflow.com/questions/31041884/execute-function-after-5-seconds-in-android)
and call finish(); function to clo... |
15,210,996 | I am getting the result set from the controller to the jsp page where I have a table.
I inserted all the data coming from resultset to the of that table.
**The problem I am having is that data is coming in only one column.** What I want to do is just limit the data to 5 in each column (5 in col 1, 5 in col 2, 5 in c... | 2013/03/04 | ['https://Stackoverflow.com/questions/15210996', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1847801/'] | The syntax error is irrelevant in the long run.
In Android your *must* start an Activity with an Intent. (See [this Developer's Guide article](https://developer.android.com/guide/components/activities.html#StartingAnActivity).) When you want to start Game use:
```
Intent intent = new Intent(this, Game.class);
startA... | ```
number = num.Game(value);
```
I don't see a method `Game(int value)` in your `Game` class. You need to create this method in your class:
```
public int Game(int value){
//code
}
```
I am also not sure you can name a method the same name as your class. I assume the fact it has a return value in the signature... |
15,210,996 | I am getting the result set from the controller to the jsp page where I have a table.
I inserted all the data coming from resultset to the of that table.
**The problem I am having is that data is coming in only one column.** What I want to do is just limit the data to 5 in each column (5 in col 1, 5 in col 2, 5 in c... | 2013/03/04 | ['https://Stackoverflow.com/questions/15210996', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1847801/'] | The syntax error is irrelevant in the long run.
In Android your *must* start an Activity with an Intent. (See [this Developer's Guide article](https://developer.android.com/guide/components/activities.html#StartingAnActivity).) When you want to start Game use:
```
Intent intent = new Intent(this, Game.class);
startA... | Case - In `<init>`
------------------
Here's my modified proposed code for `RandomMathQuestionGenerator`:
```
public class RandomMathQuestionGenerator {
private Game num;
private int number;
public RandomMathQuestionGenerator() {
num = new Game();
number = num.value;
// Existing code here
}
// ... |
15,136,935 | What will be the C++ equivalemt command for below mentioned php command:
```
$command = shell_exec("sqlldr {$connect_string} control={$ctl_file_name} log={$log_file_name}");
``` | 2013/02/28 | ['https://Stackoverflow.com/questions/15136935', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2107491/'] | So based on your comments a solution that would work would be to use popen(3):
```
#include <cstdio>
#include <iostream>
#include <string>
int main()
{
// Set file names based on your input etc... just using dummies below
std::string
ctrlFileName = "file1",
logFileName = "file2",
cmd = "sqlldr u... | Try `forkpty`, you get a file descriptor which you can use to read from the other pseudoterminal. |
1,731,818 | This is one of those "there's gotta be a better way" questions. Let me set up the problem, then I'll give you my hacked solution, and perhaps you can suggest a better solution. Thanks!
Lets take this little tidbit of PL/SQL
```
DECLARE
TYPE foo_record IS RECORD (foo%type, bar%type);
TYPE foo_records IS TABLE OF foo... | 2009/11/13 | ['https://Stackoverflow.com/questions/1731818', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1181/'] | The easiest way:
```
arr_foos.Delete();
```
Other way is to declare the variable inside the `FOR` loop. This way it will be recreated for each pass.
Like this:
```
DECLARE
TYPE foo_record IS RECORD (foo%type, bar%type);
TYPE foo_records IS TABLE OF foo_record INDEX BY PLS_INTEGER;
CURSOR monkeys is SELECT... | Are you going to read data from zoo table into a collection? Then there's a better way:
```
DECLARE
type foos_ts is table of zoo.foo%type index by pls_integer;
foos foos_t;
BEGIN
select foo
bulk collect into foos
from zoo;
...
END;
```
Bulk collect automatically clears the collection before fetching, and... |
23,235,122 | I'm making Json format data editor with Qt treeview and Qt Json support.
I wanna pass QJsonObject or QJsonArray reference parameter to function.
This works:
```
void makeJsonData(QJsonObject &obj) {
obj.insert("key", 1234);
}
//call makeJsonData()
QJsonObject jobj;
makeJsonData(jobj);
int keysize = jobj.keys().siz... | 2014/04/23 | ['https://Stackoverflow.com/questions/23235122', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1391099/'] | There are a couple ways I see to solve your problem:
**Option 1** (as mentioned in my comment)
A dynamic cast can be used like so:
```
bool makeJsonData(void* obj) {
QJsonObject* asObj = dynamic_cast<QJsonObject*>(obj);
QJsonArray* asArray = dynamic_cast<QJsonArray*>(obj);
if (asObj) {
//do what... | You may need to add this:
```
#include <QJsonArray>
``` |
40,441,026 | My bootstrap navbar that i got from the bootstrap jumbotron example won't collapse. If it is that i dont have the right javascript, css or Jquery links pls send me the right ones. I am kinda new to the navbar thing so i really need some help. Thank you!
Here is my code:
```
<nav class="navbar navbar-inverse navbar-s... | 2016/11/05 | ['https://Stackoverflow.com/questions/40441026', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/6355698/'] | Just figured out, since the object of the shape `(362L,)` is really a pandas series, I just need to change it to dataframe, like this:
```
pd.DataFrame(df)
```
That's it! | use
```
df.iloc[:, 0].apply(pd.Series)
``` |
32,995,441 | So I have a table (table A) with a list of drivers and the races they entered and their finishing position
Fields are
```
Date of race
Driver id
Finishing position
```
I want to create a left join query where I can have the above 3 fields and then then joined on them the previous race that the driver entered and it... | 2015/10/07 | ['https://Stackoverflow.com/questions/32995441', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5094247/'] | You could try multiple (say, 1000) values per INSERT:
```
START TRANSACTION;
CREATE TABLE foo (a INTEGER, b STRING);
INSERT INTO foo VALUES (1, 'a'), (2, 'b'), (3, 'c');
COMMIT;
```
But really, bulk load with `COPY INTO` is generally a much better idea... | <https://www.nuget.org/packages/MonetDb.Mapi>
```
int count;
string tableName; // "\"MyTable\""
string columns; // '"' + string.Join("\", \"", columnArray) + '"'
dbCommand.Execute($"COPY {count} RECORDS INTO {tableName} FROM STDIN ({columns}) DELIMITERS ',','\\n','\\'';");
string records; // string.Join('\n', recArr... |
10,037,932 | I'm trying to access the JSON response from the Bing API using Knockout.js. Below is my javascript code and the corresponding Knockoutjs bindings I'm using in the html. I also included a screenshot of the object I'm trying to access. From the object I need to get Thumbnail.Url and assign that value to the HREF attribut... | 2012/04/06 | ['https://Stackoverflow.com/questions/10037932', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/549273/'] | Couple of things.
If you are binding the object in your console directly then you will need to be referencing from the property `SearchResponse` since that would be the first property in your viewModel.
Also an image tag is normally self closing, minor gripe, it does however not use `href` instead you should be setti... | `img` tags use `src` instead of `href`. You would want to do `attr: { src: Thumbnail.Url }` |
40,451,226 | I have one page where I've put three tabs. After clicking on each tab, the related text gets changed. I want to put three images for each of the tab so when a user clicks the tab, the image should get changed.
Sharing the theme link:
<https://www.themographics.com/wordpress/docdirect/>
Here's how the text gets change... | 2016/11/06 | ['https://Stackoverflow.com/questions/40451226', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5997920/'] | Add the following line to your **.htaccess**, so the server can recognize svg files from your css file (background: url("images/CC\_logo.svg") no-repeat center top;), Insert this line:
```
RewriteRule !\.(js|ico|gif|jpg|jpeg|svg|bmp|png|css|pdf|swf|mp3|mp4|3gp|flv|avi|rm|mpeg|wmv|xml|doc|docx|xls|xlsx|csv|ppt|pptx|zip... | Make sure that your SVG was exported properly. I've found problems with Photoshop images exported as SVGs but I've never had an issue with Illustrator files exported as SVGs. |
66,035,511 | I get the title and the text below when I try and fail to build an .aab file using flutter build appbundle:
>
> java.util.concurrent.ExecutionException: java.lang.RuntimeException: jarsignerfailed with exit code 1 :
> jarsigner: Certificate chain not found for: keystore. keystore must reference a valid KeyStore key e... | 2021/02/03 | ['https://Stackoverflow.com/questions/66035511', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/7311347/'] | As dumb as this may sound, I spent 24 hours on this and all I had to was enter `flutter clean` | You have `keyAlias=keystore` in your key.properties while it looks like the alias you created is named `upload` (see in your `keytool export` command).
Repleace with `keyAlias=upload` and that should work if your password is correct. |
728,190 | I am having problem with the find and grep commands. I want to find the files which are `*.doc` and match the pattern `Danish` from that file with grep command. I am using -exec to combine them but it give an error i do not know what is that. It said that the `-exec` argument is missing.
? What specs should I pay close attention to? | 2010/07/15 | ['https://photo.stackexchange.com/questions/135', 'https://photo.stackexchange.com', 'https://photo.stackexchange.com/users/54/'] | One consideration (this is a generalization, but most generalizations are based on some facts) is that usually the longer the zoom range, the quality of the image will suffer. As an example, the mega-zooms (28-300mm for example) will usually result in softer images (especially at either end of the zoom range) than a le... | 1. The zoom factor of course
2. Aperture, if aperture value is low you will either be able to take better photo in darkness and/or do blur effect in lower focus distance
3. Min. focus distance, you will not be able to take a correct shoot if subject is closer than this distance
4. Weight depending of your need you migh... |
135 | What should I be aware of when buying a zoom lens (other than that it will fit my camera)? What specs should I pay close attention to? | 2010/07/15 | ['https://photo.stackexchange.com/questions/135', 'https://photo.stackexchange.com', 'https://photo.stackexchange.com/users/54/'] | 1. The zoom factor of course
2. Aperture, if aperture value is low you will either be able to take better photo in darkness and/or do blur effect in lower focus distance
3. Min. focus distance, you will not be able to take a correct shoot if subject is closer than this distance
4. Weight depending of your need you migh... | If you know someone with the lens you are interested in, or a similar one, borrow and use it if you can. That goes way beyond reviews! |
135 | What should I be aware of when buying a zoom lens (other than that it will fit my camera)? What specs should I pay close attention to? | 2010/07/15 | ['https://photo.stackexchange.com/questions/135', 'https://photo.stackexchange.com', 'https://photo.stackexchange.com/users/54/'] | 1. The zoom factor of course
2. Aperture, if aperture value is low you will either be able to take better photo in darkness and/or do blur effect in lower focus distance
3. Min. focus distance, you will not be able to take a correct shoot if subject is closer than this distance
4. Weight depending of your need you migh... | I'm a big fan of Thom Hogan's lens reviews. <http://bythom.com/nikon.htm> |
135 | What should I be aware of when buying a zoom lens (other than that it will fit my camera)? What specs should I pay close attention to? | 2010/07/15 | ['https://photo.stackexchange.com/questions/135', 'https://photo.stackexchange.com', 'https://photo.stackexchange.com/users/54/'] | One consideration (this is a generalization, but most generalizations are based on some facts) is that usually the longer the zoom range, the quality of the image will suffer. As an example, the mega-zooms (28-300mm for example) will usually result in softer images (especially at either end of the zoom range) than a le... | If you know someone with the lens you are interested in, or a similar one, borrow and use it if you can. That goes way beyond reviews! |
135 | What should I be aware of when buying a zoom lens (other than that it will fit my camera)? What specs should I pay close attention to? | 2010/07/15 | ['https://photo.stackexchange.com/questions/135', 'https://photo.stackexchange.com', 'https://photo.stackexchange.com/users/54/'] | One consideration (this is a generalization, but most generalizations are based on some facts) is that usually the longer the zoom range, the quality of the image will suffer. As an example, the mega-zooms (28-300mm for example) will usually result in softer images (especially at either end of the zoom range) than a le... | I'm a big fan of Thom Hogan's lens reviews. <http://bythom.com/nikon.htm> |
135 | What should I be aware of when buying a zoom lens (other than that it will fit my camera)? What specs should I pay close attention to? | 2010/07/15 | ['https://photo.stackexchange.com/questions/135', 'https://photo.stackexchange.com', 'https://photo.stackexchange.com/users/54/'] | If you know someone with the lens you are interested in, or a similar one, borrow and use it if you can. That goes way beyond reviews! | I'm a big fan of Thom Hogan's lens reviews. <http://bythom.com/nikon.htm> |
14,582,431 | Did anyone managed to use @Convert annotation with DataNucleus? Do you have a working example or a documentation link?
I tried to implement it this way
```
...
@Convert(converter = MyAttributeConverter.class)
private String[] aField;
...
```
`MyAttributeConverter` implements `javax.persistence.jpa21.AttributeConver... | 2013/01/29 | ['https://Stackoverflow.com/questions/14582431', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1210071/'] | Turn on [logging](http://docs.aws.amazon.com/AmazonS3/latest/dev/LogFormat.html) for the S3 bucket, then (optionally) send the client directly to the bucket.
The log format includes "Bytes Sent" as well as "Object Size" and a number of other goodies including the remote IP, referring page, and request URI with query s... | Keep the request URLs the same, pointing to your EC2 instance. But instead of proxying the content from S3 to the client through your EC2 instance, have your EC2 instance redirect the user to the S3 URL.
Use an expiring signed URL for the redirect. Your EC2 instance can create the appropriate URL on each request, expi... |
58,184,449 | In `moodle 3.6` the `enrol_manual_enrol_user` does not work every time!
```
{
"exception": "moodle_exception",
"errorcode": "wsusercannotassign",
"message": "You don't have the permission to assign this role (383) to this user (2) in this course(28)."
}
``` | 2019/10/01 | ['https://Stackoverflow.com/questions/58184449', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/8031441/'] | I fell in the same error message.
If someone faced it, the permission to give to your integration user is:
moodle/role:assign
That solve the "wsusercannotassign" problem. | It took me two days to find a way to solve this problem.
In my case the web service user had all required privileges to enroll a user. The confusing thing was that the same web service user was able to create a new moodle user via the API.
After checking all those role specific right ("allow roles assignments", "allo... |
2,626,838 | Let $a\_{n} = 2^{-\frac {n}{2}}(1+i)^{n} \frac {1+n}{n}$ for n$ \in \mathbb N.$
In order to prove the $i$ is a point of accumulation of the sequence ${a\_{n}}$, I realize that I need to construct/find a subsequence $a\_{l}$ where $l \in \mathbb N$. I am perplexed with regards to $(1+i)^n$ as it does not seem to mainta... | 2018/01/29 | ['https://math.stackexchange.com/questions/2626838', 'https://math.stackexchange.com', 'https://math.stackexchange.com/users/512018/'] | You can first integrate by parts for $X > \pi$
>
> $$
> \int\_{\pi}^{X}\frac{\cos\left(x\right)}{x}\text{d}x=\left[\frac{\sin\left(x\right)}{x}\right]^{X}\_{\pi}+\int\_{\pi}^{X}\frac{\sin\left(x\right)}{x^2}\text{d}x
> $$
>
>
>
Then you can apply your inequality
$$
\left|\frac{\sin\left(X\right)}{X}\right| \leq \... | $\sum\_\limits{n=2}^{\infty} \int\_{(n-\frac 12)\pi}^{(n+\frac 12)\pi} \frac {\cos x}{x} dx$ produces an alternating series.
if $a\_n$ is an alternating series
$\sum\_\limits{n=1}^{\infty} a\_n$ converges if:
$\lim\_\limits{n\to \infty}a\_n = 0$ and for some $N, n>N \implies|a\_{n+1}| < |a\_n|$ |
2,626,838 | Let $a\_{n} = 2^{-\frac {n}{2}}(1+i)^{n} \frac {1+n}{n}$ for n$ \in \mathbb N.$
In order to prove the $i$ is a point of accumulation of the sequence ${a\_{n}}$, I realize that I need to construct/find a subsequence $a\_{l}$ where $l \in \mathbb N$. I am perplexed with regards to $(1+i)^n$ as it does not seem to mainta... | 2018/01/29 | ['https://math.stackexchange.com/questions/2626838', 'https://math.stackexchange.com', 'https://math.stackexchange.com/users/512018/'] | **Hint:**
$$
\begin{align}
\int\_\pi^\infty\frac{\cos(x)}{x}\,\mathrm{d}x
&=\sum\_{k=1}^\infty\int\_{(2k-1)\pi}^{(2k+1)\pi}\frac{\cos(x)}{x}\,\mathrm{d}x\\
&=\sum\_{k=1}^\infty\int\_{-\pi}^\pi\frac{\cos(x)}{x+2k\pi}\,\mathrm{d}x\\
&=\sum\_{k=1}^\infty\int\_0^\pi\left[\frac{\cos(x)}{x+2k\pi}-\frac{\cos(x)}{x+(2k-1)\pi}\... | $\sum\_\limits{n=2}^{\infty} \int\_{(n-\frac 12)\pi}^{(n+\frac 12)\pi} \frac {\cos x}{x} dx$ produces an alternating series.
if $a\_n$ is an alternating series
$\sum\_\limits{n=1}^{\infty} a\_n$ converges if:
$\lim\_\limits{n\to \infty}a\_n = 0$ and for some $N, n>N \implies|a\_{n+1}| < |a\_n|$ |
2,626,838 | Let $a\_{n} = 2^{-\frac {n}{2}}(1+i)^{n} \frac {1+n}{n}$ for n$ \in \mathbb N.$
In order to prove the $i$ is a point of accumulation of the sequence ${a\_{n}}$, I realize that I need to construct/find a subsequence $a\_{l}$ where $l \in \mathbb N$. I am perplexed with regards to $(1+i)^n$ as it does not seem to mainta... | 2018/01/29 | ['https://math.stackexchange.com/questions/2626838', 'https://math.stackexchange.com', 'https://math.stackexchange.com/users/512018/'] | You can first integrate by parts for $X > \pi$
>
> $$
> \int\_{\pi}^{X}\frac{\cos\left(x\right)}{x}\text{d}x=\left[\frac{\sin\left(x\right)}{x}\right]^{X}\_{\pi}+\int\_{\pi}^{X}\frac{\sin\left(x\right)}{x^2}\text{d}x
> $$
>
>
>
Then you can apply your inequality
$$
\left|\frac{\sin\left(X\right)}{X}\right| \leq \... | $$\int\_{\pi}^{+\infty}\frac{\cos x}{x}\,dx $$
is convergent by [Dirichlet's test](https://en.wikipedia.org/wiki/Dirichlet%27s_test) since $\left|\int\_I\cos(x)\,dx\right|\leq 2$ and $\frac{1}{x}$ decreases to zero on $x\geq \pi$.
Accurate upper bounds can be deduced [from the Laplace transform](https://en.wikipedia... |
2,626,838 | Let $a\_{n} = 2^{-\frac {n}{2}}(1+i)^{n} \frac {1+n}{n}$ for n$ \in \mathbb N.$
In order to prove the $i$ is a point of accumulation of the sequence ${a\_{n}}$, I realize that I need to construct/find a subsequence $a\_{l}$ where $l \in \mathbb N$. I am perplexed with regards to $(1+i)^n$ as it does not seem to mainta... | 2018/01/29 | ['https://math.stackexchange.com/questions/2626838', 'https://math.stackexchange.com', 'https://math.stackexchange.com/users/512018/'] | You can first integrate by parts for $X > \pi$
>
> $$
> \int\_{\pi}^{X}\frac{\cos\left(x\right)}{x}\text{d}x=\left[\frac{\sin\left(x\right)}{x}\right]^{X}\_{\pi}+\int\_{\pi}^{X}\frac{\sin\left(x\right)}{x^2}\text{d}x
> $$
>
>
>
Then you can apply your inequality
$$
\left|\frac{\sin\left(X\right)}{X}\right| \leq \... | **Hint:**
$$
\begin{align}
\int\_\pi^\infty\frac{\cos(x)}{x}\,\mathrm{d}x
&=\sum\_{k=1}^\infty\int\_{(2k-1)\pi}^{(2k+1)\pi}\frac{\cos(x)}{x}\,\mathrm{d}x\\
&=\sum\_{k=1}^\infty\int\_{-\pi}^\pi\frac{\cos(x)}{x+2k\pi}\,\mathrm{d}x\\
&=\sum\_{k=1}^\infty\int\_0^\pi\left[\frac{\cos(x)}{x+2k\pi}-\frac{\cos(x)}{x+(2k-1)\pi}\... |
2,626,838 | Let $a\_{n} = 2^{-\frac {n}{2}}(1+i)^{n} \frac {1+n}{n}$ for n$ \in \mathbb N.$
In order to prove the $i$ is a point of accumulation of the sequence ${a\_{n}}$, I realize that I need to construct/find a subsequence $a\_{l}$ where $l \in \mathbb N$. I am perplexed with regards to $(1+i)^n$ as it does not seem to mainta... | 2018/01/29 | ['https://math.stackexchange.com/questions/2626838', 'https://math.stackexchange.com', 'https://math.stackexchange.com/users/512018/'] | **Hint:**
$$
\begin{align}
\int\_\pi^\infty\frac{\cos(x)}{x}\,\mathrm{d}x
&=\sum\_{k=1}^\infty\int\_{(2k-1)\pi}^{(2k+1)\pi}\frac{\cos(x)}{x}\,\mathrm{d}x\\
&=\sum\_{k=1}^\infty\int\_{-\pi}^\pi\frac{\cos(x)}{x+2k\pi}\,\mathrm{d}x\\
&=\sum\_{k=1}^\infty\int\_0^\pi\left[\frac{\cos(x)}{x+2k\pi}-\frac{\cos(x)}{x+(2k-1)\pi}\... | $$\int\_{\pi}^{+\infty}\frac{\cos x}{x}\,dx $$
is convergent by [Dirichlet's test](https://en.wikipedia.org/wiki/Dirichlet%27s_test) since $\left|\int\_I\cos(x)\,dx\right|\leq 2$ and $\frac{1}{x}$ decreases to zero on $x\geq \pi$.
Accurate upper bounds can be deduced [from the Laplace transform](https://en.wikipedia... |
482,562 | I am facing an issue that some packets sent out to internet from inside network were missing. The pattern we are using is like:
```
Client A ←→ Switch A ← Router A:NAT ← .. Network ..
→ Router B:NAT → Switch B ←→ Server B
```
I want to do below two steps to track the issue:
1. Capture the packets which are... | 2013/02/24 | ['https://serverfault.com/questions/482562', 'https://serverfault.com', 'https://serverfault.com/users/161970/'] | >
> Server B never received the packet
>
>
>
If you run Wireshark from Server B is ok; if not please consider you would need a managed switch configuring a "mirror/span/monitor" port where you connect to Wireshark's PC.
I would stick with Wireshark moving it to see packets between the Router B and the Switch B (c... | I think it is important to get more information, switches don't do NAT (but routers do), and different routers have widely varying abilities. I've never heard the term "checking the translation table" when referring to switches or routers, but I do understand what you mean with respect of routers.
You will most likely... |
482,562 | I am facing an issue that some packets sent out to internet from inside network were missing. The pattern we are using is like:
```
Client A ←→ Switch A ← Router A:NAT ← .. Network ..
→ Router B:NAT → Switch B ←→ Server B
```
I want to do below two steps to track the issue:
1. Capture the packets which are... | 2013/02/24 | ['https://serverfault.com/questions/482562', 'https://serverfault.com', 'https://serverfault.com/users/161970/'] | >
> Server B never received the packet
>
>
>
If you run Wireshark from Server B is ok; if not please consider you would need a managed switch configuring a "mirror/span/monitor" port where you connect to Wireshark's PC.
I would stick with Wireshark moving it to see packets between the Router B and the Switch B (c... | Here is an outline of a few ideas, and perhaps others know of how to do it in detail.
Use a linux machine router.
Perhaps Tomato or DDWRT can. So if your router supports that firmware / if you bought one that supports it, you could try that.
You commented `"The reason why I want to perform the two actions is that ... |
37,704,027 | I was trying to bootstrap my application using code below in a `boot.ts` file:
```
import {bootstrap} from 'angular2/platform/browser'
import {ROUTER_PROVIDERS} from 'angular2/router'
import {AppComponent} from './app.component'
bootstrap(AppComponent,[ROUTER_PROVIDERS]);
```
It worked fine.
Now I wanted to t... | 2016/06/08 | ['https://Stackoverflow.com/questions/37704027', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1572356/'] | `@angular` is for RC (release candidate) versions and `angular2` for beta versions.
In RC versions, for example, `angular2/core` becomes `@angular/core`. You can also notice that the SystemJS configuration is different since you don't have bundled JS files.
Now you need to configure Angular2 modules into map and pack... | This is new for Angular2 versions after beta.x, and therefore `=> Angular2 RC.0`
Versions `<= Angular2 beta.x` use `angular2` |
31,412,283 | I have a CMS that I intend to use for a number of websites on Azure.
I want to be able to create clones of the website easily and have them deployed to Azure.
Azure Automation was suggested as one possible solution, does this service fit my need?
Which Azure service should I use to do this? | 2015/07/14 | ['https://Stackoverflow.com/questions/31412283', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4429847/'] | Use `lapply`, not `sapply`, along with creating a custom environment:
```
O_envir<-new.env()
O_envir$Orig<-.45
func<-function(n){
O_envir$Orig<-pmin(O_envir$Orig*(1+Adjusted[n,]),100)
return(O_envir$Orig)
}
rbind(O_envir$Orig,
do.call(rbind,lapply(1:12,func)))
``` | Here's an [Rcpp](http://cran.r-project.org/web/packages/Rcpp/index.html) implementation:
```
library('Rcpp');
cppFunction('
NumericMatrix makeOriginal(double orig, int NR, int NC ) {
NumericMatrix m(NR,NC);
for (size_t c = 0; c < NC; ++c)
m[c*NR] = orig;
for (size_t r = 1; r < N... |
31,412,283 | I have a CMS that I intend to use for a number of websites on Azure.
I want to be able to create clones of the website easily and have them deployed to Azure.
Azure Automation was suggested as one possible solution, does this service fit my need?
Which Azure service should I use to do this? | 2015/07/14 | ['https://Stackoverflow.com/questions/31412283', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4429847/'] | No need for sapply, as far as I can see. Try something like this.
```
adj1 <- 1 + rbind(0, Adjusted)
adjprod <- apply(adj1, 2, cumprod)
result <- Orig * adjprod
result[result > 100] <- 100
result
``` | Here's an [Rcpp](http://cran.r-project.org/web/packages/Rcpp/index.html) implementation:
```
library('Rcpp');
cppFunction('
NumericMatrix makeOriginal(double orig, int NR, int NC ) {
NumericMatrix m(NR,NC);
for (size_t c = 0; c < NC; ++c)
m[c*NR] = orig;
for (size_t r = 1; r < N... |
2,235,118 | >
> Suppose that polynomial $x^4+x+1$ has multiple roots over a field of
> characteristic $p$ . What are the possible values of $p$?
>
>
>
My solution :
Set $f=x^4+x+1$. Suppose the multiple root is $m$ . So $f,f'$ (the formal derivative of $f$) have root $m$ in the field of characteristic $p$.
Hence $m^4+m+1=... | 2017/04/15 | ['https://math.stackexchange.com/questions/2235118', 'https://math.stackexchange.com', 'https://math.stackexchange.com/users/71612/'] | Hint:
Find the quotient and remainder when $(27)(4m^3 + 1)$ is divided by $3m+4$. | Using the [extended Euclidean algorithm](http://www.wolframalpha.com/input/?i=PolynomialExtendedGCD%5Bx%5E4+%2B+x+%2B+1,+4+x%5E3+%2B+1%5D) we get
$$
229 = (x^4 + x + 1)(144 x^2 - 192 x + 256)+(4 x^3 + 1)(-36 x^3 + 48 x^2 - 64 x - 27)
$$
This can also be found by computing the [resultant](http://www.wolframalpha.com/inp... |
2,235,118 | >
> Suppose that polynomial $x^4+x+1$ has multiple roots over a field of
> characteristic $p$ . What are the possible values of $p$?
>
>
>
My solution :
Set $f=x^4+x+1$. Suppose the multiple root is $m$ . So $f,f'$ (the formal derivative of $f$) have root $m$ in the field of characteristic $p$.
Hence $m^4+m+1=... | 2017/04/15 | ['https://math.stackexchange.com/questions/2235118', 'https://math.stackexchange.com', 'https://math.stackexchange.com/users/71612/'] | Hint:
Find the quotient and remainder when $(27)(4m^3 + 1)$ is divided by $3m+4$. | $$3m+4 \equiv 0 \pmod{p} \\
3m \equiv -4 \pmod{p} \\
27m^3 \equiv -64 \pmod{p}$$
You also have
$$4m^3\equiv -1 \pmod{p}$$
Denote $m^3=:x$ then
$$27x \equiv -64 \pmod{p} \\
4x \equiv -1 \pmod{p}$$
Multiply first equation by 4, second by 27 and subtract. |
63,792,397 | It's well documented that Chrome and Firefox ignore the standard autocomplete="off" attribute in html as they (Google) feel it wasn't being used correctly. They have even come up with workarounds and their own set of values for autofilling fields.
However, We need to prevent users passwords from being auto-filled for ... | 2020/09/08 | ['https://Stackoverflow.com/questions/63792397', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/564297/'] | ### New approach
I know how frustrating it is to try all solutions and seeing user and password fields ignore them.
Unforturnately, I haven't found a straightforward way of doing this, but I have a workaround for avoiding user password fields getting autofilled.
### The problem
The main problem is that if you set i... | Actually, i've recently faced this issue, and a workaround which worked form me is just setting the value as an empty string on a method (can be onload, for example if the input is in your main screen). Would be something like:
```
let login = document.querySelector('#inputLogin');
let password = document.querySelecto... |
11,289,956 | I wanted to know in what language has the desktop application of Dropbox been coded?
Is it Python or Ruby? | 2012/07/02 | ['https://Stackoverflow.com/questions/11289956', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1495471/'] | Replace this lines
```
File myFile = new File("sdcard/mysdfile.txt");
if(!myFile.exists()){
myFile.mkdirs();
}
myFile = new File("sdcard/mysdfile.txt");
```
with
//Saving the parsed data.........
```
File myFile = new File(Environment.getExternalStorageDirectory()+"/mysdfile.txt");
myFile.createNewFile();
``` | ```
File myFile = new File("sdcard/mysdfile.txt");
```
Should be changed to
```
File myFile = new File("/mnt/sdcard/mysdfile.txt");
``` |
11,289,956 | I wanted to know in what language has the desktop application of Dropbox been coded?
Is it Python or Ruby? | 2012/07/02 | ['https://Stackoverflow.com/questions/11289956', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1495471/'] | First thing, your `AndroidManifest.xml` file is correct. So no need to correct that. Though I would recommend organizing your permissions in one place.
### Writing File to Internal Storage
```
FileOutputStream fOut = openFileOutput("myinternalfile.txt",MODE_WORLD_READABLE);
OutputStreamWriter osw = new OutputStreamWr... | Replace this lines
```
File myFile = new File("sdcard/mysdfile.txt");
if(!myFile.exists()){
myFile.mkdirs();
}
myFile = new File("sdcard/mysdfile.txt");
```
with
//Saving the parsed data.........
```
File myFile = new File(Environment.getExternalStorageDirectory()+"/mysdfile.txt");
myFile.createNewFile();
``` |
11,289,956 | I wanted to know in what language has the desktop application of Dropbox been coded?
Is it Python or Ruby? | 2012/07/02 | ['https://Stackoverflow.com/questions/11289956', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1495471/'] | First thing, your `AndroidManifest.xml` file is correct. So no need to correct that. Though I would recommend organizing your permissions in one place.
### Writing File to Internal Storage
```
FileOutputStream fOut = openFileOutput("myinternalfile.txt",MODE_WORLD_READABLE);
OutputStreamWriter osw = new OutputStreamWr... | ```
File myFile = new File("sdcard/mysdfile.txt");
```
Should be changed to
```
File myFile = new File("/mnt/sdcard/mysdfile.txt");
``` |
682,211 | I'm having a bit of difficulty with Cisco AnyConnect v3.1 in regards to automatic login. I have to stay connected to a single server all day every day, and it would be super if I didn't have to dig up my 16 char password each and every day. I'd love for the client to log on automatically, but I'm not even sure at this ... | 2013/11/29 | ['https://superuser.com/questions/682211', 'https://superuser.com', 'https://superuser.com/users/278026/'] | Here is my script to launch Cisco AnyConnect Mobility Client v3.1 and log in automatically. Save this script as *FILENAME.vbs*, replace *PASSWORD* with your password, replace the path to the VPN Client exe if needed (probably not), and you may also need to adjust the 2nd sleep time as well depending on your connection ... | I'm answering my own question with this "meh" answer - it's not what I was after, and I'll gladly accept another answer that can better answer my original question.
Since I didn't have any luck with automatic logins, the next best thing I could think of was to have my ridiculously long password automatically copied to... |
682,211 | I'm having a bit of difficulty with Cisco AnyConnect v3.1 in regards to automatic login. I have to stay connected to a single server all day every day, and it would be super if I didn't have to dig up my 16 char password each and every day. I'd love for the client to log on automatically, but I'm not even sure at this ... | 2013/11/29 | ['https://superuser.com/questions/682211', 'https://superuser.com', 'https://superuser.com/users/278026/'] | I use something along these lines:
```
set FILE=%TEMP%\tmp
echo connect your.host.name> %FILE%
(echo 0)>> %FILE%
echo yourUserName>> %FILE%
echo yourPassWord>> %FILE%
"C:\Program Files\Cisco\Cisco AnyConnect Secure Mobility Client\vpncli.exe" -s < %FILE%
```
(**Update:** Why the parentheses around `echo 0`? This sho... | I'm answering my own question with this "meh" answer - it's not what I was after, and I'll gladly accept another answer that can better answer my original question.
Since I didn't have any luck with automatic logins, the next best thing I could think of was to have my ridiculously long password automatically copied to... |
240,450 | I am trying to mount a disk image (consisting of MBR, fat, ext4 partitions) so I can modify the layout using `gparted`. (I am trying to move the partition to a 4M boundary.)
I have tried `sudo mount img mountpoint -o loop` without success.
How can I achieve this? | 2015/11/03 | ['https://unix.stackexchange.com/questions/240450', 'https://unix.stackexchange.com', 'https://unix.stackexchange.com/users/47111/'] | Normally partitioning tools require that partitions are not mounted. You should use `parted` or `gparted` directly on the image file using:
```
parted /path/to/disk.img
```
Sample output:
```
$ parted VirtualBox\ VMs/centos/VMDK-test-flat.vmdk
WARNING: You are not superuser. Watch out for permissions.
GNU Parted ... | I don't know if you may resize or move your partition on an image, but there is a tool for mounting partitions within an image file, **kpartx**. I never used it, but you can take a look here: <http://robert.penz.name/73/kpartx-a-tool-for-mounting-partitions-within-an-image-file/> |
240,450 | I am trying to mount a disk image (consisting of MBR, fat, ext4 partitions) so I can modify the layout using `gparted`. (I am trying to move the partition to a 4M boundary.)
I have tried `sudo mount img mountpoint -o loop` without success.
How can I achieve this? | 2015/11/03 | ['https://unix.stackexchange.com/questions/240450', 'https://unix.stackexchange.com', 'https://unix.stackexchange.com/users/47111/'] | You don't have to mount image to edit its partition table. Make `gparted` work directly with your image:
```
sudo gparted /path/to/img
```
EDIT: `mount` is a term related to file systems. You can mount an image of file system. Image of disk containing partition table is an image of block device, which is generally n... | I don't know if you may resize or move your partition on an image, but there is a tool for mounting partitions within an image file, **kpartx**. I never used it, but you can take a look here: <http://robert.penz.name/73/kpartx-a-tool-for-mounting-partitions-within-an-image-file/> |
27,188,074 | I have table structre like this:
Table `MainTable`
Columns:
```
Id INT,
TableName Varchar(50),
StartValue VARCHAR(50)
```
Here TableName column have names of all the tables present in the database
Now I need to update "StartValue" column in `MainTable` from corresponding tables. Any idea how to achieve this?
... | 2014/11/28 | ['https://Stackoverflow.com/questions/27188074', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1654393/'] | Adding a check for `EXISTS` on the `INSERT` statement should not have a significant effect on performance.
```
INSERT INTO Employee ([Name] ,[Lname] ,[Code])
SELECT [Name] ,[Lname] ,@Code
FROM @tblEmp AS t
WHERE NOT EXISTS
( SELECT 1
FROM Employee AS e
WHERE e.Name = t.N... | If the table has a primary key that is not set to auto generate then it will error when you try to insert a record without the key. You will need to either set the primary key field as an identity seed or you can include the primary key with the insert. |
2,704,534 | Does the following converge or diverge?
$$
\sum\_{n=2}^{\infty} a\_n^{-n},
$$
where$$
a\_n = \int\_1^n \sin{\left(\frac{1}{\sqrt{x}}\right)} \,\mathrm{d}x.
$$
My friends thought this sum would converge. I think we should do the square root test, checking the value of $t=\lim\limits\_{n \to \infty} \dfrac{1}{a\_n}$. And... | 2018/03/23 | ['https://math.stackexchange.com/questions/2704534', 'https://math.stackexchange.com', 'https://math.stackexchange.com/users/544878/'] | Your approach is correct: $a\_n$ is positive and by applying the root test the convergence of the series $\sum\_n (1/a\_n)^{n}$ follows as soon as you show that $1/a\_n\to L<1$. Here we have that $1/a\_n\to 0$ so $\sum\_n (1/a\_n)^{n}$ converges.
In fact, $\sin(t)\geq 2t/\pi$ for $t\in [0,\pi/2]$ ($\sin(x)$ is concave... | As $n\to +\infty$ you have that asymptotically
$$\int\_1^n\sin\frac{1}{\sqrt{x}} \sim 2\sqrt{n}$$
Thence the related series goes like $\frac{1}{n^{n+1/2}}$ which converges. |
2,704,534 | Does the following converge or diverge?
$$
\sum\_{n=2}^{\infty} a\_n^{-n},
$$
where$$
a\_n = \int\_1^n \sin{\left(\frac{1}{\sqrt{x}}\right)} \,\mathrm{d}x.
$$
My friends thought this sum would converge. I think we should do the square root test, checking the value of $t=\lim\limits\_{n \to \infty} \dfrac{1}{a\_n}$. And... | 2018/03/23 | ['https://math.stackexchange.com/questions/2704534', 'https://math.stackexchange.com', 'https://math.stackexchange.com/users/544878/'] | From $\sin x<x$, and for $n>4$,
$$\left(\int\_1^n\sin\frac1{\sqrt x}dx\right)^{-n}<\left(2\sqrt n\right)^{-n}<\frac1{n^2}$$
and the series converges. | As $n\to +\infty$ you have that asymptotically
$$\int\_1^n\sin\frac{1}{\sqrt{x}} \sim 2\sqrt{n}$$
Thence the related series goes like $\frac{1}{n^{n+1/2}}$ which converges. |
15,855,762 | I need to include and/or statement to an if condition in google script. I am new to script and am not able to find a way to do so. Please help
```
if (dateval<>"") and (repval<>"") {condition if true}
```
Thank you for the help. | 2013/04/06 | ['https://Stackoverflow.com/questions/15855762', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2252756/'] | you can find all the infos on [that subject](http://www.w3schools.com/js/js_comparisons.asp) (and others ) [on this site.](http://www.w3schools.com/js/)
in your example the answer is
```
if (dateval!="" && repval!="") {do something}
``` | Logic Symbol
Or ||
And &&
Equal ==
Not !=
<https://www.w3schools.com/js/js_comparisons.asp> |
15,855,762 | I need to include and/or statement to an if condition in google script. I am new to script and am not able to find a way to do so. Please help
```
if (dateval<>"") and (repval<>"") {condition if true}
```
Thank you for the help. | 2013/04/06 | ['https://Stackoverflow.com/questions/15855762', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2252756/'] | you can find all the infos on [that subject](http://www.w3schools.com/js/js_comparisons.asp) (and others ) [on this site.](http://www.w3schools.com/js/)
in your example the answer is
```
if (dateval!="" && repval!="") {do something}
``` | I tried [Serge insas's answer](https://stackoverflow.com/a/15855859) and found out that it did not compile.
I messed around, modifying the line as follows:
```
if ((dateval<>"") and (repval<>"")) {condition if true}
```
I finally got this to work. Apparently, it needs the extra parentheses. |
15,855,762 | I need to include and/or statement to an if condition in google script. I am new to script and am not able to find a way to do so. Please help
```
if (dateval<>"") and (repval<>"") {condition if true}
```
Thank you for the help. | 2013/04/06 | ['https://Stackoverflow.com/questions/15855762', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2252756/'] | Logic Symbol
Or ||
And &&
Equal ==
Not !=
<https://www.w3schools.com/js/js_comparisons.asp> | I tried [Serge insas's answer](https://stackoverflow.com/a/15855859) and found out that it did not compile.
I messed around, modifying the line as follows:
```
if ((dateval<>"") and (repval<>"")) {condition if true}
```
I finally got this to work. Apparently, it needs the extra parentheses. |
4,900 | In the lyrics of *Friends Will Be Friends* by *Queen*:
>
> Another red letter day
>
> So the pound has dropped and **the children are creating**.
>
>
>
What does the phrase highlighted in bold mean? | 2010/11/10 | ['https://english.stackexchange.com/questions/4900', 'https://english.stackexchange.com', 'https://english.stackexchange.com/users/2038/'] | Queen is a British band, and this usage of the intransitive *create* is British colloquial for "create a fuss", "make noise", or nearly, as ukayer says, "create havoc". The [*Compact Oxford Dictionary* has this](http://www.oxforddictionaries.com/definition/create?view=uk):
>
> 2 [*no object*] *British informal* make ... | Creating as in "creating havoc", i.e. helping to make the day even worse. |
29,598,991 | Here's a code
```
<a id="link1" href="#" >About</a>
<a id="link2" href="#">Contact us</a>
```
I want the link1's color to be changed when link2 is hovered.
Is it possible with css?. | 2015/04/13 | ['https://Stackoverflow.com/questions/29598991', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4466855/'] | Since CSS does not seem to be able to handle this, try JavaScript
```js
window.onload=function() {
document.getElementById("link2").onmouseover=function() {
document.getElementById("link1").style.color="red";
}
document.getElementById("link2").onmouseout=function() {
document.getElementById("link1").styl... | Using pure css it is not possible go backward. You can go in cascading ways.
But, you can do it with JQuery. like:
```js
$(document).ready(function(){
$(".link2").mouseover(function(){
$(".link1").css("color", "red");
});
$(".link2").mouseout(function(){
$(".link1").css("color", "black")... |
29,598,991 | Here's a code
```
<a id="link1" href="#" >About</a>
<a id="link2" href="#">Contact us</a>
```
I want the link1's color to be changed when link2 is hovered.
Is it possible with css?. | 2015/04/13 | ['https://Stackoverflow.com/questions/29598991', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4466855/'] | Since CSS does not seem to be able to handle this, try JavaScript
```js
window.onload=function() {
document.getElementById("link2").onmouseover=function() {
document.getElementById("link1").style.color="red";
}
document.getElementById("link2").onmouseout=function() {
document.getElementById("link1").styl... | CSS can't select the previous siblings. You can use JavaScript:
```
var links = [].slice.call(document.querySelectorAll('.menu_item'));
function hover(event) {
var pre = this.previousElementSibling,
method = event.type === 'mouseenter' ? 'add' : 'remove';
if (pre) {
pre.classList[method]('active... |
29,598,991 | Here's a code
```
<a id="link1" href="#" >About</a>
<a id="link2" href="#">Contact us</a>
```
I want the link1's color to be changed when link2 is hovered.
Is it possible with css?. | 2015/04/13 | ['https://Stackoverflow.com/questions/29598991', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4466855/'] | Since CSS does not seem to be able to handle this, try JavaScript
```js
window.onload=function() {
document.getElementById("link2").onmouseover=function() {
document.getElementById("link1").style.color="red";
}
document.getElementById("link2").onmouseout=function() {
document.getElementById("link1").styl... | Use JavaScript to do that( `link1`'s color to be changed when `link2` is hovered ). You need to use html tag attributes like `onmouseover` and `onmouseout`.
Try this code. For changing color of `link1` when `link2` is hovered.
```
<html>
<head>
<script>
function colorchange(){
document.getElementById("link1").sty... |
29,598,991 | Here's a code
```
<a id="link1" href="#" >About</a>
<a id="link2" href="#">Contact us</a>
```
I want the link1's color to be changed when link2 is hovered.
Is it possible with css?. | 2015/04/13 | ['https://Stackoverflow.com/questions/29598991', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4466855/'] | Since CSS does not seem to be able to handle this, try JavaScript
```js
window.onload=function() {
document.getElementById("link2").onmouseover=function() {
document.getElementById("link1").style.color="red";
}
document.getElementById("link2").onmouseout=function() {
document.getElementById("link1").styl... | I suppose this is what are you looking for.
First you need to wrap your links inside a container like this
```
<div class='container'>
<a id="link1" href="#" >About</a>
<a id="link2" href="#">Contact us</a>
</div>
```
and then apply this styles
```
.container:hover a:not(:hover){
color:red;
}
```
[... |
68,178,782 | I am trying to plot two columns from my dataset (the columns are 'cases' and 'vaccinations') on the same line graph. The x-axis only has one column (that is, 'country') that I want them to share. Is it possible to do this in Dash/Plotly? I can't find any solutions using Dash. Here's a snippet of my code:
```
... | 2021/06/29 | ['https://Stackoverflow.com/questions/68178782', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/11845398/'] | I hope this solves your problem.
This is implemented in Python.
First, we use imageio to import the image as an array. We need to use a modified version of your image (I filled the interior region in white).
[](https://i.stack.imgur.com/rVHKd.png)
... | For closed, non-intersecting and well oriented polygons, you can speed up the calculation of a signed distance field by limiting the work to feature extrusions based on [this paper](https://www.researchgate.net/publication/2393786_A_Fast_Algorithm_for_Computing_the_Closest_Point_and_Distance_Transform).
The closest po... |
69,151,019 | I'm working on Google Colab and when I type
`model.compile(optimizer=tf.keras.optimizers.Adam(lr=1e-6), loss=tf.keras.losses.BinaryCrossentropy())`
it doesn't work and I get the following error message
`Could not interpret optimizer identifier: <keras.optimizer_v2.adam.Adam object at 0x7f21a9b34d50>` | 2021/09/12 | ['https://Stackoverflow.com/questions/69151019', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/16871891/'] | Generally, Maybe you used a different version for the layers import and the optimizer import.
tensorflow.python.keras API for model and layers and keras.optimizers for SGD. They are two different Keras versions of TensorFlow and pure Keras. They could not work together. You have to change everything to one version. The... | Actually I am using
```
keras===2.7.0
tensorflow==2.8.0
```
and it worked for me when I used :
```
from keras.optimizers import adam_v2
```
Then
```
optimizer = adam_v2.Adam(lr=learning_rate)
model.compile(loss="binary_crossentropy", optimizer=optimizer)
```
Instead of using `tf.keras.optimizers.Adam` |
59,499,652 | I'm currently struggling with a display issue only in Firefox Android.
I have no problem on desktop neither in Android Chrome.
I'm using Angular 8 and mat-toolbar.
I wanted to use a bottom navigation bar but this flickering issue is making it look bad.
It is only when I scroll up/down fast.
The code I'm using is pret... | 2019/12/27 | ['https://Stackoverflow.com/questions/59499652', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/12606878/'] | I changed a little bit my way of thinking.
Instead of trying to overlay the navigation menu in the bottom of the screen, I used [this method](https://moduscreate.com/blog/how-to-fix-overflow-issues-in-css-flex-layouts/).
It uses a container and allow to overflow the content by displaying a scroll bar and the bottom is... | Your mat-toolbar is not a class in the html but an element, and if you have flex on it's parent you are best to use margin-top: auto on it instead of position fixed
html
```
<div class="mat-toolbar" color="primary">
<button mat-button routerLink="/home" routerLinkActive="active" fxLayout="column" fxLayoutAlign="cente... |
560,893 | I want to ask a question about thin provisioning. `get-vm` commandlet can easly give us real space used by a vm totally. Assume that you have a virtual machine which has more than one thin disk. If we want to get more detail so as to calculate each disk real used space which powercli command does this? I do not prefer ... | 2013/12/12 | ['https://serverfault.com/questions/560893', 'https://serverfault.com', 'https://serverfault.com/users/202314/'] | The actual used disk space is retrievable without accessing the datastore separately, but you won't find the information in the disk object, but rather in the VM object. It is hidden in `$vm.ExtensionData.LayoutEx.File`, which contains information about all files related to the VM, not only the disk files. So the trick... | I found the following solution:
```
(Get-VM -Name $YourVmName).Extensiondata.Guest.Disk
```
This command will give you all the disks of this vm with the provisioned size and the free space - with that you can calculate the real used size.
Source (with a complete script to list all disks): <http://www.vstrong.info/... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.