qid int64 1 74.7M | question stringlengths 15 58.3k | date stringlengths 10 10 | metadata list | response_j stringlengths 4 30.2k | response_k stringlengths 11 36.5k |
|---|---|---|---|---|---|
478,668 | * I have 2 batteries 12V 80Ah deep cycle lead in series for a 24V system.
* I connected an invertor directly to the battery pack.
* I have ~600W (~44V) of solar panels connected to the PWM charge controller.
As soon as I use like in this example 1000W on the system, the charge controller just stop transmitting Amps to... | 2020/01/30 | [
"https://electronics.stackexchange.com/questions/478668",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/120028/"
] | If you change the voltage the current will also change automatically. Decreasing the voltage will also decreade the current, although this is not a linear relationship.
I recommend to dim the LED strips by using a mosfet and a 555 as pwm source. Depending on the current going through the mosfet, you might need to atta... | i will gives you the most important thing about PWM with 555.
the voltage flow like a rapid on / off from switch. which is different from normal DC.
normal 12VDC : the terminal - will be 0 and terminal + will be 12V (straight 12V)
PWM : terminal - 0, terminal + will showing 12V and 0 back to back in rapid change in a s... |
3,229,976 | According to the definition of the Jacobian on Wikipedia:
>
> [](https://i.stack.imgur.com/YTnL7.png)
>
>
>
I've seen it written elsewhere that the members of a Jacobian matrix are all real numbers. But in case $f: \mathbb{R}^n \rightarrow \mathb... | 2019/05/17 | [
"https://math.stackexchange.com/questions/3229976",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/46072/"
] | No, because each $f\_i$ is a *real* function, and therefore each $\frac{\partial f\_i}{\partial x\_j}$ is a real number. | No, for example let $f(x,y) = (x^2,y^2,xy)$ then
$$
\mathcal{J} =
\begin{pmatrix}
\frac{\partial \left[x^2\right]}{\partial x} &
\frac{\partial \left[x^2\right]}{\partial y} \\
\frac{\partial \left[y^2\right]}{\partial x} &
\frac{\partial \left[y^2\right]}{\partial y} \\
\frac{\partial [xy ]}{\partial x} & \frac{\part... |
42,579,601 | How is it possible to access store data in beforeEnter which is retrieved asynchronously via the store action?
```
import store from './vuex/store';
store.dispatch('initApp'); // in here, async data will be fetched and assigned to the store's state
// following is an excerpt of the routes object:
{
path: '/example... | 2017/03/03 | [
"https://Stackoverflow.com/questions/42579601",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1863978/"
] | You can do it by returning a promise from vuex action, as it is explained [here](https://stackoverflow.com/q/40165766/1610034) and call the dispatch from within the `beforeEnter` itself.
Code should look like following:
```
import store from './vuex/store';
// following is an excerpt of the routes object:
{
path: ... | Do you really need to fetch the data asynchronously from the server before every route change, or do you simply need to persist some data from the store so that they do not "disappear" when the page is reloaded or when user uses a direct link?
If the latter is the case, you can **persist the auth data (e.g. JWT token... |
42,579,601 | How is it possible to access store data in beforeEnter which is retrieved asynchronously via the store action?
```
import store from './vuex/store';
store.dispatch('initApp'); // in here, async data will be fetched and assigned to the store's state
// following is an excerpt of the routes object:
{
path: '/example... | 2017/03/03 | [
"https://Stackoverflow.com/questions/42579601",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1863978/"
] | You can do it by returning a promise from vuex action, as it is explained [here](https://stackoverflow.com/q/40165766/1610034) and call the dispatch from within the `beforeEnter` itself.
Code should look like following:
```
import store from './vuex/store';
// following is an excerpt of the routes object:
{
path: ... | I've solved this issue by using store.watch() for no initial value and return the latest value when already initialized.
Here is my sample code
```
async function redirectIfNotAuth (to, from, next) {
const user = await getUserState()
if (user === null) {
next({ name: 'auth' })
} else {
next()
}
}
fun... |
42,579,601 | How is it possible to access store data in beforeEnter which is retrieved asynchronously via the store action?
```
import store from './vuex/store';
store.dispatch('initApp'); // in here, async data will be fetched and assigned to the store's state
// following is an excerpt of the routes object:
{
path: '/example... | 2017/03/03 | [
"https://Stackoverflow.com/questions/42579601",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1863978/"
] | You can do it by returning a promise from vuex action, as it is explained [here](https://stackoverflow.com/q/40165766/1610034) and call the dispatch from within the `beforeEnter` itself.
Code should look like following:
```
import store from './vuex/store';
// following is an excerpt of the routes object:
{
path: ... | This is my solution:
### First, define async function to load remote data
```
import {Common_Config} from "@/app/config/Common";
export class Life_Boot {
public static async prepareRemoteLoading(params : any = {}) {
return new Promise(async (resolve, reject) => {
let res = await this.initial... |
42,579,601 | How is it possible to access store data in beforeEnter which is retrieved asynchronously via the store action?
```
import store from './vuex/store';
store.dispatch('initApp'); // in here, async data will be fetched and assigned to the store's state
// following is an excerpt of the routes object:
{
path: '/example... | 2017/03/03 | [
"https://Stackoverflow.com/questions/42579601",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1863978/"
] | Do you really need to fetch the data asynchronously from the server before every route change, or do you simply need to persist some data from the store so that they do not "disappear" when the page is reloaded or when user uses a direct link?
If the latter is the case, you can **persist the auth data (e.g. JWT token... | I've solved this issue by using store.watch() for no initial value and return the latest value when already initialized.
Here is my sample code
```
async function redirectIfNotAuth (to, from, next) {
const user = await getUserState()
if (user === null) {
next({ name: 'auth' })
} else {
next()
}
}
fun... |
42,579,601 | How is it possible to access store data in beforeEnter which is retrieved asynchronously via the store action?
```
import store from './vuex/store';
store.dispatch('initApp'); // in here, async data will be fetched and assigned to the store's state
// following is an excerpt of the routes object:
{
path: '/example... | 2017/03/03 | [
"https://Stackoverflow.com/questions/42579601",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1863978/"
] | Do you really need to fetch the data asynchronously from the server before every route change, or do you simply need to persist some data from the store so that they do not "disappear" when the page is reloaded or when user uses a direct link?
If the latter is the case, you can **persist the auth data (e.g. JWT token... | This is my solution:
### First, define async function to load remote data
```
import {Common_Config} from "@/app/config/Common";
export class Life_Boot {
public static async prepareRemoteLoading(params : any = {}) {
return new Promise(async (resolve, reject) => {
let res = await this.initial... |
42,579,601 | How is it possible to access store data in beforeEnter which is retrieved asynchronously via the store action?
```
import store from './vuex/store';
store.dispatch('initApp'); // in here, async data will be fetched and assigned to the store's state
// following is an excerpt of the routes object:
{
path: '/example... | 2017/03/03 | [
"https://Stackoverflow.com/questions/42579601",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1863978/"
] | I've solved this issue by using store.watch() for no initial value and return the latest value when already initialized.
Here is my sample code
```
async function redirectIfNotAuth (to, from, next) {
const user = await getUserState()
if (user === null) {
next({ name: 'auth' })
} else {
next()
}
}
fun... | This is my solution:
### First, define async function to load remote data
```
import {Common_Config} from "@/app/config/Common";
export class Life_Boot {
public static async prepareRemoteLoading(params : any = {}) {
return new Promise(async (resolve, reject) => {
let res = await this.initial... |
3,450,181 | I have a GridBoundColumn that I would like to be bound to 2 fields so that I can display the two fields in one column. I would like to do something like the following:
```
<GridBoundColumn DataField1="LastName" DataField2="FirstName" DataFormatString="{0},{1}">
```
Is this possible? If so how can it be accomplished?... | 2010/08/10 | [
"https://Stackoverflow.com/questions/3450181",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/156061/"
] | This can be accomplished by implementing the OnItemDataBound method (configured in your grid definition like `OnItemdataBound="GridItemDataBound"`).
Make sure that the field is uniquely identified:
```
<GridBoundColumn UniqueName="UserName">
```
Then implement your OnItemDataBound method:
```
protected void GridIt... | You can also use a template column if you don't want to write C# code. |
45,888,801 | I have a text file containing lots of data that looks something like this:
```
logstart . . .
(chunk of data)
logend . . .
logstart . . .
(chunk of data)
logend . . .
times
logstart . . .
(chunk of data)
logend . . .
times
logstart . . .
(chunk of data)
logend . . .
```
I want my Python code to open the file and rea... | 2017/08/25 | [
"https://Stackoverflow.com/questions/45888801",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8474432/"
] | Something like this:
```
lines = []
with open(filename, 'rt') as in_file:
chunk = []
for line in in_file:
chunk.append(line)
if(line.find('times')>=0):
lines.extend(chunk)
if(line.find('logstart')>=0):
chunk = []
``` | You can do this by keeping track of a little state.
```
lines = []
with open(filename, 'rt') as in_file:
in_log = False
save = []
for line in in_file:
if 'logend' in line:
in_log = False
if in_log:
save.append(line)
if 'times' in line:
save.append... |
72,068,608 | I want to find the Nth occurence of a word in an utterance and put [brackets] around it.
I tried with various things but I think the closest I'm getting is with gsub but I can't have {copy-1} for the number of times in my regex.
Any ideas? Can we put a variable in there? Thanks!
```
#creating my df
utterance <- c("we ... | 2022/04/30 | [
"https://Stackoverflow.com/questions/72068608",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19000340/"
] | How about just this:
```
library(tidyverse)
f <- function(s,c,target) {
g = gregexpr(target,s)[[1]][c]
if(is.na(g) | g<0) return(s)
paste0(str_sub(s,1,g-1),"[",target,"]",str_sub(s,1+g+length(target)))
}
df %>% rowwise() %>% mutate(utterance = f(utterance,copy, "we"))
```
Output:
```
utterance ... | Here is a string splitting approach. We can split the input string on `we`, and then piece together, using `[we]` as the nth connector.
```r
repn <- function(x, find, repl, n) {
parts <- strsplit(x, paste0("\\b", find, "\\b"))[[1]]
output <- paste0(
paste0(parts[1:n], collapse=find),
repl,
... |
72,068,608 | I want to find the Nth occurence of a word in an utterance and put [brackets] around it.
I tried with various things but I think the closest I'm getting is with gsub but I can't have {copy-1} for the number of times in my regex.
Any ideas? Can we put a variable in there? Thanks!
```
#creating my df
utterance <- c("we ... | 2022/04/30 | [
"https://Stackoverflow.com/questions/72068608",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19000340/"
] | How about just this:
```
library(tidyverse)
f <- function(s,c,target) {
g = gregexpr(target,s)[[1]][c]
if(is.na(g) | g<0) return(s)
paste0(str_sub(s,1,g-1),"[",target,"]",str_sub(s,1+g+length(target)))
}
df %>% rowwise() %>% mutate(utterance = f(utterance,copy, "we"))
```
Output:
```
utterance ... | Here's a mixed approach using a number of additional packages:
```
library(data.table)
library(tibble)
library(dplyr)
library(tidyr)
df %>%
rowid_to_column() %>%
separate_rows(utterance, sep = " ") %>%
group_by(rowid) %>%
mutate(wordcount = ifelse(utterance == "we", rleid(rowid), NA), # simpler: wordcount = if... |
17,312,273 | I am using the below script to send emails from my webpage used as " refer a friend " which can be used to send emails to friends to refer the site. This works fine. But one problem, Friend who receives the email will notice that the received from emails shows the server default email address with nameservers. I want t... | 2013/06/26 | [
"https://Stackoverflow.com/questions/17312273",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2460790/"
] | Use something like this in your code.
```
$headers .= 'From: info@example.com' . "\r\n";
```
Ref: <http://php.net/manual/en/function.mail.php> | Try this:
```
$headers = "From: <$y_email>\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-type: text/html; charset=UTF-8\n";
``` |
21,835,790 | I've been bugged by `$this` for a long time. Many times when I try to read some Joomla snippet I come across `$this` here and there.
I understand in definition of a class, `$this` refers to the instance of the class. But what does it mean when `$this` is not in a definition?
Like this:
```
echo $this->loadTemplate('i... | 2014/02/17 | [
"https://Stackoverflow.com/questions/21835790",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2302661/"
] | The initial memory contents are:
```
buf1 buf2
v v
Hello World
^ ^
ptr1 ptr2
```
The `strcpy` function copies its second argument into the first.`strcpy(ptr1, buf2)` copies the contents of `buf2` ("World") into `ptr1`. So now we have:
```
buf1 ... | As you mentioned that you know that `ptr1` pointing to `llo` and `ptr2` pointing to `ld`.
Now see the first `strcpy`
```
strcpy(ptr1, buf2);
```
this will copy `World` to `buf1` frow where `ptr1` points to, so it actually points `World` now. Hence printing `ptr1` will print `World`.
Since `buf1` (after deca... |
13,250,938 | I have a console application with a config file called `app.config`. The full code behind by `app.config` file is as follows:
```xml
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="ClientSettingsProvider.ServiceUri" value=""/>
<add key="Server" value="0.0.0.0"/>
<add k... | 2012/11/06 | [
"https://Stackoverflow.com/questions/13250938",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1668123/"
] | I am sry for posting the issue. Already found what i done wrong.
Here is the solution for anyone else who might encounter the same thing.
I simply wrote "AUTO\_INCREMENT" as in MySQL where i had to be "AUTOINCREMENT" without the \_ | Just as a friendly note, the WebSQL Standard isn't recommended: [Is it recommended to use the web sql database for storage on the client side](https://stackoverflow.com/questions/3001657/is-it-recommended-to-use-the-web-sql-database-for-storage-on-the-client-side)
For a different Client-Side Relational Database Soluti... |
25,581,710 | Consider this element hierarchy
```
<div>
A
<div>B</div>
</div>
```
Is it possible to hide text `A` but not `B` with CSS? The layout should also leave no empty space where `A` would be.
What I tried:
* Setting `visibility` to `hidden` and resetting it on child leaves blank space
* Setting `font-size` to `0... | 2014/08/30 | [
"https://Stackoverflow.com/questions/25581710",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | You may try using `visibility:collapse`:
```
body > span{
visibility:collapse;
}
span > span {
visibility:visible;
}
```
[Fiddle Demo](http://jsfiddle.net/4yfxgcms/4/)
Also this works with `visibility:hidden;`
```
body > span{
visibility:hidden;
}
span > span {
visibility:visible;
}
```
[Fiddle D... | Yeah, I think you're on the right track with the visibility stuff: it's the only property where the display doesn't override the visibility of the child element (`display: none` cannot be overridden on a child element).
Note that `visibility: collapse` is only applicable for table-cells (and works poorly even there): ... |
25,581,710 | Consider this element hierarchy
```
<div>
A
<div>B</div>
</div>
```
Is it possible to hide text `A` but not `B` with CSS? The layout should also leave no empty space where `A` would be.
What I tried:
* Setting `visibility` to `hidden` and resetting it on child leaves blank space
* Setting `font-size` to `0... | 2014/08/30 | [
"https://Stackoverflow.com/questions/25581710",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | You may try using `visibility:collapse`:
```
body > span{
visibility:collapse;
}
span > span {
visibility:visible;
}
```
[Fiddle Demo](http://jsfiddle.net/4yfxgcms/4/)
Also this works with `visibility:hidden;`
```
body > span{
visibility:hidden;
}
span > span {
visibility:visible;
}
```
[Fiddle D... | Try this:
Use your same concept like this
CSS:
```
#a {
visibility:hidden;
font-size:0px
}
#b {
visibility:visible;
font-size:10px
}
```
HTML:
```
<span id="a">A
<span id="b">B</span>
</span>
```
[DEMO1](http://jsfiddle.net/... |
25,581,710 | Consider this element hierarchy
```
<div>
A
<div>B</div>
</div>
```
Is it possible to hide text `A` but not `B` with CSS? The layout should also leave no empty space where `A` would be.
What I tried:
* Setting `visibility` to `hidden` and resetting it on child leaves blank space
* Setting `font-size` to `0... | 2014/08/30 | [
"https://Stackoverflow.com/questions/25581710",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | Try this:
Use your same concept like this
CSS:
```
#a {
visibility:hidden;
font-size:0px
}
#b {
visibility:visible;
font-size:10px
}
```
HTML:
```
<span id="a">A
<span id="b">B</span>
</span>
```
[DEMO1](http://jsfiddle.net/... | Yeah, I think you're on the right track with the visibility stuff: it's the only property where the display doesn't override the visibility of the child element (`display: none` cannot be overridden on a child element).
Note that `visibility: collapse` is only applicable for table-cells (and works poorly even there): ... |
39,337,075 | I want to delete all text between each braces {} in file (including the braces themselves). I know command %d which deleted text between braces under cursor but I want to make it automatically for all document.
Example:
I have something like that:
```
public int getMinimum() {
return min;
}
public void setMinimum... | 2016/09/05 | [
"https://Stackoverflow.com/questions/39337075",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3498366/"
] | You can do this with the [global](http://vim.wikia.com/wiki/Power_of_g) command:
`:g/{/normal f{da{`
This does: For all lines containing a `{`, move to the first\* `{` on that line and delete everything from there up to and including a matching `}`.
If you want to add a `;` at the end - which I suspect would be the ... | Put the cursor at `{` or `}`, then `v%d`. |
39,337,075 | I want to delete all text between each braces {} in file (including the braces themselves). I know command %d which deleted text between braces under cursor but I want to make it automatically for all document.
Example:
I have something like that:
```
public int getMinimum() {
return min;
}
public void setMinimum... | 2016/09/05 | [
"https://Stackoverflow.com/questions/39337075",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3498366/"
] | You can do this with the [global](http://vim.wikia.com/wiki/Power_of_g) command:
`:g/{/normal f{da{`
This does: For all lines containing a `{`, move to the first\* `{` on that line and delete everything from there up to and including a matching `}`.
If you want to add a `;` at the end - which I suspect would be the ... | How about using famous vim dot command?
```
/{
d%
```
Now use `n.` as many times as u need it.
Still want to automate? Record macro:
```
qqn.q
99@q
```
So full sequence would be:`/{<cr>d%qqn.q99@q`
Why this way? Because it's intuitive and it's totally the vim way to do that and you can adapt it to any situation. |
39,337,075 | I want to delete all text between each braces {} in file (including the braces themselves). I know command %d which deleted text between braces under cursor but I want to make it automatically for all document.
Example:
I have something like that:
```
public int getMinimum() {
return min;
}
public void setMinimum... | 2016/09/05 | [
"https://Stackoverflow.com/questions/39337075",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3498366/"
] | Put the cursor at `{` or `}`, then `v%d`. | How about using famous vim dot command?
```
/{
d%
```
Now use `n.` as many times as u need it.
Still want to automate? Record macro:
```
qqn.q
99@q
```
So full sequence would be:`/{<cr>d%qqn.q99@q`
Why this way? Because it's intuitive and it's totally the vim way to do that and you can adapt it to any situation. |
534,564 | I tried a basic approach and wrote x as a matrix of four unknown elements $\begin{pmatrix} a && b \\ c && d \end{pmatrix}$ and squared it when I obtained $\begin{pmatrix} a^2 + bc && ab + bd \\ ca + dc && cd + d^2\end{pmatrix}$ and by making it equal with $I\_2$ I got the following system
$a^2 + bc = 1$
$ab +bd = 0$ ... | 2013/10/21 | [
"https://math.stackexchange.com/questions/534564",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/22704/"
] | The second and third equalities are
$$b(a+d)=0$$
$$c(a+d)=0$$
Split the problem in two cases:
**Case 1:** $a+d \neq 0$. Then $b=0, c=0$, and from the first and last equation you get $a,d$.
**Case 2:** $a+d=0$. Then $d=-a$ and $bc=1-a^2$. Show that any matrix satisfying this works. | $\begin{pmatrix} a^2 + bc & ab + bd \\ ca + dc & bc + d^2\end{pmatrix}=\begin{pmatrix}1&0\\ 0&1\end{pmatrix}$
You have $b(a+d)=0$ which implies $b=0$ or $a+d=0$
suppose $b=0,a+d\neq0$, you have $a^2=1$ concluding $a=\pm 1$ you can find $d$ and then $c$
suppose $a+d=0, b\neq 0$, you have some other possibility....
Y... |
534,564 | I tried a basic approach and wrote x as a matrix of four unknown elements $\begin{pmatrix} a && b \\ c && d \end{pmatrix}$ and squared it when I obtained $\begin{pmatrix} a^2 + bc && ab + bd \\ ca + dc && cd + d^2\end{pmatrix}$ and by making it equal with $I\_2$ I got the following system
$a^2 + bc = 1$
$ab +bd = 0$ ... | 2013/10/21 | [
"https://math.stackexchange.com/questions/534564",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/22704/"
] | $\begin{pmatrix} a^2 + bc & ab + bd \\ ca + dc & bc + d^2\end{pmatrix}=\begin{pmatrix}1&0\\ 0&1\end{pmatrix}$
You have $b(a+d)=0$ which implies $b=0$ or $a+d=0$
suppose $b=0,a+d\neq0$, you have $a^2=1$ concluding $a=\pm 1$ you can find $d$ and then $c$
suppose $a+d=0, b\neq 0$, you have some other possibility....
Y... | $\newcommand{\+}{^{\dagger}}%
\newcommand{\angles}[1]{\left\langle #1 \right\rangle}%
\newcommand{\braces}[1]{\left\lbrace #1 \right\rbrace}%
\newcommand{\bracks}[1]{\left\lbrack #1 \right\rbrack}%
\newcommand{\dd}{{\rm d}}%
\newcommand{\isdiv}{\,\left.\right\vert\,}%
\newcommand{\ds}[1]{\displaystyle{#1}}%
\new... |
534,564 | I tried a basic approach and wrote x as a matrix of four unknown elements $\begin{pmatrix} a && b \\ c && d \end{pmatrix}$ and squared it when I obtained $\begin{pmatrix} a^2 + bc && ab + bd \\ ca + dc && cd + d^2\end{pmatrix}$ and by making it equal with $I\_2$ I got the following system
$a^2 + bc = 1$
$ab +bd = 0$ ... | 2013/10/21 | [
"https://math.stackexchange.com/questions/534564",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/22704/"
] | The second and third equalities are
$$b(a+d)=0$$
$$c(a+d)=0$$
Split the problem in two cases:
**Case 1:** $a+d \neq 0$. Then $b=0, c=0$, and from the first and last equation you get $a,d$.
**Case 2:** $a+d=0$. Then $d=-a$ and $bc=1-a^2$. Show that any matrix satisfying this works. | What you need to know about [JCF](http://en.wikipedia.org/wiki/Jordan_normal_form) is that for any $2\times 2$ matrix $x$, there is an invertible matrix $P$ such that $P^{-1}xP=\left(\begin{smallmatrix}t&0\\0&t\end{smallmatrix}\right)$ or $P^{-1}xP=\left(\begin{smallmatrix}t&1\\0&t\end{smallmatrix}\right)$ or
$P^{-1}xP... |
534,564 | I tried a basic approach and wrote x as a matrix of four unknown elements $\begin{pmatrix} a && b \\ c && d \end{pmatrix}$ and squared it when I obtained $\begin{pmatrix} a^2 + bc && ab + bd \\ ca + dc && cd + d^2\end{pmatrix}$ and by making it equal with $I\_2$ I got the following system
$a^2 + bc = 1$
$ab +bd = 0$ ... | 2013/10/21 | [
"https://math.stackexchange.com/questions/534564",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/22704/"
] | What you need to know about [JCF](http://en.wikipedia.org/wiki/Jordan_normal_form) is that for any $2\times 2$ matrix $x$, there is an invertible matrix $P$ such that $P^{-1}xP=\left(\begin{smallmatrix}t&0\\0&t\end{smallmatrix}\right)$ or $P^{-1}xP=\left(\begin{smallmatrix}t&1\\0&t\end{smallmatrix}\right)$ or
$P^{-1}xP... | $\newcommand{\+}{^{\dagger}}%
\newcommand{\angles}[1]{\left\langle #1 \right\rangle}%
\newcommand{\braces}[1]{\left\lbrace #1 \right\rbrace}%
\newcommand{\bracks}[1]{\left\lbrack #1 \right\rbrack}%
\newcommand{\dd}{{\rm d}}%
\newcommand{\isdiv}{\,\left.\right\vert\,}%
\newcommand{\ds}[1]{\displaystyle{#1}}%
\new... |
534,564 | I tried a basic approach and wrote x as a matrix of four unknown elements $\begin{pmatrix} a && b \\ c && d \end{pmatrix}$ and squared it when I obtained $\begin{pmatrix} a^2 + bc && ab + bd \\ ca + dc && cd + d^2\end{pmatrix}$ and by making it equal with $I\_2$ I got the following system
$a^2 + bc = 1$
$ab +bd = 0$ ... | 2013/10/21 | [
"https://math.stackexchange.com/questions/534564",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/22704/"
] | The second and third equalities are
$$b(a+d)=0$$
$$c(a+d)=0$$
Split the problem in two cases:
**Case 1:** $a+d \neq 0$. Then $b=0, c=0$, and from the first and last equation you get $a,d$.
**Case 2:** $a+d=0$. Then $d=-a$ and $bc=1-a^2$. Show that any matrix satisfying this works. | You are looking for matrices $A$ satisfying the polynomial equation $A^2-I=0$. Note that the corresponding polynomial splits $X^2-1=(X+1)(X-1)$, and since you are presumably not working over a field of characterisitic$~2$ but rather over the rational, real or complex numbers (although the question is not entirely clear... |
534,564 | I tried a basic approach and wrote x as a matrix of four unknown elements $\begin{pmatrix} a && b \\ c && d \end{pmatrix}$ and squared it when I obtained $\begin{pmatrix} a^2 + bc && ab + bd \\ ca + dc && cd + d^2\end{pmatrix}$ and by making it equal with $I\_2$ I got the following system
$a^2 + bc = 1$
$ab +bd = 0$ ... | 2013/10/21 | [
"https://math.stackexchange.com/questions/534564",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/22704/"
] | The second and third equalities are
$$b(a+d)=0$$
$$c(a+d)=0$$
Split the problem in two cases:
**Case 1:** $a+d \neq 0$. Then $b=0, c=0$, and from the first and last equation you get $a,d$.
**Case 2:** $a+d=0$. Then $d=-a$ and $bc=1-a^2$. Show that any matrix satisfying this works. | $\newcommand{\+}{^{\dagger}}%
\newcommand{\angles}[1]{\left\langle #1 \right\rangle}%
\newcommand{\braces}[1]{\left\lbrace #1 \right\rbrace}%
\newcommand{\bracks}[1]{\left\lbrack #1 \right\rbrack}%
\newcommand{\dd}{{\rm d}}%
\newcommand{\isdiv}{\,\left.\right\vert\,}%
\newcommand{\ds}[1]{\displaystyle{#1}}%
\new... |
534,564 | I tried a basic approach and wrote x as a matrix of four unknown elements $\begin{pmatrix} a && b \\ c && d \end{pmatrix}$ and squared it when I obtained $\begin{pmatrix} a^2 + bc && ab + bd \\ ca + dc && cd + d^2\end{pmatrix}$ and by making it equal with $I\_2$ I got the following system
$a^2 + bc = 1$
$ab +bd = 0$ ... | 2013/10/21 | [
"https://math.stackexchange.com/questions/534564",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/22704/"
] | You are looking for matrices $A$ satisfying the polynomial equation $A^2-I=0$. Note that the corresponding polynomial splits $X^2-1=(X+1)(X-1)$, and since you are presumably not working over a field of characterisitic$~2$ but rather over the rational, real or complex numbers (although the question is not entirely clear... | $\newcommand{\+}{^{\dagger}}%
\newcommand{\angles}[1]{\left\langle #1 \right\rangle}%
\newcommand{\braces}[1]{\left\lbrace #1 \right\rbrace}%
\newcommand{\bracks}[1]{\left\lbrack #1 \right\rbrack}%
\newcommand{\dd}{{\rm d}}%
\newcommand{\isdiv}{\,\left.\right\vert\,}%
\newcommand{\ds}[1]{\displaystyle{#1}}%
\new... |
238,634 | I currently use Windows 10 and I'm running Minecraft 1.8.
I have seen people say run `%appdata&\.minecraft\` but that never worked for me. I really want to download a mod, but I can't until I find this folder. | 2015/10/03 | [
"https://gaming.stackexchange.com/questions/238634",
"https://gaming.stackexchange.com",
"https://gaming.stackexchange.com/users/126398/"
] | On the Minecraft Start Screen, you can go into `Options > Resource Packs...` and click `Open Resource Pack Folder`. It will take you to `.../.minecraft/resourcepacks`. Then navigate to the parent directory which should hopefully take you to your `.minecraft` folder. | You can only find the folder if you have bought the java edition which is on the official website.
if you have downloaded windows edition this is not possible |
238,634 | I currently use Windows 10 and I'm running Minecraft 1.8.
I have seen people say run `%appdata&\.minecraft\` but that never worked for me. I really want to download a mod, but I can't until I find this folder. | 2015/10/03 | [
"https://gaming.stackexchange.com/questions/238634",
"https://gaming.stackexchange.com",
"https://gaming.stackexchange.com/users/126398/"
] | Unless you only made this typo when typing the question, the problem is that you have a typo in the folder path. Make sure that the symbols are entered correctly.
Correct path: `%APPDATA%\.minecraft`
Common typos:
* `%APPDATA&\.minecraft`
* `%APPDATA%.minecraft`
[, which is a lot faster) for the file `realms_persistence.json` (or [other files that are unique to Minecraft](https://minecraft.gamepedia.com/.minecraft)).
This file, as part of Minecraft, c... | You can only find the folder if you have bought the java edition which is on the official website.
if you have downloaded windows edition this is not possible |
238,634 | I currently use Windows 10 and I'm running Minecraft 1.8.
I have seen people say run `%appdata&\.minecraft\` but that never worked for me. I really want to download a mod, but I can't until I find this folder. | 2015/10/03 | [
"https://gaming.stackexchange.com/questions/238634",
"https://gaming.stackexchange.com",
"https://gaming.stackexchange.com/users/126398/"
] | Unless you only made this typo when typing the question, the problem is that you have a typo in the folder path. Make sure that the symbols are entered correctly.
Correct path: `%APPDATA%\.minecraft`
Common typos:
* `%APPDATA&\.minecraft`
* `%APPDATA%.minecraft`
[, which is a lot faster) for the file `realms_persistence.json` (or [other files that are unique to Minecraft](https://minecraft.gamepedia.com/.minecraft)).
This file, as part of Minecraft, c... |
70,506,535 | ```
{
id: 2,
attributes: {
title: ‘Test Title’,
body: ‘Test Body’,
date: null,
createdAt: ‘2021-11-30T20:52:09.206Z’,
updatedAt: ‘2021-11-30T20:57:26.724Z’,
publishedAt: ‘2021-11-30T20:57:26.720Z’
}
``` | 2021/12/28 | [
"https://Stackoverflow.com/questions/70506535",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17780639/"
] | I've had this struggle myself as well. And I couldn't get this working with their Query Engine & Entity Engine using Strapi 4 & Nuxtjs.
To show the images or (dynamic) components in the API, be sure to use:
```
http://localhost:1337/api/[your api]?populate=*
```
They are not shown by default unfortunately. They sai... | Strapi 4 requires you to populate your request (see: [population documentation](https://docs.strapi.io/developer-docs/latest/developer-resources/database-apis-reference/rest/populating-fields.html#relation-media-fields) )
which could look like this (for level 2 population):
```
// populate request
const qs = ... |
70,506,535 | ```
{
id: 2,
attributes: {
title: ‘Test Title’,
body: ‘Test Body’,
date: null,
createdAt: ‘2021-11-30T20:52:09.206Z’,
updatedAt: ‘2021-11-30T20:57:26.724Z’,
publishedAt: ‘2021-11-30T20:57:26.720Z’
}
``` | 2021/12/28 | [
"https://Stackoverflow.com/questions/70506535",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17780639/"
] | Strapi 4 requires you to populate your request (see: [population documentation](https://docs.strapi.io/developer-docs/latest/developer-resources/database-apis-reference/rest/populating-fields.html#relation-media-fields) )
which could look like this (for level 2 population):
```
// populate request
const qs = ... | You can simply access the images in strapi V4+ by graphql query ===>
```
images{
data{
id
attributes{
url
}
}
}
```
image e.g ===>
[](https://i.stack.imgur.com/q0s7R.png) |
70,506,535 | ```
{
id: 2,
attributes: {
title: ‘Test Title’,
body: ‘Test Body’,
date: null,
createdAt: ‘2021-11-30T20:52:09.206Z’,
updatedAt: ‘2021-11-30T20:57:26.724Z’,
publishedAt: ‘2021-11-30T20:57:26.720Z’
}
``` | 2021/12/28 | [
"https://Stackoverflow.com/questions/70506535",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17780639/"
] | Strapi 4 requires you to populate your request (see: [population documentation](https://docs.strapi.io/developer-docs/latest/developer-resources/database-apis-reference/rest/populating-fields.html#relation-media-fields) )
which could look like this (for level 2 population):
```
// populate request
const qs = ... | As people have mentioned above, Strapi v4 requires you to populate your request for the REST API
>
> The REST API by default does not populate any relations, media fields, components, or dynamic zones
>
>
>
You can create custom queries with QS library or if you just want response to be deeper than defult levels,... |
70,506,535 | ```
{
id: 2,
attributes: {
title: ‘Test Title’,
body: ‘Test Body’,
date: null,
createdAt: ‘2021-11-30T20:52:09.206Z’,
updatedAt: ‘2021-11-30T20:57:26.724Z’,
publishedAt: ‘2021-11-30T20:57:26.720Z’
}
``` | 2021/12/28 | [
"https://Stackoverflow.com/questions/70506535",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17780639/"
] | Strapi 4 requires you to populate your request (see: [population documentation](https://docs.strapi.io/developer-docs/latest/developer-resources/database-apis-reference/rest/populating-fields.html#relation-media-fields) )
which could look like this (for level 2 population):
```
// populate request
const qs = ... | Add **{?populate=\*}** at the end of url. Example, ***http://localhost:1337/api/cards?populate=***\* |
70,506,535 | ```
{
id: 2,
attributes: {
title: ‘Test Title’,
body: ‘Test Body’,
date: null,
createdAt: ‘2021-11-30T20:52:09.206Z’,
updatedAt: ‘2021-11-30T20:57:26.724Z’,
publishedAt: ‘2021-11-30T20:57:26.720Z’
}
``` | 2021/12/28 | [
"https://Stackoverflow.com/questions/70506535",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17780639/"
] | I've had this struggle myself as well. And I couldn't get this working with their Query Engine & Entity Engine using Strapi 4 & Nuxtjs.
To show the images or (dynamic) components in the API, be sure to use:
```
http://localhost:1337/api/[your api]?populate=*
```
They are not shown by default unfortunately. They sai... | You can simply access the images in strapi V4+ by graphql query ===>
```
images{
data{
id
attributes{
url
}
}
}
```
image e.g ===>
[](https://i.stack.imgur.com/q0s7R.png) |
70,506,535 | ```
{
id: 2,
attributes: {
title: ‘Test Title’,
body: ‘Test Body’,
date: null,
createdAt: ‘2021-11-30T20:52:09.206Z’,
updatedAt: ‘2021-11-30T20:57:26.724Z’,
publishedAt: ‘2021-11-30T20:57:26.720Z’
}
``` | 2021/12/28 | [
"https://Stackoverflow.com/questions/70506535",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17780639/"
] | I've had this struggle myself as well. And I couldn't get this working with their Query Engine & Entity Engine using Strapi 4 & Nuxtjs.
To show the images or (dynamic) components in the API, be sure to use:
```
http://localhost:1337/api/[your api]?populate=*
```
They are not shown by default unfortunately. They sai... | As people have mentioned above, Strapi v4 requires you to populate your request for the REST API
>
> The REST API by default does not populate any relations, media fields, components, or dynamic zones
>
>
>
You can create custom queries with QS library or if you just want response to be deeper than defult levels,... |
70,506,535 | ```
{
id: 2,
attributes: {
title: ‘Test Title’,
body: ‘Test Body’,
date: null,
createdAt: ‘2021-11-30T20:52:09.206Z’,
updatedAt: ‘2021-11-30T20:57:26.724Z’,
publishedAt: ‘2021-11-30T20:57:26.720Z’
}
``` | 2021/12/28 | [
"https://Stackoverflow.com/questions/70506535",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17780639/"
] | I've had this struggle myself as well. And I couldn't get this working with their Query Engine & Entity Engine using Strapi 4 & Nuxtjs.
To show the images or (dynamic) components in the API, be sure to use:
```
http://localhost:1337/api/[your api]?populate=*
```
They are not shown by default unfortunately. They sai... | Add **{?populate=\*}** at the end of url. Example, ***http://localhost:1337/api/cards?populate=***\* |
70,506,535 | ```
{
id: 2,
attributes: {
title: ‘Test Title’,
body: ‘Test Body’,
date: null,
createdAt: ‘2021-11-30T20:52:09.206Z’,
updatedAt: ‘2021-11-30T20:57:26.724Z’,
publishedAt: ‘2021-11-30T20:57:26.720Z’
}
``` | 2021/12/28 | [
"https://Stackoverflow.com/questions/70506535",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17780639/"
] | As people have mentioned above, Strapi v4 requires you to populate your request for the REST API
>
> The REST API by default does not populate any relations, media fields, components, or dynamic zones
>
>
>
You can create custom queries with QS library or if you just want response to be deeper than defult levels,... | You can simply access the images in strapi V4+ by graphql query ===>
```
images{
data{
id
attributes{
url
}
}
}
```
image e.g ===>
[](https://i.stack.imgur.com/q0s7R.png) |
70,506,535 | ```
{
id: 2,
attributes: {
title: ‘Test Title’,
body: ‘Test Body’,
date: null,
createdAt: ‘2021-11-30T20:52:09.206Z’,
updatedAt: ‘2021-11-30T20:57:26.724Z’,
publishedAt: ‘2021-11-30T20:57:26.720Z’
}
``` | 2021/12/28 | [
"https://Stackoverflow.com/questions/70506535",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17780639/"
] | You can simply access the images in strapi V4+ by graphql query ===>
```
images{
data{
id
attributes{
url
}
}
}
```
image e.g ===>
[](https://i.stack.imgur.com/q0s7R.png) | Add **{?populate=\*}** at the end of url. Example, ***http://localhost:1337/api/cards?populate=***\* |
70,506,535 | ```
{
id: 2,
attributes: {
title: ‘Test Title’,
body: ‘Test Body’,
date: null,
createdAt: ‘2021-11-30T20:52:09.206Z’,
updatedAt: ‘2021-11-30T20:57:26.724Z’,
publishedAt: ‘2021-11-30T20:57:26.720Z’
}
``` | 2021/12/28 | [
"https://Stackoverflow.com/questions/70506535",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17780639/"
] | As people have mentioned above, Strapi v4 requires you to populate your request for the REST API
>
> The REST API by default does not populate any relations, media fields, components, or dynamic zones
>
>
>
You can create custom queries with QS library or if you just want response to be deeper than defult levels,... | Add **{?populate=\*}** at the end of url. Example, ***http://localhost:1337/api/cards?populate=***\* |
9,606,027 | Working with an OAuth API I need to retrieve the access\_token attribute. Send the login information works fine and I do get a proper response back. The response is formatted as such:
```
access_token=SOMETOKEN&login=SOMELOGIN&apiKey=SOMEAPIKEY
```
Currently I'm getting the response as such:
```
org.apache.http.Ht... | 2012/03/07 | [
"https://Stackoverflow.com/questions/9606027",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/543920/"
] | Your `UNION` is converting the second to a string, presumably however you've defined `User..UserSidToUserId.UserSid`. Notice different answers:
```
SELECT SUSER_SID(), CONVERT(VARCHAR(64), SUSER_SID());
``` | The solution is that it turns out that the `UNIQUEIDENTIFIER` byte order is different from that of a `BINARY` type, with some parts in host byte order and some in network byte order. To make the two results match, you have to do:
```
SELECT (CONVERT(UNIQUEIDENTIFIER,SUSER_SID('sql_someuser')))
AS SUSER_SID_OF_... |
38,239,004 | **Nodejs Script:**
```
var numberlist = db.collection('fsnumbers');
var getTotalforToday = function(){
var curDate = moment().format('MMMM Do YYYY');
curDate = "/"+curDate+"/i";
numberlist.find({"date": { $regex: curDate } }, function(err, items){
if(items){
retur... | 2016/07/07 | [
"https://Stackoverflow.com/questions/38239004",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6453512/"
] | Because you're doing math on integers and storing the result in a float. The math is still done on integers. So you'll divide weight (50) by height\*height (around 10K). THat's less than 1, but the result of dividing two integers is always an integer. So it rounds to 0.
To fix that, make weight and height floats. | try like this
```
edit.putFloat("key", (float) 10.10);
```
and try to get the value
```
prefs.getFloat("key", (float) 10.0);
``` |
38,239,004 | **Nodejs Script:**
```
var numberlist = db.collection('fsnumbers');
var getTotalforToday = function(){
var curDate = moment().format('MMMM Do YYYY');
curDate = "/"+curDate+"/i";
numberlist.find({"date": { $regex: curDate } }, function(err, items){
if(items){
retur... | 2016/07/07 | [
"https://Stackoverflow.com/questions/38239004",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6453512/"
] | Because you're doing math on integers and storing the result in a float. The math is still done on integers. So you'll divide weight (50) by height\*height (around 10K). THat's less than 1, but the result of dividing two integers is always an integer. So it rounds to 0.
To fix that, make weight and height floats. | since weight and height are integers so probably the result should be zero.
For example
```
int a = 10
int b = 5
float c = a/(b*b);
```
it will return 0 because calculation in int results 0 and then it will typecast into float 0.0
you can typecast weight and height to float like
```
float c = (float)a/((float)b*(... |
38,239,004 | **Nodejs Script:**
```
var numberlist = db.collection('fsnumbers');
var getTotalforToday = function(){
var curDate = moment().format('MMMM Do YYYY');
curDate = "/"+curDate+"/i";
numberlist.find({"date": { $regex: curDate } }, function(err, items){
if(items){
retur... | 2016/07/07 | [
"https://Stackoverflow.com/questions/38239004",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6453512/"
] | Because you're doing math on integers and storing the result in a float. The math is still done on integers. So you'll divide weight (50) by height\*height (around 10K). THat's less than 1, but the result of dividing two integers is always an integer. So it rounds to 0.
To fix that, make weight and height floats. | The problem here is you are dividing ints, the result is then automatically cast to float, So if the result isn't great enough you get 0 (and either way you'd get an int).
You have to cast the first int in the division to float to get the desired result.
```
float formula = (float) weight / (height * height) * 10000;... |
38,239,004 | **Nodejs Script:**
```
var numberlist = db.collection('fsnumbers');
var getTotalforToday = function(){
var curDate = moment().format('MMMM Do YYYY');
curDate = "/"+curDate+"/i";
numberlist.find({"date": { $regex: curDate } }, function(err, items){
if(items){
retur... | 2016/07/07 | [
"https://Stackoverflow.com/questions/38239004",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6453512/"
] | try like this
```
edit.putFloat("key", (float) 10.10);
```
and try to get the value
```
prefs.getFloat("key", (float) 10.0);
``` | since weight and height are integers so probably the result should be zero.
For example
```
int a = 10
int b = 5
float c = a/(b*b);
```
it will return 0 because calculation in int results 0 and then it will typecast into float 0.0
you can typecast weight and height to float like
```
float c = (float)a/((float)b*(... |
38,239,004 | **Nodejs Script:**
```
var numberlist = db.collection('fsnumbers');
var getTotalforToday = function(){
var curDate = moment().format('MMMM Do YYYY');
curDate = "/"+curDate+"/i";
numberlist.find({"date": { $regex: curDate } }, function(err, items){
if(items){
retur... | 2016/07/07 | [
"https://Stackoverflow.com/questions/38239004",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6453512/"
] | try like this
```
edit.putFloat("key", (float) 10.10);
```
and try to get the value
```
prefs.getFloat("key", (float) 10.0);
``` | The problem here is you are dividing ints, the result is then automatically cast to float, So if the result isn't great enough you get 0 (and either way you'd get an int).
You have to cast the first int in the division to float to get the desired result.
```
float formula = (float) weight / (height * height) * 10000;... |
17,167 | If an airborne receiver heading out of bounds reaches out and breaks the plane of the end zone with the ball, moments after the ball was held outside the field of play (over the sideline), shouldn't the ball be called dead at the point it went over the sideline? Only seems fair, if the ball can cause a touchdown by goi... | 2017/10/20 | [
"https://sports.stackexchange.com/questions/17167",
"https://sports.stackexchange.com",
"https://sports.stackexchange.com/users/14170/"
] | No, the ball shouldn't be called dead because it is still a live ball. The goal line does not work the same way as the boundary lines. To be down out of bounds, a ball must make physical contact with the ground outside the playing field.
>
> ARTICLE 3. BALL OUT OF BOUNDS
> Item 1: Ball in Player Possession. A ball t... | Rules applicable to this question are,
[RULE 7 BALL IN PLAY, DEAD BALL, SCRIMMAGE: SECTION 2 DEAD BALL](https://operations.nfl.com/the-rules/2017-nfl-rulebook/#rule-7.-ball-in-play,-dead-ball,-scrimmage)
>
> ARTICLE 1. DEAD BALL DECLARED. An official shall declare the ball dead and the down ended:
>
> (e) when a ... |
8,959,878 | >
> **Possible Duplicate:**
>
> [What function to use to hash passwords in MySQL?](https://stackoverflow.com/questions/335888/what-function-to-use-to-hash-passwords-in-mysql)
>
> [Secure password storage](https://stackoverflow.com/questions/4334829/secure-password-storaging)
>
>
>
What is the best mechanism... | 2012/01/22 | [
"https://Stackoverflow.com/questions/8959878",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1145285/"
] | **Never** store encrypted passwords. Store a secure one-way hash instead, something like [SHA-1](http://en.wikipedia.org/wiki/SHA-1) (has some minor security issues), or one of the newer, more secure variants.
Doing so is actually against several regulatory requirements that you may be subject to, such as the PCI DSS ... | A common way to store passwords is to hash them using a message digest algorithm. I'd recommend SHA1, or if you need more bytes (-> less collision possible), SHA256 or 512. Here's an SHA1 implementation in Java:
<http://www.anyexample.com/programming/java/java_simple_class_to_compute_sha_1_hash.xml>
It's also advised... |
8,940 | I've been a ham for over 40 years, but *never* has there been such a prolonged period of such poor propagation. This has been especially the case over the past six months or so, *and they continue to deteriorate*.
What could possibly be the cause?
---------------------------------
This is taking into account informat... | 2017/07/23 | [
"https://ham.stackexchange.com/questions/8940",
"https://ham.stackexchange.com",
"https://ham.stackexchange.com/users/8717/"
] | It's pretty clear that we've reached the ~10.7-year solar cycle minimum in the midst of a low part of the ~87-year Gleissberg Cycle. See [this explanation from Wikipedia](https://en.wikipedia.org/wiki/Solar_cycle).
Occam's Razor points toward this relatively simple (though unfortunate for us hams) scientific explanati... | Bands were down, for the first several months figured it was temporary, even though repeatedly Space Weather had no proton showers or other anomalies to explain it. Been a ham for over 50 years, never remember anything like it.
I've begun to suspect some sort of human activity is poisoning the ionosphere. Perhaps a st... |
8,940 | I've been a ham for over 40 years, but *never* has there been such a prolonged period of such poor propagation. This has been especially the case over the past six months or so, *and they continue to deteriorate*.
What could possibly be the cause?
---------------------------------
This is taking into account informat... | 2017/07/23 | [
"https://ham.stackexchange.com/questions/8940",
"https://ham.stackexchange.com",
"https://ham.stackexchange.com/users/8717/"
] | In an effort to find some hard data, I wrote to Dr Carl Luetzelschwab, K9LA. Carl responds:
"The main reason is because we've basically been under solar minimum conditions for two years - and it looks like it's going to continue. We were spoiled by [*shorter - Ed.*] solar minimum durations prior to the minimum between... | A lot has to do with fewer hams out there and many that lack ability or motivation to setup antennas that work.
Just something I have noticed over the years...laziness?
Jim |
8,940 | I've been a ham for over 40 years, but *never* has there been such a prolonged period of such poor propagation. This has been especially the case over the past six months or so, *and they continue to deteriorate*.
What could possibly be the cause?
---------------------------------
This is taking into account informat... | 2017/07/23 | [
"https://ham.stackexchange.com/questions/8940",
"https://ham.stackexchange.com",
"https://ham.stackexchange.com/users/8717/"
] | It's pretty clear that we've reached the ~10.7-year solar cycle minimum in the midst of a low part of the ~87-year Gleissberg Cycle. See [this explanation from Wikipedia](https://en.wikipedia.org/wiki/Solar_cycle).
Occam's Razor points toward this relatively simple (though unfortunate for us hams) scientific explanati... | Heard another possibility on the "street". The proliferation of 'space junk' may have something to do with the singularity of the recent HF propagation decline. My recollection of a recent score keeper's reports is that there are 166 million pieces of man made stuff in orbit larger than 1 mm (or is it 1 cm?) weighing o... |
8,940 | I've been a ham for over 40 years, but *never* has there been such a prolonged period of such poor propagation. This has been especially the case over the past six months or so, *and they continue to deteriorate*.
What could possibly be the cause?
---------------------------------
This is taking into account informat... | 2017/07/23 | [
"https://ham.stackexchange.com/questions/8940",
"https://ham.stackexchange.com",
"https://ham.stackexchange.com/users/8717/"
] | After listening to the increased noise level on 20M, and its direction, I observe that the noise has a man-made character, varies greatly over short periods, and always peaks with the peak direction of propagation, mostly NE to Europe.
That's what got me googling and to this page with the same suspicion as Noah's - t... | Heard another possibility on the "street". The proliferation of 'space junk' may have something to do with the singularity of the recent HF propagation decline. My recollection of a recent score keeper's reports is that there are 166 million pieces of man made stuff in orbit larger than 1 mm (or is it 1 cm?) weighing o... |
8,940 | I've been a ham for over 40 years, but *never* has there been such a prolonged period of such poor propagation. This has been especially the case over the past six months or so, *and they continue to deteriorate*.
What could possibly be the cause?
---------------------------------
This is taking into account informat... | 2017/07/23 | [
"https://ham.stackexchange.com/questions/8940",
"https://ham.stackexchange.com",
"https://ham.stackexchange.com/users/8717/"
] | In an effort to find some hard data, I wrote to Dr Carl Luetzelschwab, K9LA. Carl responds:
"The main reason is because we've basically been under solar minimum conditions for two years - and it looks like it's going to continue. We were spoiled by [*shorter - Ed.*] solar minimum durations prior to the minimum between... | Bands were down, for the first several months figured it was temporary, even though repeatedly Space Weather had no proton showers or other anomalies to explain it. Been a ham for over 50 years, never remember anything like it.
I've begun to suspect some sort of human activity is poisoning the ionosphere. Perhaps a st... |
8,940 | I've been a ham for over 40 years, but *never* has there been such a prolonged period of such poor propagation. This has been especially the case over the past six months or so, *and they continue to deteriorate*.
What could possibly be the cause?
---------------------------------
This is taking into account informat... | 2017/07/23 | [
"https://ham.stackexchange.com/questions/8940",
"https://ham.stackexchange.com",
"https://ham.stackexchange.com/users/8717/"
] | There's no real magic, it's just the signal to noise ratio. If you're certain that the noise floor hasn't changed then the signal propagation has, and vice-versa.
Any number of upper atmosphere hypotheses can lead to a lower charge density which means a lower reflection coefficient resulting in a weak bounce and lous... | Heard another possibility on the "street". The proliferation of 'space junk' may have something to do with the singularity of the recent HF propagation decline. My recollection of a recent score keeper's reports is that there are 166 million pieces of man made stuff in orbit larger than 1 mm (or is it 1 cm?) weighing o... |
8,940 | I've been a ham for over 40 years, but *never* has there been such a prolonged period of such poor propagation. This has been especially the case over the past six months or so, *and they continue to deteriorate*.
What could possibly be the cause?
---------------------------------
This is taking into account informat... | 2017/07/23 | [
"https://ham.stackexchange.com/questions/8940",
"https://ham.stackexchange.com",
"https://ham.stackexchange.com/users/8717/"
] | In an effort to find some hard data, I wrote to Dr Carl Luetzelschwab, K9LA. Carl responds:
"The main reason is because we've basically been under solar minimum conditions for two years - and it looks like it's going to continue. We were spoiled by [*shorter - Ed.*] solar minimum durations prior to the minimum between... | It's pretty clear that we've reached the ~10.7-year solar cycle minimum in the midst of a low part of the ~87-year Gleissberg Cycle. See [this explanation from Wikipedia](https://en.wikipedia.org/wiki/Solar_cycle).
Occam's Razor points toward this relatively simple (though unfortunate for us hams) scientific explanati... |
8,940 | I've been a ham for over 40 years, but *never* has there been such a prolonged period of such poor propagation. This has been especially the case over the past six months or so, *and they continue to deteriorate*.
What could possibly be the cause?
---------------------------------
This is taking into account informat... | 2017/07/23 | [
"https://ham.stackexchange.com/questions/8940",
"https://ham.stackexchange.com",
"https://ham.stackexchange.com/users/8717/"
] | It's pretty clear that we've reached the ~10.7-year solar cycle minimum in the midst of a low part of the ~87-year Gleissberg Cycle. See [this explanation from Wikipedia](https://en.wikipedia.org/wiki/Solar_cycle).
Occam's Razor points toward this relatively simple (though unfortunate for us hams) scientific explanati... | There's no real magic, it's just the signal to noise ratio. If you're certain that the noise floor hasn't changed then the signal propagation has, and vice-versa.
Any number of upper atmosphere hypotheses can lead to a lower charge density which means a lower reflection coefficient resulting in a weak bounce and lous... |
8,940 | I've been a ham for over 40 years, but *never* has there been such a prolonged period of such poor propagation. This has been especially the case over the past six months or so, *and they continue to deteriorate*.
What could possibly be the cause?
---------------------------------
This is taking into account informat... | 2017/07/23 | [
"https://ham.stackexchange.com/questions/8940",
"https://ham.stackexchange.com",
"https://ham.stackexchange.com/users/8717/"
] | There's no real magic, it's just the signal to noise ratio. If you're certain that the noise floor hasn't changed then the signal propagation has, and vice-versa.
Any number of upper atmosphere hypotheses can lead to a lower charge density which means a lower reflection coefficient resulting in a weak bounce and lous... | Bands were down, for the first several months figured it was temporary, even though repeatedly Space Weather had no proton showers or other anomalies to explain it. Been a ham for over 50 years, never remember anything like it.
I've begun to suspect some sort of human activity is poisoning the ionosphere. Perhaps a st... |
8,940 | I've been a ham for over 40 years, but *never* has there been such a prolonged period of such poor propagation. This has been especially the case over the past six months or so, *and they continue to deteriorate*.
What could possibly be the cause?
---------------------------------
This is taking into account informat... | 2017/07/23 | [
"https://ham.stackexchange.com/questions/8940",
"https://ham.stackexchange.com",
"https://ham.stackexchange.com/users/8717/"
] | It's pretty clear that we've reached the ~10.7-year solar cycle minimum in the midst of a low part of the ~87-year Gleissberg Cycle. See [this explanation from Wikipedia](https://en.wikipedia.org/wiki/Solar_cycle).
Occam's Razor points toward this relatively simple (though unfortunate for us hams) scientific explanati... | After listening to the increased noise level on 20M, and its direction, I observe that the noise has a man-made character, varies greatly over short periods, and always peaks with the peak direction of propagation, mostly NE to Europe.
That's what got me googling and to this page with the same suspicion as Noah's - t... |
22,073,077 | I wonder if someone could actually show me a sample PHP code on how can i export around 50 tables in a MySQL database to a CSV file. My database name is "samples" and i have around 49 tables under this database. I want each tables (which has around 20,00 rows) under this database to be exported to a csv file.
Thank yo... | 2014/02/27 | [
"https://Stackoverflow.com/questions/22073077",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2636331/"
] | If you have access to the MySQL server, you can use `SELECT INTO OUTFILE` to do most of this for you:
```
SELECT * FROM my_table
INTO OUTFILE 'my_table.csv'
FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '"'
ESCAPED BY '\\'
LINES TERMINATED BY '\n';
```
You may want to have a line delimiter of `\r\n` if y... | Normally I would do this with something like MySQL Workbench or SQLYog. But if you need it in php there are some great tutorials on exporting from sql to php out there.
Something like this would work, but you would need to loop through the tables:
<http://www.ineedtutorials.com/code/php/export-mysql-data-to-csv-php-... |
22,073,077 | I wonder if someone could actually show me a sample PHP code on how can i export around 50 tables in a MySQL database to a CSV file. My database name is "samples" and i have around 49 tables under this database. I want each tables (which has around 20,00 rows) under this database to be exported to a csv file.
Thank yo... | 2014/02/27 | [
"https://Stackoverflow.com/questions/22073077",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2636331/"
] | If you have access to the MySQL server, you can use `SELECT INTO OUTFILE` to do most of this for you:
```
SELECT * FROM my_table
INTO OUTFILE 'my_table.csv'
FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '"'
ESCAPED BY '\\'
LINES TERMINATED BY '\n';
```
You may want to have a line delimiter of `\r\n` if y... | This is how to export 1 table directly from mysql terminal. I've just used the tmp directory as an example buy you can change the path to anything you like:
```
select * from product where condition1 order by condition2 desc INTO OUTFILE '/tmp/myfile.csv' FIELDS TERMINATED BY ',' ESCAPED BY '\\' OPTIONALLY ENCLOS... |
22,073,077 | I wonder if someone could actually show me a sample PHP code on how can i export around 50 tables in a MySQL database to a CSV file. My database name is "samples" and i have around 49 tables under this database. I want each tables (which has around 20,00 rows) under this database to be exported to a csv file.
Thank yo... | 2014/02/27 | [
"https://Stackoverflow.com/questions/22073077",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2636331/"
] | If you have access to the MySQL server, you can use `SELECT INTO OUTFILE` to do most of this for you:
```
SELECT * FROM my_table
INTO OUTFILE 'my_table.csv'
FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '"'
ESCAPED BY '\\'
LINES TERMINATED BY '\n';
```
You may want to have a line delimiter of `\r\n` if y... | ```
Try...
Create csv file.
<?php
mysql_connect('localhost', 'root', '');
mysql_select_db('mydb');
$qry = mysql_query("SELECT * FROM tablename");
$data = "";
while($row = mysql_fetch_array($qry)) {
$data .= $row['field1'].",".$row['field2'].",".$row['field3'].",".$row['field4']."\n";
}
$file = 'file.csv';
file_put_c... |
3,194,248 | I am trying to numerically (in Julia) verify that
>
> A symmetric matrix $\mathbf{A}$ is positive semidefinite if and only if it is a covariance matrix.
>
>
>
Then I need to verify in both directions, i.e.
1. Given a positive semidefinite matrix $\mathbf{A}$, show that it is a covariance matrix.
2. Given a covar... | 2019/04/20 | [
"https://math.stackexchange.com/questions/3194248",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/488804/"
] | Maybe it's easier to verify that a covariance matrix is a Gram matrix (and vice versa) and to verify that a p.s.d. matrix is a Gram matrix (and vice versa). The numerical linear algebra step could then be the Cholesky decomposition.
But with any demonstration of this result on a computer whose computational model is s... | The term "covariance matrix" comes from Probability Theory not from Linear Algebra. So, any positive semidefinite matrix can be assumed to be a covariance matrix of some distribution.
As for precision issue, having a minus eigenvalue in the order of 1e-15 is not problem because "double type" has a precision which is ... |
28,737,695 | In the following code I have created an angular widget which uses an angular grid to pass data. However, I am getting the following error `Error: [$injector:unpr] Unknown provider: alphadataProvider <- alphadata`
The widget code:
```
'use strict';
angular.module('alphabeta.table.widgets', ['adf.provider', 'btford.ma... | 2015/02/26 | [
"https://Stackoverflow.com/questions/28737695",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4532421/"
] | Your procedure is rather large and it would take some time to understand the complete logic. However, there is one thing that seems likely to be the issue and it is your CASE expressions. They probably should be inside the aggregate function. What I mean is, instead of writing them like this:
```
CASE WHEN UseDate>=@F... | If I grossly simplify your query, I see something strange in your `group by`.
```
SELECT B.Buyer
FROM
(
SELECT Buyer
FROM
(
SELECT C.Name as Buyer
FROM ....
)
) B
GROUP BY year(UseDate),month(UseDate),UseDate,Buyer
```
If you want one line per Buyer, why do you not group on Buyer ... |
230,215 | I am using the book class and have a long bibliography (using Biblatex) at the end of each chapter. When there is a long reference around where a page break occurs, the whole reference shifts to the next page (good), but for aesthetic reasons I would like the separation between references on the full page to increase s... | 2015/02/26 | [
"https://tex.stackexchange.com/questions/230215",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/73091/"
] | One option is to use a rubber length for `\bibitemsep`
```
\setlength{\bibitemsep}{12pt plus 10pt minus 10pt} %% adjust this suitably
```
You have to adjust `plus 10pt minus 10pt` suitably at the end (for example give some more value).
Code:
```
\documentclass[10pt,a4paper]{book}
\usepackage{lipsum,showframe}
\u... | The desired effect can be achieved by redefining `\bibsetup`, i.e.,
```
\renewcommand{\bibsetup}{\flushbottom}
```
According to the manual `\bibsetup` contains
>
> Arbitrary code to be executed at the beginning of the bibliography, intended for commands which affect the layout of the bibliography.
>
>
>
![ente... |
20,173,482 | Should the following code not only remove one backslash rather than two backslashes ? But in the output i see 2 backslashes removed . can somebody explain ?
```
<?php
function stripslashes_deep($value)
{
$value = is_array($value) ?
array_map('stripslashes_deep', $value) :
strips... | 2013/11/24 | [
"https://Stackoverflow.com/questions/20173482",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2968042/"
] | This is one way to do it, with basic OOP. Create Question class to represent your individual question
```
public class Question
{
public int No;
public string QuestionText;
public bool isAnswered;
}
```
And in the Main class:
```
public class Main
{
//your 26 questions stored in this variable
pu... | Create a "Question" class and add all necessary properties and make sure you add a property "answered". Then create a generic list of questions (maybe random) into `List<Question>`. Finally query the list (e.g. by Linq) where question is not answered and question-number greater than current question number |
631,682 | I'm a C++ developer - not a java developer, but have to get this code working...
I have 2 public classes that will be used by another product. I used the package directive in each of the java files.
```
package com.company.thing;
class MyClass ...
```
When I try to compile a test app that uses that I add
```
im... | 2009/03/10 | [
"https://Stackoverflow.com/questions/631682",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10755/"
] | It sounds like you are on the right track with your directory structure. When you compile the dependent code, specify the `-classpath` argument of `javac`. Use the *parent* directory of the `com` directory, where `com`, in turn, contains `company/thing/YourClass.class`
So, when you do this:
```
javac -classpath <pare... | The standard Java classloader is a stickler for directory structure. Each entry in the classpath is a directory or jar file (or zip file, really), which it then searches for the given class file. For example, if your classpath is ".;my.jar", it will search for com.example.Foo in the following locations:
```
./com/exam... |
631,682 | I'm a C++ developer - not a java developer, but have to get this code working...
I have 2 public classes that will be used by another product. I used the package directive in each of the java files.
```
package com.company.thing;
class MyClass ...
```
When I try to compile a test app that uses that I add
```
im... | 2009/03/10 | [
"https://Stackoverflow.com/questions/631682",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10755/"
] | You got a bunch of good answers, so I'll just throw out a suggestion. If you are going to be working on this project for more than 2 days, download eclipse or netbeans and build your project in there.
If you are not normally a java programmer, then the help it will give you will be invaluable.
It's not worth the 1/2 ... | The standard Java classloader is a stickler for directory structure. Each entry in the classpath is a directory or jar file (or zip file, really), which it then searches for the given class file. For example, if your classpath is ".;my.jar", it will search for com.example.Foo in the following locations:
```
./com/exam... |
631,682 | I'm a C++ developer - not a java developer, but have to get this code working...
I have 2 public classes that will be used by another product. I used the package directive in each of the java files.
```
package com.company.thing;
class MyClass ...
```
When I try to compile a test app that uses that I add
```
im... | 2009/03/10 | [
"https://Stackoverflow.com/questions/631682",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10755/"
] | Yes, this is a classpath issue. You need to tell the compiler and runtime that the directory where your .class files live is part of the CLASSPATH. The directory that you need to add is the parent of the "com" directory at the start of your package structure.
You do this using the -classpath argument for both javac.ex... | You got a bunch of good answers, so I'll just throw out a suggestion. If you are going to be working on this project for more than 2 days, download eclipse or netbeans and build your project in there.
If you are not normally a java programmer, then the help it will give you will be invaluable.
It's not worth the 1/2 ... |
631,682 | I'm a C++ developer - not a java developer, but have to get this code working...
I have 2 public classes that will be used by another product. I used the package directive in each of the java files.
```
package com.company.thing;
class MyClass ...
```
When I try to compile a test app that uses that I add
```
im... | 2009/03/10 | [
"https://Stackoverflow.com/questions/631682",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10755/"
] | You got a bunch of good answers, so I'll just throw out a suggestion. If you are going to be working on this project for more than 2 days, download eclipse or netbeans and build your project in there.
If you are not normally a java programmer, then the help it will give you will be invaluable.
It's not worth the 1/2 ... | Just add classpath entry ( I mean your parent directory location) under System Variables and User Variables menu ...
Follow : Right Click My Computer>Properties>Advanced>Environment Variables |
631,682 | I'm a C++ developer - not a java developer, but have to get this code working...
I have 2 public classes that will be used by another product. I used the package directive in each of the java files.
```
package com.company.thing;
class MyClass ...
```
When I try to compile a test app that uses that I add
```
im... | 2009/03/10 | [
"https://Stackoverflow.com/questions/631682",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10755/"
] | Okay, just to clarify things that have already been posted.
You should have the directory `com`, containing the directory `company`, containing the directory `example`, containing the file `MyClass.java`.
From the folder containing `com`, run:
```
$ javac com\company\example\MyClass.java
```
Then:
```
$ java co... | It sounds like you are on the right track with your directory structure. When you compile the dependent code, specify the `-classpath` argument of `javac`. Use the *parent* directory of the `com` directory, where `com`, in turn, contains `company/thing/YourClass.class`
So, when you do this:
```
javac -classpath <pare... |
631,682 | I'm a C++ developer - not a java developer, but have to get this code working...
I have 2 public classes that will be used by another product. I used the package directive in each of the java files.
```
package com.company.thing;
class MyClass ...
```
When I try to compile a test app that uses that I add
```
im... | 2009/03/10 | [
"https://Stackoverflow.com/questions/631682",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10755/"
] | Okay, just to clarify things that have already been posted.
You should have the directory `com`, containing the directory `company`, containing the directory `example`, containing the file `MyClass.java`.
From the folder containing `com`, run:
```
$ javac com\company\example\MyClass.java
```
Then:
```
$ java co... | You got a bunch of good answers, so I'll just throw out a suggestion. If you are going to be working on this project for more than 2 days, download eclipse or netbeans and build your project in there.
If you are not normally a java programmer, then the help it will give you will be invaluable.
It's not worth the 1/2 ... |
631,682 | I'm a C++ developer - not a java developer, but have to get this code working...
I have 2 public classes that will be used by another product. I used the package directive in each of the java files.
```
package com.company.thing;
class MyClass ...
```
When I try to compile a test app that uses that I add
```
im... | 2009/03/10 | [
"https://Stackoverflow.com/questions/631682",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10755/"
] | It sounds like you are on the right track with your directory structure. When you compile the dependent code, specify the `-classpath` argument of `javac`. Use the *parent* directory of the `com` directory, where `com`, in turn, contains `company/thing/YourClass.class`
So, when you do this:
```
javac -classpath <pare... | Just add classpath entry ( I mean your parent directory location) under System Variables and User Variables menu ...
Follow : Right Click My Computer>Properties>Advanced>Environment Variables |
631,682 | I'm a C++ developer - not a java developer, but have to get this code working...
I have 2 public classes that will be used by another product. I used the package directive in each of the java files.
```
package com.company.thing;
class MyClass ...
```
When I try to compile a test app that uses that I add
```
im... | 2009/03/10 | [
"https://Stackoverflow.com/questions/631682",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10755/"
] | Yes, this is a classpath issue. You need to tell the compiler and runtime that the directory where your .class files live is part of the CLASSPATH. The directory that you need to add is the parent of the "com" directory at the start of your package structure.
You do this using the -classpath argument for both javac.ex... | The standard Java classloader is a stickler for directory structure. Each entry in the classpath is a directory or jar file (or zip file, really), which it then searches for the given class file. For example, if your classpath is ".;my.jar", it will search for com.example.Foo in the following locations:
```
./com/exam... |
631,682 | I'm a C++ developer - not a java developer, but have to get this code working...
I have 2 public classes that will be used by another product. I used the package directive in each of the java files.
```
package com.company.thing;
class MyClass ...
```
When I try to compile a test app that uses that I add
```
im... | 2009/03/10 | [
"https://Stackoverflow.com/questions/631682",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10755/"
] | Yes, this is a classpath issue. You need to tell the compiler and runtime that the directory where your .class files live is part of the CLASSPATH. The directory that you need to add is the parent of the "com" directory at the start of your package structure.
You do this using the -classpath argument for both javac.ex... | It sounds like you are on the right track with your directory structure. When you compile the dependent code, specify the `-classpath` argument of `javac`. Use the *parent* directory of the `com` directory, where `com`, in turn, contains `company/thing/YourClass.class`
So, when you do this:
```
javac -classpath <pare... |
631,682 | I'm a C++ developer - not a java developer, but have to get this code working...
I have 2 public classes that will be used by another product. I used the package directive in each of the java files.
```
package com.company.thing;
class MyClass ...
```
When I try to compile a test app that uses that I add
```
im... | 2009/03/10 | [
"https://Stackoverflow.com/questions/631682",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10755/"
] | Okay, just to clarify things that have already been posted.
You should have the directory `com`, containing the directory `company`, containing the directory `example`, containing the file `MyClass.java`.
From the folder containing `com`, run:
```
$ javac com\company\example\MyClass.java
```
Then:
```
$ java co... | The standard Java classloader is a stickler for directory structure. Each entry in the classpath is a directory or jar file (or zip file, really), which it then searches for the given class file. For example, if your classpath is ".;my.jar", it will search for com.example.Foo in the following locations:
```
./com/exam... |
35,674,082 | I have a model for my view.
That model is array of objects:
```
var arr = { "12345qwery": { prop1: "value", prop2: "value" } } // contains 500 items
```
And today I am filtering it in the following way:
```
arr = $filter('filter')(arr, filterTerm); // contains 4 items
```
And after this line I get nice filtere... | 2016/02/27 | [
"https://Stackoverflow.com/questions/35674082",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/480231/"
] | One way to accomplish this is to create two copies of data. keep original same as ever and assign filtered copy of data to map as marker. when ever user changes filter term, apply filter on Original data and assign result to filtered data variable. for instance,
```
$scope.orignalMarkers = {1,2,3,4}
$scope.filteredMar... | Use `$watch('searchTerm')` to filter on change and transform the `markers` Object to array before apply `$filter`.
```
$scope.filteredMarkers=$scope.markers;
$scope.$watch("filterTerm",function(filterTerm){
$scope.arr=Object.keys($scope.markers).map(function(key) {
return $scope.markers... |
35,674,082 | I have a model for my view.
That model is array of objects:
```
var arr = { "12345qwery": { prop1: "value", prop2: "value" } } // contains 500 items
```
And today I am filtering it in the following way:
```
arr = $filter('filter')(arr, filterTerm); // contains 4 items
```
And after this line I get nice filtere... | 2016/02/27 | [
"https://Stackoverflow.com/questions/35674082",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/480231/"
] | Ok.. So you have a few things going on.
Issues
------
* **Scoping**: Move your scope a bit out. Since you need to use `filterTerm` it needs to be within your controller scope, so move the scope a level out. I moved it out to the `<body>` tag - see [plnkr](https://plnkr.co/edit/gcxmAkAPutjN47NsO3Aa?p=preview).
* **Str... | Use `$watch('searchTerm')` to filter on change and transform the `markers` Object to array before apply `$filter`.
```
$scope.filteredMarkers=$scope.markers;
$scope.$watch("filterTerm",function(filterTerm){
$scope.arr=Object.keys($scope.markers).map(function(key) {
return $scope.markers... |
35,674,082 | I have a model for my view.
That model is array of objects:
```
var arr = { "12345qwery": { prop1: "value", prop2: "value" } } // contains 500 items
```
And today I am filtering it in the following way:
```
arr = $filter('filter')(arr, filterTerm); // contains 4 items
```
And after this line I get nice filtere... | 2016/02/27 | [
"https://Stackoverflow.com/questions/35674082",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/480231/"
] | The problem is that you are trying to filter an object instead an array.
Try to build your own custom filer:
```
app.filter('myObjectFilter', function() {
return function(input, search) {
var result = {};
for (var key in input) {
if (input.hasOwnProperty(key)) {
if (input[key].data.toLowerCase... | Use `$watch('searchTerm')` to filter on change and transform the `markers` Object to array before apply `$filter`.
```
$scope.filteredMarkers=$scope.markers;
$scope.$watch("filterTerm",function(filterTerm){
$scope.arr=Object.keys($scope.markers).map(function(key) {
return $scope.markers... |
35,674,082 | I have a model for my view.
That model is array of objects:
```
var arr = { "12345qwery": { prop1: "value", prop2: "value" } } // contains 500 items
```
And today I am filtering it in the following way:
```
arr = $filter('filter')(arr, filterTerm); // contains 4 items
```
And after this line I get nice filtere... | 2016/02/27 | [
"https://Stackoverflow.com/questions/35674082",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/480231/"
] | Ok.. So you have a few things going on.
Issues
------
* **Scoping**: Move your scope a bit out. Since you need to use `filterTerm` it needs to be within your controller scope, so move the scope a level out. I moved it out to the `<body>` tag - see [plnkr](https://plnkr.co/edit/gcxmAkAPutjN47NsO3Aa?p=preview).
* **Str... | One way to filter in angularjs view
```
<input type="text" ng-model="filterBy"><!-- this is filter option -->
<div ng-repeat="row in rows| filter: {filterName : filterBy}">
```
Or you can also try in controller something like this
```
$scope.filtered = $filter('filter')($scope.results, filterTerm)[0];
``` |
35,674,082 | I have a model for my view.
That model is array of objects:
```
var arr = { "12345qwery": { prop1: "value", prop2: "value" } } // contains 500 items
```
And today I am filtering it in the following way:
```
arr = $filter('filter')(arr, filterTerm); // contains 4 items
```
And after this line I get nice filtere... | 2016/02/27 | [
"https://Stackoverflow.com/questions/35674082",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/480231/"
] | You need to copy the markers array using angular.copy
```
angular.extend($scope,{
filteredMarkers:angular.copy($scope.markers)
});
```
Write your customer filter to filter object instead of array
```
app.filter('markerFilter',function(){
return function(input,filterBy){
var markers = [];
if(input ... | You could do something like I've done in [a plunker forked from yours](https://plnkr.co/edit/W0odXKMDPrNtKjSfO8O7?p=preview). Create a factory where you keep your marker objects, return them to the controller as called, and then filter them according to the `filterTerm`(which wasn't within the scope of your controller ... |
35,674,082 | I have a model for my view.
That model is array of objects:
```
var arr = { "12345qwery": { prop1: "value", prop2: "value" } } // contains 500 items
```
And today I am filtering it in the following way:
```
arr = $filter('filter')(arr, filterTerm); // contains 4 items
```
And after this line I get nice filtere... | 2016/02/27 | [
"https://Stackoverflow.com/questions/35674082",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/480231/"
] | Ok.. So you have a few things going on.
Issues
------
* **Scoping**: Move your scope a bit out. Since you need to use `filterTerm` it needs to be within your controller scope, so move the scope a level out. I moved it out to the `<body>` tag - see [plnkr](https://plnkr.co/edit/gcxmAkAPutjN47NsO3Aa?p=preview).
* **Str... | When you apply an angular filter in your **controller**, it is a one-shot process. It seems that your use-case actually fits better to applying the filter within the **view**, like this:
```
{{ arr | filter : filterTerm}}
```
This will leave your model unchanged, but show only the filtered items in the view anyway. ... |
35,674,082 | I have a model for my view.
That model is array of objects:
```
var arr = { "12345qwery": { prop1: "value", prop2: "value" } } // contains 500 items
```
And today I am filtering it in the following way:
```
arr = $filter('filter')(arr, filterTerm); // contains 4 items
```
And after this line I get nice filtere... | 2016/02/27 | [
"https://Stackoverflow.com/questions/35674082",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/480231/"
] | One way to filter in angularjs view
```
<input type="text" ng-model="filterBy"><!-- this is filter option -->
<div ng-repeat="row in rows| filter: {filterName : filterBy}">
```
Or you can also try in controller something like this
```
$scope.filtered = $filter('filter')($scope.results, filterTerm)[0];
``` | I don't know that there is an easy built-in 'angular' way to approach this. Here is how I would handle filtering a list by multiple filters. I would keep an array of filters, and then anytime any of those filters changed, regenerate the list of results based on ALL of the filters.
Take a look at this snippet and see ... |
35,674,082 | I have a model for my view.
That model is array of objects:
```
var arr = { "12345qwery": { prop1: "value", prop2: "value" } } // contains 500 items
```
And today I am filtering it in the following way:
```
arr = $filter('filter')(arr, filterTerm); // contains 4 items
```
And after this line I get nice filtere... | 2016/02/27 | [
"https://Stackoverflow.com/questions/35674082",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/480231/"
] | One way to filter in angularjs view
```
<input type="text" ng-model="filterBy"><!-- this is filter option -->
<div ng-repeat="row in rows| filter: {filterName : filterBy}">
```
Or you can also try in controller something like this
```
$scope.filtered = $filter('filter')($scope.results, filterTerm)[0];
``` | Use `$watch('searchTerm')` to filter on change and transform the `markers` Object to array before apply `$filter`.
```
$scope.filteredMarkers=$scope.markers;
$scope.$watch("filterTerm",function(filterTerm){
$scope.arr=Object.keys($scope.markers).map(function(key) {
return $scope.markers... |
35,674,082 | I have a model for my view.
That model is array of objects:
```
var arr = { "12345qwery": { prop1: "value", prop2: "value" } } // contains 500 items
```
And today I am filtering it in the following way:
```
arr = $filter('filter')(arr, filterTerm); // contains 4 items
```
And after this line I get nice filtere... | 2016/02/27 | [
"https://Stackoverflow.com/questions/35674082",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/480231/"
] | When you apply an angular filter in your **controller**, it is a one-shot process. It seems that your use-case actually fits better to applying the filter within the **view**, like this:
```
{{ arr | filter : filterTerm}}
```
This will leave your model unchanged, but show only the filtered items in the view anyway. ... | You could do something like I've done in [a plunker forked from yours](https://plnkr.co/edit/W0odXKMDPrNtKjSfO8O7?p=preview). Create a factory where you keep your marker objects, return them to the controller as called, and then filter them according to the `filterTerm`(which wasn't within the scope of your controller ... |
35,674,082 | I have a model for my view.
That model is array of objects:
```
var arr = { "12345qwery": { prop1: "value", prop2: "value" } } // contains 500 items
```
And today I am filtering it in the following way:
```
arr = $filter('filter')(arr, filterTerm); // contains 4 items
```
And after this line I get nice filtere... | 2016/02/27 | [
"https://Stackoverflow.com/questions/35674082",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/480231/"
] | You could do something like I've done in [a plunker forked from yours](https://plnkr.co/edit/W0odXKMDPrNtKjSfO8O7?p=preview). Create a factory where you keep your marker objects, return them to the controller as called, and then filter them according to the `filterTerm`(which wasn't within the scope of your controller ... | I don't know that there is an easy built-in 'angular' way to approach this. Here is how I would handle filtering a list by multiple filters. I would keep an array of filters, and then anytime any of those filters changed, regenerate the list of results based on ALL of the filters.
Take a look at this snippet and see ... |
25,836,045 | I'd like to create a HTML form as follows:
```
<form action="<?php print($action); ?>" method="post">
<label for="possibilities">Possibilites</label>
<select name="possibility" id="possibility">
<?php foreach ($possibilites as $possibility): ?>
<option value="<?php print($possibility['id'])... | 2014/09/14 | [
"https://Stackoverflow.com/questions/25836045",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/653379/"
] | With jquery tho following code would be an option:
```
$(document).ready(function() {
$('#selectId').on('change', function() {
$('#restDivId').load('partialHtmlPage.php?value=' + $('#selectId').val());
});
});
``` | Building various DOM trees is the faster choice. And there is no better or more secure choice actually, both are the same if we're talking security... |
25,836,045 | I'd like to create a HTML form as follows:
```
<form action="<?php print($action); ?>" method="post">
<label for="possibilities">Possibilites</label>
<select name="possibility" id="possibility">
<?php foreach ($possibilites as $possibility): ?>
<option value="<?php print($possibility['id'])... | 2014/09/14 | [
"https://Stackoverflow.com/questions/25836045",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/653379/"
] | With jquery tho following code would be an option:
```
$(document).ready(function() {
$('#selectId').on('change', function() {
$('#restDivId').load('partialHtmlPage.php?value=' + $('#selectId').val());
});
});
``` | Use document fragment and dom manipulation to dynamically update your markup. It is fast enough and completely client side. In respect to the use of jQuery, I would rather be framework agnostic at first unless you need some specific options provided by said frameworks.
Doc:
* <http://www.w3.org/TR/DOM-Level-3-Core/co... |
25,836,045 | I'd like to create a HTML form as follows:
```
<form action="<?php print($action); ?>" method="post">
<label for="possibilities">Possibilites</label>
<select name="possibility" id="possibility">
<?php foreach ($possibilites as $possibility): ?>
<option value="<?php print($possibility['id'])... | 2014/09/14 | [
"https://Stackoverflow.com/questions/25836045",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/653379/"
] | With jquery tho following code would be an option:
```
$(document).ready(function() {
$('#selectId').on('change', function() {
$('#restDivId').load('partialHtmlPage.php?value=' + $('#selectId').val());
});
});
``` | To me it would really depend on a few things:
* How many additional form elements are you going to need to display?
* Do you need record the steps in filling out the form on the server side in some manner?
* Do you need to evaluate the data submitted in the form along with data only available on the server in order to... |
25,836,045 | I'd like to create a HTML form as follows:
```
<form action="<?php print($action); ?>" method="post">
<label for="possibilities">Possibilites</label>
<select name="possibility" id="possibility">
<?php foreach ($possibilites as $possibility): ?>
<option value="<?php print($possibility['id'])... | 2014/09/14 | [
"https://Stackoverflow.com/questions/25836045",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/653379/"
] | create an additional div or any other html element where form needs to be displayed
```
<div class="formGenerated"></div>
```
Then in javascript
change event helps to know when any of the option is selected
```
$(document).ready(function() {
$('#possibility').on('change', function() {
var selectedVal = ... | Building various DOM trees is the faster choice. And there is no better or more secure choice actually, both are the same if we're talking security... |
25,836,045 | I'd like to create a HTML form as follows:
```
<form action="<?php print($action); ?>" method="post">
<label for="possibilities">Possibilites</label>
<select name="possibility" id="possibility">
<?php foreach ($possibilites as $possibility): ?>
<option value="<?php print($possibility['id'])... | 2014/09/14 | [
"https://Stackoverflow.com/questions/25836045",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/653379/"
] | create an additional div or any other html element where form needs to be displayed
```
<div class="formGenerated"></div>
```
Then in javascript
change event helps to know when any of the option is selected
```
$(document).ready(function() {
$('#possibility').on('change', function() {
var selectedVal = ... | Use document fragment and dom manipulation to dynamically update your markup. It is fast enough and completely client side. In respect to the use of jQuery, I would rather be framework agnostic at first unless you need some specific options provided by said frameworks.
Doc:
* <http://www.w3.org/TR/DOM-Level-3-Core/co... |
25,836,045 | I'd like to create a HTML form as follows:
```
<form action="<?php print($action); ?>" method="post">
<label for="possibilities">Possibilites</label>
<select name="possibility" id="possibility">
<?php foreach ($possibilites as $possibility): ?>
<option value="<?php print($possibility['id'])... | 2014/09/14 | [
"https://Stackoverflow.com/questions/25836045",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/653379/"
] | create an additional div or any other html element where form needs to be displayed
```
<div class="formGenerated"></div>
```
Then in javascript
change event helps to know when any of the option is selected
```
$(document).ready(function() {
$('#possibility').on('change', function() {
var selectedVal = ... | To me it would really depend on a few things:
* How many additional form elements are you going to need to display?
* Do you need record the steps in filling out the form on the server side in some manner?
* Do you need to evaluate the data submitted in the form along with data only available on the server in order to... |
34,145,664 | I'm new to java/android so I'm hoping this is a pretty easy thing to solve.
I've used [libGDX's setup](https://libgdx.badlogicgames.com/download.html) to create a project, which I then imported to Android Studio. I didn't know the [`Supplier`](https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html)... | 2015/12/08 | [
"https://Stackoverflow.com/questions/34145664",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1219414/"
] | I think you need to add `targetCompatibility` attribute with `sourceCompatibility` in gradle to target your `java` version.
```
allprojects {
apply plugin: 'java'
sourceCompatibility = 1.6
targetCompatibility = 1.6
}
```
Also need to check `java` default path in `gradle.properties` file with version ... | As of JDK 9 (\*\*) you will probably have better luck with the `--release` option (see [What is the --release flag in the Java 9 compiler?](https://stackoverflow.com/questions/43102787/what-is-the-release-flag-in-the-java-9-compiler)) rather than the `--source` and/or `--target` options. The release option will ensure ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.