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 |
|---|---|---|---|---|---|
542,564 | I'm trying to integrate analytics into my GWT application. To do this, I'm calling a service that returns a String of HTML that needs to be parsed and eval'ed.
I need a regex that looks for and grabs either 1) the body of the tag or 2) the contents of the "src" attribute. I want to eval both of these with JavaScript.... | 2009/02/12 | [
"https://Stackoverflow.com/questions/542564",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/65681/"
] | This seems to do what you want:
```
final String srcOne = "<html>\r\n<head>\r\n<script src=\"http://test.com/some.js\"/>\r\n</head></html>";
final String srcTwo = "<html>\r\n<head>\r\n<script src=\"http://test.com/some.js\"></script>\r\n</head></html>";
final String tag = "<html>\r\n<head>\r\n<script>\r\nf... | Thanks for all the great suggestions everyone. I quickly discovered it's not possible to use Java's Regex API in GWT and was able to do what I wanted with JSNI.
```
public static native String evalJS(Element e) /*-{
var scripts = e.getElementsByTagName("script");
for (i=0; i < scripts.length; i++) {
/... |
542,564 | I'm trying to integrate analytics into my GWT application. To do this, I'm calling a service that returns a String of HTML that needs to be parsed and eval'ed.
I need a regex that looks for and grabs either 1) the body of the tag or 2) the contents of the "src" attribute. I want to eval both of these with JavaScript.... | 2009/02/12 | [
"https://Stackoverflow.com/questions/542564",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/65681/"
] | You could use something like this:
```
String ScriptPattern = "<script\b([^>]+)>(.*?)</script>"
Pattern ScriptRegex = Pattern.compile(ScriptPattern, Pattern.CASE_INSENSITIVE);
```
The regex uses the lazy star quantifier and should work in most cases but it could certainly be improved upon.
It will match in $1 ... | How about
```
<script>(.*)</script>|<script src="(.*)">.*</script>
```
to start with. You may need to customize it a bit to
1. accept the src attribute with single quotes or without quotes.
2. ignore white between the '<script' and '>'
You also must use the [DOTALL](http://java.sun.com/j2se/1.4.2/docs/api/java/u... |
542,564 | I'm trying to integrate analytics into my GWT application. To do this, I'm calling a service that returns a String of HTML that needs to be parsed and eval'ed.
I need a regex that looks for and grabs either 1) the body of the tag or 2) the contents of the "src" attribute. I want to eval both of these with JavaScript.... | 2009/02/12 | [
"https://Stackoverflow.com/questions/542564",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/65681/"
] | Must it be a regex? You can use the DOM to obtain such information, here is a trivial example of getting the contents of the BODY tag, you could apply it to whatever you like:
```
function test(){
var body = document.getElementsByTagName("body")[0];
alert(body.innerHTML);
}
``` | How about
```
<script>(.*)</script>|<script src="(.*)">.*</script>
```
to start with. You may need to customize it a bit to
1. accept the src attribute with single quotes or without quotes.
2. ignore white between the '<script' and '>'
You also must use the [DOTALL](http://java.sun.com/j2se/1.4.2/docs/api/java/u... |
542,564 | I'm trying to integrate analytics into my GWT application. To do this, I'm calling a service that returns a String of HTML that needs to be parsed and eval'ed.
I need a regex that looks for and grabs either 1) the body of the tag or 2) the contents of the "src" attribute. I want to eval both of these with JavaScript.... | 2009/02/12 | [
"https://Stackoverflow.com/questions/542564",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/65681/"
] | You could use something like this:
```
String ScriptPattern = "<script\b([^>]+)>(.*?)</script>"
Pattern ScriptRegex = Pattern.compile(ScriptPattern, Pattern.CASE_INSENSITIVE);
```
The regex uses the lazy star quantifier and should work in most cases but it could certainly be improved upon.
It will match in $1 ... | Thanks for all the great suggestions everyone. I quickly discovered it's not possible to use Java's Regex API in GWT and was able to do what I wanted with JSNI.
```
public static native String evalJS(Element e) /*-{
var scripts = e.getElementsByTagName("script");
for (i=0; i < scripts.length; i++) {
/... |
542,564 | I'm trying to integrate analytics into my GWT application. To do this, I'm calling a service that returns a String of HTML that needs to be parsed and eval'ed.
I need a regex that looks for and grabs either 1) the body of the tag or 2) the contents of the "src" attribute. I want to eval both of these with JavaScript.... | 2009/02/12 | [
"https://Stackoverflow.com/questions/542564",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/65681/"
] | This seems to do what you want:
```
final String srcOne = "<html>\r\n<head>\r\n<script src=\"http://test.com/some.js\"/>\r\n</head></html>";
final String srcTwo = "<html>\r\n<head>\r\n<script src=\"http://test.com/some.js\"></script>\r\n</head></html>";
final String tag = "<html>\r\n<head>\r\n<script>\r\nf... | How about
```
<script>(.*)</script>|<script src="(.*)">.*</script>
```
to start with. You may need to customize it a bit to
1. accept the src attribute with single quotes or without quotes.
2. ignore white between the '<script' and '>'
You also must use the [DOTALL](http://java.sun.com/j2se/1.4.2/docs/api/java/u... |
542,564 | I'm trying to integrate analytics into my GWT application. To do this, I'm calling a service that returns a String of HTML that needs to be parsed and eval'ed.
I need a regex that looks for and grabs either 1) the body of the tag or 2) the contents of the "src" attribute. I want to eval both of these with JavaScript.... | 2009/02/12 | [
"https://Stackoverflow.com/questions/542564",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/65681/"
] | Must it be a regex? You can use the DOM to obtain such information, here is a trivial example of getting the contents of the BODY tag, you could apply it to whatever you like:
```
function test(){
var body = document.getElementsByTagName("body")[0];
alert(body.innerHTML);
}
``` | To match the body of the tag, you can try something like
```
<script[^>]*?>(.*?)</script>
```
which you want to match case-insensitively. Works assuming there is no "" appearing in the actual script body and no ">" in the attributes for the tag. You can add whitespace globbers to the regexp to make it more robust. N... |
542,564 | I'm trying to integrate analytics into my GWT application. To do this, I'm calling a service that returns a String of HTML that needs to be parsed and eval'ed.
I need a regex that looks for and grabs either 1) the body of the tag or 2) the contents of the "src" attribute. I want to eval both of these with JavaScript.... | 2009/02/12 | [
"https://Stackoverflow.com/questions/542564",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/65681/"
] | This seems to do what you want:
```
final String srcOne = "<html>\r\n<head>\r\n<script src=\"http://test.com/some.js\"/>\r\n</head></html>";
final String srcTwo = "<html>\r\n<head>\r\n<script src=\"http://test.com/some.js\"></script>\r\n</head></html>";
final String tag = "<html>\r\n<head>\r\n<script>\r\nf... | To match the body of the tag, you can try something like
```
<script[^>]*?>(.*?)</script>
```
which you want to match case-insensitively. Works assuming there is no "" appearing in the actual script body and no ">" in the attributes for the tag. You can add whitespace globbers to the regexp to make it more robust. N... |
68,170,594 | I am trying to position an overlayed image in the top left corner of my chart.
To that end, I am using the `aggregate` transform directly in the encoding of channels x, and y of the image, as it can be seen [in this example](https://vega.github.io/editor/#/url/vega-lite/N4IgJAzgxgFgpgWwIYgFwhgF0wBwqgegIDc4BzJAOjIEtMYB... | 2021/06/28 | [
"https://Stackoverflow.com/questions/68170594",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6460253/"
] | You can flatten the list and then sum it:
```py
lst = [10, 5, [1, [5, 4, 3]], 9, [1, 1, [2, 3]]]
def flatten(l):
if isinstance(l, list):
for v in l:
yield from flatten(v)
else:
yield l
out = sum(flatten(lst))
print(out)
```
Prints:
```
44
``` | You could also write a recursive function that does the summation:
```
def my_sum(x):
value = 0
for i in x:
if not isinstance(i, list):
value += i
else:
value += my_sum(i)
return value
my_sum(lst)
44
``` |
68,170,594 | I am trying to position an overlayed image in the top left corner of my chart.
To that end, I am using the `aggregate` transform directly in the encoding of channels x, and y of the image, as it can be seen [in this example](https://vega.github.io/editor/#/url/vega-lite/N4IgJAzgxgFgpgWwIYgFwhgF0wBwqgegIDc4BzJAOjIEtMYB... | 2021/06/28 | [
"https://Stackoverflow.com/questions/68170594",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6460253/"
] | You can flatten the list and then sum it:
```py
lst = [10, 5, [1, [5, 4, 3]], 9, [1, 1, [2, 3]]]
def flatten(l):
if isinstance(l, list):
for v in l:
yield from flatten(v)
else:
yield l
out = sum(flatten(lst))
print(out)
```
Prints:
```
44
``` | Using a recursive function should work :
```
def your_function(embeded_list):
n = len(embeded_list)
sum = 0
for i in range(n) :
if len(embeded_list[i]) == 1 :
sum+=embeded_list[i]
else :
sum+=your_function(embeded_list[i])
return(sum)
``` |
68,170,594 | I am trying to position an overlayed image in the top left corner of my chart.
To that end, I am using the `aggregate` transform directly in the encoding of channels x, and y of the image, as it can be seen [in this example](https://vega.github.io/editor/#/url/vega-lite/N4IgJAzgxgFgpgWwIYgFwhgF0wBwqgegIDc4BzJAOjIEtMYB... | 2021/06/28 | [
"https://Stackoverflow.com/questions/68170594",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6460253/"
] | You could also write a recursive function that does the summation:
```
def my_sum(x):
value = 0
for i in x:
if not isinstance(i, list):
value += i
else:
value += my_sum(i)
return value
my_sum(lst)
44
``` | Using a recursive function should work :
```
def your_function(embeded_list):
n = len(embeded_list)
sum = 0
for i in range(n) :
if len(embeded_list[i]) == 1 :
sum+=embeded_list[i]
else :
sum+=your_function(embeded_list[i])
return(sum)
``` |
382,059 | I want a class A, and I want the relation that A can have zero or one X.
So I wrote this class:
```
public class A {
private X x = null;
public A() {}
public A(X x) { this.x = x; }
public boolean hasX() {
if(x==null)
return false;
return true;
}
public void setX(X... | 2018/11/26 | [
"https://softwareengineering.stackexchange.com/questions/382059",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/283695/"
] | As of Java 8, this is best handled via the [Optional](https://docs.oracle.com/javase/8/docs/api/java/util/Optional.html) type:
```
public class A {
private Optional<X> x = Optional.empty();
public A() {}
public A(X x) { this.x = Optional.of(x); }
public void setX(X x) { this.x = Optional.ofNullable(x... | Alternately always have one. Use a Null Object.
ie.
```
class NullX extends/implements X
{
//implement with noops
}
```
Now always assign the value an object. This has the advantage of obviating any null, or has a checks. It is a variable, it isn't null, and it can be interacted with without surprise.
Obviousl... |
49,956,012 | ```
fun kullaniciOlustur2(view: View){
val intent = Intent(applicationContext,KullaniciOlustur2::class.java)
intent.putExtra("input",makeUsername.text.toString())
intent.putExtra("input2",makeUserphone.text.toString())
startActivity(intent)
}
```
Mainactivity2 starts here..bef... | 2018/04/21 | [
"https://Stackoverflow.com/questions/49956012",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5648104/"
] | Try this code
>
> Activity 1
>
>
>
```
val intent = Intent(FirstActivity.this,SecondActivity::class.java) //not application context
intent.putExtra("input",makeUsername.text.toString())
intent.putExtra("input2",makeUserphone.text.toString())
startActivity(intent)
```
>
> Activity 2
>
>
>
inside onCreate() ... | I recommend using Kotlin Anko, there are plenty of methods that will help you to remove this boilerplate code
check Anko Intents [here](https://github.com/Kotlin/anko/wiki/Anko-Commons-%E2%80%93-Intents) |
49,956,012 | ```
fun kullaniciOlustur2(view: View){
val intent = Intent(applicationContext,KullaniciOlustur2::class.java)
intent.putExtra("input",makeUsername.text.toString())
intent.putExtra("input2",makeUserphone.text.toString())
startActivity(intent)
}
```
Mainactivity2 starts here..bef... | 2018/04/21 | [
"https://Stackoverflow.com/questions/49956012",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5648104/"
] | I recommend using Kotlin Anko, there are plenty of methods that will help you to remove this boilerplate code
check Anko Intents [here](https://github.com/Kotlin/anko/wiki/Anko-Commons-%E2%80%93-Intents) | **Use Below Code:**
The Code is same as Java .Just difference is kotlin do not have
1. No semicolon at the end.
2. to call another activity kotlin use ::
ex.KotlinActivity::class.java
```
startActivity(Intent(this, KotlinActivity::class.java).putExtra("DataTrasfer", ""))
```
**To Get Value:**
```
intent.getStri... |
49,956,012 | ```
fun kullaniciOlustur2(view: View){
val intent = Intent(applicationContext,KullaniciOlustur2::class.java)
intent.putExtra("input",makeUsername.text.toString())
intent.putExtra("input2",makeUserphone.text.toString())
startActivity(intent)
}
```
Mainactivity2 starts here..bef... | 2018/04/21 | [
"https://Stackoverflow.com/questions/49956012",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5648104/"
] | Try this code
>
> Activity 1
>
>
>
```
val intent = Intent(FirstActivity.this,SecondActivity::class.java) //not application context
intent.putExtra("input",makeUsername.text.toString())
intent.putExtra("input2",makeUserphone.text.toString())
startActivity(intent)
```
>
> Activity 2
>
>
>
inside onCreate() ... | **Use Below Code:**
The Code is same as Java .Just difference is kotlin do not have
1. No semicolon at the end.
2. to call another activity kotlin use ::
ex.KotlinActivity::class.java
```
startActivity(Intent(this, KotlinActivity::class.java).putExtra("DataTrasfer", ""))
```
**To Get Value:**
```
intent.getStri... |
47,094 | Let $F:\mathscr{A} \to \mathscr{C}$ and $G:\mathscr{C} \to \mathscr{A}$ be an adjoint pair of functors.
I am trying to show $G$ preserves products and $F$ preserves coproducts.
So to start we have a bijection
$\tau\_{AC}:\operatorname{Hom}(FA,C) \to \operatorname{Hom}(A,GC)$
as well as the normal naturality diagr... | 2011/06/23 | [
"https://math.stackexchange.com/questions/47094",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/2219/"
] | Do you know that $\hom(X,-)$ preserves products, don't you? Then, you can use the chain of isomorphism
$\hom(A,G(C\_1\times C\_2))\cong\hom(F(A),C\_1\times C\_2)\cong$
$\cong\hom(F(A),C\_1)\times\hom(F(A),C\_2)\cong$
$\cong\hom(A,G(C\_1))\times \hom(A,G(C\_2))\cong
\hom(A,G(C\_1)\times G(C\_2))$
Now if $\hom(A,X)... | You were close, but you missed the point of universality, so let me do the argument you had in mind, instead of a different one (the route chosen by tetrapharmakon). I agree that tetrapharmakon's argument is the efficient way to go, but I think it's a worthwhile exercise to do it without implicitly appealing to Yoneda.... |
47,094 | Let $F:\mathscr{A} \to \mathscr{C}$ and $G:\mathscr{C} \to \mathscr{A}$ be an adjoint pair of functors.
I am trying to show $G$ preserves products and $F$ preserves coproducts.
So to start we have a bijection
$\tau\_{AC}:\operatorname{Hom}(FA,C) \to \operatorname{Hom}(A,GC)$
as well as the normal naturality diagr... | 2011/06/23 | [
"https://math.stackexchange.com/questions/47094",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/2219/"
] | Do you know that $\hom(X,-)$ preserves products, don't you? Then, you can use the chain of isomorphism
$\hom(A,G(C\_1\times C\_2))\cong\hom(F(A),C\_1\times C\_2)\cong$
$\cong\hom(F(A),C\_1)\times\hom(F(A),C\_2)\cong$
$\cong\hom(A,G(C\_1))\times \hom(A,G(C\_2))\cong
\hom(A,G(C\_1)\times G(C\_2))$
Now if $\hom(A,X)... | Suppose we have an adjunction as in your question $F \dashv G $, and a product $A\times B$ with projections $\pi\_1 : A\times B\rightarrow A$ and $\pi\_1 : A\times B\rightarrow B$. If we want to show $G$ preserves the product $A\times B$ we need only show that $G(A\times B)$ with the projections maps $G(\pi\_1) : G(A\t... |
47,094 | Let $F:\mathscr{A} \to \mathscr{C}$ and $G:\mathscr{C} \to \mathscr{A}$ be an adjoint pair of functors.
I am trying to show $G$ preserves products and $F$ preserves coproducts.
So to start we have a bijection
$\tau\_{AC}:\operatorname{Hom}(FA,C) \to \operatorname{Hom}(A,GC)$
as well as the normal naturality diagr... | 2011/06/23 | [
"https://math.stackexchange.com/questions/47094",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/2219/"
] | You were close, but you missed the point of universality, so let me do the argument you had in mind, instead of a different one (the route chosen by tetrapharmakon). I agree that tetrapharmakon's argument is the efficient way to go, but I think it's a worthwhile exercise to do it without implicitly appealing to Yoneda.... | Suppose we have an adjunction as in your question $F \dashv G $, and a product $A\times B$ with projections $\pi\_1 : A\times B\rightarrow A$ and $\pi\_1 : A\times B\rightarrow B$. If we want to show $G$ preserves the product $A\times B$ we need only show that $G(A\times B)$ with the projections maps $G(\pi\_1) : G(A\t... |
27,493,713 | I have been working on Angular for one month now. I have been struggling with scoping and keeping state between views.
I don't know how to debug in angular, so I use the console to track the values of the scope when a view is loaded.
This is one of my controllers:
```
.controller('LegDetailCtrl',function($scope,$sta... | 2014/12/15 | [
"https://Stackoverflow.com/questions/27493713",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/666718/"
] | The `.then(` in the following line
```
LegService.getLeg($stateParams.legId).then(function(data){
```
is an asynchonous call to the function inside the then-block (which contains the "Check leg")
The execution is deferred till the event loop of javascript is empty (javascript is only single threaded).
That means th... | If you ran this code outside of the browser, you'd find that the `console.log` call within the callback you passed to `then` is never called at all. That is because the callback is not called until the promise returned by `getLeg` is resolved, and that won't happen until the next angular `$digest` cycle. |
27,493,713 | I have been working on Angular for one month now. I have been struggling with scoping and keeping state between views.
I don't know how to debug in angular, so I use the console to track the values of the scope when a view is loaded.
This is one of my controllers:
```
.controller('LegDetailCtrl',function($scope,$sta... | 2014/12/15 | [
"https://Stackoverflow.com/questions/27493713",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/666718/"
] | If you're using chrome there's a great debugging tool for AngularJS apps called [Batarang](https://chrome.google.com/webstore/detail/angularjs-batarang/ighdmehidhipcmcojjgiloacoafjmpfk?hl=en)
.
To solve your problem you can chain your promises like below.
```
function LegDetailCtrl($stateParams, LegService, Controlle... | If you ran this code outside of the browser, you'd find that the `console.log` call within the callback you passed to `then` is never called at all. That is because the callback is not called until the promise returned by `getLeg` is resolved, and that won't happen until the next angular `$digest` cycle. |
27,493,713 | I have been working on Angular for one month now. I have been struggling with scoping and keeping state between views.
I don't know how to debug in angular, so I use the console to track the values of the scope when a view is loaded.
This is one of my controllers:
```
.controller('LegDetailCtrl',function($scope,$sta... | 2014/12/15 | [
"https://Stackoverflow.com/questions/27493713",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/666718/"
] | If you're using chrome there's a great debugging tool for AngularJS apps called [Batarang](https://chrome.google.com/webstore/detail/angularjs-batarang/ighdmehidhipcmcojjgiloacoafjmpfk?hl=en)
.
To solve your problem you can chain your promises like below.
```
function LegDetailCtrl($stateParams, LegService, Controlle... | The `.then(` in the following line
```
LegService.getLeg($stateParams.legId).then(function(data){
```
is an asynchonous call to the function inside the then-block (which contains the "Check leg")
The execution is deferred till the event loop of javascript is empty (javascript is only single threaded).
That means th... |
7,833,075 | i'm new in android development. I wanted to set onTouchEvent particularly for an image. so that i can do some work ,like increase score etc....
Here is the sample code i tried..
```
@Override
protected void onDraw(Canvas canvas)
{
canvas.drawBitmap(image1, random.nextInt(455), random.nextInt(270), pain... | 2011/10/20 | [
"https://Stackoverflow.com/questions/7833075",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/993835/"
] | Create a Region object with the image bounds like this:
```
Region region = new Region(left, top, right, bottom);
```
left, top, right and bottom define the image bounds.
Then, when you handle a touch event check if region contains the event position. Would be:
```
public boolean onTouchEvent(MotionEvent event)
{
... | Try this one...
Set onTouch listener to imageview...
1.Take on Linearlayout and add child like this
```
linear.addView(new CustomImage(this));
linear.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
// TODO... |
20,455,184 | I have an image and my css places it inside circle. The only problem is that it is not working on Opera browser. Any idea how to fix it?
my CSS:
```
.circular {
overflow: hidden;
width: 48px;
height: 48px;
border-radius: 550px;
box-shadow: 0 0 10px rgba(0, 0, 10, 2.8);
-webkit-box-shadow: 0 0 10px rgba(0, 10, 0, 2... | 2013/12/08 | [
"https://Stackoverflow.com/questions/20455184",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2491321/"
] | first, you may want to change the definition of your data frame, something like:
```
data = pd.DataFrame([[1.4,2.5,3.8,4.4,5.6],[6.2,7.6,8.8,9.1,0]]).T
```
which results this:
```
0 1
0 1.4 6.2
1 2.5 7.6
2 3.8 8.8
3 4.4 9.1
4 5.6 0.0
```
or:
```
data = pd.DataFrame({'A':[1.4,2.5,3.8,4.4,5.6],'B... | Since pandas 0.17.0 you can use
```
DataFrame.round(decimals=0, *args, **kwargs)
```
If you want to round your data to 2 decimals do:
```
data.round(2)
```
more info here:
<http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.round.html> |
20,455,184 | I have an image and my css places it inside circle. The only problem is that it is not working on Opera browser. Any idea how to fix it?
my CSS:
```
.circular {
overflow: hidden;
width: 48px;
height: 48px;
border-radius: 550px;
box-shadow: 0 0 10px rgba(0, 0, 10, 2.8);
-webkit-box-shadow: 0 0 10px rgba(0, 10, 0, 2... | 2013/12/08 | [
"https://Stackoverflow.com/questions/20455184",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2491321/"
] | first, you may want to change the definition of your data frame, something like:
```
data = pd.DataFrame([[1.4,2.5,3.8,4.4,5.6],[6.2,7.6,8.8,9.1,0]]).T
```
which results this:
```
0 1
0 1.4 6.2
1 2.5 7.6
2 3.8 8.8
3 4.4 9.1
4 5.6 0.0
```
or:
```
data = pd.DataFrame({'A':[1.4,2.5,3.8,4.4,5.6],'B... | For those that come here but did not actually want to round the values, just when diplaying, use printoption as I explained in my other answer [here](https://stackoverflow.com/a/72826990/11671779)
```py
pd.set_option('precision', 3)
# or
from IPython.display import display
with pd.option_context('precision', 3):
... |
20,455,184 | I have an image and my css places it inside circle. The only problem is that it is not working on Opera browser. Any idea how to fix it?
my CSS:
```
.circular {
overflow: hidden;
width: 48px;
height: 48px;
border-radius: 550px;
box-shadow: 0 0 10px rgba(0, 0, 10, 2.8);
-webkit-box-shadow: 0 0 10px rgba(0, 10, 0, 2... | 2013/12/08 | [
"https://Stackoverflow.com/questions/20455184",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2491321/"
] | Since pandas 0.17.0 you can use
```
DataFrame.round(decimals=0, *args, **kwargs)
```
If you want to round your data to 2 decimals do:
```
data.round(2)
```
more info here:
<http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.round.html> | For those that come here but did not actually want to round the values, just when diplaying, use printoption as I explained in my other answer [here](https://stackoverflow.com/a/72826990/11671779)
```py
pd.set_option('precision', 3)
# or
from IPython.display import display
with pd.option_context('precision', 3):
... |
33,052,530 | I am using YouTube API in my iOS application and the problem is that it loads really slow on my iPhone, but on iOS simulator it works perfectly.
I tried it on different networks and on different iPhones and its always the same. On every network simulator works a lot better.
I'm using `YTPlayerView-iframe-player.html`... | 2015/10/10 | [
"https://Stackoverflow.com/questions/33052530",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4222952/"
] | There is no way to speed up your network. You can do two things to improve the user experience: hide the player until the video loads, and start playing the video as soon as possible (autoplay).
Add the autoplay key to your playervars dictionary:
```
NSDictionary *playerVars = @{
@"playsi... | Switch to using `WKWebView` instead of old `UIWebView`. Because `WKWebView` has support of native Safari Turbo JavaScript rendering engine, which I assume will make your iframe run faster. |
71,456,102 | I am trying to form a new list from 2 different lists on a menuStrip
button click but it either doesn't put them in `newList` list or it
shows it as empty. `List1` is a list for the first data file from a `.txt.` file, `List2` is the same, `newList` is for forming a new list from specific parameters from 2 lists. Sugge... | 2022/03/13 | [
"https://Stackoverflow.com/questions/71456102",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14568738/"
] | The question was answered [here](https://www.mongodb.com/community/forums/t/changestream-event-doesnt-contain-copy-of-inserted-document-inside-fulldocument-field/152166/3).
TLDR
====
You need to create the following structure to unmarshal event into:
```
type CSEvent struct {
OperationType string `bson:"o... | From sample events that I see from [this link](https://www.mongodb.com/developer/quickstart/nodejs-change-streams-triggers/) we can see that `fullDocument` exists only on `operationType: 'insert'`.
```
{
_id: { _data: '825DE67A42000000072B022C0100296E5A10046BBC1C6A9CBB4B6E9CA9447925E693EF46645F696400645DE67A421... |
44,807,136 | May be I need only explanation (without answer to my question, it could be not valid in some explanation cases). Studying angular I've found how to create new module using `angular-cli`. ...but I have no idea how to use if from main module. To be close with angular I've tried next experiment.
I've generated a modules:... | 2017/06/28 | [
"https://Stackoverflow.com/questions/44807136",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5728095/"
] | Look into [attribute casting](https://laravel.com/docs/5.4/eloquent-mutators#attribute-casting) for models. Add a `protected $casts` array to your `Setting` model:
```
class Setting extends Model
{
protected $casts = ['value' => 'object'];
// Class properties and methods
}
```
This will automatically handle... | Assuming your example, you can serialize your object using `serialize` <http://php.net/manual/fr/function.serialize.php>
Or encode it in JSON using `json_encode`
<http://php.net/manual/fr/function.json-encode.php>
Saving serialized objects or JSON-encoded objects are really the best thing to do if you are trying to s... |
154,880 | Whenever I restart my WiFi router, Ubuntu tries to connect to my neighbours' WiFi networks. There's over 30 wireless networks in the area. Ubuntu prompts me for the password to all of those. This is annoying.
Is there a way to stop Ubuntu trying to automatically connect to WiFi networks? | 2012/06/23 | [
"https://askubuntu.com/questions/154880",
"https://askubuntu.com",
"https://askubuntu.com/users/44508/"
] | I'm updating this answer to reflect new images, since this was done on a laptop.
Click on the wireless icon on the top bar as shown in the image below, and

Then clock on Edit Connections.
. |
154,880 | Whenever I restart my WiFi router, Ubuntu tries to connect to my neighbours' WiFi networks. There's over 30 wireless networks in the area. Ubuntu prompts me for the password to all of those. This is annoying.
Is there a way to stop Ubuntu trying to automatically connect to WiFi networks? | 2012/06/23 | [
"https://askubuntu.com/questions/154880",
"https://askubuntu.com",
"https://askubuntu.com/users/44508/"
] | Click on Wi-fi Icon >> Edit Connections >> Then, Click On Wireless Tab, Delete The Wireless Connections That You Don't want to Use or You Want Ubuntu To Stop Automatically Connecting To Them. | It seems like a gaping security hole, but Ubuntu does not seem to have a means of preventing connection to open networks while continuing to connect to those that you have designated safe (by checking the "automatically connect" button as others have described). |
70,497,437 | In my WordPress v5.8.2, I have localized the `ajax_url` in the functions.php:
```
wp_enqueue_script('site_scripts', get_stylesheet_directory_uri() . '/assets/js/site-scripts.js', array('jquery'), null, true);
wp_localize_script('site_scripts', 'site_ajax', array('ajax_url' => admin_url('admin-ajax.php'), 'check_nonce... | 2021/12/27 | [
"https://Stackoverflow.com/questions/70497437",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3725816/"
] | Enqueue Your Script and Localize add to functions.php:
```
add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_scripts' );
function my_theme_enqueue_scripts() {
wp_enqueue_script( 'site_scripts', get_stylesheet_directory_uri() . '/scripts.js', array( 'jquery' ), '1.0', true );
wp_localize_script(
'si... | Try parsing JSON response like this :
```
$(document).on("submit", "#form", function(e) {
e.preventDefault();
$email = $(this).find('input[name=email]').val(); // email
//ajax request, check if user exists
$.ajax({
type: "GET",
dataType: 'json',
url: site_ajax.ajax_url,
... |
70,497,437 | In my WordPress v5.8.2, I have localized the `ajax_url` in the functions.php:
```
wp_enqueue_script('site_scripts', get_stylesheet_directory_uri() . '/assets/js/site-scripts.js', array('jquery'), null, true);
wp_localize_script('site_scripts', 'site_ajax', array('ajax_url' => admin_url('admin-ajax.php'), 'check_nonce... | 2021/12/27 | [
"https://Stackoverflow.com/questions/70497437",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3725816/"
] | It was the `wp_verify_nonce` causing the issue.
This is how I have modified the code and is working fine in all aspects as expected:
```
$(document).on("submit", "#form", function(e) {
e.preventDefault();
$email = $(this).find('input[name=email]').val(); // email
//ajax request, check if user exists
... | Try parsing JSON response like this :
```
$(document).on("submit", "#form", function(e) {
e.preventDefault();
$email = $(this).find('input[name=email]').val(); // email
//ajax request, check if user exists
$.ajax({
type: "GET",
dataType: 'json',
url: site_ajax.ajax_url,
... |
53,022,645 | I am attempting to find the root of the equation 3x3+x2-10 using iteration. Here is the code that I have so far, however I don't think I have implemented the while loop correctly since it the equation is currently only evaluated once. Essentially, the code ought to evaluate whether the absolute value of `xVal-cVal` is ... | 2018/10/27 | [
"https://Stackoverflow.com/questions/53022645",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5552675/"
] | The methodology in the provided flowchart image will not work.
Try this script:
```
func = @(xVal)((10-xVal^2)/3)^(1/3);
x = fzero(func,StratingX)
``` | You need to update `cVal` in your while loop.
```
xVal = input('Enter a value for x:');
cVal =((10-xVal^2)/3)^(1/3);
while (abs(xVal-cVal)>0.0001)
xVal = cVal;
cVal =((10-xVal^2)/3)^(1/3);
end
disp(cVal);
```
Output:
```
Enter a value for x:0
1.3905
``` |
24,926,146 | Following is the code for sending an email via forget password hit, which is not working, however if the same code run via file it is sending an email..let me know what I am doing wrong with the callback usage.
Following is the code, which is working but **not** sending an email -
```
app.post('/forget', function(req... | 2014/07/24 | [
"https://Stackoverflow.com/questions/24926146",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1594368/"
] | This is not a firewall issue. I am using `linemanjs` which is hitting the api via proxy and currently proxy is not supported in node mailer.
>
> Nodemailer does not support proxies and currently there is no plan to
> add any support for these, sorry.
>
>
>
Reference - [Nodemailer Issue With Proxy](https://github... | downgrade your node-mailer version 0.7.1
use this command in your terminal :- `npm install nodemailer@0.7.1 --save`
then check in your package.json file
```
"dependencies": {
"body-parser": "~1.15.1",
"express": "~4.13.4",
"mongoose": "^4.5.8",
"nodemailer": "^0.7.1"
}
```
It works for me. |
74,929 | What mnemonic phrase / jingle, if any, is used by Japanese children to memorize the あかさたなはまやらわ sequence?
Or could you come up with some?
To help myself memorize this, I could possibly fashion an English jingle (where Satana is doomed to figure), but a straight Japanese sentence would be more suitable as a mnemonic d... | 2020/03/10 | [
"https://japanese.stackexchange.com/questions/74929",
"https://japanese.stackexchange.com",
"https://japanese.stackexchange.com/users/36722/"
] | I believe Japanese children do not use special mnemonics. I mastered the sequences of あかさたなはまやらわ, いきしちにひみいりい, うくすつぬふむゆるう, えけせてねへめえれえ and おこそとのほもよろを using the latter half of [this children's song](https://youtu.be/SXvITpB4j0c?t=69) (written by a [famous poet](https://en.wikipedia.org/wiki/Shuntar%C5%8D_Tanikawa)), and t... | I don't know what phrase is used by Japanese children but the sequence あかさたなはまやらわ is called go-juu-on (五十音). Wikipedia has these ones:
>
> Ah, Kana Symbols: Take Note How Many You Read Well. and
>
>
> Ah, Kana. Surely Take Note How Many You Read Well. and
>
>
> Kana Signs, Think Now How Much You Really Want (to l... |
33,483,707 | I am new to using pandas and I just don't know what to do with this :
I am using python. I have (properly) installed anaconda. In my file I simply create a DataFrame (first by importing it from read\_csv, then recreating it by hand to make sure that was not the problem).
When I do print (dataframe) it prints:
```
... | 2015/11/02 | [
"https://Stackoverflow.com/questions/33483707",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5516832/"
] | You have to use:
```
print(dataframe.head())
print(dataframe['km'])
print(dataframe[3:6])
```
Without the print statement python is just selecting the data but not doing anything with it. | You may expect this would show some row after seeing how other does. But this only appear only in terminal environment. Just like the above answer, you need an print() to show row while you are using **ide** |
13,699 | Can a black hole collide with the Sun?
What will happen in that case? Will the Sun survive? | 2016/02/12 | [
"https://astronomy.stackexchange.com/questions/13699",
"https://astronomy.stackexchange.com",
"https://astronomy.stackexchange.com/users/10767/"
] | Yes, in theory. But;
No, this is very unlikely to happen during the life of the sun. If it did happen it would be Bad.
Many black holes are much more massive than the sun, even though they are much smaller. If a black hole were to enter the sun, some the matter that forms the sun would form into a accretion disc arou... | The Sun would drown in the endless gravity well of the black hole, if they collide head on. The black hole would radiate nothing, unless from a disc surrounding it if more matter happens to fall into it. Sun grazing comets would make it flash a bit now and then. The sunlight would be gone, trapped beyond the horizon of... |
53,914,804 | I want to separate a PHP array when they have a common prefix.
```
$data = ['status.1', 'status.2', 'status.3',
'country.244', 'country.24', 'country.845',
'pm.4', 'pm.9', 'pm.6'];
```
I want each of them in separate variables like `$status, $countries, $pms` which will contain:
```
$status = [1,2... | 2018/12/24 | [
"https://Stackoverflow.com/questions/53914804",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5884560/"
] | I'd use [explode](http://php.net/manual/en/function.explode.php) to split them.
something like this:
```
$arr = array("status" => [],"country" => [],"pm" => []);
foreach($data as $item){
list($key,$val) = explode(".",$item);
$arr[$key][] = $val;
}
extract($res); // taken from david's answer
```
and it's a m... | If it was me I would do it like so...
```
<?php
$data = array ('status.1', 'status.2', 'status.3',
'country.244', 'country.24', 'country.845',
'pm.4', 'pm.9', 'pm.6');
$out = array ();
foreach ( $data AS $value )
{
$value = explode ( '.', $value );
$out[$value[0]][] = $value[1];
}
print_... |
53,914,804 | I want to separate a PHP array when they have a common prefix.
```
$data = ['status.1', 'status.2', 'status.3',
'country.244', 'country.24', 'country.845',
'pm.4', 'pm.9', 'pm.6'];
```
I want each of them in separate variables like `$status, $countries, $pms` which will contain:
```
$status = [1,2... | 2018/12/24 | [
"https://Stackoverflow.com/questions/53914804",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5884560/"
] | This will give you results for more dynamic prefixs - first explode with the delimiter and then insert by the key to result array.
For separating the value you can use: [extract](http://php.net/manual/en/function.extract.php)
Consider the following code:
```
$data = array('status.1','status.2','status.3', 'country.2... | If it was me I would do it like so...
```
<?php
$data = array ('status.1', 'status.2', 'status.3',
'country.244', 'country.24', 'country.845',
'pm.4', 'pm.9', 'pm.6');
$out = array ();
foreach ( $data AS $value )
{
$value = explode ( '.', $value );
$out[$value[0]][] = $value[1];
}
print_... |
53,914,804 | I want to separate a PHP array when they have a common prefix.
```
$data = ['status.1', 'status.2', 'status.3',
'country.244', 'country.24', 'country.845',
'pm.4', 'pm.9', 'pm.6'];
```
I want each of them in separate variables like `$status, $countries, $pms` which will contain:
```
$status = [1,2... | 2018/12/24 | [
"https://Stackoverflow.com/questions/53914804",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5884560/"
] | I'd use [explode](http://php.net/manual/en/function.explode.php) to split them.
something like this:
```
$arr = array("status" => [],"country" => [],"pm" => []);
foreach($data as $item){
list($key,$val) = explode(".",$item);
$arr[$key][] = $val;
}
extract($res); // taken from david's answer
```
and it's a m... | I'm not sure if this'll boost the performance but you could re-arrange your array in a way that each row has a heading and the corresponding value and then use `array_column()` to group which data you want.
This is an example of how you could group your data in such a way. (PHP 7.1.25+)
```
$groupedData = array_map(f... |
53,914,804 | I want to separate a PHP array when they have a common prefix.
```
$data = ['status.1', 'status.2', 'status.3',
'country.244', 'country.24', 'country.845',
'pm.4', 'pm.9', 'pm.6'];
```
I want each of them in separate variables like `$status, $countries, $pms` which will contain:
```
$status = [1,2... | 2018/12/24 | [
"https://Stackoverflow.com/questions/53914804",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5884560/"
] | This will give you results for more dynamic prefixs - first explode with the delimiter and then insert by the key to result array.
For separating the value you can use: [extract](http://php.net/manual/en/function.extract.php)
Consider the following code:
```
$data = array('status.1','status.2','status.3', 'country.2... | You can push data into their respective groups while destructuring. The only iterated function call is `explode()`.
[Creating individual variables for each group](https://3v4l.org/4lEqb) is a design flaw / mismanagement of array data.
Code: ([Demo](https://3v4l.org/3XANg))
```
$result = [];
foreach ($data as $value)... |
53,914,804 | I want to separate a PHP array when they have a common prefix.
```
$data = ['status.1', 'status.2', 'status.3',
'country.244', 'country.24', 'country.845',
'pm.4', 'pm.9', 'pm.6'];
```
I want each of them in separate variables like `$status, $countries, $pms` which will contain:
```
$status = [1,2... | 2018/12/24 | [
"https://Stackoverflow.com/questions/53914804",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5884560/"
] | Add `continue` to each of the `if`'s, so if it's one of them, it won't then run the other ones... not really needed in the last one as obviously the loops starts again anyway. Should save a tiny bit of time, but doubt it'll be as much as you probably want to save.
```
foreach($data as $item){
if(strpos($item, 'sta... | You can push data into their respective groups while destructuring. The only iterated function call is `explode()`.
[Creating individual variables for each group](https://3v4l.org/4lEqb) is a design flaw / mismanagement of array data.
Code: ([Demo](https://3v4l.org/3XANg))
```
$result = [];
foreach ($data as $value)... |
53,914,804 | I want to separate a PHP array when they have a common prefix.
```
$data = ['status.1', 'status.2', 'status.3',
'country.244', 'country.24', 'country.845',
'pm.4', 'pm.9', 'pm.6'];
```
I want each of them in separate variables like `$status, $countries, $pms` which will contain:
```
$status = [1,2... | 2018/12/24 | [
"https://Stackoverflow.com/questions/53914804",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5884560/"
] | This will give you results for more dynamic prefixs - first explode with the delimiter and then insert by the key to result array.
For separating the value you can use: [extract](http://php.net/manual/en/function.extract.php)
Consider the following code:
```
$data = array('status.1','status.2','status.3', 'country.2... | I'd use [explode](http://php.net/manual/en/function.explode.php) to split them.
something like this:
```
$arr = array("status" => [],"country" => [],"pm" => []);
foreach($data as $item){
list($key,$val) = explode(".",$item);
$arr[$key][] = $val;
}
extract($res); // taken from david's answer
```
and it's a m... |
53,914,804 | I want to separate a PHP array when they have a common prefix.
```
$data = ['status.1', 'status.2', 'status.3',
'country.244', 'country.24', 'country.845',
'pm.4', 'pm.9', 'pm.6'];
```
I want each of them in separate variables like `$status, $countries, $pms` which will contain:
```
$status = [1,2... | 2018/12/24 | [
"https://Stackoverflow.com/questions/53914804",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5884560/"
] | Add `continue` to each of the `if`'s, so if it's one of them, it won't then run the other ones... not really needed in the last one as obviously the loops starts again anyway. Should save a tiny bit of time, but doubt it'll be as much as you probably want to save.
```
foreach($data as $item){
if(strpos($item, 'sta... | I'm not sure if this'll boost the performance but you could re-arrange your array in a way that each row has a heading and the corresponding value and then use `array_column()` to group which data you want.
This is an example of how you could group your data in such a way. (PHP 7.1.25+)
```
$groupedData = array_map(f... |
53,914,804 | I want to separate a PHP array when they have a common prefix.
```
$data = ['status.1', 'status.2', 'status.3',
'country.244', 'country.24', 'country.845',
'pm.4', 'pm.9', 'pm.6'];
```
I want each of them in separate variables like `$status, $countries, $pms` which will contain:
```
$status = [1,2... | 2018/12/24 | [
"https://Stackoverflow.com/questions/53914804",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5884560/"
] | Add `continue` to each of the `if`'s, so if it's one of them, it won't then run the other ones... not really needed in the last one as obviously the loops starts again anyway. Should save a tiny bit of time, but doubt it'll be as much as you probably want to save.
```
foreach($data as $item){
if(strpos($item, 'sta... | If it was me I would do it like so...
```
<?php
$data = array ('status.1', 'status.2', 'status.3',
'country.244', 'country.24', 'country.845',
'pm.4', 'pm.9', 'pm.6');
$out = array ();
foreach ( $data AS $value )
{
$value = explode ( '.', $value );
$out[$value[0]][] = $value[1];
}
print_... |
53,914,804 | I want to separate a PHP array when they have a common prefix.
```
$data = ['status.1', 'status.2', 'status.3',
'country.244', 'country.24', 'country.845',
'pm.4', 'pm.9', 'pm.6'];
```
I want each of them in separate variables like `$status, $countries, $pms` which will contain:
```
$status = [1,2... | 2018/12/24 | [
"https://Stackoverflow.com/questions/53914804",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5884560/"
] | Add `continue` to each of the `if`'s, so if it's one of them, it won't then run the other ones... not really needed in the last one as obviously the loops starts again anyway. Should save a tiny bit of time, but doubt it'll be as much as you probably want to save.
```
foreach($data as $item){
if(strpos($item, 'sta... | Use [Explode](http://php.net/manual/ru/function.explode.php). Also is a good way to use $limit param for performance and avoiding wrong behavior on having other '.' in values.
```
$arr = [];
foreach($data as $item){
list($key,$val) = explode('.', $item, 2);
if (!$key || !$val) continue;
$arr[$key][] = $val... |
53,914,804 | I want to separate a PHP array when they have a common prefix.
```
$data = ['status.1', 'status.2', 'status.3',
'country.244', 'country.24', 'country.845',
'pm.4', 'pm.9', 'pm.6'];
```
I want each of them in separate variables like `$status, $countries, $pms` which will contain:
```
$status = [1,2... | 2018/12/24 | [
"https://Stackoverflow.com/questions/53914804",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5884560/"
] | I'd use [explode](http://php.net/manual/en/function.explode.php) to split them.
something like this:
```
$arr = array("status" => [],"country" => [],"pm" => []);
foreach($data as $item){
list($key,$val) = explode(".",$item);
$arr[$key][] = $val;
}
extract($res); // taken from david's answer
```
and it's a m... | You can push data into their respective groups while destructuring. The only iterated function call is `explode()`.
[Creating individual variables for each group](https://3v4l.org/4lEqb) is a design flaw / mismanagement of array data.
Code: ([Demo](https://3v4l.org/3XANg))
```
$result = [];
foreach ($data as $value)... |
6,008,519 | I Want convert `bit` type to *Yes or No*
***For Example:***
```
SELECT FirstName, LastName, IsMale from members
```
***Results:***
```
Ramy Said 1
```
***Expected Result:***
```
Ramy Said Yes
``` | 2011/05/15 | [
"https://Stackoverflow.com/questions/6008519",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/402793/"
] | You can do this using a [searched case expression](http://msdn.microsoft.com/en-us/library/ms181765.aspx):
```
SELECT
FirstName,
LastName,
CASE WHEN IsMale = 1 THEN 'Yes' ELSE 'No' END AS IsMale
FROM
Members
``` | Here you go:
```
SELECT FirstName, LastName, CASE WHEN IsMale = 1 THEN 'Yes' ELSE 'No' END AS Male
FROM members
```
Basically, you use a `CASE` statement to allow you to convert the value. If you had three choices, you could still use the case statement and just add another option (obviously you can't have three opt... |
6,008,519 | I Want convert `bit` type to *Yes or No*
***For Example:***
```
SELECT FirstName, LastName, IsMale from members
```
***Results:***
```
Ramy Said 1
```
***Expected Result:***
```
Ramy Said Yes
``` | 2011/05/15 | [
"https://Stackoverflow.com/questions/6008519",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/402793/"
] | You can do this using a [searched case expression](http://msdn.microsoft.com/en-us/library/ms181765.aspx):
```
SELECT
FirstName,
LastName,
CASE WHEN IsMale = 1 THEN 'Yes' ELSE 'No' END AS IsMale
FROM
Members
``` | Use a `CASE`;
```
SELECT
FirstName,
LastName,
CASE IsMale WHEN 1 THEN 'Yes' ELSE 'No' END AS IsMale
FROM tbl
``` |
6,008,519 | I Want convert `bit` type to *Yes or No*
***For Example:***
```
SELECT FirstName, LastName, IsMale from members
```
***Results:***
```
Ramy Said 1
```
***Expected Result:***
```
Ramy Said Yes
``` | 2011/05/15 | [
"https://Stackoverflow.com/questions/6008519",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/402793/"
] | You can do this using a [searched case expression](http://msdn.microsoft.com/en-us/library/ms181765.aspx):
```
SELECT
FirstName,
LastName,
CASE WHEN IsMale = 1 THEN 'Yes' ELSE 'No' END AS IsMale
FROM
Members
``` | Use an `IIF()` which is available `SQL Server 2012` onwards.
There is one another way of achieving this. *(shorthand way(maybe not))*. That's using `IIF()`. See below.
```
SELECT
[FirstName],
[LastName],
IIF([IsMale]=1,'Yes','No') AS [IsMale As String]
FROM
[Members]
``` |
6,008,519 | I Want convert `bit` type to *Yes or No*
***For Example:***
```
SELECT FirstName, LastName, IsMale from members
```
***Results:***
```
Ramy Said 1
```
***Expected Result:***
```
Ramy Said Yes
``` | 2011/05/15 | [
"https://Stackoverflow.com/questions/6008519",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/402793/"
] | You can do this using a [searched case expression](http://msdn.microsoft.com/en-us/library/ms181765.aspx):
```
SELECT
FirstName,
LastName,
CASE WHEN IsMale = 1 THEN 'Yes' ELSE 'No' END AS IsMale
FROM
Members
``` | SQL Server 2012 introduces two new keywords `FORMAT` and `IIF` that can provide a more compact means of converting an integer or bit to string:
```
DECLARE @MyInt int = 123
PRINT 'Hello '+FORMAT(@MyInt,'')
-- (note: the "+0" converts a bit type to int then outputs '0' or '1')
DECLARE @MyBit bit = 0
PRINT 'Hello '+FOR... |
6,008,519 | I Want convert `bit` type to *Yes or No*
***For Example:***
```
SELECT FirstName, LastName, IsMale from members
```
***Results:***
```
Ramy Said 1
```
***Expected Result:***
```
Ramy Said Yes
``` | 2011/05/15 | [
"https://Stackoverflow.com/questions/6008519",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/402793/"
] | Here you go:
```
SELECT FirstName, LastName, CASE WHEN IsMale = 1 THEN 'Yes' ELSE 'No' END AS Male
FROM members
```
Basically, you use a `CASE` statement to allow you to convert the value. If you had three choices, you could still use the case statement and just add another option (obviously you can't have three opt... | Use an `IIF()` which is available `SQL Server 2012` onwards.
There is one another way of achieving this. *(shorthand way(maybe not))*. That's using `IIF()`. See below.
```
SELECT
[FirstName],
[LastName],
IIF([IsMale]=1,'Yes','No') AS [IsMale As String]
FROM
[Members]
``` |
6,008,519 | I Want convert `bit` type to *Yes or No*
***For Example:***
```
SELECT FirstName, LastName, IsMale from members
```
***Results:***
```
Ramy Said 1
```
***Expected Result:***
```
Ramy Said Yes
``` | 2011/05/15 | [
"https://Stackoverflow.com/questions/6008519",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/402793/"
] | Here you go:
```
SELECT FirstName, LastName, CASE WHEN IsMale = 1 THEN 'Yes' ELSE 'No' END AS Male
FROM members
```
Basically, you use a `CASE` statement to allow you to convert the value. If you had three choices, you could still use the case statement and just add another option (obviously you can't have three opt... | SQL Server 2012 introduces two new keywords `FORMAT` and `IIF` that can provide a more compact means of converting an integer or bit to string:
```
DECLARE @MyInt int = 123
PRINT 'Hello '+FORMAT(@MyInt,'')
-- (note: the "+0" converts a bit type to int then outputs '0' or '1')
DECLARE @MyBit bit = 0
PRINT 'Hello '+FOR... |
6,008,519 | I Want convert `bit` type to *Yes or No*
***For Example:***
```
SELECT FirstName, LastName, IsMale from members
```
***Results:***
```
Ramy Said 1
```
***Expected Result:***
```
Ramy Said Yes
``` | 2011/05/15 | [
"https://Stackoverflow.com/questions/6008519",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/402793/"
] | Use a `CASE`;
```
SELECT
FirstName,
LastName,
CASE IsMale WHEN 1 THEN 'Yes' ELSE 'No' END AS IsMale
FROM tbl
``` | Use an `IIF()` which is available `SQL Server 2012` onwards.
There is one another way of achieving this. *(shorthand way(maybe not))*. That's using `IIF()`. See below.
```
SELECT
[FirstName],
[LastName],
IIF([IsMale]=1,'Yes','No') AS [IsMale As String]
FROM
[Members]
``` |
6,008,519 | I Want convert `bit` type to *Yes or No*
***For Example:***
```
SELECT FirstName, LastName, IsMale from members
```
***Results:***
```
Ramy Said 1
```
***Expected Result:***
```
Ramy Said Yes
``` | 2011/05/15 | [
"https://Stackoverflow.com/questions/6008519",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/402793/"
] | Use a `CASE`;
```
SELECT
FirstName,
LastName,
CASE IsMale WHEN 1 THEN 'Yes' ELSE 'No' END AS IsMale
FROM tbl
``` | SQL Server 2012 introduces two new keywords `FORMAT` and `IIF` that can provide a more compact means of converting an integer or bit to string:
```
DECLARE @MyInt int = 123
PRINT 'Hello '+FORMAT(@MyInt,'')
-- (note: the "+0" converts a bit type to int then outputs '0' or '1')
DECLARE @MyBit bit = 0
PRINT 'Hello '+FOR... |
6,008,519 | I Want convert `bit` type to *Yes or No*
***For Example:***
```
SELECT FirstName, LastName, IsMale from members
```
***Results:***
```
Ramy Said 1
```
***Expected Result:***
```
Ramy Said Yes
``` | 2011/05/15 | [
"https://Stackoverflow.com/questions/6008519",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/402793/"
] | Use an `IIF()` which is available `SQL Server 2012` onwards.
There is one another way of achieving this. *(shorthand way(maybe not))*. That's using `IIF()`. See below.
```
SELECT
[FirstName],
[LastName],
IIF([IsMale]=1,'Yes','No') AS [IsMale As String]
FROM
[Members]
``` | SQL Server 2012 introduces two new keywords `FORMAT` and `IIF` that can provide a more compact means of converting an integer or bit to string:
```
DECLARE @MyInt int = 123
PRINT 'Hello '+FORMAT(@MyInt,'')
-- (note: the "+0" converts a bit type to int then outputs '0' or '1')
DECLARE @MyBit bit = 0
PRINT 'Hello '+FOR... |
554,524 | I have a problem with my power modes in 14.04. When I use:
`sudo pm-hibernate`
my laptop and monitor display are getting black. After one or two seconds, the laptop and the monitor are showing the things they showed before again. So it doesn't get in hibernate.
The same thing is with:
`sudo pm-suspend`
I have nev... | 2014/11/29 | [
"https://askubuntu.com/questions/554524",
"https://askubuntu.com",
"https://askubuntu.com/users/349600/"
] | ```
find . -type f -exec sh -c 'base=$(echo $1 | grep -oP "(?<=\./).*(?=\.[^\.]*$)"); mkdir -p "${base}"; mv "$1" "$base"' . {} \;
```
### Explanation
* `find . -type f` This script will operate on all "regular" files (i.e. will not work on the current directory `.`).
* `-exec sh -c '...' . {} \;` execute the `'...`... | this will suffice:
```bsh
#!/bin/bash
#this script sorts files according to their extensions
oldIFS=$IFS
IFS=$'\n'
(find . -type f) > /tmp/temp
for var in `cat /tmp/temp`
do
name=`basename "$var"`
name=`echo $name | cut -d'.' -f1`
mkdir -p $name
mv "$var" $name/ 2> /dev/null
done
IFS=$oldIFS
``` |
2,831,989 | In Scala, is there a way to get the currently evaluated items in a Stream? For example in the Stream
```
val s: Stream[Int] = Stream.cons(1, Stream.cons(2, Stream.cons(3, s.map(_+1))))
```
the method should return only `List(1,2,3)`. | 2010/05/14 | [
"https://Stackoverflow.com/questions/2831989",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/126916/"
] | In 2.8, there is a protected method called `tailDefined` that will return false when you get to the point in the stream that has not yet been evaluated.
This isn't too useful (unless you want to write your own `Stream` class) except that `Cons` itself makes the method public. I'm not sure why it's protected in Stream ... | Type that statement into the interactive shell and you will see that it evaluates to `s: Stream[Int] = Stream(1, ?)`. So, in fact, the other two elements of 2 and 3 are not yet known.
As you access further elements, more of the stream is calculated. So, now put `s(3)` into the shell, which will return `res0: Int = 2`.... |
2,831,989 | In Scala, is there a way to get the currently evaluated items in a Stream? For example in the Stream
```
val s: Stream[Int] = Stream.cons(1, Stream.cons(2, Stream.cons(3, s.map(_+1))))
```
the method should return only `List(1,2,3)`. | 2010/05/14 | [
"https://Stackoverflow.com/questions/2831989",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/126916/"
] | The solution based on [Rex's answer](https://stackoverflow.com/questions/2831989/in-scala-is-there-a-way-to-get-the-currently-evaluated-items-in-a-stream/2835532#2835532):
```
def evaluatedItems[T](stream: => Stream[T]): List[T] = {
@tailrec
def inner(s: => Stream[T], acc: List[T]): List[T] = s match {
case Em... | Type that statement into the interactive shell and you will see that it evaluates to `s: Stream[Int] = Stream(1, ?)`. So, in fact, the other two elements of 2 and 3 are not yet known.
As you access further elements, more of the stream is calculated. So, now put `s(3)` into the shell, which will return `res0: Int = 2`.... |
2,831,989 | In Scala, is there a way to get the currently evaluated items in a Stream? For example in the Stream
```
val s: Stream[Int] = Stream.cons(1, Stream.cons(2, Stream.cons(3, s.map(_+1))))
```
the method should return only `List(1,2,3)`. | 2010/05/14 | [
"https://Stackoverflow.com/questions/2831989",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/126916/"
] | Type that statement into the interactive shell and you will see that it evaluates to `s: Stream[Int] = Stream(1, ?)`. So, in fact, the other two elements of 2 and 3 are not yet known.
As you access further elements, more of the stream is calculated. So, now put `s(3)` into the shell, which will return `res0: Int = 2`.... | Using scanLeft
```
lazy val s: Stream[Int] = 1 #:: s.scanLeft(2) { case (a, _) => 1 + a }
``` |
2,831,989 | In Scala, is there a way to get the currently evaluated items in a Stream? For example in the Stream
```
val s: Stream[Int] = Stream.cons(1, Stream.cons(2, Stream.cons(3, s.map(_+1))))
```
the method should return only `List(1,2,3)`. | 2010/05/14 | [
"https://Stackoverflow.com/questions/2831989",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/126916/"
] | In 2.8, there is a protected method called `tailDefined` that will return false when you get to the point in the stream that has not yet been evaluated.
This isn't too useful (unless you want to write your own `Stream` class) except that `Cons` itself makes the method public. I'm not sure why it's protected in Stream ... | The solution based on [Rex's answer](https://stackoverflow.com/questions/2831989/in-scala-is-there-a-way-to-get-the-currently-evaluated-items-in-a-stream/2835532#2835532):
```
def evaluatedItems[T](stream: => Stream[T]): List[T] = {
@tailrec
def inner(s: => Stream[T], acc: List[T]): List[T] = s match {
case Em... |
2,831,989 | In Scala, is there a way to get the currently evaluated items in a Stream? For example in the Stream
```
val s: Stream[Int] = Stream.cons(1, Stream.cons(2, Stream.cons(3, s.map(_+1))))
```
the method should return only `List(1,2,3)`. | 2010/05/14 | [
"https://Stackoverflow.com/questions/2831989",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/126916/"
] | In 2.8, there is a protected method called `tailDefined` that will return false when you get to the point in the stream that has not yet been evaluated.
This isn't too useful (unless you want to write your own `Stream` class) except that `Cons` itself makes the method public. I'm not sure why it's protected in Stream ... | Using scanLeft
```
lazy val s: Stream[Int] = 1 #:: s.scanLeft(2) { case (a, _) => 1 + a }
``` |
2,831,989 | In Scala, is there a way to get the currently evaluated items in a Stream? For example in the Stream
```
val s: Stream[Int] = Stream.cons(1, Stream.cons(2, Stream.cons(3, s.map(_+1))))
```
the method should return only `List(1,2,3)`. | 2010/05/14 | [
"https://Stackoverflow.com/questions/2831989",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/126916/"
] | The solution based on [Rex's answer](https://stackoverflow.com/questions/2831989/in-scala-is-there-a-way-to-get-the-currently-evaluated-items-in-a-stream/2835532#2835532):
```
def evaluatedItems[T](stream: => Stream[T]): List[T] = {
@tailrec
def inner(s: => Stream[T], acc: List[T]): List[T] = s match {
case Em... | Using scanLeft
```
lazy val s: Stream[Int] = 1 #:: s.scanLeft(2) { case (a, _) => 1 + a }
``` |
44,999,088 | I want to use `fields` in my `map()` function, however I get this `TypeError: Cannot read property 'fields' of undefined` and I don't understand why. Because when I `console.log(this.props.schema.fields)` I get data printed out in my console.
Question
--------
Why does is this happening? Is it because inside of the `... | 2017/07/09 | [
"https://Stackoverflow.com/questions/44999088",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7284779/"
] | It is giving you error because when first time it renders it it not able to find the fields property. Try to put condition using ternary operator.
```
{
this.props.schema.fields
?
... Map function
: <div></div>
}
``` | I was overriding my first constant `schema` with another constant named `schema`. Sorry for the misunderstandment! |
19,142,527 | I have 3 csvs, two contains lists of "classes" and the other contains my main dataset, what I need my code to do is perform one calulation if the data in column 2 appears in list csv 1, but do a different calculation if the data in column 2 appears in list csv 2 and overwrite a value in the main csv column 12:
Lets a... | 2013/10/02 | [
"https://Stackoverflow.com/questions/19142527",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2804845/"
] | Here's a short script that will iterate through your main file one line at a time, perform the operations you are looking for, and will then output the line to a new file called `'updated-main.csv'`:
```
#!/usr/bin/python
# Load the first two CSV class files (assuming only one column)
L1 = set([l.rstrip() for l in op... | I recently discovered the pandas library, which will make this very easy. <http://pandas.pydata.org/>
Basically, you'll load each of the three datasets using read\_csv:
```
csv1 = pandas.read_csv(...)
csv2 = pandas.read_csv(...)
data = pandas.read_csv(...)
```
Then, you preform an "outer" merge. This will only reve... |
19,142,527 | I have 3 csvs, two contains lists of "classes" and the other contains my main dataset, what I need my code to do is perform one calulation if the data in column 2 appears in list csv 1, but do a different calculation if the data in column 2 appears in list csv 2 and overwrite a value in the main csv column 12:
Lets a... | 2013/10/02 | [
"https://Stackoverflow.com/questions/19142527",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2804845/"
] | Here's a solution that uses a dictionary for the class lookups instead of lists. Of course it's always a good idea to test it to be sure, but my guess is that this whole operation will likely be largely I/O bound, so the actual implementation may not be of great importance.
```
import csv
from operator import mul, di... | I recently discovered the pandas library, which will make this very easy. <http://pandas.pydata.org/>
Basically, you'll load each of the three datasets using read\_csv:
```
csv1 = pandas.read_csv(...)
csv2 = pandas.read_csv(...)
data = pandas.read_csv(...)
```
Then, you preform an "outer" merge. This will only reve... |
19,142,527 | I have 3 csvs, two contains lists of "classes" and the other contains my main dataset, what I need my code to do is perform one calulation if the data in column 2 appears in list csv 1, but do a different calculation if the data in column 2 appears in list csv 2 and overwrite a value in the main csv column 12:
Lets a... | 2013/10/02 | [
"https://Stackoverflow.com/questions/19142527",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2804845/"
] | Not sure I correctly understand the bounty conditions but here is a (hopefully detailed) explanation of Kurtis's answer. I chose his answer mainly because of the dictionary look-up for the operation to be performed.
The OP wants to perform an operation on three columns (6, 11, 2) of a csv data file.
The operation t... | I recently discovered the pandas library, which will make this very easy. <http://pandas.pydata.org/>
Basically, you'll load each of the three datasets using read\_csv:
```
csv1 = pandas.read_csv(...)
csv2 = pandas.read_csv(...)
data = pandas.read_csv(...)
```
Then, you preform an "outer" merge. This will only reve... |
19,142,527 | I have 3 csvs, two contains lists of "classes" and the other contains my main dataset, what I need my code to do is perform one calulation if the data in column 2 appears in list csv 1, but do a different calculation if the data in column 2 appears in list csv 2 and overwrite a value in the main csv column 12:
Lets a... | 2013/10/02 | [
"https://Stackoverflow.com/questions/19142527",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2804845/"
] | Here's a short script that will iterate through your main file one line at a time, perform the operations you are looking for, and will then output the line to a new file called `'updated-main.csv'`:
```
#!/usr/bin/python
# Load the first two CSV class files (assuming only one column)
L1 = set([l.rstrip() for l in op... | Try this, it should help you get it working :)
### Example code
```
# import library
import csv
# a list of items for later checking
alist = ["item", "item"]
# open the document in question
with open('main.csv', 'rb') as old_csv:
# open the main csv in csv.reader
csv_reader = csv.reader(old_csv)
# now o... |
19,142,527 | I have 3 csvs, two contains lists of "classes" and the other contains my main dataset, what I need my code to do is perform one calulation if the data in column 2 appears in list csv 1, but do a different calculation if the data in column 2 appears in list csv 2 and overwrite a value in the main csv column 12:
Lets a... | 2013/10/02 | [
"https://Stackoverflow.com/questions/19142527",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2804845/"
] | Here's a solution that uses a dictionary for the class lookups instead of lists. Of course it's always a good idea to test it to be sure, but my guess is that this whole operation will likely be largely I/O bound, so the actual implementation may not be of great importance.
```
import csv
from operator import mul, di... | Try this, it should help you get it working :)
### Example code
```
# import library
import csv
# a list of items for later checking
alist = ["item", "item"]
# open the document in question
with open('main.csv', 'rb') as old_csv:
# open the main csv in csv.reader
csv_reader = csv.reader(old_csv)
# now o... |
19,142,527 | I have 3 csvs, two contains lists of "classes" and the other contains my main dataset, what I need my code to do is perform one calulation if the data in column 2 appears in list csv 1, but do a different calculation if the data in column 2 appears in list csv 2 and overwrite a value in the main csv column 12:
Lets a... | 2013/10/02 | [
"https://Stackoverflow.com/questions/19142527",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2804845/"
] | Not sure I correctly understand the bounty conditions but here is a (hopefully detailed) explanation of Kurtis's answer. I chose his answer mainly because of the dictionary look-up for the operation to be performed.
The OP wants to perform an operation on three columns (6, 11, 2) of a csv data file.
The operation t... | Try this, it should help you get it working :)
### Example code
```
# import library
import csv
# a list of items for later checking
alist = ["item", "item"]
# open the document in question
with open('main.csv', 'rb') as old_csv:
# open the main csv in csv.reader
csv_reader = csv.reader(old_csv)
# now o... |
35,184,547 | How can i create something like this in QML using javascript?
[](https://i.stack.imgur.com/oG6wx.png)
Actually I know how to create rectangles in QML but want to do something like this. QML canvas can be of any size but whenever QML section is loaded... | 2016/02/03 | [
"https://Stackoverflow.com/questions/35184547",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4923163/"
] | As @ddriver already noticed, the simpliest decision is to loop through all children to find a room to a new rectangle.
```js
Rectangle {
id: container
anchors.fill: parent
property var items: [];
Component {
id: rect
Rectangle {
color: Qt.rgba(Mat... | If you want efficiency, it will come at the cost of complexity - you will have to use some space partition algorithm. Otherwise, you could just generate random values until you get enough that are not overlapping.
Checking whether two rectangles overlap is simple - if none of the corners of rectangle B is inside rect... |
5,315,966 | I am using a `ScriptManager` control to load search results from server web services. There is a text box and button on the page where the user enters their search terms. When they submit their search there is a `Response.Redirect` that is called to the search page. I use the ScriptManager's history function to track f... | 2011/03/15 | [
"https://Stackoverflow.com/questions/5315966",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/462240/"
] | This is an old post, but I thought that I would add the solution in case anybody else was looking for this. I ran into the same problem, where the history point was being maintained across post backs to the server when a `Response.Redirect()` call was made. I'm not sure why this is happening and it seems counter-intuit... | You can invoke `AddHistoryPoint` method of the `ScriptManager`, before `Redirect`. |
10,511,396 | I'm using mooTools and I need to call function TestA() on click event on a tag but that doesn't work. I know that I can attach event do a tag via $().addEvent(...) but I need use approach like bellow.
```
<script type='text/javascript'>
window.addEvent('domready', function () {
function TestA(... | 2012/05/09 | [
"https://Stackoverflow.com/questions/10511396",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/791878/"
] | Is there any reason you are defining your TestA function only when the DOM is ready? The reason TestA() is not working is because it is only defined within the scope of the function that is defined as the domready handler.
If you really do need to do it the way you're doing things then you'll need to scope the variabl... | You need to use the *TestA = function (){}* notation instead of *function TestA(){}* :
```
<script type='text/javascript'>
window.addEvent('domready', function () {
TestA = function (){}
});
function TestB(){}
</script>
<a href="#" onclick="TestA()">Test</a>
``` |
4,263 | My tenants tell me that they hear an animal (possibly a raccoon) in the attic. This is an old (1880s) three story row house with a flat roof and a pretty low (2 ft average, maybe) attic. The house was totally renovated 10 years ago and I'm not very familiar with the attic situation or where the animal might have entere... | 2011/01/28 | [
"https://diy.stackexchange.com/questions/4263",
"https://diy.stackexchange.com",
"https://diy.stackexchange.com/users/1484/"
] | I'd personally start by calling the local animal control office (it might be part of the local health department, depending on how your town/county/city/whatever government is organized)
They'd be able to tell you what's likely to be looking for new homes at this time of year in your area that fits the activity patter... | I had this problem in my house in Georgia with a number of animals, to solve I put my cat in the attic for a few hours a day for a week or so (usually when I was up there anyway). The cat never killed anything, (to my knowledge) but the scent of the cat drove the animals out for good. I have found this solution to be s... |
4,263 | My tenants tell me that they hear an animal (possibly a raccoon) in the attic. This is an old (1880s) three story row house with a flat roof and a pretty low (2 ft average, maybe) attic. The house was totally renovated 10 years ago and I'm not very familiar with the attic situation or where the animal might have entere... | 2011/01/28 | [
"https://diy.stackexchange.com/questions/4263",
"https://diy.stackexchange.com",
"https://diy.stackexchange.com/users/1484/"
] | I had this problem in my house in Georgia with a number of animals, to solve I put my cat in the attic for a few hours a day for a week or so (usually when I was up there anyway). The cat never killed anything, (to my knowledge) but the scent of the cat drove the animals out for good. I have found this solution to be s... | We had a raccoon in the attic and hired a pest company to remove it. He sealed 3 entries and caged the 4th with a one way door. We got lucky the racoon didn't have a family in our attic.
What they do in this case is get the adults out with the one way door and then go into the attic to fetch the babies. The important t... |
4,263 | My tenants tell me that they hear an animal (possibly a raccoon) in the attic. This is an old (1880s) three story row house with a flat roof and a pretty low (2 ft average, maybe) attic. The house was totally renovated 10 years ago and I'm not very familiar with the attic situation or where the animal might have entere... | 2011/01/28 | [
"https://diy.stackexchange.com/questions/4263",
"https://diy.stackexchange.com",
"https://diy.stackexchange.com/users/1484/"
] | I'd personally start by calling the local animal control office (it might be part of the local health department, depending on how your town/county/city/whatever government is organized)
They'd be able to tell you what's likely to be looking for new homes at this time of year in your area that fits the activity patter... | We had a raccoon in the attic and hired a pest company to remove it. He sealed 3 entries and caged the 4th with a one way door. We got lucky the racoon didn't have a family in our attic.
What they do in this case is get the adults out with the one way door and then go into the attic to fetch the babies. The important t... |
4,263 | My tenants tell me that they hear an animal (possibly a raccoon) in the attic. This is an old (1880s) three story row house with a flat roof and a pretty low (2 ft average, maybe) attic. The house was totally renovated 10 years ago and I'm not very familiar with the attic situation or where the animal might have entere... | 2011/01/28 | [
"https://diy.stackexchange.com/questions/4263",
"https://diy.stackexchange.com",
"https://diy.stackexchange.com/users/1484/"
] | Not knowing where the house is limits the advice. However since it has a flat roof, I'm going to assume it's not anywhere where it snows a lot.
You need to get a professional for several reasons.
1. In most states, as a landlord, you're required to do something and the only way you can demonstrate due diligence with ... | I had this problem in my house in Georgia with a number of animals, to solve I put my cat in the attic for a few hours a day for a week or so (usually when I was up there anyway). The cat never killed anything, (to my knowledge) but the scent of the cat drove the animals out for good. I have found this solution to be s... |
4,263 | My tenants tell me that they hear an animal (possibly a raccoon) in the attic. This is an old (1880s) three story row house with a flat roof and a pretty low (2 ft average, maybe) attic. The house was totally renovated 10 years ago and I'm not very familiar with the attic situation or where the animal might have entere... | 2011/01/28 | [
"https://diy.stackexchange.com/questions/4263",
"https://diy.stackexchange.com",
"https://diy.stackexchange.com/users/1484/"
] | Not knowing where the house is limits the advice. However since it has a flat roof, I'm going to assume it's not anywhere where it snows a lot.
You need to get a professional for several reasons.
1. In most states, as a landlord, you're required to do something and the only way you can demonstrate due diligence with ... | If they are only getting in from one spot, you can get a [one-way door](http://www.sears.com/shc/s/p_10153_12605_SPM2023743501P?sid=IDx20101019x00001a&ci_src=14110944&ci_sku=SPM2023743501) like this:

They can get out of the attic, but they won't ... |
4,263 | My tenants tell me that they hear an animal (possibly a raccoon) in the attic. This is an old (1880s) three story row house with a flat roof and a pretty low (2 ft average, maybe) attic. The house was totally renovated 10 years ago and I'm not very familiar with the attic situation or where the animal might have entere... | 2011/01/28 | [
"https://diy.stackexchange.com/questions/4263",
"https://diy.stackexchange.com",
"https://diy.stackexchange.com/users/1484/"
] | If they are only getting in from one spot, you can get a [one-way door](http://www.sears.com/shc/s/p_10153_12605_SPM2023743501P?sid=IDx20101019x00001a&ci_src=14110944&ci_sku=SPM2023743501) like this:

They can get out of the attic, but they won't ... | I had this problem in my house in Georgia with a number of animals, to solve I put my cat in the attic for a few hours a day for a week or so (usually when I was up there anyway). The cat never killed anything, (to my knowledge) but the scent of the cat drove the animals out for good. I have found this solution to be s... |
4,263 | My tenants tell me that they hear an animal (possibly a raccoon) in the attic. This is an old (1880s) three story row house with a flat roof and a pretty low (2 ft average, maybe) attic. The house was totally renovated 10 years ago and I'm not very familiar with the attic situation or where the animal might have entere... | 2011/01/28 | [
"https://diy.stackexchange.com/questions/4263",
"https://diy.stackexchange.com",
"https://diy.stackexchange.com/users/1484/"
] | If they are only getting in from one spot, you can get a [one-way door](http://www.sears.com/shc/s/p_10153_12605_SPM2023743501P?sid=IDx20101019x00001a&ci_src=14110944&ci_sku=SPM2023743501) like this:

They can get out of the attic, but they won't ... | We had a raccoon in the attic and hired a pest company to remove it. He sealed 3 entries and caged the 4th with a one way door. We got lucky the racoon didn't have a family in our attic.
What they do in this case is get the adults out with the one way door and then go into the attic to fetch the babies. The important t... |
4,263 | My tenants tell me that they hear an animal (possibly a raccoon) in the attic. This is an old (1880s) three story row house with a flat roof and a pretty low (2 ft average, maybe) attic. The house was totally renovated 10 years ago and I'm not very familiar with the attic situation or where the animal might have entere... | 2011/01/28 | [
"https://diy.stackexchange.com/questions/4263",
"https://diy.stackexchange.com",
"https://diy.stackexchange.com/users/1484/"
] | I don't know where you are located, but here in Massachusetts it is illegal for anyone to live-trap a problem animal and move it for release on other public or private property. Unless you're able to prevent the raccoons from entering (before they have babies up there, otherwise they *will* find a way back in), you wou... | We had a raccoon in the attic and hired a pest company to remove it. He sealed 3 entries and caged the 4th with a one way door. We got lucky the racoon didn't have a family in our attic.
What they do in this case is get the adults out with the one way door and then go into the attic to fetch the babies. The important t... |
4,263 | My tenants tell me that they hear an animal (possibly a raccoon) in the attic. This is an old (1880s) three story row house with a flat roof and a pretty low (2 ft average, maybe) attic. The house was totally renovated 10 years ago and I'm not very familiar with the attic situation or where the animal might have entere... | 2011/01/28 | [
"https://diy.stackexchange.com/questions/4263",
"https://diy.stackexchange.com",
"https://diy.stackexchange.com/users/1484/"
] | Not knowing where the house is limits the advice. However since it has a flat roof, I'm going to assume it's not anywhere where it snows a lot.
You need to get a professional for several reasons.
1. In most states, as a landlord, you're required to do something and the only way you can demonstrate due diligence with ... | I'd personally start by calling the local animal control office (it might be part of the local health department, depending on how your town/county/city/whatever government is organized)
They'd be able to tell you what's likely to be looking for new homes at this time of year in your area that fits the activity patter... |
4,263 | My tenants tell me that they hear an animal (possibly a raccoon) in the attic. This is an old (1880s) three story row house with a flat roof and a pretty low (2 ft average, maybe) attic. The house was totally renovated 10 years ago and I'm not very familiar with the attic situation or where the animal might have entere... | 2011/01/28 | [
"https://diy.stackexchange.com/questions/4263",
"https://diy.stackexchange.com",
"https://diy.stackexchange.com/users/1484/"
] | I don't know where you are located, but here in Massachusetts it is illegal for anyone to live-trap a problem animal and move it for release on other public or private property. Unless you're able to prevent the raccoons from entering (before they have babies up there, otherwise they *will* find a way back in), you wou... | I had this problem in my house in Georgia with a number of animals, to solve I put my cat in the attic for a few hours a day for a week or so (usually when I was up there anyway). The cat never killed anything, (to my knowledge) but the scent of the cat drove the animals out for good. I have found this solution to be s... |
15,512 | I want to rename one of my postGIS tables. However, when I do this by applying a simple
```
ALTER TABLE old_name RENAME TO new_name;
```
The spatial data, as I understand it, isn't updated with the new name. First, can these references be fixed by running the function:
```
SELECT probe_geometry_columns()
```
Is t... | 2011/10/10 | [
"https://gis.stackexchange.com/questions/15512",
"https://gis.stackexchange.com",
"https://gis.stackexchange.com/users/4453/"
] | ```
SELECT Probe_Geometry_Columns();
```
is a handy utility.
First, when we append a geometry column to an existing table with
```
SELECT AddGeometryColumn('my_table', 'geo_column', 1234, 'MULTIPOINT', 2);
```
we're feeding the function everything it needs to tack the column of type geometry (geo\_column) to the... | I'm not sure what SELECT probe\_geometry\_columns() does, but you can easily check the geometry\_columns table to see if your new table name is in there or if it is still pointing to the old one.
I suspect that you need to reload the GeoServer store to make sure it "notices" the changes. Alternatively a stop and star... |
15,512 | I want to rename one of my postGIS tables. However, when I do this by applying a simple
```
ALTER TABLE old_name RENAME TO new_name;
```
The spatial data, as I understand it, isn't updated with the new name. First, can these references be fixed by running the function:
```
SELECT probe_geometry_columns()
```
Is t... | 2011/10/10 | [
"https://gis.stackexchange.com/questions/15512",
"https://gis.stackexchange.com",
"https://gis.stackexchange.com/users/4453/"
] | In order to rename the table you will have to change the name in the metadata of two places. First on PostGIS, then on the Geoserver config.
To change the PostGIS one, you can update the geometry\_columns directly. Although probe\_geometries will have the effect of inserting that entry into geometry columns, it will a... | I'm not sure what SELECT probe\_geometry\_columns() does, but you can easily check the geometry\_columns table to see if your new table name is in there or if it is still pointing to the old one.
I suspect that you need to reload the GeoServer store to make sure it "notices" the changes. Alternatively a stop and star... |
15,512 | I want to rename one of my postGIS tables. However, when I do this by applying a simple
```
ALTER TABLE old_name RENAME TO new_name;
```
The spatial data, as I understand it, isn't updated with the new name. First, can these references be fixed by running the function:
```
SELECT probe_geometry_columns()
```
Is t... | 2011/10/10 | [
"https://gis.stackexchange.com/questions/15512",
"https://gis.stackexchange.com",
"https://gis.stackexchange.com/users/4453/"
] | Note that in PostGIS 2.0+, all you have to do is the normal
```
ALTER TABLE old_name RENAME TO new_name;
```
The entry in the geometry\_columns view (or geography\_columns) will also be updated. | I'm not sure what SELECT probe\_geometry\_columns() does, but you can easily check the geometry\_columns table to see if your new table name is in there or if it is still pointing to the old one.
I suspect that you need to reload the GeoServer store to make sure it "notices" the changes. Alternatively a stop and star... |
15,512 | I want to rename one of my postGIS tables. However, when I do this by applying a simple
```
ALTER TABLE old_name RENAME TO new_name;
```
The spatial data, as I understand it, isn't updated with the new name. First, can these references be fixed by running the function:
```
SELECT probe_geometry_columns()
```
Is t... | 2011/10/10 | [
"https://gis.stackexchange.com/questions/15512",
"https://gis.stackexchange.com",
"https://gis.stackexchange.com/users/4453/"
] | In order to rename the table you will have to change the name in the metadata of two places. First on PostGIS, then on the Geoserver config.
To change the PostGIS one, you can update the geometry\_columns directly. Although probe\_geometries will have the effect of inserting that entry into geometry columns, it will a... | ```
SELECT Probe_Geometry_Columns();
```
is a handy utility.
First, when we append a geometry column to an existing table with
```
SELECT AddGeometryColumn('my_table', 'geo_column', 1234, 'MULTIPOINT', 2);
```
we're feeding the function everything it needs to tack the column of type geometry (geo\_column) to the... |
15,512 | I want to rename one of my postGIS tables. However, when I do this by applying a simple
```
ALTER TABLE old_name RENAME TO new_name;
```
The spatial data, as I understand it, isn't updated with the new name. First, can these references be fixed by running the function:
```
SELECT probe_geometry_columns()
```
Is t... | 2011/10/10 | [
"https://gis.stackexchange.com/questions/15512",
"https://gis.stackexchange.com",
"https://gis.stackexchange.com/users/4453/"
] | Note that in PostGIS 2.0+, all you have to do is the normal
```
ALTER TABLE old_name RENAME TO new_name;
```
The entry in the geometry\_columns view (or geography\_columns) will also be updated. | ```
SELECT Probe_Geometry_Columns();
```
is a handy utility.
First, when we append a geometry column to an existing table with
```
SELECT AddGeometryColumn('my_table', 'geo_column', 1234, 'MULTIPOINT', 2);
```
we're feeding the function everything it needs to tack the column of type geometry (geo\_column) to the... |
15,512 | I want to rename one of my postGIS tables. However, when I do this by applying a simple
```
ALTER TABLE old_name RENAME TO new_name;
```
The spatial data, as I understand it, isn't updated with the new name. First, can these references be fixed by running the function:
```
SELECT probe_geometry_columns()
```
Is t... | 2011/10/10 | [
"https://gis.stackexchange.com/questions/15512",
"https://gis.stackexchange.com",
"https://gis.stackexchange.com/users/4453/"
] | In order to rename the table you will have to change the name in the metadata of two places. First on PostGIS, then on the Geoserver config.
To change the PostGIS one, you can update the geometry\_columns directly. Although probe\_geometries will have the effect of inserting that entry into geometry columns, it will a... | Note that in PostGIS 2.0+, all you have to do is the normal
```
ALTER TABLE old_name RENAME TO new_name;
```
The entry in the geometry\_columns view (or geography\_columns) will also be updated. |
50,676,819 | I would like to have an ongoing notification for my `ForegroundService` that requires as small place as possible. I like the "Android System - USB charging this device" style, but I cannot find any example how to achieve this.
[](https://i.stack.imgur.... | 2018/06/04 | [
"https://Stackoverflow.com/questions/50676819",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/157924/"
] | To display a compact single line notification like the charging notification, you have to create a `Notification Channel` with priority to IMPORTANCE\_MIN.
```
@TargetApi(Build.VERSION_CODES.O)
private static void createFgServiceChannel(Context context) {
NotificationChannel channel = new NotificationChannel("chan... | You need to set the Notification priority to Min, the Notification Channel importance to Min, and disable showing the Notification Channel Badge.
Here's a sample of how I do it. I've included creating the full notification as well for reference
```
private static final int MYAPP_NOTIFICATION_ID= -793531;
Notificatio... |
50,676,819 | I would like to have an ongoing notification for my `ForegroundService` that requires as small place as possible. I like the "Android System - USB charging this device" style, but I cannot find any example how to achieve this.
[](https://i.stack.imgur.... | 2018/06/04 | [
"https://Stackoverflow.com/questions/50676819",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/157924/"
] | **To answer the original question:**
There seems to be no built-in way on Android O to get a single line, ongoing notification for a `ForegroundService`. One could try adding a custom design, but as different phones have different designs for notification, that solution is hardly a good one.
**There is hope, however ... | You need to set the Notification priority to Min, the Notification Channel importance to Min, and disable showing the Notification Channel Badge.
Here's a sample of how I do it. I've included creating the full notification as well for reference
```
private static final int MYAPP_NOTIFICATION_ID= -793531;
Notificatio... |
50,676,819 | I would like to have an ongoing notification for my `ForegroundService` that requires as small place as possible. I like the "Android System - USB charging this device" style, but I cannot find any example how to achieve this.
[](https://i.stack.imgur.... | 2018/06/04 | [
"https://Stackoverflow.com/questions/50676819",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/157924/"
] | You need to set the Notification priority to Min, the Notification Channel importance to Min, and disable showing the Notification Channel Badge.
Here's a sample of how I do it. I've included creating the full notification as well for reference
```
private static final int MYAPP_NOTIFICATION_ID= -793531;
Notificatio... | I made the size of foreground service notification smaller by creating an empty custom view like this:
```
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
</LinearLayout>
... |
50,676,819 | I would like to have an ongoing notification for my `ForegroundService` that requires as small place as possible. I like the "Android System - USB charging this device" style, but I cannot find any example how to achieve this.
[](https://i.stack.imgur.... | 2018/06/04 | [
"https://Stackoverflow.com/questions/50676819",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/157924/"
] | To display a compact single line notification like the charging notification, you have to create a `Notification Channel` with priority to IMPORTANCE\_MIN.
```
@TargetApi(Build.VERSION_CODES.O)
private static void createFgServiceChannel(Context context) {
NotificationChannel channel = new NotificationChannel("chan... | I made the size of foreground service notification smaller by creating an empty custom view like this:
```
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
</LinearLayout>
... |
50,676,819 | I would like to have an ongoing notification for my `ForegroundService` that requires as small place as possible. I like the "Android System - USB charging this device" style, but I cannot find any example how to achieve this.
[](https://i.stack.imgur.... | 2018/06/04 | [
"https://Stackoverflow.com/questions/50676819",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/157924/"
] | **To answer the original question:**
There seems to be no built-in way on Android O to get a single line, ongoing notification for a `ForegroundService`. One could try adding a custom design, but as different phones have different designs for notification, that solution is hardly a good one.
**There is hope, however ... | I made the size of foreground service notification smaller by creating an empty custom view like this:
```
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
</LinearLayout>
... |
95,818 | I think I understand the difference of meaning between '*born*' and '*borne*', plus I have also checked out a few questions that were asked about the two terms on this forum. So, I hope I am not posting a duplicate question.
Since 'born' is an adjective and not a verb form, *'he was born on the Christmas day'* cannot ... | 2012/12/28 | [
"https://english.stackexchange.com/questions/95818",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/-1/"
] | *Born* is a rare English [Deponent verb](http://en.wikipedia.org/wiki/Deponent_verb) -- there may be more of them, but I can't think of any others offhand. A deponent verb is a verb that is passive in form (like *be born*) but **not** passive in meaning. This is an irregularity in a sense, because the usual forms don't... | The OED’s 43rd definition of the verb *bear* is ‘Of female mammalia, and especially women: To bring forth, produce, give birth to (offspring)’. The active sentence *She bore him on Christmas Day* therefore means that she produced him from her womb on Christmas Day. Of the child so produced it is possible to say *He was... |
95,818 | I think I understand the difference of meaning between '*born*' and '*borne*', plus I have also checked out a few questions that were asked about the two terms on this forum. So, I hope I am not posting a duplicate question.
Since 'born' is an adjective and not a verb form, *'he was born on the Christmas day'* cannot ... | 2012/12/28 | [
"https://english.stackexchange.com/questions/95818",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/-1/"
] | The OED’s 43rd definition of the verb *bear* is ‘Of female mammalia, and especially women: To bring forth, produce, give birth to (offspring)’. The active sentence *She bore him on Christmas Day* therefore means that she produced him from her womb on Christmas Day. Of the child so produced it is possible to say *He was... | Some of the sentences don't have passive voice. Logic is that they are not transition sentences. In case of sentence "I was born in 1996" Or " I was born in London" these are already passive and active too.
So it can't be passive other than this sentence. |
95,818 | I think I understand the difference of meaning between '*born*' and '*borne*', plus I have also checked out a few questions that were asked about the two terms on this forum. So, I hope I am not posting a duplicate question.
Since 'born' is an adjective and not a verb form, *'he was born on the Christmas day'* cannot ... | 2012/12/28 | [
"https://english.stackexchange.com/questions/95818",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/-1/"
] | *Born* is a rare English [Deponent verb](http://en.wikipedia.org/wiki/Deponent_verb) -- there may be more of them, but I can't think of any others offhand. A deponent verb is a verb that is passive in form (like *be born*) but **not** passive in meaning. This is an irregularity in a sense, because the usual forms don't... | It can indeed be ***borne***, although that does have the alternative interpretation you put forward.
*Bear* can mean "give birth to" as well as "tolerate", "carry" and "support". All the meanings can have the past participle *borne*.
>
> He was borne by Mary.
>
>
> His insults were borne by his family.
>
>
> Th... |
95,818 | I think I understand the difference of meaning between '*born*' and '*borne*', plus I have also checked out a few questions that were asked about the two terms on this forum. So, I hope I am not posting a duplicate question.
Since 'born' is an adjective and not a verb form, *'he was born on the Christmas day'* cannot ... | 2012/12/28 | [
"https://english.stackexchange.com/questions/95818",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/-1/"
] | It can indeed be ***borne***, although that does have the alternative interpretation you put forward.
*Bear* can mean "give birth to" as well as "tolerate", "carry" and "support". All the meanings can have the past participle *borne*.
>
> He was borne by Mary.
>
>
> His insults were borne by his family.
>
>
> Th... | Some of the sentences don't have passive voice. Logic is that they are not transition sentences. In case of sentence "I was born in 1996" Or " I was born in London" these are already passive and active too.
So it can't be passive other than this sentence. |
95,818 | I think I understand the difference of meaning between '*born*' and '*borne*', plus I have also checked out a few questions that were asked about the two terms on this forum. So, I hope I am not posting a duplicate question.
Since 'born' is an adjective and not a verb form, *'he was born on the Christmas day'* cannot ... | 2012/12/28 | [
"https://english.stackexchange.com/questions/95818",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/-1/"
] | *Born* is a rare English [Deponent verb](http://en.wikipedia.org/wiki/Deponent_verb) -- there may be more of them, but I can't think of any others offhand. A deponent verb is a verb that is passive in form (like *be born*) but **not** passive in meaning. This is an irregularity in a sense, because the usual forms don't... | I am profoundly disturbed by this irruption of blatant Strunk-and-Whitery into our hitherto decently descriptive deliberations.
Whence comes this invidious distinction of *adjective* and *participle* — not only here, but in the Comments [here](https://english.stackexchange.com/a/95720/24489) as well? What sinister con... |
95,818 | I think I understand the difference of meaning between '*born*' and '*borne*', plus I have also checked out a few questions that were asked about the two terms on this forum. So, I hope I am not posting a duplicate question.
Since 'born' is an adjective and not a verb form, *'he was born on the Christmas day'* cannot ... | 2012/12/28 | [
"https://english.stackexchange.com/questions/95818",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/-1/"
] | I am profoundly disturbed by this irruption of blatant Strunk-and-Whitery into our hitherto decently descriptive deliberations.
Whence comes this invidious distinction of *adjective* and *participle* — not only here, but in the Comments [here](https://english.stackexchange.com/a/95720/24489) as well? What sinister con... | Some of the sentences don't have passive voice. Logic is that they are not transition sentences. In case of sentence "I was born in 1996" Or " I was born in London" these are already passive and active too.
So it can't be passive other than this sentence. |
95,818 | I think I understand the difference of meaning between '*born*' and '*borne*', plus I have also checked out a few questions that were asked about the two terms on this forum. So, I hope I am not posting a duplicate question.
Since 'born' is an adjective and not a verb form, *'he was born on the Christmas day'* cannot ... | 2012/12/28 | [
"https://english.stackexchange.com/questions/95818",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/-1/"
] | *Born* is a rare English [Deponent verb](http://en.wikipedia.org/wiki/Deponent_verb) -- there may be more of them, but I can't think of any others offhand. A deponent verb is a verb that is passive in form (like *be born*) but **not** passive in meaning. This is an irregularity in a sense, because the usual forms don't... | Some of the sentences don't have passive voice. Logic is that they are not transition sentences. In case of sentence "I was born in 1996" Or " I was born in London" these are already passive and active too.
So it can't be passive other than this sentence. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.