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 |
|---|---|---|---|---|---|
18,932,188 | I am using **net.sf.json.JSONObject**. It will remove `**key**` if my value is **null** while I am trying to put data in Json object using [put](http://json-lib.sourceforge.net/apidocs/jdk15/net/sf/json/JSONObject.html#put%28java.lang.Object,%20java.lang.Object%29) method.
Is there any way to keep my **key** as it is... | 2013/09/21 | [
"https://Stackoverflow.com/questions/18932188",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1326692/"
] | ```
json.put("myKeyu",JSONObject.NULL);
```
More details [here](http://www.json.org/javadoc/org/json/JSONObject.html#put%28java.lang.String,%20java.lang.Object%29). | `JSONObject.NULL` is for Apache Commons JSONObject.
Try the following instead:
```java
json.put("key", JSONNull.getInstance())
```
Here follows the documentation for `net.sf.json.JSONObject`:
<http://json-lib.sourceforge.net/apidocs/index.html>
Search for `JSONNull` to find out more. |
18,932,188 | I am using **net.sf.json.JSONObject**. It will remove `**key**` if my value is **null** while I am trying to put data in Json object using [put](http://json-lib.sourceforge.net/apidocs/jdk15/net/sf/json/JSONObject.html#put%28java.lang.Object,%20java.lang.Object%29) method.
Is there any way to keep my **key** as it is... | 2013/09/21 | [
"https://Stackoverflow.com/questions/18932188",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1326692/"
] | ```
json.put("myKeyu",JSONObject.NULL);
```
More details [here](http://www.json.org/javadoc/org/json/JSONObject.html#put%28java.lang.String,%20java.lang.Object%29). | ```
JSONObject backJsonObject = new JSONObject();
backJsonObject.put("111", "NULL");
backJsonObject.put("111", "null"); how to output {"111":"null"} instead of {"111":null} in net.sf.json
``` |
18,932,188 | I am using **net.sf.json.JSONObject**. It will remove `**key**` if my value is **null** while I am trying to put data in Json object using [put](http://json-lib.sourceforge.net/apidocs/jdk15/net/sf/json/JSONObject.html#put%28java.lang.Object,%20java.lang.Object%29) method.
Is there any way to keep my **key** as it is... | 2013/09/21 | [
"https://Stackoverflow.com/questions/18932188",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1326692/"
] | `JSONObject.NULL` is for Apache Commons JSONObject.
Try the following instead:
```java
json.put("key", JSONNull.getInstance())
```
Here follows the documentation for `net.sf.json.JSONObject`:
<http://json-lib.sourceforge.net/apidocs/index.html>
Search for `JSONNull` to find out more. | ```
JSONObject backJsonObject = new JSONObject();
backJsonObject.put("111", "NULL");
backJsonObject.put("111", "null"); how to output {"111":"null"} instead of {"111":null} in net.sf.json
``` |
10,171,319 | I would like to do a pattern match that looks like :
```
sinceOp match {
case None |Some(lastUpdate) if lastUpdate<= update.time =>
```
Saddly this does not work. Any ideas ?
Thanks | 2012/04/16 | [
"https://Stackoverflow.com/questions/10171319",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/318919/"
] | You could can also test the reverse condition:
```
sinceOp match {
case Some(lastUpdate) if lastUpdate > update.time => //...
case _ => //...
}
```
The second case covers both `None` and the case where the last update is smaller. | Or you can replace pattern matching with chain of functions
```
sinceOp.filterNot(_ <= update.time).getOrElse(println("if None"))
``` |
59,327,164 | I am creating a doodle page with an "X" as the close/dismiss button.
I also have a "clear" button to remove the doodles that have been made.
My issue is that when I press clear, even the X button disappears, how do I prevent this from happening?
This is my current app.
[}/>
its work fine |
59,327,164 | I am creating a doodle page with an "X" as the close/dismiss button.
I also have a "clear" button to remove the doodles that have been made.
My issue is that when I press clear, even the X button disappears, how do I prevent this from happening?
This is my current app.
[}/>
its work fine |
908,215 | An urn contains $6$ red balls, $2$ green balls and $9$ white balls. If a set of $4$ balls is randomly selected, but whenever a ball is selected its color is noted and then it is replaced in the urn before the next selection:
What is the probability that we have at least one ball of each color?
My attempt: Let
$E\_{1... | 2014/08/25 | [
"https://math.stackexchange.com/questions/908215",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/128422/"
] | Yes, you should multiply by $\frac{4!}{2!}=12$, which is the number of ways to arrange $2$ red balls, $1$ green ball, and $1$ white ball in a line (if the red balls are indistinguishable) and the same goes for $E\_2$ and $E\_3$.
What you have computed in $P(E\_1)$ is the probability of getting $2$ red balls, $1$ green... | You have to multiply by 12 because your sample space distinguishes between, say, the elements RRGW and WRRG.
Thus the probability of getting a red, then a red, then a green, then a white IN THAT ORDER
is
($6\over7$)$^2$($2\over17$)($9\over17$).
But there's four unique ways to order four balls which are RRGW, each... |
908,215 | An urn contains $6$ red balls, $2$ green balls and $9$ white balls. If a set of $4$ balls is randomly selected, but whenever a ball is selected its color is noted and then it is replaced in the urn before the next selection:
What is the probability that we have at least one ball of each color?
My attempt: Let
$E\_{1... | 2014/08/25 | [
"https://math.stackexchange.com/questions/908215",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/128422/"
] | Here the "pattern" $2$-$1$-$1$-$1$ is the only way our desired event can occur. That makes your approach a good one. With larger numbers, the number of patterns may become large, and the above kind of analysis becomes unwieldy. I suggest the following approach.
Our desired probability is $1$ minus the probability tha... | Yes, you should multiply by $\frac{4!}{2!}=12$, which is the number of ways to arrange $2$ red balls, $1$ green ball, and $1$ white ball in a line (if the red balls are indistinguishable) and the same goes for $E\_2$ and $E\_3$.
What you have computed in $P(E\_1)$ is the probability of getting $2$ red balls, $1$ green... |
908,215 | An urn contains $6$ red balls, $2$ green balls and $9$ white balls. If a set of $4$ balls is randomly selected, but whenever a ball is selected its color is noted and then it is replaced in the urn before the next selection:
What is the probability that we have at least one ball of each color?
My attempt: Let
$E\_{1... | 2014/08/25 | [
"https://math.stackexchange.com/questions/908215",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/128422/"
] | Here the "pattern" $2$-$1$-$1$-$1$ is the only way our desired event can occur. That makes your approach a good one. With larger numbers, the number of patterns may become large, and the above kind of analysis becomes unwieldy. I suggest the following approach.
Our desired probability is $1$ minus the probability tha... | You have to multiply by 12 because your sample space distinguishes between, say, the elements RRGW and WRRG.
Thus the probability of getting a red, then a red, then a green, then a white IN THAT ORDER
is
($6\over7$)$^2$($2\over17$)($9\over17$).
But there's four unique ways to order four balls which are RRGW, each... |
64,094 | To rid the question of the "generality" tag, perhaps I should mention that I'd just like to know the top 5 most used techniques.
I first heard about this from the movie "Pain and Gain" (which is based on a true story), where the rich guy has a secret stash of money in a bank account that nobody else knows of.
Is it... | 2016/05/14 | [
"https://money.stackexchange.com/questions/64094",
"https://money.stackexchange.com",
"https://money.stackexchange.com/users/24428/"
] | Asset protection is broad subject.
In your examples it is certainly possible to have accounts that exist undisclosed from a spouse and legally inaccessible by said spouse.
In the US, balances in 401k retirement accounts are exempt from forfeitures in bankruptcy.
The only trick to secret stashes is that it involves y... | The goldbug crowd over on ZeroHedge's comments seem fond of reminding everyone that, while they might have bought and owned some gold in the past, they don't have it any more because they actually lost it all in a lake in "a tragic boating accident". *And who's going to prove otherwise?*
For that group, who are convin... |
64,094 | To rid the question of the "generality" tag, perhaps I should mention that I'd just like to know the top 5 most used techniques.
I first heard about this from the movie "Pain and Gain" (which is based on a true story), where the rich guy has a secret stash of money in a bank account that nobody else knows of.
Is it... | 2016/05/14 | [
"https://money.stackexchange.com/questions/64094",
"https://money.stackexchange.com",
"https://money.stackexchange.com/users/24428/"
] | is it worth it? That is for you to judge.
The risks are having it blowup in your face, and you having to pay a penalty, or go to jail.
The issue is how you keep it secret, and who you keep it secret from.
If you have money in a secret account and keep it hidden even though you:
* file your taxes;
* have to file for... | The goldbug crowd over on ZeroHedge's comments seem fond of reminding everyone that, while they might have bought and owned some gold in the past, they don't have it any more because they actually lost it all in a lake in "a tragic boating accident". *And who's going to prove otherwise?*
For that group, who are convin... |
64,094 | To rid the question of the "generality" tag, perhaps I should mention that I'd just like to know the top 5 most used techniques.
I first heard about this from the movie "Pain and Gain" (which is based on a true story), where the rich guy has a secret stash of money in a bank account that nobody else knows of.
Is it... | 2016/05/14 | [
"https://money.stackexchange.com/questions/64094",
"https://money.stackexchange.com",
"https://money.stackexchange.com/users/24428/"
] | is it worth it? That is for you to judge.
The risks are having it blowup in your face, and you having to pay a penalty, or go to jail.
The issue is how you keep it secret, and who you keep it secret from.
If you have money in a secret account and keep it hidden even though you:
* file your taxes;
* have to file for... | Asset protection is broad subject.
In your examples it is certainly possible to have accounts that exist undisclosed from a spouse and legally inaccessible by said spouse.
In the US, balances in 401k retirement accounts are exempt from forfeitures in bankruptcy.
The only trick to secret stashes is that it involves y... |
50,716,403 | I just want to run an example from [this site](https://code.tutsplus.com/tutorials/introduction-to-multiprocessing-in-python--cms-30281) which is the following code:
```
from multiprocessing import Process
def square(x):
for x in numbers:
print('%s squared is %s' % (x, x**2))
if __name__ == '__main__'... | 2018/06/06 | [
"https://Stackoverflow.com/questions/50716403",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9707135/"
] | There are a few problems with your snippet.
1. Identation: `if __name__ == '__main__':` is part of the square function
2. The function`square` should take the argument `numbers` not `x`
3. The arguments passed to the process should be `args=(numbers,)`
Once you fix all this, you get:
```
from multiprocessing import ... | If IDLE quits with no message, and it was not started from a console, try starting from a console (python -m idlelib) and see if a message appears.
For example if your python file is in the Desktop you may write
C:\Users\MyName> Desktop\python-file-name -m idlelib
prss `win + x` and choose `command prompt`. |
67,682,132 | I have a text where the third column is not aligned propery
The expected look is
[](https://i.stack.imgur.com/TfeTH.png)
The obtained is
[](https://i.stack.imgur.com/G6pj6.png)
I ... | 2021/05/25 | [
"https://Stackoverflow.com/questions/67682132",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5549354/"
] | Is it important that the content is in a table? In isolation it would make sense to use [flexbox](https://css-tricks.com/snippets/css/a-guide-to-flexbox/) and align the elements centered.
Apparently, setting the y value in `translate(-2em,0)` to 0 will make the element align. I removed the prefixes for transform for b... | just remove width of `CARPT0000737` div wrapper
```
<div class="rotate" style="width:20px; font-size:10">CARPT0000737</div>
```
also there is a typo in your `table` element css, property - `tborder`, should be border.
```
table{
font-family: 'Lato', sans-serif; tborder:#777 1px solid;
}
```
i've made working C... |
67,682,132 | I have a text where the third column is not aligned propery
The expected look is
[](https://i.stack.imgur.com/TfeTH.png)
The obtained is
[](https://i.stack.imgur.com/G6pj6.png)
I ... | 2021/05/25 | [
"https://Stackoverflow.com/questions/67682132",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5549354/"
] | Is it important that the content is in a table? In isolation it would make sense to use [flexbox](https://css-tricks.com/snippets/css/a-guide-to-flexbox/) and align the elements centered.
Apparently, setting the y value in `translate(-2em,0)` to 0 will make the element align. I removed the prefixes for transform for b... | use this styling
```
transform-origin: center;
font-size: 11px;
margin: 0 -30px 0px -30px;
```
on rotate class
```
<div class="rotate" style=" transform-origin: center;
font-size: 11px;
margin: 0 -30px 0px -30px;">CARPT0000737</div>
```
and on its parent `td` tag
```
<td s... |
7,776,591 | what are the pros and cons of using a standard event handler or overriding the base class of an asp.net page? Are there any? I've seen both used to do the same thing.
```
protected void Page_PreInit(object sender, EventArgs e)
{
//Put your code here
}
protected override void OnPreInit(EventArgs e)
{
base.OnPr... | 2011/10/15 | [
"https://Stackoverflow.com/questions/7776591",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/892018/"
] | if you use the override you can decide when the custom function should be execute. after or before base method. but if you use auto wireup events it will execute after the base event.
```
protected override void OnPreInit(EventArgs e)
{
base.OnPreInit(e);
//Put your code here
}
```
or
```
protected override... | `There is much difference in both of the name that you have mentioned, I would like to tell you about that, actually overriding means to use the same method with the same name in the child class, but only the parameters are different in both of the methods`, If suppose take the example of the calculating the area, and ... |
7,776,591 | what are the pros and cons of using a standard event handler or overriding the base class of an asp.net page? Are there any? I've seen both used to do the same thing.
```
protected void Page_PreInit(object sender, EventArgs e)
{
//Put your code here
}
protected override void OnPreInit(EventArgs e)
{
base.OnPr... | 2011/10/15 | [
"https://Stackoverflow.com/questions/7776591",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/892018/"
] | if you use the override you can decide when the custom function should be execute. after or before base method. but if you use auto wireup events it will execute after the base event.
```
protected override void OnPreInit(EventArgs e)
{
base.OnPreInit(e);
//Put your code here
}
```
or
```
protected override... | Page\_PreInit will be called if autoeventWireUp is On.
The func OnPreInit is virtual , and in your page is overrided.
but the master function which is virtual - is executing the code which triggers the Page\_PreInit.
so you have to call base.OnPreInit(e); even if you override it.
**IF YOU NEED TO PUT SOME CODE BEFO... |
7,776,591 | what are the pros and cons of using a standard event handler or overriding the base class of an asp.net page? Are there any? I've seen both used to do the same thing.
```
protected void Page_PreInit(object sender, EventArgs e)
{
//Put your code here
}
protected override void OnPreInit(EventArgs e)
{
base.OnPr... | 2011/10/15 | [
"https://Stackoverflow.com/questions/7776591",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/892018/"
] | if you use the override you can decide when the custom function should be execute. after or before base method. but if you use auto wireup events it will execute after the base event.
```
protected override void OnPreInit(EventArgs e)
{
base.OnPreInit(e);
//Put your code here
}
```
or
```
protected override... | First of all, both aren't the same thing.
OnLoad, OnInit and so on are the methods which fires events. Its goal is encapsulating event firing so, if these're *virtual methods*, derived classes will have the ability of override them and do something before and/or after firing some event.
I wouldn't ask for *pros* and ... |
7,776,591 | what are the pros and cons of using a standard event handler or overriding the base class of an asp.net page? Are there any? I've seen both used to do the same thing.
```
protected void Page_PreInit(object sender, EventArgs e)
{
//Put your code here
}
protected override void OnPreInit(EventArgs e)
{
base.OnPr... | 2011/10/15 | [
"https://Stackoverflow.com/questions/7776591",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/892018/"
] | First of all, both aren't the same thing.
OnLoad, OnInit and so on are the methods which fires events. Its goal is encapsulating event firing so, if these're *virtual methods*, derived classes will have the ability of override them and do something before and/or after firing some event.
I wouldn't ask for *pros* and ... | `There is much difference in both of the name that you have mentioned, I would like to tell you about that, actually overriding means to use the same method with the same name in the child class, but only the parameters are different in both of the methods`, If suppose take the example of the calculating the area, and ... |
7,776,591 | what are the pros and cons of using a standard event handler or overriding the base class of an asp.net page? Are there any? I've seen both used to do the same thing.
```
protected void Page_PreInit(object sender, EventArgs e)
{
//Put your code here
}
protected override void OnPreInit(EventArgs e)
{
base.OnPr... | 2011/10/15 | [
"https://Stackoverflow.com/questions/7776591",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/892018/"
] | First of all, both aren't the same thing.
OnLoad, OnInit and so on are the methods which fires events. Its goal is encapsulating event firing so, if these're *virtual methods*, derived classes will have the ability of override them and do something before and/or after firing some event.
I wouldn't ask for *pros* and ... | Page\_PreInit will be called if autoeventWireUp is On.
The func OnPreInit is virtual , and in your page is overrided.
but the master function which is virtual - is executing the code which triggers the Page\_PreInit.
so you have to call base.OnPreInit(e); even if you override it.
**IF YOU NEED TO PUT SOME CODE BEFO... |
6,059,128 | i have a UIViewController with a text Field and a button . When the user click the button , i want to move to a TableViewCotroller and send the value of the text field to the table view . I use this code
:
```
StatusTableViewController *statuttableview =[[StatusTableViewController alloc]initWithNibName:@"StatusTableVi... | 2011/05/19 | [
"https://Stackoverflow.com/questions/6059128",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/760095/"
] | You should definitely go a little deeper into the basics....
You have to add a `NSString` property to the `StatusTableViewController` and set it in a custom init or with its setter after initialization.
in `StatusTableViewController.h` do something like
```
NSString *myText;
```
...
```
@property(nonatomic, retai... | get the value from textfield and and send that to string placed with property and syntesize in
StatusTableViewController controller and use like this
```
StatusTableViewController *statuttableview =[[StatusTableViewController alloc]initWithNibName:@"StatusTableViewController" bundle:nil];
statuttableview.textValu... |
6,059,128 | i have a UIViewController with a text Field and a button . When the user click the button , i want to move to a TableViewCotroller and send the value of the text field to the table view . I use this code
:
```
StatusTableViewController *statuttableview =[[StatusTableViewController alloc]initWithNibName:@"StatusTableVi... | 2011/05/19 | [
"https://Stackoverflow.com/questions/6059128",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/760095/"
] | You should definitely go a little deeper into the basics....
You have to add a `NSString` property to the `StatusTableViewController` and set it in a custom init or with its setter after initialization.
in `StatusTableViewController.h` do something like
```
NSString *myText;
```
...
```
@property(nonatomic, retai... | Create one NSString \*str (variable) in StatusTableViewController.h file and do property,synthesize it.
After that do following code in your current controller,
```
StatusTableViewController *statuttableview =[[StatusTableViewController alloc]initWithNibName:@"StatusTableViewController" bundle:nil];
statuttablevie... |
45,463,076 | I am new to `Knockout.js` and I find a code section of a dropdown which is never getting updated. Below is the code :
```
<div class="col-sm-12 col-xs-9">
<select class="bs-select" data-width="100px" data-bind="value: measurement">
<option>Gallons</option>
<option>Pounds</option>
<option>Da... | 2017/08/02 | [
"https://Stackoverflow.com/questions/45463076",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8184892/"
] | Here is a working jsFiddle for what you seek:
<https://jsfiddle.net/njbLqpmq/>
HTML:
```
<div class="col-sm-12 col-xs-9">
<select class="bs-select" data-width="100px" data-bind="value: measurement">
<option value="Pounds">Pounds</option>
<option value="Days">Days</option>
<option value="Gal... | you probably need the options binding.
<http://knockoutjs.com/documentation/options-binding.html>
here is a fiddle.
<https://jsfiddle.net/0o89pmju/24/>
```
<select class="form-control" data-width="100px" data-bind="value: measurement, options: availablemeasurements">
</select>
```
js
```
function viewModel... |
862,964 | I'm writing a Linux driver using netlink to communicate between user space and kernel space. But I can't find some useful materials, because the netlink has changed from Linux kernel >=2.6.24. Who can give me some suggestions about how to create a netlink socket. Thanks in advance! | 2009/05/14 | [
"https://Stackoverflow.com/questions/862964",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/98175/"
] | The code below demonstrates the basics of sending data from a user space application to a kernel module using netlink. This code works on Linux 2.6.28.9 with the git version (ef8ba32) of [libnl](http://www.infradead.org/~tgr/libnl/). For more details, check out the libnl [documentation](http://www.infradead.org/~tgr/li... | I have been away of kernel programming from some time now. So I can't give you a direct example on what changes have been introduced. I can tell you how I got to understand the netlink functions and how to use them, reading code. Especially code from NetworkManager or the wireless extensions (iwlib), since that was my ... |
24,346 | Hat jemand eine Idee, wie man ***POI / Point of interest*** kurz und knackig ins Deutsche übersetzen kann?
Es handelt sich um Orte, die vor allem in Navigationssystemen als »Orte vom besonderen Interesse« definiert sind, sprich Sehenswürdigkeiten, Geldautomaten, Polizeireviere etc. Man durchsucht das Navigationssystem... | 2015/07/11 | [
"https://german.stackexchange.com/questions/24346",
"https://german.stackexchange.com",
"https://german.stackexchange.com/users/5550/"
] | Wikipedia, das zur Übersetzung solcher Begriffe oft hilfreich ist, benutzt ebenfalls [Point of Interest](https://de.wikipedia.org/wiki/Point_of_Interest), auch in diversen anderen Sprachen (siehe linke Navigationsleiste dort).
Ich befürchte, ein selbsterfundener Name oder gar eine Abkürzung davon wird es den Leuten, d... | Also eigentlich würde ich es sinngemäß als `Sehenswürdigkeit` übersetzen. Allerdings lässt sich da dann wohl auch irgendwie darüber streiten, inwiefern McDonald’s oder ein Polizeirevier, Krankenhaus usw. als `Sehenswürdigkeit` zu betrachten sind. Dennoch würde es grundsätzlich zutreffen, da je nachdem was der Anlass is... |
24,346 | Hat jemand eine Idee, wie man ***POI / Point of interest*** kurz und knackig ins Deutsche übersetzen kann?
Es handelt sich um Orte, die vor allem in Navigationssystemen als »Orte vom besonderen Interesse« definiert sind, sprich Sehenswürdigkeiten, Geldautomaten, Polizeireviere etc. Man durchsucht das Navigationssystem... | 2015/07/11 | [
"https://german.stackexchange.com/questions/24346",
"https://german.stackexchange.com",
"https://german.stackexchange.com/users/5550/"
] | Also eigentlich würde ich es sinngemäß als `Sehenswürdigkeit` übersetzen. Allerdings lässt sich da dann wohl auch irgendwie darüber streiten, inwiefern McDonald’s oder ein Polizeirevier, Krankenhaus usw. als `Sehenswürdigkeit` zu betrachten sind. Dennoch würde es grundsätzlich zutreffen, da je nachdem was der Anlass is... | Abgesehen davon, daß ich @dirkts antwort sehr gelungen finde:
>
> interessanter Ort
>
>
>
Wäre eine mögliche und einigermaßen kurze Übersetzung. Auch wenn auch diese Übersetzung immer noch ein wenig komisch riecht, wenn man an Geldautomaten, Polizeistationen oder Friedhöfe denkt. |
24,346 | Hat jemand eine Idee, wie man ***POI / Point of interest*** kurz und knackig ins Deutsche übersetzen kann?
Es handelt sich um Orte, die vor allem in Navigationssystemen als »Orte vom besonderen Interesse« definiert sind, sprich Sehenswürdigkeiten, Geldautomaten, Polizeireviere etc. Man durchsucht das Navigationssystem... | 2015/07/11 | [
"https://german.stackexchange.com/questions/24346",
"https://german.stackexchange.com",
"https://german.stackexchange.com/users/5550/"
] | Also eigentlich würde ich es sinngemäß als `Sehenswürdigkeit` übersetzen. Allerdings lässt sich da dann wohl auch irgendwie darüber streiten, inwiefern McDonald’s oder ein Polizeirevier, Krankenhaus usw. als `Sehenswürdigkeit` zu betrachten sind. Dennoch würde es grundsätzlich zutreffen, da je nachdem was der Anlass is... | "Von Interesse" (ohne den Ort).
Das Original ist "Point of Interest", nicht "Place of Interest". Die erwähnten Orte sind oft selbst nicht interessant, aber der Benutzer hat (manchmal, kurzzeitig) ein Interesse an dem Platz. |
24,346 | Hat jemand eine Idee, wie man ***POI / Point of interest*** kurz und knackig ins Deutsche übersetzen kann?
Es handelt sich um Orte, die vor allem in Navigationssystemen als »Orte vom besonderen Interesse« definiert sind, sprich Sehenswürdigkeiten, Geldautomaten, Polizeireviere etc. Man durchsucht das Navigationssystem... | 2015/07/11 | [
"https://german.stackexchange.com/questions/24346",
"https://german.stackexchange.com",
"https://german.stackexchange.com/users/5550/"
] | Wikipedia, das zur Übersetzung solcher Begriffe oft hilfreich ist, benutzt ebenfalls [Point of Interest](https://de.wikipedia.org/wiki/Point_of_Interest), auch in diversen anderen Sprachen (siehe linke Navigationsleiste dort).
Ich befürchte, ein selbsterfundener Name oder gar eine Abkürzung davon wird es den Leuten, d... | Im Prinzip gebe ich dirkt Recht. Andererseits ist das natürlich etwas unbefriedigend, da *point of interest* und seine Abkürzung *POI* anders als z.B. *CPU* im Deutschen noch nicht sehr gebräuchlich sind.
Dict.leo.org gibt für das englische Synonym *place of interest* die Übersetzung *interessanter Ort*. Das scheint m... |
24,346 | Hat jemand eine Idee, wie man ***POI / Point of interest*** kurz und knackig ins Deutsche übersetzen kann?
Es handelt sich um Orte, die vor allem in Navigationssystemen als »Orte vom besonderen Interesse« definiert sind, sprich Sehenswürdigkeiten, Geldautomaten, Polizeireviere etc. Man durchsucht das Navigationssystem... | 2015/07/11 | [
"https://german.stackexchange.com/questions/24346",
"https://german.stackexchange.com",
"https://german.stackexchange.com/users/5550/"
] | Wikipedia, das zur Übersetzung solcher Begriffe oft hilfreich ist, benutzt ebenfalls [Point of Interest](https://de.wikipedia.org/wiki/Point_of_Interest), auch in diversen anderen Sprachen (siehe linke Navigationsleiste dort).
Ich befürchte, ein selbsterfundener Name oder gar eine Abkürzung davon wird es den Leuten, d... | Abgesehen davon, daß ich @dirkts antwort sehr gelungen finde:
>
> interessanter Ort
>
>
>
Wäre eine mögliche und einigermaßen kurze Übersetzung. Auch wenn auch diese Übersetzung immer noch ein wenig komisch riecht, wenn man an Geldautomaten, Polizeistationen oder Friedhöfe denkt. |
24,346 | Hat jemand eine Idee, wie man ***POI / Point of interest*** kurz und knackig ins Deutsche übersetzen kann?
Es handelt sich um Orte, die vor allem in Navigationssystemen als »Orte vom besonderen Interesse« definiert sind, sprich Sehenswürdigkeiten, Geldautomaten, Polizeireviere etc. Man durchsucht das Navigationssystem... | 2015/07/11 | [
"https://german.stackexchange.com/questions/24346",
"https://german.stackexchange.com",
"https://german.stackexchange.com/users/5550/"
] | Wikipedia, das zur Übersetzung solcher Begriffe oft hilfreich ist, benutzt ebenfalls [Point of Interest](https://de.wikipedia.org/wiki/Point_of_Interest), auch in diversen anderen Sprachen (siehe linke Navigationsleiste dort).
Ich befürchte, ein selbsterfundener Name oder gar eine Abkürzung davon wird es den Leuten, d... | "Von Interesse" (ohne den Ort).
Das Original ist "Point of Interest", nicht "Place of Interest". Die erwähnten Orte sind oft selbst nicht interessant, aber der Benutzer hat (manchmal, kurzzeitig) ein Interesse an dem Platz. |
24,346 | Hat jemand eine Idee, wie man ***POI / Point of interest*** kurz und knackig ins Deutsche übersetzen kann?
Es handelt sich um Orte, die vor allem in Navigationssystemen als »Orte vom besonderen Interesse« definiert sind, sprich Sehenswürdigkeiten, Geldautomaten, Polizeireviere etc. Man durchsucht das Navigationssystem... | 2015/07/11 | [
"https://german.stackexchange.com/questions/24346",
"https://german.stackexchange.com",
"https://german.stackexchange.com/users/5550/"
] | Im Prinzip gebe ich dirkt Recht. Andererseits ist das natürlich etwas unbefriedigend, da *point of interest* und seine Abkürzung *POI* anders als z.B. *CPU* im Deutschen noch nicht sehr gebräuchlich sind.
Dict.leo.org gibt für das englische Synonym *place of interest* die Übersetzung *interessanter Ort*. Das scheint m... | Abgesehen davon, daß ich @dirkts antwort sehr gelungen finde:
>
> interessanter Ort
>
>
>
Wäre eine mögliche und einigermaßen kurze Übersetzung. Auch wenn auch diese Übersetzung immer noch ein wenig komisch riecht, wenn man an Geldautomaten, Polizeistationen oder Friedhöfe denkt. |
24,346 | Hat jemand eine Idee, wie man ***POI / Point of interest*** kurz und knackig ins Deutsche übersetzen kann?
Es handelt sich um Orte, die vor allem in Navigationssystemen als »Orte vom besonderen Interesse« definiert sind, sprich Sehenswürdigkeiten, Geldautomaten, Polizeireviere etc. Man durchsucht das Navigationssystem... | 2015/07/11 | [
"https://german.stackexchange.com/questions/24346",
"https://german.stackexchange.com",
"https://german.stackexchange.com/users/5550/"
] | Im Prinzip gebe ich dirkt Recht. Andererseits ist das natürlich etwas unbefriedigend, da *point of interest* und seine Abkürzung *POI* anders als z.B. *CPU* im Deutschen noch nicht sehr gebräuchlich sind.
Dict.leo.org gibt für das englische Synonym *place of interest* die Übersetzung *interessanter Ort*. Das scheint m... | "Von Interesse" (ohne den Ort).
Das Original ist "Point of Interest", nicht "Place of Interest". Die erwähnten Orte sind oft selbst nicht interessant, aber der Benutzer hat (manchmal, kurzzeitig) ein Interesse an dem Platz. |
407,205 | I am using the `expex` package with numerous examples which break into two or more lines due to the length of either `\gla` or `\glb` contents. The `normal` and `cascading` options for `glhangstyle` work without issue.
However, I sometimes find the examples text-heavy and difficult to follow visually. I was considerin... | 2017/12/21 | [
"https://tex.stackexchange.com/questions/407205",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/78866/"
] | The `siunitx` package no longer provides an `s`-type column for this purpose, because in general units should be in column headers. The `collcell` package can also be used to achieve the same effect
```
\documentclass{article}
\usepackage{siunitx}
\usepackage{collcell}
\begin{document}
\begin{tabular}{ls>{\collectcell... | That column type already exists, it is called
```
s
```
You cannot pickup arguments from columns like you attempt, there you'll need sneaky tricks or use a package (who's name eludes me) which can collect the contents of each cell in a column and give them to a macro
Note that: As of `siunitx` version 3 the `s` co... |
26,712 | In the end of *The Terminator* movie, Sarah Connor recorded audio tapes for her upcoming son saying: "If you don't send Kyle back in time, you can never be." (not exact words)
Yes, she was pregnant after sexual intercourse with Kyle, but how did she know that this offspring would be John Connor? There was possibility ... | 2012/11/11 | [
"https://scifi.stackexchange.com/questions/26712",
"https://scifi.stackexchange.com",
"https://scifi.stackexchange.com/users/931/"
] | She knew John specifically sent Kyle back in time *and* gave him her photo significantly prior to sending him back\*. Kyle told her so. So it is not a stretch for her to realise John sending Kyle back in order for Kyle to father John (along protecting Sarah). Other than that, she had no reason to assume this baby *wasn... | Knowing what we know about the series, skynet has continuously targeted John Connor along with his mother Sarah. In my honest opinion the original John ceases to exsist after Kyle impregnates or seemingly impregnates Sarah. In all honesty Sarah could have been pregnant already and instead of telling young John that you... |
26,712 | In the end of *The Terminator* movie, Sarah Connor recorded audio tapes for her upcoming son saying: "If you don't send Kyle back in time, you can never be." (not exact words)
Yes, she was pregnant after sexual intercourse with Kyle, but how did she know that this offspring would be John Connor? There was possibility ... | 2012/11/11 | [
"https://scifi.stackexchange.com/questions/26712",
"https://scifi.stackexchange.com",
"https://scifi.stackexchange.com/users/931/"
] | She knew John specifically sent Kyle back in time *and* gave him her photo significantly prior to sending him back\*. Kyle told her so. So it is not a stretch for her to realise John sending Kyle back in order for Kyle to father John (along protecting Sarah). Other than that, she had no reason to assume this baby *wasn... | It's possible she doesn't "know" she's pregnant with John, specifically - but **it doesn't matter if she currently is or not.**
She *knows* that she is going to give birth to a son at some point, and she will name him "John". The tapes she is recording are for that future son, John. **Whether John is born 9 months fro... |
26,230,083 | I have to update a mysql table with values that comes from array variable in size.
For that i was doing something like this but this code execute many query as the number of items on the array, and is hard to manage errors.
how i can execute only one query but still using a foreach loop?
the php version of server is ... | 2014/10/07 | [
"https://Stackoverflow.com/questions/26230083",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1029387/"
] | The source code of stop method has
```
[self.layer removeFromSuperlayer];
```
The layer is removed from self.view.layer, so in your start method, add the layer again and bring your custom views to front.
```
[self.view.layer addSublayer:self.capture.layer];
[self.view bringSubviewToFront:self.startButton];
[self.c... | Dont use ZXing, iOS7 supports barcode scanning (<http://www.infragistics.com/community/blogs/torrey-betts/archive/2013/10/10/scanning-barcodes-with-ios-7-objective-c.aspx>) |
26,230,083 | I have to update a mysql table with values that comes from array variable in size.
For that i was doing something like this but this code execute many query as the number of items on the array, and is hard to manage errors.
how i can execute only one query but still using a foreach loop?
the php version of server is ... | 2014/10/07 | [
"https://Stackoverflow.com/questions/26230083",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1029387/"
] | The source code of stop method has
```
[self.layer removeFromSuperlayer];
```
The layer is removed from self.view.layer, so in your start method, add the layer again and bring your custom views to front.
```
[self.view.layer addSublayer:self.capture.layer];
[self.view bringSubviewToFront:self.startButton];
[self.c... | Please move the start method viewDidAppear it works fine for me.
```
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
[self.capture start];
}
``` |
9,026,090 | I have a Netty TCP server, and I want to reject/refuse incoming connection attempts selectively (based on their remote address). I guess I have to use `ServerBootstrap.setParentHandler(ChannelHandler)`, but what do I do in the `ChannelHandler`? What event am I handling? How do I refuse the connection? | 2012/01/26 | [
"https://Stackoverflow.com/questions/9026090",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/750563/"
] | If you have several network interfaces and you want to accept connections from one interface only you just need to set the local address in `ServerBootstrap`. This may be enough if your server is running in a machine that's connected to several networks and you want to serve only one of them. In this case any connectio... | After having looked at `org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink` in the Netty sources, I am fairly certain that Netty accepts all incoming connections, and there is no way to refuse them (but, of course, they can be closed after being accepted). |
9,026,090 | I have a Netty TCP server, and I want to reject/refuse incoming connection attempts selectively (based on their remote address). I guess I have to use `ServerBootstrap.setParentHandler(ChannelHandler)`, but what do I do in the `ChannelHandler`? What event am I handling? How do I refuse the connection? | 2012/01/26 | [
"https://Stackoverflow.com/questions/9026090",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/750563/"
] | As Norman said, there is no way to refuse the connection, but you can close it immediately by adding a Netty's IpFilterHandler to server pipeline as the first handler. It will also stop propagating the upstream channel state events for filtered connection too.
```
@ChannelHandler.Sharable
public class MyFilterHandler... | If you have several network interfaces and you want to accept connections from one interface only you just need to set the local address in `ServerBootstrap`. This may be enough if your server is running in a machine that's connected to several networks and you want to serve only one of them. In this case any connectio... |
9,026,090 | I have a Netty TCP server, and I want to reject/refuse incoming connection attempts selectively (based on their remote address). I guess I have to use `ServerBootstrap.setParentHandler(ChannelHandler)`, but what do I do in the `ChannelHandler`? What event am I handling? How do I refuse the connection? | 2012/01/26 | [
"https://Stackoverflow.com/questions/9026090",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/750563/"
] | As Norman said, there is no way to refuse the connection, but you can close it immediately by adding a Netty's IpFilterHandler to server pipeline as the first handler. It will also stop propagating the upstream channel state events for filtered connection too.
```
@ChannelHandler.Sharable
public class MyFilterHandler... | After having looked at `org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink` in the Netty sources, I am fairly certain that Netty accepts all incoming connections, and there is no way to refuse them (but, of course, they can be closed after being accepted). |
3,383,169 | Here is my JPA2 / Hibernate definition:
```
Code:
@Column(nullable = false)
private boolean enabled;
```
In MySql this column is resolved to a bit(1) datatype - which does not work for me. For legacy issues I need to map the boolean to a tinyint not to a bit. But I do not see a possibility to change the default data... | 2010/08/01 | [
"https://Stackoverflow.com/questions/3383169",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/268098/"
] | Try the `NumericBooleanType`. For some reason this doesn't have a declared short type name so you'd have to use:
```
@Column(nullable = false)
@Type(type = "org.hibernate.type.NumericBooleanType")
private boolean enabled;
```
This does map to an INTEGER type but it will probably work fine with a TINYINT.
UPDATE: `o... | When using Microsoft sql and some versions of mysql use the following:
```
@Column(name = "eanbled", columnDefinition = "bit default 0", nullable = false)
private boolean enabled;
```
For me, tinybit, boolean, and other such definitions failed. |
3,383,169 | Here is my JPA2 / Hibernate definition:
```
Code:
@Column(nullable = false)
private boolean enabled;
```
In MySql this column is resolved to a bit(1) datatype - which does not work for me. For legacy issues I need to map the boolean to a tinyint not to a bit. But I do not see a possibility to change the default data... | 2010/08/01 | [
"https://Stackoverflow.com/questions/3383169",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/268098/"
] | @Type annotation is an Hibernate annotation.
In full JPA2 (with **Hibernate 3.6+**), the way to map a Boolean field to a TINYINT(1) SQL type instead of BIT(1), is to use the columnDefinition attribute.
```
@Column(nullable = false, columnDefinition = "TINYINT(1)")
private boolean enabled;
```
nb: length attribute s... | I had this error:
>
> Caused by: org.springframework.beans.factory.BeanCreationException:
> Error creating bean with name 'sessionFactory' defined in
> ServletContext resource [/WEB-INF/config/context-config.xml]:
> Invocation of init method failed; nested exception is
> org.hibernate.MappingException: Could not ... |
3,383,169 | Here is my JPA2 / Hibernate definition:
```
Code:
@Column(nullable = false)
private boolean enabled;
```
In MySql this column is resolved to a bit(1) datatype - which does not work for me. For legacy issues I need to map the boolean to a tinyint not to a bit. But I do not see a possibility to change the default data... | 2010/08/01 | [
"https://Stackoverflow.com/questions/3383169",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/268098/"
] | Try the `NumericBooleanType`. For some reason this doesn't have a declared short type name so you'd have to use:
```
@Column(nullable = false)
@Type(type = "org.hibernate.type.NumericBooleanType")
private boolean enabled;
```
This does map to an INTEGER type but it will probably work fine with a TINYINT.
UPDATE: `o... | I had this error:
>
> Caused by: org.springframework.beans.factory.BeanCreationException:
> Error creating bean with name 'sessionFactory' defined in
> ServletContext resource [/WEB-INF/config/context-config.xml]:
> Invocation of init method failed; nested exception is
> org.hibernate.MappingException: Could not ... |
3,383,169 | Here is my JPA2 / Hibernate definition:
```
Code:
@Column(nullable = false)
private boolean enabled;
```
In MySql this column is resolved to a bit(1) datatype - which does not work for me. For legacy issues I need to map the boolean to a tinyint not to a bit. But I do not see a possibility to change the default data... | 2010/08/01 | [
"https://Stackoverflow.com/questions/3383169",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/268098/"
] | @Type annotation is an Hibernate annotation.
In full JPA2 (with **Hibernate 3.6+**), the way to map a Boolean field to a TINYINT(1) SQL type instead of BIT(1), is to use the columnDefinition attribute.
```
@Column(nullable = false, columnDefinition = "TINYINT(1)")
private boolean enabled;
```
nb: length attribute s... | I'm using JPA with Spring Data/Hibernate 5.0 on a MySQL database.
In my Entity object, I put the following:
```
@Column(name = "column_name", columnDefinition = "BOOLEAN")
private Boolean variableName;
```
My dev environment has hibernate auto-ddl set to update, so when I deployed to dev, it created the table with ... |
3,383,169 | Here is my JPA2 / Hibernate definition:
```
Code:
@Column(nullable = false)
private boolean enabled;
```
In MySql this column is resolved to a bit(1) datatype - which does not work for me. For legacy issues I need to map the boolean to a tinyint not to a bit. But I do not see a possibility to change the default data... | 2010/08/01 | [
"https://Stackoverflow.com/questions/3383169",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/268098/"
] | @Type annotation is an Hibernate annotation.
In full JPA2 (with **Hibernate 3.6+**), the way to map a Boolean field to a TINYINT(1) SQL type instead of BIT(1), is to use the columnDefinition attribute.
```
@Column(nullable = false, columnDefinition = "TINYINT(1)")
private boolean enabled;
```
nb: length attribute s... | Old question but probably will save someone's time.
I am using Spring Data JPA 2.2.5. I had a similar issue when I work with MySQL and MariadDB parallelly with the same code base. It worked on one and didn't on another.
The issue was, I was creating the field as unsigned.
I moved the below SQL part from
```
`is_fi... |
3,383,169 | Here is my JPA2 / Hibernate definition:
```
Code:
@Column(nullable = false)
private boolean enabled;
```
In MySql this column is resolved to a bit(1) datatype - which does not work for me. For legacy issues I need to map the boolean to a tinyint not to a bit. But I do not see a possibility to change the default data... | 2010/08/01 | [
"https://Stackoverflow.com/questions/3383169",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/268098/"
] | I had this error:
>
> Caused by: org.springframework.beans.factory.BeanCreationException:
> Error creating bean with name 'sessionFactory' defined in
> ServletContext resource [/WEB-INF/config/context-config.xml]:
> Invocation of init method failed; nested exception is
> org.hibernate.MappingException: Could not ... | Old question but probably will save someone's time.
I am using Spring Data JPA 2.2.5. I had a similar issue when I work with MySQL and MariadDB parallelly with the same code base. It worked on one and didn't on another.
The issue was, I was creating the field as unsigned.
I moved the below SQL part from
```
`is_fi... |
3,383,169 | Here is my JPA2 / Hibernate definition:
```
Code:
@Column(nullable = false)
private boolean enabled;
```
In MySql this column is resolved to a bit(1) datatype - which does not work for me. For legacy issues I need to map the boolean to a tinyint not to a bit. But I do not see a possibility to change the default data... | 2010/08/01 | [
"https://Stackoverflow.com/questions/3383169",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/268098/"
] | @Type annotation is an Hibernate annotation.
In full JPA2 (with **Hibernate 3.6+**), the way to map a Boolean field to a TINYINT(1) SQL type instead of BIT(1), is to use the columnDefinition attribute.
```
@Column(nullable = false, columnDefinition = "TINYINT(1)")
private boolean enabled;
```
nb: length attribute s... | When using Microsoft sql and some versions of mysql use the following:
```
@Column(name = "eanbled", columnDefinition = "bit default 0", nullable = false)
private boolean enabled;
```
For me, tinybit, boolean, and other such definitions failed. |
3,383,169 | Here is my JPA2 / Hibernate definition:
```
Code:
@Column(nullable = false)
private boolean enabled;
```
In MySql this column is resolved to a bit(1) datatype - which does not work for me. For legacy issues I need to map the boolean to a tinyint not to a bit. But I do not see a possibility to change the default data... | 2010/08/01 | [
"https://Stackoverflow.com/questions/3383169",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/268098/"
] | I'm using JPA with Spring Data/Hibernate 5.0 on a MySQL database.
In my Entity object, I put the following:
```
@Column(name = "column_name", columnDefinition = "BOOLEAN")
private Boolean variableName;
```
My dev environment has hibernate auto-ddl set to update, so when I deployed to dev, it created the table with ... | Old question but probably will save someone's time.
I am using Spring Data JPA 2.2.5. I had a similar issue when I work with MySQL and MariadDB parallelly with the same code base. It worked on one and didn't on another.
The issue was, I was creating the field as unsigned.
I moved the below SQL part from
```
`is_fi... |
3,383,169 | Here is my JPA2 / Hibernate definition:
```
Code:
@Column(nullable = false)
private boolean enabled;
```
In MySql this column is resolved to a bit(1) datatype - which does not work for me. For legacy issues I need to map the boolean to a tinyint not to a bit. But I do not see a possibility to change the default data... | 2010/08/01 | [
"https://Stackoverflow.com/questions/3383169",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/268098/"
] | I'm using JPA with Spring Data/Hibernate 5.0 on a MySQL database.
In my Entity object, I put the following:
```
@Column(name = "column_name", columnDefinition = "BOOLEAN")
private Boolean variableName;
```
My dev environment has hibernate auto-ddl set to update, so when I deployed to dev, it created the table with ... | I had this error:
>
> Caused by: org.springframework.beans.factory.BeanCreationException:
> Error creating bean with name 'sessionFactory' defined in
> ServletContext resource [/WEB-INF/config/context-config.xml]:
> Invocation of init method failed; nested exception is
> org.hibernate.MappingException: Could not ... |
3,383,169 | Here is my JPA2 / Hibernate definition:
```
Code:
@Column(nullable = false)
private boolean enabled;
```
In MySql this column is resolved to a bit(1) datatype - which does not work for me. For legacy issues I need to map the boolean to a tinyint not to a bit. But I do not see a possibility to change the default data... | 2010/08/01 | [
"https://Stackoverflow.com/questions/3383169",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/268098/"
] | I'm using JPA with Spring Data/Hibernate 5.0 on a MySQL database.
In my Entity object, I put the following:
```
@Column(name = "column_name", columnDefinition = "BOOLEAN")
private Boolean variableName;
```
My dev environment has hibernate auto-ddl set to update, so when I deployed to dev, it created the table with ... | When using Microsoft sql and some versions of mysql use the following:
```
@Column(name = "eanbled", columnDefinition = "bit default 0", nullable = false)
private boolean enabled;
```
For me, tinybit, boolean, and other such definitions failed. |
39,030,514 | I want to add a cell into my tableview to the last row using another UserInterface.The code is like this.
```
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
var cell:JoinCell = tableView.dequeueReusableCellWithIdentifier(reuseIdentifier, forIndexPath: inde... | 2016/08/19 | [
"https://Stackoverflow.com/questions/39030514",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6733078/"
] | Do this and for `datasource.sections.count` use the same value you return in `numberOfSectionInTableView()` and for `datasource.rows.count` use the same value you return in your `numberOfRowsForSection()`
```
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
... | Do something like this
```
let lastSectionIndex = tableView.numberOfSections-1
let lastSectionLastRow = tableView.numberOfRowsInSection(lastSectionIndex) - 1
let lastIndexPath = NSIndexPath(forRow:lastSectionLastRow, inSection: lastSectionIndex)
let cellIndexPath = tableView.indexPathForCell(cell)
var cell
if cellIn... |
39,030,514 | I want to add a cell into my tableview to the last row using another UserInterface.The code is like this.
```
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
var cell:JoinCell = tableView.dequeueReusableCellWithIdentifier(reuseIdentifier, forIndexPath: inde... | 2016/08/19 | [
"https://Stackoverflow.com/questions/39030514",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6733078/"
] | Do this and for `datasource.sections.count` use the same value you return in `numberOfSectionInTableView()` and for `datasource.rows.count` use the same value you return in your `numberOfRowsForSection()`
```
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
... | Let try this:
```
var cell: UITableViewCell!
if cellIndexPath == lastIndexPath {
cell = tableView.dequeueReusableCellWithIdentifier("JoinFooterCell") as! JoinFooterCell
} else {
cell = tableView.dequeueReusableCellWithIdentifier(reuseIdentifier, forIndexPath: indexPath) as! JoinCell
}
return cell
``` |
14,973,380 | I was reading [Effective Java](https://rads.stackoverflow.com/amzn/click/com/0321356683) by Joshua Bloch.
In Item 17: "Use interfaces only to define types", I came across the explanation where it is not advised to use Interfaces for storing constants. I am putting the explanation below.
***"Worse, it represents a com... | 2013/02/20 | [
"https://Stackoverflow.com/questions/14973380",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1954657/"
] | In short, binary compatibility means that when you change your class, you do not need to recompile classes that use it. For example, you removed or renamed a public or protected method from this class
```
public class Logger implements Constants {
public Logger getLogger(String name) {
return LogManager.ge... | To better understand the concept, it is interesting to see that binary compatibility does NOT imply API compatibility, nor vice versa.
**API compatible but NOT binary compatible: static removal**
Version 1 of library:
```
public class Lib {
public static final int i = 1;
}
```
Client code:
```
public class Ma... |
14,973,380 | I was reading [Effective Java](https://rads.stackoverflow.com/amzn/click/com/0321356683) by Joshua Bloch.
In Item 17: "Use interfaces only to define types", I came across the explanation where it is not advised to use Interfaces for storing constants. I am putting the explanation below.
***"Worse, it represents a com... | 2013/02/20 | [
"https://Stackoverflow.com/questions/14973380",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1954657/"
] | In short, binary compatibility means that when you change your class, you do not need to recompile classes that use it. For example, you removed or renamed a public or protected method from this class
```
public class Logger implements Constants {
public Logger getLogger(String name) {
return LogManager.ge... | If in future, we wish to change the interface that some classes are implementing (e.g., addition of some new methods).
If we add abstract methods(**additional methods**), then the classes (implementing the interface) ***must implements*** the additional method creating dependency constraint and cost overhead to perfor... |
14,973,380 | I was reading [Effective Java](https://rads.stackoverflow.com/amzn/click/com/0321356683) by Joshua Bloch.
In Item 17: "Use interfaces only to define types", I came across the explanation where it is not advised to use Interfaces for storing constants. I am putting the explanation below.
***"Worse, it represents a com... | 2013/02/20 | [
"https://Stackoverflow.com/questions/14973380",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1954657/"
] | To better understand the concept, it is interesting to see that binary compatibility does NOT imply API compatibility, nor vice versa.
**API compatible but NOT binary compatible: static removal**
Version 1 of library:
```
public class Lib {
public static final int i = 1;
}
```
Client code:
```
public class Ma... | If in future, we wish to change the interface that some classes are implementing (e.g., addition of some new methods).
If we add abstract methods(**additional methods**), then the classes (implementing the interface) ***must implements*** the additional method creating dependency constraint and cost overhead to perfor... |
11,718 | I have been using Windows 10 preview for almost 2-3 months now. I have serious issues with the phone being too slow and laggy. I am not sure what I should do to fix it.
A post on the Microsoft forums says to reset the device. But if I reset the device will it not go back to Windows 8.1?
I'll surely reset the device... | 2015/10/18 | [
"https://windowsphone.stackexchange.com/questions/11718",
"https://windowsphone.stackexchange.com",
"https://windowsphone.stackexchange.com/users/15302/"
] | Regarding the slowing down of the phone - this is something that a lot of users in the preview have complained about. Microsoft has stated repeatedly that the Preview is not intended for productive use. Looking at the Windows 10 Preview for Desktop I had similar issues that got fixed until the launch.
There are rumor... | Doing a hardware reset will take it back to factory conditions, for the currently installed OS. To get the latest insider preview, you'd need to use the Lumia Recovery tool to go back to 8.1, and then roll forward to 10 as there was a bug discovered going from the previous Windows 10 build.
Doing a factory reset will ... |
24,687,525 | I am working on a list of lists and accessing columns has been very confusing.
Let's assume x is defined as following:
```
x = [[int(np.random.rand()*100) for i in xrange(5)] for x in xrange(10)]
pprint.pprint(x)
```
>
>
> ```
> [[86, 92, 95, 78, 68],
> [76, 80, 44, 30, 73],
> [48, 85, 99, 35, 14],
> [3, ... | 2014/07/10 | [
"https://Stackoverflow.com/questions/24687525",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1760873/"
] | `x[:][1]` is the whole array row 1 and `x[1][:]` is all row 1 of `x` so they both point to the same row.
```
In [2]: x[:]
Out[2]:
[[86, 92, 95, 78, 68],
[76, 80, 44, 30, 73],
[48, 85, 99, 35, 14],
[3, 84, 50, 39, 47],
[3, 7, 67, 28, 65],
[19, 13, 98, 53, 33],
[9, 97, 35, 25, 89],
[48, 3, 48, 5, 1],
[21, 40, 7... | `x[1][:]` is saying first get `x[1]` which is the first object in the list. In this case it is a list. Then by adding `[:]` to that, you are saying to return all list objects from that first list. So it returns the whole first list object from your main list of lists.
`x[:][1]` is first saying by `x[:]` to return the ... |
24,687,525 | I am working on a list of lists and accessing columns has been very confusing.
Let's assume x is defined as following:
```
x = [[int(np.random.rand()*100) for i in xrange(5)] for x in xrange(10)]
pprint.pprint(x)
```
>
>
> ```
> [[86, 92, 95, 78, 68],
> [76, 80, 44, 30, 73],
> [48, 85, 99, 35, 14],
> [3, ... | 2014/07/10 | [
"https://Stackoverflow.com/questions/24687525",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1760873/"
] | The behavior is pretty simple to understand if you break up the two indexing operations of each of your expressions into separate pieces.
* `x[1]` will be the second value from your list of lists (the list `[76, 80, 44, 30, 73]`).
* `x[1][:]` is a copy of `x[1]` (a slice that spans the whole list).
* `x[:]` is a (shal... | `x[:][1]` is the whole array row 1 and `x[1][:]` is all row 1 of `x` so they both point to the same row.
```
In [2]: x[:]
Out[2]:
[[86, 92, 95, 78, 68],
[76, 80, 44, 30, 73],
[48, 85, 99, 35, 14],
[3, 84, 50, 39, 47],
[3, 7, 67, 28, 65],
[19, 13, 98, 53, 33],
[9, 97, 35, 25, 89],
[48, 3, 48, 5, 1],
[21, 40, 7... |
24,687,525 | I am working on a list of lists and accessing columns has been very confusing.
Let's assume x is defined as following:
```
x = [[int(np.random.rand()*100) for i in xrange(5)] for x in xrange(10)]
pprint.pprint(x)
```
>
>
> ```
> [[86, 92, 95, 78, 68],
> [76, 80, 44, 30, 73],
> [48, 85, 99, 35, 14],
> [3, ... | 2014/07/10 | [
"https://Stackoverflow.com/questions/24687525",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1760873/"
] | The behavior is pretty simple to understand if you break up the two indexing operations of each of your expressions into separate pieces.
* `x[1]` will be the second value from your list of lists (the list `[76, 80, 44, 30, 73]`).
* `x[1][:]` is a copy of `x[1]` (a slice that spans the whole list).
* `x[:]` is a (shal... | `x[1][:]` is saying first get `x[1]` which is the first object in the list. In this case it is a list. Then by adding `[:]` to that, you are saying to return all list objects from that first list. So it returns the whole first list object from your main list of lists.
`x[:][1]` is first saying by `x[:]` to return the ... |
30,889,078 | I have a jar file, which uses jdbc to connect to a sql db and add a new record. To execute this with an arg I put the cmd line command in a batch file to run it.
Now if I manually click and run the batch file it works fine and I can see the new record in my sql database, but I have created a scheduled task to run the... | 2015/06/17 | [
"https://Stackoverflow.com/questions/30889078",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2764717/"
] | The aim of the method I was saying before is to convert PDEs in ODEs, so the issues with the CFL coefficient would disappear, the problem is that the Modelica.Fluids elements just define the equations in function of the variables in both ends of each component.
i.e `dp=port_a.p-port_b.p`
but with that sort of methodo... | Modelica is a language for modeling behavior described by DAEs. As such, as long as you can create a system of ODEs, you should be able to express your problem in Modelica.
However, if your PDEs are hyperbolic, the wave dynamics in the equations might cause some issues with simulation. This is because the [CFL conditi... |
51,326,482 | What?
=====
I'm writing a React application where I have a sequential animation with delays using CSS. I'm animating the `<path />` elements in an SVG.
---
The Problem
===========
On mobiles *(less powerful than desktop devices)* the animation handles are attached *(it seems)* asynchronously. Thus, the animations a... | 2018/07/13 | [
"https://Stackoverflow.com/questions/51326482",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3909853/"
] | Did you notice that your form type is set as post instead of form method being set as post.
Change below line
```
$html .= '<form type="post" action="" id="my_form">';
```
as
```
$html .= '<form method="post" action="" id="my_form">';
```
or simply use `$_GET[];` | Try to change
name="submit" to name="whatever" |
11,502,324 | ```
<select id="number" name="number">
<option value=""></option>
<option value="1">01</option>
<option value="2" selected="selected">02</option>
<option value="3">03</option>
<option value="4" selected="selected">04</option>
<option value="5">05</option>
</select>
<span id="clear">clear all</span>
```
``... | 2012/07/16 | [
"https://Stackoverflow.com/questions/11502324",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1528399/"
] | I update my answer and this should work
```
$('#clear').click(function () {
$('#number option').each(function () {
$(this).removeAttr("selected");
});
});
``` | If you want reset the selection, use
```
$('#clear').click(function(){
$('select#number').val('');//Cause you have a blank option with value of empty string
});
``` |
11,502,324 | ```
<select id="number" name="number">
<option value=""></option>
<option value="1">01</option>
<option value="2" selected="selected">02</option>
<option value="3">03</option>
<option value="4" selected="selected">04</option>
<option value="5">05</option>
</select>
<span id="clear">clear all</span>
```
``... | 2012/07/16 | [
"https://Stackoverflow.com/questions/11502324",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1528399/"
] | try this:
API: <http://api.jquery.com/empty/>
Hope this help the cause `:)`
```
$('#clear').click(function(){
$('#number').empty();
})
``` | I update my answer and this should work
```
$('#clear').click(function () {
$('#number option').each(function () {
$(this).removeAttr("selected");
});
});
``` |
11,502,324 | ```
<select id="number" name="number">
<option value=""></option>
<option value="1">01</option>
<option value="2" selected="selected">02</option>
<option value="3">03</option>
<option value="4" selected="selected">04</option>
<option value="5">05</option>
</select>
<span id="clear">clear all</span>
```
``... | 2012/07/16 | [
"https://Stackoverflow.com/questions/11502324",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1528399/"
] | I update my answer and this should work
```
$('#clear').click(function () {
$('#number option').each(function () {
$(this).removeAttr("selected");
});
});
``` | Try this...
```
$("select#number option").remove();
``` |
11,502,324 | ```
<select id="number" name="number">
<option value=""></option>
<option value="1">01</option>
<option value="2" selected="selected">02</option>
<option value="3">03</option>
<option value="4" selected="selected">04</option>
<option value="5">05</option>
</select>
<span id="clear">clear all</span>
```
``... | 2012/07/16 | [
"https://Stackoverflow.com/questions/11502324",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1528399/"
] | try this:
API: <http://api.jquery.com/empty/>
Hope this help the cause `:)`
```
$('#clear').click(function(){
$('#number').empty();
})
``` | Try:
```
$("select#number option").attr("selected", "");
``` |
11,502,324 | ```
<select id="number" name="number">
<option value=""></option>
<option value="1">01</option>
<option value="2" selected="selected">02</option>
<option value="3">03</option>
<option value="4" selected="selected">04</option>
<option value="5">05</option>
</select>
<span id="clear">clear all</span>
```
``... | 2012/07/16 | [
"https://Stackoverflow.com/questions/11502324",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1528399/"
] | I update my answer and this should work
```
$('#clear').click(function () {
$('#number option').each(function () {
$(this).removeAttr("selected");
});
});
``` | ```
$('#clear').click(function(){
$("#number").removeAttr("selected");
})
``` |
11,502,324 | ```
<select id="number" name="number">
<option value=""></option>
<option value="1">01</option>
<option value="2" selected="selected">02</option>
<option value="3">03</option>
<option value="4" selected="selected">04</option>
<option value="5">05</option>
</select>
<span id="clear">clear all</span>
```
``... | 2012/07/16 | [
"https://Stackoverflow.com/questions/11502324",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1528399/"
] | Try this
```
$('select#number').children().removeAttr('selected');
``` | try this:
API: <http://api.jquery.com/empty/>
Hope this help the cause `:)`
```
$('#clear').click(function(){
$('#number').empty();
})
``` |
11,502,324 | ```
<select id="number" name="number">
<option value=""></option>
<option value="1">01</option>
<option value="2" selected="selected">02</option>
<option value="3">03</option>
<option value="4" selected="selected">04</option>
<option value="5">05</option>
</select>
<span id="clear">clear all</span>
```
``... | 2012/07/16 | [
"https://Stackoverflow.com/questions/11502324",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1528399/"
] | try this:
API: <http://api.jquery.com/empty/>
Hope this help the cause `:)`
```
$('#clear').click(function(){
$('#number').empty();
})
``` | ```
$('#clear').click(function(){
$("#number").removeAttr("selected");
})
``` |
11,502,324 | ```
<select id="number" name="number">
<option value=""></option>
<option value="1">01</option>
<option value="2" selected="selected">02</option>
<option value="3">03</option>
<option value="4" selected="selected">04</option>
<option value="5">05</option>
</select>
<span id="clear">clear all</span>
```
``... | 2012/07/16 | [
"https://Stackoverflow.com/questions/11502324",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1528399/"
] | Try this
```
$('select#number').children().removeAttr('selected');
``` | Try this...
```
$("select#number option").remove();
``` |
11,502,324 | ```
<select id="number" name="number">
<option value=""></option>
<option value="1">01</option>
<option value="2" selected="selected">02</option>
<option value="3">03</option>
<option value="4" selected="selected">04</option>
<option value="5">05</option>
</select>
<span id="clear">clear all</span>
```
``... | 2012/07/16 | [
"https://Stackoverflow.com/questions/11502324",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1528399/"
] | try this:
API: <http://api.jquery.com/empty/>
Hope this help the cause `:)`
```
$('#clear').click(function(){
$('#number').empty();
})
``` | If you want reset the selection, use
```
$('#clear').click(function(){
$('select#number').val('');//Cause you have a blank option with value of empty string
});
``` |
11,502,324 | ```
<select id="number" name="number">
<option value=""></option>
<option value="1">01</option>
<option value="2" selected="selected">02</option>
<option value="3">03</option>
<option value="4" selected="selected">04</option>
<option value="5">05</option>
</select>
<span id="clear">clear all</span>
```
``... | 2012/07/16 | [
"https://Stackoverflow.com/questions/11502324",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1528399/"
] | try this:
API: <http://api.jquery.com/empty/>
Hope this help the cause `:)`
```
$('#clear').click(function(){
$('#number').empty();
})
``` | Try this...
```
$("select#number option").remove();
``` |
8,865,364 | I would implement a method that receives in input two object date and calculate the time passed between these two. How can I implement something like that? Some idea? | 2012/01/14 | [
"https://Stackoverflow.com/questions/8865364",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1055637/"
] | In what units do you expect the answer? Here's one possibility:
```
public static String timeBetween(Date start, Date end) {
long timeDiff = Math.abs(end.getTime() - start.getTime());
String diff = String.format("in days: %d | in hours: %d | in minutes: %d",
TimeUnit.MILLISECONDS.toDays(timeDiff),
... | ```
public long getDifference(Date strt, Date end){
long s = strt.getTime();
long e = end.getTime();
return e-s;
}
```
Returns the number of milliseconds between the them |
8,865,364 | I would implement a method that receives in input two object date and calculate the time passed between these two. How can I implement something like that? Some idea? | 2012/01/14 | [
"https://Stackoverflow.com/questions/8865364",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1055637/"
] | In what units do you expect the answer? Here's one possibility:
```
public static String timeBetween(Date start, Date end) {
long timeDiff = Math.abs(end.getTime() - start.getTime());
String diff = String.format("in days: %d | in hours: %d | in minutes: %d",
TimeUnit.MILLISECONDS.toDays(timeDiff),
... | A very crude method would be to take the time of each date object in milliseconds and subtract them to compute a duration. With that duration, you can compute the number of seconds, minutes, days, etc in the duration.
This is a crude method because it might not be 100% accurate in all situations. For instance, dayligh... |
25,044,560 | I have a 2 Mule flows :-
...The first flow expose a SOAP Web service which perform a DB CRUD operation ... My first flow is :-
```
<flow name="ServiceFlow" doc:name="ServiceFlow">
<http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8082" path="mainData" doc:name="HTTP"/>
<cxf:jaxws-servic... | 2014/07/30 | [
"https://Stackoverflow.com/questions/25044560",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2525231/"
] | You can remove the `custom-transformer` because it really doesn't do anything useful for you.
I believe the original:
>
> unable to marshal type "com.test.services.schema.maindata.v1.DataResponse as an element because it is missing an @XmlRootElement annotation
>
>
>
issue was due to the fact that Mule needed a ... | So as per David's suggestion the final solution is using a `object-to-json-transformer` or `object-to-xml-transformer` or `object-to-string-transformer` any one can be used here to marshal the Response Object |
1,912,624 | Lots of people will be familiar with the second-order principle asserting that certain properties are reflected to $V\_\alpha$. For a second-order formula $\phi$, parameter $A$, and relativisation of quantifiers and parameters to $V\_\alpha$, we can have:
$\phi(A) \rightarrow \exists \alpha V\_\alpha \models \phi^{V\_... | 2016/09/02 | [
"https://math.stackexchange.com/questions/1912624",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/70462/"
] | The geometric interpretation is that if you make a plot, with the independent axis being values of $s$, and the dependent axis being velocities $v$ encountered when the particle is at $s$, then the slope of that plot will always be the acceleration encountered when the particle was at $s$, divided by the height ($v$) o... | if you have parmetric curves.
$x = f(t), y = g(t)$
$\frac {dy}{dx} = \frac {dy}{dt}\frac {dt}{dx} = \frac {g'(t)}{f'(t)}$
I am not sure that really helps. But if you consider a small interval of $t.$
then $(x(t), y(t))$ is approximately linear over that interval.
$\frac {dy}{dt}$ is the rise of the line.
$\frac {dx... |
2,613,952 | **[Updated, sorry about the change but now to the real problem]**
I cannot include try-catch-loop there for the exception from the method getCanonicalPath(). I tried to solve the problem earlier with method and then declaring the value there. The problem is that it is Final, I am unable to change it. So how to have sta... | 2010/04/10 | [
"https://Stackoverflow.com/questions/2613952",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/164148/"
] | The name is fine; you forgot to declare the type.
```
public static final String startingPath;
// ^^^^^^
```
---
Fixing that, you of course realize the harder problem of how to deal with the possible `IOException` and `startingPath` being `final`. One way is to use a `static` initializer:
### [JLS... | You are missing the type of your variable, it should be
```
public static void String startingPath ...
``` |
2,613,952 | **[Updated, sorry about the change but now to the real problem]**
I cannot include try-catch-loop there for the exception from the method getCanonicalPath(). I tried to solve the problem earlier with method and then declaring the value there. The problem is that it is Final, I am unable to change it. So how to have sta... | 2010/04/10 | [
"https://Stackoverflow.com/questions/2613952",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/164148/"
] | The name is fine; you forgot to declare the type.
```
public static final String startingPath;
// ^^^^^^
```
---
Fixing that, you of course realize the harder problem of how to deal with the possible `IOException` and `startingPath` being `final`. One way is to use a `static` initializer:
### [JLS... | ```
public static final String startingPath = (new File(".")).getCanonicalPath();
```
You are missing the type of variable `startingPath` |
2,613,952 | **[Updated, sorry about the change but now to the real problem]**
I cannot include try-catch-loop there for the exception from the method getCanonicalPath(). I tried to solve the problem earlier with method and then declaring the value there. The problem is that it is Final, I am unable to change it. So how to have sta... | 2010/04/10 | [
"https://Stackoverflow.com/questions/2613952",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/164148/"
] | The name is fine; you forgot to declare the type.
```
public static final String startingPath;
// ^^^^^^
```
---
Fixing that, you of course realize the harder problem of how to deal with the possible `IOException` and `startingPath` being `final`. One way is to use a `static` initializer:
### [JLS... | Just initialize it in the static block(the variable is final). You can't catch exceptions on declaring a variable. |
2,613,952 | **[Updated, sorry about the change but now to the real problem]**
I cannot include try-catch-loop there for the exception from the method getCanonicalPath(). I tried to solve the problem earlier with method and then declaring the value there. The problem is that it is Final, I am unable to change it. So how to have sta... | 2010/04/10 | [
"https://Stackoverflow.com/questions/2613952",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/164148/"
] | Just initialize it in the static block(the variable is final). You can't catch exceptions on declaring a variable. | You are missing the type of your variable, it should be
```
public static void String startingPath ...
``` |
2,613,952 | **[Updated, sorry about the change but now to the real problem]**
I cannot include try-catch-loop there for the exception from the method getCanonicalPath(). I tried to solve the problem earlier with method and then declaring the value there. The problem is that it is Final, I am unable to change it. So how to have sta... | 2010/04/10 | [
"https://Stackoverflow.com/questions/2613952",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/164148/"
] | You can provide a static method to initialize your static variable:
```
public static final String startingPath = initPath();
private static String initPath() {
try {
return new File(".").getCanonicalPath();
} catch (IOException e) {
throw new RuntimeException("Got I/O exception during initial... | You are missing the type of your variable, it should be
```
public static void String startingPath ...
``` |
2,613,952 | **[Updated, sorry about the change but now to the real problem]**
I cannot include try-catch-loop there for the exception from the method getCanonicalPath(). I tried to solve the problem earlier with method and then declaring the value there. The problem is that it is Final, I am unable to change it. So how to have sta... | 2010/04/10 | [
"https://Stackoverflow.com/questions/2613952",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/164148/"
] | Just initialize it in the static block(the variable is final). You can't catch exceptions on declaring a variable. | ```
public static final String startingPath = (new File(".")).getCanonicalPath();
```
You are missing the type of variable `startingPath` |
2,613,952 | **[Updated, sorry about the change but now to the real problem]**
I cannot include try-catch-loop there for the exception from the method getCanonicalPath(). I tried to solve the problem earlier with method and then declaring the value there. The problem is that it is Final, I am unable to change it. So how to have sta... | 2010/04/10 | [
"https://Stackoverflow.com/questions/2613952",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/164148/"
] | You can provide a static method to initialize your static variable:
```
public static final String startingPath = initPath();
private static String initPath() {
try {
return new File(".").getCanonicalPath();
} catch (IOException e) {
throw new RuntimeException("Got I/O exception during initial... | ```
public static final String startingPath = (new File(".")).getCanonicalPath();
```
You are missing the type of variable `startingPath` |
2,613,952 | **[Updated, sorry about the change but now to the real problem]**
I cannot include try-catch-loop there for the exception from the method getCanonicalPath(). I tried to solve the problem earlier with method and then declaring the value there. The problem is that it is Final, I am unable to change it. So how to have sta... | 2010/04/10 | [
"https://Stackoverflow.com/questions/2613952",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/164148/"
] | You can provide a static method to initialize your static variable:
```
public static final String startingPath = initPath();
private static String initPath() {
try {
return new File(".").getCanonicalPath();
} catch (IOException e) {
throw new RuntimeException("Got I/O exception during initial... | Just initialize it in the static block(the variable is final). You can't catch exceptions on declaring a variable. |
11,071,163 | What is the best way to sort the points(first based on x co-ordinate and if x is same then on y co-ordinate and if y is same then based on z co-ordinate and so on.) in java without implementing sorting algorithm?
In c++ it can be done very easily(as follows) with the help of pairs.
For 2D:
```
Vector < pair < int,... | 2012/06/17 | [
"https://Stackoverflow.com/questions/11071163",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1016032/"
] | You don't need to implement a sorting algorithm. You just need to implement a comparator, which can then be used with [`Collections.sort()`](http://docs.oracle.com/javase/6/docs/api/java/util/Collections.html#sort%28java.util.List%2C%20java.util.Comparator%29).
See [*Object Ordering*](http://docs.oracle.com/javase/tut... | There are few options in Java.
1. `Collections.sort(List l)`
Use `java.lang.Comparable // For sorting only on the basis of one property`
2. `Collections.sort(List l, Comparator c)`
Use `java.util.Comparator // For sorting in more than one way`
3. If Uniqueness is needed, along with Sorting use `TreeSet()`
```
TreeS... |
69,312 | To my Spanish ears, the acronym PIGS (for Portugal, Italy, Greece and Spain) or PIIGS (for Portugal, Italy, Ireland, Greece and Spain) sounds offensive. The Spanish equivalent “cerdo” is a strong word rarely said in jest. In other cultures, the concept is perhaps even more vexing.
It puzzles me that the international ... | 2012/05/29 | [
"https://english.stackexchange.com/questions/69312",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/20545/"
] | *Pig* has a wide range of figurative uses - They're nearly all "unfavourable", but they're certainly not all "offensive". For example...
>
> A wall where the bricks aren't laid level is said to [have a pig in it](http://books.google.co.uk/books?id=B2-XsRucYIcC&pg=PA73&lpg=PA73&dq=bricklaying%20pig%20joint&source=bl&o... | The Financial Times and Barclays Capital [determined](http://ftalphaville.ft.com/blog/2010/02/05/142451/anything-but-porcine-at-barcap/) they wouldn't use the acronym PIIGS (and would instead spell out the countries it represents) in 2005 because "it can be construed as having pejorative undertones." The [Wikipedia ent... |
69,312 | To my Spanish ears, the acronym PIGS (for Portugal, Italy, Greece and Spain) or PIIGS (for Portugal, Italy, Ireland, Greece and Spain) sounds offensive. The Spanish equivalent “cerdo” is a strong word rarely said in jest. In other cultures, the concept is perhaps even more vexing.
It puzzles me that the international ... | 2012/05/29 | [
"https://english.stackexchange.com/questions/69312",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/20545/"
] | In the United States pig is associated with having a big appetite, with "pigging out" - something one can admit to without loss of status. It's also used in the surrealistic or apocalyptic image of "when pigs fly," and to connote messiness (but not dirtiness) as in "your room is a pig pen." It's an amusing image, but d... | The Financial Times and Barclays Capital [determined](http://ftalphaville.ft.com/blog/2010/02/05/142451/anything-but-porcine-at-barcap/) they wouldn't use the acronym PIIGS (and would instead spell out the countries it represents) in 2005 because "it can be construed as having pejorative undertones." The [Wikipedia ent... |
20,077,839 | I know it is possible to wildcard with multiple types in case of methods and classes but what about variables? E.g. can I require an ArrayList to only take elements that implement both of two different interfaces that are not in the same type hierarchy? See code below for what I am trying to do.
```
import java.util.... | 2013/11/19 | [
"https://Stackoverflow.com/questions/20077839",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2425124/"
] | Yes:
```
class C<T extends A & B> {
ArrayList<T> field;
public <T2 extends A & B> void method() {
ArrayList<T2> localVar;
}
}
```
It looks a bit odd that you have to define an alias for the generic "type" outside of the scope where you use it but it works. I find it's easiest to see with the met... | Java does not support multiple inheritance of classes - a class can extend only one single class (although a class can implement multiple interfaces). Hence I believe the
```
ArrayList<? extends A & B>
```
doesn't work.
Solution would be create a super type that extends both A & B and then pass the type to your me... |
180,596 | I'm trying to troubleshoot some wifi issues I'm having after I updated to Yosemite. I'm using *Wireless Diagnostics* to try to figure out what channel I should force my network on because I noticed events such as `kernel[0]: wl0: Roamed or switched channel, reason #8, bssid ...` very close in time to when my connection... | 2015/04/12 | [
"https://apple.stackexchange.com/questions/180596",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/26742/"
] | As determined in comments above, it seems as though your scrollbar settings were the problem :) I guess System Information is doing something unconventional with its window size due to the space taken up by the scrollbar when it's set to show Always... | When the scroll bars are shown, System Information seems to set its margins based on the window size when it's opened. So what happens is you widen the window to show more info, then quit, then reopen it, and then find you have to widen the window *more* to get the margins wide enough. This cycle repeats until you can'... |
3,087,902 | I'm having trouble with the following question:
Suppose we have three, six-sided dice. These are the numbers on the sides of the dice:
1. {1, 2, 3, 4, 5, 6} (regular die)
2. {2, 2, 3, 4, 5, 5} (irregular die)
3. {1, 1, 2, 3, 4, 5} (irregular die)
First, we randomly select a die. Then we roll it three times and get 2... | 2019/01/26 | [
"https://math.stackexchange.com/questions/3087902",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/638363/"
] | You really should keep the domain in mind when talking about antiderivatives and indefinite integrals. For instance, many people will write
$$ \int \frac1x \,dx = \log|x| + C $$
and possibly I'm in the minority for being bothered by this, but really $\frac1x$ has two separate indefinite integrals: one on $(0,\infty)$... | It doesn't matter because derivarives and integrals are defined with limits. This takes care of any removable discontinuities (holes).
As to whole areas where the function is not defined (like the area left of the y axis for $f(x)=\sqrt{x}$), the derivative/integral of that function will be undefined in this area too,... |
3,087,902 | I'm having trouble with the following question:
Suppose we have three, six-sided dice. These are the numbers on the sides of the dice:
1. {1, 2, 3, 4, 5, 6} (regular die)
2. {2, 2, 3, 4, 5, 5} (irregular die)
3. {1, 1, 2, 3, 4, 5} (irregular die)
First, we randomly select a die. Then we roll it three times and get 2... | 2019/01/26 | [
"https://math.stackexchange.com/questions/3087902",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/638363/"
] | Let us say any function $f(x)$ is given. Now the domain of any function is the range of values of $x$for which the function is defined. Now the there are two more things regarding integrals, one is indefinite and other is definite.Let $f(x)=\cos(x)$ then the indefinite integral gives:
**$$\int\_{}^{}\cos(x) dx = \sin(... | It doesn't matter because derivarives and integrals are defined with limits. This takes care of any removable discontinuities (holes).
As to whole areas where the function is not defined (like the area left of the y axis for $f(x)=\sqrt{x}$), the derivative/integral of that function will be undefined in this area too,... |
3,087,902 | I'm having trouble with the following question:
Suppose we have three, six-sided dice. These are the numbers on the sides of the dice:
1. {1, 2, 3, 4, 5, 6} (regular die)
2. {2, 2, 3, 4, 5, 5} (irregular die)
3. {1, 1, 2, 3, 4, 5} (irregular die)
First, we randomly select a die. Then we roll it three times and get 2... | 2019/01/26 | [
"https://math.stackexchange.com/questions/3087902",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/638363/"
] | You really should keep the domain in mind when talking about antiderivatives and indefinite integrals. For instance, many people will write
$$ \int \frac1x \,dx = \log|x| + C $$
and possibly I'm in the minority for being bothered by this, but really $\frac1x$ has two separate indefinite integrals: one on $(0,\infty)$... | Let us say any function $f(x)$ is given. Now the domain of any function is the range of values of $x$for which the function is defined. Now the there are two more things regarding integrals, one is indefinite and other is definite.Let $f(x)=\cos(x)$ then the indefinite integral gives:
**$$\int\_{}^{}\cos(x) dx = \sin(... |
10,819,050 | all,
I am really stuck on a very basic concept - I just cannot find an answer that I really understand.
I have a view - viewContacts. Its datacontext is a viewmodel - viewmodelContacts.
On the view I have a combobox for 'titles' (you know ... Mr, Mrs, Miss, etc). I want to bind the itemssource so it shows a list of ... | 2012/05/30 | [
"https://Stackoverflow.com/questions/10819050",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/730999/"
] | In your viewModel create a property like so:
```
public IList<Title> VmTitles
{
get
{
return Titles.GetTitles();
}
}
private Title _selectedTitle;
public Title SelectedTitle
{
get
{
return _selectedTitle;
}
set
{
if (value != _selectedTitle)
{
... | ```
<ComboBox x:Name="cboTitle" SelectedValuePath="TitleId" DisplayValuePath="Description" SelectedValue="{Binding PropertyToBeUpdatedHere}"/>
```
then set the combo box's item source in your code..
```
cboTitle.ItemsSource = Titles.GetTitles();
``` |
10,819,050 | all,
I am really stuck on a very basic concept - I just cannot find an answer that I really understand.
I have a view - viewContacts. Its datacontext is a viewmodel - viewmodelContacts.
On the view I have a combobox for 'titles' (you know ... Mr, Mrs, Miss, etc). I want to bind the itemssource so it shows a list of ... | 2012/05/30 | [
"https://Stackoverflow.com/questions/10819050",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/730999/"
] | ```
<ComboBox x:Name="cboTitle" SelectedValuePath="TitleId" DisplayValuePath="Description" SelectedValue="{Binding PropertyToBeUpdatedHere}"/>
```
then set the combo box's item source in your code..
```
cboTitle.ItemsSource = Titles.GetTitles();
``` | simply use a ObjectDataProvider.
```
<UserControl.Resources>
<ObjectDataProvider x:Key="cboSource" ObjectType="local:Titles" MethodName="GetTitles"/>
</UserControl.Resources>
<ComboBox ItemsSource="{Binding Source={StaticResource cboSource}}">
<ComboBox.ItemTemplate>
<DataTemplate>
... |
10,819,050 | all,
I am really stuck on a very basic concept - I just cannot find an answer that I really understand.
I have a view - viewContacts. Its datacontext is a viewmodel - viewmodelContacts.
On the view I have a combobox for 'titles' (you know ... Mr, Mrs, Miss, etc). I want to bind the itemssource so it shows a list of ... | 2012/05/30 | [
"https://Stackoverflow.com/questions/10819050",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/730999/"
] | In your viewModel create a property like so:
```
public IList<Title> VmTitles
{
get
{
return Titles.GetTitles();
}
}
private Title _selectedTitle;
public Title SelectedTitle
{
get
{
return _selectedTitle;
}
set
{
if (value != _selectedTitle)
{
... | simply use a ObjectDataProvider.
```
<UserControl.Resources>
<ObjectDataProvider x:Key="cboSource" ObjectType="local:Titles" MethodName="GetTitles"/>
</UserControl.Resources>
<ComboBox ItemsSource="{Binding Source={StaticResource cboSource}}">
<ComboBox.ItemTemplate>
<DataTemplate>
... |
14,657,999 | I have a circle that I want to bounce, so it would expand in width, and collapse in height, then the reverse and the same for a few times. That all works with a few ScaleAnimations in a row. The problem is, that I want pivotY to be the bottom of the view. In this case every time a new animation starts it'll reset the p... | 2013/02/02 | [
"https://Stackoverflow.com/questions/14657999",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/961223/"
] | I ended up writing my own custom Animation that basically does 4 scale animations in a row:
```
public class BounceAnimation extends Animation {
private final List<Float> expansionValuesX;
private final List<Float> expansionValuesY;
private final List<Float> timing;
private int currentTimingIndex;
... | Just because you animate something doesn't mean you have changed it (see [previous discussion](https://stackoverflow.com/a/3883428/1337257)).
You may want to modify the `onAnimationEnd()` method to make the effect of your animations permanent before starting another animation.
Alternatively, use an [AnimationSet](htt... |
45,793,032 | All my folders and sub-folders index page has been replaced by custom hacker's index page
The image that display when I run my webpage
[](https://i.stack.imgur.com/zhKGj.png) | 2017/08/21 | [
"https://Stackoverflow.com/questions/45793032",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6769607/"
] | Currently issue in you code is, when you passing string in function you need to the sequence of inverted comma's. for example while using "", you can use only '' single inverted comma's inside of it.
```html
<script>
function pictureChange(path) {
console.log(path);
document.getElementById("theImage").src=path;
}
... | Now it's working, your "" were confusing the browser cause you can't nest with the same char, you must alternate " and ' when you nest
```js
function pictureChange(path) {
console.log(path);
document.getElementById("theImage").src=path;
}
```
```html
<img id="theImage" src="http://31.media.tumblr.com/18b5f8f0a00ad... |
45,793,032 | All my folders and sub-folders index page has been replaced by custom hacker's index page
The image that display when I run my webpage
[](https://i.stack.imgur.com/zhKGj.png) | 2017/08/21 | [
"https://Stackoverflow.com/questions/45793032",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6769607/"
] | Currently issue in you code is, when you passing string in function you need to the sequence of inverted comma's. for example while using "", you can use only '' single inverted comma's inside of it.
```html
<script>
function pictureChange(path) {
console.log(path);
document.getElementById("theImage").src=path;
}
... | U wrong on use symbols `"`.
Inside `onclick` function `pictureChange` u had symbol `"` then html throw syntax error.
u need use symbol `'` changing for `"`
`onclick="pictureChange('http://31.media.tumblr.com/fca646cd8fe87906e605ad7e8d039903/tumblr_mmoz4fWT6U1soh1p8o1_500.png')"`
Good luck! |
45,793,032 | All my folders and sub-folders index page has been replaced by custom hacker's index page
The image that display when I run my webpage
[](https://i.stack.imgur.com/zhKGj.png) | 2017/08/21 | [
"https://Stackoverflow.com/questions/45793032",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6769607/"
] | Currently issue in you code is, when you passing string in function you need to the sequence of inverted comma's. for example while using "", you can use only '' single inverted comma's inside of it.
```html
<script>
function pictureChange(path) {
console.log(path);
document.getElementById("theImage").src=path;
}
... | Current error so far with your code
```
onclick="pictureChange('http://31.media.tumblr.com/fca646cd8fe87906e605ad7e8d039903/tumblr_mmoz4fWT6U1soh1p8o1_500.png')"
```
You got confused with quote. Wrap with single quote if your outer quotes are double quotes.
>
> currently only the single button. On button click I w... |
45,793,032 | All my folders and sub-folders index page has been replaced by custom hacker's index page
The image that display when I run my webpage
[](https://i.stack.imgur.com/zhKGj.png) | 2017/08/21 | [
"https://Stackoverflow.com/questions/45793032",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6769607/"
] | Now it's working, your "" were confusing the browser cause you can't nest with the same char, you must alternate " and ' when you nest
```js
function pictureChange(path) {
console.log(path);
document.getElementById("theImage").src=path;
}
```
```html
<img id="theImage" src="http://31.media.tumblr.com/18b5f8f0a00ad... | U wrong on use symbols `"`.
Inside `onclick` function `pictureChange` u had symbol `"` then html throw syntax error.
u need use symbol `'` changing for `"`
`onclick="pictureChange('http://31.media.tumblr.com/fca646cd8fe87906e605ad7e8d039903/tumblr_mmoz4fWT6U1soh1p8o1_500.png')"`
Good luck! |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.