qid int64 1 74.7M | question stringlengths 0 58.3k | date stringlengths 10 10 | metadata list | response_j stringlengths 2 48.3k | response_k stringlengths 2 40.5k |
|---|---|---|---|---|---|
67,610,072 | I thought that reading data on Ethereum was supposed to be gas free, however in the contract documentation (linked below) it states that for public arrays the automatically generated getter functions only return one element at a time to avoid large gas costs.
Isn't a getter function read-only? If so, why would it incu... | 2021/05/19 | [
"https://Stackoverflow.com/questions/67610072",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12423870/"
] | There are two main ways to interact with a smart contract.
* Read-only `call` is gas free.
* Transaction (can generate state changes - storage change, event logs, ...) requires gas fees.
From the perspective of an off-chain client app, you can invoke a call using [Truffle call()](https://www.trufflesuite.com/docs/tru... | Read-only functions can incur gas costs when they are carried out during transactions, i.e. when wrapped inside a potentially state-changing function.
This is because, since this transaction requires verification, it will be executed by the networks nodes. This represents redundant work, eventually resulting in identi... |
19,681 | As per the Orange video tutorial: *youtu.be/D6zd7m2aYqU?list=PLmNPvQr9Tf-ZSDLwOzxpvY-HrE0yv-8Fy*
**I'm trying to make predictions** on a new dataset based upon one that's already been 'coded' - both data sets are formatted exactly the same, where the 'training' set has all entries marked as either 1 or 0, see below:
... | 2017/06/13 | [
"https://datascience.stackexchange.com/questions/19681",
"https://datascience.stackexchange.com",
"https://datascience.stackexchange.com/users/33361/"
] | This is because we have to exclude the target column from the second document (testing data-set).
In your example remove the column 'Status' from second file.
**Example**:
In below example, in training dataset, 'Loan\_Status' column is present which is the target field, whereas, in testing dataset, 'Loan\_Status' c... | this may be a bug in orange tool because the data sets look well formatted. I suggest you to put all data (both data sets) in one file and load it onto orange, if it is OK then split the file (separate the data) and reload the two new files and it should work. |
43,338,084 | I had been writing things like
```
char *x=NULL;
```
on the assumption that
```
char *x=2;
```
would create a `char` pointer to address 2.
But, in [The GNU C Programming Tutorial](http://www.crasseux.com/books/ctutorial/Pointers-and-initialization.html#Pointers%20and%20initialization) it says that `int *my_i... | 2017/04/11 | [
"https://Stackoverflow.com/questions/43338084",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/425713/"
] | To clarify why the tutorial is wrong, `int *my_int_ptr = 2;` is a "constraint violation", it is code which is not allowed to compile and the compiler must give you a diagnostic upon encountering it.
As per 6.5.16.1 Simple assignment:
>
> Constraints
>
>
> One of the following shall hold:
>
>
> * the left operan... | This is correct.
```
int main()
{
char * x = NULL;
if (x==NULL)
printf("is NULL\n");
return EXIT_SUCCESS;
}
```
This function is correct for what it does. It assigns the address of 0 to the char pointer x. That is, it points the pointer x to the memory address 0.
Alternative:
```
int main()
{... |
43,338,084 | I had been writing things like
```
char *x=NULL;
```
on the assumption that
```
char *x=2;
```
would create a `char` pointer to address 2.
But, in [The GNU C Programming Tutorial](http://www.crasseux.com/books/ctutorial/Pointers-and-initialization.html#Pointers%20and%20initialization) it says that `int *my_i... | 2017/04/11 | [
"https://Stackoverflow.com/questions/43338084",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/425713/"
] | >
> *Is it possible to initialize a C pointer to NULL?*
>
>
>
**TL;DR** Yes, very much.
---
[The **actual claim made on the guide** reads like](http://www.crasseux.com/books/ctutorial/Pointers-and-initialization.html#Pointers%20and%20initialization)
>
> *On the other hand, if you use just the single initial as... | this is a null pointer
```
int * nullPtr = (void*) 0;
``` |
43,338,084 | I had been writing things like
```
char *x=NULL;
```
on the assumption that
```
char *x=2;
```
would create a `char` pointer to address 2.
But, in [The GNU C Programming Tutorial](http://www.crasseux.com/books/ctutorial/Pointers-and-initialization.html#Pointers%20and%20initialization) it says that `int *my_i... | 2017/04/11 | [
"https://Stackoverflow.com/questions/43338084",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/425713/"
] | To clarify why the tutorial is wrong, `int *my_int_ptr = 2;` is a "constraint violation", it is code which is not allowed to compile and the compiler must give you a diagnostic upon encountering it.
As per 6.5.16.1 Simple assignment:
>
> Constraints
>
>
> One of the following shall hold:
>
>
> * the left operan... | I would like to add something orthogonal to the many excellent answers. Actually, initializing to `NULL` is far from bad practice and may be handy if that pointer may or may not be used to store a dynamically allocated block of memory.
```
int * p = NULL;
...
if (...) {
p = (int*) malloc(...);
...
}
...
free(p... |
43,338,084 | I had been writing things like
```
char *x=NULL;
```
on the assumption that
```
char *x=2;
```
would create a `char` pointer to address 2.
But, in [The GNU C Programming Tutorial](http://www.crasseux.com/books/ctutorial/Pointers-and-initialization.html#Pointers%20and%20initialization) it says that `int *my_i... | 2017/04/11 | [
"https://Stackoverflow.com/questions/43338084",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/425713/"
] | >
> *Is it possible to initialize a C pointer to NULL?*
>
>
>
**TL;DR** Yes, very much.
---
[The **actual claim made on the guide** reads like](http://www.crasseux.com/books/ctutorial/Pointers-and-initialization.html#Pointers%20and%20initialization)
>
> *On the other hand, if you use just the single initial as... | A lot of confusion about C pointers comes from a very bad choice that was originally made regarding coding style, corroborated by a very bad little choice in the syntax of the language.
`int *x = NULL;` is correct C, but it is very misleading, I would even say nonsensical, and it has hindered the understanding of the ... |
43,338,084 | I had been writing things like
```
char *x=NULL;
```
on the assumption that
```
char *x=2;
```
would create a `char` pointer to address 2.
But, in [The GNU C Programming Tutorial](http://www.crasseux.com/books/ctutorial/Pointers-and-initialization.html#Pointers%20and%20initialization) it says that `int *my_i... | 2017/04/11 | [
"https://Stackoverflow.com/questions/43338084",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/425713/"
] | >
> *Is it possible to initialize a C pointer to NULL?*
>
>
>
**TL;DR** Yes, very much.
---
[The **actual claim made on the guide** reads like](http://www.crasseux.com/books/ctutorial/Pointers-and-initialization.html#Pointers%20and%20initialization)
>
> *On the other hand, if you use just the single initial as... | I would like to add something orthogonal to the many excellent answers. Actually, initializing to `NULL` is far from bad practice and may be handy if that pointer may or may not be used to store a dynamically allocated block of memory.
```
int * p = NULL;
...
if (...) {
p = (int*) malloc(...);
...
}
...
free(p... |
43,338,084 | I had been writing things like
```
char *x=NULL;
```
on the assumption that
```
char *x=2;
```
would create a `char` pointer to address 2.
But, in [The GNU C Programming Tutorial](http://www.crasseux.com/books/ctutorial/Pointers-and-initialization.html#Pointers%20and%20initialization) it says that `int *my_i... | 2017/04/11 | [
"https://Stackoverflow.com/questions/43338084",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/425713/"
] | `int *my_int_ptr = 2`
>
> stores the integer value 2 to whatever random address is in my\_int\_ptr when it is allocated.
>
>
>
This is completely wrong. If this is actually written then please get a better book or tutorial.
`int *my_int_ptr = 2` defines an integer pointer which points to address 2. You will most... | This is correct.
```
int main()
{
char * x = NULL;
if (x==NULL)
printf("is NULL\n");
return EXIT_SUCCESS;
}
```
This function is correct for what it does. It assigns the address of 0 to the char pointer x. That is, it points the pointer x to the memory address 0.
Alternative:
```
int main()
{... |
43,338,084 | I had been writing things like
```
char *x=NULL;
```
on the assumption that
```
char *x=2;
```
would create a `char` pointer to address 2.
But, in [The GNU C Programming Tutorial](http://www.crasseux.com/books/ctutorial/Pointers-and-initialization.html#Pointers%20and%20initialization) it says that `int *my_i... | 2017/04/11 | [
"https://Stackoverflow.com/questions/43338084",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/425713/"
] | This is correct.
```
int main()
{
char * x = NULL;
if (x==NULL)
printf("is NULL\n");
return EXIT_SUCCESS;
}
```
This function is correct for what it does. It assigns the address of 0 to the char pointer x. That is, it points the pointer x to the memory address 0.
Alternative:
```
int main()
{... | this is a null pointer
```
int * nullPtr = (void*) 0;
``` |
43,338,084 | I had been writing things like
```
char *x=NULL;
```
on the assumption that
```
char *x=2;
```
would create a `char` pointer to address 2.
But, in [The GNU C Programming Tutorial](http://www.crasseux.com/books/ctutorial/Pointers-and-initialization.html#Pointers%20and%20initialization) it says that `int *my_i... | 2017/04/11 | [
"https://Stackoverflow.com/questions/43338084",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/425713/"
] | The tutorial is wrong. In ISO C, `int *my_int_ptr = 2;` is an error. In GNU C, it means the same as `int *my_int_ptr = (int *)2;` . This converts the integer `2` to a memory address, in some fashion as determined by the compiler.
It does not attempt to store anything in the location addressed by that address (if any).... | This is correct.
```
int main()
{
char * x = NULL;
if (x==NULL)
printf("is NULL\n");
return EXIT_SUCCESS;
}
```
This function is correct for what it does. It assigns the address of 0 to the char pointer x. That is, it points the pointer x to the memory address 0.
Alternative:
```
int main()
{... |
43,338,084 | I had been writing things like
```
char *x=NULL;
```
on the assumption that
```
char *x=2;
```
would create a `char` pointer to address 2.
But, in [The GNU C Programming Tutorial](http://www.crasseux.com/books/ctutorial/Pointers-and-initialization.html#Pointers%20and%20initialization) it says that `int *my_i... | 2017/04/11 | [
"https://Stackoverflow.com/questions/43338084",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/425713/"
] | >
> *Is it possible to initialize a C pointer to NULL?*
>
>
>
**TL;DR** Yes, very much.
---
[The **actual claim made on the guide** reads like](http://www.crasseux.com/books/ctutorial/Pointers-and-initialization.html#Pointers%20and%20initialization)
>
> *On the other hand, if you use just the single initial as... | To clarify why the tutorial is wrong, `int *my_int_ptr = 2;` is a "constraint violation", it is code which is not allowed to compile and the compiler must give you a diagnostic upon encountering it.
As per 6.5.16.1 Simple assignment:
>
> Constraints
>
>
> One of the following shall hold:
>
>
> * the left operan... |
43,338,084 | I had been writing things like
```
char *x=NULL;
```
on the assumption that
```
char *x=2;
```
would create a `char` pointer to address 2.
But, in [The GNU C Programming Tutorial](http://www.crasseux.com/books/ctutorial/Pointers-and-initialization.html#Pointers%20and%20initialization) it says that `int *my_i... | 2017/04/11 | [
"https://Stackoverflow.com/questions/43338084",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/425713/"
] | The tutorial is wrong. In ISO C, `int *my_int_ptr = 2;` is an error. In GNU C, it means the same as `int *my_int_ptr = (int *)2;` . This converts the integer `2` to a memory address, in some fashion as determined by the compiler.
It does not attempt to store anything in the location addressed by that address (if any).... | `int *my_int_ptr = 2`
>
> stores the integer value 2 to whatever random address is in my\_int\_ptr when it is allocated.
>
>
>
This is completely wrong. If this is actually written then please get a better book or tutorial.
`int *my_int_ptr = 2` defines an integer pointer which points to address 2. You will most... |
38,893,472 | I have a loop, where I want to skip cells that are coloured.
```
For i = 1 To Count
Do While ActiveCell.Offset(0, i).Interior.ColorIndex = 15
i = i + 1: Count = Count + 1
Loop
With ActiveCell.Offset(0, i).Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ThemeC... | 2016/08/11 | [
"https://Stackoverflow.com/questions/38893472",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5103224/"
] | Why use `.Offset` at all? Is this what you are trying? This way you can skip the colored cells as well.
```
Dim col As Long, rw As Long, i As Long
col = ActiveCell.Column
rw = ActiveCell.Row
For i = 1 To Count
With Cells(rw, col + i)
If .Interior.ColorIndex <> 15 Then
With .Interior
... | Probably very inefficient code, but there are not a lot of rows. Remember the idea is that the column has a date, if that column is Saturday or Sunday, i.e., coloured grey, then the code should skip those cells and but not subtract them from the overall counter.
```
If Not IsEmpty(y.Value) And IsNumeric(y.Value) And ... |
47,172,381 | I am trying to learn Google Script. I want to write a script that uses a For Loop to save the value of each cell, clear the cell, then paste that saved value back into it. The data is in cells C6 - C17. So far, I am able to get my For Loop to work clearing each cell one by one with a 1sec pause in between but I cant fi... | 2017/11/08 | [
"https://Stackoverflow.com/questions/47172381",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8896021/"
] | Values retrieved by `getValues()` is 2 dimensional array. In your script, `values` is `[["value"]]`. So for your script in your question, when you want to import `values` to a cell using `setValue()`, it is required to modify as follows.
### From :
```
source.setValue(values);
```
### To :
```
source.setValue(valu... | I was able to solve my issue by adding the command SpreadsheetApp.flush() after the source.clear() command. |
47,172,381 | I am trying to learn Google Script. I want to write a script that uses a For Loop to save the value of each cell, clear the cell, then paste that saved value back into it. The data is in cells C6 - C17. So far, I am able to get my For Loop to work clearing each cell one by one with a 1sec pause in between but I cant fi... | 2017/11/08 | [
"https://Stackoverflow.com/questions/47172381",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8896021/"
] | Values retrieved by `getValues()` is 2 dimensional array. In your script, `values` is `[["value"]]`. So for your script in your question, when you want to import `values` to a cell using `setValue()`, it is required to modify as follows.
### From :
```
source.setValue(values);
```
### To :
```
source.setValue(valu... | The answer for your second question.
Utilities.sleep only runs in the beginning of each function only one time. I hope this helps.
And unfortunately there is no such command like delay(); or something, in google script. |
87,272 | Let $x$ be random variable, such that $E(x)=0,E(x^2)=1$ and $P(x^2\geq s^2)\geq\displaystyle\frac{C}{s^t}$, where $C>0,s\geq 1 , t>0$.
Let $m<n$ and $m,n$ are natural numbers very big. Let also $L\geq 1$ .
Consider
$1-(1-\frac{n}{2}P(x^2\geq Ln))^m$.
Assume (\*) $\frac{n}{2}P(x^2\geq Ln)\leq \frac{2c\_0}{m}$, where $... | 2011/12/01 | [
"https://math.stackexchange.com/questions/87272",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/20198/"
] | Technically it's *at most one*; for example, a collection consisting of a single non-zero vector is linearly independent, but if the vector space $V$ we're working in has dimension $>1$, there will be vectors that are not linear combinations of that vector (i.e. scalar multiples of it). **If** $n=\dim(V)$, **then** you... | Yes. Any vector that can be expressed as a linear combination of linearly independent vectors can be expressed in one and only one way.
To see this, suppose that $\mathbf{v}$ can be expressed as a linear combination of $\mathbf{v}\_1,\ldots,\mathbf{v}\_n$, with scalars $\alpha\_i$ and $\beta\_i$:
$$ \mathbf{v} = \alph... |
20,955,052 | Here is my commit history:
```
0fb5310 me Mon Jan 6 08:33:57 2014 -0500 four
f407eac me Mon Jan 6 08:32:34 2014 -0500 three
c8ede60 me Mon Jan 6 08:31:49 2014 -0500 two
06dd7e9 me Mon Jan 6 08:30:04 2014 -0500 one
026cb0d me Mon Jan 6 04:21:57 2014 -0800 Initial commit
```
I want to squ... | 2014/01/06 | [
"https://Stackoverflow.com/questions/20955052",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/784637/"
] | Rebase tries to treat history linearly, but merges are not a linear history. As such, if you have merges in your history rebase is not going to show things in the same order that you necessarily committed them.
Furthermore, the `~` operator only goes up the "first parent" path, which means that `HEAD~3` is as far as y... | As @Amber points out, your branch history is not linear
```
* 0fb5310 four HEAD
* f407eac three HEAD~1
|\
| * 026cb0d Initial commit HEAD~1^2 second parent of HEAD~1
* c8ede60 two HEAD~2
* 06dd7e9 one HEAD~3
```
You can use `git rebase -p` to preserve merge... |
4,151,543 | I want to upload and crop an image via ajax.
Please suggest how I can do this. | 2010/11/11 | [
"https://Stackoverflow.com/questions/4151543",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/434893/"
] | To upload an image you will need javascript process handling the upload , there are plenty plugins to do it if you are using jquery library.
To handle uploading process you will need php script. You are sending request to php script from ajax and it does the upload .
To crop image you need a crop tool or crop script... | ```
Here is the code Jquery + PHP [Cake PHP]
View file upload.ctp
<script type="text/javascript" src="http://demos.9lessons.info/ajaximageupload/scripts/jquery.form.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('#photoimg').on('change', function(){
$("#preview").html('');
$(... |
608,330 | I have Ubuntu-Gnome 14.04 (Gnome 3.12.2).
When I try to run `gnome-terminal` by following command :
```
$ gnome-terminal
Error constructing proxy for org.gnome.Terminal: /org/gnome/Terminal/Factory0:
Error calling StartServiceByName for org.gnome.Terminal:
GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited:
P... | 2015/04/12 | [
"https://askubuntu.com/questions/608330",
"https://askubuntu.com",
"https://askubuntu.com/users/158337/"
] | This is a winner for me:
```
/usr/bin/dbus-launch /usr/bin/gnome-terminal &
```
as learned [here](https://bbs.archlinux.org/viewtopic.php?pid=1828182#p1828182) | Another cause of the problem is that new preferences have been activated at the start of the session, check "Applications at startup" Preferences |
608,330 | I have Ubuntu-Gnome 14.04 (Gnome 3.12.2).
When I try to run `gnome-terminal` by following command :
```
$ gnome-terminal
Error constructing proxy for org.gnome.Terminal: /org/gnome/Terminal/Factory0:
Error calling StartServiceByName for org.gnome.Terminal:
GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited:
P... | 2015/04/12 | [
"https://askubuntu.com/questions/608330",
"https://askubuntu.com",
"https://askubuntu.com/users/158337/"
] | This might be an issue with your locales. Either add `LANG=en_US.UTF-8` to `/etc/locale.conf` and reboot or delete that file altogether (`sudo rm /etc/locale.conf && sudo locale-gen en_US.UTF-8 && sudo dpkg-reconfigure locales`) and reboot. | I had this problem when I created a new Ubuntu 16.04.3 LTS Desktop. The fix was to edit the `/etc/default/locale` file by adding the following line to the end of the file:
```
LC_ALL="en_US.UTF-8"
```
Then reboot and the problem was gone. |
608,330 | I have Ubuntu-Gnome 14.04 (Gnome 3.12.2).
When I try to run `gnome-terminal` by following command :
```
$ gnome-terminal
Error constructing proxy for org.gnome.Terminal: /org/gnome/Terminal/Factory0:
Error calling StartServiceByName for org.gnome.Terminal:
GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited:
P... | 2015/04/12 | [
"https://askubuntu.com/questions/608330",
"https://askubuntu.com",
"https://askubuntu.com/users/158337/"
] | Execute sudo dpkg-reconfigure locales in an alternative terminal emulator and select en\_US.UTF-8 UTF-8 , choose it as the default locale. gnome-terminal should work. | Another cause of the problem is that new preferences have been activated at the start of the session, check "Applications at startup" Preferences |
608,330 | I have Ubuntu-Gnome 14.04 (Gnome 3.12.2).
When I try to run `gnome-terminal` by following command :
```
$ gnome-terminal
Error constructing proxy for org.gnome.Terminal: /org/gnome/Terminal/Factory0:
Error calling StartServiceByName for org.gnome.Terminal:
GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited:
P... | 2015/04/12 | [
"https://askubuntu.com/questions/608330",
"https://askubuntu.com",
"https://askubuntu.com/users/158337/"
] | You have to add `LANG=en_US.UTF-8` to `/etc/default/locale` and reboot your system. (Solution from [this Arch Linux forum post](https://bbs.archlinux.org/viewtopic.php?id=180103).) | Execute sudo dpkg-reconfigure locales in an alternative terminal emulator and select en\_US.UTF-8 UTF-8 , choose it as the default locale. gnome-terminal should work. |
608,330 | I have Ubuntu-Gnome 14.04 (Gnome 3.12.2).
When I try to run `gnome-terminal` by following command :
```
$ gnome-terminal
Error constructing proxy for org.gnome.Terminal: /org/gnome/Terminal/Factory0:
Error calling StartServiceByName for org.gnome.Terminal:
GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited:
P... | 2015/04/12 | [
"https://askubuntu.com/questions/608330",
"https://askubuntu.com",
"https://askubuntu.com/users/158337/"
] | Execute sudo dpkg-reconfigure locales in an alternative terminal emulator and select en\_US.UTF-8 UTF-8 , choose it as the default locale. gnome-terminal should work. | If anyone hits this error using waypipe, the [answer above](https://askubuntu.com/a/1235679/844422) by [BarryPye](https://askubuntu.com/users/1005393/barrypye) shows the way.
e.g. `waypipe --compress lz4 ssh user@host "/usr/bin/dbus-launch /usr/bin/gnome-terminal &"` |
608,330 | I have Ubuntu-Gnome 14.04 (Gnome 3.12.2).
When I try to run `gnome-terminal` by following command :
```
$ gnome-terminal
Error constructing proxy for org.gnome.Terminal: /org/gnome/Terminal/Factory0:
Error calling StartServiceByName for org.gnome.Terminal:
GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited:
P... | 2015/04/12 | [
"https://askubuntu.com/questions/608330",
"https://askubuntu.com",
"https://askubuntu.com/users/158337/"
] | I was at work today and desperate to get things moving. I found this
```
dbus-launch gnome-terminal
``` | Another cause of the problem is that new preferences have been activated at the start of the session, check "Applications at startup" Preferences |
608,330 | I have Ubuntu-Gnome 14.04 (Gnome 3.12.2).
When I try to run `gnome-terminal` by following command :
```
$ gnome-terminal
Error constructing proxy for org.gnome.Terminal: /org/gnome/Terminal/Factory0:
Error calling StartServiceByName for org.gnome.Terminal:
GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited:
P... | 2015/04/12 | [
"https://askubuntu.com/questions/608330",
"https://askubuntu.com",
"https://askubuntu.com/users/158337/"
] | Here is the list of commands which helps me:
```bsh
sudo apt install dconf-cli
# Reinstalling terminal
dconf reset -f /org/gnome/terminal
sudo apt-get remove gnome-terminal
sudo apt-get install gnome-terminal
# Reconfiguring locale
sudo locale-gen --purge
sudo dpkg-reconfigure locales
reboot
```
As you can see I ... | This might be an issue with your locales. Either add `LANG=en_US.UTF-8` to `/etc/locale.conf` and reboot or delete that file altogether (`sudo rm /etc/locale.conf && sudo locale-gen en_US.UTF-8 && sudo dpkg-reconfigure locales`) and reboot. |
608,330 | I have Ubuntu-Gnome 14.04 (Gnome 3.12.2).
When I try to run `gnome-terminal` by following command :
```
$ gnome-terminal
Error constructing proxy for org.gnome.Terminal: /org/gnome/Terminal/Factory0:
Error calling StartServiceByName for org.gnome.Terminal:
GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited:
P... | 2015/04/12 | [
"https://askubuntu.com/questions/608330",
"https://askubuntu.com",
"https://askubuntu.com/users/158337/"
] | This is a winner for me:
```
/usr/bin/dbus-launch /usr/bin/gnome-terminal &
```
as learned [here](https://bbs.archlinux.org/viewtopic.php?pid=1828182#p1828182) | This might be an issue with your locales. Either add `LANG=en_US.UTF-8` to `/etc/locale.conf` and reboot or delete that file altogether (`sudo rm /etc/locale.conf && sudo locale-gen en_US.UTF-8 && sudo dpkg-reconfigure locales`) and reboot. |
608,330 | I have Ubuntu-Gnome 14.04 (Gnome 3.12.2).
When I try to run `gnome-terminal` by following command :
```
$ gnome-terminal
Error constructing proxy for org.gnome.Terminal: /org/gnome/Terminal/Factory0:
Error calling StartServiceByName for org.gnome.Terminal:
GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited:
P... | 2015/04/12 | [
"https://askubuntu.com/questions/608330",
"https://askubuntu.com",
"https://askubuntu.com/users/158337/"
] | I had this problem when I created a new Ubuntu 16.04.3 LTS Desktop. The fix was to edit the `/etc/default/locale` file by adding the following line to the end of the file:
```
LC_ALL="en_US.UTF-8"
```
Then reboot and the problem was gone. | Another cause of the problem is that new preferences have been activated at the start of the session, check "Applications at startup" Preferences |
608,330 | I have Ubuntu-Gnome 14.04 (Gnome 3.12.2).
When I try to run `gnome-terminal` by following command :
```
$ gnome-terminal
Error constructing proxy for org.gnome.Terminal: /org/gnome/Terminal/Factory0:
Error calling StartServiceByName for org.gnome.Terminal:
GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited:
P... | 2015/04/12 | [
"https://askubuntu.com/questions/608330",
"https://askubuntu.com",
"https://askubuntu.com/users/158337/"
] | This is a winner for me:
```
/usr/bin/dbus-launch /usr/bin/gnome-terminal &
```
as learned [here](https://bbs.archlinux.org/viewtopic.php?pid=1828182#p1828182) | I had to combine answers from @TomH and @BarryPye. To get a gnome-terminal window:
```
LC_ALL=en_US.UTF-8 /usr/bin/dbus-launch gnome-terminal
```
In my case, the issue was occuring in a VNC session. I fixed it in my `~/.vnc/xstartup` by changing the window manager invocation to:
```
LC_ALL=en_US.UTF-8 /usr/bin/dbus... |
27,871,857 | So I have this csv file casper.csv. It has one line that breaks this database process that runs offshore . So i just
added this to the script that processes the file and it sed's
it out in the script. viola - no phone calls.
```
cd /come/and/play/with/us
sed -i '/D,642,0642,WOW,MOM,,M,,S,S,DANNNYY,213,213,/d' /com... | 2015/01/10 | [
"https://Stackoverflow.com/questions/27871857",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/824282/"
] | As long as there are never any commas in the data itself, you can use
```
perl -ne 'print if length((split /,/)[10]) > 6' /come/and/play/with/us/casper.csv
```
Of course this prints the lines in error. You can replace the `if` with an `unless` to print the valid lines.
---
**Update**
Or, using Perl's command lin... | This might work for you (GNU sed):
```
sed '/^\([^,]*,\){\10\}[^,]\{7\}/d' file
```
This will delete lines with 7 or more characters in the 11th field of a pure CSV file assuming `,` is the only delimiter. It looks for ten fields which contain zero or more non-comma characters followed by a comma ,starting from the ... |
27,871,857 | So I have this csv file casper.csv. It has one line that breaks this database process that runs offshore . So i just
added this to the script that processes the file and it sed's
it out in the script. viola - no phone calls.
```
cd /come/and/play/with/us
sed -i '/D,642,0642,WOW,MOM,,M,,S,S,DANNNYY,213,213,/d' /com... | 2015/01/10 | [
"https://Stackoverflow.com/questions/27871857",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/824282/"
] | Oh, wow. That is a dirty hack if I ever saw one. The `,,,,(.{7}),` regex does not match the 11th column, it matches anything where four commas are followed by seven arbitrary characters followed by a comma. This means that a line
```
D,,,WOW,,,M,,,,DANNNYYY,-213.00,-213,69036R400
^^^^1234567^ <-- last one n... | This might work for you (GNU sed):
```
sed '/^\([^,]*,\){\10\}[^,]\{7\}/d' file
```
This will delete lines with 7 or more characters in the 11th field of a pure CSV file assuming `,` is the only delimiter. It looks for ten fields which contain zero or more non-comma characters followed by a comma ,starting from the ... |
19,746,640 | I have a problem from the WebBrowser and the terminal in c #, I can not deal with opening the link,
```
string link = "https://ssl.filmweb.pl/api?version=1.0&appId=android&methods=getFilmInfoFull%20[107404]\n&signature=1.0,abbe0aaf4fcc5c56327c977ee07d72b6";
this.webb.Navigate(link, null, null, "User-Agent: ..."); or... | 2013/11/02 | [
"https://Stackoverflow.com/questions/19746640",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2948610/"
] | Your problem is related with `\n` in your url string.
**Works**
```
var url = @"https://ssl.filmweb.pl/api?version=1.0&appId=android&methods=getFilmInfoFull%20[107404]\n&signature=1.0,abbe0aaf4fcc5c56327c977ee07d72b6";
var res = new WebClient().DownloadString(url);
```
**Doesn't work (err 10, Signature value is in... | So all you need is just escape your `\n` symbol with additional slash: `https://ssl.filmweb.pl/api?version=1.0&appId=android&methods=getFilmInfoFull [107404]\\n&signature=1.0,abbe0aaf4fcc5c56327c977ee07d72b6` |
48,100,830 | I need to check if the data array has a specific key, I tried it like this:
```
@if ( ! empty($data['currentOffset']) )
<p>Current Offset: {{ $currentOffset }} </p>
@else
<p>The key `currentOffset` is not in the data array</p>
@endif
```
But I always get `<p>The key`currentOffset`is not in the data array</p>... | 2018/01/04 | [
"https://Stackoverflow.com/questions/48100830",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4684797/"
] | You can use [`@isset`](https://laravel.com/docs/5.5/blade#control-structures):
```
@isset($data['currentOffset'])
{{-- currentOffset exists --}}
@endisset
``` | Use following:
```
@if (array_key_exists('currentOffset', $data))
<p>Current Offset: {{ $data['currentOffset'] }} </p>
@else
<p>The key `currentOffset` is not in the data array</p>
@endif
``` |
48,100,830 | I need to check if the data array has a specific key, I tried it like this:
```
@if ( ! empty($data['currentOffset']) )
<p>Current Offset: {{ $currentOffset }} </p>
@else
<p>The key `currentOffset` is not in the data array</p>
@endif
```
But I always get `<p>The key`currentOffset`is not in the data array</p>... | 2018/01/04 | [
"https://Stackoverflow.com/questions/48100830",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4684797/"
] | You can use [`@isset`](https://laravel.com/docs/5.5/blade#control-structures):
```
@isset($data['currentOffset'])
{{-- currentOffset exists --}}
@endisset
``` | I think you need something like this:
```
@if ( isset($data[$currentOffset]) )
...
``` |
48,100,830 | I need to check if the data array has a specific key, I tried it like this:
```
@if ( ! empty($data['currentOffset']) )
<p>Current Offset: {{ $currentOffset }} </p>
@else
<p>The key `currentOffset` is not in the data array</p>
@endif
```
But I always get `<p>The key`currentOffset`is not in the data array</p>... | 2018/01/04 | [
"https://Stackoverflow.com/questions/48100830",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4684797/"
] | You can use [`@isset`](https://laravel.com/docs/5.5/blade#control-structures):
```
@isset($data['currentOffset'])
{{-- currentOffset exists --}}
@endisset
``` | ternary
```
@php ($currentOffset = isset($data['currentOffset']) ? $data['currentOffset'] : '')
``` |
48,100,830 | I need to check if the data array has a specific key, I tried it like this:
```
@if ( ! empty($data['currentOffset']) )
<p>Current Offset: {{ $currentOffset }} </p>
@else
<p>The key `currentOffset` is not in the data array</p>
@endif
```
But I always get `<p>The key`currentOffset`is not in the data array</p>... | 2018/01/04 | [
"https://Stackoverflow.com/questions/48100830",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4684797/"
] | I think you need something like this:
```
@if ( isset($data[$currentOffset]) )
...
``` | Use following:
```
@if (array_key_exists('currentOffset', $data))
<p>Current Offset: {{ $data['currentOffset'] }} </p>
@else
<p>The key `currentOffset` is not in the data array</p>
@endif
``` |
48,100,830 | I need to check if the data array has a specific key, I tried it like this:
```
@if ( ! empty($data['currentOffset']) )
<p>Current Offset: {{ $currentOffset }} </p>
@else
<p>The key `currentOffset` is not in the data array</p>
@endif
```
But I always get `<p>The key`currentOffset`is not in the data array</p>... | 2018/01/04 | [
"https://Stackoverflow.com/questions/48100830",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4684797/"
] | Use following:
```
@if (array_key_exists('currentOffset', $data))
<p>Current Offset: {{ $data['currentOffset'] }} </p>
@else
<p>The key `currentOffset` is not in the data array</p>
@endif
``` | ternary
```
@php ($currentOffset = isset($data['currentOffset']) ? $data['currentOffset'] : '')
``` |
48,100,830 | I need to check if the data array has a specific key, I tried it like this:
```
@if ( ! empty($data['currentOffset']) )
<p>Current Offset: {{ $currentOffset }} </p>
@else
<p>The key `currentOffset` is not in the data array</p>
@endif
```
But I always get `<p>The key`currentOffset`is not in the data array</p>... | 2018/01/04 | [
"https://Stackoverflow.com/questions/48100830",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4684797/"
] | I think you need something like this:
```
@if ( isset($data[$currentOffset]) )
...
``` | ternary
```
@php ($currentOffset = isset($data['currentOffset']) ? $data['currentOffset'] : '')
``` |
1,894,544 | Suppose that $f(x) \leq g(x) \text{ for all }x$. Prove that $\lim\_{x\to a} f(x) \leq \lim\_{x \to a} g(x)$ provided these limits exist.
Attempt: I am not even sure how to start this question. I had made an attempt but it was getting nowhere when I did it. I found a solution to the question, but I still do not underst... | 2016/08/16 | [
"https://math.stackexchange.com/questions/1894544",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/183917/"
] | The hypothesis is that $f(x)\le g(x)$ for all $x$. We want to show under this hypothesis that
$$\lim\_{x\to a}f(x)\le\lim\_{x\to a}g(x)\;.\tag{1}$$
The idea of the proof is to show that if $(1)$ is false, then so is the hypothesis: we’ll assume that $(1)$ is false and use that assumption to find an $x$ such that $f(x... | Your proof by contradiction should begin with a strict inequality: "Suppose $l = \lim\_{x\to a}f(x) > \lim\_{x\to a}g(x) = m$." Continuing:
Pick an $\epsilon > 0$ so small that the neighborhoods $Y\_{l} = ]l - \epsilon, l+\epsilon[, Y\_{m} = ]m - \epsilon, m+\epsilon[$ have no point in common. (**Note**: $l - \epsilon... |
1,894,544 | Suppose that $f(x) \leq g(x) \text{ for all }x$. Prove that $\lim\_{x\to a} f(x) \leq \lim\_{x \to a} g(x)$ provided these limits exist.
Attempt: I am not even sure how to start this question. I had made an attempt but it was getting nowhere when I did it. I found a solution to the question, but I still do not underst... | 2016/08/16 | [
"https://math.stackexchange.com/questions/1894544",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/183917/"
] | The hypothesis is that $f(x)\le g(x)$ for all $x$. We want to show under this hypothesis that
$$\lim\_{x\to a}f(x)\le\lim\_{x\to a}g(x)\;.\tag{1}$$
The idea of the proof is to show that if $(1)$ is false, then so is the hypothesis: we’ll assume that $(1)$ is false and use that assumption to find an $x$ such that $f(x... | If you understand the meaning of limit clearly you will observe that the result in question is too obvious. If $f(x) \to l$ as $x \to a$ and $g(x) \to m$ as $x \to a$ then we can get the values of $f(x)$ as close to $l$ as we want by taking values of $x$ sufficiently close to $a$ and we can get values of $g(x)$ as clos... |
1,894,544 | Suppose that $f(x) \leq g(x) \text{ for all }x$. Prove that $\lim\_{x\to a} f(x) \leq \lim\_{x \to a} g(x)$ provided these limits exist.
Attempt: I am not even sure how to start this question. I had made an attempt but it was getting nowhere when I did it. I found a solution to the question, but I still do not underst... | 2016/08/16 | [
"https://math.stackexchange.com/questions/1894544",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/183917/"
] | If you understand the meaning of limit clearly you will observe that the result in question is too obvious. If $f(x) \to l$ as $x \to a$ and $g(x) \to m$ as $x \to a$ then we can get the values of $f(x)$ as close to $l$ as we want by taking values of $x$ sufficiently close to $a$ and we can get values of $g(x)$ as clos... | Your proof by contradiction should begin with a strict inequality: "Suppose $l = \lim\_{x\to a}f(x) > \lim\_{x\to a}g(x) = m$." Continuing:
Pick an $\epsilon > 0$ so small that the neighborhoods $Y\_{l} = ]l - \epsilon, l+\epsilon[, Y\_{m} = ]m - \epsilon, m+\epsilon[$ have no point in common. (**Note**: $l - \epsilon... |
30,856,931 | I have the following code. The issue is it isnt showing either view. What am i doing wrong?
```
.state('app.accessmanager.user.reactivate', {
url: '/reactivate',
Views: {
'': {templateUrl: 'assets/views/accessmanager/reactivate.html'},
title: 'ReActivate User',
icon: 'ti-layout-media-... | 2015/06/16 | [
"https://Stackoverflow.com/questions/30856931",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3541530/"
] | You can use regex:
```
var tel = "123457890";
if (!tel.match(/^\d{10}$/)) {
console.log("Sorry, incorrect format.");
} else {
var areaCode = tel.substring(0,3);
var prefix = tel.substring(3,6);
var suffix = tel.substring(6,10);
console.log("(" + areaCode + ") " + prefix + "-" + suffix);
}
``` | Here's a fiddle:
<http://jsfiddle.net/e1qq659g/>
Here's a regex pattern:
<http://regexr.com/3b77b>
```
var regularExpression = /\d{10}/g;
(tel.match(regularExpression)) ? alert("All digits!") : alert("Not Digits!");
```
this will match the expression to the string in variable `tel` - if it does match it alerts "... |
30,856,931 | I have the following code. The issue is it isnt showing either view. What am i doing wrong?
```
.state('app.accessmanager.user.reactivate', {
url: '/reactivate',
Views: {
'': {templateUrl: 'assets/views/accessmanager/reactivate.html'},
title: 'ReActivate User',
icon: 'ti-layout-media-... | 2015/06/16 | [
"https://Stackoverflow.com/questions/30856931",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3541530/"
] | You can use regex:
```
var tel = "123457890";
if (!tel.match(/^\d{10}$/)) {
console.log("Sorry, incorrect format.");
} else {
var areaCode = tel.substring(0,3);
var prefix = tel.substring(3,6);
var suffix = tel.substring(6,10);
console.log("(" + areaCode + ") " + prefix + "-" + suffix);
}
``` | This works. It deletes all letters and checks if the length changes
```js
var tel = "1234567890";
if (tel.length !== 10 || tel.length !== parseInt(tel).toString().length) {
document.write("Sorry, incorrect format.");
} else {
var areaCode = tel.substring(0,3);
var prefix = tel.substring(3,6);
var... |
30,856,931 | I have the following code. The issue is it isnt showing either view. What am i doing wrong?
```
.state('app.accessmanager.user.reactivate', {
url: '/reactivate',
Views: {
'': {templateUrl: 'assets/views/accessmanager/reactivate.html'},
title: 'ReActivate User',
icon: 'ti-layout-media-... | 2015/06/16 | [
"https://Stackoverflow.com/questions/30856931",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3541530/"
] | You can use regex:
```
var tel = "123457890";
if (!tel.match(/^\d{10}$/)) {
console.log("Sorry, incorrect format.");
} else {
var areaCode = tel.substring(0,3);
var prefix = tel.substring(3,6);
var suffix = tel.substring(6,10);
console.log("(" + areaCode + ") " + prefix + "-" + suffix);
}
``` | You can use [RegExp](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) both to check if it only contains digits and to extract each part:
```js
var tel = document.getElementById("tel");
var result = document.getElementById("result");
tel.oninput = function(e){
//var match =... |
3,574,892 | What's the best method to delete the first line of text from a large (10k+) group of text files. | 2010/08/26 | [
"https://Stackoverflow.com/questions/3574892",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/431820/"
] | If you can install [TAIL](http://tailforwin32.sourceforge.net/) in your sistem
```
tail -n +2 filename > finalfilename
```
shows all the filename except the first line.
The windows CMD, in my opinion, isn't the best "terminal". However, you don't need `tail` command. As Patrick Cuff said, you cand use the `more` co... | If using PowerShell is an option you could adopt from this post: [Remove Top Line of Text File with Powershell](https://stackoverflow.com/questions/2074271/remove-top-line-of-text-file-with-powershell) |
3,574,892 | What's the best method to delete the first line of text from a large (10k+) group of text files. | 2010/08/26 | [
"https://Stackoverflow.com/questions/3574892",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/431820/"
] | If PowerShell isn't an option, you can use the `more` command:
```
more [file] +2 > [new file]
```
Stick that in a `for` loop that also then renames `[new file]` to `[file]` and you'll have the file minus the first line.
Not pretty, but should work. | If using PowerShell is an option you could adopt from this post: [Remove Top Line of Text File with Powershell](https://stackoverflow.com/questions/2074271/remove-top-line-of-text-file-with-powershell) |
3,574,892 | What's the best method to delete the first line of text from a large (10k+) group of text files. | 2010/08/26 | [
"https://Stackoverflow.com/questions/3574892",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/431820/"
] | If PowerShell isn't an option, you can use the `more` command:
```
more [file] +2 > [new file]
```
Stick that in a `for` loop that also then renames `[new file]` to `[file]` and you'll have the file minus the first line.
Not pretty, but should work. | If you can install [TAIL](http://tailforwin32.sourceforge.net/) in your sistem
```
tail -n +2 filename > finalfilename
```
shows all the filename except the first line.
The windows CMD, in my opinion, isn't the best "terminal". However, you don't need `tail` command. As Patrick Cuff said, you cand use the `more` co... |
3,574,892 | What's the best method to delete the first line of text from a large (10k+) group of text files. | 2010/08/26 | [
"https://Stackoverflow.com/questions/3574892",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/431820/"
] | If you can install [TAIL](http://tailforwin32.sourceforge.net/) in your sistem
```
tail -n +2 filename > finalfilename
```
shows all the filename except the first line.
The windows CMD, in my opinion, isn't the best "terminal". However, you don't need `tail` command. As Patrick Cuff said, you cand use the `more` co... | download [sed for windows](http://gnuwin32.sourceforge.net/packages/sed.htm). Then do this
```
c:\test> sed -i.bak "1d" file
```
use a for loop to iterate files |
3,574,892 | What's the best method to delete the first line of text from a large (10k+) group of text files. | 2010/08/26 | [
"https://Stackoverflow.com/questions/3574892",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/431820/"
] | If PowerShell isn't an option, you can use the `more` command:
```
more [file] +2 > [new file]
```
Stick that in a `for` loop that also then renames `[new file]` to `[file]` and you'll have the file minus the first line.
Not pretty, but should work. | download [sed for windows](http://gnuwin32.sourceforge.net/packages/sed.htm). Then do this
```
c:\test> sed -i.bak "1d" file
```
use a for loop to iterate files |
38,770,719 | Before I begin, I'd like to say that I am aware of similar questions that have already been asked on this site. . .It is just that none of the provided answers have been successful in helping me find a solution.
Ok, so I am currently making an HTML page. . . Everything was going fine, and I was able to overcome all t... | 2016/08/04 | [
"https://Stackoverflow.com/questions/38770719",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6651477/"
] | This white space is because of following two factors in your code:
1. Top margin of `h2` inside `#info-right`.
2. Bottom margin of `p` inside `#parSectTwo`.
Clear both margins and this space will be removed. Read more about [Collapsing Margins](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Box_Model/Mastering_... | By using CSS selector `p:last-child` you can remove the bottom margin of the last paragraph of `parSectTwo`section
```
#parSectTwo p:last-child {
margin-bottom: 0;
}
```
And also remove top margin from `h2`
```
h2 {
margin-top: 0;
}
```
```css
@import url(https://fonts.googleapis.com/css?family=Bitter:30... |
44,956,982 | The array is generated following way:
```
for(var i = start; i <= end;i+=step) {
arr[i] = i + 'is the number';
}
```
Array structure looks like this
```
arr = [
1100: "1100 is the number",
1101: "1101 is the number",
1102: "1102 is the number",
1103: "1103 is the number",
1104: "1104 is the number",
1105: "1105... | 2017/07/06 | [
"https://Stackoverflow.com/questions/44956982",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3055536/"
] | It is happening like that because `tweet_text` is a copy of a column `df.ix[:, 2]` for starters. Secondly, this is not pandas way to iterate over `Series` - you should use `apply()`.
To update your code, everything that goes into the loop, change into function:
```
def parse_tweet(tweet):
## everything from loop ... | Python strings are immutable. You are just changing the value attributed to variable `tweet`, but never actually updating the dataframe.
You just have to reinsert the updated value back to your dataframe. Example of a simple fix:
```
for i, tweet in enumerate(tweet_text):
tweet = re.sub('https://t.co/[a-zA-Z0-9]*... |
11,471 | If you want to stain and varnish indoor wood furniture during the winter, how do you do it?
It's below freezing outdoors, but I don't want fumes to accumulate in the house. | 2012/01/16 | [
"https://diy.stackexchange.com/questions/11471",
"https://diy.stackexchange.com",
"https://diy.stackexchange.com/users/3540/"
] | In the past what I have done is to isolate 1 room, generally in the basement, increase the heat to that room and open the window while running a fan. In general, once I've closed the can and am only waiting for the piece to dry the fumes tend to get much less noticeable and I can start closing the window.
This method ... | I usually stain or apply brushed or rolled on finishes inside. Spray finishes I do in the garage, but quickly, then I immediately bring things inside to dry in an isolated room (usually the master bedroom, which has an attached bathroom.) I leave the fan on in the bathroom, which pulls the fumes out. If you're spraying... |
11,471 | If you want to stain and varnish indoor wood furniture during the winter, how do you do it?
It's below freezing outdoors, but I don't want fumes to accumulate in the house. | 2012/01/16 | [
"https://diy.stackexchange.com/questions/11471",
"https://diy.stackexchange.com",
"https://diy.stackexchange.com/users/3540/"
] | In the past what I have done is to isolate 1 room, generally in the basement, increase the heat to that room and open the window while running a fan. In general, once I've closed the can and am only waiting for the piece to dry the fumes tend to get much less noticeable and I can start closing the window.
This method ... | I have a huge problem with paint and stain fumes. I love these projects but the fumes really get to me.
Today I found a good solution. I am very proud. Like said above, put the done woods in a closed room and close off the heater vent in that room. Use a fan and open a window. What I did was add a fragrance oil burni... |
11,471 | If you want to stain and varnish indoor wood furniture during the winter, how do you do it?
It's below freezing outdoors, but I don't want fumes to accumulate in the house. | 2012/01/16 | [
"https://diy.stackexchange.com/questions/11471",
"https://diy.stackexchange.com",
"https://diy.stackexchange.com/users/3540/"
] | I usually stain or apply brushed or rolled on finishes inside. Spray finishes I do in the garage, but quickly, then I immediately bring things inside to dry in an isolated room (usually the master bedroom, which has an attached bathroom.) I leave the fan on in the bathroom, which pulls the fumes out. If you're spraying... | I have a huge problem with paint and stain fumes. I love these projects but the fumes really get to me.
Today I found a good solution. I am very proud. Like said above, put the done woods in a closed room and close off the heater vent in that room. Use a fan and open a window. What I did was add a fragrance oil burni... |
71,026,629 | I am setting the element at row 1, column 1 of a 2D Matrix represented as a list of lists result in setting all elements at column 1 of the 2D Matrix? It is required that I rerpresent the 2D matrix as a list of lists. Below is my code:
```
(defvar matrix (make-list 5 :initial-element (make-list 5)))
(print (format nil... | 2022/02/07 | [
"https://Stackoverflow.com/questions/71026629",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7789984/"
] | "Setting a value in one object is causing it to appear in other objects" is a problem that occurs when you have perpetrated **destructive manipulation** in your Lisp program, also known as **mutation**.
When you mutate objects, you must take great care to ensure that the objects you are not mutating are not **shared**... | It is a somewhat subtle bug. When you call `(make-list 5 :initial-element (make-list 5)`, the inner `(make-list 5)` is evaluated before being passed to the outer `make-list`. As a result, each row of your matrix points to the same list in memory. Therefore all rows of your matrix reference the same location in memory.
... |
49,166,583 | what is the difference between the using the okta-signin-widget and the okta-auth-js?
May I say that the okta-auth-js gives all the functionalities for the authentication and that the widget use these functionalities + build the visual ? | 2018/03/08 | [
"https://Stackoverflow.com/questions/49166583",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2272636/"
] | The okta-signin-widget is built on top of the okta-auth-js framework.
The Okta login widget is built with specific flows that work well for
most cases, but in some situations, you might want to change the flow
in some way, you would use the okta-auth-js framework for that.
If you are familiar with javascript, you wil... | The okta-signin-widget is build on top of okta-auth-js.
So if you need just simple login functionality you can use okta-signin-widget.
If you have some specific/difficult login flow you can get it under you control by using okta-auth-js api |
24,711,100 | As we know when ever we are creating String object like `String value = new String("ABC");`
then new `String` object will be created and when we use value variable again as `value="xyz"` then a new `String` object will be created.
So my question is that at which point previously created `String` object will be garbag... | 2014/07/12 | [
"https://Stackoverflow.com/questions/24711100",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1699154/"
] | Whenever you call `new` in JAVA it create an object in heap but in case of String *literals*, it will go into the **String Constant Pool**.
Sample code:
```
String value = new String("ABC");
value = "xyz";
```
Now in the above sample code "ABC" and "xyz" string literals will go to the String Constant Pool and will ... | Just like other Objects for String also JVM follows same approach , once application looses its reference it is eligible for garbage collection.
For your case new String("ABC") is not interned so it will not go in String pool and when you create String for "ABC" again a new Object is created in heap.
```
String value... |
222,967 | The context in which we use word "deficiency" is inspection. Let's say, I look at your gas furnace and file a deficiency report describing some component or part.
What would the opposite of "deficiency" in this context? What would I call the "report" that certifies that your gas furnace is working well?
Thanks! | 2015/01/21 | [
"https://english.stackexchange.com/questions/222967",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/107027/"
] | A Deficiency Report.
A Notice of Compliance ? | After a thorough examination, your gas furnace was found to be...
* **"in compliance with** current regulations".
* **"free of defects"**.
* "**in accordance with** current legislation."
>
> Edit.
>
> compliance (noun) the act or process of doing what you have been asked or ordered to do : the act or process of ... |
222,967 | The context in which we use word "deficiency" is inspection. Let's say, I look at your gas furnace and file a deficiency report describing some component or part.
What would the opposite of "deficiency" in this context? What would I call the "report" that certifies that your gas furnace is working well?
Thanks! | 2015/01/21 | [
"https://english.stackexchange.com/questions/222967",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/107027/"
] | A Deficiency Report.
A Notice of Compliance ? | Ah, given your elaboration in the comments, I think I see what you're requesting now: a title for a category of statements/fields in a software interface, to complement "deficiencies" and to mean "things which have not been found to be deficient during this inspection".
In that case, I would use a term like **approval... |
222,967 | The context in which we use word "deficiency" is inspection. Let's say, I look at your gas furnace and file a deficiency report describing some component or part.
What would the opposite of "deficiency" in this context? What would I call the "report" that certifies that your gas furnace is working well?
Thanks! | 2015/01/21 | [
"https://english.stackexchange.com/questions/222967",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/107027/"
] | A Deficiency Report.
A Notice of Compliance ? | For home inspections, the opposite of "deficiency" might vary from "barely satisfactory" to "state of the art". To simplify an approval rating, one might title the column "approved" or, to comply with legal issues, **"up to code"**. |
222,967 | The context in which we use word "deficiency" is inspection. Let's say, I look at your gas furnace and file a deficiency report describing some component or part.
What would the opposite of "deficiency" in this context? What would I call the "report" that certifies that your gas furnace is working well?
Thanks! | 2015/01/21 | [
"https://english.stackexchange.com/questions/222967",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/107027/"
] | For home inspections, the opposite of "deficiency" might vary from "barely satisfactory" to "state of the art". To simplify an approval rating, one might title the column "approved" or, to comply with legal issues, **"up to code"**. | After a thorough examination, your gas furnace was found to be...
* **"in compliance with** current regulations".
* **"free of defects"**.
* "**in accordance with** current legislation."
>
> Edit.
>
> compliance (noun) the act or process of doing what you have been asked or ordered to do : the act or process of ... |
222,967 | The context in which we use word "deficiency" is inspection. Let's say, I look at your gas furnace and file a deficiency report describing some component or part.
What would the opposite of "deficiency" in this context? What would I call the "report" that certifies that your gas furnace is working well?
Thanks! | 2015/01/21 | [
"https://english.stackexchange.com/questions/222967",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/107027/"
] | For home inspections, the opposite of "deficiency" might vary from "barely satisfactory" to "state of the art". To simplify an approval rating, one might title the column "approved" or, to comply with legal issues, **"up to code"**. | Ah, given your elaboration in the comments, I think I see what you're requesting now: a title for a category of statements/fields in a software interface, to complement "deficiencies" and to mean "things which have not been found to be deficient during this inspection".
In that case, I would use a term like **approval... |
39,081,925 | My app can be started in two ways:
* "Normally" via the launcher
* As an Intent, when the user selects a contact from his address book
The first method works just fine. The main activity opens up, and the user can use the app. The second method however produces the following error/crash:
>
> Unable to instantiate a... | 2016/08/22 | [
"https://Stackoverflow.com/questions/39081925",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/619774/"
] | You should avoid to mix up declarative style and manually writing the `AndroidManifest.xml`.
`[Activity (Label = "MyApp", MainLauncher = true, Icon = "@mipmap/ic_launcher")]` is generating a piece of code in the actual used (generated) `AndroidManifest.xml` that looks like:
```xml
<activity android:icon="@drawable/i... | For Xamarin.Android, I was able to solve this problem by removing activity declaration and setting my package as `ProjectNamespace.ProjectNamespace` in the `AndroidManifest.xml.` I don't know why it worked but it did.
Here is how my `Manifest` file looks:
```
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:an... |
67,482,599 | Folks,
greetings from the sunny Spain.
I have build a lightbox.
Pictures attached show the home and clicked image states where you can see whats the issue about.
Im doing everything I know to try to fix it, and I wonder if anybody fancy figuring out what am I doing wrong.
Theres no fancy in a new bee 500 line code that... | 2021/05/11 | [
"https://Stackoverflow.com/questions/67482599",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15893917/"
] | Possible but not practical.
The aim of transfer learning is to give initial weights to the deep learning (DL) models and speed up the learning process. You can find that given one same DL model, when applied to similar applications such as computer vision, all the generated DL models have relative range of values alth... | One method to use if you want you are using transfer learning to fit a small target dataset and are not concerned about training time. you could use all or part of the original data then add all of the target data in as well. in addition you could augment the target data to ensure the model is 'more fit' to it. I have ... |
12,876,242 | I've got an 8-byte fixed-point number using longs, with a constant denominator of (1 << 24). How do I do division of two Fixed8 values? Since I'm using C#, I can't simply cast to a larger integer. Or am I thinking too much in the language?
Thanks.
```
public struct Fixed8
{
private long _numerator;
public con... | 2012/10/13 | [
"https://Stackoverflow.com/questions/12876242",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/479794/"
] | You could use the [BigInteger Structure](http://msdn.microsoft.com/en-us/library/system.numerics.biginteger.aspx) to perform the calculations:
```
public static Fixed8 operator /(Fixed8 a, Fixed8 b)
{
Fixed8 result;
result._numerator = (long)( new BigInteger(a._numerator) *
new ... | ```
public long Division()
{
long result = _numerator / DENOMINATOR;
return result;
}
``` |
12,876,242 | I've got an 8-byte fixed-point number using longs, with a constant denominator of (1 << 24). How do I do division of two Fixed8 values? Since I'm using C#, I can't simply cast to a larger integer. Or am I thinking too much in the language?
Thanks.
```
public struct Fixed8
{
private long _numerator;
public con... | 2012/10/13 | [
"https://Stackoverflow.com/questions/12876242",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/479794/"
] | Here's an approach that keeps all the calculations in `long`s. It might not be quicker, though; I haven't measured.
```
public struct Fixed8
{
public Fixed8(double value)
{
_numerator = (long)(value * DENOMINATOR);
}
private long _numerator;
public const long DENOMINATOR = 1 << 24;
pu... | ```
public long Division()
{
long result = _numerator / DENOMINATOR;
return result;
}
``` |
12,876,242 | I've got an 8-byte fixed-point number using longs, with a constant denominator of (1 << 24). How do I do division of two Fixed8 values? Since I'm using C#, I can't simply cast to a larger integer. Or am I thinking too much in the language?
Thanks.
```
public struct Fixed8
{
private long _numerator;
public con... | 2012/10/13 | [
"https://Stackoverflow.com/questions/12876242",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/479794/"
] | You could use the [BigInteger Structure](http://msdn.microsoft.com/en-us/library/system.numerics.biginteger.aspx) to perform the calculations:
```
public static Fixed8 operator /(Fixed8 a, Fixed8 b)
{
Fixed8 result;
result._numerator = (long)( new BigInteger(a._numerator) *
new ... | Using a `System.Numerics.BigInteger` is fine. But in this specific case, a `System.Decimal` actually has enough precision. So here's my suggestion:
```
public static Fixed8 operator /(Fixed8 a, Fixed8 b)
{
decimal resultNumerator = (decimal)a._numerator * DENOMINATOR / b._numerator;
return new Fixed8 { _numera... |
12,876,242 | I've got an 8-byte fixed-point number using longs, with a constant denominator of (1 << 24). How do I do division of two Fixed8 values? Since I'm using C#, I can't simply cast to a larger integer. Or am I thinking too much in the language?
Thanks.
```
public struct Fixed8
{
private long _numerator;
public con... | 2012/10/13 | [
"https://Stackoverflow.com/questions/12876242",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/479794/"
] | Here's an approach that keeps all the calculations in `long`s. It might not be quicker, though; I haven't measured.
```
public struct Fixed8
{
public Fixed8(double value)
{
_numerator = (long)(value * DENOMINATOR);
}
private long _numerator;
public const long DENOMINATOR = 1 << 24;
pu... | Using a `System.Numerics.BigInteger` is fine. But in this specific case, a `System.Decimal` actually has enough precision. So here's my suggestion:
```
public static Fixed8 operator /(Fixed8 a, Fixed8 b)
{
decimal resultNumerator = (decimal)a._numerator * DENOMINATOR / b._numerator;
return new Fixed8 { _numera... |
15,159,170 | I have run into a couple of problems while trying to convert an existing JDBC application to use HSQLDB version 2.2.9 (Currently the codebase runs successfully on MySQL, ORACLE and SQLServer, but an embedded database seemed like a good option too).
I will ask the questions one at a time and separately (although they a... | 2013/03/01 | [
"https://Stackoverflow.com/questions/15159170",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2111876/"
] | As I also commented before, this sounds like a bug in the HSQLDB JDBC implementation. The JDBC 4.1 spec (section 15.2.4.2) says:
>
> After the method `deleteRow` has been called, the cursor will be positioned before the next valid row. If the deleted row is the last row, the cursor will be positioned after the last r... | Most likely, you have a misconfiguation. For example you may have an older version of the HSQLDB jar in your classpath.
I get this output with the current SVN code. The JDBC code has not changed since 2.2.9.
```
Deleting row:0
Deleting row:7
Deleting row:14
Deleting row:21
Deleting row:28
Deleting row:35
Deleting row... |
15,159,170 | I have run into a couple of problems while trying to convert an existing JDBC application to use HSQLDB version 2.2.9 (Currently the codebase runs successfully on MySQL, ORACLE and SQLServer, but an embedded database seemed like a good option too).
I will ask the questions one at a time and separately (although they a... | 2013/03/01 | [
"https://Stackoverflow.com/questions/15159170",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2111876/"
] | Specify the cursor holdability in the code:
```
c.prepareStatement(select,
ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_UPDATABLE,
ResultSet.HOLD_CURSORS_OVER_COMMIT);
```
The problem seems to be that HSQLDB JDBC driver uses `ResultSet.CLOSE_CURSORS_AT_COMMIT` as the default value. | As I also commented before, this sounds like a bug in the HSQLDB JDBC implementation. The JDBC 4.1 spec (section 15.2.4.2) says:
>
> After the method `deleteRow` has been called, the cursor will be positioned before the next valid row. If the deleted row is the last row, the cursor will be positioned after the last r... |
15,159,170 | I have run into a couple of problems while trying to convert an existing JDBC application to use HSQLDB version 2.2.9 (Currently the codebase runs successfully on MySQL, ORACLE and SQLServer, but an embedded database seemed like a good option too).
I will ask the questions one at a time and separately (although they a... | 2013/03/01 | [
"https://Stackoverflow.com/questions/15159170",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2111876/"
] | Specify the cursor holdability in the code:
```
c.prepareStatement(select,
ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_UPDATABLE,
ResultSet.HOLD_CURSORS_OVER_COMMIT);
```
The problem seems to be that HSQLDB JDBC driver uses `ResultSet.CLOSE_CURSORS_AT_COMMIT` as the default value. | Most likely, you have a misconfiguation. For example you may have an older version of the HSQLDB jar in your classpath.
I get this output with the current SVN code. The JDBC code has not changed since 2.2.9.
```
Deleting row:0
Deleting row:7
Deleting row:14
Deleting row:21
Deleting row:28
Deleting row:35
Deleting row... |
9,695,741 | How to refresh a page of activity in android?
The page contains a Listview and a Gridview, I want to refresh only the Listeview.
thank you | 2012/03/14 | [
"https://Stackoverflow.com/questions/9695741",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1262858/"
] | There is no specific method for such operation, However you can achieve this by coding, with the help of Hanlder & Runnable Class.
Look at this code,
```
Handler handler = new Handler();
Runnable activityRefresh;
activityRefresh = new Runable() {
// Do something
handler.postDelayed(activityRefresh, 5000);
... | You should move all the code that loads and sets the date on your ListView to a different method, and when you want to refresh only the ListView you can call your method again.
If your ListView adapter doesn't change, then you can simply modify the data within the adapter however you want, and then call `listView.not... |
9,695,741 | How to refresh a page of activity in android?
The page contains a Listview and a Gridview, I want to refresh only the Listeview.
thank you | 2012/03/14 | [
"https://Stackoverflow.com/questions/9695741",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1262858/"
] | Either call invalidateViews() or Call notifyDataSetChanged() on your Adapter. | You should move all the code that loads and sets the date on your ListView to a different method, and when you want to refresh only the ListView you can call your method again.
If your ListView adapter doesn't change, then you can simply modify the data within the adapter however you want, and then call `listView.not... |
9,695,741 | How to refresh a page of activity in android?
The page contains a Listview and a Gridview, I want to refresh only the Listeview.
thank you | 2012/03/14 | [
"https://Stackoverflow.com/questions/9695741",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1262858/"
] | There is no specific method for such operation, However you can achieve this by coding, with the help of Hanlder & Runnable Class.
Look at this code,
```
Handler handler = new Handler();
Runnable activityRefresh;
activityRefresh = new Runable() {
// Do something
handler.postDelayed(activityRefresh, 5000);
... | To Refresh the Listview `Call notifyDataSetChanged() on your Adapter.`
u can look at this also.it may helpfull [link](https://stackoverflow.com/questions/2250770/how-to-refresh-android-listview) |
9,695,741 | How to refresh a page of activity in android?
The page contains a Listview and a Gridview, I want to refresh only the Listeview.
thank you | 2012/03/14 | [
"https://Stackoverflow.com/questions/9695741",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1262858/"
] | Either call invalidateViews() or Call notifyDataSetChanged() on your Adapter. | To Refresh the Listview `Call notifyDataSetChanged() on your Adapter.`
u can look at this also.it may helpfull [link](https://stackoverflow.com/questions/2250770/how-to-refresh-android-listview) |
18,604,853 | My model comes from Core Data.
My beans have images stored in the model as NSData.
To display my images, I need to do :
```
[UIImage imageWithData:bean.imageData]
```
Is it OK if I do that everywhere ? I mean, from view #1 I display image by creating [UIImage imageWithData:], then I go on view #2 where I need to d... | 2013/09/04 | [
"https://Stackoverflow.com/questions/18604853",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/488523/"
] | The problem is that you're trying to transform an `inline` element - this isn't possible.
You'll [need to change](http://jsfiddle.net/88g5P/42/) the display value of the glyphicon to inline block.
---
Here are the details from the [CSS Transforms Module](http://www.w3.org/TR/css-transforms-1/#transformable-element)... | The `font-awesome.css` file sets `display: inline` for your selector: `[class^="icon-"],
[class*="icon-"]`. You can see this at line 161 of the CSS file:
```
[class^="icon-"],
[class*=" icon-"] {
display: inline;
width: auto;
height: auto;
line-height: normal;
vertical-align: baseline;
background-image: ... |
18,604,853 | My model comes from Core Data.
My beans have images stored in the model as NSData.
To display my images, I need to do :
```
[UIImage imageWithData:bean.imageData]
```
Is it OK if I do that everywhere ? I mean, from view #1 I display image by creating [UIImage imageWithData:], then I go on view #2 where I need to d... | 2013/09/04 | [
"https://Stackoverflow.com/questions/18604853",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/488523/"
] | The problem is that you're trying to transform an `inline` element - this isn't possible.
You'll [need to change](http://jsfiddle.net/88g5P/42/) the display value of the glyphicon to inline block.
---
Here are the details from the [CSS Transforms Module](http://www.w3.org/TR/css-transforms-1/#transformable-element)... | you need to override the icon's display setting, since the rotation won't work on inline elements
```
.widgetbox [class*="icon-"] {
...
display:block;
}
``` |
18,604,853 | My model comes from Core Data.
My beans have images stored in the model as NSData.
To display my images, I need to do :
```
[UIImage imageWithData:bean.imageData]
```
Is it OK if I do that everywhere ? I mean, from view #1 I display image by creating [UIImage imageWithData:], then I go on view #2 where I need to d... | 2013/09/04 | [
"https://Stackoverflow.com/questions/18604853",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/488523/"
] | The problem is that you're trying to transform an `inline` element - this isn't possible.
You'll [need to change](http://jsfiddle.net/88g5P/42/) the display value of the glyphicon to inline block.
---
Here are the details from the [CSS Transforms Module](http://www.w3.org/TR/css-transforms-1/#transformable-element)... | In your particular case the issue is that the icons you are using have `display: inline-block`, I added `display:block` to the custom CSS and it now works. |
18,604,853 | My model comes from Core Data.
My beans have images stored in the model as NSData.
To display my images, I need to do :
```
[UIImage imageWithData:bean.imageData]
```
Is it OK if I do that everywhere ? I mean, from view #1 I display image by creating [UIImage imageWithData:], then I go on view #2 where I need to d... | 2013/09/04 | [
"https://Stackoverflow.com/questions/18604853",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/488523/"
] | The `font-awesome.css` file sets `display: inline` for your selector: `[class^="icon-"],
[class*="icon-"]`. You can see this at line 161 of the CSS file:
```
[class^="icon-"],
[class*=" icon-"] {
display: inline;
width: auto;
height: auto;
line-height: normal;
vertical-align: baseline;
background-image: ... | you need to override the icon's display setting, since the rotation won't work on inline elements
```
.widgetbox [class*="icon-"] {
...
display:block;
}
``` |
18,604,853 | My model comes from Core Data.
My beans have images stored in the model as NSData.
To display my images, I need to do :
```
[UIImage imageWithData:bean.imageData]
```
Is it OK if I do that everywhere ? I mean, from view #1 I display image by creating [UIImage imageWithData:], then I go on view #2 where I need to d... | 2013/09/04 | [
"https://Stackoverflow.com/questions/18604853",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/488523/"
] | The `font-awesome.css` file sets `display: inline` for your selector: `[class^="icon-"],
[class*="icon-"]`. You can see this at line 161 of the CSS file:
```
[class^="icon-"],
[class*=" icon-"] {
display: inline;
width: auto;
height: auto;
line-height: normal;
vertical-align: baseline;
background-image: ... | In your particular case the issue is that the icons you are using have `display: inline-block`, I added `display:block` to the custom CSS and it now works. |
18,604,853 | My model comes from Core Data.
My beans have images stored in the model as NSData.
To display my images, I need to do :
```
[UIImage imageWithData:bean.imageData]
```
Is it OK if I do that everywhere ? I mean, from view #1 I display image by creating [UIImage imageWithData:], then I go on view #2 where I need to d... | 2013/09/04 | [
"https://Stackoverflow.com/questions/18604853",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/488523/"
] | New Font awesome introduced **rotate** notation (run code snippet below to see it in action) <http://fontawesome.io/examples/>
Just add a MODIFIER CLASS from **fa-rotate-90** (90 or 180, 270) and **fa-flip-horizontal** (horizontal or vertical).
```
<i class="fa fa-head-side-mask"></i>normal<br>
<i class="fa fa-head-s... | The `font-awesome.css` file sets `display: inline` for your selector: `[class^="icon-"],
[class*="icon-"]`. You can see this at line 161 of the CSS file:
```
[class^="icon-"],
[class*=" icon-"] {
display: inline;
width: auto;
height: auto;
line-height: normal;
vertical-align: baseline;
background-image: ... |
18,604,853 | My model comes from Core Data.
My beans have images stored in the model as NSData.
To display my images, I need to do :
```
[UIImage imageWithData:bean.imageData]
```
Is it OK if I do that everywhere ? I mean, from view #1 I display image by creating [UIImage imageWithData:], then I go on view #2 where I need to d... | 2013/09/04 | [
"https://Stackoverflow.com/questions/18604853",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/488523/"
] | New Font awesome introduced **rotate** notation (run code snippet below to see it in action) <http://fontawesome.io/examples/>
Just add a MODIFIER CLASS from **fa-rotate-90** (90 or 180, 270) and **fa-flip-horizontal** (horizontal or vertical).
```
<i class="fa fa-head-side-mask"></i>normal<br>
<i class="fa fa-head-s... | you need to override the icon's display setting, since the rotation won't work on inline elements
```
.widgetbox [class*="icon-"] {
...
display:block;
}
``` |
18,604,853 | My model comes from Core Data.
My beans have images stored in the model as NSData.
To display my images, I need to do :
```
[UIImage imageWithData:bean.imageData]
```
Is it OK if I do that everywhere ? I mean, from view #1 I display image by creating [UIImage imageWithData:], then I go on view #2 where I need to d... | 2013/09/04 | [
"https://Stackoverflow.com/questions/18604853",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/488523/"
] | New Font awesome introduced **rotate** notation (run code snippet below to see it in action) <http://fontawesome.io/examples/>
Just add a MODIFIER CLASS from **fa-rotate-90** (90 or 180, 270) and **fa-flip-horizontal** (horizontal or vertical).
```
<i class="fa fa-head-side-mask"></i>normal<br>
<i class="fa fa-head-s... | In your particular case the issue is that the icons you are using have `display: inline-block`, I added `display:block` to the custom CSS and it now works. |
13,695,506 | I am looking to get the tag of a specific element in php, and I think I can do that through preg\_match, but I am not sure.
Essentially I have something like:
```
<label>Some Jazz</label>
```
What I would like to do is:
*if tag = label then do something, else do something else.*
The problem is getting the label p... | 2012/12/04 | [
"https://Stackoverflow.com/questions/13695506",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1270259/"
] | I'd use [TPL Dataflow](http://nuget.org/packages/Microsoft.Tpl.Dataflow) for this (since you're using .NET 4.5 and it uses [`Task`](http://msdn.microsoft.com/en-us/library/system.threading.tasks.task.aspx) internally). You can easily create an [`ActionBlock<TInput>`](http://msdn.microsoft.com/en-us/library/hh194684.asp... | I find the new Task-based interface to be very simple for doing things like this - even easier than using the Timer class.
There are some small adjustments you can make to your example. Instead of:
```
task = Task.Factory.StartNew(() =>
{
while (true)
{
wtoken.Token.ThrowIfCancellationRequested();
... |
13,695,506 | I am looking to get the tag of a specific element in php, and I think I can do that through preg\_match, but I am not sure.
Essentially I have something like:
```
<label>Some Jazz</label>
```
What I would like to do is:
*if tag = label then do something, else do something else.*
The problem is getting the label p... | 2012/12/04 | [
"https://Stackoverflow.com/questions/13695506",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1270259/"
] | I find the new Task-based interface to be very simple for doing things like this - even easier than using the Timer class.
There are some small adjustments you can make to your example. Instead of:
```
task = Task.Factory.StartNew(() =>
{
while (true)
{
wtoken.Token.ThrowIfCancellationRequested();
... | Here is what I came up with:
* Inherit from `NeverEndingTask` and override the `ExecutionCore` method with the work you want to do.
* Changing `ExecutionLoopDelayMs` allows you to adjust the time between loops e.g. if you wanted to use a backoff algorithm.
* `Start/Stop` provide a synchronous interface to start/stop t... |
13,695,506 | I am looking to get the tag of a specific element in php, and I think I can do that through preg\_match, but I am not sure.
Essentially I have something like:
```
<label>Some Jazz</label>
```
What I would like to do is:
*if tag = label then do something, else do something else.*
The problem is getting the label p... | 2012/12/04 | [
"https://Stackoverflow.com/questions/13695506",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1270259/"
] | I'd use [TPL Dataflow](http://nuget.org/packages/Microsoft.Tpl.Dataflow) for this (since you're using .NET 4.5 and it uses [`Task`](http://msdn.microsoft.com/en-us/library/system.threading.tasks.task.aspx) internally). You can easily create an [`ActionBlock<TInput>`](http://msdn.microsoft.com/en-us/library/hh194684.asp... | Here is what I came up with:
* Inherit from `NeverEndingTask` and override the `ExecutionCore` method with the work you want to do.
* Changing `ExecutionLoopDelayMs` allows you to adjust the time between loops e.g. if you wanted to use a backoff algorithm.
* `Start/Stop` provide a synchronous interface to start/stop t... |
1,084,216 | I did some reaches, and I know "Desktop.ini" and "Thumbs.db" files are hidden files for view customizations, and I know they should be safe files and I can delete them. Also, I know if I turn off "show hidden files" they will be gone (but we know they are not really gone, they are just invisible).
However, I never saw... | 2016/06/03 | [
"https://superuser.com/questions/1084216",
"https://superuser.com",
"https://superuser.com/users/601314/"
] | Are these two files virusses? No. They're a byproduct of whatever you installed.
Desktop.ini is a file that contains extra information for that specific folder, such as its view settings and sort etc.
Thumbs.db is a small database containing all the thumbnails generated when you use one of the thumbnail views (thumbn... | Look inside the files if you suspect a virus. Open them with a hexreader or the notepad (only) .
So far nothing you have indicated, as hard as it is to read, is abnormal.
Thumbs databases will be recreated as a cache for picture and video files thumbnails, and can be turned off computer wide , and cleaned out if d... |
1,084,216 | I did some reaches, and I know "Desktop.ini" and "Thumbs.db" files are hidden files for view customizations, and I know they should be safe files and I can delete them. Also, I know if I turn off "show hidden files" they will be gone (but we know they are not really gone, they are just invisible).
However, I never saw... | 2016/06/03 | [
"https://superuser.com/questions/1084216",
"https://superuser.com",
"https://superuser.com/users/601314/"
] | Are these two files virusses? No. They're a byproduct of whatever you installed.
Desktop.ini is a file that contains extra information for that specific folder, such as its view settings and sort etc.
Thumbs.db is a small database containing all the thumbnails generated when you use one of the thumbnail views (thumbn... | I suggest turning off Microsoft's useless `Hide extensions of known file types.` in `Folder Options` under `View` tab.
this way you'll be able to determine if the files are malicious or not, as follows :
if the file name is `Desktop.ini`**.exe** , or anything else except **Desktop.ini** , then it is not the System-s... |
57,538,989 | I am receiving data from the database, this data is coming in Array with JSON contained. I would like to group the repeated values by header, ie GROUP being the title, BREED being the header and NAME being the description of this header as shown below.
>
> **Vehicles (GROUP)**
>
>
> **Electric (BREED)**
>
>
> A... | 2019/08/17 | [
"https://Stackoverflow.com/questions/57538989",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9180708/"
] | After reading the post again I realized, that there *is* an attempt in there already (sorry for my earlier comment saying otherwise ...). Here is my suggestion on how to solve the problem of restructuring the data:
```
$newarr=array();
for($i = 0; $i < count($array); $i++){
$obj = json_decode($array[$i]);
$newar... | You need to restructure your data first then render them, something like the following
```
// we will restructure the array to look like the following
[
"Vehicle" => [
"Self-Propelled" => [
0 => "Infantry fighting.",
1 => "Cavalry fighting",
2 => "Armored personnel",
... |
59,400,098 | I have a table called 'community', which has a column called coordinates, of type Point.
I have a rectangle.
I'm trying to select all the rows whose .coordinates fall within that rectangle.
Here's what I'm trying to do:
```
SELECT * FROM `tribemap-db`.community
WHERE ST_Contains(POLYGON(34.6002788228068 31.821252... | 2019/12/18 | [
"https://Stackoverflow.com/questions/59400098",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3019008/"
] | You can use the following solution:
```
SELECT *
FROM `tribemap-db`.`community`
WHERE ST_Contains(ST_GeomFromText('Polygon((35.21282317828298 31.821252014924383, 35.21282317828298 32.08220723021857, 34.6002788228068 32.08220723021857, 34.6002788228068 31.821252014924383, 35.21282317828298 31.821252014924383))'), `com... | Got it.
All I need is two opposing corners of the bounding rectangle.
And then:
```
SELECT *
FROM `tribemap-db`.`community`
WHERE ST_CONTAINS(ST_MakeEnvelope(
Point(34.60, 32.08),
Point(35.21, 31.82)
), community.coordinates);
```
That's it! |
56,778,707 | I have an app with an elaborated render callback that I doubt could do with AVAudioEngine.
Anyway to use my AUGraph render callback ( with multiple buses ) with AVAudioEngine ?
Any sample code ? | 2019/06/26 | [
"https://Stackoverflow.com/questions/56778707",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1013279/"
] | The [Audio Unit API](https://developer.apple.com/documentation/audiounit) is not deprecated, only AUGraph which is presumably built on top of it.
Make connections using [AudioUnitSetProperty](https://developer.apple.com/documentation/audiotoolbox/1440371-audiounitsetproperty) with `kAudioUnitProperty_MakeConnection` ... | A (non-deprecated) [V3 AUAudioUnit](https://developer.apple.com/documentation/audiotoolbox/auaudiounit) subclass can still return an AUInternalRenderBlock which supports audio render callbacks. The AVAudioEngine API can then connect these Audio Units (for instance, to mixer nodes). Audio Unit V3 render functions still ... |
9,463,863 | We have used WPFToolKit and PresentationFramework 4.0 in our project. There are some common namespaces in both the dlls(assemblies).To resolve the namespace conflicts, we gave an Alias to WPFToolKit, that helped in code behind(.cs files)
Now in our XAML files, how do we specify the alias.
WPFToolKit DataGrid is not ... | 2012/02/27 | [
"https://Stackoverflow.com/questions/9463863",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1184619/"
] | The build errors got resolved by using Alias as "global,MyAlias" rather than "MyAlias".
Thus in code file external alias "MyAlias" is used whereas in XAML global is used.
Reference :
<http://social.msdn.microsoft.com/Forums/da-DK/vseditor/thread/87f0caa0-c57a-4146-a999-c794947ae28e> | Something like:
```
<Window x:Class="New_Project.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:toolkit="clr-namespace:WPFToolKit "
Title="MainWindow" Height="350" Width="525">
<StackPanel>
... |
9,463,863 | We have used WPFToolKit and PresentationFramework 4.0 in our project. There are some common namespaces in both the dlls(assemblies).To resolve the namespace conflicts, we gave an Alias to WPFToolKit, that helped in code behind(.cs files)
Now in our XAML files, how do we specify the alias.
WPFToolKit DataGrid is not ... | 2012/02/27 | [
"https://Stackoverflow.com/questions/9463863",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1184619/"
] | The build errors got resolved by using Alias as "global,MyAlias" rather than "MyAlias".
Thus in code file external alias "MyAlias" is used whereas in XAML global is used.
Reference :
<http://social.msdn.microsoft.com/Forums/da-DK/vseditor/thread/87f0caa0-c57a-4146-a999-c794947ae28e> | XAML alias for referenced dll (Assembly) is definde like that:
```
xmlns:MvvmFramework="clr-namespace:NamespaceName.MvvmFramework.Mvvm;assembly=MvvmFramework"
```
In this case referenced assembly is MvvmFramework.dll |
45,877,623 | I'm doing a C# project and I have an object encoded in XML; an example instance would be:
```
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Entity Type="StartRunTestSetResponse">
<Fields>
<Field Name="SuccessStaus">
<Value>2</Value>
</Field>
<Field Name="info">
... | 2017/08/25 | [
"https://Stackoverflow.com/questions/45877623",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5857593/"
] | You can simplify your model
```
public class Entity
{
[XmlAttribute]
public string Type { get; set; }
[XmlArrayItem("Field")]
public Field[] Fields { get; set; }
}
public class Field
{
[XmlAttribute]
public string Name { get; set; }
public string Value { get; set; }
}
```
So deserializat... | ```
[XmlRoot(ElementName="Field")]
public class Field {
[XmlElement(ElementName="Value")]
public string Value { get; set; }
[XmlAttribute(AttributeName="Name")]
public string Name { get; set; }
}
[XmlRoot(ElementName="Fields")]
public class Fields {
[XmlElement(ElementName="Field")]
public List... |
45,877,623 | I'm doing a C# project and I have an object encoded in XML; an example instance would be:
```
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Entity Type="StartRunTestSetResponse">
<Fields>
<Field Name="SuccessStaus">
<Value>2</Value>
</Field>
<Field Name="info">
... | 2017/08/25 | [
"https://Stackoverflow.com/questions/45877623",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5857593/"
] | You can simplify your model
```
public class Entity
{
[XmlAttribute]
public string Type { get; set; }
[XmlArrayItem("Field")]
public Field[] Fields { get; set; }
}
public class Field
{
[XmlAttribute]
public string Name { get; set; }
public string Value { get; set; }
}
```
So deserializat... | I would create a dictionary using xml linq.
```
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using System.Xml.Linq;
namespace ConsoleApplication74
{
class Program
{
const string FILENAME = @"c:\temp\test.xml";
static void Main(string[]... |
60,006,076 | Im trying create a filtered type of a variadic template/parameter pack and also preserve ordering.
```cpp
// example what im trying to accomplish
template<typename... Args>
struct query
{
using filtered = typename filtered<std::is_integral_v, Args...>
}
```
In this example filtered would filter all integral type... | 2020/01/31 | [
"https://Stackoverflow.com/questions/60006076",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8193907/"
] | Comment by @Jarod42 has demo with working code
```cpp
#include <tuple>
#include <type_traits>
template<template<class> class, template<class...> class, class...>
struct filter;
template<template<class> class Pred, template<class...> class Variadic>
struct filter<Pred, Variadic>
{
using type = Variadic<>;
};
tem... | You can avoid recursion using `std::tuple_cat()`
```
#include <type_traits>
#include <tuple>
template <template <typename> class F, typename T>
std::enable_if_t<true == F<T>::value, std::tuple<>> filter ();
template <template <typename> class F, typename T>
std::enable_if_t<false == F<T>::value, std::tuple<T>> filte... |
60,006,076 | Im trying create a filtered type of a variadic template/parameter pack and also preserve ordering.
```cpp
// example what im trying to accomplish
template<typename... Args>
struct query
{
using filtered = typename filtered<std::is_integral_v, Args...>
}
```
In this example filtered would filter all integral type... | 2020/01/31 | [
"https://Stackoverflow.com/questions/60006076",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8193907/"
] | With [Boost.Mp11](https://www.boost.org/doc/libs/1_72_0/libs/mp11/doc/html/mp11.html#mp_filterp_l), this is a short one-liner (as always):
```
using filtered = mp_filter<std::is_integral, mp_list<Args...>>;
```
Note that if you want this to be a `std::tuple`, that's:
```
using filtered = mp_filter<std::is_integral,... | You can avoid recursion using `std::tuple_cat()`
```
#include <type_traits>
#include <tuple>
template <template <typename> class F, typename T>
std::enable_if_t<true == F<T>::value, std::tuple<>> filter ();
template <template <typename> class F, typename T>
std::enable_if_t<false == F<T>::value, std::tuple<T>> filte... |
62,360,704 | I have following UDF used to convert time stored as a string into a timestamp.
```
val hmsToTimeStampUdf = udf((dt: String) => {
if (dt == null) null else {
val formatter = DateTimeFormat.forPattern("HH:mm:ss")
try {
new Timestamp(formatter.parseDateTime(dt).getMillis)
} catch {
... | 2020/06/13 | [
"https://Stackoverflow.com/questions/62360704",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/180904/"
] | Instead of throwing a `RuntimeException` that kills your .csv parsing, maybe a better approach would be to have UDF returning a tuple (well-formed, corrupted) value. Then, you can easily segregate good/bad rows by selecting `is null`/`is not null` subsets.
```
def safeConvert(dt: String) : (Timestamp,String) = {
if... | You can add the row as second input parameter to the udf:
```scala
val hmsToTimeStampUdf = udf((dt: String, r: Row) => {
if (dt == null) null else {
val formatter = DateTimeFormat.forPattern("HH:mm:ss")
try {
new Timestamp(formatter.parseDateTime(dt).getMillis)
} catch {
case t: Throwable => ... |
9,579,878 | Whenever I test the AdMob thingy I've included in my project, rather than an advert I get:
"You must have an adactivity declared in androidmanifest.xml with configChanges".
After some extensive research I keep getting the same answers - Build your app for version 3.2 or higher.
Well... NO. I won't - That's a STUPID so... | 2012/03/06 | [
"https://Stackoverflow.com/questions/9579878",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1079620/"
] | So even if you set `target=android-13` or higher in your `project.properties` file, you can still actually build your apps on all Android devices down to 1.5 as long as you use `<uses-sdk android:minSdkVersion="3"/>` in your `AndroidManifest.xml`.
Referenced from [here](http://googleadsdeveloper.blogspot.com/2011/11/m... | Here may be this will help
first you should have internet user permission set in your manifest like this :
```
<uses-permission android:name="android.permission.INTERNET"/>
```
then declare your ad activity in manifest like this :
```
<activity android:name="com.google.ads.AdActivity" android:configChanges... |
688,792 | I have following case: Server with 4 disks - devices `/dev/sdb` - `/dev/sde`.
Each of these disks is physical volume, and all of them are within single volume group.
In this volume group, I have single logical volume, that spans across all 4 disks.
Now, I want to migrate it to larger disks. I added 4 new drives `(/d... | 2015/05/05 | [
"https://serverfault.com/questions/688792",
"https://serverfault.com",
"https://serverfault.com/users/256253/"
] | Answer for reference.
No, you can't. Or rather - you can, safely, but it will not work.
Running 2nd pvmove for the same lv, will end up with:
```
Skipping locked LV lv
Skipping mirror LV pvmove0
All data on source PV skipped. It contains locked, hidden or non-top level LVs only.
No data to move for vg
```
You have... | the man page says you can,
```
You can run more than one pvmove at once provided they are moving data
off different SourcePhysicalVolumes, but additional pvmoves will ignore
any Logical Volumes already in the process of being changed, so some
data might not get moved.
```
however, if your LV spans P... |
20,861,417 | I have a HomeController with an Index.cshtml Razor view that uses an InitialChoicesViewModel with validation attributes. The Index view contains the following form:
```
@using (Html.BeginForm("CreateCharacter", "DistributePoints", FormMethod.Get))
```
This goes to a different controller (which is what I want):
```c... | 2013/12/31 | [
"https://Stackoverflow.com/questions/20861417",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/161457/"
] | ```
[HttpPost]
public ActionResult CreateCharacter(InitialChoicesViewModel model)
{
if (ModelState.IsValid)
return RedirectToAction("SomeSuccessfulaction");
return View("~/Views/Home/Index.cshtml", model);
}
```
The `~/` denotes the relative root of your site.
The code above complies with the [Post-... | By default, ASP.NET MVC checks first in `\Views\[Controller_Dir]\`, but after that, if it doesn't find the view, it checks in `\Views\Shared`.
If you do return `View("~/Views/Wherever/SomeDir/MyView.aspx")` You can return any View you'd like.
But for now in your case, try the following
```
public ActionResult CreateC... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.