qid int64 1 74.7M | question stringlengths 0 58.3k | date stringlengths 10 10 | metadata list | response_j stringlengths 2 48.3k | response_k stringlengths 2 40.5k |
|---|---|---|---|---|---|
4,203,406 | Will `WaitForSingleObject` (or `WaitForMultipleObjects`) cause a context switch when waiting for an event with a timeout time of zero? (`Sleep(0)` will yield a threads time-slice immediately as far as I know.)
Now, regarding `WaitForSingle|MultipleObject` and Event handles. If WaitFor\*Object actually needs to wait, i... | 2010/11/17 | [
"https://Stackoverflow.com/questions/4203406",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/321013/"
] | This is kludgey, but
```
$_MYFILES = array();
foreach(array_keys($_FILES['name']) as $i) { // loop over 0,1,2,3 etc...
foreach(array_keys($_FILES) as $j) { // loop over 'name', 'size', 'error', etc...
$_MYFILES[$i][$j] = $_FILES[$j][$i]; // "swap" keys and copy over original array values
}
}
``` | why don't you want to declare new array var and to fill it in desirable format? eg
```
$myarr = array();
foreach ($_FILES as $file) {
$myarr[] = array($file['name'][0], $file['type'][0], $file['tmp_name'][0], $file['size'][0]);
}
``` |
4,203,406 | Will `WaitForSingleObject` (or `WaitForMultipleObjects`) cause a context switch when waiting for an event with a timeout time of zero? (`Sleep(0)` will yield a threads time-slice immediately as far as I know.)
Now, regarding `WaitForSingle|MultipleObject` and Event handles. If WaitFor\*Object actually needs to wait, i... | 2010/11/17 | [
"https://Stackoverflow.com/questions/4203406",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/321013/"
] | This is kludgey, but
```
$_MYFILES = array();
foreach(array_keys($_FILES['name']) as $i) { // loop over 0,1,2,3 etc...
foreach(array_keys($_FILES) as $j) { // loop over 'name', 'size', 'error', etc...
$_MYFILES[$i][$j] = $_FILES[$j][$i]; // "swap" keys and copy over original array values
}
}
``` | this worked for me
```
$files = array();
for($i =0;$_FILES['name'][$i] != NULL;$i++){
$files[] = array($_FILES['name'][$i], $_FILES['type'][$i], $_FILES['tmp_name'][$i], $_FILES['size'][$i]);
}
``` |
4,203,406 | Will `WaitForSingleObject` (or `WaitForMultipleObjects`) cause a context switch when waiting for an event with a timeout time of zero? (`Sleep(0)` will yield a threads time-slice immediately as far as I know.)
Now, regarding `WaitForSingle|MultipleObject` and Event handles. If WaitFor\*Object actually needs to wait, i... | 2010/11/17 | [
"https://Stackoverflow.com/questions/4203406",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/321013/"
] | This is kludgey, but
```
$_MYFILES = array();
foreach(array_keys($_FILES['name']) as $i) { // loop over 0,1,2,3 etc...
foreach(array_keys($_FILES) as $j) { // loop over 'name', 'size', 'error', etc...
$_MYFILES[$i][$j] = $_FILES[$j][$i]; // "swap" keys and copy over original array values
}
}
``` | ```
foreach ($_FILES['photo']['name'] as $key => $value){
$photo[$key]['name'] = $value;
}
foreach ($_FILES['photo']['type'] as $key => $value) {
$photo[$key]['type'] = $value;
}
foreach ($_FILES['photo']['tmp_name'] as $key => $value) {
$photo[$key]['tmp_name'] = $value;
}
foreach ($_FILES['photo']['err... |
9,695,031 | I have a one-to-many relationship in my Core Data model. One meal can have multiple foods. I want to populate a table with the the foods from one meal. So if Meal #1 has Apples, Oranges, and Lemons, then the table would consist of those three foods.
Any help is very appreciated because I am completely stuck.
Here is ... | 2012/03/14 | [
"https://Stackoverflow.com/questions/9695031",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/597775/"
] | You mention that you are having issues, but not what the issues are; but your `NSFetchRequest` predicate doesn't look right to me. Also `meals` defined on `Food` is plural but the relationship is To-one -- a little confusing.
Your UITableView should be populated with the `Food`s from a single `Meal`, right? Let's call... | Your Meal and Food classes are wrong. It's best to kill those and let XCode auto re-generate
those classes via (make sure your entity is selected):

In your `fetchedResultsController` getter method, kill the line:
```
[fetchRequest setPredicate:[N... |
553,536 | Let $G$ be a cyclic group of order 6. How many of its elements generate $G$?
This was an old problem I had. I know that $G=\{1, g, g^2, g^3, g^4, g^5\} $ and have an answer written down that $g$ and $g^5$ are order $6$. But why? | 2013/11/05 | [
"https://math.stackexchange.com/questions/553536",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/105672/"
] | All elements of order $k$ in a cyclic group of order $n$, such that $n$ and $k$ are relatively prime, generate the group. Thus, using your notation, $g$ and $g^5$ generate the group. | Well, $g^2$ cannot generate the whole group, because $g^2\*g^2$ = $g^4$, and $g^2\*g^2\*g^2$ = $g^6$ = $1$. Similarly, $g^3\*g^3$ = $1$ and $g^4\*g^4$ = $g^2$, and $g^4\*g^4\*g^4$ = $1$.
It is clear, from this, that $g^2$, $g^3$ and $g^4$ cannot generate all of the elements of G, because they fail to create $g^5$. You... |
3,093,400 | So my question is this:
$$V=\frac{4}{3}\pi r^3$$
And,
$$\frac{dV}{dr}=4\pi r^2=SA$$
Is this a coincidence or are there some mathematical hoodoos that I'm unaware of?
P.S. are there any more tags that I should use? | 2019/01/30 | [
"https://math.stackexchange.com/questions/3093400",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/571692/"
] | Start with a sphere of radius $r$. Now let the radius of the sphere grow by some tiny amount $\Delta r$. How much has the volume changed? By the definition of the derivative, it has changed by approximately
$$
\Delta r \cdot V'(r)
$$
However, the added volume is basically a thin shell, and its volume is approximately e... | How do you obtain the volume of a sphere? You just calculate a volume integral on the sphere
$$V=\int\_{\mathbb{R}^3}\chi(x,y,z)\;d\mathbf{x}$$
where $\chi$ is a function that equals $1$ inside the sphere and $0$ outside. Of course is comfortable to switch to spherical coordinates. The determinat of the Jacobian is $... |
3,093,400 | So my question is this:
$$V=\frac{4}{3}\pi r^3$$
And,
$$\frac{dV}{dr}=4\pi r^2=SA$$
Is this a coincidence or are there some mathematical hoodoos that I'm unaware of?
P.S. are there any more tags that I should use? | 2019/01/30 | [
"https://math.stackexchange.com/questions/3093400",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/571692/"
] | Start with a sphere of radius $r$. Now let the radius of the sphere grow by some tiny amount $\Delta r$. How much has the volume changed? By the definition of the derivative, it has changed by approximately
$$
\Delta r \cdot V'(r)
$$
However, the added volume is basically a thin shell, and its volume is approximately e... | I think I have something but I'm not sure what.
The volume of an object is the integral $\int 1 d\tau$ where $\tau$ is the volume element and the boundaries are the boundary of the surface.
The divergence of $\vec{r}/3$ is 1 in any co-ordinate system. So the above integral can be expressed as the volume integral of... |
3,093,400 | So my question is this:
$$V=\frac{4}{3}\pi r^3$$
And,
$$\frac{dV}{dr}=4\pi r^2=SA$$
Is this a coincidence or are there some mathematical hoodoos that I'm unaware of?
P.S. are there any more tags that I should use? | 2019/01/30 | [
"https://math.stackexchange.com/questions/3093400",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/571692/"
] | How do you obtain the volume of a sphere? You just calculate a volume integral on the sphere
$$V=\int\_{\mathbb{R}^3}\chi(x,y,z)\;d\mathbf{x}$$
where $\chi$ is a function that equals $1$ inside the sphere and $0$ outside. Of course is comfortable to switch to spherical coordinates. The determinat of the Jacobian is $... | I think I have something but I'm not sure what.
The volume of an object is the integral $\int 1 d\tau$ where $\tau$ is the volume element and the boundaries are the boundary of the surface.
The divergence of $\vec{r}/3$ is 1 in any co-ordinate system. So the above integral can be expressed as the volume integral of... |
39,362,098 | I am trying to print some message in Ant depending on some condition as follow:
```
<if>
<equals arg1="${docs.present}" arg2="true"/>
<then>
</then>
<else>
<echo message="No docss found!"/>
</else>
</if>
```
But as you see, if docs.present property is set to 'true' then only I want to exe... | 2016/09/07 | [
"https://Stackoverflow.com/questions/39362098",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4578902/"
] | You can use `echo` in your `if` condition instead of else as below :
```
<if>
<equals arg1="${docs.present}" arg2="false"/>
<then>
<echo message="No docss found!"/>
</then>
</if>
``` | Below is the typical example of writing if, else if and else conditions in ant.
```
<if>
<equals arg1="${condition}" arg2="true"/>
<then>
<copy file="${some.dir}/file" todir="${another.dir}"/>
</then>
<elseif>
<equals arg1="${condition}" arg2="false"/>
<then>
<copy f... |
39,362,098 | I am trying to print some message in Ant depending on some condition as follow:
```
<if>
<equals arg1="${docs.present}" arg2="true"/>
<then>
</then>
<else>
<echo message="No docss found!"/>
</else>
</if>
```
But as you see, if docs.present property is set to 'true' then only I want to exe... | 2016/09/07 | [
"https://Stackoverflow.com/questions/39362098",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4578902/"
] | You can use `echo` in your `if` condition instead of else as below :
```
<if>
<equals arg1="${docs.present}" arg2="false"/>
<then>
<echo message="No docss found!"/>
</then>
</if>
``` | A native Ant solution would be to use conditional task execution:
```
<project name="demo" default="run">
<available file="mydoc.txt" property="doc.present"/>
<target name="run" unless="doc.present">
<echo message="No docs found"/>
</target>
</project>
```
The "if" task is not part of standard Ant. |
5,410,823 | How to use DefaultHttpClient in Android? | 2011/03/23 | [
"https://Stackoverflow.com/questions/5410823",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/646994/"
] | I suggest reading the tutorials provided with android-api.
Here is some random example which uses DefaultHttpClient, found by simple text-search in examples-folder.
EDIT: The sample-source was not intended to show something. It just requested the content of the url and stored it as string. Here is an example which sh... | From [Google Documentation](http://developer.android.com/reference/org/apache/http/impl/client/DefaultHttpClient.html)
`public DefaultHttpClient (ClientConnectionManager conman, HttpParams params)`
Creates a new HTTP client from parameters and a connection manager.
Parameters
`"conman"` the connection manager,
... |
5,410,823 | How to use DefaultHttpClient in Android? | 2011/03/23 | [
"https://Stackoverflow.com/questions/5410823",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/646994/"
] | Here is a general code example:
```
DefaultHttpClient defaultHttpClient = new DefaultHttpClient();
HttpGet method = new HttpGet(new URI("http://foo.com"));
HttpResponse response = defaultHttpClient.execute(method);
InputStream data = response.getEntity().getContent();
//Now we use the input stream remember to close i... | From [Google Documentation](http://developer.android.com/reference/org/apache/http/impl/client/DefaultHttpClient.html)
`public DefaultHttpClient (ClientConnectionManager conman, HttpParams params)`
Creates a new HTTP client from parameters and a connection manager.
Parameters
`"conman"` the connection manager,
... |
5,410,823 | How to use DefaultHttpClient in Android? | 2011/03/23 | [
"https://Stackoverflow.com/questions/5410823",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/646994/"
] | I suggest reading the tutorials provided with android-api.
Here is some random example which uses DefaultHttpClient, found by simple text-search in examples-folder.
EDIT: The sample-source was not intended to show something. It just requested the content of the url and stored it as string. Here is an example which sh... | Here is a general code example:
```
DefaultHttpClient defaultHttpClient = new DefaultHttpClient();
HttpGet method = new HttpGet(new URI("http://foo.com"));
HttpResponse response = defaultHttpClient.execute(method);
InputStream data = response.getEntity().getContent();
//Now we use the input stream remember to close i... |
2,616,659 | I have the following code:
```
f = open(path, 'r')
html = f.read() # no parameters => reads to eof and returns string
soup = BeautifulSoup(html)
schoolname = soup.findAll(attrs={'id':'ctl00_ContentPlaceHolder1_SchoolProfileUserControl_SchoolHeaderLabel'})
print schoolname
```
which gives:
```
[<span id="ctl00_Cont... | 2010/04/11 | [
"https://Stackoverflow.com/questions/2616659",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/141203/"
] | You can use [`contents`](http://www.crummy.com/software/BeautifulSoup/documentation.html#contents) to move down the tree:
```
>>> for x in schoolname:
>>> print x.contents
[u'A B Paterson College, Arundel, QLD']
```
Note that the contents doesn't necessarily have to be a string - in general it could also be m... | findAll returns a list of strings, which is why you get an exception. I'm pretty sure your problem is solved simply by using find instead of findAll. Then you should be able to access the value you want with:
```
schoolname['value']
```
Obviously this only 'works' if you only need one specific value. |
32,237 | My wordpress makes use of custom post templates. I'm now trying to create a custom comments template as well.
I noticed that the comments template is called via this function
`<?php comments_template( '', true ); ?>`
I checked in my functions.php and comments.php but don't see the function being declared anywhere. Ca... | 2011/10/27 | [
"https://wordpress.stackexchange.com/questions/32237",
"https://wordpress.stackexchange.com",
"https://wordpress.stackexchange.com/users/5411/"
] | The [`comments_template()`](http://codex.wordpress.org/Function_Reference/comments_template) template tag sets up the commenting variables and functions, and includes the `comments.php` template-part file. So, to create a custom comments template, use `comments.php`.
From there, you will need to get comfortable with t... | You can use the callback function on wp\_list\_comments() function.
```
wp_list_comments();
```
Usually, you will find this line in comments.php file of your wordpress theme. And the output from this command is a pretty straightforward HTML structure.
Wordpress have a option of passing the callback function as an a... |
178,734 | It would be helpful to understand how can I connect the second column in the script. currently using the below for loop
```
for i in cat server
do
echo ===$i====
ssh -q $i 'netstat -tulpun | egrep '22|13''
done
```
multiple server with different port for example below are the server in the first colu... | 2015/01/12 | [
"https://unix.stackexchange.com/questions/178734",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/98965/"
] | You should start with:
```
#!/bin/bash
cat server | while read str
do
server=$(echo "$str" | cut -d' ' -f 1)
port=$(echo "$str" | cut -d' ' -f 2)
echo server: "$server" port: "$port"
ssh -q "$server" 'netstat | grep -E "'"$port"'"'
done
```
assuming the file with server-port pairs is called `server` and th... | Assuming you meant `for i in $(cat server) ...`, consider using `while read` loop:
```
while read host port
do
echo ===$host====
ssh -q "$host" 'netstat -tulpun | egrep "'"$port"'"'
done < server
```
Assuming:
* there are exactly two whitespace-separated entries in each line,
* the second entry is a valid p... |
16,815,471 | I am trying to make a batch script to switch between LAN and WLAN every time it's launched, but it's seems i have a problem somewhere.
Here is my script:
```
@Echo off
if errorlevel 1 goto LAN
if errorlevel 0 goto WLAN
:LAN
netsh interface set interface "Connexion réseau sans fil 2" disabled
netsh interface set ... | 2013/05/29 | [
"https://Stackoverflow.com/questions/16815471",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2381627/"
] | I had the same problem here, using a pt\_br Windows version. Try to use "copy con " and type your commands directly at the prompt. Press Ctrl+Z to save and exit. Voilà! :-) | You may need to change the codepage with the CP command so that the French text is recognised correctly. |
8 | I'm interested in finding out:
1. what the process of choosing the books of the New Testament was,
2. when did it occur,
3. who did the choosing, and
4. what are the supporting evidences | 2011/08/23 | [
"https://christianity.stackexchange.com/questions/8",
"https://christianity.stackexchange.com",
"https://christianity.stackexchange.com/users/19/"
] | This is hard to reference because it's a fairly organic process, but the works translated by [St. Jerome](http://www.newadvent.org/cathen/08341a.htm) into Latin to make up the Vulgate (People's) Bible are the ones that were read during early liturgies.
From a doctrinal stand point, this is the other answer:
>
> The... | When the Canon of the Scripture was closed, it already contained a list of books that were widely accepted as authoritative in the Christian communities spread all over the known world.
What we know today as deuterocanonical (or apocryphal) books of the New Testament were considered heretic very early in the history o... |
8 | I'm interested in finding out:
1. what the process of choosing the books of the New Testament was,
2. when did it occur,
3. who did the choosing, and
4. what are the supporting evidences | 2011/08/23 | [
"https://christianity.stackexchange.com/questions/8",
"https://christianity.stackexchange.com",
"https://christianity.stackexchange.com/users/19/"
] | The canon developed gradually over the course of more than 300 years. In many cases, when decisions were made, they were simply to acknowledge what was already being read in the churches.
The process started early. Already in 2 Peter 3:16, there is a reference to the letters of Paul:
>
> There are some things in the... | When the Canon of the Scripture was closed, it already contained a list of books that were widely accepted as authoritative in the Christian communities spread all over the known world.
What we know today as deuterocanonical (or apocryphal) books of the New Testament were considered heretic very early in the history o... |
8 | I'm interested in finding out:
1. what the process of choosing the books of the New Testament was,
2. when did it occur,
3. who did the choosing, and
4. what are the supporting evidences | 2011/08/23 | [
"https://christianity.stackexchange.com/questions/8",
"https://christianity.stackexchange.com",
"https://christianity.stackexchange.com/users/19/"
] | Let me give you the original document of Council Of Carthage AD 419
>
> Canon 24. (Greek xxvii.)
>
>
> That nothing be read in church besides the Canonical Scripture
>
>
> Item, that besides the Canonical Scriptures nothing be read in church under the name of divine Scripture.
>
>
> But the Canonical Scripture... | When the Canon of the Scripture was closed, it already contained a list of books that were widely accepted as authoritative in the Christian communities spread all over the known world.
What we know today as deuterocanonical (or apocryphal) books of the New Testament were considered heretic very early in the history o... |
8 | I'm interested in finding out:
1. what the process of choosing the books of the New Testament was,
2. when did it occur,
3. who did the choosing, and
4. what are the supporting evidences | 2011/08/23 | [
"https://christianity.stackexchange.com/questions/8",
"https://christianity.stackexchange.com",
"https://christianity.stackexchange.com/users/19/"
] | The New Testament Books were written by various authors, to various geographic regions (from Galatia to Rome), spread across time (from ~45 AD to as late as ~95 AD). It took time for them to spread, being copied and carried by hand across vast distances.
As such, if a church father did not mention a book from the new ... | When the Canon of the Scripture was closed, it already contained a list of books that were widely accepted as authoritative in the Christian communities spread all over the known world.
What we know today as deuterocanonical (or apocryphal) books of the New Testament were considered heretic very early in the history o... |
8 | I'm interested in finding out:
1. what the process of choosing the books of the New Testament was,
2. when did it occur,
3. who did the choosing, and
4. what are the supporting evidences | 2011/08/23 | [
"https://christianity.stackexchange.com/questions/8",
"https://christianity.stackexchange.com",
"https://christianity.stackexchange.com/users/19/"
] | The canon developed gradually over the course of more than 300 years. In many cases, when decisions were made, they were simply to acknowledge what was already being read in the churches.
The process started early. Already in 2 Peter 3:16, there is a reference to the letters of Paul:
>
> There are some things in the... | This is hard to reference because it's a fairly organic process, but the works translated by [St. Jerome](http://www.newadvent.org/cathen/08341a.htm) into Latin to make up the Vulgate (People's) Bible are the ones that were read during early liturgies.
From a doctrinal stand point, this is the other answer:
>
> The... |
8 | I'm interested in finding out:
1. what the process of choosing the books of the New Testament was,
2. when did it occur,
3. who did the choosing, and
4. what are the supporting evidences | 2011/08/23 | [
"https://christianity.stackexchange.com/questions/8",
"https://christianity.stackexchange.com",
"https://christianity.stackexchange.com/users/19/"
] | This is hard to reference because it's a fairly organic process, but the works translated by [St. Jerome](http://www.newadvent.org/cathen/08341a.htm) into Latin to make up the Vulgate (People's) Bible are the ones that were read during early liturgies.
From a doctrinal stand point, this is the other answer:
>
> The... | The New Testament Books were written by various authors, to various geographic regions (from Galatia to Rome), spread across time (from ~45 AD to as late as ~95 AD). It took time for them to spread, being copied and carried by hand across vast distances.
As such, if a church father did not mention a book from the new ... |
8 | I'm interested in finding out:
1. what the process of choosing the books of the New Testament was,
2. when did it occur,
3. who did the choosing, and
4. what are the supporting evidences | 2011/08/23 | [
"https://christianity.stackexchange.com/questions/8",
"https://christianity.stackexchange.com",
"https://christianity.stackexchange.com/users/19/"
] | The canon developed gradually over the course of more than 300 years. In many cases, when decisions were made, they were simply to acknowledge what was already being read in the churches.
The process started early. Already in 2 Peter 3:16, there is a reference to the letters of Paul:
>
> There are some things in the... | Let me give you the original document of Council Of Carthage AD 419
>
> Canon 24. (Greek xxvii.)
>
>
> That nothing be read in church besides the Canonical Scripture
>
>
> Item, that besides the Canonical Scriptures nothing be read in church under the name of divine Scripture.
>
>
> But the Canonical Scripture... |
8 | I'm interested in finding out:
1. what the process of choosing the books of the New Testament was,
2. when did it occur,
3. who did the choosing, and
4. what are the supporting evidences | 2011/08/23 | [
"https://christianity.stackexchange.com/questions/8",
"https://christianity.stackexchange.com",
"https://christianity.stackexchange.com/users/19/"
] | The canon developed gradually over the course of more than 300 years. In many cases, when decisions were made, they were simply to acknowledge what was already being read in the churches.
The process started early. Already in 2 Peter 3:16, there is a reference to the letters of Paul:
>
> There are some things in the... | The New Testament Books were written by various authors, to various geographic regions (from Galatia to Rome), spread across time (from ~45 AD to as late as ~95 AD). It took time for them to spread, being copied and carried by hand across vast distances.
As such, if a church father did not mention a book from the new ... |
8 | I'm interested in finding out:
1. what the process of choosing the books of the New Testament was,
2. when did it occur,
3. who did the choosing, and
4. what are the supporting evidences | 2011/08/23 | [
"https://christianity.stackexchange.com/questions/8",
"https://christianity.stackexchange.com",
"https://christianity.stackexchange.com/users/19/"
] | Let me give you the original document of Council Of Carthage AD 419
>
> Canon 24. (Greek xxvii.)
>
>
> That nothing be read in church besides the Canonical Scripture
>
>
> Item, that besides the Canonical Scriptures nothing be read in church under the name of divine Scripture.
>
>
> But the Canonical Scripture... | The New Testament Books were written by various authors, to various geographic regions (from Galatia to Rome), spread across time (from ~45 AD to as late as ~95 AD). It took time for them to spread, being copied and carried by hand across vast distances.
As such, if a church father did not mention a book from the new ... |
41,162,202 | I have an Array where i want to know each array length.
```
public int[][,] _EnemyPosition = new int[][,]
{
new int[,]{ {0},{1},{2},{3},{4}},
new int[,]{ {0,6},{1,7},{2,8},{3,9},{4,10}},
};
Debug.Log(_EnemyPosition.Length); // Output is 2
Debug.Log(_EnemyPosition[1].GetLength(0)); // Output is 5
```
But i a... | 2016/12/15 | [
"https://Stackoverflow.com/questions/41162202",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1885186/"
] | Use **disableRipple** as an attribute to disable ripples for the `md-tab-group` as **Angular2+** using the Angular material.
Just simply do something like this:
```
<md-tab-group disableRipple></md-tab-group>
```
Also if you are using the **latest Angular Material**, it's a little bit different like this below:
``... | I came up with two ways to override md styles based on another post. I had the exact same problem for tabs being too wide in a small tab group. It is still very experimental and might need further explanations but it has worked for me.
1. First solution using **Sass** styling
You can use */deep/* before the class you... |
260,687 | I am seeing only 50MB/s reads:
```
ensnare@box:~$ sudo hdparm -tT /dev/sda
[sudo] password for ensnare:
/dev/sda:
Timing cached reads: 4592 MB in 2.00 seconds = 2296.48 MB/sec
Timing buffered disk reads: 192 MB in 3.90 seconds = 49.24 MB/sec
```
The array is already rebuilt and operational. Is this kind of ... | 2011/04/17 | [
"https://serverfault.com/questions/260687",
"https://serverfault.com",
"https://serverfault.com/users/39040/"
] | The short answer is yes, that's the level of performance you should expect to see from the H200.
The long answer: The H200 is the old SAS 6iR with SATA 6Gb/s support. It doesn't have the usual features you'd see on a RAID card (battery backup unit, onboard caching, RAID5/6 support). The cache determines how fast your ... | Please take a look at the following info:
The default cache policy on a physical disk is Enabled in SATA drives and Disabled on SAS drives. When physical disk caching is Enabled, disk I/O performance is improved, but a power outage or equipment failure might result in data loss or corruption.
NOTE: It is recommended... |
260,687 | I am seeing only 50MB/s reads:
```
ensnare@box:~$ sudo hdparm -tT /dev/sda
[sudo] password for ensnare:
/dev/sda:
Timing cached reads: 4592 MB in 2.00 seconds = 2296.48 MB/sec
Timing buffered disk reads: 192 MB in 3.90 seconds = 49.24 MB/sec
```
The array is already rebuilt and operational. Is this kind of ... | 2011/04/17 | [
"https://serverfault.com/questions/260687",
"https://serverfault.com",
"https://serverfault.com/users/39040/"
] | Maybe change the stripe size, depending on what your storing.
Is cache turned off?
I have 4 1TB Western Digital Enterprise 7200 RPM drives on a 3Ware 95500-SX and my hdparm results are
```
zeus:/home/Kendall # hdparm -tT /dev/sdb
/dev/sdb:
Timing cached reads: 1262 MB in 2.00 seconds = 630.86 MB/sec
Timing buff... | Here's THE best solution if going to a H700 isnt possible.
Enable cache directly from the firmware. YOU MUST be running on a battery backup or if power goes out you could be hosed by enabling the cache. Below is a tutorial explaining the full process to do so.
<http://www.1337admin.org/windows-server/windows-server-20... |
260,687 | I am seeing only 50MB/s reads:
```
ensnare@box:~$ sudo hdparm -tT /dev/sda
[sudo] password for ensnare:
/dev/sda:
Timing cached reads: 4592 MB in 2.00 seconds = 2296.48 MB/sec
Timing buffered disk reads: 192 MB in 3.90 seconds = 49.24 MB/sec
```
The array is already rebuilt and operational. Is this kind of ... | 2011/04/17 | [
"https://serverfault.com/questions/260687",
"https://serverfault.com",
"https://serverfault.com/users/39040/"
] | Please take a look at the following info:
The default cache policy on a physical disk is Enabled in SATA drives and Disabled on SAS drives. When physical disk caching is Enabled, disk I/O performance is improved, but a power outage or equipment failure might result in data loss or corruption.
NOTE: It is recommended... | Here's THE best solution if going to a H700 isnt possible.
Enable cache directly from the firmware. YOU MUST be running on a battery backup or if power goes out you could be hosed by enabling the cache. Below is a tutorial explaining the full process to do so.
<http://www.1337admin.org/windows-server/windows-server-20... |
260,687 | I am seeing only 50MB/s reads:
```
ensnare@box:~$ sudo hdparm -tT /dev/sda
[sudo] password for ensnare:
/dev/sda:
Timing cached reads: 4592 MB in 2.00 seconds = 2296.48 MB/sec
Timing buffered disk reads: 192 MB in 3.90 seconds = 49.24 MB/sec
```
The array is already rebuilt and operational. Is this kind of ... | 2011/04/17 | [
"https://serverfault.com/questions/260687",
"https://serverfault.com",
"https://serverfault.com/users/39040/"
] | Please take a look at the following info:
The default cache policy on a physical disk is Enabled in SATA drives and Disabled on SAS drives. When physical disk caching is Enabled, disk I/O performance is improved, but a power outage or equipment failure might result in data loss or corruption.
NOTE: It is recommended... | It seems there may be a potential "fix" here but I have not tried it myself:
<http://blog.slucas.fr/en/tips/esxi-perc-h200-slow> |
260,687 | I am seeing only 50MB/s reads:
```
ensnare@box:~$ sudo hdparm -tT /dev/sda
[sudo] password for ensnare:
/dev/sda:
Timing cached reads: 4592 MB in 2.00 seconds = 2296.48 MB/sec
Timing buffered disk reads: 192 MB in 3.90 seconds = 49.24 MB/sec
```
The array is already rebuilt and operational. Is this kind of ... | 2011/04/17 | [
"https://serverfault.com/questions/260687",
"https://serverfault.com",
"https://serverfault.com/users/39040/"
] | The short answer is yes, that's the level of performance you should expect to see from the H200.
The long answer: The H200 is the old SAS 6iR with SATA 6Gb/s support. It doesn't have the usual features you'd see on a RAID card (battery backup unit, onboard caching, RAID5/6 support). The cache determines how fast your ... | It seems there may be a potential "fix" here but I have not tried it myself:
<http://blog.slucas.fr/en/tips/esxi-perc-h200-slow> |
260,687 | I am seeing only 50MB/s reads:
```
ensnare@box:~$ sudo hdparm -tT /dev/sda
[sudo] password for ensnare:
/dev/sda:
Timing cached reads: 4592 MB in 2.00 seconds = 2296.48 MB/sec
Timing buffered disk reads: 192 MB in 3.90 seconds = 49.24 MB/sec
```
The array is already rebuilt and operational. Is this kind of ... | 2011/04/17 | [
"https://serverfault.com/questions/260687",
"https://serverfault.com",
"https://serverfault.com/users/39040/"
] | The H200 controller disables all disk caching built into the drives by default.
If the server has battery backup you can enable basic drive caching on the Logical Volumes without risk.
Goto www.LSI.com (The controller is made by LSI) and download and install MegaRAID Storage Manager.
Highlight the Virtual Raid Volu... | Here's THE best solution if going to a H700 isnt possible.
Enable cache directly from the firmware. YOU MUST be running on a battery backup or if power goes out you could be hosed by enabling the cache. Below is a tutorial explaining the full process to do so.
<http://www.1337admin.org/windows-server/windows-server-20... |
260,687 | I am seeing only 50MB/s reads:
```
ensnare@box:~$ sudo hdparm -tT /dev/sda
[sudo] password for ensnare:
/dev/sda:
Timing cached reads: 4592 MB in 2.00 seconds = 2296.48 MB/sec
Timing buffered disk reads: 192 MB in 3.90 seconds = 49.24 MB/sec
```
The array is already rebuilt and operational. Is this kind of ... | 2011/04/17 | [
"https://serverfault.com/questions/260687",
"https://serverfault.com",
"https://serverfault.com/users/39040/"
] | It seems there may be a potential "fix" here but I have not tried it myself:
<http://blog.slucas.fr/en/tips/esxi-perc-h200-slow> | Here's THE best solution if going to a H700 isnt possible.
Enable cache directly from the firmware. YOU MUST be running on a battery backup or if power goes out you could be hosed by enabling the cache. Below is a tutorial explaining the full process to do so.
<http://www.1337admin.org/windows-server/windows-server-20... |
260,687 | I am seeing only 50MB/s reads:
```
ensnare@box:~$ sudo hdparm -tT /dev/sda
[sudo] password for ensnare:
/dev/sda:
Timing cached reads: 4592 MB in 2.00 seconds = 2296.48 MB/sec
Timing buffered disk reads: 192 MB in 3.90 seconds = 49.24 MB/sec
```
The array is already rebuilt and operational. Is this kind of ... | 2011/04/17 | [
"https://serverfault.com/questions/260687",
"https://serverfault.com",
"https://serverfault.com/users/39040/"
] | The short answer is yes, that's the level of performance you should expect to see from the H200.
The long answer: The H200 is the old SAS 6iR with SATA 6Gb/s support. It doesn't have the usual features you'd see on a RAID card (battery backup unit, onboard caching, RAID5/6 support). The cache determines how fast your ... | Here's THE best solution if going to a H700 isnt possible.
Enable cache directly from the firmware. YOU MUST be running on a battery backup or if power goes out you could be hosed by enabling the cache. Below is a tutorial explaining the full process to do so.
<http://www.1337admin.org/windows-server/windows-server-20... |
260,687 | I am seeing only 50MB/s reads:
```
ensnare@box:~$ sudo hdparm -tT /dev/sda
[sudo] password for ensnare:
/dev/sda:
Timing cached reads: 4592 MB in 2.00 seconds = 2296.48 MB/sec
Timing buffered disk reads: 192 MB in 3.90 seconds = 49.24 MB/sec
```
The array is already rebuilt and operational. Is this kind of ... | 2011/04/17 | [
"https://serverfault.com/questions/260687",
"https://serverfault.com",
"https://serverfault.com/users/39040/"
] | Please take a look at the following info:
The default cache policy on a physical disk is Enabled in SATA drives and Disabled on SAS drives. When physical disk caching is Enabled, disk I/O performance is improved, but a power outage or equipment failure might result in data loss or corruption.
NOTE: It is recommended... | The H200 controller disables all disk caching built into the drives by default.
If the server has battery backup you can enable basic drive caching on the Logical Volumes without risk.
Goto www.LSI.com (The controller is made by LSI) and download and install MegaRAID Storage Manager.
Highlight the Virtual Raid Volu... |
260,687 | I am seeing only 50MB/s reads:
```
ensnare@box:~$ sudo hdparm -tT /dev/sda
[sudo] password for ensnare:
/dev/sda:
Timing cached reads: 4592 MB in 2.00 seconds = 2296.48 MB/sec
Timing buffered disk reads: 192 MB in 3.90 seconds = 49.24 MB/sec
```
The array is already rebuilt and operational. Is this kind of ... | 2011/04/17 | [
"https://serverfault.com/questions/260687",
"https://serverfault.com",
"https://serverfault.com/users/39040/"
] | The short answer is yes, that's the level of performance you should expect to see from the H200.
The long answer: The H200 is the old SAS 6iR with SATA 6Gb/s support. It doesn't have the usual features you'd see on a RAID card (battery backup unit, onboard caching, RAID5/6 support). The cache determines how fast your ... | The H200 controller disables all disk caching built into the drives by default.
If the server has battery backup you can enable basic drive caching on the Logical Volumes without risk.
Goto www.LSI.com (The controller is made by LSI) and download and install MegaRAID Storage Manager.
Highlight the Virtual Raid Volu... |
5,112 | I need to vent a room in an uninsulated cabin - the ceiling is also the roof - so I don't need soffit tubing or anything like that. I am looking for a fairly cheap item that has a large cfm ability.
(This is for venting steam from a maple syrup evaporator)
EDIT
We ended up just putting in two vents in the roof. (May... | 2011/03/11 | [
"https://diy.stackexchange.com/questions/5112",
"https://diy.stackexchange.com",
"https://diy.stackexchange.com/users/823/"
] | You'll want to use glazing compound, which comes in both oil-based, and latex, and can be found in both cans or tubes.
Once you have the glass removed, and the frame cleaned up.
* Run a bead of glazing compound around the frame (where the glass will sit).
* Set the glass in the compound giving it a little wiggle to ... | You should use putty to bed the glass into the frame.
This will form an air- and water-tight seal.
You could even put the wood strips back on. |
13,802,146 | I'm working on a (what I was intending to be) simple PHP/MySQL app. As part of it I'd like to be able to model repeating events, however I need to be able to query all the events that happened between two dates (including repeated events). The events only have a date, the time of day doesn't matter.
I've been research... | 2012/12/10 | [
"https://Stackoverflow.com/questions/13802146",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/193376/"
] | I would create a tally table with just one col called `id` and fill that table with numbers from 0 to 500. Now we easily use that to make selections instead of using a while loop.
```
Id
-------------------------------------
0
1
2
etc...
```
Then i'd store the events in a table with `Name as varchar`, `startdate as ... | I didn't quite understand your goal... Maybe you were looking for UNIQUE function in SQL? |
13,850,952 | How can I match (with one regex) uppercase phrases some of which have lowercase words in between? Example:
1). "The following months are casual JUNE, JULY, and AUGUST while all others are not."
```
my match should be: "UPPERCASEWORD1, UPPERCASEWORD2, lowercaseword, UPPERCASEWORD3" (i.e.**JUNE, JULY, and AUGUST**) <==... | 2012/12/13 | [
"https://Stackoverflow.com/questions/13850952",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1817376/"
] | **Regular expressions don’t recognize the English language**. So it doesn't have an idea about prepositions and punctuation. But you can define a rule that is understandable by a regex.
Like this *It should match any number of upper case letters and commas which can be combined with `N` number of lower case characters... | ```
/(\b[A-Z]+\b[-,\s]+((and|or|is|on|at|to)\s+)*)*\b[A-Z]+\b/g
^^^^ ^^^^^^^^^^^^^^^^^^^^
| |
list of delimiters list of prepositions
```
will match them, for example. Please note that your requirements are very vague, but you could easily replace the list of prepositions... |
2,189,780 | I've searched around and I can't seem to find a way to represent arrow keys or the escape key as single char in c++. Is this even possible? I would expect that it would be similar to \t or \n for tab and new line respectively. Whenever I search for escaped characters, there's only ever a list of five or six well known ... | 2010/02/03 | [
"https://Stackoverflow.com/questions/2189780",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/54790/"
] | Not possible; keyboards built for some languages have characters that can't be represented in a char, and anyway, how do you represent control-option-command-shift-F11 in a char?
Keyboards send scancodes, which are either some kind of event in a GUI system or a short string of bytes that represent the key. What codes ... | char variables usually represent elements in the ASCII table.
<http://www.asciitable.com/>
there is also man ascii on unix. If you want arrow keys you'll need a more direct way to access keyboard input. the arrow keys get translated into sequences of characters before hitting stdio. If oyu want direct keyboard ac... |
2,189,780 | I've searched around and I can't seem to find a way to represent arrow keys or the escape key as single char in c++. Is this even possible? I would expect that it would be similar to \t or \n for tab and new line respectively. Whenever I search for escaped characters, there's only ever a list of five or six well known ... | 2010/02/03 | [
"https://Stackoverflow.com/questions/2189780",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/54790/"
] | The short answer is no.
The long answer is that there are a number of control characters in the standard ANSI character set (from decimal 1 to decimal 31, inclusive), among which are the control codes for linefeed, carriage return, end-of-file, and so on. A few are commonly interpreted as arrows and the escape key, bu... | char variables usually represent elements in the ASCII table.
<http://www.asciitable.com/>
there is also man ascii on unix. If you want arrow keys you'll need a more direct way to access keyboard input. the arrow keys get translated into sequences of characters before hitting stdio. If oyu want direct keyboard ac... |
2,189,780 | I've searched around and I can't seem to find a way to represent arrow keys or the escape key as single char in c++. Is this even possible? I would expect that it would be similar to \t or \n for tab and new line respectively. Whenever I search for escaped characters, there's only ever a list of five or six well known ... | 2010/02/03 | [
"https://Stackoverflow.com/questions/2189780",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/54790/"
] | Not possible; keyboards built for some languages have characters that can't be represented in a char, and anyway, how do you represent control-option-command-shift-F11 in a char?
Keyboards send scancodes, which are either some kind of event in a GUI system or a short string of bytes that represent the key. What codes ... | There aren't any escape characters for the arrow keys. They are represented as Keycodes, afaik. I suggest using a higher level input library to detect key presses. If you want to do it from scratch, the approach taken might vary with the specific platform you are programming for.
In any case, back in the days of TURBO... |
2,189,780 | I've searched around and I can't seem to find a way to represent arrow keys or the escape key as single char in c++. Is this even possible? I would expect that it would be similar to \t or \n for tab and new line respectively. Whenever I search for escaped characters, there's only ever a list of five or six well known ... | 2010/02/03 | [
"https://Stackoverflow.com/questions/2189780",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/54790/"
] | The short answer is no.
The long answer is that there are a number of control characters in the standard ANSI character set (from decimal 1 to decimal 31, inclusive), among which are the control codes for linefeed, carriage return, end-of-file, and so on. A few are commonly interpreted as arrows and the escape key, bu... | Not possible; keyboards built for some languages have characters that can't be represented in a char, and anyway, how do you represent control-option-command-shift-F11 in a char?
Keyboards send scancodes, which are either some kind of event in a GUI system or a short string of bytes that represent the key. What codes ... |
2,189,780 | I've searched around and I can't seem to find a way to represent arrow keys or the escape key as single char in c++. Is this even possible? I would expect that it would be similar to \t or \n for tab and new line respectively. Whenever I search for escaped characters, there's only ever a list of five or six well known ... | 2010/02/03 | [
"https://Stackoverflow.com/questions/2189780",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/54790/"
] | The short answer is no.
The long answer is that there are a number of control characters in the standard ANSI character set (from decimal 1 to decimal 31, inclusive), among which are the control codes for linefeed, carriage return, end-of-file, and so on. A few are commonly interpreted as arrows and the escape key, bu... | There aren't any escape characters for the arrow keys. They are represented as Keycodes, afaik. I suggest using a higher level input library to detect key presses. If you want to do it from scratch, the approach taken might vary with the specific platform you are programming for.
In any case, back in the days of TURBO... |
3,793 | I am creating a model in ArcMap 10 and I need to use the Buffer Wizard tool to create multiple buffers within a polygon feature class. The problem is, I can't seem to place the Buffer Wizard within my model. I can place the Buffer or Multiple Ring Buffer command into my model, but they don't automatically populate a Fr... | 2010/11/23 | [
"https://gis.stackexchange.com/questions/3793",
"https://gis.stackexchange.com",
"https://gis.stackexchange.com/users/230/"
] | The Buffer Wizard (and other wizards like the GeoStatistical Wizard) is a UI functionality.
There is no scripting/programming API for it in any version of ArcGIS 9.x or 10.x, and since it is not a geoprocessing tool so it cannot be used in ModelBuilder. | You could try using an iterator in ModelBuilder for buffering multiple distances.

<http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00400000001n000000.htm> |
2,369,281 | in my form i have this code
```
<form action="mail.php" class="contactForm" name="cform" method="post">
```
Problem is when i validate it tells me "name" is not allowed on xhtml strict.
is there a way i can use soem thing else for this.
thanks | 2010/03/03 | [
"https://Stackoverflow.com/questions/2369281",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/285047/"
] | You should be using `id` as a unique identifier instead of `name`.
Is there a particular reason that you need to set the name though? You can just remove the name declaration unless there's a reason for it. | Use ID.
```
<form action="mail.php" class="contactForm" id="cform" method="post">
``` |
37,437 | On a Windows Server 2008 machine found registry key "潓瑦慷敲卜湹潣敶祲" under HKEY\_CURRENT\_USER of the administrator account. It contains a value "敓癲捩剥湵楮杮" of type REG\_DWORD which is set to 0.
I scanned the machine without a result with Kaspersky Rescue Disk 10, Avira AntiVir Rescue System, F-Secure Rescue CD and Malwareby... | 2013/06/13 | [
"https://security.stackexchange.com/questions/37437",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/27140/"
] | >
> the registry key is the result of some kind of encoding error.
>
>
>
This.
>
> 潓瑦慷敲卜湹潣敶祲
>
>
>
encoded in UTF-16LE (Windows's usual encoding for Unicode strings) is the byte sequence:
```
53 6f 66 74 77 61 72 65 5c 53 79 6e 63 6f 76 65 72 79
```
Which represents the ASCII string:
```
Software\Syncove... | the new version 6.33 of Syncovery fixes this and removes the incorrect key, if it
still exists. |
39,319,144 | I'm fairly new to rails and into coding my first app. Just can't figure out how to target the following stuff in my controller.
Controller
```
def index
@tool = Tool.find(params[:id])
@favorites = current_user.favorites
@tools = Tool.where(user_id: current_user).order("created_at DESC")
@user = current_user
e... | 2016/09/04 | [
"https://Stackoverflow.com/questions/39319144",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6789165/"
] | I got this error, and it turned out in my case to be an error I'd made editing sshd\_config, so be sure to check this. Spent ages trying to diagnose this.
Hope that saves someone some pain. | I got the same error by installing OpenSSH on Windows 7...
Open "***services.msc***" and try to start the service from there.
If it still doesn't work then you can try to follow the steps in this tutorial:
<http://www.techpaste.com/2015/06/windows-ssh-server-setup-and-configuration/>
**One important thing:** Try to ... |
39,319,144 | I'm fairly new to rails and into coding my first app. Just can't figure out how to target the following stuff in my controller.
Controller
```
def index
@tool = Tool.find(params[:id])
@favorites = current_user.favorites
@tools = Tool.where(user_id: current_user).order("created_at DESC")
@user = current_user
e... | 2016/09/04 | [
"https://Stackoverflow.com/questions/39319144",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6789165/"
] | I got the similar problem that i cannot startup the "OpenSSH SSH Serve" service after following the instructions in <https://hostadvice.com/how-to/how-to-install-an-openssh-server-client-on-a-windows-2016-server/>
I later on found out that this is the **security** problem in the C:\ProgramData\ssh\ssh\_host\*key files... | I got the same error by installing OpenSSH on Windows 7...
Open "***services.msc***" and try to start the service from there.
If it still doesn't work then you can try to follow the steps in this tutorial:
<http://www.techpaste.com/2015/06/windows-ssh-server-setup-and-configuration/>
**One important thing:** Try to ... |
39,319,144 | I'm fairly new to rails and into coding my first app. Just can't figure out how to target the following stuff in my controller.
Controller
```
def index
@tool = Tool.find(params[:id])
@favorites = current_user.favorites
@tools = Tool.where(user_id: current_user).order("created_at DESC")
@user = current_user
e... | 2016/09/04 | [
"https://Stackoverflow.com/questions/39319144",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6789165/"
] | just write this command in PowerShell
```
cd 'C:\Program Files\OpenSSH-Win64'
.\FixHostFilePermissions.ps1
```
then press enter . | I got the same error by installing OpenSSH on Windows 7...
Open "***services.msc***" and try to start the service from there.
If it still doesn't work then you can try to follow the steps in this tutorial:
<http://www.techpaste.com/2015/06/windows-ssh-server-setup-and-configuration/>
**One important thing:** Try to ... |
39,319,144 | I'm fairly new to rails and into coding my first app. Just can't figure out how to target the following stuff in my controller.
Controller
```
def index
@tool = Tool.find(params[:id])
@favorites = current_user.favorites
@tools = Tool.where(user_id: current_user).order("created_at DESC")
@user = current_user
e... | 2016/09/04 | [
"https://Stackoverflow.com/questions/39319144",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6789165/"
] | I got the similar problem that i cannot startup the "OpenSSH SSH Serve" service after following the instructions in <https://hostadvice.com/how-to/how-to-install-an-openssh-server-client-on-a-windows-2016-server/>
I later on found out that this is the **security** problem in the C:\ProgramData\ssh\ssh\_host\*key files... | I got this error, and it turned out in my case to be an error I'd made editing sshd\_config, so be sure to check this. Spent ages trying to diagnose this.
Hope that saves someone some pain. |
39,319,144 | I'm fairly new to rails and into coding my first app. Just can't figure out how to target the following stuff in my controller.
Controller
```
def index
@tool = Tool.find(params[:id])
@favorites = current_user.favorites
@tools = Tool.where(user_id: current_user).order("created_at DESC")
@user = current_user
e... | 2016/09/04 | [
"https://Stackoverflow.com/questions/39319144",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6789165/"
] | just write this command in PowerShell
```
cd 'C:\Program Files\OpenSSH-Win64'
.\FixHostFilePermissions.ps1
```
then press enter . | I got this error, and it turned out in my case to be an error I'd made editing sshd\_config, so be sure to check this. Spent ages trying to diagnose this.
Hope that saves someone some pain. |
39,319,144 | I'm fairly new to rails and into coding my first app. Just can't figure out how to target the following stuff in my controller.
Controller
```
def index
@tool = Tool.find(params[:id])
@favorites = current_user.favorites
@tools = Tool.where(user_id: current_user).order("created_at DESC")
@user = current_user
e... | 2016/09/04 | [
"https://Stackoverflow.com/questions/39319144",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6789165/"
] | I got this error, and it turned out in my case to be an error I'd made editing sshd\_config, so be sure to check this. Spent ages trying to diagnose this.
Hope that saves someone some pain. | For me the solution was to download and install an MSI from [this github repo](https://github.com/PowerShell/Win32-OpenSSH/releases) |
39,319,144 | I'm fairly new to rails and into coding my first app. Just can't figure out how to target the following stuff in my controller.
Controller
```
def index
@tool = Tool.find(params[:id])
@favorites = current_user.favorites
@tools = Tool.where(user_id: current_user).order("created_at DESC")
@user = current_user
e... | 2016/09/04 | [
"https://Stackoverflow.com/questions/39319144",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6789165/"
] | I got the similar problem that i cannot startup the "OpenSSH SSH Serve" service after following the instructions in <https://hostadvice.com/how-to/how-to-install-an-openssh-server-client-on-a-windows-2016-server/>
I later on found out that this is the **security** problem in the C:\ProgramData\ssh\ssh\_host\*key files... | just write this command in PowerShell
```
cd 'C:\Program Files\OpenSSH-Win64'
.\FixHostFilePermissions.ps1
```
then press enter . |
39,319,144 | I'm fairly new to rails and into coding my first app. Just can't figure out how to target the following stuff in my controller.
Controller
```
def index
@tool = Tool.find(params[:id])
@favorites = current_user.favorites
@tools = Tool.where(user_id: current_user).order("created_at DESC")
@user = current_user
e... | 2016/09/04 | [
"https://Stackoverflow.com/questions/39319144",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6789165/"
] | I got the similar problem that i cannot startup the "OpenSSH SSH Serve" service after following the instructions in <https://hostadvice.com/how-to/how-to-install-an-openssh-server-client-on-a-windows-2016-server/>
I later on found out that this is the **security** problem in the C:\ProgramData\ssh\ssh\_host\*key files... | For me the solution was to download and install an MSI from [this github repo](https://github.com/PowerShell/Win32-OpenSSH/releases) |
39,319,144 | I'm fairly new to rails and into coding my first app. Just can't figure out how to target the following stuff in my controller.
Controller
```
def index
@tool = Tool.find(params[:id])
@favorites = current_user.favorites
@tools = Tool.where(user_id: current_user).order("created_at DESC")
@user = current_user
e... | 2016/09/04 | [
"https://Stackoverflow.com/questions/39319144",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6789165/"
] | just write this command in PowerShell
```
cd 'C:\Program Files\OpenSSH-Win64'
.\FixHostFilePermissions.ps1
```
then press enter . | For me the solution was to download and install an MSI from [this github repo](https://github.com/PowerShell/Win32-OpenSSH/releases) |
56,415,819 | I am trying to put a leaderboard together. It works well, except whenever I create a new build of my app on my device, when a player adds their score to the database, there is no problem. However when the player then clicks to see the leaderboard. The results are all displayed in the correct order, however the players ... | 2019/06/02 | [
"https://Stackoverflow.com/questions/56415819",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6732728/"
] | I may not be fully understanding the question so this is a 'beta' answer which may need to be updated.
Looking at the code in the question, it appears the data that you want to display in descending order is having it's order changed several times, and that may not be necessary.
It's read in descending, but then it's... | You are inserting new entries at index 0, by doing this:
```
self.scoresArray.insert(aScore, at: 0)
```
You need to sort it here and insert it into proper place based on sorting you want to have.
Alternatively you can just run your `query` after adding new entry, to let Firebase do sorting for you on querying level... |
45,439,788 | I am trying to get the value for applicationId from the following request through xpath :-
```
<ApplicationStatusNotificationRequestMessage xmlns="http://schemas.co.za/application">
<b>http://localhost/test/sonoras</b>
<c>POST</c>
<Data><![CDATA[{"applicationId":"12345678","status":"ACTIVATED"}]]></Data>
<... | 2017/08/01 | [
"https://Stackoverflow.com/questions/45439788",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4680492/"
] | The JSON content inside your `<d>` element is just a `text()` node. The "applicationId" in your JSON string will not be evaluated as an attribute. The fact that CDATA was used is irrelevant.
Your predicate is attempting to select the `text()` from `app:Data` elements that have an `@applicationId`, and there are none.... | If you can't register a namespace you can go with this:
```
"/*[name()='ApplicationStatusNotificationRequestMessage']/*[name()='Data']"
``` |
1,243,658 | I've to find a value for 's' were the infinit sum gives me the value 50. Is that possible and how do I've to calculate that value.
I've no idea how te begin so, help me!
Solve s for:
$$\sum\limits \_{n=1}^{\infty}\frac{1}{n^s}=50$$
(and I know that it's the Riemann zeta function for real numbers bigger than 1) | 2015/04/20 | [
"https://math.stackexchange.com/questions/1243658",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/226665/"
] | We have that the function $\zeta(s)$ is decreasing on the interval $(1,2)$. Since $\lim\_{s\to 1^+}\zeta(s)=+\infty$ while $\zeta(2)=\frac{\pi^2}{6}<50$ we have $\zeta(s\_0)=50$ for some $s\_0\in(1,2)$. Exploiting the asymptotic expansion in a right neighbourhood of $s=1$ (formula $(15)$ [here](http://mathworld.wolfram... | $$s\simeq1.0202341852181139861332276132729412593842116437344617189788796190\ldots$$ |
1,243,658 | I've to find a value for 's' were the infinit sum gives me the value 50. Is that possible and how do I've to calculate that value.
I've no idea how te begin so, help me!
Solve s for:
$$\sum\limits \_{n=1}^{\infty}\frac{1}{n^s}=50$$
(and I know that it's the Riemann zeta function for real numbers bigger than 1) | 2015/04/20 | [
"https://math.stackexchange.com/questions/1243658",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/226665/"
] | The Laurent series expansion of the Riemann Zeta function around $s=1$ is
$$\zeta(s) = \dfrac1{s-1} + \sum\_{n=0}^{\infty} \dfrac{(-1)^n}{n!} \gamma\_n (s-1)^n$$
Further, recall that since $\zeta(2) = \dfrac{\pi^2}6 < 50$ and since $\zeta(s)$ is a rapidly decreasing function close to $1$, we have $s \in (1,2)$. Approxi... | $$s\simeq1.0202341852181139861332276132729412593842116437344617189788796190\ldots$$ |
1,243,658 | I've to find a value for 's' were the infinit sum gives me the value 50. Is that possible and how do I've to calculate that value.
I've no idea how te begin so, help me!
Solve s for:
$$\sum\limits \_{n=1}^{\infty}\frac{1}{n^s}=50$$
(and I know that it's the Riemann zeta function for real numbers bigger than 1) | 2015/04/20 | [
"https://math.stackexchange.com/questions/1243658",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/226665/"
] | We have that the function $\zeta(s)$ is decreasing on the interval $(1,2)$. Since $\lim\_{s\to 1^+}\zeta(s)=+\infty$ while $\zeta(2)=\frac{\pi^2}{6}<50$ we have $\zeta(s\_0)=50$ for some $s\_0\in(1,2)$. Exploiting the asymptotic expansion in a right neighbourhood of $s=1$ (formula $(15)$ [here](http://mathworld.wolfram... | Mathematica yields
$$s \approx 1.020234185218113986133227613272941259384211643734461718978879619075931...$$
I don't think you are going to get a good answer without just numerically approximating it. |
1,243,658 | I've to find a value for 's' were the infinit sum gives me the value 50. Is that possible and how do I've to calculate that value.
I've no idea how te begin so, help me!
Solve s for:
$$\sum\limits \_{n=1}^{\infty}\frac{1}{n^s}=50$$
(and I know that it's the Riemann zeta function for real numbers bigger than 1) | 2015/04/20 | [
"https://math.stackexchange.com/questions/1243658",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/226665/"
] | The Laurent series expansion of the Riemann Zeta function around $s=1$ is
$$\zeta(s) = \dfrac1{s-1} + \sum\_{n=0}^{\infty} \dfrac{(-1)^n}{n!} \gamma\_n (s-1)^n$$
Further, recall that since $\zeta(2) = \dfrac{\pi^2}6 < 50$ and since $\zeta(s)$ is a rapidly decreasing function close to $1$, we have $s \in (1,2)$. Approxi... | Mathematica yields
$$s \approx 1.020234185218113986133227613272941259384211643734461718978879619075931...$$
I don't think you are going to get a good answer without just numerically approximating it. |
1,243,658 | I've to find a value for 's' were the infinit sum gives me the value 50. Is that possible and how do I've to calculate that value.
I've no idea how te begin so, help me!
Solve s for:
$$\sum\limits \_{n=1}^{\infty}\frac{1}{n^s}=50$$
(and I know that it's the Riemann zeta function for real numbers bigger than 1) | 2015/04/20 | [
"https://math.stackexchange.com/questions/1243658",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/226665/"
] | We have that the function $\zeta(s)$ is decreasing on the interval $(1,2)$. Since $\lim\_{s\to 1^+}\zeta(s)=+\infty$ while $\zeta(2)=\frac{\pi^2}{6}<50$ we have $\zeta(s\_0)=50$ for some $s\_0\in(1,2)$. Exploiting the asymptotic expansion in a right neighbourhood of $s=1$ (formula $(15)$ [here](http://mathworld.wolfram... | The Laurent series expansion of the Riemann Zeta function around $s=1$ is
$$\zeta(s) = \dfrac1{s-1} + \sum\_{n=0}^{\infty} \dfrac{(-1)^n}{n!} \gamma\_n (s-1)^n$$
Further, recall that since $\zeta(2) = \dfrac{\pi^2}6 < 50$ and since $\zeta(s)$ is a rapidly decreasing function close to $1$, we have $s \in (1,2)$. Approxi... |
1,243,658 | I've to find a value for 's' were the infinit sum gives me the value 50. Is that possible and how do I've to calculate that value.
I've no idea how te begin so, help me!
Solve s for:
$$\sum\limits \_{n=1}^{\infty}\frac{1}{n^s}=50$$
(and I know that it's the Riemann zeta function for real numbers bigger than 1) | 2015/04/20 | [
"https://math.stackexchange.com/questions/1243658",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/226665/"
] | We have that the function $\zeta(s)$ is decreasing on the interval $(1,2)$. Since $\lim\_{s\to 1^+}\zeta(s)=+\infty$ while $\zeta(2)=\frac{\pi^2}{6}<50$ we have $\zeta(s\_0)=50$ for some $s\_0\in(1,2)$. Exploiting the asymptotic expansion in a right neighbourhood of $s=1$ (formula $(15)$ [here](http://mathworld.wolfram... | Since I have seen this graph for only real numbers ([source](https://pl.wikipedia.org/wiki/Funkcja_dzeta_Riemanna#/media/File:Zeta_plot.gif))
[](https://i.stack.imgur.com/1TH6i.jpg)
- I have start thinking about to approximate the zeta function into a ... |
1,243,658 | I've to find a value for 's' were the infinit sum gives me the value 50. Is that possible and how do I've to calculate that value.
I've no idea how te begin so, help me!
Solve s for:
$$\sum\limits \_{n=1}^{\infty}\frac{1}{n^s}=50$$
(and I know that it's the Riemann zeta function for real numbers bigger than 1) | 2015/04/20 | [
"https://math.stackexchange.com/questions/1243658",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/226665/"
] | The Laurent series expansion of the Riemann Zeta function around $s=1$ is
$$\zeta(s) = \dfrac1{s-1} + \sum\_{n=0}^{\infty} \dfrac{(-1)^n}{n!} \gamma\_n (s-1)^n$$
Further, recall that since $\zeta(2) = \dfrac{\pi^2}6 < 50$ and since $\zeta(s)$ is a rapidly decreasing function close to $1$, we have $s \in (1,2)$. Approxi... | Since I have seen this graph for only real numbers ([source](https://pl.wikipedia.org/wiki/Funkcja_dzeta_Riemanna#/media/File:Zeta_plot.gif))
[](https://i.stack.imgur.com/1TH6i.jpg)
- I have start thinking about to approximate the zeta function into a ... |
4,535,930 | Reading Java Essentials, 2nd edition, there's a rule called PECS for type safety in method parameters. If it produces you extend, consumes you use super. Sorry if I defined it wrong as I don't get it.
Can anyone shed light on what Joshua Bloch is referring to as the producer/consumer? | 2010/12/26 | [
"https://Stackoverflow.com/questions/4535930",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/402963/"
] | See this [pdf](http://developers.sun.com/learning/javaoneonline/2008/pdf/TS-6623.pdf) which has a series of slides on this (search for PECS):
**Generic types are invariant**
• That is, `List<String>` is not a subtype of `List<Object>`
• Good for compile-time type safety, but inflexible
**Bounded wildcard types p... | When a method reads/iterates over elements in a collection then it is a consumer, when it ads to a collections then it is a producer. |
21,551,417 | I've got a bunch of projects now that I've imported into Eclipse and they all show up in the Package Explorer of Eclipse.
So, I've got a list of around 30 packages (and growing!).
Can you only show the top 10 packages (but have the option of seeing previous packages if necessary - like Microsoft Word where you choos... | 2014/02/04 | [
"https://Stackoverflow.com/questions/21551417",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/343204/"
] | There's no "Recent packages" feature but you can configure package view by pressing the arrow in right upper corner and using `Filters...`. Then you can exclude "Closed" packages from being shown and close these you are not working with at the moment to get them hidden
.
Can you only show the top 10 packages (but have the option of seeing previous packages if necessary - like Microsoft Word where you choos... | 2014/02/04 | [
"https://Stackoverflow.com/questions/21551417",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/343204/"
] | There's no "Recent packages" feature but you can configure package view by pressing the arrow in right upper corner and using `Filters...`. Then you can exclude "Closed" packages from being shown and close these you are not working with at the moment to get them hidden
. You can also use [Package Filter](ht... |
48,093,291 | I have 3 tables: Posts, Tags and Post\_tag. The last one is just a pivot table:
Posts:
```
+-------------+------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------------+------------------+------+-----+---------+----------------+
| ... | 2018/01/04 | [
"https://Stackoverflow.com/questions/48093291",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9086258/"
] | You can load posts with related tags by using [`with`](https://laravel.com/docs/5.5/eloquent-relationships#eager-loading) method:
```
$posts = Post::with('tags')
->where('town_id', session('citySelected')->id)
->latest()
->paginate(10);
```
Then you'll be able to do this:
```
@foreach ($posts as $post)
... | $posts pass to index.blade.php is a collecttion, not a object so your loop @foreach is wrong |
17,678,882 | I am using windows 7.
I have written a simple Spring3 Hello World using Eclipse and successfully run it using tomcat on my computer.
Now I have a Server which runs Linux.
I would like to run the project that I just wrote on my server. It has no GUI or anything of the kind so I can't simply start up eclipse and... | 2013/07/16 | [
"https://Stackoverflow.com/questions/17678882",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/964335/"
] | This has nothing to do with Spring and everything to do with packaging your application and deploying it in a Servlet container/HTTP server.
1. Setup Apache and Tomcat (or some other servlet container) on your linux server.
2. Package your Spring application as a `war` file (either with `maven`, `ant`, `Eclipse`, or ... | 1. Well first you need to get tomcat '<http://tomcat.apache.org/download-70.cgi>', and set it up on the linux server you are trying to deploy to.
2. Then you would export your project as a .war archive in eclipse (File -> Export -> war)
3. Copy the war file to your server, and copy it into TOMCAT\_HOME/webapps
4. Start... |
17,678,882 | I am using windows 7.
I have written a simple Spring3 Hello World using Eclipse and successfully run it using tomcat on my computer.
Now I have a Server which runs Linux.
I would like to run the project that I just wrote on my server. It has no GUI or anything of the kind so I can't simply start up eclipse and... | 2013/07/16 | [
"https://Stackoverflow.com/questions/17678882",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/964335/"
] | >
> There doesn't seem to be any explanation on how to take your code from one computer and put it into another and make it work.
>
>
>
That's right, as it is not often considered "not a programmers job". Its not very related to the framework you're using (Java EE or Spring or whatsoever), instead it's more of an ... | This has nothing to do with Spring and everything to do with packaging your application and deploying it in a Servlet container/HTTP server.
1. Setup Apache and Tomcat (or some other servlet container) on your linux server.
2. Package your Spring application as a `war` file (either with `maven`, `ant`, `Eclipse`, or ... |
17,678,882 | I am using windows 7.
I have written a simple Spring3 Hello World using Eclipse and successfully run it using tomcat on my computer.
Now I have a Server which runs Linux.
I would like to run the project that I just wrote on my server. It has no GUI or anything of the kind so I can't simply start up eclipse and... | 2013/07/16 | [
"https://Stackoverflow.com/questions/17678882",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/964335/"
] | This has nothing to do with Spring and everything to do with packaging your application and deploying it in a Servlet container/HTTP server.
1. Setup Apache and Tomcat (or some other servlet container) on your linux server.
2. Package your Spring application as a `war` file (either with `maven`, `ant`, `Eclipse`, or ... | Spring is just a 3rd party open source API. You can do without Spring and still be able to "run" your application on a server.
By "run", this means that your project must be placed in a directory in the server's filesystem, most of the time in the form of a WAR file.
I said most of the time, because if done correctly... |
17,678,882 | I am using windows 7.
I have written a simple Spring3 Hello World using Eclipse and successfully run it using tomcat on my computer.
Now I have a Server which runs Linux.
I would like to run the project that I just wrote on my server. It has no GUI or anything of the kind so I can't simply start up eclipse and... | 2013/07/16 | [
"https://Stackoverflow.com/questions/17678882",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/964335/"
] | This has nothing to do with Spring and everything to do with packaging your application and deploying it in a Servlet container/HTTP server.
1. Setup Apache and Tomcat (or some other servlet container) on your linux server.
2. Package your Spring application as a `war` file (either with `maven`, `ant`, `Eclipse`, or ... | **Packaging**
>
> cd c:/my\_project\_directory/Web/
>
>
> jar cvf web-archive-test.war .
>
>
>
**Deployment**
>
> cd c:/my\_project\_directory/Web/
>
>
> scp \*.war
> your\_username@remote\_linux\_host:/some/remote\_directory\_where\_tomcat\_is\_installed/webapps/
>
>
> |
17,678,882 | I am using windows 7.
I have written a simple Spring3 Hello World using Eclipse and successfully run it using tomcat on my computer.
Now I have a Server which runs Linux.
I would like to run the project that I just wrote on my server. It has no GUI or anything of the kind so I can't simply start up eclipse and... | 2013/07/16 | [
"https://Stackoverflow.com/questions/17678882",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/964335/"
] | >
> There doesn't seem to be any explanation on how to take your code from one computer and put it into another and make it work.
>
>
>
That's right, as it is not often considered "not a programmers job". Its not very related to the framework you're using (Java EE or Spring or whatsoever), instead it's more of an ... | 1. Well first you need to get tomcat '<http://tomcat.apache.org/download-70.cgi>', and set it up on the linux server you are trying to deploy to.
2. Then you would export your project as a .war archive in eclipse (File -> Export -> war)
3. Copy the war file to your server, and copy it into TOMCAT\_HOME/webapps
4. Start... |
17,678,882 | I am using windows 7.
I have written a simple Spring3 Hello World using Eclipse and successfully run it using tomcat on my computer.
Now I have a Server which runs Linux.
I would like to run the project that I just wrote on my server. It has no GUI or anything of the kind so I can't simply start up eclipse and... | 2013/07/16 | [
"https://Stackoverflow.com/questions/17678882",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/964335/"
] | 1. Well first you need to get tomcat '<http://tomcat.apache.org/download-70.cgi>', and set it up on the linux server you are trying to deploy to.
2. Then you would export your project as a .war archive in eclipse (File -> Export -> war)
3. Copy the war file to your server, and copy it into TOMCAT\_HOME/webapps
4. Start... | **Packaging**
>
> cd c:/my\_project\_directory/Web/
>
>
> jar cvf web-archive-test.war .
>
>
>
**Deployment**
>
> cd c:/my\_project\_directory/Web/
>
>
> scp \*.war
> your\_username@remote\_linux\_host:/some/remote\_directory\_where\_tomcat\_is\_installed/webapps/
>
>
> |
17,678,882 | I am using windows 7.
I have written a simple Spring3 Hello World using Eclipse and successfully run it using tomcat on my computer.
Now I have a Server which runs Linux.
I would like to run the project that I just wrote on my server. It has no GUI or anything of the kind so I can't simply start up eclipse and... | 2013/07/16 | [
"https://Stackoverflow.com/questions/17678882",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/964335/"
] | >
> There doesn't seem to be any explanation on how to take your code from one computer and put it into another and make it work.
>
>
>
That's right, as it is not often considered "not a programmers job". Its not very related to the framework you're using (Java EE or Spring or whatsoever), instead it's more of an ... | Spring is just a 3rd party open source API. You can do without Spring and still be able to "run" your application on a server.
By "run", this means that your project must be placed in a directory in the server's filesystem, most of the time in the form of a WAR file.
I said most of the time, because if done correctly... |
17,678,882 | I am using windows 7.
I have written a simple Spring3 Hello World using Eclipse and successfully run it using tomcat on my computer.
Now I have a Server which runs Linux.
I would like to run the project that I just wrote on my server. It has no GUI or anything of the kind so I can't simply start up eclipse and... | 2013/07/16 | [
"https://Stackoverflow.com/questions/17678882",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/964335/"
] | >
> There doesn't seem to be any explanation on how to take your code from one computer and put it into another and make it work.
>
>
>
That's right, as it is not often considered "not a programmers job". Its not very related to the framework you're using (Java EE or Spring or whatsoever), instead it's more of an ... | **Packaging**
>
> cd c:/my\_project\_directory/Web/
>
>
> jar cvf web-archive-test.war .
>
>
>
**Deployment**
>
> cd c:/my\_project\_directory/Web/
>
>
> scp \*.war
> your\_username@remote\_linux\_host:/some/remote\_directory\_where\_tomcat\_is\_installed/webapps/
>
>
> |
17,678,882 | I am using windows 7.
I have written a simple Spring3 Hello World using Eclipse and successfully run it using tomcat on my computer.
Now I have a Server which runs Linux.
I would like to run the project that I just wrote on my server. It has no GUI or anything of the kind so I can't simply start up eclipse and... | 2013/07/16 | [
"https://Stackoverflow.com/questions/17678882",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/964335/"
] | Spring is just a 3rd party open source API. You can do without Spring and still be able to "run" your application on a server.
By "run", this means that your project must be placed in a directory in the server's filesystem, most of the time in the form of a WAR file.
I said most of the time, because if done correctly... | **Packaging**
>
> cd c:/my\_project\_directory/Web/
>
>
> jar cvf web-archive-test.war .
>
>
>
**Deployment**
>
> cd c:/my\_project\_directory/Web/
>
>
> scp \*.war
> your\_username@remote\_linux\_host:/some/remote\_directory\_where\_tomcat\_is\_installed/webapps/
>
>
> |
2,621,611 | My understanding is that one of the most important properties of a separable Hilbert space is that we can decompose its elements into generalized Fourier series. For example, consider a set of basis functions $f\_n(x)$ that spans the Hilbert space $L^2(\mathbb{R})$. For any function $g(x) \in L^2(\mathbb{R})$, the gene... | 2018/01/26 | [
"https://math.stackexchange.com/questions/2621611",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/268333/"
] | $$y''=t^2$$
Integrate,
$$y'=\int t^2dt=\frac { t^3}{3}+K$$
Integrate again,
$$y=\int \frac { t^3}{3}+Kdt=\frac { t^4}{12}+K\_1t+K\_2$$ | Hint: $y\_p=\frac {t^4}{12}+At+B$ |
221,816 | Is there a way to hide specific messages in chat?
Sometimes people send things to chat channels that I personally find offensive or cause distress, the only option I can find is to hide all posts by the user that posted the message. or to flag the message for mods to deal with. I can imagine that mods have better thin... | 2014/02/18 | [
"https://meta.stackexchange.com/questions/221816",
"https://meta.stackexchange.com",
"https://meta.stackexchange.com/users/-1/"
] | There are some other "workarounds" for this in the mean time (this request just came up again recently):
* Ask an RO to move the message somewhere else. If it's within the message edit time limit you could also ask the person who posted it to remove it, if you're comfortable with that.
* In rooms with lots of activity... | If a message is truly offensive, just flag as spam/offensive. You don't want to simply hide such stuff for yourself, but remove it for all users.
There is no way to hide individual messages without a user script or something like that. |
4,678,898 | How can I convert a string to a sentence case?
I don't want to convert to title case. My requirement is to convert the string to sentence case. | 2011/01/13 | [
"https://Stackoverflow.com/questions/4678898",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/192923/"
] | In C# you do this:
```
static string UppercaseFirst(string s)
{
// Check for empty string.
if (string.IsNullOrEmpty(s))
{
return string.Empty;
}
// Return char and concat substring.
return char.ToUpper(s[0]) + s.Substring(1);
}
```
In CSS you could do the following (if your browser su... | I would vonvert the whole string to smallcase and then convert the first letter to upper.Heres an example in C#
```
string s = "SOME STRING";
System.Text.StringBuilder sb = new System.Text.StringBuilder(s);
s.ToLower();
s.ToUpper(s.Substring(0, 1));
``` |
52,779,084 | I am attempting to create a repeated graph in altair.
Here is my code:
```
x = alt.Chart(data).mark_bar().encode(
alt.X(alt.repeat("row"), type='quantitative'),
alt.Y(alt.repeat("column"), type='quantitative')
).repeat(
row= ['country'],
column=['alcohol_use', 'drug_use', 'high_meat', 'low_exercise', 'smokin... | 2018/10/12 | [
"https://Stackoverflow.com/questions/52779084",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7427150/"
] | If you get empty graphs in a repeat chart, it usually means one of two things:
1. your data is not accessible by the frontend. This can happen, for example, if you pass your data as a URL and the URL has a typo.
2. the column names used in row/column are mis-typed.
As an example of the second issue, consider this cha... | Turns out I needed to switch `alt.X(alt.repeat("row"), type='quantitative'),` to
`alt.X(alt.repeat("row"), type='ordinal'),` because the row data is country names. |
6,192,652 | Assuming this table with nearly 5 000 000 rows
```
CREATE TABLE `author2book` (
`author_id` int(11) NOT NULL,
`book_id` int(11) NOT NULL,
KEY `author_id_INDEX` (`author_id`),
KEY `paper_id_INDEX` (`book_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
```
is it possible to add a primary inde... | 2011/05/31 | [
"https://Stackoverflow.com/questions/6192652",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/641514/"
] | Create a new table with the structure you want and the auto-incrementing key, and then insert all of the records from this table into that new table... then drop (or rename) the original table, and rename the new table to the original name.
```
insert into newTable (author_id, book_id)
select * from author2book
```
... | ```
ALTER TABLE author2book
ADD COLUMN `id` int(11) NOT NULL FIRST;
```
Populate the id field manually (by a script maybe?), then:
```
ALTER TABLE author2book
MODIFY COLUMN `id` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY;
``` |
6,192,652 | Assuming this table with nearly 5 000 000 rows
```
CREATE TABLE `author2book` (
`author_id` int(11) NOT NULL,
`book_id` int(11) NOT NULL,
KEY `author_id_INDEX` (`author_id`),
KEY `paper_id_INDEX` (`book_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
```
is it possible to add a primary inde... | 2011/05/31 | [
"https://Stackoverflow.com/questions/6192652",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/641514/"
] | You can use ALTER TABLE to add the column and index in one command. i.e.:
```
ALTER TABLE author2book ADD id INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, ADD PRIMARY KEY (id);
```
See the [MySQL docs for ALTER TABLE](http://dev.mysql.com/doc/refman/5.1/en/alter-table.html) for more info. | Create a new table with the structure you want and the auto-incrementing key, and then insert all of the records from this table into that new table... then drop (or rename) the original table, and rename the new table to the original name.
```
insert into newTable (author_id, book_id)
select * from author2book
```
... |
6,192,652 | Assuming this table with nearly 5 000 000 rows
```
CREATE TABLE `author2book` (
`author_id` int(11) NOT NULL,
`book_id` int(11) NOT NULL,
KEY `author_id_INDEX` (`author_id`),
KEY `paper_id_INDEX` (`book_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
```
is it possible to add a primary inde... | 2011/05/31 | [
"https://Stackoverflow.com/questions/6192652",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/641514/"
] | You can use ALTER TABLE to add the column and index in one command. i.e.:
```
ALTER TABLE author2book ADD id INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, ADD PRIMARY KEY (id);
```
See the [MySQL docs for ALTER TABLE](http://dev.mysql.com/doc/refman/5.1/en/alter-table.html) for more info. | ```
ALTER TABLE author2book
ADD COLUMN `id` int(11) NOT NULL FIRST;
```
Populate the id field manually (by a script maybe?), then:
```
ALTER TABLE author2book
MODIFY COLUMN `id` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY;
``` |
31,590,560 | Given the following code:
```
class C a where
foo :: a -> a
f :: (C a) => a -> a
f = id
p :: (C a) => (a -> a) -> a -> a
p g = foo . g
```
Now, if I try to invoke p f, GHC complains:
```
> p f
No instance for (C a0) arising from a use of `p'
In the expression: p f
In an equation for `it': it = p f
```
I find ... | 2015/07/23 | [
"https://Stackoverflow.com/questions/31590560",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4190654/"
] | When you put a plain expression into ghci, it is basically trying to `print` it, so
```
> p f
```
is approximately the same as having the following in a file
```
main :: IO ()
main = print $ p f
```
As you pointed out, `p f :: (C a) => a -> a`. In order to `print $ p f` GHC needs to evaluate `p f`. GHC cannot eva... | It's the dreaded [monomorphism restriction](https://wiki.haskell.org/Monomorphism_restriction) in action. By default, GHC doesn't allow us to have top-level value definitions without type annotations if the inferred type has a class constraint. You can remedy the situation by
a.) Turning the restriction off by adding ... |
40,774,445 | I made a simple navigation menu using a ul, but when you hover over it, the background color will not change the entire background. I think it may have to do with my `padding` elements. How do I fix this?
Here is a Fiddle of my code: <https://jsfiddle.net/b8js8zkq/>
I have looked at [How do I make the hover backgroun... | 2016/11/23 | [
"https://Stackoverflow.com/questions/40774445",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7191823/"
] | The problem with your code is, you have `margin` and `padding` on both `<h3>` and `<li>`. So remove them and add them as `padding` to the `<a>` tag. And you are done!
The `padding` and `margin` of each `15px` constitute `30px` of total `padding` to `<a>`. That's what I have done below:
```css
.header li {
border-bo... | I'd recommend changing your css from this
```
.header a:hover{
background-color: #f3e5d8;
}
```
to this
```
.header li:hover{
background-color: #f3e5d8;
}
```
This will make it so any list item within your header class will change its background colour when hovered. |
40,774,445 | I made a simple navigation menu using a ul, but when you hover over it, the background color will not change the entire background. I think it may have to do with my `padding` elements. How do I fix this?
Here is a Fiddle of my code: <https://jsfiddle.net/b8js8zkq/>
I have looked at [How do I make the hover backgroun... | 2016/11/23 | [
"https://Stackoverflow.com/questions/40774445",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7191823/"
] | The problem with your code is, you have `margin` and `padding` on both `<h3>` and `<li>`. So remove them and add them as `padding` to the `<a>` tag. And you are done!
The `padding` and `margin` of each `15px` constitute `30px` of total `padding` to `<a>`. That's what I have done below:
```css
.header li {
border-bo... | <https://jsfiddle.net/b8js8zkq/1/>
Fixed fiddle.
You remove the padding on both `<h3>` and `<li>`, and add that same padding to the `<a>`-tag. |
40,774,445 | I made a simple navigation menu using a ul, but when you hover over it, the background color will not change the entire background. I think it may have to do with my `padding` elements. How do I fix this?
Here is a Fiddle of my code: <https://jsfiddle.net/b8js8zkq/>
I have looked at [How do I make the hover backgroun... | 2016/11/23 | [
"https://Stackoverflow.com/questions/40774445",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7191823/"
] | The problem with your code is, you have `margin` and `padding` on both `<h3>` and `<li>`. So remove them and add them as `padding` to the `<a>` tag. And you are done!
The `padding` and `margin` of each `15px` constitute `30px` of total `padding` to `<a>`. That's what I have done below:
```css
.header li {
border-bo... | [jsfiddle update](https://jsfiddle.net/thefto_dev/b8js8zkq/2/)
Old
```
.header a:hover {
background-color: #f3e5d8;
}
```
New
```
.header li:hover {
background-color: #f3e5d8;
}
```
You want to change the color of the li element rather than just the a tag |
40,774,445 | I made a simple navigation menu using a ul, but when you hover over it, the background color will not change the entire background. I think it may have to do with my `padding` elements. How do I fix this?
Here is a Fiddle of my code: <https://jsfiddle.net/b8js8zkq/>
I have looked at [How do I make the hover backgroun... | 2016/11/23 | [
"https://Stackoverflow.com/questions/40774445",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7191823/"
] | I'd recommend changing your css from this
```
.header a:hover{
background-color: #f3e5d8;
}
```
to this
```
.header li:hover{
background-color: #f3e5d8;
}
```
This will make it so any list item within your header class will change its background colour when hovered. | <https://jsfiddle.net/b8js8zkq/1/>
Fixed fiddle.
You remove the padding on both `<h3>` and `<li>`, and add that same padding to the `<a>`-tag. |
40,774,445 | I made a simple navigation menu using a ul, but when you hover over it, the background color will not change the entire background. I think it may have to do with my `padding` elements. How do I fix this?
Here is a Fiddle of my code: <https://jsfiddle.net/b8js8zkq/>
I have looked at [How do I make the hover backgroun... | 2016/11/23 | [
"https://Stackoverflow.com/questions/40774445",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7191823/"
] | I'd recommend changing your css from this
```
.header a:hover{
background-color: #f3e5d8;
}
```
to this
```
.header li:hover{
background-color: #f3e5d8;
}
```
This will make it so any list item within your header class will change its background colour when hovered. | [jsfiddle update](https://jsfiddle.net/thefto_dev/b8js8zkq/2/)
Old
```
.header a:hover {
background-color: #f3e5d8;
}
```
New
```
.header li:hover {
background-color: #f3e5d8;
}
```
You want to change the color of the li element rather than just the a tag |
32,380,373 | Is there a way to insert in a collection of Cassandra a value with single quote? This is what I have:
Table:
```
CREATE TABLE test.test (
name text PRIMARY KEY,
values map<text, text>
)
```
Insert:
```
INSERT INTO test (name, values) VALUES ( 'jos''emy',{'foo':'josemy''s house'});
```
Query:
```
SELECT *... | 2015/09/03 | [
"https://Stackoverflow.com/questions/32380373",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5297523/"
] | You could leave the code as-is. TypeScript already figures out that the types of all the variables in your code by looking at the initial assignment. Hover over the variables and you will see the types it's figured out.
The main problem in the code is that the type of `func` is incorrect. This:
```
var func: () => ()... | Here it is:
```
var func = ((): () => number => {
var _count: number = 0;
var increment: () => number = function (): number {
_count += 1;
return _count;
}
return increment;
})();
```
But adding an interface makes it easier.
```
interface Increment {
(): number;
}
var func ... |
32,380,373 | Is there a way to insert in a collection of Cassandra a value with single quote? This is what I have:
Table:
```
CREATE TABLE test.test (
name text PRIMARY KEY,
values map<text, text>
)
```
Insert:
```
INSERT INTO test (name, values) VALUES ( 'jos''emy',{'foo':'josemy''s house'});
```
Query:
```
SELECT *... | 2015/09/03 | [
"https://Stackoverflow.com/questions/32380373",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5297523/"
] | You could leave the code as-is. TypeScript already figures out that the types of all the variables in your code by looking at the initial assignment. Hover over the variables and you will see the types it's figured out.
The main problem in the code is that the type of `func` is incorrect. This:
```
var func: () => ()... | I did try this and it works!
**file1.ts**
```
export var Mvar = (() => {
var private_arry = [];
function pushfn(val):any {
return private_arry.push(val);
}
function countfn():number {
return private_arry.length;
}
function setfn(val):void {
private_arry = null;
private_... |
32,380,373 | Is there a way to insert in a collection of Cassandra a value with single quote? This is what I have:
Table:
```
CREATE TABLE test.test (
name text PRIMARY KEY,
values map<text, text>
)
```
Insert:
```
INSERT INTO test (name, values) VALUES ( 'jos''emy',{'foo':'josemy''s house'});
```
Query:
```
SELECT *... | 2015/09/03 | [
"https://Stackoverflow.com/questions/32380373",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5297523/"
] | Here it is:
```
var func = ((): () => number => {
var _count: number = 0;
var increment: () => number = function (): number {
_count += 1;
return _count;
}
return increment;
})();
```
But adding an interface makes it easier.
```
interface Increment {
(): number;
}
var func ... | I did try this and it works!
**file1.ts**
```
export var Mvar = (() => {
var private_arry = [];
function pushfn(val):any {
return private_arry.push(val);
}
function countfn():number {
return private_arry.length;
}
function setfn(val):void {
private_arry = null;
private_... |
8,939,992 | Brand new to android and facing a weird problem.Check out the code below
**FirstActivity.java:**
```
package experiment.on.it;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class FirstActivity extends Activity imp... | 2012/01/20 | [
"https://Stackoverflow.com/questions/8939992",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1016002/"
] | The problem can be solved putting `break` in every case of the `switch`
```
public void onClick(View v) {
switch (v.getId()) {
case R.id.timeDatePickerBtn:
startActivity(new Intent(this, TimeDatePicker.class));
break;
case R.id.spinnerBtn:
startActivity(new... | You are missing `break;` statement in your switch case block.
So, thought the first activity starts and is in your backstack, it is immediately pushed down by the second one due to the missing break and the back button behaves as it should and return you to the the first one. |
8,939,992 | Brand new to android and facing a weird problem.Check out the code below
**FirstActivity.java:**
```
package experiment.on.it;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class FirstActivity extends Activity imp... | 2012/01/20 | [
"https://Stackoverflow.com/questions/8939992",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1016002/"
] | You are missing `break;` statement in your switch case block.
So, thought the first activity starts and is in your backstack, it is immediately pushed down by the second one due to the missing break and the back button behaves as it should and return you to the the first one. | I think, you missed 'break' in switch~case. |
8,939,992 | Brand new to android and facing a weird problem.Check out the code below
**FirstActivity.java:**
```
package experiment.on.it;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class FirstActivity extends Activity imp... | 2012/01/20 | [
"https://Stackoverflow.com/questions/8939992",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1016002/"
] | You are missing `break;` statement in your switch case block.
So, thought the first activity starts and is in your backstack, it is immediately pushed down by the second one due to the missing break and the back button behaves as it should and return you to the the first one. | You're missing `break` in your switch case, along with `default`. Since your `switch` case is taking the value of the spinner class, when you end the spinner class by pressing back button, the time-date picker class pops up. |
8,939,992 | Brand new to android and facing a weird problem.Check out the code below
**FirstActivity.java:**
```
package experiment.on.it;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class FirstActivity extends Activity imp... | 2012/01/20 | [
"https://Stackoverflow.com/questions/8939992",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1016002/"
] | The problem can be solved putting `break` in every case of the `switch`
```
public void onClick(View v) {
switch (v.getId()) {
case R.id.timeDatePickerBtn:
startActivity(new Intent(this, TimeDatePicker.class));
break;
case R.id.spinnerBtn:
startActivity(new... | I think, you missed 'break' in switch~case. |
8,939,992 | Brand new to android and facing a weird problem.Check out the code below
**FirstActivity.java:**
```
package experiment.on.it;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class FirstActivity extends Activity imp... | 2012/01/20 | [
"https://Stackoverflow.com/questions/8939992",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1016002/"
] | The problem can be solved putting `break` in every case of the `switch`
```
public void onClick(View v) {
switch (v.getId()) {
case R.id.timeDatePickerBtn:
startActivity(new Intent(this, TimeDatePicker.class));
break;
case R.id.spinnerBtn:
startActivity(new... | You're missing `break` in your switch case, along with `default`. Since your `switch` case is taking the value of the spinner class, when you end the spinner class by pressing back button, the time-date picker class pops up. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.