qid int64 1 74.7M | question stringlengths 15 58.3k | date stringlengths 10 10 | metadata list | response_j stringlengths 4 30.2k | response_k stringlengths 11 36.5k |
|---|---|---|---|---|---|
11,055,439 | I am not so clear on character pointer and how they work.
The program builds, but crashes when I run it.
```
char *ab = NULL;
//ab = "abc123"; // works fine
sprintf(ab, "abc%d", 123); // this line seems to crash the program
```
I don't get how this can be wrong, when sprintf takes in a (char \* str) as a first a... | 2012/06/15 | [
"https://Stackoverflow.com/questions/11055439",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/698810/"
] | You need to allocate memory for your data. Indeed `sprintf` takes `char*`, but it doesn't allocate memory for you.
The first line works fine because compiler automatically allocates data for constant tables of chars defined at compile time. | Unlike in `Java` or other higher level languages, many of the `C` library's string functions don't simply set a string reference, instead they operate on a block of pre-allocated memory called a character array.
Your first line is saying that `ab` points to a non-existent memory location.
You'd have more luck if, ins... |
11,055,439 | I am not so clear on character pointer and how they work.
The program builds, but crashes when I run it.
```
char *ab = NULL;
//ab = "abc123"; // works fine
sprintf(ab, "abc%d", 123); // this line seems to crash the program
```
I don't get how this can be wrong, when sprintf takes in a (char \* str) as a first a... | 2012/06/15 | [
"https://Stackoverflow.com/questions/11055439",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/698810/"
] | You have allocated no memory to use with `ab`.
The first assignment works because you are assigning to `ab` a string constant: `"abc123"`. Memory for constant strings are provided by the compiler on your behalf: you don't need to allocate this memory.
Before you can use `ab` with e.g. `sprintf`, you'll need to alloca... | There are several things to think about here. Your original example is below:
```
char *ab = NULL;
//ab = "abc123"; // works fine
sprintf(ab, "abc%d", 123); // this line seems to crash the program
```
`char *ab = NULL;` is a pointer to a character and is initialized to NULL;
I don't think `ab = "abc123";` worked ... |
11,055,439 | I am not so clear on character pointer and how they work.
The program builds, but crashes when I run it.
```
char *ab = NULL;
//ab = "abc123"; // works fine
sprintf(ab, "abc%d", 123); // this line seems to crash the program
```
I don't get how this can be wrong, when sprintf takes in a (char \* str) as a first a... | 2012/06/15 | [
"https://Stackoverflow.com/questions/11055439",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/698810/"
] | You need to allocate memory for your data. Indeed `sprintf` takes `char*`, but it doesn't allocate memory for you.
The first line works fine because compiler automatically allocates data for constant tables of chars defined at compile time. | "ab" is null and sprintf is trying to write to it, you have to allocate it first.
```
char ab[20];
sprintf(ab, "abc%d", 123); //
```
or
```
char * ab = malloc(20); // new, whatever
sprintf(ab, "abc%d", 123); //
``` |
11,055,439 | I am not so clear on character pointer and how they work.
The program builds, but crashes when I run it.
```
char *ab = NULL;
//ab = "abc123"; // works fine
sprintf(ab, "abc%d", 123); // this line seems to crash the program
```
I don't get how this can be wrong, when sprintf takes in a (char \* str) as a first a... | 2012/06/15 | [
"https://Stackoverflow.com/questions/11055439",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/698810/"
] | You can do this
```
char ab[10]; //allocate memory
sprintf(ab, "abc%d", 123);
``` | Unlike in `Java` or other higher level languages, many of the `C` library's string functions don't simply set a string reference, instead they operate on a block of pre-allocated memory called a character array.
Your first line is saying that `ab` points to a non-existent memory location.
You'd have more luck if, ins... |
11,055,439 | I am not so clear on character pointer and how they work.
The program builds, but crashes when I run it.
```
char *ab = NULL;
//ab = "abc123"; // works fine
sprintf(ab, "abc%d", 123); // this line seems to crash the program
```
I don't get how this can be wrong, when sprintf takes in a (char \* str) as a first a... | 2012/06/15 | [
"https://Stackoverflow.com/questions/11055439",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/698810/"
] | You need to allocate memory for your data. Indeed `sprintf` takes `char*`, but it doesn't allocate memory for you.
The first line works fine because compiler automatically allocates data for constant tables of chars defined at compile time. | There are several things to think about here. Your original example is below:
```
char *ab = NULL;
//ab = "abc123"; // works fine
sprintf(ab, "abc%d", 123); // this line seems to crash the program
```
`char *ab = NULL;` is a pointer to a character and is initialized to NULL;
I don't think `ab = "abc123";` worked ... |
8,682,077 | I am using this code to generate random text :
```
from collections import defaultdict, Counter
from itertools import ifilter
from random import choice, randrange
def pairwise(iterable):
it = iter(iterable)
last = next(it)
for curr in it:
yield last, curr
last = curr
valid = set('abcdefgh... | 2011/12/30 | [
"https://Stackoverflow.com/questions/8682077",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1106074/"
] | Your parameter `text` is supposed to be the entire contents of Moby Dick , passed in as a string? Try passing the location of the text file and use it as a handle to generate your string from `read()`
```
Def makemarcov(fileloc):
with open(fileloc, 'r') as f:
text = f.read()
#proceed...
```
Im on my ... | I tried and it worked...
```
Aux = open("c:/Codes/A.txt",'r')
mystring = []
for i in Aux:
mystring += i
model = make_markov(mystring)
```
the output is not "that" clear ;-)
(Have you read Chomsky about Markovian grammars?)
But probably you are not really handling the case where there is no known successor! |
8,682,077 | I am using this code to generate random text :
```
from collections import defaultdict, Counter
from itertools import ifilter
from random import choice, randrange
def pairwise(iterable):
it = iter(iterable)
last = next(it)
for curr in it:
yield last, curr
last = curr
valid = set('abcdefgh... | 2011/12/30 | [
"https://Stackoverflow.com/questions/8682077",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1106074/"
] | Open the file, read it in, use it. I'd use the `with` statement which will guarantee the file gets closed afterwards.
```
with open(my_file, 'r') as f:
text = f.read()
model = make_markov(text)
```
For quick and dirty code you can do it all in one go.
```
model = make_markov(open(my_file, 'r').read())
``` | I tried and it worked...
```
Aux = open("c:/Codes/A.txt",'r')
mystring = []
for i in Aux:
mystring += i
model = make_markov(mystring)
```
the output is not "that" clear ;-)
(Have you read Chomsky about Markovian grammars?)
But probably you are not really handling the case where there is no known successor! |
30,830,394 | I'm try to make a login form.
I want to show error messages on same page after the user has clicked the submit button.
If the user logged to the system with correct information it should go to the index page.
This is the code I have written, but it doesn't work - it is going to the same page every time.
```
<?php
... | 2015/06/14 | [
"https://Stackoverflow.com/questions/30830394",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5008468/"
] | **Strings are not immutable in Common Lisp, they are mutable**:
*`*` is the last result from the Lisp listener*
```
CL-USER 5 > (make-string 10 :initial-element #\-)
"----------"
CL-USER 6 > (setf (aref * 5) #\|)
#\|
CL-USER 7 > **
"-----|----"
CL-USER 8 > (concatenate 'string "aa" '(#\b #\b))
"aabb"
CL-USER 9 > ... | If you need mutability, don't use literal strings. Like so:
```
* (defparameter *s* (format nil "aaa"))
*S*
* (setf (elt *s* 1) #\b)
#\b
* *s*
"aba"
``` |
8,901,073 | I'm using Dev-C++ v4.9.8.0 and I wrote the lines
```
const int i = 512;
i = 200;
```
and when I went to compile, I expected to see a compile-time error, but only got a warning. I told Dev-C++ that I want to compile this into a C program. My compiler under the hood is MinGW gcc v2.95, all of this running on a Windows... | 2012/01/17 | [
"https://Stackoverflow.com/questions/8901073",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/228844/"
] | *"Does the standard say this only warrants a warning?"*
The standard make no distinction of warnings and errors. The standard only has diagnostic messages.
```
const int i = 512;
i = 200;
```
In this program, there is a constraint violation of the assignment operator. The implementation has to issue a diagnostic me... | gcc 2.95 is *ancient*. It has many bugs that have been fixed in more recent versions.
Your best bet is to upgrade to a newer version of gcc. |
42,926,158 | I followed the [swagger-ui installation](http://swagger.io/docs/#swagger-ui-documentation-29) and I cannot get this work. The problem is that java-script files are not accessible. It seems that the names are wrong - index.html expects `SwaggerUiStandalonePreset.js` and in **/dist** directory there is only `swagger-ui-s... | 2017/03/21 | [
"https://Stackoverflow.com/questions/42926158",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2365381/"
] | This situation seems to be a bug in new version of swagger-ui.
If you want to make this application working just move **/dist** directory to parent directory of your http server and rename following files:
* swagger-ui-bundle.js to SwaggerUIBundle.js
* swagger-ui-standalone-preset.js to SwaggerUIStandalonePreset.js | I found the solution that works for me - current GitHub master is Swagger 3.0, which is very fresh (appears to be one day old) and appears to be broken. Probably some time is needed that documentation will be adapted for 3.0 version.
I downloaded [Swagger 2.x](https://github.com/swagger-api/swagger-ui/archive/2.x.zip)... |
19,758,215 | I am working on a RESTfull application which requires high scalability. I am considering Netty based frameworks for RESTfull applications. I went through some of the available options and tried to get what they can offer as a non-blocking implementation. Here are my findings:
1. rest.li --> Still under experimental ph... | 2013/11/03 | [
"https://Stackoverflow.com/questions/19758215",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/898094/"
] | Have you taken a look at [Play](http://www.playframework.com/)?
It appears that you are inclined to use Netty but if you are willing to look around a very simple [Grizzly + Jersey](https://jersey.java.net/nonav/documentation/snapshot/getting-started.html#new-from-archetype) setup will probably perform well enough. Hec... | Spring 5 comes with a reactive web framework called WebFlux. You can choose from multiple servers like Netty or Undertow. A reactive non-blocking WebClient has also been added to Spring and it also has support for reactive Mongo, Redis and Cassandra (I guess more is coming soon).
Spring Boot, the 'opinionated view of ... |
19,758,215 | I am working on a RESTfull application which requires high scalability. I am considering Netty based frameworks for RESTfull applications. I went through some of the available options and tried to get what they can offer as a non-blocking implementation. Here are my findings:
1. rest.li --> Still under experimental ph... | 2013/11/03 | [
"https://Stackoverflow.com/questions/19758215",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/898094/"
] | If you really want non-blocking you need to do non-blocking from the ground up and have [proper REST clients](https://stackoverflow.com/questions/6986014/rest-based-services-in-back-end). Otherwise as stated in [my comment](https://stackoverflow.com/questions/19758215/netty-based-non-blocking-rest-framewrok#comment2939... | Have you taken a look at [Play](http://www.playframework.com/)?
It appears that you are inclined to use Netty but if you are willing to look around a very simple [Grizzly + Jersey](https://jersey.java.net/nonav/documentation/snapshot/getting-started.html#new-from-archetype) setup will probably perform well enough. Hec... |
19,758,215 | I am working on a RESTfull application which requires high scalability. I am considering Netty based frameworks for RESTfull applications. I went through some of the available options and tried to get what they can offer as a non-blocking implementation. Here are my findings:
1. rest.li --> Still under experimental ph... | 2013/11/03 | [
"https://Stackoverflow.com/questions/19758215",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/898094/"
] | Spring 5 comes with a reactive web framework called WebFlux. You can choose from multiple servers like Netty or Undertow. A reactive non-blocking WebClient has also been added to Spring and it also has support for reactive Mongo, Redis and Cassandra (I guess more is coming soon).
Spring Boot, the 'opinionated view of ... | There is one more framework which uses Netty and RxJava, It's called [datamill](https://github.com/rchodava/datamill)
If you are interested in building web applications using a functional reactive style then should consider it. |
19,758,215 | I am working on a RESTfull application which requires high scalability. I am considering Netty based frameworks for RESTfull applications. I went through some of the available options and tried to get what they can offer as a non-blocking implementation. Here are my findings:
1. rest.li --> Still under experimental ph... | 2013/11/03 | [
"https://Stackoverflow.com/questions/19758215",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/898094/"
] | Have you taken a look at [Play](http://www.playframework.com/)?
It appears that you are inclined to use Netty but if you are willing to look around a very simple [Grizzly + Jersey](https://jersey.java.net/nonav/documentation/snapshot/getting-started.html#new-from-archetype) setup will probably perform well enough. Hec... | There is one more framework which uses Netty and RxJava, It's called [datamill](https://github.com/rchodava/datamill)
If you are interested in building web applications using a functional reactive style then should consider it. |
19,758,215 | I am working on a RESTfull application which requires high scalability. I am considering Netty based frameworks for RESTfull applications. I went through some of the available options and tried to get what they can offer as a non-blocking implementation. Here are my findings:
1. rest.li --> Still under experimental ph... | 2013/11/03 | [
"https://Stackoverflow.com/questions/19758215",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/898094/"
] | Here's the list of microframeworks I'm aware of for REST applications:
* Scalatra - <http://www.scalatra.org/> (Scala + Netty)
* RestExpress - <https://github.com/RestExpress/RestExpress> (Java + Netty)
* Finatra - <https://github.com/capotej/finatra> (Scala + Finagle + Netty)
Please feel free to comment to the answe... | Have you taken a look at [Play](http://www.playframework.com/)?
It appears that you are inclined to use Netty but if you are willing to look around a very simple [Grizzly + Jersey](https://jersey.java.net/nonav/documentation/snapshot/getting-started.html#new-from-archetype) setup will probably perform well enough. Hec... |
19,758,215 | I am working on a RESTfull application which requires high scalability. I am considering Netty based frameworks for RESTfull applications. I went through some of the available options and tried to get what they can offer as a non-blocking implementation. Here are my findings:
1. rest.li --> Still under experimental ph... | 2013/11/03 | [
"https://Stackoverflow.com/questions/19758215",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/898094/"
] | Here's the list of microframeworks I'm aware of for REST applications:
* Scalatra - <http://www.scalatra.org/> (Scala + Netty)
* RestExpress - <https://github.com/RestExpress/RestExpress> (Java + Netty)
* Finatra - <https://github.com/capotej/finatra> (Scala + Finagle + Netty)
Please feel free to comment to the answe... | Spring 5 comes with a reactive web framework called WebFlux. You can choose from multiple servers like Netty or Undertow. A reactive non-blocking WebClient has also been added to Spring and it also has support for reactive Mongo, Redis and Cassandra (I guess more is coming soon).
Spring Boot, the 'opinionated view of ... |
19,758,215 | I am working on a RESTfull application which requires high scalability. I am considering Netty based frameworks for RESTfull applications. I went through some of the available options and tried to get what they can offer as a non-blocking implementation. Here are my findings:
1. rest.li --> Still under experimental ph... | 2013/11/03 | [
"https://Stackoverflow.com/questions/19758215",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/898094/"
] | If you really want non-blocking you need to do non-blocking from the ground up and have [proper REST clients](https://stackoverflow.com/questions/6986014/rest-based-services-in-back-end). Otherwise as stated in [my comment](https://stackoverflow.com/questions/19758215/netty-based-non-blocking-rest-framewrok#comment2939... | You can take a look at [AsyncRestTemplate](https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/web/client/AsyncRestTemplate.html) in Spring Framework 4.2.5.RELEASE. It can be used on top of Netty.
>
> Note: by default AsyncRestTemplate relies on standard JDK facilities to establish HTTP connect... |
19,758,215 | I am working on a RESTfull application which requires high scalability. I am considering Netty based frameworks for RESTfull applications. I went through some of the available options and tried to get what they can offer as a non-blocking implementation. Here are my findings:
1. rest.li --> Still under experimental ph... | 2013/11/03 | [
"https://Stackoverflow.com/questions/19758215",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/898094/"
] | Have you taken a look at [Play](http://www.playframework.com/)?
It appears that you are inclined to use Netty but if you are willing to look around a very simple [Grizzly + Jersey](https://jersey.java.net/nonav/documentation/snapshot/getting-started.html#new-from-archetype) setup will probably perform well enough. Hec... | [Undertow 3.0](http://undertow.io/) will be on the top of [Netty (instead of XNIO)](http://undertow.io/blog/2019/04/15/Undertow-3.html). A perfect, super light, simple API to build an application like REST API server. I use it for almost any Java Microservices I have. |
19,758,215 | I am working on a RESTfull application which requires high scalability. I am considering Netty based frameworks for RESTfull applications. I went through some of the available options and tried to get what they can offer as a non-blocking implementation. Here are my findings:
1. rest.li --> Still under experimental ph... | 2013/11/03 | [
"https://Stackoverflow.com/questions/19758215",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/898094/"
] | Spring 5 comes with a reactive web framework called WebFlux. You can choose from multiple servers like Netty or Undertow. A reactive non-blocking WebClient has also been added to Spring and it also has support for reactive Mongo, Redis and Cassandra (I guess more is coming soon).
Spring Boot, the 'opinionated view of ... | You can take a look at [AsyncRestTemplate](https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/web/client/AsyncRestTemplate.html) in Spring Framework 4.2.5.RELEASE. It can be used on top of Netty.
>
> Note: by default AsyncRestTemplate relies on standard JDK facilities to establish HTTP connect... |
19,758,215 | I am working on a RESTfull application which requires high scalability. I am considering Netty based frameworks for RESTfull applications. I went through some of the available options and tried to get what they can offer as a non-blocking implementation. Here are my findings:
1. rest.li --> Still under experimental ph... | 2013/11/03 | [
"https://Stackoverflow.com/questions/19758215",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/898094/"
] | Here's the list of microframeworks I'm aware of for REST applications:
* Scalatra - <http://www.scalatra.org/> (Scala + Netty)
* RestExpress - <https://github.com/RestExpress/RestExpress> (Java + Netty)
* Finatra - <https://github.com/capotej/finatra> (Scala + Finagle + Netty)
Please feel free to comment to the answe... | [Undertow 3.0](http://undertow.io/) will be on the top of [Netty (instead of XNIO)](http://undertow.io/blog/2019/04/15/Undertow-3.html). A perfect, super light, simple API to build an application like REST API server. I use it for almost any Java Microservices I have. |
1,769,375 | I have a Home.html that has a login form that POSTS to login.aspx
the login.aspx takes a hell lot of time to load...
so i want to have a javascript based function where the instant i click Login Button,
a loader must be shown ...while in the background the POST happens and then aspx page must get loaded and then the m... | 2009/11/20 | [
"https://Stackoverflow.com/questions/1769375",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/197858/"
] | Replacing the `onclick` event with `onfocus` solved the problem. I guess Safari doesn't like `onclick` event on `select` elements. | For me in Chrome, onclick working with second click on select box Where as in FF & IE, its working fine for first click itself. |
1,769,375 | I have a Home.html that has a login form that POSTS to login.aspx
the login.aspx takes a hell lot of time to load...
so i want to have a javascript based function where the instant i click Login Button,
a loader must be shown ...while in the background the POST happens and then aspx page must get loaded and then the m... | 2009/11/20 | [
"https://Stackoverflow.com/questions/1769375",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/197858/"
] | Replacing the `onclick` event with `onfocus` solved the problem. I guess Safari doesn't like `onclick` event on `select` elements. | `<select onclick="changeDate()">`
Should be changed to
```
<select onchange="changeDate()">
```
Safari seems to react as a open even and not a close event, like in the other browsers. |
1,769,375 | I have a Home.html that has a login form that POSTS to login.aspx
the login.aspx takes a hell lot of time to load...
so i want to have a javascript based function where the instant i click Login Button,
a loader must be shown ...while in the background the POST happens and then aspx page must get loaded and then the m... | 2009/11/20 | [
"https://Stackoverflow.com/questions/1769375",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/197858/"
] | Sometimes you need to add preference to the JavaScript function as "javascript:"; for example:
```
<select onclick="changeDate()">
```
should be
```
<select onclick="javascript:changeDate()">
``` | For me in Chrome, onclick working with second click on select box Where as in FF & IE, its working fine for first click itself. |
1,769,375 | I have a Home.html that has a login form that POSTS to login.aspx
the login.aspx takes a hell lot of time to load...
so i want to have a javascript based function where the instant i click Login Button,
a loader must be shown ...while in the background the POST happens and then aspx page must get loaded and then the m... | 2009/11/20 | [
"https://Stackoverflow.com/questions/1769375",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/197858/"
] | For me in Chrome, onclick working with second click on select box Where as in FF & IE, its working fine for first click itself. | `<select onclick="changeDate()">`
Should be changed to
```
<select onchange="changeDate()">
```
Safari seems to react as a open even and not a close event, like in the other browsers. |
1,769,375 | I have a Home.html that has a login form that POSTS to login.aspx
the login.aspx takes a hell lot of time to load...
so i want to have a javascript based function where the instant i click Login Button,
a loader must be shown ...while in the background the POST happens and then aspx page must get loaded and then the m... | 2009/11/20 | [
"https://Stackoverflow.com/questions/1769375",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/197858/"
] | Sometimes you need to add preference to the JavaScript function as "javascript:"; for example:
```
<select onclick="changeDate()">
```
should be
```
<select onclick="javascript:changeDate()">
``` | `<select onclick="changeDate()">`
Should be changed to
```
<select onchange="changeDate()">
```
Safari seems to react as a open even and not a close event, like in the other browsers. |
209,152 | I've got an older Tektronix 2430 100MHz oscilloscope. The older probes are "coded" and according to the manual are supposed to automatically select the proper scale based on the probe type. My last original probe just broke, so I ordered some inexpensive generic replacements. These have a 1x/10x switch on them to selec... | 2016/01/02 | [
"https://electronics.stackexchange.com/questions/209152",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/73495/"
] | According to the manual of my Tek 465B scope, the coupling ring is connected through a resistor to the base of a transistor that controls the illumination of the 1X and 10X LED indicators. A typical probe (P6105) has an 11k resistor connected between the coupling pin on the probe body and ground. Thus when the probe is... | If I recall correctly, the pin on the coupling ring shown in your picture of the Tek probe grounds the insulated ring around the connector on the scope to indicate that the probe is set to 10 X. If your probe is sufficiently intact, you could check this with an ohmmeter...
I don't think you could easily make a generic... |
209,152 | I've got an older Tektronix 2430 100MHz oscilloscope. The older probes are "coded" and according to the manual are supposed to automatically select the proper scale based on the probe type. My last original probe just broke, so I ordered some inexpensive generic replacements. These have a 1x/10x switch on them to selec... | 2016/01/02 | [
"https://electronics.stackexchange.com/questions/209152",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/73495/"
] | I experienced the following on my 2425A scope for the probe coding, with Rp being the resistance between the coupling ring and ground:
```
Rp scaling
------------------------
>10k5 x1
8k5 < Rp < 10k5 x10
5k5 < Rp < 8k5 x100
0k5 < Rp < 5k5 x1000
```
Confirmed on a 2445 | If I recall correctly, the pin on the coupling ring shown in your picture of the Tek probe grounds the insulated ring around the connector on the scope to indicate that the probe is set to 10 X. If your probe is sufficiently intact, you could check this with an ohmmeter...
I don't think you could easily make a generic... |
209,152 | I've got an older Tektronix 2430 100MHz oscilloscope. The older probes are "coded" and according to the manual are supposed to automatically select the proper scale based on the probe type. My last original probe just broke, so I ordered some inexpensive generic replacements. These have a 1x/10x switch on them to selec... | 2016/01/02 | [
"https://electronics.stackexchange.com/questions/209152",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/73495/"
] | According to the manual of my Tek 465B scope, the coupling ring is connected through a resistor to the base of a transistor that controls the illumination of the 1X and 10X LED indicators. A typical probe (P6105) has an 11k resistor connected between the coupling pin on the probe body and ground. Thus when the probe is... | I experienced the following on my 2425A scope for the probe coding, with Rp being the resistance between the coupling ring and ground:
```
Rp scaling
------------------------
>10k5 x1
8k5 < Rp < 10k5 x10
5k5 < Rp < 8k5 x100
0k5 < Rp < 5k5 x1000
```
Confirmed on a 2445 |
22,537,019 | I'm trying to match a date against an array. However, I notice my date is evaluated as an integer.
Instead of =MATCH(20/02/2014;B1:B21;1) it becomes =MATCH(41690;B1:B21;1); and I'm getting an #N/A as a result!
How to get this rectified?
Thanks! | 2014/03/20 | [
"https://Stackoverflow.com/questions/22537019",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/308605/"
] | To use the data from column two as line style use `set style increment user` and `linecolor variable`:
```
set style increment user
plot "datafile.dat" using 5:6:2 with impulses lc var
```
In order to place a label, use the `labels` plotting style:
```
plot "datafile.dat" using 5:6:1 with labels offset 0,1
```
Pu... | Thanks for the helpful answer above. It almost solved my problem
I'm actually trying to use a column from my data file to specify a linestyle (dot, squares,triangles, whatever as long as it's user-defined), and not a linecolor. Is there any way to do that?
This line works : I get points with different colors (specifi... |
22,537,019 | I'm trying to match a date against an array. However, I notice my date is evaluated as an integer.
Instead of =MATCH(20/02/2014;B1:B21;1) it becomes =MATCH(41690;B1:B21;1); and I'm getting an #N/A as a result!
How to get this rectified?
Thanks! | 2014/03/20 | [
"https://Stackoverflow.com/questions/22537019",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/308605/"
] | To use the data from column two as line style use `set style increment user` and `linecolor variable`:
```
set style increment user
plot "datafile.dat" using 5:6:2 with impulses lc var
```
In order to place a label, use the `labels` plotting style:
```
plot "datafile.dat" using 5:6:1 with labels offset 0,1
```
Pu... | You only have to replace the line`set for [i=1:6] style line i lt i` for `set for [i=1:6] style line i lt i pt %`, Where `%` can be any type of point you want |
60,423,370 | Here is a picture of my result in Google chrome
[](https://i.stack.imgur.com/oH9Dy.png)
And here is my whole code
```
<?php
$tilkobling = mysqli_connect("localhost","root","","oppgave_normalisering");
$sql = "SELECT person_table.personr,... | 2020/02/26 | [
"https://Stackoverflow.com/questions/60423370",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12962033/"
] | In your while loop, you have hard-coded `per.jfif` as the image source:
```
<td><img src="per.jfif" alt="" style="height:100px; height:100px;"> <?php echo $rad["bilde"]; ?></td>
```
Which causes all your rows to have the same image. Did you mean to use `$rad['bilde']` instead?
```
<td><img src="<?= $rad['bilde'] ?>... | Special thanks to @Anis R. who solved my issue.
```
<td><img src="<?= $rad['bilde'] ?>" alt="" style="height:100px; height:100px;"> <?php echo $rad["bilde"]; ?></td>
```
Putting `<?= $rad['bilde'] ?>` into the image src solved the problem. I linked a picture of the result below
<https://i.stack.imgur.com/SnzZL.png... |
7,474,318 | Im writing an IOS game using AS3. Here's the problem- I have an image on the screen that moves around. When the image's y value goes negative (the image is partly off the screen), the frame rates bottom out. I've gone over my code pretty thoroughly, even threw together a few test projects just to experiment. In all the... | 2011/09/19 | [
"https://Stackoverflow.com/questions/7474318",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/571725/"
] | What technique do you use to hide the invisible part of the screen? Mask + scrolling content, scrolling content or scroll rect? You should consider using scroll rect if that's not the technique you are using right now. | You need to clip all drawing to the visible image. Anytime you draw offscreen you lose hardware acceleration, which only works on video memory. |
58,924,603 | ```
....
import * as XLSX from 'xlsx';
...
```
I´m reading a file .xlsx in Ionic 4
```
showData() {
let fileReader = new FileReader();
fileReader.onloadend = (e) => {
this.arrayBuffer = fileReader.result;
let data = new Uint8Array(this.arrayBuffer);
let arr = new Array();
for (let i = 0; i != dat... | 2019/11/18 | [
"https://Stackoverflow.com/questions/58924603",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8112745/"
] | I'd think something more like this would save you a lot of lines of code:
```js
if(randomIndex==randomIndex2) {
div.innerHTML="<h1>Tie!</h1>";
}
else {
var playerWins = (randomIndex==0 && randomIndex2==1) || (randomIndex==1 && randomIndex2==2) || (randomIndex==2 && randomIndex2==0)
div.innerHTML = playerWin... | This might be a personal preference, but I find things much neater when there is space between operators and operands. And I also properly despise the
```
else
{
...
}
```
Formatting scheme. I would recommend, for neatness purposes, use
```
else {
...
}
```
Most people will also tell you not to, but I fin... |
58,924,603 | ```
....
import * as XLSX from 'xlsx';
...
```
I´m reading a file .xlsx in Ionic 4
```
showData() {
let fileReader = new FileReader();
fileReader.onloadend = (e) => {
this.arrayBuffer = fileReader.result;
let data = new Uint8Array(this.arrayBuffer);
let arr = new Array();
for (let i = 0; i != dat... | 2019/11/18 | [
"https://Stackoverflow.com/questions/58924603",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8112745/"
] | This might be a personal preference, but I find things much neater when there is space between operators and operands. And I also properly despise the
```
else
{
...
}
```
Formatting scheme. I would recommend, for neatness purposes, use
```
else {
...
}
```
Most people will also tell you not to, but I fin... | To put the entire game logic into a simple script:
**Rock, Paper, Scissors** to indexes: **0, 1, 2**
```js
result = PL === AI ? 2 : (AI + 1) % 3 === PL ? 0 : 1;
// | | |
// 0 = PL wins --------------------------------┘ |
// 1 = AI wins ------------------------------------... |
58,924,603 | ```
....
import * as XLSX from 'xlsx';
...
```
I´m reading a file .xlsx in Ionic 4
```
showData() {
let fileReader = new FileReader();
fileReader.onloadend = (e) => {
this.arrayBuffer = fileReader.result;
let data = new Uint8Array(this.arrayBuffer);
let arr = new Array();
for (let i = 0; i != dat... | 2019/11/18 | [
"https://Stackoverflow.com/questions/58924603",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8112745/"
] | I'd think something more like this would save you a lot of lines of code:
```js
if(randomIndex==randomIndex2) {
div.innerHTML="<h1>Tie!</h1>";
}
else {
var playerWins = (randomIndex==0 && randomIndex2==1) || (randomIndex==1 && randomIndex2==2) || (randomIndex==2 && randomIndex2==0)
div.innerHTML = playerWin... | To put the entire game logic into a simple script:
**Rock, Paper, Scissors** to indexes: **0, 1, 2**
```js
result = PL === AI ? 2 : (AI + 1) % 3 === PL ? 0 : 1;
// | | |
// 0 = PL wins --------------------------------┘ |
// 1 = AI wins ------------------------------------... |
52,199,110 | I am trying to normalise a column of numerical values to between 0 and 1. I wrote the following R code to try to apply it to a column, but it doesn't work. Can anyone help?
```
normalise <- function(x) {
return (x-min(x)/(max(x)-min(x))) # Creating the function
train$dti_norm <- apply(select(train,dti),MARGIN=2, FU... | 2018/09/06 | [
"https://Stackoverflow.com/questions/52199110",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10302341/"
] | use sub-query do order by
```
select t1.* from
(
SELECT IFnull(t.diapason,'total') as diapason, COUNT(distinct user_id) AS
'number_of_users'
FROM (SELECT p.user_id, p.amount as total, CASE
when amount<=100 then '0-100'
when amount>100 and amount<=150 then '100-150'
when amount>150 the... | As I commented in your previous question on this topic there is a nicer way of doing this which involves a lot less hard coding of range values assuming that most of the ranges are evenly spread (ie in chunks of 50, 100 etc)
```
+---------+--------+
| user_id | amount |
+---------+--------+
| 1 | 300 |
| ... |
72,627,810 | I use the fetchAPI to retrieve my data from the backend as a stream.
I decrypt the data chunk by chunk and the concat the content back together for the original file.
I have found that the stream seems to provide data differently each time makling the chunnks different. How can I force the stream to the chunks in the ... | 2022/06/15 | [
"https://Stackoverflow.com/questions/72627810",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1918669/"
] | The File library has a method [GetCreationTime](https://learn.microsoft.com/de-de/dotnet/api/system.io.file.getcreationtime?view=net-6.0) which takes the path as a string.
Using this method, you could filter your files. | quick and dirty:
```
using System.Linq;
using System.IO;
using System.IO.Compression;
public static void GetTxtFiles()
{
var directoryInfo = new DirectoryInfo("pathToFolder");
var specificDay = new DateTime(2022, 06, 15).Date;
var txtFiles = directoryInfo.GetFiles("*.txt")... |
38,952,440 | How can one filter an array for one property depending on an url parameter defined as true or not? I have tried the following, but: "Error: $location is not defined". I have made it available to the controller of the template though.
javascript:
```
app.filter('myFilter', function() {
return function( items ) {
... | 2016/08/15 | [
"https://Stackoverflow.com/questions/38952440",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1171638/"
] | You need to inject the $location Provider in your filter as well. As you haven't done that, That is why it is showing you the undefined error. Try something like this
```
app.filter('myFilter', function($location) {
return function( items ) {
return items.filter(function(element, $location){
v... | You're trying to use the `$location` *service* to check a string (regardless of whether it's a string of a UL)
Here's an untested start for you to work with:
```
app.filter('containsExtParam', function() {
return function( items ) {
return items.filter(function(element){
return element.indexO... |
293,592 | Being that Im new to programming (yes, I know you've read that in a million of SO questions) I need resources to learn about all the different aspects of programming. Besides for myself I've seen alot of other SO users ask these type of questions, and then the question gets closed because it is not appropriate for the ... | 2015/05/07 | [
"https://meta.stackoverflow.com/questions/293592",
"https://meta.stackoverflow.com",
"https://meta.stackoverflow.com/users/4864184/"
] | Ok. We will have a small demo of what will happen if *opinion based questions* like - *which site is the best for learning XXXXX* are allowed to linger around.
>
> OP : Which site is the best to learn language L?
>
>
> User -X -- > Go to site X. It has loads of examples and a whole list
> of tutorials.
>
>
> Use... | It's a fair request, but from past experience this is very unpopular with the community - mostly for the very same reasons why resource recommendations are off topic *here*: they're difficult to moderate, keep updated, and free from garbage.
So far, there has been no indication that Stack Exchange are thinking about b... |
293,592 | Being that Im new to programming (yes, I know you've read that in a million of SO questions) I need resources to learn about all the different aspects of programming. Besides for myself I've seen alot of other SO users ask these type of questions, and then the question gets closed because it is not appropriate for the ... | 2015/05/07 | [
"https://meta.stackoverflow.com/questions/293592",
"https://meta.stackoverflow.com",
"https://meta.stackoverflow.com/users/4864184/"
] | Ok. We will have a small demo of what will happen if *opinion based questions* like - *which site is the best for learning XXXXX* are allowed to linger around.
>
> OP : Which site is the best to learn language L?
>
>
> User -X -- > Go to site X. It has loads of examples and a whole list
> of tutorials.
>
>
> Use... | There is one place on SO where this sort of information may be provided, and that is the tag wiki. You can find this in several ways:
1. Hover over a tag on a question and press "info"
2. If viewing questions by tag, hit "learn more" at the top of the page
3. Go direct to /tags/foo/info, e.g. <https://stackoverflow.co... |
23,615,451 | I am trying to understand how `Lists.newArrayList()` knows the type of list to return.
I saw the [source code](https://code.google.com/p/guava-libraries/source/browse/guava/src/com/google/common/collect/Lists.java#79) for function `newArrayList()`, but it simply returns the `ArrayList` of generic type E.
```
public st... | 2014/05/12 | [
"https://Stackoverflow.com/questions/23615451",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1779200/"
] | It can do so via type inference.
Simple put, you can have an assignment like:
```
List<String> list = newArrayList();
```
where `newArrayList()` probably is something along the lines of:
```
static <E> List<E> newArrayList() {
return new ArrayList<>();
}
```
Here the compiler will need to determine of what t... | The compiler infers the type from the variable/method declaration.
See <http://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html> |
23,615,451 | I am trying to understand how `Lists.newArrayList()` knows the type of list to return.
I saw the [source code](https://code.google.com/p/guava-libraries/source/browse/guava/src/com/google/common/collect/Lists.java#79) for function `newArrayList()`, but it simply returns the `ArrayList` of generic type E.
```
public st... | 2014/05/12 | [
"https://Stackoverflow.com/questions/23615451",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1779200/"
] | Because the compiler can infer the type from the variable declaration.
Example:
```
List<String> list = Lists.newArrayList(),
```
the compiler will understand that the type of the collection (the type of E) will be `<String>`, since you expect to get a List of String.
It was useful to avoid rewriting entire <> arg... | The compiler infers the type from the variable/method declaration.
See <http://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html> |
23,615,451 | I am trying to understand how `Lists.newArrayList()` knows the type of list to return.
I saw the [source code](https://code.google.com/p/guava-libraries/source/browse/guava/src/com/google/common/collect/Lists.java#79) for function `newArrayList()`, but it simply returns the `ArrayList` of generic type E.
```
public st... | 2014/05/12 | [
"https://Stackoverflow.com/questions/23615451",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1779200/"
] | The short answer is [Type Inference](http://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html).
Here's what's going on. You're not simply calling `Lists.newArrayList()`; you're also assigning it to a variable, like
```
List<Person> people = Lists.newArrayList();
```
Since you've specified the type... | The compiler infers the type from the variable/method declaration.
See <http://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html> |
23,615,451 | I am trying to understand how `Lists.newArrayList()` knows the type of list to return.
I saw the [source code](https://code.google.com/p/guava-libraries/source/browse/guava/src/com/google/common/collect/Lists.java#79) for function `newArrayList()`, but it simply returns the `ArrayList` of generic type E.
```
public st... | 2014/05/12 | [
"https://Stackoverflow.com/questions/23615451",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1779200/"
] | Because the compiler can infer the type from the variable declaration.
Example:
```
List<String> list = Lists.newArrayList(),
```
the compiler will understand that the type of the collection (the type of E) will be `<String>`, since you expect to get a List of String.
It was useful to avoid rewriting entire <> arg... | It can do so via type inference.
Simple put, you can have an assignment like:
```
List<String> list = newArrayList();
```
where `newArrayList()` probably is something along the lines of:
```
static <E> List<E> newArrayList() {
return new ArrayList<>();
}
```
Here the compiler will need to determine of what t... |
23,615,451 | I am trying to understand how `Lists.newArrayList()` knows the type of list to return.
I saw the [source code](https://code.google.com/p/guava-libraries/source/browse/guava/src/com/google/common/collect/Lists.java#79) for function `newArrayList()`, but it simply returns the `ArrayList` of generic type E.
```
public st... | 2014/05/12 | [
"https://Stackoverflow.com/questions/23615451",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1779200/"
] | Because the compiler can infer the type from the variable declaration.
Example:
```
List<String> list = Lists.newArrayList(),
```
the compiler will understand that the type of the collection (the type of E) will be `<String>`, since you expect to get a List of String.
It was useful to avoid rewriting entire <> arg... | The short answer is [Type Inference](http://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html).
Here's what's going on. You're not simply calling `Lists.newArrayList()`; you're also assigning it to a variable, like
```
List<Person> people = Lists.newArrayList();
```
Since you've specified the type... |
274,336 | The math font looks spectacular here, and I want to use it for my thesis (LaTeX):
<https://www.fernuni-hagen.de/stochastik/downloads/gruberhagen.pdf>
A sample:
[](https://i.stack.imgur.com/pXF5J.png)
An ideal answer would involve a few lines that cou... | 2015/10/22 | [
"https://tex.stackexchange.com/questions/274336",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/90446/"
] | ```
pdffonts Downloads/gruberhagen.pdf
name type encoding emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
XOJITZ+LucidaSans-Demi Type 1 Custom yes yes no 74 0
ZLAUHV+L... | Issuing `strings gruberhagen.pdf | grep FontName` yields
```
/FontName /UXBXDG+LucidaNewMath-Arrows
/FontName /ULGBMZ+LucidaNewMath-Extension
/FontName /RTWJVE+LucidaNewMath-AltItalic
/FontName /DPZYFZ+LucidaNewMath-Symbol
/FontName /OSTXAW+LucidaBright
/FontName /XOJITZ+LucidaSans-Demi
/FontName /VIGTFE+LucidaSans-It... |
274,336 | The math font looks spectacular here, and I want to use it for my thesis (LaTeX):
<https://www.fernuni-hagen.de/stochastik/downloads/gruberhagen.pdf>
A sample:
[](https://i.stack.imgur.com/pXF5J.png)
An ideal answer would involve a few lines that cou... | 2015/10/22 | [
"https://tex.stackexchange.com/questions/274336",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/90446/"
] | ```
pdffonts Downloads/gruberhagen.pdf
name type encoding emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
XOJITZ+LucidaSans-Demi Type 1 Custom yes yes no 74 0
ZLAUHV+L... | When you look at the document properties in your pdf viewer, you see it uses `Lucida Sans` (for text) and `Lucida New Math`. It's not free and is available from [TUG](https://tug.org/store/lucida/type1.html). |
33,973,407 | I'm developing a page in order to learn in NodeJs with express and ejs.
In a routes file if match to `/` or `/login` checks if logged in. If not, loads the login page, otherwise loads the admin page. This work fine, I added another routes to redirect to some other pages. To check if logged in I use a middleware `requir... | 2015/11/28 | [
"https://Stackoverflow.com/questions/33973407",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/760180/"
] | Try switching to 302 redirect... 301 redirects are often cached. | Try with adding extra parameter to you middleware - usually called next.
Basically:
```
next() without parameter invokes the next route handler in framework.
```
Then:
```
if(req.session.loggedIn == undefined)
{
res.set('Access-Control-Allow-Origin', '*');
res.render('pages/login')... |
37,005 | I had some knee injury while doing a one-legged squat a while ago. Now, I can comfortably step up, but stepping down stairs is a big problem.
While stepping down, how should I orient my torso to minimize stress on my knee? Do I bend it forward, or backward?
Forward will increase pressure on knee, but backward will in... | 2018/01/31 | [
"https://fitness.stackexchange.com/questions/37005",
"https://fitness.stackexchange.com",
"https://fitness.stackexchange.com/users/25216/"
] | Stepping down is always known to cause greater stress to the knee joint than stepping up. Since you have had a recent episode where you did the one legged squat, your knee joint may tend to pain for a few more days while stepping down after which the pain is bound to subside. You can try bending a little backwards whil... | TL;DR: Nobody here can answer your question
-------------------------------------------
If you're experiencing enough pain that you struggle with simple tasks like navigating a set of stairs, you should see a physician. At the very least, they will recommend rest and ice (which you should do in the meantime anyway), a... |
61,975 | My Dev team is entertaining the idea of taking on a summer intern or two.
It's clear the benefits the intern gets out of such an engagement, but what benefits would the Dev team hosting the intern for a couple of months benefit?
Does anyone have first hand insight into this? | 2011/03/25 | [
"https://softwareengineering.stackexchange.com/questions/61975",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/6507/"
] | You would have someone to do the tedious "grunt work" of coding, someone to research stuff for you, and someone you could teach your ways to. If they're good, hire them full time and they'll already know your code base and style.
On the other side, you have to take the time to teach them and perhaps to babysit them. A... | **They can bring fresh ideas and perspective**
I feel that bringing an intern into your team for the summer or a placement year is a great opportunity to catch up with some of the new concepts being taught in college (if they're an intern from college) or just getting some fresh perspective from an outsider.
It is an... |
61,975 | My Dev team is entertaining the idea of taking on a summer intern or two.
It's clear the benefits the intern gets out of such an engagement, but what benefits would the Dev team hosting the intern for a couple of months benefit?
Does anyone have first hand insight into this? | 2011/03/25 | [
"https://softwareengineering.stackexchange.com/questions/61975",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/6507/"
] | **They can bring fresh ideas and perspective**
I feel that bringing an intern into your team for the summer or a placement year is a great opportunity to catch up with some of the new concepts being taught in college (if they're an intern from college) or just getting some fresh perspective from an outsider.
It is an... | We constantly hire interns for a couple of reasons:
Their energy level is contagious. That helps on morale and productivity across the company. (And they come up with great company events.)
They come up with suggestions/ideas/etc. that is a product of their youth and being totally immersed in the social media environ... |
61,975 | My Dev team is entertaining the idea of taking on a summer intern or two.
It's clear the benefits the intern gets out of such an engagement, but what benefits would the Dev team hosting the intern for a couple of months benefit?
Does anyone have first hand insight into this? | 2011/03/25 | [
"https://softwareengineering.stackexchange.com/questions/61975",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/6507/"
] | * Grunt Work - you can dump it on them
* Teaching = Learning - in explaining what you are doing to the intern, the dev explaining ends up with a better understanding themselves
* Fresh POV
* Inexpensive training for a potential hire - If you are looking to hire soon, you've got a potential employee that has the basics ... | I believe teaching and sharing others your knowledge makes you generally better in that area (I once gave a cakePHP training, and yes I did learn new things about cake I wouldn't otherwise), so while the benefit probably isn't something close to productivity increase, it might still be worth it to have an intern to gui... |
61,975 | My Dev team is entertaining the idea of taking on a summer intern or two.
It's clear the benefits the intern gets out of such an engagement, but what benefits would the Dev team hosting the intern for a couple of months benefit?
Does anyone have first hand insight into this? | 2011/03/25 | [
"https://softwareengineering.stackexchange.com/questions/61975",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/6507/"
] | Have them do something meaningful that you can leverage for future use.
* Test an upgrade & test to your CMS (and learn how to use it) or some framework you use or are thinking of using.
* Create a workstation image and/or scripts to get a new one build quickly.
* Let them start their own code branch for a low requir... | We constantly hire interns for a couple of reasons:
Their energy level is contagious. That helps on morale and productivity across the company. (And they come up with great company events.)
They come up with suggestions/ideas/etc. that is a product of their youth and being totally immersed in the social media environ... |
61,975 | My Dev team is entertaining the idea of taking on a summer intern or two.
It's clear the benefits the intern gets out of such an engagement, but what benefits would the Dev team hosting the intern for a couple of months benefit?
Does anyone have first hand insight into this? | 2011/03/25 | [
"https://softwareengineering.stackexchange.com/questions/61975",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/6507/"
] | Have them do something meaningful that you can leverage for future use.
* Test an upgrade & test to your CMS (and learn how to use it) or some framework you use or are thinking of using.
* Create a workstation image and/or scripts to get a new one build quickly.
* Let them start their own code branch for a low requir... | **They can bring fresh ideas and perspective**
I feel that bringing an intern into your team for the summer or a placement year is a great opportunity to catch up with some of the new concepts being taught in college (if they're an intern from college) or just getting some fresh perspective from an outsider.
It is an... |
61,975 | My Dev team is entertaining the idea of taking on a summer intern or two.
It's clear the benefits the intern gets out of such an engagement, but what benefits would the Dev team hosting the intern for a couple of months benefit?
Does anyone have first hand insight into this? | 2011/03/25 | [
"https://softwareengineering.stackexchange.com/questions/61975",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/6507/"
] | I believe teaching and sharing others your knowledge makes you generally better in that area (I once gave a cakePHP training, and yes I did learn new things about cake I wouldn't otherwise), so while the benefit probably isn't something close to productivity increase, it might still be worth it to have an intern to gui... | We constantly hire interns for a couple of reasons:
Their energy level is contagious. That helps on morale and productivity across the company. (And they come up with great company events.)
They come up with suggestions/ideas/etc. that is a product of their youth and being totally immersed in the social media environ... |
61,975 | My Dev team is entertaining the idea of taking on a summer intern or two.
It's clear the benefits the intern gets out of such an engagement, but what benefits would the Dev team hosting the intern for a couple of months benefit?
Does anyone have first hand insight into this? | 2011/03/25 | [
"https://softwareengineering.stackexchange.com/questions/61975",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/6507/"
] | You would have someone to do the tedious "grunt work" of coding, someone to research stuff for you, and someone you could teach your ways to. If they're good, hire them full time and they'll already know your code base and style.
On the other side, you have to take the time to teach them and perhaps to babysit them. A... | I'm currently working at one of the national labs and we have a lot of interns and co-op students passing through here (except for the secretaries, everyone on this floor is an engineer, or engineering student). Generally, there are 3 options:
1. You give them a small focused task. Something that needs to be done, th... |
61,975 | My Dev team is entertaining the idea of taking on a summer intern or two.
It's clear the benefits the intern gets out of such an engagement, but what benefits would the Dev team hosting the intern for a couple of months benefit?
Does anyone have first hand insight into this? | 2011/03/25 | [
"https://softwareengineering.stackexchange.com/questions/61975",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/6507/"
] | * Grunt Work - you can dump it on them
* Teaching = Learning - in explaining what you are doing to the intern, the dev explaining ends up with a better understanding themselves
* Fresh POV
* Inexpensive training for a potential hire - If you are looking to hire soon, you've got a potential employee that has the basics ... | We constantly hire interns for a couple of reasons:
Their energy level is contagious. That helps on morale and productivity across the company. (And they come up with great company events.)
They come up with suggestions/ideas/etc. that is a product of their youth and being totally immersed in the social media environ... |
61,975 | My Dev team is entertaining the idea of taking on a summer intern or two.
It's clear the benefits the intern gets out of such an engagement, but what benefits would the Dev team hosting the intern for a couple of months benefit?
Does anyone have first hand insight into this? | 2011/03/25 | [
"https://softwareengineering.stackexchange.com/questions/61975",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/6507/"
] | * Grunt Work - you can dump it on them
* Teaching = Learning - in explaining what you are doing to the intern, the dev explaining ends up with a better understanding themselves
* Fresh POV
* Inexpensive training for a potential hire - If you are looking to hire soon, you've got a potential employee that has the basics ... | You would have someone to do the tedious "grunt work" of coding, someone to research stuff for you, and someone you could teach your ways to. If they're good, hire them full time and they'll already know your code base and style.
On the other side, you have to take the time to teach them and perhaps to babysit them. A... |
61,975 | My Dev team is entertaining the idea of taking on a summer intern or two.
It's clear the benefits the intern gets out of such an engagement, but what benefits would the Dev team hosting the intern for a couple of months benefit?
Does anyone have first hand insight into this? | 2011/03/25 | [
"https://softwareengineering.stackexchange.com/questions/61975",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/6507/"
] | Have them do something meaningful that you can leverage for future use.
* Test an upgrade & test to your CMS (and learn how to use it) or some framework you use or are thinking of using.
* Create a workstation image and/or scripts to get a new one build quickly.
* Let them start their own code branch for a low requir... | I'm currently working at one of the national labs and we have a lot of interns and co-op students passing through here (except for the secretaries, everyone on this floor is an engineer, or engineering student). Generally, there are 3 options:
1. You give them a small focused task. Something that needs to be done, th... |
11,539,532 | I am new to NDK and I am writing a game using a 3D Engine -Ogre. I have something like this in the manifest pointing to my native lib:
```
<activity
android:name="android.app.NativeActivity"
android:screenOrientation="landscape"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
... | 2012/07/18 | [
"https://Stackoverflow.com/questions/11539532",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1374386/"
] | Not sure about the NDK, but if you were using normal Android XML layouts you could have a FrameLayout
```
<FrameLayout>
<YourNdkView/>
<LinearLayout>
<!-- buttons etc -->
</LinearLayout>
</FrameLayout>
``` | Through include tag you can add another view on top of native activity as:
```
<include:layout="@layout/yourxml"/>
```
wherever you want to add view. |
26,095,717 | There is only one version of Ruby installed, and I have run `gem install bundler && bundle install`.
nginx conf
==========
```
passenger_root /root/.gem/ruby/2.1.0/gems/passenger-4.0.52;
passenger_ruby /usr/bin/ruby;
server {
listen 80;
server_name example.com;
root /srv/http/myrailsapp/public;
passen... | 2014/09/29 | [
"https://Stackoverflow.com/questions/26095717",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3255976/"
] | I have been solving similar issue.
My problem was in configuration of `passenger_ruby /usr/bin/ruby;` Which points to the incorrect version. My solution was to set the path to output of command `which ruby`
On the server I use rvm. But there are aslo other instalations of ruby.
At first try to test the environment... | You need to change your `passenger_root` value. Like [here in doc](https://www.phusionpassenger.com/documentation/Users%20guide%20Nginx.html#inserting_passenger_root_for_apt)
For example my nginx config:
```
...
passenger_root /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini;
passenger_ruby /usr/bin/ruby... |
26,095,717 | There is only one version of Ruby installed, and I have run `gem install bundler && bundle install`.
nginx conf
==========
```
passenger_root /root/.gem/ruby/2.1.0/gems/passenger-4.0.52;
passenger_ruby /usr/bin/ruby;
server {
listen 80;
server_name example.com;
root /srv/http/myrailsapp/public;
passen... | 2014/09/29 | [
"https://Stackoverflow.com/questions/26095717",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3255976/"
] | You need to change your `passenger_root` value. Like [here in doc](https://www.phusionpassenger.com/documentation/Users%20guide%20Nginx.html#inserting_passenger_root_for_apt)
For example my nginx config:
```
...
passenger_root /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini;
passenger_ruby /usr/bin/ruby... | The phusion passenger could not find the ruby path, see if the ruby path is correct, or if the symbolic link was removed in the server update or other reason.
CentOS 7
Ruby 2.6.3
Rbenv
```
which ruby
# ~/.rbenv/shims/ruby
sudo rm /usr/bin/ruby # old ruby
sudo ln -s ~/.rbenv/shims/ruby /usr/bin/ruby # 2.6.3
/usr/bin/... |
26,095,717 | There is only one version of Ruby installed, and I have run `gem install bundler && bundle install`.
nginx conf
==========
```
passenger_root /root/.gem/ruby/2.1.0/gems/passenger-4.0.52;
passenger_ruby /usr/bin/ruby;
server {
listen 80;
server_name example.com;
root /srv/http/myrailsapp/public;
passen... | 2014/09/29 | [
"https://Stackoverflow.com/questions/26095717",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3255976/"
] | I have been solving similar issue.
My problem was in configuration of `passenger_ruby /usr/bin/ruby;` Which points to the incorrect version. My solution was to set the path to output of command `which ruby`
On the server I use rvm. But there are aslo other instalations of ruby.
At first try to test the environment... | The phusion passenger could not find the ruby path, see if the ruby path is correct, or if the symbolic link was removed in the server update or other reason.
CentOS 7
Ruby 2.6.3
Rbenv
```
which ruby
# ~/.rbenv/shims/ruby
sudo rm /usr/bin/ruby # old ruby
sudo ln -s ~/.rbenv/shims/ruby /usr/bin/ruby # 2.6.3
/usr/bin/... |
5,390,564 | I have a "vertical" image gallery of this sort:
```
<div class="image-container>
<div class="nav">
<div class="next"><a href="info"><img src="arrow_trans.png" alt="Next" /></a>
</div>
<div id="vert-gallery">
<div id="first-row" class="link-image"><img src="Image_1.png" /></div>
... | 2011/03/22 | [
"https://Stackoverflow.com/questions/5390564",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/273875/"
] | A big **YES**.
I have seen both FireFox and Safari acting differently between Win, Mac and Linux systems.
Specially around places with significant JS and *advanced* CSS implementations.
I personally have not seen differences in IE within different Windows versions. | I don't think that different version of the same OS influence the page rendering of a given browser.
On the other hand, it would be wise to test the same browser on different OS' as some page elements are OS dependent. Take form inputs and controls for instance. Also Fonts are rendered different based on the OS. |
5,390,564 | I have a "vertical" image gallery of this sort:
```
<div class="image-container>
<div class="nav">
<div class="next"><a href="info"><img src="arrow_trans.png" alt="Next" /></a>
</div>
<div id="vert-gallery">
<div id="first-row" class="link-image"><img src="Image_1.png" /></div>
... | 2011/03/22 | [
"https://Stackoverflow.com/questions/5390564",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/273875/"
] | A big **YES**.
I have seen both FireFox and Safari acting differently between Win, Mac and Linux systems.
Specially around places with significant JS and *advanced* CSS implementations.
I personally have not seen differences in IE within different Windows versions. | Short answer: **Yes**, especially if there's a lot of Javascript on your page.
Long answer. In my experience, testing web application on the same browser in different versions of Windows did not reveal any significant bugs, specific to an operating system. However it is very fruitful to test your app on Windows and no... |
2,858,204 | It looks not that complicated but I'm stuck in the middle.
$\mathbf{x}=[x\_1,x\_2, \cdots ,x\_n]$.
1. $g(\mathbf{x})=\exp(-\mathbf{x})$ is a decreasing, and convex function.
2. $h(\mathbf{x})=x\_1+x\_2+x\_3+\dotsm\;$ is a linear, increasing function, convex/concave.
So, $g(h(\mathbf{x}))$ is a convex function.
Am I... | 2018/07/21 | [
"https://math.stackexchange.com/questions/2858204",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/332807/"
] | In my numerical linear algebra class my professor stated that 70% of problems can be summarized as the $Ax=b$ problem and the eigenvalue problem. The rest of the problems are slight variations of these problems.
There are a lot of applications. My advisor worked on stabilizing a method for solving hyperbolic PDEs and ... | Linear Systems, Manifold Systems or systems that are almost linear. Hence, you are speaking about systems in which the configuration space is either a hypersurface i.e $\mathbb{R}^N$ for some $N$ or a manifold $M^N$ where $N$ denotes the dimension. Lastly, by almost linear this means you don't have to be a manifold but... |
2,858,204 | It looks not that complicated but I'm stuck in the middle.
$\mathbf{x}=[x\_1,x\_2, \cdots ,x\_n]$.
1. $g(\mathbf{x})=\exp(-\mathbf{x})$ is a decreasing, and convex function.
2. $h(\mathbf{x})=x\_1+x\_2+x\_3+\dotsm\;$ is a linear, increasing function, convex/concave.
So, $g(h(\mathbf{x}))$ is a convex function.
Am I... | 2018/07/21 | [
"https://math.stackexchange.com/questions/2858204",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/332807/"
] | In my numerical linear algebra class my professor stated that 70% of problems can be summarized as the $Ax=b$ problem and the eigenvalue problem. The rest of the problems are slight variations of these problems.
There are a lot of applications. My advisor worked on stabilizing a method for solving hyperbolic PDEs and ... | My favorite application of linear algebra is in computer graphics. Using eigenvalue decomposition allows for quick computation of large powers of matrices.
In computer graphics, things like 3D models and plants are modeled using triangles all stuck together, and then they're smoothed out using a process involving tak... |
2,858,204 | It looks not that complicated but I'm stuck in the middle.
$\mathbf{x}=[x\_1,x\_2, \cdots ,x\_n]$.
1. $g(\mathbf{x})=\exp(-\mathbf{x})$ is a decreasing, and convex function.
2. $h(\mathbf{x})=x\_1+x\_2+x\_3+\dotsm\;$ is a linear, increasing function, convex/concave.
So, $g(h(\mathbf{x}))$ is a convex function.
Am I... | 2018/07/21 | [
"https://math.stackexchange.com/questions/2858204",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/332807/"
] | In my numerical linear algebra class my professor stated that 70% of problems can be summarized as the $Ax=b$ problem and the eigenvalue problem. The rest of the problems are slight variations of these problems.
There are a lot of applications. My advisor worked on stabilizing a method for solving hyperbolic PDEs and ... | There was a comment years ago to the effect of "Why do we study linear algebra? Because linear algebra is easy and many problems can be reduced to it." Solutions to homogeneous differential equations form a vector space as do solutions to homogeneous recurrence relations. Coupled differential equations become much simp... |
91,545 | What word (or how do you phrase things) do you use when the ostensible word for the class is the same as the word for a subset of the class?
For example, in the United States, there are many brands of sugared, carbonated soft drink that one can buy: Coca-Cola (or Coke), Pepsi, RC Cola, Sprite, 7-Up, A&W or Mug Root Be... | 2012/11/17 | [
"https://english.stackexchange.com/questions/91545",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/4972/"
] | To answer your second question, I think many brand names suffer from this problem especially when commoditization occurs. For example, "No that's a tissue paper; I would like a Kleenex specifically." Is not something you're going to hear a lot, but it's still possible.
Other examples include: Asprin, Jello, Band-Aid.... | There are instances of nouns being modified, and through the modification no longer properly belonging to the original class.
For example, dwarf planets are not strictly planets; turkey bacon is not strictly bacon; and herbal tea is not strictly tea.
(This phenomenon, though similar, is not quite the same; does it de... |
91,545 | What word (or how do you phrase things) do you use when the ostensible word for the class is the same as the word for a subset of the class?
For example, in the United States, there are many brands of sugared, carbonated soft drink that one can buy: Coca-Cola (or Coke), Pepsi, RC Cola, Sprite, 7-Up, A&W or Mug Root Be... | 2012/11/17 | [
"https://english.stackexchange.com/questions/91545",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/4972/"
] | According to "The Dictionary of Linguistics and Phonetics", these are *autohyponyms*. [The example they use](http://books.google.co.uk/books?id=3ZPQVuSgDAkC&pg=PT217) says:
>
> ...for example, a *cow* contrasts with a *horse* at one level, but at a lower level it contrasts with *bull* (in effect, 'a cow is a kind of ... | To answer your second question, I think many brand names suffer from this problem especially when commoditization occurs. For example, "No that's a tissue paper; I would like a Kleenex specifically." Is not something you're going to hear a lot, but it's still possible.
Other examples include: Asprin, Jello, Band-Aid.... |
91,545 | What word (or how do you phrase things) do you use when the ostensible word for the class is the same as the word for a subset of the class?
For example, in the United States, there are many brands of sugared, carbonated soft drink that one can buy: Coca-Cola (or Coke), Pepsi, RC Cola, Sprite, 7-Up, A&W or Mug Root Be... | 2012/11/17 | [
"https://english.stackexchange.com/questions/91545",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/4972/"
] | A famous example of *hypernymy intersecting with polysemy* involves the word *animal*. If one accepts dictionary definitions as being authoritative rather than insisting on a purely scientific register, using the first two definitions (in reverse order) given in 'Collins English Dictionary – Complete and Unabridged 200... | There are instances of nouns being modified, and through the modification no longer properly belonging to the original class.
For example, dwarf planets are not strictly planets; turkey bacon is not strictly bacon; and herbal tea is not strictly tea.
(This phenomenon, though similar, is not quite the same; does it de... |
91,545 | What word (or how do you phrase things) do you use when the ostensible word for the class is the same as the word for a subset of the class?
For example, in the United States, there are many brands of sugared, carbonated soft drink that one can buy: Coca-Cola (or Coke), Pepsi, RC Cola, Sprite, 7-Up, A&W or Mug Root Be... | 2012/11/17 | [
"https://english.stackexchange.com/questions/91545",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/4972/"
] | >
> *Are there any other examples of a hypernym being the same as the hyponym, creating a disambiguation problem?*
>
>
>
The word ***man*** is a good example, where *man* can refer to either the entire human population, or else to roughly half of it, sometimes leading to charges of language insensitivity, when the... | There are instances of nouns being modified, and through the modification no longer properly belonging to the original class.
For example, dwarf planets are not strictly planets; turkey bacon is not strictly bacon; and herbal tea is not strictly tea.
(This phenomenon, though similar, is not quite the same; does it de... |
91,545 | What word (or how do you phrase things) do you use when the ostensible word for the class is the same as the word for a subset of the class?
For example, in the United States, there are many brands of sugared, carbonated soft drink that one can buy: Coca-Cola (or Coke), Pepsi, RC Cola, Sprite, 7-Up, A&W or Mug Root Be... | 2012/11/17 | [
"https://english.stackexchange.com/questions/91545",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/4972/"
] | A famous example of *hypernymy intersecting with polysemy* involves the word *animal*. If one accepts dictionary definitions as being authoritative rather than insisting on a purely scientific register, using the first two definitions (in reverse order) given in 'Collins English Dictionary – Complete and Unabridged 200... | To answer your second question, I think many brand names suffer from this problem especially when commoditization occurs. For example, "No that's a tissue paper; I would like a Kleenex specifically." Is not something you're going to hear a lot, but it's still possible.
Other examples include: Asprin, Jello, Band-Aid.... |
91,545 | What word (or how do you phrase things) do you use when the ostensible word for the class is the same as the word for a subset of the class?
For example, in the United States, there are many brands of sugared, carbonated soft drink that one can buy: Coca-Cola (or Coke), Pepsi, RC Cola, Sprite, 7-Up, A&W or Mug Root Be... | 2012/11/17 | [
"https://english.stackexchange.com/questions/91545",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/4972/"
] | A famous example of *hypernymy intersecting with polysemy* involves the word *animal*. If one accepts dictionary definitions as being authoritative rather than insisting on a purely scientific register, using the first two definitions (in reverse order) given in 'Collins English Dictionary – Complete and Unabridged 200... | >
> *Are there any other examples of a hypernym being the same as the hyponym, creating a disambiguation problem?*
>
>
>
The word ***man*** is a good example, where *man* can refer to either the entire human population, or else to roughly half of it, sometimes leading to charges of language insensitivity, when the... |
91,545 | What word (or how do you phrase things) do you use when the ostensible word for the class is the same as the word for a subset of the class?
For example, in the United States, there are many brands of sugared, carbonated soft drink that one can buy: Coca-Cola (or Coke), Pepsi, RC Cola, Sprite, 7-Up, A&W or Mug Root Be... | 2012/11/17 | [
"https://english.stackexchange.com/questions/91545",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/4972/"
] | A famous example of *hypernymy intersecting with polysemy* involves the word *animal*. If one accepts dictionary definitions as being authoritative rather than insisting on a purely scientific register, using the first two definitions (in reverse order) given in 'Collins English Dictionary – Complete and Unabridged 200... | PC is another example: "personal computer" includes Macintosh computers (Macs) and IBM-compatible computers (PCs). |
91,545 | What word (or how do you phrase things) do you use when the ostensible word for the class is the same as the word for a subset of the class?
For example, in the United States, there are many brands of sugared, carbonated soft drink that one can buy: Coca-Cola (or Coke), Pepsi, RC Cola, Sprite, 7-Up, A&W or Mug Root Be... | 2012/11/17 | [
"https://english.stackexchange.com/questions/91545",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/4972/"
] | According to "The Dictionary of Linguistics and Phonetics", these are *autohyponyms*. [The example they use](http://books.google.co.uk/books?id=3ZPQVuSgDAkC&pg=PT217) says:
>
> ...for example, a *cow* contrasts with a *horse* at one level, but at a lower level it contrasts with *bull* (in effect, 'a cow is a kind of ... | PC is another example: "personal computer" includes Macintosh computers (Macs) and IBM-compatible computers (PCs). |
91,545 | What word (or how do you phrase things) do you use when the ostensible word for the class is the same as the word for a subset of the class?
For example, in the United States, there are many brands of sugared, carbonated soft drink that one can buy: Coca-Cola (or Coke), Pepsi, RC Cola, Sprite, 7-Up, A&W or Mug Root Be... | 2012/11/17 | [
"https://english.stackexchange.com/questions/91545",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/4972/"
] | PC is another example: "personal computer" includes Macintosh computers (Macs) and IBM-compatible computers (PCs). | There are instances of nouns being modified, and through the modification no longer properly belonging to the original class.
For example, dwarf planets are not strictly planets; turkey bacon is not strictly bacon; and herbal tea is not strictly tea.
(This phenomenon, though similar, is not quite the same; does it de... |
91,545 | What word (or how do you phrase things) do you use when the ostensible word for the class is the same as the word for a subset of the class?
For example, in the United States, there are many brands of sugared, carbonated soft drink that one can buy: Coca-Cola (or Coke), Pepsi, RC Cola, Sprite, 7-Up, A&W or Mug Root Be... | 2012/11/17 | [
"https://english.stackexchange.com/questions/91545",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/4972/"
] | According to "The Dictionary of Linguistics and Phonetics", these are *autohyponyms*. [The example they use](http://books.google.co.uk/books?id=3ZPQVuSgDAkC&pg=PT217) says:
>
> ...for example, a *cow* contrasts with a *horse* at one level, but at a lower level it contrasts with *bull* (in effect, 'a cow is a kind of ... | >
> *Are there any other examples of a hypernym being the same as the hyponym, creating a disambiguation problem?*
>
>
>
The word ***man*** is a good example, where *man* can refer to either the entire human population, or else to roughly half of it, sometimes leading to charges of language insensitivity, when the... |
70,400,869 | So, I have some problem. I have a search bar to search for a product, and can also redirect to another page if I type a word is match with `pageKeywords` array value. So in 1 searchbar there can be 2 triggers.
The first is when I click on search keywords and when it matches it will lead to another page:
```
$('#submi... | 2021/12/18 | [
"https://Stackoverflow.com/questions/70400869",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16810968/"
] | If I understood your question correctly, you basically want to take different actions based on whether the search term matched something in your `pageKeywords` object.
You don't need to create two listeners for that. Just listen to the form submit event which is triggered on enter press as well. Then you can match the... | You're overwriting one function call with another - JavaScript doesn't support function overloading. Combine their logic into a common function:
```js
$('#submitForm').on("click",function(e) {
if (pageKeywords($("#searchKeywords").val(), e) !== false) {
console.log("another function submit");
$('#fform').sub... |
12,879,376 | When '/a' is called, '/b' can be executed immediately. But If I invokes another '/a', the second one waits for the first one ending. How can I make '/a' really async called?
code:
```
app.get '/a', (req, res, next) ->
f = ->
res.send 'a'
console.log 'end', new Date()
console.log 'sleep', new Date()
set... | 2012/10/14 | [
"https://Stackoverflow.com/questions/12879376",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1120405/"
] | I got the reason, it is because I ran two '/a' on the same browser. I just tried to run one in chromium, and the other one in firefox, they were handled asyncly. Looks interesting. | I'm not sure what you're seeing. When I run the test, I get the expected results - the requests to `\a` are handled asynchronously. If you try the following code and execute it with `DEBUG=* node app.js` do you get the same results that I do?
```
var express = require('express'),
app = express();
app.get('/a', fu... |
12,879,376 | When '/a' is called, '/b' can be executed immediately. But If I invokes another '/a', the second one waits for the first one ending. How can I make '/a' really async called?
code:
```
app.get '/a', (req, res, next) ->
f = ->
res.send 'a'
console.log 'end', new Date()
console.log 'sleep', new Date()
set... | 2012/10/14 | [
"https://Stackoverflow.com/questions/12879376",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1120405/"
] | I got the reason, it is because I ran two '/a' on the same browser. I just tried to run one in chromium, and the other one in firefox, they were handled asyncly. Looks interesting. | Bill, I got different result with your code. I ran these via browser. I am using Express 3 on Linux with only one core.
```
express:application booting in development mode +0ms
connect:dispatcher use / query +0ms
connect:dispatcher use / expressInit +0ms
connect:dispatcher use / router +2ms
express:router de... |
16,540,307 | How I can convert any object (eg array) in json and get in the format string?
For example:
```
public String jsonEncode(Object obj) {
return jsonString;
}
``` | 2013/05/14 | [
"https://Stackoverflow.com/questions/16540307",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1051622/"
] | You can use [GSON](http://code.google.com/p/google-gson/) library to convert any serializable objects into json String.
Here is the Tutorial [how-do-convert-java-object-to-from-json-format-gson-api/](http://www.mkyong.com/java/how-do-convert-java-object-to-from-json-format-gson-api/) | If you're asking how to do generic object serialization into json format in java, use reflection. Luckily, lots of the work is done for you, for example [this](http://code.google.com/p/jsonbeans) or [this](https://code.google.com/p/google-gson/).
If you want to go the other way, or specificially you want more control ... |
16,540,307 | How I can convert any object (eg array) in json and get in the format string?
For example:
```
public String jsonEncode(Object obj) {
return jsonString;
}
``` | 2013/05/14 | [
"https://Stackoverflow.com/questions/16540307",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1051622/"
] | You can use [GSON](http://code.google.com/p/google-gson/) library to convert any serializable objects into json String.
Here is the Tutorial [how-do-convert-java-object-to-from-json-format-gson-api/](http://www.mkyong.com/java/how-do-convert-java-object-to-from-json-format-gson-api/) | For example:
```
Hashtable<String, String> capitales = new Hashtable<String, String>();
capitales.put("España", "Madrid");
capitales.put("Francia", "Paris");
String miStringArray[] = { "String1", "String2" };
```
And I do:
```
SONObject obj = new JSONObject();
try {
obj.put("name... |
48,209,727 | How to write xpath for AngularJs applications using selenium webdriver java | 2018/01/11 | [
"https://Stackoverflow.com/questions/48209727",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9204475/"
] | You should modify the data from `.map()`
Here is the logic how you can achieve that will current given code :
```
.subscribe(res => {
this.allData = res.map(e => {
e['is_leader'] = true; // as per your rule;
return e;
});
});
``` | With `HttpClient` which came with Angular 4.3+, you could use interceptors (`HttpIntercept`) to intercept, filter and/or modify you incoming JSON feed. A bit of googling shows how to setup interceptors and use them like [here](https://alligator.io/angular/httpclient-interceptors/) for example. |
38,462,368 | I ran into an issue and I'm not sure if I'm missing something or if it's just really clunky in C#.
I have a 2D-array (`Foo[,]`) and what I want to do is to map it to a `Bar[,]`, using nothing but a `Func<Foo, Bar>`. Basically, what I want is a functor instance for `T[,]` for any given `T`.
The "obvious" way is of cou... | 2016/07/19 | [
"https://Stackoverflow.com/questions/38462368",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2622234/"
] | Always Encrypted requires that the user that is accessing the database to have both the public and private key, which is what it appears to require you to use the account to generate the certificate as they will have this key.
What I usually do is generate the certificate and export the cert with a private key and sec... | **Running on IIS Express is different from running on IIS.**
when we create Column Master Key (CMK) from SSMS at that time it generates Always Encrypted Certificate based on which location we have set while creating CEK.
For IIS, you have to generate certificate under MyLocalMachine, and then install certificate on h... |
38,462,368 | I ran into an issue and I'm not sure if I'm missing something or if it's just really clunky in C#.
I have a 2D-array (`Foo[,]`) and what I want to do is to map it to a `Bar[,]`, using nothing but a `Func<Foo, Bar>`. Basically, what I want is a functor instance for `T[,]` for any given `T`.
The "obvious" way is of cou... | 2016/07/19 | [
"https://Stackoverflow.com/questions/38462368",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2622234/"
] | IIS can't recognize the certificate from local user, while creating the certificate in SQL server, by default it's putting in to the local user store, do the following things and make sure the certificate generated under local machine -> current user certificate store
1. Generate the encrypted columns with default cer... | **Running on IIS Express is different from running on IIS.**
when we create Column Master Key (CMK) from SSMS at that time it generates Always Encrypted Certificate based on which location we have set while creating CEK.
For IIS, you have to generate certificate under MyLocalMachine, and then install certificate on h... |
43,336,636 | If i have `478523698` as an integer number, how to find 2nd lowest number only with if conditions wihout converting it to string, this question was asked in interview. I got the output by converting Integer to array like this
`
```
int integer=478523698;
//converting integer to array
string s,numbers ... | 2017/04/11 | [
"https://Stackoverflow.com/questions/43336636",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4795068/"
] | I think you can do this without converting to string, and with a simple loop and conditions like the following:
```
int inputInteger = 478523698;
int numberSample = inputInteger;
int lowest = int.MaxValue, secondlowest = int.MaxValue;
while (numberSample != 0)
{
int digit = numberSample % 10;
numberSample = nu... | I'm sure this can be simplified but it works...
```
class Program
{
static void Main(string[] args)
{
var number = 478523698;
var numberList = new List<int>();
for (var i = 1; i <= number; i *= 10)
{
var currentNumber = number / i % 10;
numberL... |
22,994,680 | I am not sure how to do this, but I believe it can be done with JavaScript, or PHP. Is there anyway I can make an input that only allows 2 decimal places to be entered? Essentially, I would like the input to stop entering numbers after two decimal places, rather than give an error if five have been entered.
I am not ... | 2014/04/10 | [
"https://Stackoverflow.com/questions/22994680",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2888761/"
] | Place `ContextMenu` style under `<ContextMenu.Style>` tags:
```
<ContextMenu Name="cm" ItemsSource="{Binding DemoInstance.ContextMenuItems}"
ItemContainerStyle="{StaticResource demo2Style}" >
<ContextMenu.Style>
<Style TargetType="{x:Type ContextMenu}">
<Style.Triggers>
<Trigge... | The problem is with your XAML. You added a `Style` as a child of the `ContextMenu`, and also binded it's `ItemsSource` property. (Setting both is not possible see [here](https://stackoverflow.com/questions/18147707/items-collection-must-be-empty-before-using-itemssource-with-checkbox-control-in) for more info.)
But fr... |
17,800,887 | I'm having some trouble with my recursive program to calculate the number of integer partitions of an integer.
Here's what I have written:
```
def p(k, n):
if k > n:
return 0
if k == 1:
return 1
else:
return (p(k+1, n) + p(k, n-k))
def partitions(n):
ans = 1
for k in range... | 2013/07/23 | [
"https://Stackoverflow.com/questions/17800887",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | This will give you the exact output you need.
```
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.GregorianCalendar;
public class GregorianCalendar {
public static void main(String[] args){
GregorianCalendar evansBirthday = new GregorianCalendar(1986,Calendar.NOVEMBER, 25);
... | Try something like:
```
GregorianCalendar evansBirthday = new GregorianCalendar(1986,Calendar.November, 25);
System.out.println(evansBirthday);
evansBirthday.add(1000000000000); // A billion seconds
System.out.println(evansBirthday);
``` |
17,800,887 | I'm having some trouble with my recursive program to calculate the number of integer partitions of an integer.
Here's what I have written:
```
def p(k, n):
if k > n:
return 0
if k == 1:
return 1
else:
return (p(k+1, n) + p(k, n-k))
def partitions(n):
ans = 1
for k in range... | 2013/07/23 | [
"https://Stackoverflow.com/questions/17800887",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | This will give you the exact output you need.
```
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.GregorianCalendar;
public class GregorianCalendar {
public static void main(String[] args){
GregorianCalendar evansBirthday = new GregorianCalendar(1986,Calendar.NOVEMBER, 25);
... | I think you should copy and past the errors....
But for starters...
1. Calendar.November change to `Calendar.NOBEMBER`
2. You can not print `System.out.println(evansBirthday)` this will print some long GregorianCalendar java cod. so you must convert it to Date object in the java.util.Calendar.
so add this, this will... |
244,174 | So far I found [this closed question](https://magento.stackexchange.com/questions/105639/how-to-use-load-data-infile-mysql-syntax-in-magento) and solutions for Magento 2, but I'm hoping there's a solution for Magento 1 as well. This question should not be closed like the other one because it IS specific to Magento 1.
... | 2018/09/27 | [
"https://magento.stackexchange.com/questions/244174",
"https://magento.stackexchange.com",
"https://magento.stackexchange.com/users/71505/"
] | You can try this options to solve your problem.
Open the DB connection settings in the local.xml file and add this:
```
<driver_options>
<MYSQL_ATTR_LOCAL_INFILE>true</MYSQL_ATTR_LOCAL_INFILE>
</driver_options>
```
If it doesn't work you can download the script [here](https://github.com/kschroeder/Magento_... | There is no easy way to query `LOAD DATA LOCAL INFILE` in Magento 1. First, `PDO::MYSQL_ATTR_LOCAL_INFILE` is an integer, and we cannot add an int node name in the config XML. After digging through how `$this->_getWriteAdapter()` is created in the resource model and especially `Mage_Core_Model_Resource::_newConnection(... |
11,858,204 | HttpURLConnection.getInputStream() gives UnknownLengthHttpInputStream and due to this Document parsing throws SAX parser exception.
Following is the code
```
try{
URL url = new URL(uri);
HttpURLConnection connection =
(HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
... | 2012/08/08 | [
"https://Stackoverflow.com/questions/11858204",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/467615/"
] | Have you tried to use the apache libraries for this? I would suggest the following:
```
try {
HttpClient client = new DefaultHttpClient();
String getURL = "http://www.google.com";
HttpGet get = new HttpGet(getURL);
HttpResponse responseGet = client.execute(get);
HttpEntity r... | You will need to close the output stream properly within the service to avoid this exception.
If you are using a third party library then make sure that you have set the response header
```
Content-Type
Content-Length
```
If you are using a java service you can get the content-length from method
```
File.length()
... |
11,858,204 | HttpURLConnection.getInputStream() gives UnknownLengthHttpInputStream and due to this Document parsing throws SAX parser exception.
Following is the code
```
try{
URL url = new URL(uri);
HttpURLConnection connection =
(HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
... | 2012/08/08 | [
"https://Stackoverflow.com/questions/11858204",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/467615/"
] | To handle response use this method it will take care of all !!
```
public static ResponseHandler<String> getResponseHandlerInstance(final Handler handler) {
final ResponseHandler<String> responseHandler = new ResponseHandler<String>() {
public String handleResponse(final HttpResponse response) {
... | You will need to close the output stream properly within the service to avoid this exception.
If you are using a third party library then make sure that you have set the response header
```
Content-Type
Content-Length
```
If you are using a java service you can get the content-length from method
```
File.length()
... |
11,858,204 | HttpURLConnection.getInputStream() gives UnknownLengthHttpInputStream and due to this Document parsing throws SAX parser exception.
Following is the code
```
try{
URL url = new URL(uri);
HttpURLConnection connection =
(HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
... | 2012/08/08 | [
"https://Stackoverflow.com/questions/11858204",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/467615/"
] | Here the problem comes when *SAX parser* could not get the length of `InputStream` data. To fix this problem, save the contents read from the `xml` (`InputStream`) in to a *String* variable and make an `InputStream` from the variable for `parse` method of `DocumentBuilder`. To do this modify your code as follows :
```... | You will need to close the output stream properly within the service to avoid this exception.
If you are using a third party library then make sure that you have set the response header
```
Content-Type
Content-Length
```
If you are using a java service you can get the content-length from method
```
File.length()
... |
11,858,204 | HttpURLConnection.getInputStream() gives UnknownLengthHttpInputStream and due to this Document parsing throws SAX parser exception.
Following is the code
```
try{
URL url = new URL(uri);
HttpURLConnection connection =
(HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
... | 2012/08/08 | [
"https://Stackoverflow.com/questions/11858204",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/467615/"
] | Once try it like this
```
if(connection.getResponseCode() ==HttpURLConnection.HTTP_OK){
InputStream xml = connection.getInputStream();
..........
}else{
//problem in URI/connection .....
}
``` | You will need to close the output stream properly within the service to avoid this exception.
If you are using a third party library then make sure that you have set the response header
```
Content-Type
Content-Length
```
If you are using a java service you can get the content-length from method
```
File.length()
... |
11,858,204 | HttpURLConnection.getInputStream() gives UnknownLengthHttpInputStream and due to this Document parsing throws SAX parser exception.
Following is the code
```
try{
URL url = new URL(uri);
HttpURLConnection connection =
(HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
... | 2012/08/08 | [
"https://Stackoverflow.com/questions/11858204",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/467615/"
] | Its probably a Http 1.0 (old server or misconfiguration) server or no keep alive configured. In this case the length of the stream is known at the time the connection is closed from the server. Try specifying http1.1 and keep-alive in your request header (some googling will help on that). Only if the content length att... | You will need to close the output stream properly within the service to avoid this exception.
If you are using a third party library then make sure that you have set the response header
```
Content-Type
Content-Length
```
If you are using a java service you can get the content-length from method
```
File.length()
... |
11,858,204 | HttpURLConnection.getInputStream() gives UnknownLengthHttpInputStream and due to this Document parsing throws SAX parser exception.
Following is the code
```
try{
URL url = new URL(uri);
HttpURLConnection connection =
(HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
... | 2012/08/08 | [
"https://Stackoverflow.com/questions/11858204",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/467615/"
] | Its probably a Http 1.0 (old server or misconfiguration) server or no keep alive configured. In this case the length of the stream is known at the time the connection is closed from the server. Try specifying http1.1 and keep-alive in your request header (some googling will help on that). Only if the content length att... | Have you tried to use the apache libraries for this? I would suggest the following:
```
try {
HttpClient client = new DefaultHttpClient();
String getURL = "http://www.google.com";
HttpGet get = new HttpGet(getURL);
HttpResponse responseGet = client.execute(get);
HttpEntity r... |
11,858,204 | HttpURLConnection.getInputStream() gives UnknownLengthHttpInputStream and due to this Document parsing throws SAX parser exception.
Following is the code
```
try{
URL url = new URL(uri);
HttpURLConnection connection =
(HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
... | 2012/08/08 | [
"https://Stackoverflow.com/questions/11858204",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/467615/"
] | Its probably a Http 1.0 (old server or misconfiguration) server or no keep alive configured. In this case the length of the stream is known at the time the connection is closed from the server. Try specifying http1.1 and keep-alive in your request header (some googling will help on that). Only if the content length att... | To handle response use this method it will take care of all !!
```
public static ResponseHandler<String> getResponseHandlerInstance(final Handler handler) {
final ResponseHandler<String> responseHandler = new ResponseHandler<String>() {
public String handleResponse(final HttpResponse response) {
... |
11,858,204 | HttpURLConnection.getInputStream() gives UnknownLengthHttpInputStream and due to this Document parsing throws SAX parser exception.
Following is the code
```
try{
URL url = new URL(uri);
HttpURLConnection connection =
(HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
... | 2012/08/08 | [
"https://Stackoverflow.com/questions/11858204",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/467615/"
] | Its probably a Http 1.0 (old server or misconfiguration) server or no keep alive configured. In this case the length of the stream is known at the time the connection is closed from the server. Try specifying http1.1 and keep-alive in your request header (some googling will help on that). Only if the content length att... | Here the problem comes when *SAX parser* could not get the length of `InputStream` data. To fix this problem, save the contents read from the `xml` (`InputStream`) in to a *String* variable and make an `InputStream` from the variable for `parse` method of `DocumentBuilder`. To do this modify your code as follows :
```... |
11,858,204 | HttpURLConnection.getInputStream() gives UnknownLengthHttpInputStream and due to this Document parsing throws SAX parser exception.
Following is the code
```
try{
URL url = new URL(uri);
HttpURLConnection connection =
(HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
... | 2012/08/08 | [
"https://Stackoverflow.com/questions/11858204",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/467615/"
] | Its probably a Http 1.0 (old server or misconfiguration) server or no keep alive configured. In this case the length of the stream is known at the time the connection is closed from the server. Try specifying http1.1 and keep-alive in your request header (some googling will help on that). Only if the content length att... | Once try it like this
```
if(connection.getResponseCode() ==HttpURLConnection.HTTP_OK){
InputStream xml = connection.getInputStream();
..........
}else{
//problem in URI/connection .....
}
``` |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.