qid int64 1 74.7M | question stringlengths 0 58.3k | date stringlengths 10 10 | metadata list | response_j stringlengths 2 48.3k | response_k stringlengths 2 40.5k |
|---|---|---|---|---|---|
369,487 | I am not an expert on either QFT or $C^{\*}$-algebras, but I'm trying to learn the basics of QFT. In all books/papers and other materials that I know, QFT is studied mainly using a lot of functional analysis and distribution theory, but I know that some algebraic constructions are also being used, and in this context $... | 2020/08/18 | [
"https://mathoverflow.net/questions/369487",
"https://mathoverflow.net",
"https://mathoverflow.net/users/150264/"
] | My PhD work used C\*-algebras quite heavily, so I guess I can claim some expertise there, but I'm not an expert in QFT. That will be the main perspective of my answer.
A good starting point for this discussion is the Stone-von Neumann theorem, a foundational result in both operator algebras and quantum mechanics. The ... | Again, a provisional answer from a non-expert: likely someone who is a real Jedi Master in Mathematical Physics/Operator Algebras will chime in.
In classical QM, one starts from a Hilbert space of states $H$, and builds from there by looking at special types of operators acting on $H$ (unitary for simmetries, and herm... |
165,233 | I want to get list of 5 recent posts from a subdomain (not multisite) to show on our main domain. Following is the code am trying to execute, but is giving the error - Invalid arguments supplied in foreach()
```
global $wpdb;
$second_db = new wpdb('user','pass','db','localhost');
$rows = $second_db->get_results('SELEC... | 2014/10/13 | [
"https://wordpress.stackexchange.com/questions/165233",
"https://wordpress.stackexchange.com",
"https://wordpress.stackexchange.com/users/19409/"
] | I'm looking at [wp-db.php](https://core.trac.wordpress.org/browser/tags/4.0/src/wp-includes/wp-db.php#L0) and see:
```
1384 if ( $this->dbh->connect_errno ) {
1385 $this->dbh = null;
```
This is in the class function `db_connect()`, which is called by the... | The only neat way to get a full permalink is to make use of the get\_permalink() function, @see
<http://codex.wordpress.org/Function_Reference/get_permalink>
```
get_permalink($obj->ID);
``` |
21,684 | I'm wondering if there is any research about if there are better, or at least "not so bad" times of a child's development for a father to less available. (Not completely absent, but time would be limited to weekends and a bit most/some evenings on weekdays.)
Situation is a two-parent household with one 3 year old dau... | 2015/08/17 | [
"https://parenting.stackexchange.com/questions/21684",
"https://parenting.stackexchange.com",
"https://parenting.stackexchange.com/users/17604/"
] | Based on my experience as a military kid, my husband's experience as a military dad, and my experience as a foster parent, the biggest factor is how the limited schedule is presented to the kids. For smaller children, like your daughter, they tend to quickly adapt to the new normal, as long as the parents are satisfied... | Well, I can talk to you from my experience with my oldest child. I got pregnant at the university, and her father was 400 km away because he was at university too. Her first three year she only saw him like two times a month, two days each.
She is now almost 6 years old, and love him so much. But the relationship with ... |
21,684 | I'm wondering if there is any research about if there are better, or at least "not so bad" times of a child's development for a father to less available. (Not completely absent, but time would be limited to weekends and a bit most/some evenings on weekdays.)
Situation is a two-parent household with one 3 year old dau... | 2015/08/17 | [
"https://parenting.stackexchange.com/questions/21684",
"https://parenting.stackexchange.com",
"https://parenting.stackexchange.com/users/17604/"
] | Simple answer, no there isn't a better or worse time in general. Each child is different and is going to need different amounts of time. But if you think about it, a great many children don't see one of their parents during the week very much. I work a typical office job (8-5) but if there's a late night, which happens... | Well, I can talk to you from my experience with my oldest child. I got pregnant at the university, and her father was 400 km away because he was at university too. Her first three year she only saw him like two times a month, two days each.
She is now almost 6 years old, and love him so much. But the relationship with ... |
21,684 | I'm wondering if there is any research about if there are better, or at least "not so bad" times of a child's development for a father to less available. (Not completely absent, but time would be limited to weekends and a bit most/some evenings on weekdays.)
Situation is a two-parent household with one 3 year old dau... | 2015/08/17 | [
"https://parenting.stackexchange.com/questions/21684",
"https://parenting.stackexchange.com",
"https://parenting.stackexchange.com/users/17604/"
] | Based on my experience as a military kid, my husband's experience as a military dad, and my experience as a foster parent, the biggest factor is how the limited schedule is presented to the kids. For smaller children, like your daughter, they tend to quickly adapt to the new normal, as long as the parents are satisfied... | Simple answer, no there isn't a better or worse time in general. Each child is different and is going to need different amounts of time. But if you think about it, a great many children don't see one of their parents during the week very much. I work a typical office job (8-5) but if there's a late night, which happens... |
31,007,392 | I have the below java code in which i am passing a file name to the the calling method lets say below code is initially the code is
```
File file = new File("C:\\oabc.csv");
String filename = file.getName();
s = getFileExtension(file) ;
if (s.equalsIgnoreCase(".csv"))
{
convertcsvtoexcel(filename);
}
```
now s... | 2015/06/23 | [
"https://Stackoverflow.com/questions/31007392",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1906154/"
] | The `:empty` selector is designed to look through the children of an element. This is why it doesn't necessarily work for you in this instance. Instead, you can select by the `value` attribute:
```
$('#sampleDiv input[value=""]').length;
```
[**Example**](https://jsfiddle.net/b5fad3Lu/3/)
Or by `filter()`:
```
$('... | The `:empty` stands for empty HTML and not empty values! You have to use this way:
```
count = 0;
$('#sampleDiv input').each(function () {
if ($(this).val().length == 0)
count++;
});
```
Or use `.filter()`:
```
$('#sampleDiv input').filter(function() {
return ($(this).val().trim().length == 0);
}).length;... |
31,007,392 | I have the below java code in which i am passing a file name to the the calling method lets say below code is initially the code is
```
File file = new File("C:\\oabc.csv");
String filename = file.getName();
s = getFileExtension(file) ;
if (s.equalsIgnoreCase(".csv"))
{
convertcsvtoexcel(filename);
}
```
now s... | 2015/06/23 | [
"https://Stackoverflow.com/questions/31007392",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1906154/"
] | The `:empty` selector is designed to look through the children of an element. This is why it doesn't necessarily work for you in this instance. Instead, you can select by the `value` attribute:
```
$('#sampleDiv input[value=""]').length;
```
[**Example**](https://jsfiddle.net/b5fad3Lu/3/)
Or by `filter()`:
```
$('... | This one works for all input text.
<https://jsfiddle.net/b5fad3Lu/2/>
```
var pl = $('input:text[value=""]').length;
$('#numberofEmpty').text( pl );
``` |
41,779,849 | I am getting images id from drawable-hdpi at run time using **getIdentifier** method using following code
```
mContext.getResources().getIdentifier(mContext.getPackageName() + ":drawable/" + mCur.getString(mCur.getColumnIndex(Constant.COLUMN_IMAGE_DRAWABLE)), null, null)
```
i also tried following ways
```
mContex... | 2017/01/21 | [
"https://Stackoverflow.com/questions/41779849",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1818073/"
] | nobody takes this question seriously but after do lots of type stuff i got the solution. Actually problem was with proguard, i don't known why but it works after set **false to shrinkResources**
```
release {
..
minifyEnabled true
shrinkResources false
}
``` | It`s the bad practce, you should use official google strategy as described here <https://developer.android.com/studio/build/shrink-code#keep-resources> |
41,779,849 | I am getting images id from drawable-hdpi at run time using **getIdentifier** method using following code
```
mContext.getResources().getIdentifier(mContext.getPackageName() + ":drawable/" + mCur.getString(mCur.getColumnIndex(Constant.COLUMN_IMAGE_DRAWABLE)), null, null)
```
i also tried following ways
```
mContex... | 2017/01/21 | [
"https://Stackoverflow.com/questions/41779849",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1818073/"
] | nobody takes this question seriously but after do lots of type stuff i got the solution. Actually problem was with proguard, i don't known why but it works after set **false to shrinkResources**
```
release {
..
minifyEnabled true
shrinkResources false
}
``` | release {
..
minifyEnabled true
shrinkResources false
```
}
```
worked fr me |
41,779,849 | I am getting images id from drawable-hdpi at run time using **getIdentifier** method using following code
```
mContext.getResources().getIdentifier(mContext.getPackageName() + ":drawable/" + mCur.getString(mCur.getColumnIndex(Constant.COLUMN_IMAGE_DRAWABLE)), null, null)
```
i also tried following ways
```
mContex... | 2017/01/21 | [
"https://Stackoverflow.com/questions/41779849",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1818073/"
] | It`s the bad practce, you should use official google strategy as described here <https://developer.android.com/studio/build/shrink-code#keep-resources> | release {
..
minifyEnabled true
shrinkResources false
```
}
```
worked fr me |
37,144,400 | I have a class with a lot of very similar properties:
```
class myClass(object):
def compute_foo(self):
return 3
def compute_bar(self):
return 4
@property
def foo(self):
try:
return self._foo
except AttributeError:
self._foo = self.compute_foo(... | 2016/05/10 | [
"https://Stackoverflow.com/questions/37144400",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1388292/"
] | You could always use the wraps trick to pass arguments to your decorator as follows:
```
from functools import wraps
class myDecorator(property):
def __init__(self, prop_name):
self.prop_name = prop_name
def __call__(self, wrappedCall):
@wraps(wrappedCall)
def wrapCall(*args, **kwargs... | If you want to use the `@decorator` syntax you're not going to be able to remap the property to a different name on the class. That means your `compute_x` methods are going to have to be renamed the same as the attribute.
EDIT: It is possible to remap the names, but you'd need to use a class decorator as well.
```
c... |
37,144,400 | I have a class with a lot of very similar properties:
```
class myClass(object):
def compute_foo(self):
return 3
def compute_bar(self):
return 4
@property
def foo(self):
try:
return self._foo
except AttributeError:
self._foo = self.compute_foo(... | 2016/05/10 | [
"https://Stackoverflow.com/questions/37144400",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1388292/"
] | You could always use the wraps trick to pass arguments to your decorator as follows:
```
from functools import wraps
class myDecorator(property):
def __init__(self, prop_name):
self.prop_name = prop_name
def __call__(self, wrappedCall):
@wraps(wrappedCall)
def wrapCall(*args, **kwargs... | I ended up with a metaclass, to make the subclassing easier. Thanks to Brendan Abel for hinting in this direction.
```
import types
class PropertyFromCompute(property):
def __init__(self, func):
self.func = None
self.func_name = func.__name__
self.internal_prop_name = self.func_name.repla... |
7,362,092 | In asp.net, buttons can have postback urls (ie by specifying a PostBackUrl - I have used this to truncate querystring parameters in the past - by just specifying the page url without any parameters). This is super easy with a button.
Does anyone know what the best approach to doing this is with a dropdownlist? If I sp... | 2011/09/09 | [
"https://Stackoverflow.com/questions/7362092",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/576521/"
] | No there isn't property with DropDownList. You can redirect the user using `Response.Redirect` method and use `Session collection` to persists data between requests. | If you are wanting to POST directly to another page, use could try a hidden button approach
```
<asp:DropDownList ID="lstMyDropDown" runat="server" ClientIDMode="Static" onchange="javascript:$get('btnHidden').click(); ">
<asp:ListItem Value="0" Text="Some Value 1" />
<asp:ListItem Value="1" Text="Some Value 2... |
7,362,092 | In asp.net, buttons can have postback urls (ie by specifying a PostBackUrl - I have used this to truncate querystring parameters in the past - by just specifying the page url without any parameters). This is super easy with a button.
Does anyone know what the best approach to doing this is with a dropdownlist? If I sp... | 2011/09/09 | [
"https://Stackoverflow.com/questions/7362092",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/576521/"
] | No there isn't property with DropDownList. You can redirect the user using `Response.Redirect` method and use `Session collection` to persists data between requests. | There isn't that property for DropDownList but you can do some tricks to add this functionality to your pages. First of all let me describe a situation why this property may be necessary for you:
1. You've got a page with a gridview filled from a database. For example a list of employees of your company. The fields ar... |
7,362,092 | In asp.net, buttons can have postback urls (ie by specifying a PostBackUrl - I have used this to truncate querystring parameters in the past - by just specifying the page url without any parameters). This is super easy with a button.
Does anyone know what the best approach to doing this is with a dropdownlist? If I sp... | 2011/09/09 | [
"https://Stackoverflow.com/questions/7362092",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/576521/"
] | There isn't that property for DropDownList but you can do some tricks to add this functionality to your pages. First of all let me describe a situation why this property may be necessary for you:
1. You've got a page with a gridview filled from a database. For example a list of employees of your company. The fields ar... | If you are wanting to POST directly to another page, use could try a hidden button approach
```
<asp:DropDownList ID="lstMyDropDown" runat="server" ClientIDMode="Static" onchange="javascript:$get('btnHidden').click(); ">
<asp:ListItem Value="0" Text="Some Value 1" />
<asp:ListItem Value="1" Text="Some Value 2... |
70,005,405 | I am trying to upload files that are 6mb in size.
The web config is set as follows:
```
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="2147483648" />
</requestFiltering>
</security>
</system.webServer>
```
I keep getting this error :
Maximum r... | 2021/11/17 | [
"https://Stackoverflow.com/questions/70005405",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10248825/"
] | In **machine.config** 4MB is set as default, but you can override it in you **web.config** file.
Try adding this:
```
<configuration>
<system.web>
<httpRuntime executionTimeout="240" maxRequestLength="20480" />
</system.web>
</configuration>
``` | Please set 'MaxRequestLength' property in httpRuntime section of web.config to a higher value. Please note that the unit for this property value is KB. The default is 4096 KB = 4 MB
<https://learn.microsoft.com/en-us/dotnet/api/system.web.configuration.httpruntimesection.maxrequestlength?view=netframework-4.8> |
70,005,405 | I am trying to upload files that are 6mb in size.
The web config is set as follows:
```
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="2147483648" />
</requestFiltering>
</security>
</system.webServer>
```
I keep getting this error :
Maximum r... | 2021/11/17 | [
"https://Stackoverflow.com/questions/70005405",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10248825/"
] | Ok so basically I figured that in my case even when editing the webconfig file and its maximum content length, it doesn't really work if you do not set your IIS settings correctly.
To do this:
1. go on the specific website you want to edit in IIS
2. select configuration Editor
3. set the section to - system.web/httpR... | In **machine.config** 4MB is set as default, but you can override it in you **web.config** file.
Try adding this:
```
<configuration>
<system.web>
<httpRuntime executionTimeout="240" maxRequestLength="20480" />
</system.web>
</configuration>
``` |
70,005,405 | I am trying to upload files that are 6mb in size.
The web config is set as follows:
```
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="2147483648" />
</requestFiltering>
</security>
</system.webServer>
```
I keep getting this error :
Maximum r... | 2021/11/17 | [
"https://Stackoverflow.com/questions/70005405",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10248825/"
] | Ok so basically I figured that in my case even when editing the webconfig file and its maximum content length, it doesn't really work if you do not set your IIS settings correctly.
To do this:
1. go on the specific website you want to edit in IIS
2. select configuration Editor
3. set the section to - system.web/httpR... | Please set 'MaxRequestLength' property in httpRuntime section of web.config to a higher value. Please note that the unit for this property value is KB. The default is 4096 KB = 4 MB
<https://learn.microsoft.com/en-us/dotnet/api/system.web.configuration.httpruntimesection.maxrequestlength?view=netframework-4.8> |
51,736,894 | I have 2 routers
router1
```
app.post ('/ consultations', function (req, res) {
req.session.nombre = 'administrator';
console.log ('test', req.session.name); // there the session is saved well
});
```
router2
```
router.get ('/', function (req, res) {
console.log ('retrieve session', req.session); // e... | 2018/08/07 | [
"https://Stackoverflow.com/questions/51736894",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | It's hard to answer this question because it keeps changing ;-) The version I'm answering asks whether there's a faster way than:
```
a=[]
for item in data:
if item not in a:
a.add(item)
```
That will be horridly slow, taking time quadratic in `len(data)`. In any version of Python the following will take... | You can try this,
```
a = list(set(data))
```
A List is an ordered sequence of elements whereas Set is a distinct list of elements which is unordered. |
59,528 | I heard this sentence in an American film a while ago as I was watching it on DVD (the part after **but** is verbatim):
*"I'm doing my best but **I mustn't be doing it right**."*
This is something I occasionally hear in American films: phrases like *"he mustn't have done it"* or *"she mustn't be studying now"*, where... | 2012/02/28 | [
"https://english.stackexchange.com/questions/59528",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/13799/"
] | Per my comment, I'd avoid it because it sounds rather dated and "upper class" to me.
Semantically, the reason for avoiding this construction is simply that it takes the focus off the critical word **not**. Since the "conclusion" clause is intended to convey something along the lines of *"I am failing"*, this negating ... | I personally find the use of the contraction "mustn't" to be a bit off-putting in this case, but I certainly would have no problem expressing an argument this way:
>
> If John had stolen the money, he would have gotten ink on his fingers when the dye-pack exploded.
>
>
> John doesn't have ink on his fingers.
>
>
... |
59,528 | I heard this sentence in an American film a while ago as I was watching it on DVD (the part after **but** is verbatim):
*"I'm doing my best but **I mustn't be doing it right**."*
This is something I occasionally hear in American films: phrases like *"he mustn't have done it"* or *"she mustn't be studying now"*, where... | 2012/02/28 | [
"https://english.stackexchange.com/questions/59528",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/13799/"
] | I personally find the use of the contraction "mustn't" to be a bit off-putting in this case, but I certainly would have no problem expressing an argument this way:
>
> If John had stolen the money, he would have gotten ink on his fingers when the dye-pack exploded.
>
>
> John doesn't have ink on his fingers.
>
>
... | When considered deductions, **can’t be** or **can’t/couldn’t have been** is negative of **must be**.
**Mustn't be** is also negative of **must be** meaning that there is no possible way that it could be otherwise. It implies the certainty of the speaker's own claim.
Please compare:
>
> a) ... but I must be doing i... |
59,528 | I heard this sentence in an American film a while ago as I was watching it on DVD (the part after **but** is verbatim):
*"I'm doing my best but **I mustn't be doing it right**."*
This is something I occasionally hear in American films: phrases like *"he mustn't have done it"* or *"she mustn't be studying now"*, where... | 2012/02/28 | [
"https://english.stackexchange.com/questions/59528",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/13799/"
] | I personally find the use of the contraction "mustn't" to be a bit off-putting in this case, but I certainly would have no problem expressing an argument this way:
>
> If John had stolen the money, he would have gotten ink on his fingers when the dye-pack exploded.
>
>
> John doesn't have ink on his fingers.
>
>
... | Several replies here address whether it is appropriate to use the contraction "mustn't" rather than writing out "must not" in such an example. Is this your question, or are you asking about the definition of the word "must"? Assuming the latter ...
"Must" can mean "obligated, required", as in, "You must pay your taxes... |
59,528 | I heard this sentence in an American film a while ago as I was watching it on DVD (the part after **but** is verbatim):
*"I'm doing my best but **I mustn't be doing it right**."*
This is something I occasionally hear in American films: phrases like *"he mustn't have done it"* or *"she mustn't be studying now"*, where... | 2012/02/28 | [
"https://english.stackexchange.com/questions/59528",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/13799/"
] | Per my comment, I'd avoid it because it sounds rather dated and "upper class" to me.
Semantically, the reason for avoiding this construction is simply that it takes the focus off the critical word **not**. Since the "conclusion" clause is intended to convey something along the lines of *"I am failing"*, this negating ... | When considered deductions, **can’t be** or **can’t/couldn’t have been** is negative of **must be**.
**Mustn't be** is also negative of **must be** meaning that there is no possible way that it could be otherwise. It implies the certainty of the speaker's own claim.
Please compare:
>
> a) ... but I must be doing i... |
59,528 | I heard this sentence in an American film a while ago as I was watching it on DVD (the part after **but** is verbatim):
*"I'm doing my best but **I mustn't be doing it right**."*
This is something I occasionally hear in American films: phrases like *"he mustn't have done it"* or *"she mustn't be studying now"*, where... | 2012/02/28 | [
"https://english.stackexchange.com/questions/59528",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/13799/"
] | Per my comment, I'd avoid it because it sounds rather dated and "upper class" to me.
Semantically, the reason for avoiding this construction is simply that it takes the focus off the critical word **not**. Since the "conclusion" clause is intended to convey something along the lines of *"I am failing"*, this negating ... | Several replies here address whether it is appropriate to use the contraction "mustn't" rather than writing out "must not" in such an example. Is this your question, or are you asking about the definition of the word "must"? Assuming the latter ...
"Must" can mean "obligated, required", as in, "You must pay your taxes... |
59,528 | I heard this sentence in an American film a while ago as I was watching it on DVD (the part after **but** is verbatim):
*"I'm doing my best but **I mustn't be doing it right**."*
This is something I occasionally hear in American films: phrases like *"he mustn't have done it"* or *"she mustn't be studying now"*, where... | 2012/02/28 | [
"https://english.stackexchange.com/questions/59528",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/13799/"
] | Several replies here address whether it is appropriate to use the contraction "mustn't" rather than writing out "must not" in such an example. Is this your question, or are you asking about the definition of the word "must"? Assuming the latter ...
"Must" can mean "obligated, required", as in, "You must pay your taxes... | When considered deductions, **can’t be** or **can’t/couldn’t have been** is negative of **must be**.
**Mustn't be** is also negative of **must be** meaning that there is no possible way that it could be otherwise. It implies the certainty of the speaker's own claim.
Please compare:
>
> a) ... but I must be doing i... |
38,763,855 | I am trying to use custom font on my appcelerator android app but it's not working.
Here is my code.
```
File name = DroidNaskhRegular.ttf
Path = app/assets/android/fonts/DroidNaskhRegular.ttf
// index.tss
"#headertitle":{
color: "white",
font:{
fontFamily: "DroidNaskhRegular"
}
}
``` | 2016/08/04 | [
"https://Stackoverflow.com/questions/38763855",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4759312/"
] | Path should be this:
**app/assets/fonts/DroidNaskhRegular.ttf**
just move the **fonts** folder out of android. | You could also double check the font name within the TTF itself. I know that iOS and Android treat this differently... in my own app, I updated the TTF to have the same file and font name. You could try opening up the TTF on your computer, see the name (possibly `Droid Arabic Naskh`) and try that as the `fontFamily` in... |
29,644,336 | I have an issue and I'm unable to resolve it. Have a look at my code.
```
CustomerProductivity.Add(new ChartDataViewModel
{
Series = new List<string> { "Sales" },
ChartType = "bar",
Data = SalesStatistics
.GroupBy(b => b.CustomerName)
.Select(g => new ChartDataElement()
{
... | 2015/04/15 | [
"https://Stackoverflow.com/questions/29644336",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2542561/"
] | This is wrong:
```
while ($result25 = mysqli_query ($con,"SELECT * FROM santaterra WHERE Fecha='$today' AND Status='Reserved'"))
```
Your loop will never end as you are doing the same query over and over and over.
You need to do the query once and then fetch rows until there are no more:
```
$result25 = mysqli_que... | your while statement should be:
`while ($row = mysqli_fetch_array($result))` |
50,588,492 | I have two textboxes in my wpf application `tb1` and `tb2`.
I want `tb1.text` to be updated with `tb2.Text` **only** when `tb2` loses focus.
I tried:
xaml
```
<TextBox Name="tb1" Text="{Binding Text, ElementName=tb2 }" "/>
<TextBox Name="tb2" />
```
But `tb1.Text` is updated instantly.
Can it be done u... | 2018/05/29 | [
"https://Stackoverflow.com/questions/50588492",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5629544/"
] | The default value for `UpdateSourceTrigger` property of the `Binding` is `LostFocus`, so if you choose `tb2` as the **binding target** you can update `tb1` or the **binding source** on lose focus.
Now you want the binding to work in a one-way mode **from target to source** (tb2->tb1), so you need to change `Mode` of `... | ```
private void tb2_LostFocus(object sender, RoutedEventArgs e)
{
tb1.Text = tb2.Text;
}
``` |
44,705,678 | I'm trying to build a closure that does what my title says. My code runs but it does not print what I expected.
```
var names: [String] = []
var namesAndAges = ["Tom": 25, "Michael": 35, "Harry": 28, "Fabien": 16]
var ofAge = namesAndAges.filter { namesAndAges in namesAndAges.value > 18 }
var addNames = ofAge.map { ... | 2017/06/22 | [
"https://Stackoverflow.com/questions/44705678",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8049004/"
] | Basically you are misusing filter and map methods.
Try this:
```
var names: [String] = []
var namesAndAges = ["Tom": 25, "Michael": 35, "Harry": 28, "Fabien": 16]
var ofAge = namesAndAges.filter { $0.value > 18 }
var addNames = ofAge.map { $0.key }
print(addNames) //this prints ["Michael", "Harry", "Tom"]
``` | The issue you're experience is because `names.append(ofAge.key)` returns `Void` (a.k.a. the empty tuple, `()`). `map` produces a new `Array` containing the return values of the given closure after it's been applied to every element of the source array (`ofAge`, in your example).
The `names` array will actually contain... |
44,705,678 | I'm trying to build a closure that does what my title says. My code runs but it does not print what I expected.
```
var names: [String] = []
var namesAndAges = ["Tom": 25, "Michael": 35, "Harry": 28, "Fabien": 16]
var ofAge = namesAndAges.filter { namesAndAges in namesAndAges.value > 18 }
var addNames = ofAge.map { ... | 2017/06/22 | [
"https://Stackoverflow.com/questions/44705678",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8049004/"
] | Basically you are misusing filter and map methods.
Try this:
```
var names: [String] = []
var namesAndAges = ["Tom": 25, "Michael": 35, "Harry": 28, "Fabien": 16]
var ofAge = namesAndAges.filter { $0.value > 18 }
var addNames = ofAge.map { $0.key }
print(addNames) //this prints ["Michael", "Harry", "Tom"]
``` | To avoid looping more than once, this is how I do it:
```
var namesAndAges = ["Tom": 25, "Michael": 35, "Harry": 28, "Fabien": 16]
let addNames: [String] = namesAndAges.flatMap { $0.value > 18 ? $0.key : nil }
print(addNames) // prints ["Michael", "Harry", "Tom"]
```
(oh and it's shorter ) |
76,099 | I want to set up my raid server here at home to use gmail's smtp and an email from my google apps to alert me if there is any issues.
I set up ssmtp, here is my config:
```
# Config file for sSMTP sendmail
#
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
root=email@gmail.com... | 2009/10/19 | [
"https://serverfault.com/questions/76099",
"https://serverfault.com",
"https://serverfault.com/users/-1/"
] | The answer is that I had special characters in my email address. | Looks like Gmail is having a problem with it's TLS auth. I'd do what the message says and try again later. If it persists for a while, then consider bugging Gmail support about it. It certainly doesn't seem like it's anything wrong with your end. |
76,099 | I want to set up my raid server here at home to use gmail's smtp and an email from my google apps to alert me if there is any issues.
I set up ssmtp, here is my config:
```
# Config file for sSMTP sendmail
#
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
root=email@gmail.com... | 2009/10/19 | [
"https://serverfault.com/questions/76099",
"https://serverfault.com",
"https://serverfault.com/users/-1/"
] | Looks like Gmail is having a problem with it's TLS auth. I'd do what the message says and try again later. If it persists for a while, then consider bugging Gmail support about it. It certainly doesn't seem like it's anything wrong with your end. | Apparently Google has an interest in verifying some accounts and puts a capcha in the log-in block. Log in to your google account and go to this page to turn of the capcha:
<https://accounts.google.com/DisplayUnlockCaptcha> |
76,099 | I want to set up my raid server here at home to use gmail's smtp and an email from my google apps to alert me if there is any issues.
I set up ssmtp, here is my config:
```
# Config file for sSMTP sendmail
#
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
root=email@gmail.com... | 2009/10/19 | [
"https://serverfault.com/questions/76099",
"https://serverfault.com",
"https://serverfault.com/users/-1/"
] | The answer is that I had special characters in my email address. | This should be simple as with this old article: <http://www.sysadminsjourney.com/2008/09/01/use-gmail-as-an-smtp-relay-using-ssmtp> archived here: <http://web.archive.org/web/20090104204332/http://www.sysadminsjourney.com/2008/09/01/use-gmail-as-an-smtp-relay-using-ssmtp>
You are probably not correctly specifying your... |
76,099 | I want to set up my raid server here at home to use gmail's smtp and an email from my google apps to alert me if there is any issues.
I set up ssmtp, here is my config:
```
# Config file for sSMTP sendmail
#
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
root=email@gmail.com... | 2009/10/19 | [
"https://serverfault.com/questions/76099",
"https://serverfault.com",
"https://serverfault.com/users/-1/"
] | The answer is that I had special characters in my email address. | Apparently Google has an interest in verifying some accounts and puts a capcha in the log-in block. Log in to your google account and go to this page to turn of the capcha:
<https://accounts.google.com/DisplayUnlockCaptcha> |
76,099 | I want to set up my raid server here at home to use gmail's smtp and an email from my google apps to alert me if there is any issues.
I set up ssmtp, here is my config:
```
# Config file for sSMTP sendmail
#
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
root=email@gmail.com... | 2009/10/19 | [
"https://serverfault.com/questions/76099",
"https://serverfault.com",
"https://serverfault.com/users/-1/"
] | This should be simple as with this old article: <http://www.sysadminsjourney.com/2008/09/01/use-gmail-as-an-smtp-relay-using-ssmtp> archived here: <http://web.archive.org/web/20090104204332/http://www.sysadminsjourney.com/2008/09/01/use-gmail-as-an-smtp-relay-using-ssmtp>
You are probably not correctly specifying your... | Apparently Google has an interest in verifying some accounts and puts a capcha in the log-in block. Log in to your google account and go to this page to turn of the capcha:
<https://accounts.google.com/DisplayUnlockCaptcha> |
13,396,029 | I want a program that parses a XML-file, build a structure with the tags I need and finally print a HTML-report using HTML-templates with keywords that get replaced by the data from the XML files.
Since I'm not(yet) really into the OO programming I hoped to get some tips and advices how to structure a program like this... | 2012/11/15 | [
"https://Stackoverflow.com/questions/13396029",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1735706/"
] | Use the JQuery selectors to get all the images in the page:
```
$('img').adipoli({
'startEffect': 'overlay',
'hoverEffect': 'sliceDown'
```
}); | ID must be unique for each element, use class instead or tag name with context:
```
$('.myImgClass').adipoli({
'startEffect': 'overlay',
'hoverEffect': 'sliceDown'
});
``` |
13,396,029 | I want a program that parses a XML-file, build a structure with the tags I need and finally print a HTML-report using HTML-templates with keywords that get replaced by the data from the XML files.
Since I'm not(yet) really into the OO programming I hoped to get some tips and advices how to structure a program like this... | 2012/11/15 | [
"https://Stackoverflow.com/questions/13396029",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1735706/"
] | The problem is you are using an id as a selector (`$('#kio')`, the # means it's an id) and id's are unique to the page, so only one will be returned. So you should leave the id attribute out of the img tag.
The solution is to use a selector that gives you all the elements you want, in this case probably `$('.adipoli-w... | ID must be unique for each element, use class instead or tag name with context:
```
$('.myImgClass').adipoli({
'startEffect': 'overlay',
'hoverEffect': 'sliceDown'
});
``` |
13,396,029 | I want a program that parses a XML-file, build a structure with the tags I need and finally print a HTML-report using HTML-templates with keywords that get replaced by the data from the XML files.
Since I'm not(yet) really into the OO programming I hoped to get some tips and advices how to structure a program like this... | 2012/11/15 | [
"https://Stackoverflow.com/questions/13396029",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1735706/"
] | Use the JQuery selectors to get all the images in the page:
```
$('img').adipoli({
'startEffect': 'overlay',
'hoverEffect': 'sliceDown'
```
}); | ID must be unique first of all that's why it's only taking effect on first element with that id so instead of that try this
```
$('.adipoli-wrapper img').adipoli({
'startEffect': 'overlay',
'hoverEffect': 'sliceDown'
});
```
it will take effect on all image tag in span that has class adipol... |
13,396,029 | I want a program that parses a XML-file, build a structure with the tags I need and finally print a HTML-report using HTML-templates with keywords that get replaced by the data from the XML files.
Since I'm not(yet) really into the OO programming I hoped to get some tips and advices how to structure a program like this... | 2012/11/15 | [
"https://Stackoverflow.com/questions/13396029",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1735706/"
] | The problem is you are using an id as a selector (`$('#kio')`, the # means it's an id) and id's are unique to the page, so only one will be returned. So you should leave the id attribute out of the img tag.
The solution is to use a selector that gives you all the elements you want, in this case probably `$('.adipoli-w... | ID must be unique first of all that's why it's only taking effect on first element with that id so instead of that try this
```
$('.adipoli-wrapper img').adipoli({
'startEffect': 'overlay',
'hoverEffect': 'sliceDown'
});
```
it will take effect on all image tag in span that has class adipol... |
4,074,521 | Probably misunderstanding something simple, but i can't seem to get this to work.
I want to: go trough each img element in "wrapper", and strip all html from the title attribute (with stripTags() from mootools more). I get the error:
"this.get is not a function"
here is the code:
```
$('wrapper').getElements('img')... | 2010/11/02 | [
"https://Stackoverflow.com/questions/4074521",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/293592/"
] | ```
$('wrapper').getElements('img').each(function(el) {
var oldAlt = el.get('title').stripTags();
el.setProperty('alt', oldAlt);
});
```
this does not refer to the looping element -- the first argument to the .each callback function is `element` passed, the second is `index` (opposite to jquery where index i... | The other option is to bind the `this` variable
```
$('wrapper').getElements('img').each(function() {
var oldAlt = this.get('title').stripTags();
this.setProperty('alt', oldAlt);
}).bind(this);
```
The extra `.bind(this)` basically means, in the scope inside the each function, the variable `this` is bound ... |
12,624,024 | ```
#include <stdio.h>
int main(void)
{
char s[] = {'a','b','c','\n','c','\0'};
char *p;
p=&s[3];
printf("%d\t",++*p++);
printf("%d",*p);
return 0;
}
```
output: 11 99
Please explain the output. Why there is an increment in the address? | 2012/09/27 | [
"https://Stackoverflow.com/questions/12624024",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1700125/"
] | The only thing I see that could possibly be confusing is
```
++*p++
```
Postincrement has higher precedence than the dereference operator, so fully parenthesized it looks like
```
++(*(p++))
```
Which postincrements `p`, dereferences the original value of `p` to get a `char`, then preincrements the value of the `... | You should look at the operator precedences.
The expression `++*p++` is evaluated as`((*p) + 1)` by the compiler, and it also have a side-effect: it increments the value of `*p` and `p`. With a ASCII-compatible charset, this instruction prints `11` (`'\n'+1 == 10+1 == 11`) on the standard output. The second `printf`... |
12,624,024 | ```
#include <stdio.h>
int main(void)
{
char s[] = {'a','b','c','\n','c','\0'};
char *p;
p=&s[3];
printf("%d\t",++*p++);
printf("%d",*p);
return 0;
}
```
output: 11 99
Please explain the output. Why there is an increment in the address? | 2012/09/27 | [
"https://Stackoverflow.com/questions/12624024",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1700125/"
] | The only thing I see that could possibly be confusing is
```
++*p++
```
Postincrement has higher precedence than the dereference operator, so fully parenthesized it looks like
```
++(*(p++))
```
Which postincrements `p`, dereferences the original value of `p` to get a `char`, then preincrements the value of the `... | pointers in C are just integers which represent a memory location. Arrays in C are always in continuous memory blocks. So when you have a pointer which points to the third element of an array, and you add 1 from the pointer, it points at the fourth element.
In case you are confused about `++*p++`: That's because of th... |
71,655,186 | I'm new to C++ and I'm trying to make the console print "after 5 seconds" after 5000 ms. Then print "insta log" immediately after the new thread's declaration.
But doing so crashes with the following error:
"Debug Error!
[PROGRAM PATH]
abort() has been called
"
This is my code:
```
#include <iostream>
#include <... | 2022/03/29 | [
"https://Stackoverflow.com/questions/71655186",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18144936/"
] | If you had clicked 'retry' in that dialog you would have seen why your code died. Its right here
```
~thread() noexcept {
if (joinable()) {
_STD terminate();
}
}
```
in the MSVC implementation of std::thread. The code says that destroying a thread thats still joinable (ie is running) is illegal. I do... | Functions are already passed around as pointers, use `thread t(f)` instead of `thread t(&f)`.
Moreover, since your `main()` neither lasts longer than the thread or calls a `t.join()`, the program will end before the thread finishes it's code, so that might be another reason for a crash. In fact it is probably the reas... |
71,655,186 | I'm new to C++ and I'm trying to make the console print "after 5 seconds" after 5000 ms. Then print "insta log" immediately after the new thread's declaration.
But doing so crashes with the following error:
"Debug Error!
[PROGRAM PATH]
abort() has been called
"
This is my code:
```
#include <iostream>
#include <... | 2022/03/29 | [
"https://Stackoverflow.com/questions/71655186",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18144936/"
] | >
> This removes the error message.
>
>
>
Yes.
>
> but yields the main thread for 5 seconds.
>
>
>
This is not what is happening!
The main thread is waiting for your second thread `t` to finish (slightly different to yielding).
---
The problem before was that the main thread was exiting the application (an... | Functions are already passed around as pointers, use `thread t(f)` instead of `thread t(&f)`.
Moreover, since your `main()` neither lasts longer than the thread or calls a `t.join()`, the program will end before the thread finishes it's code, so that might be another reason for a crash. In fact it is probably the reas... |
71,655,186 | I'm new to C++ and I'm trying to make the console print "after 5 seconds" after 5000 ms. Then print "insta log" immediately after the new thread's declaration.
But doing so crashes with the following error:
"Debug Error!
[PROGRAM PATH]
abort() has been called
"
This is my code:
```
#include <iostream>
#include <... | 2022/03/29 | [
"https://Stackoverflow.com/questions/71655186",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18144936/"
] | >
> This removes the error message.
>
>
>
Yes.
>
> but yields the main thread for 5 seconds.
>
>
>
This is not what is happening!
The main thread is waiting for your second thread `t` to finish (slightly different to yielding).
---
The problem before was that the main thread was exiting the application (an... | If you had clicked 'retry' in that dialog you would have seen why your code died. Its right here
```
~thread() noexcept {
if (joinable()) {
_STD terminate();
}
}
```
in the MSVC implementation of std::thread. The code says that destroying a thread thats still joinable (ie is running) is illegal. I do... |
93,951 | The link between brain activity and qualia is unexplained. But most people think the former causes the latter.
What if its the other way, that our mind creates the external universe?
This does not necessarily mean that all other people are without a mind.
They also could have their own consciousness, but when they pas... | 2022/10/01 | [
"https://philosophy.stackexchange.com/questions/93951",
"https://philosophy.stackexchange.com",
"https://philosophy.stackexchange.com/users/56355/"
] | Yes. You can eliminate that possibility.
First of all, what you are aware of as being "you" is the experience of being you. This is clearly separate from what you experience as external to yourself, because you aren't aware of creating things that you perceive as external to yourself. Could this generation of things b... | Assuming [mind-body connection as holding true](https://philosophy.stackexchange.com/a/93309/14508) (mind and body are connected, regardless if "mind" is an epiphenomenon of matter or a separate thing in itself) and assuming matter-energy to be conserved, we can infer mind, in some sense similar to matter-energy, canno... |
93,951 | The link between brain activity and qualia is unexplained. But most people think the former causes the latter.
What if its the other way, that our mind creates the external universe?
This does not necessarily mean that all other people are without a mind.
They also could have their own consciousness, but when they pas... | 2022/10/01 | [
"https://philosophy.stackexchange.com/questions/93951",
"https://philosophy.stackexchange.com",
"https://philosophy.stackexchange.com/users/56355/"
] | Yes. You can eliminate that possibility.
First of all, what you are aware of as being "you" is the experience of being you. This is clearly separate from what you experience as external to yourself, because you aren't aware of creating things that you perceive as external to yourself. Could this generation of things b... | We first need to clear the widespread confusion between consciousness and mind.
It is the fact that the word "consciousness" is terminally ambiguous which led some philosophers to come up with the notion of subjective experience and qualia. We will follow this welcome innovation here.
We can define the mind as a sort... |
108,721 | I want to draw a path with no more then 2 points. On the second point I want the path to be finished.
I'm using the OpenLayers DrawFeature, I set a callbacks for "point" where I count the created points and if the points are two I'm finishing the sketch with `finishSketch()` method. The problem is that when finishSke... | 2014/07/29 | [
"https://gis.stackexchange.com/questions/108721",
"https://gis.stackexchange.com",
"https://gis.stackexchange.com/users/28590/"
] | It's not a bug in Draw Feature, that's just how 'sketch' works. As you should have noticed, when you drawing line using DrawFeature control, the last point will goes where you move the mouse, and when you finished drawing, it will be removed and the rest of the points forms the result line. That means you must have at ... | Simply use property `maxVertices`
```
// single line drawing control
_singleLineControl = new OpenLayers.Control.DrawFeature(
_singleLineLayer,
OpenLayers.Handler.Path,
{
eventListeners: { "featureadded": drawingFinished },
handlerOptions: {
maxVe... |
46,845 | This is going to be a very beginner's question.
I have a datset of continues features like LoanAmount, LoanDuration(multiclass?), ... ClientIncome, ClientFreeSources, etc. and a binary target whether a contract was sued or not.
I'm not sure how to approach the problem as I'm fairly new to DS.
I can reformulate the ta... | 2019/03/07 | [
"https://datascience.stackexchange.com/questions/46845",
"https://datascience.stackexchange.com",
"https://datascience.stackexchange.com/users/69073/"
] | I am expecting this question is for a supervised learning problem where you have a mixture of continuous and categorical features as independent features and your dependent or target feature is a binary class feature. If that is so please follow the below advice.
There might be a much better solutions but this worked ... | Since you have a binary target, you can use any classification algorithm, for example logistic regression, support vector machine or trees. It is therefore no problem at all if you have a binary target.
As for the problem of having too many categories when using post code, you could omit the last one or two digits, so... |
24,905,170 | **Is it possible to validate a signature only having an ancestor or root certificate in the hierarchy?**
*Disclaimer: I'm a newbie to the certificates handling so please forgive the naive terminology.*
Consider the following situation.
* We have two parties (let's call them **IdP** for Identity Provider and **SP** f... | 2014/07/23 | [
"https://Stackoverflow.com/questions/24905170",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/303810/"
] | it depends whether your SAML response contains the signing certificate `<ds:X509Data>...</ds:X509Data>` or just the public key `<ds:KeyValue>...</ds:KeyValue>` of it.
```
<saml2p:Response xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol" ...>
...
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<... | I'll start with some small introduction - the verification of digital signatures is done in two stages
* first signature verification - which checks that the signature value is actually corresponding to the content it protects and that the content therefore wasn't tampered with
* trust verification - check that the si... |
24,905,170 | **Is it possible to validate a signature only having an ancestor or root certificate in the hierarchy?**
*Disclaimer: I'm a newbie to the certificates handling so please forgive the naive terminology.*
Consider the following situation.
* We have two parties (let's call them **IdP** for Identity Provider and **SP** f... | 2014/07/23 | [
"https://Stackoverflow.com/questions/24905170",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/303810/"
] | it depends whether your SAML response contains the signing certificate `<ds:X509Data>...</ds:X509Data>` or just the public key `<ds:KeyValue>...</ds:KeyValue>` of it.
```
<saml2p:Response xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol" ...>
...
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<... | The short answer is "No." If you only have the CA's certificate but not the certificate of the IdP or SP you cannot validate the signature of IdP or SP.
The longer answer:
To validate the signature of the IdP by the SP, the SP first has to identify the correct public key associated with the IdP. Validation involves co... |
44,648,466 | I'm new in react-native.
I have run react native project on Ubuntu by using 'react-native run-android' command. And I got the error on emulator
"Unable to load script from assets 'index.android.bundle'.Make sure your bundle is packaged correctly or you are running a package server." | 2017/06/20 | [
"https://Stackoverflow.com/questions/44648466",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7666227/"
] | In my case (embedding React Native as a new `Activity` into an existing Android Code Base), the problem was Android Studio had auto-imported the wrong **BuildConfig**.
Wrong:
`import com.facebook.react.BuildConfig;`
Right:
`import com.mywebdomain.myapp.BuildConfig;`
This would apply to the wherever you are housing t... | In my case the problem was in this row in the React Activity file:
```
mReactInstanceManager = ReactInstanceManager.builder()
...
.setUseDeveloperSupport(BuildConfig.DEBUG)
...
```
BuildConfig.DEBUG must be set to true, while in my case it was false |
44,648,466 | I'm new in react-native.
I have run react native project on Ubuntu by using 'react-native run-android' command. And I got the error on emulator
"Unable to load script from assets 'index.android.bundle'.Make sure your bundle is packaged correctly or you are running a package server." | 2017/06/20 | [
"https://Stackoverflow.com/questions/44648466",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7666227/"
] | Using
npm version 4.3.0
react-native-cli version 2.01
react-native version 0.49.5
In project directory,
* `mkdir android/app/src/main/assets`
* `react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/... | For this error :
>
> unable to load script from assets 'index.android.bundle'
>
>
>
1) Check for "**assets**" folder at :
```
mkdir android\app\src\main\assets
```
If the folder is not available, create a folder with name "assets" manually. and execute the Curl command in terminal.
2). Curl command:
```
cur... |
44,648,466 | I'm new in react-native.
I have run react native project on Ubuntu by using 'react-native run-android' command. And I got the error on emulator
"Unable to load script from assets 'index.android.bundle'.Make sure your bundle is packaged correctly or you are running a package server." | 2017/06/20 | [
"https://Stackoverflow.com/questions/44648466",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7666227/"
] | In my case (embedding React Native as a new `Activity` into an existing Android Code Base), the problem was Android Studio had auto-imported the wrong **BuildConfig**.
Wrong:
`import com.facebook.react.BuildConfig;`
Right:
`import com.mywebdomain.myapp.BuildConfig;`
This would apply to the wherever you are housing t... | I was getting this error too. But `adb reverse`worked for me |
44,648,466 | I'm new in react-native.
I have run react native project on Ubuntu by using 'react-native run-android' command. And I got the error on emulator
"Unable to load script from assets 'index.android.bundle'.Make sure your bundle is packaged correctly or you are running a package server." | 2017/06/20 | [
"https://Stackoverflow.com/questions/44648466",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7666227/"
] | It seems to be a problem in the newest version of React Native (0.46). Using the previous version seems to solve the problem `react-native init name --version react-native@0.45.1` and removes the error when running `react-native run-android`.
Edit: It is now fixed in version 0.46.1. | i'm using ubuntu 18.04 LTS ,react-native: 0.55.2. In my case here are few solutions for the problem .
1. in the terminal before you run npm run android type npm start. you might see an error
ERROR Metro Bundler can't listen on port 8081.
this occurs because there might be a process which is already running
Solution- ... |
44,648,466 | I'm new in react-native.
I have run react native project on Ubuntu by using 'react-native run-android' command. And I got the error on emulator
"Unable to load script from assets 'index.android.bundle'.Make sure your bundle is packaged correctly or you are running a package server." | 2017/06/20 | [
"https://Stackoverflow.com/questions/44648466",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7666227/"
] | This helped me resolve the problem in following steps.
* If not than (in project directory) mkdir android/app/src/main/assets
* `react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res`
* `r... | It seems to be a problem in the newest version of React Native (0.46). Using the previous version seems to solve the problem `react-native init name --version react-native@0.45.1` and removes the error when running `react-native run-android`.
Edit: It is now fixed in version 0.46.1. |
44,648,466 | I'm new in react-native.
I have run react native project on Ubuntu by using 'react-native run-android' command. And I got the error on emulator
"Unable to load script from assets 'index.android.bundle'.Make sure your bundle is packaged correctly or you are running a package server." | 2017/06/20 | [
"https://Stackoverflow.com/questions/44648466",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7666227/"
] | In my case (embedding React Native as a new `Activity` into an existing Android Code Base), the problem was Android Studio had auto-imported the wrong **BuildConfig**.
Wrong:
`import com.facebook.react.BuildConfig;`
Right:
`import com.mywebdomain.myapp.BuildConfig;`
This would apply to the wherever you are housing t... | For this error :
>
> unable to load script from assets 'index.android.bundle'
>
>
>
1) Check for "**assets**" folder at :
```
mkdir android\app\src\main\assets
```
If the folder is not available, create a folder with name "assets" manually. and execute the Curl command in terminal.
2). Curl command:
```
cur... |
44,648,466 | I'm new in react-native.
I have run react native project on Ubuntu by using 'react-native run-android' command. And I got the error on emulator
"Unable to load script from assets 'index.android.bundle'.Make sure your bundle is packaged correctly or you are running a package server." | 2017/06/20 | [
"https://Stackoverflow.com/questions/44648466",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7666227/"
] | I also got this and I resolved this using following commands in your project directory:
```
$ mkdir android/app/src/main/assets
```
`$ react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/r... | For Windows user only:
1. Copy the path of adb location and set into `PATH` in your system variable,
2. Open project structure and delete node module folder.
3. Edit your project `package.JSON` file
change react-native version `"react-native": "0.55.2"`, and
babel `"babel-preset-react-native": "4"`, after that run `np... |
44,648,466 | I'm new in react-native.
I have run react native project on Ubuntu by using 'react-native run-android' command. And I got the error on emulator
"Unable to load script from assets 'index.android.bundle'.Make sure your bundle is packaged correctly or you are running a package server." | 2017/06/20 | [
"https://Stackoverflow.com/questions/44648466",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7666227/"
] | Using
npm version 4.3.0
react-native-cli version 2.01
react-native version 0.49.5
In project directory,
* `mkdir android/app/src/main/assets`
* `react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/... | In my case (embedding React Native as a new `Activity` into an existing Android Code Base), the problem was Android Studio had auto-imported the wrong **BuildConfig**.
Wrong:
`import com.facebook.react.BuildConfig;`
Right:
`import com.mywebdomain.myapp.BuildConfig;`
This would apply to the wherever you are housing t... |
44,648,466 | I'm new in react-native.
I have run react native project on Ubuntu by using 'react-native run-android' command. And I got the error on emulator
"Unable to load script from assets 'index.android.bundle'.Make sure your bundle is packaged correctly or you are running a package server." | 2017/06/20 | [
"https://Stackoverflow.com/questions/44648466",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7666227/"
] | This helped me resolve the problem in following steps.
* If not than (in project directory) mkdir android/app/src/main/assets
* `react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res`
* `r... | I discovered a solution suggested in the thread at <https://github.com/facebook/react-native/issues/15388>
It is to manually set the *Debug server host & port for device* setting for the app on the phone.
**Step by Step to eject and run a CRNA on Android**
In terminal:
1. `create-react-native-app myApp`
2. `cd myAp... |
44,648,466 | I'm new in react-native.
I have run react native project on Ubuntu by using 'react-native run-android' command. And I got the error on emulator
"Unable to load script from assets 'index.android.bundle'.Make sure your bundle is packaged correctly or you are running a package server." | 2017/06/20 | [
"https://Stackoverflow.com/questions/44648466",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7666227/"
] | This helped me resolve the problem in following steps.
* If not than (in project directory) mkdir android/app/src/main/assets
* `react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res`
* `r... | I was stuck in the same problem for hours and what solved my issue is this :
Create "assets" folder in main directory of project as well as in "newreactproject\android\app\src\main". Then put this script in package.json `"android-android": "react-native bundle --platform android --dev false --entry-file index.js --bund... |
16,952,746 | I'm wondering if this is possible, the ability to set the background position of an image to the top left of the html document, not the top left of the element it's the background of.
Psuedo-code
```
body {
background-image: url(someurlhere);
background-position: top left;
}
element {
background-image: u... | 2013/06/06 | [
"https://Stackoverflow.com/questions/16952746",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1653106/"
] | The first question would be why you are not just setting the background image on the `body` element.
But if that's not appropriate, you have the option to set a background image on an element to `fixed`, in which case it will be fixed to the top left of the browser window and won't scroll.
```
element {background: u... | All you have to do is wrap your element in a div absolute, and position it as you wish. |
16,952,746 | I'm wondering if this is possible, the ability to set the background position of an image to the top left of the html document, not the top left of the element it's the background of.
Psuedo-code
```
body {
background-image: url(someurlhere);
background-position: top left;
}
element {
background-image: u... | 2013/06/06 | [
"https://Stackoverflow.com/questions/16952746",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1653106/"
] | The first question would be why you are not just setting the background image on the `body` element.
But if that's not appropriate, you have the option to set a background image on an element to `fixed`, in which case it will be fixed to the top left of the browser window and won't scroll.
```
element {background: u... | Can you provide some more information on the context of the element? Does it have any positioning set? Where is it in the document? It's a little unclear to me what exactly you are trying to accomplish.
Would putting the background on the body work?
This would set the background at the top left, but I doubt this is a... |
156,955 | This is Chapter 3, Exercise 2 of Rudin's Principles.
Calculate $\lim\limits\_{n \to \infty} \sqrt{n^2+n} -n$.
Hints will be appreciated. | 2012/06/11 | [
"https://math.stackexchange.com/questions/156955",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/33486/"
] | Hint:
$$\frac{\sqrt{n^2+n}-n}{1} = \frac{\sqrt{n^2+n}-\sqrt{n^2}}{1}\times \frac{\sqrt{n^2+n}+\sqrt{n^2}}{\sqrt{n^2+n}+\sqrt{n^2}} = \cdots$$
I will expand more if needed. | $\sqrt{n^2+n} - n= \frac{n}{\sqrt{n^2+n} + n} = \frac{1}{\sqrt{1+\frac 1n} + 1}$ |
156,955 | This is Chapter 3, Exercise 2 of Rudin's Principles.
Calculate $\lim\limits\_{n \to \infty} \sqrt{n^2+n} -n$.
Hints will be appreciated. | 2012/06/11 | [
"https://math.stackexchange.com/questions/156955",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/33486/"
] | Hint:
$$\frac{\sqrt{n^2+n}-n}{1} = \frac{\sqrt{n^2+n}-\sqrt{n^2}}{1}\times \frac{\sqrt{n^2+n}+\sqrt{n^2}}{\sqrt{n^2+n}+\sqrt{n^2}} = \cdots$$
I will expand more if needed. | When you have a sequence that involves difference between two roots, it's often a good idea to try using the identity $(a-b)(a+b) = a^2-b^2$ to git rid of the root difference:
$$
\sqrt{a} - \sqrt{b} = \left(\sqrt{a} - \sqrt{b}\right)\frac{\sqrt{a} + \sqrt{b}}{\sqrt{a} + \sqrt{b}} = \frac{\left(\sqrt{a} - \sqrt{b}\right... |
156,955 | This is Chapter 3, Exercise 2 of Rudin's Principles.
Calculate $\lim\limits\_{n \to \infty} \sqrt{n^2+n} -n$.
Hints will be appreciated. | 2012/06/11 | [
"https://math.stackexchange.com/questions/156955",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/33486/"
] | Hint:
$$\frac{\sqrt{n^2+n}-n}{1} = \frac{\sqrt{n^2+n}-\sqrt{n^2}}{1}\times \frac{\sqrt{n^2+n}+\sqrt{n^2}}{\sqrt{n^2+n}+\sqrt{n^2}} = \cdots$$
I will expand more if needed. | To get an idea of what the answer *might* be, I tried inputting values: n=100, n=1000, n=1000000.
e.g. for n = 1000,
sqrt(1000000 + 1000) ~ 1000 + 1/2 because (1000 + 1/2)^2 = 1000000 + 2\*1000\*(1/2) + 1/4 ~ 1000000 + 1000.
If you can spot this, then the rest is easy. |
156,955 | This is Chapter 3, Exercise 2 of Rudin's Principles.
Calculate $\lim\limits\_{n \to \infty} \sqrt{n^2+n} -n$.
Hints will be appreciated. | 2012/06/11 | [
"https://math.stackexchange.com/questions/156955",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/33486/"
] | Hint:
$$\frac{\sqrt{n^2+n}-n}{1} = \frac{\sqrt{n^2+n}-\sqrt{n^2}}{1}\times \frac{\sqrt{n^2+n}+\sqrt{n^2}}{\sqrt{n^2+n}+\sqrt{n^2}} = \cdots$$
I will expand more if needed. | You can also do this by inductively showing it is increasing and bounded, but their ideas are probably a better route. |
156,955 | This is Chapter 3, Exercise 2 of Rudin's Principles.
Calculate $\lim\limits\_{n \to \infty} \sqrt{n^2+n} -n$.
Hints will be appreciated. | 2012/06/11 | [
"https://math.stackexchange.com/questions/156955",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/33486/"
] | $\sqrt{n^2+n} - n= \frac{n}{\sqrt{n^2+n} + n} = \frac{1}{\sqrt{1+\frac 1n} + 1}$ | To get an idea of what the answer *might* be, I tried inputting values: n=100, n=1000, n=1000000.
e.g. for n = 1000,
sqrt(1000000 + 1000) ~ 1000 + 1/2 because (1000 + 1/2)^2 = 1000000 + 2\*1000\*(1/2) + 1/4 ~ 1000000 + 1000.
If you can spot this, then the rest is easy. |
156,955 | This is Chapter 3, Exercise 2 of Rudin's Principles.
Calculate $\lim\limits\_{n \to \infty} \sqrt{n^2+n} -n$.
Hints will be appreciated. | 2012/06/11 | [
"https://math.stackexchange.com/questions/156955",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/33486/"
] | $\sqrt{n^2+n} - n= \frac{n}{\sqrt{n^2+n} + n} = \frac{1}{\sqrt{1+\frac 1n} + 1}$ | You can also do this by inductively showing it is increasing and bounded, but their ideas are probably a better route. |
156,955 | This is Chapter 3, Exercise 2 of Rudin's Principles.
Calculate $\lim\limits\_{n \to \infty} \sqrt{n^2+n} -n$.
Hints will be appreciated. | 2012/06/11 | [
"https://math.stackexchange.com/questions/156955",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/33486/"
] | When you have a sequence that involves difference between two roots, it's often a good idea to try using the identity $(a-b)(a+b) = a^2-b^2$ to git rid of the root difference:
$$
\sqrt{a} - \sqrt{b} = \left(\sqrt{a} - \sqrt{b}\right)\frac{\sqrt{a} + \sqrt{b}}{\sqrt{a} + \sqrt{b}} = \frac{\left(\sqrt{a} - \sqrt{b}\right... | To get an idea of what the answer *might* be, I tried inputting values: n=100, n=1000, n=1000000.
e.g. for n = 1000,
sqrt(1000000 + 1000) ~ 1000 + 1/2 because (1000 + 1/2)^2 = 1000000 + 2\*1000\*(1/2) + 1/4 ~ 1000000 + 1000.
If you can spot this, then the rest is easy. |
156,955 | This is Chapter 3, Exercise 2 of Rudin's Principles.
Calculate $\lim\limits\_{n \to \infty} \sqrt{n^2+n} -n$.
Hints will be appreciated. | 2012/06/11 | [
"https://math.stackexchange.com/questions/156955",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/33486/"
] | When you have a sequence that involves difference between two roots, it's often a good idea to try using the identity $(a-b)(a+b) = a^2-b^2$ to git rid of the root difference:
$$
\sqrt{a} - \sqrt{b} = \left(\sqrt{a} - \sqrt{b}\right)\frac{\sqrt{a} + \sqrt{b}}{\sqrt{a} + \sqrt{b}} = \frac{\left(\sqrt{a} - \sqrt{b}\right... | You can also do this by inductively showing it is increasing and bounded, but their ideas are probably a better route. |
12,439,255 | I opened this thread because I tried a lots of methodes I found here or elswhere to insert my custom stylesheet into an iframe with jQuery but none of them worked.
And now I'm stuck.
I'm open for any suggestion, for me it's not necessary to do it with jQuery if there is any other souliton.
this is what I have now:
``... | 2012/09/15 | [
"https://Stackoverflow.com/questions/12439255",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1457339/"
] | You cannot do that unless the current page is also from iwiw.hu. There is a [cross-domain limitation](https://stackoverflow.com/questions/3113253/whats-the-point-of-the-anti-cross-domain-policy), you cannot touch the output inside the `<iframe>` you created if it's outside your domain. | Some answers here ... unless the iframe domain defers from the main page.
[How to apply CSS to iframe?](https://stackoverflow.com/questions/217776/how-to-apply-css-to-iframe) |
1,870,009 | Is there any way of setting an "Column Alias" in SQL Server?
For Example i have two columns. Description and Price
```
ID colDescription colPrice
1 Red ball costs %colPrice% dollars 2
2 Blue ball costs %colPrice% dollars 3
```
The selection of colDesc... | 2009/12/08 | [
"https://Stackoverflow.com/questions/1870009",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/59314/"
] | The manual way to do so would be:
```
select replace(coldescription,'%colPrice%',colprice) from table
``` | You could use a Computed Column since you're on SQL Server 2005:
<http://msdn.microsoft.com/en-us/library/ms191250.aspx> |
156,643 | I have booked a ticket for future travel but now see the price has come down considerably. Should I cancel because of coronavirus and rebook with voucher? | 2020/04/11 | [
"https://travel.stackexchange.com/questions/156643",
"https://travel.stackexchange.com",
"https://travel.stackexchange.com/users/110859/"
] | You can't just 'cancel because of coronavirus'. If the airline is still listing the flight then you can only cancel on whatever terms you agreed to when you booked.
If your ticket is fully refundable then you can cancel and rebook, if you can actually get the refund. Many airlines are refusing to pay refunds at presen... | There are some risks associated with it.
It can take a significant time to issue a voucher depending on airline. So, you may need to wait much time to get the voucher and pay for the flight again with it. (My Scoot ticket voucher is currently 2+ months waiting to be issued.)
The voucher also may have some conditions ... |
156,643 | I have booked a ticket for future travel but now see the price has come down considerably. Should I cancel because of coronavirus and rebook with voucher? | 2020/04/11 | [
"https://travel.stackexchange.com/questions/156643",
"https://travel.stackexchange.com",
"https://travel.stackexchange.com/users/110859/"
] | There are some risks associated with it.
It can take a significant time to issue a voucher depending on airline. So, you may need to wait much time to get the voucher and pay for the flight again with it. (My Scoot ticket voucher is currently 2+ months waiting to be issued.)
The voucher also may have some conditions ... | It depends on the type of your ticket you purchased. No airline will cancel your booking because of the corona. I tried that. I didn't have a non-refundable ticket (or whatever it is called). However, I had a flexible ticket so I just changed the dates of the flight. |
156,643 | I have booked a ticket for future travel but now see the price has come down considerably. Should I cancel because of coronavirus and rebook with voucher? | 2020/04/11 | [
"https://travel.stackexchange.com/questions/156643",
"https://travel.stackexchange.com",
"https://travel.stackexchange.com/users/110859/"
] | You can't just 'cancel because of coronavirus'. If the airline is still listing the flight then you can only cancel on whatever terms you agreed to when you booked.
If your ticket is fully refundable then you can cancel and rebook, if you can actually get the refund. Many airlines are refusing to pay refunds at presen... | It depends on the type of your ticket you purchased. No airline will cancel your booking because of the corona. I tried that. I didn't have a non-refundable ticket (or whatever it is called). However, I had a flexible ticket so I just changed the dates of the flight. |
21,120,351 | Im reading a file on php using this code
```
$file_array = parse_ini_file("/usr/local/etc/oscam.user");
echo "<pre>";
foreach ($file_array as $value) {
echo $value."<br />";
}
exit;
```
That will output
```
sovrum
pass2
1
0
0B00
0B00:000000
```
Thats correct but the problem is, its jus... | 2014/01/14 | [
"https://Stackoverflow.com/questions/21120351",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2452442/"
] | You can try "showStatusBar : false".
I tryed your example on Qt Simulator, and it works without statusbar. I had a Meego - QML - PySide application, QML app worked without statusbar on Qt Simulator. But When I tryed it on android with Necessitas, I got same problem. After I use "showStatusBar : false" problem solved. ... | Sorry I am new to QML. You can try a different QML Harmattan example and try again with python using this `view.window().showFullScreen()` My application includes ListView and is based on an example application by Nokia Harmattan developer documentation site. First this is main.py for android:
```
#!/usr/bin/env pytho... |
29,601,848 | I'm building a [chartist](http://gionkunz.github.io/chartist-js/) Directive for my AngularJS app. What breaks my understanding at the moment is how I integrate jQuery code the Angular way.
This framework is using jQuery for creating a tooltip. The code is right here:
```
var $chart = $('.ct-chart');
var $toolTip... | 2015/04/13 | [
"https://Stackoverflow.com/questions/29601848",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1062194/"
] | You could replace `$` with `angular.element` which is the same as `$` of JQuery
& the other problem is before adding any new element to angular DOM it should go through the $compile cycle, Otherwise angular will not register that part of DOM
**Code**
```
var $chart = $('.ct-chart');
var $toolTip = $chart
.a... | You can use Jquery style code inside AngularJs.For example getting DOM element, you can use Jquery syntax,but Angular has it's syntax to do that.With angular.element([selector]).It returns you the same thing,which Jquery does.One thing else.If you mousevent functions are not defined as angularjs scope function,you don'... |
2,463 | Do we need the [amy-pond](https://scifi.stackexchange.com/questions/tagged/amy-pond "show questions tagged 'amy-pond'") tag?
It feels superfluous. | 2012/12/05 | [
"https://scifi.meta.stackexchange.com/questions/2463",
"https://scifi.meta.stackexchange.com",
"https://scifi.meta.stackexchange.com/users/3804/"
] | I don't think this tag is particularly helpful.
As Gilles mentioned in his comment to this question, we've had similar situations come up with character-specific tags in the past, and the most popular answers to the [Star Wars](https://scifi.meta.stackexchange.com/a/846/1359) and [Harry Potter](https://scifi.meta.sta... | Since I appear to be the one to blame for the tag, I feel obliged to answer;
We have a ton of character specific tags for various franchises and I don't really see the harm in extra tags, even if they don't have hundreds of questions. In this case I think there are some more questions related to Amy Pond that are just... |
172,855 | Where I work I often agree to take extra shifts when someone else can't make their shift upon my manager's request. I've been doing this often and don't feel like I'm getting [recognition](https://workplace.stackexchange.com/questions/11816/why-is-it-important-to-gain-visibility-in-the-workplace). (I make the standard ... | 2021/05/26 | [
"https://workplace.stackexchange.com/questions/172855",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/125210/"
] | I think (lightheartedly) that posting on an internet question answer site to let others respond to your extra shifts is the perfect solution. This is free and easy and this answer and the comments prove that it works.
Now on to some hopefully better advice.
You stated that you are already receiving the recognition of... | I hate to break it to you, but from a manager's point of view, there is no emotional component to shift assignments.
There is a limited amount of work available, and that is because there is a limited amount of pay available. The basic employment agreement is "I have something I need to be done and I'm willing to pay ... |
172,855 | Where I work I often agree to take extra shifts when someone else can't make their shift upon my manager's request. I've been doing this often and don't feel like I'm getting [recognition](https://workplace.stackexchange.com/questions/11816/why-is-it-important-to-gain-visibility-in-the-workplace). (I make the standard ... | 2021/05/26 | [
"https://workplace.stackexchange.com/questions/172855",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/125210/"
] | I think (lightheartedly) that posting on an internet question answer site to let others respond to your extra shifts is the perfect solution. This is free and easy and this answer and the comments prove that it works.
Now on to some hopefully better advice.
You stated that you are already receiving the recognition of... | I think the general answer would be to have a one on one meeting with your manager to discuss what you each think is going well and what can be improved with your work. You could then mention teamwork being an area you see yourself doing well in part because of taking the extra shifts. (I don't know if regular one on o... |
172,855 | Where I work I often agree to take extra shifts when someone else can't make their shift upon my manager's request. I've been doing this often and don't feel like I'm getting [recognition](https://workplace.stackexchange.com/questions/11816/why-is-it-important-to-gain-visibility-in-the-workplace). (I make the standard ... | 2021/05/26 | [
"https://workplace.stackexchange.com/questions/172855",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/125210/"
] | I think (lightheartedly) that posting on an internet question answer site to let others respond to your extra shifts is the perfect solution. This is free and easy and this answer and the comments prove that it works.
Now on to some hopefully better advice.
You stated that you are already receiving the recognition of... | Difference in expectations
--------------------------
This looks like classical example of difference in expectations in a (business) relation, between you and the company (represented by manager) .
What does company wants ? They need someone to fill in and do extra shift when someone else can't or won't. And that so... |
172,855 | Where I work I often agree to take extra shifts when someone else can't make their shift upon my manager's request. I've been doing this often and don't feel like I'm getting [recognition](https://workplace.stackexchange.com/questions/11816/why-is-it-important-to-gain-visibility-in-the-workplace). (I make the standard ... | 2021/05/26 | [
"https://workplace.stackexchange.com/questions/172855",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/125210/"
] | I think the general answer would be to have a one on one meeting with your manager to discuss what you each think is going well and what can be improved with your work. You could then mention teamwork being an area you see yourself doing well in part because of taking the extra shifts. (I don't know if regular one on o... | I hate to break it to you, but from a manager's point of view, there is no emotional component to shift assignments.
There is a limited amount of work available, and that is because there is a limited amount of pay available. The basic employment agreement is "I have something I need to be done and I'm willing to pay ... |
172,855 | Where I work I often agree to take extra shifts when someone else can't make their shift upon my manager's request. I've been doing this often and don't feel like I'm getting [recognition](https://workplace.stackexchange.com/questions/11816/why-is-it-important-to-gain-visibility-in-the-workplace). (I make the standard ... | 2021/05/26 | [
"https://workplace.stackexchange.com/questions/172855",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/125210/"
] | Difference in expectations
--------------------------
This looks like classical example of difference in expectations in a (business) relation, between you and the company (represented by manager) .
What does company wants ? They need someone to fill in and do extra shift when someone else can't or won't. And that so... | I hate to break it to you, but from a manager's point of view, there is no emotional component to shift assignments.
There is a limited amount of work available, and that is because there is a limited amount of pay available. The basic employment agreement is "I have something I need to be done and I'm willing to pay ... |
172,855 | Where I work I often agree to take extra shifts when someone else can't make their shift upon my manager's request. I've been doing this often and don't feel like I'm getting [recognition](https://workplace.stackexchange.com/questions/11816/why-is-it-important-to-gain-visibility-in-the-workplace). (I make the standard ... | 2021/05/26 | [
"https://workplace.stackexchange.com/questions/172855",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/125210/"
] | As a prelude to my answer, I'd like to point to [@HenryM's comment](https://workplace.stackexchange.com/questions/172855/how-to-get-more-recognition-for-taking-extra-shifts#comment564672_172855), who I agree was onto something there:
>
> Why do you want more recognition? What is your goal beyond that - because I'm gu... | I hate to break it to you, but from a manager's point of view, there is no emotional component to shift assignments.
There is a limited amount of work available, and that is because there is a limited amount of pay available. The basic employment agreement is "I have something I need to be done and I'm willing to pay ... |
172,855 | Where I work I often agree to take extra shifts when someone else can't make their shift upon my manager's request. I've been doing this often and don't feel like I'm getting [recognition](https://workplace.stackexchange.com/questions/11816/why-is-it-important-to-gain-visibility-in-the-workplace). (I make the standard ... | 2021/05/26 | [
"https://workplace.stackexchange.com/questions/172855",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/125210/"
] | As a prelude to my answer, I'd like to point to [@HenryM's comment](https://workplace.stackexchange.com/questions/172855/how-to-get-more-recognition-for-taking-extra-shifts#comment564672_172855), who I agree was onto something there:
>
> Why do you want more recognition? What is your goal beyond that - because I'm gu... | I think the general answer would be to have a one on one meeting with your manager to discuss what you each think is going well and what can be improved with your work. You could then mention teamwork being an area you see yourself doing well in part because of taking the extra shifts. (I don't know if regular one on o... |
172,855 | Where I work I often agree to take extra shifts when someone else can't make their shift upon my manager's request. I've been doing this often and don't feel like I'm getting [recognition](https://workplace.stackexchange.com/questions/11816/why-is-it-important-to-gain-visibility-in-the-workplace). (I make the standard ... | 2021/05/26 | [
"https://workplace.stackexchange.com/questions/172855",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/125210/"
] | As a prelude to my answer, I'd like to point to [@HenryM's comment](https://workplace.stackexchange.com/questions/172855/how-to-get-more-recognition-for-taking-extra-shifts#comment564672_172855), who I agree was onto something there:
>
> Why do you want more recognition? What is your goal beyond that - because I'm gu... | Difference in expectations
--------------------------
This looks like classical example of difference in expectations in a (business) relation, between you and the company (represented by manager) .
What does company wants ? They need someone to fill in and do extra shift when someone else can't or won't. And that so... |
26,417,293 | I am trying to make a program that censors the word "dang" with a "#!". My main method passes in a String sentence.
```
public static String deleteDang(String sentence)
/* pre: receives the sentence to be censored
post: returns the censored sentence*/
{
while(((sentence.toLowerCase()).contains("... | 2014/10/17 | [
"https://Stackoverflow.com/questions/26417293",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4013776/"
] | You can use a case insensitive regular expression, for example...
```
String sentance = "Dang the dang and DANG and I don't mind a dANg";
sentance = sentance.replaceAll("(?i)dang", "#!");
System.out.println(sentance);
```
Which will output something like...
```
#! the #! and #! and I don't mind a #!
```
**Updated... | You don't have to iterate. You can just use `replaceAll` method
```
sentence = sentence.replaceAll("dang", "#!");
```
This will only consider the exact word "dang"
If you want to replace all dang word without considering the case
then you can try
```
sentence = sentence.replaceAll("(?!)dang", "#!");
``` |
21,242,925 | Since I have updated my ios to 7.I dont know how get the current location and altitude with the new method
```
- (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations
```
Can Any one show me some sample code how to use this method to get current location and altitude?
Thanks a L... | 2014/01/20 | [
"https://Stackoverflow.com/questions/21242925",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3068520/"
] | The most recent location will be at the end of the `locations` array.
```
- (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations
{
CLLocation *mostRecentLocation = [locations lastObject];
bool haveValidAltitude = (mostRecentLocation.verticalAccuracy > 0);
if(haveValidA... | ```
- (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations
{
CLLocation *location = [locations lastObject];
NSLog(@"latitude %+.6f, longitude %+.6f\n", location.coordinate.latitude, location.coordinate.longitude);
}
```
`locations` is an array, last object of which is the... |
11,050,502 | I am running a stock Cygwin install, with the `wget` package added.
If I run a command
```
wget -qO- tetristv.com/zapni.tv.php
```
I get this; notice the incorrect display of characters
```none
session=OTA5Mjc0ODU5OA==&stream=play</a></b><br>#EXTINF:0,▒T 1<br><b><a
href="http://212.80.69.19/stream/vlc.php?id=... | 2012/06/15 | [
"https://Stackoverflow.com/questions/11050502",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1002260/"
] | ```
$ LANG=en_US.CP1252
$ wget -qO- tetristv.com/zapni.tv.php
```
Result
```none
261&session=NTk1NTg0ODU5OA==&stream=play</a></b><br>#EXTINF:0,Oèko<br><b><a
```
This also works
```
wget -qO- tetristv.com/zapni.tv.php | iconv -f cp1252
``` | I'm using stock cygwin in Mintty and have my lang set as `LANG=en_US.UTF-8` and it's been working fine for me (unfortunately our proxy server is blocking the site you referenced so I can't test that). Check out [Internationalization](http://cygwin.com/cygwin-ug-net/setup-locale.html) in the cygwin docs for more help.
... |
11,758,616 | How to determine if a checkbox is check or not through xpath
Currently I am trying :
```
//input[@type='checkbox' and @checked='true')]
```
I have multiple checkboxes with same ids so I have to select the next checkbox which is not selected/checked.
Specifically I need this for Selenium IDE
**Edit**
what I act... | 2012/08/01 | [
"https://Stackoverflow.com/questions/11758616",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/416100/"
] | 
Here `stnewrecord` is class of check-box.
Script will store number of check-box, and according to that loop will follow.
It will check whether check-box is checked or not if not it will check else move to next step.
```
xpath=(//input[@class='stnewr... | something like this may works:
```xml
//input[@checked='checked']/following-sibling::*[1][not(@checked='checked')]
``` |
11,758,616 | How to determine if a checkbox is check or not through xpath
Currently I am trying :
```
//input[@type='checkbox' and @checked='true')]
```
I have multiple checkboxes with same ids so I have to select the next checkbox which is not selected/checked.
Specifically I need this for Selenium IDE
**Edit**
what I act... | 2012/08/01 | [
"https://Stackoverflow.com/questions/11758616",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/416100/"
] | The xpath
```
// Xpath, only works in certain situations
//input[@type='checkbox' and @checked='xyz']
```
only works if in the HTML source of the checkbox there is an attribute as follows
```
checked="xyz"
```
where the developer is free to replace "xyz" with anything: "true", "checked", "ischecked", ...
So if t... | something like this may works:
```xml
//input[@checked='checked']/following-sibling::*[1][not(@checked='checked')]
``` |
11,758,616 | How to determine if a checkbox is check or not through xpath
Currently I am trying :
```
//input[@type='checkbox' and @checked='true')]
```
I have multiple checkboxes with same ids so I have to select the next checkbox which is not selected/checked.
Specifically I need this for Selenium IDE
**Edit**
what I act... | 2012/08/01 | [
"https://Stackoverflow.com/questions/11758616",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/416100/"
] | However, there are solution without using css classes and selectors.
Use
```
//input[@type='checkbox' and @checked]
```
or
```
//input[@type='checkbox' and not(@checked)]
```
instead of
```
//input[@type='checkbox' and @checked='xyz']
``` | something like this may works:
```xml
//input[@checked='checked']/following-sibling::*[1][not(@checked='checked')]
``` |
11,758,616 | How to determine if a checkbox is check or not through xpath
Currently I am trying :
```
//input[@type='checkbox' and @checked='true')]
```
I have multiple checkboxes with same ids so I have to select the next checkbox which is not selected/checked.
Specifically I need this for Selenium IDE
**Edit**
what I act... | 2012/08/01 | [
"https://Stackoverflow.com/questions/11758616",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/416100/"
] | The xpath
```
// Xpath, only works in certain situations
//input[@type='checkbox' and @checked='xyz']
```
only works if in the HTML source of the checkbox there is an attribute as follows
```
checked="xyz"
```
where the developer is free to replace "xyz" with anything: "true", "checked", "ischecked", ...
So if t... | 
Here `stnewrecord` is class of check-box.
Script will store number of check-box, and according to that loop will follow.
It will check whether check-box is checked or not if not it will check else move to next step.
```
xpath=(//input[@class='stnewr... |
11,758,616 | How to determine if a checkbox is check or not through xpath
Currently I am trying :
```
//input[@type='checkbox' and @checked='true')]
```
I have multiple checkboxes with same ids so I have to select the next checkbox which is not selected/checked.
Specifically I need this for Selenium IDE
**Edit**
what I act... | 2012/08/01 | [
"https://Stackoverflow.com/questions/11758616",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/416100/"
] | 
Here `stnewrecord` is class of check-box.
Script will store number of check-box, and according to that loop will follow.
It will check whether check-box is checked or not if not it will check else move to next step.
```
xpath=(//input[@class='stnewr... | However, there are solution without using css classes and selectors.
Use
```
//input[@type='checkbox' and @checked]
```
or
```
//input[@type='checkbox' and not(@checked)]
```
instead of
```
//input[@type='checkbox' and @checked='xyz']
``` |
11,758,616 | How to determine if a checkbox is check or not through xpath
Currently I am trying :
```
//input[@type='checkbox' and @checked='true')]
```
I have multiple checkboxes with same ids so I have to select the next checkbox which is not selected/checked.
Specifically I need this for Selenium IDE
**Edit**
what I act... | 2012/08/01 | [
"https://Stackoverflow.com/questions/11758616",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/416100/"
] | 
Here `stnewrecord` is class of check-box.
Script will store number of check-box, and according to that loop will follow.
It will check whether check-box is checked or not if not it will check else move to next step.
```
xpath=(//input[@class='stnewr... | You can try these one:
```
//*[@type='radio'][@checked='checked']/
//*[@type='radio'][not(@checked='checked')]/
``` |
11,758,616 | How to determine if a checkbox is check or not through xpath
Currently I am trying :
```
//input[@type='checkbox' and @checked='true')]
```
I have multiple checkboxes with same ids so I have to select the next checkbox which is not selected/checked.
Specifically I need this for Selenium IDE
**Edit**
what I act... | 2012/08/01 | [
"https://Stackoverflow.com/questions/11758616",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/416100/"
] | The xpath
```
// Xpath, only works in certain situations
//input[@type='checkbox' and @checked='xyz']
```
only works if in the HTML source of the checkbox there is an attribute as follows
```
checked="xyz"
```
where the developer is free to replace "xyz" with anything: "true", "checked", "ischecked", ...
So if t... | However, there are solution without using css classes and selectors.
Use
```
//input[@type='checkbox' and @checked]
```
or
```
//input[@type='checkbox' and not(@checked)]
```
instead of
```
//input[@type='checkbox' and @checked='xyz']
``` |
11,758,616 | How to determine if a checkbox is check or not through xpath
Currently I am trying :
```
//input[@type='checkbox' and @checked='true')]
```
I have multiple checkboxes with same ids so I have to select the next checkbox which is not selected/checked.
Specifically I need this for Selenium IDE
**Edit**
what I act... | 2012/08/01 | [
"https://Stackoverflow.com/questions/11758616",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/416100/"
] | The xpath
```
// Xpath, only works in certain situations
//input[@type='checkbox' and @checked='xyz']
```
only works if in the HTML source of the checkbox there is an attribute as follows
```
checked="xyz"
```
where the developer is free to replace "xyz" with anything: "true", "checked", "ischecked", ...
So if t... | You can try these one:
```
//*[@type='radio'][@checked='checked']/
//*[@type='radio'][not(@checked='checked')]/
``` |
11,758,616 | How to determine if a checkbox is check or not through xpath
Currently I am trying :
```
//input[@type='checkbox' and @checked='true')]
```
I have multiple checkboxes with same ids so I have to select the next checkbox which is not selected/checked.
Specifically I need this for Selenium IDE
**Edit**
what I act... | 2012/08/01 | [
"https://Stackoverflow.com/questions/11758616",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/416100/"
] | However, there are solution without using css classes and selectors.
Use
```
//input[@type='checkbox' and @checked]
```
or
```
//input[@type='checkbox' and not(@checked)]
```
instead of
```
//input[@type='checkbox' and @checked='xyz']
``` | You can try these one:
```
//*[@type='radio'][@checked='checked']/
//*[@type='radio'][not(@checked='checked')]/
``` |
349,989 | At my university we have a web service which allows us to upload PDF files and print them. Sometimes I want to print two or even four pages of the document on one page of the paper. As the online service doesn't allow me to choose this option (like Adobe Reader does), I have to change the PDF.
How can I change the PDF... | 2011/10/24 | [
"https://superuser.com/questions/349989",
"https://superuser.com",
"https://superuser.com/users/64857/"
] | You'll need to connect to ToR's control port and issue certain signals to have it create a new connection. You might have to manually check what the end IP is.
[This document](https://svn.torproject.org/svn/torctl/trunk/doc/howto.txt) has some example code in Java and Python for interfacing with ToR along with some of... | Use this in bash:
```
(echo authenticate '""'; echo signal newnym; echo quit) | nc localhost 9051
```
Use this in PHP:
```
// flush Tor circuit, obtain new IP
$password = '""'; // replace with your Tor password (if any)
exec("(echo authenticate $password; echo signal newnym; echo quit) | nc localhost 9051", $out);
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.