qid int64 1 74.7M | question stringlengths 15 58.3k | date stringlengths 10 10 | metadata list | response_j stringlengths 4 30.2k | response_k stringlengths 11 36.5k |
|---|---|---|---|---|---|
38,234,053 | I am writing a python script that performs these tasks:
* Query a MongoDB Collection with embeded documents
* Aggregate and Project to change the field names that are returned in the query to match a "u\_" convention
* Import the values to ServiceNow via REST API
**ISSUE:**
The embedded documents are not in a consis... | 2016/07/06 | [
"https://Stackoverflow.com/questions/38234053",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2183592/"
] | You should use `encodeURIComponent` (works in the browser and Node).
<https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent> | Maybe I'm oversimplifying but couldn't you use `lastIndexOf()`:
```
var url = 'http://myapi.com/action?url= https://www.test.com/play?song=portrait?action=jump';
var params = url.slice(url.lastIndexOf('?')+1);
console.log(params) // action=jump
``` |
38,234,053 | I am writing a python script that performs these tasks:
* Query a MongoDB Collection with embeded documents
* Aggregate and Project to change the field names that are returned in the query to match a "u\_" convention
* Import the values to ServiceNow via REST API
**ISSUE:**
The embedded documents are not in a consis... | 2016/07/06 | [
"https://Stackoverflow.com/questions/38234053",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2183592/"
] | You should use `encodeURIComponent` (works in the browser and Node).
<https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent> | Instead of adding `?action=jump` You'd want to add `&action=jump` to this url: `https://www.test.com/play%3F`.
Notice the `%3F`-part, it is a encoded `?`.
This does not work since it would just add that part as another parameter to the `http://myapi.com/action`-url.
And I know that you're already encoding your url... |
38,234,053 | I am writing a python script that performs these tasks:
* Query a MongoDB Collection with embeded documents
* Aggregate and Project to change the field names that are returned in the query to match a "u\_" convention
* Import the values to ServiceNow via REST API
**ISSUE:**
The embedded documents are not in a consis... | 2016/07/06 | [
"https://Stackoverflow.com/questions/38234053",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2183592/"
] | You should use `encodeURIComponent` (works in the browser and Node).
<https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent> | When u constructing the url with query string values then first call **encodeURIComponent** method by passing the querystring values then frame the URL.
Ex:
*var encodedURLComp="http://myapi.com/action?url="+window.encodeURIComponent("<https://www.test.com/play?song=portrait?action=jump>");
alert(encodedURLComp)... |
38,234,053 | I am writing a python script that performs these tasks:
* Query a MongoDB Collection with embeded documents
* Aggregate and Project to change the field names that are returned in the query to match a "u\_" convention
* Import the values to ServiceNow via REST API
**ISSUE:**
The embedded documents are not in a consis... | 2016/07/06 | [
"https://Stackoverflow.com/questions/38234053",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2183592/"
] | Consider use the [**`url.parse()`**/**`url.format()`**](https://nodejs.org/api/url.html) to handle correctly urls in node.js.
You can try with:
```
var url = require('url');
, apiurl = 'http://myapi.com/action';
, urlObject = url.parse(apiurl);
// Add query string parameters
urlObject.query = {
action: 'jump',... | Maybe I'm oversimplifying but couldn't you use `lastIndexOf()`:
```
var url = 'http://myapi.com/action?url= https://www.test.com/play?song=portrait?action=jump';
var params = url.slice(url.lastIndexOf('?')+1);
console.log(params) // action=jump
``` |
38,234,053 | I am writing a python script that performs these tasks:
* Query a MongoDB Collection with embeded documents
* Aggregate and Project to change the field names that are returned in the query to match a "u\_" convention
* Import the values to ServiceNow via REST API
**ISSUE:**
The embedded documents are not in a consis... | 2016/07/06 | [
"https://Stackoverflow.com/questions/38234053",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2183592/"
] | Consider use the [**`url.parse()`**/**`url.format()`**](https://nodejs.org/api/url.html) to handle correctly urls in node.js.
You can try with:
```
var url = require('url');
, apiurl = 'http://myapi.com/action';
, urlObject = url.parse(apiurl);
// Add query string parameters
urlObject.query = {
action: 'jump',... | Instead of adding `?action=jump` You'd want to add `&action=jump` to this url: `https://www.test.com/play%3F`.
Notice the `%3F`-part, it is a encoded `?`.
This does not work since it would just add that part as another parameter to the `http://myapi.com/action`-url.
And I know that you're already encoding your url... |
38,234,053 | I am writing a python script that performs these tasks:
* Query a MongoDB Collection with embeded documents
* Aggregate and Project to change the field names that are returned in the query to match a "u\_" convention
* Import the values to ServiceNow via REST API
**ISSUE:**
The embedded documents are not in a consis... | 2016/07/06 | [
"https://Stackoverflow.com/questions/38234053",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2183592/"
] | Consider use the [**`url.parse()`**/**`url.format()`**](https://nodejs.org/api/url.html) to handle correctly urls in node.js.
You can try with:
```
var url = require('url');
, apiurl = 'http://myapi.com/action';
, urlObject = url.parse(apiurl);
// Add query string parameters
urlObject.query = {
action: 'jump',... | When u constructing the url with query string values then first call **encodeURIComponent** method by passing the querystring values then frame the URL.
Ex:
*var encodedURLComp="http://myapi.com/action?url="+window.encodeURIComponent("<https://www.test.com/play?song=portrait?action=jump>");
alert(encodedURLComp)... |
38,234,053 | I am writing a python script that performs these tasks:
* Query a MongoDB Collection with embeded documents
* Aggregate and Project to change the field names that are returned in the query to match a "u\_" convention
* Import the values to ServiceNow via REST API
**ISSUE:**
The embedded documents are not in a consis... | 2016/07/06 | [
"https://Stackoverflow.com/questions/38234053",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2183592/"
] | Instead of adding `?action=jump` You'd want to add `&action=jump` to this url: `https://www.test.com/play%3F`.
Notice the `%3F`-part, it is a encoded `?`.
This does not work since it would just add that part as another parameter to the `http://myapi.com/action`-url.
And I know that you're already encoding your url... | Maybe I'm oversimplifying but couldn't you use `lastIndexOf()`:
```
var url = 'http://myapi.com/action?url= https://www.test.com/play?song=portrait?action=jump';
var params = url.slice(url.lastIndexOf('?')+1);
console.log(params) // action=jump
``` |
38,234,053 | I am writing a python script that performs these tasks:
* Query a MongoDB Collection with embeded documents
* Aggregate and Project to change the field names that are returned in the query to match a "u\_" convention
* Import the values to ServiceNow via REST API
**ISSUE:**
The embedded documents are not in a consis... | 2016/07/06 | [
"https://Stackoverflow.com/questions/38234053",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2183592/"
] | Instead of adding `?action=jump` You'd want to add `&action=jump` to this url: `https://www.test.com/play%3F`.
Notice the `%3F`-part, it is a encoded `?`.
This does not work since it would just add that part as another parameter to the `http://myapi.com/action`-url.
And I know that you're already encoding your url... | When u constructing the url with query string values then first call **encodeURIComponent** method by passing the querystring values then frame the URL.
Ex:
*var encodedURLComp="http://myapi.com/action?url="+window.encodeURIComponent("<https://www.test.com/play?song=portrait?action=jump>");
alert(encodedURLComp)... |
9,767,714 | Say I have structure like:
```
<ul id="a">text
<li id="b">text</li>
<li id="c">text</li>
</ul>
```
How can I assign different event handlers (say, onclick listener) to a, b and c? When I assign a handler to `<ul>`, it will be triggered when any of the `<li>` is clicked. | 2012/03/19 | [
"https://Stackoverflow.com/questions/9767714",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1064959/"
] | instead of setting a single handler for each element inside your list it's better to use a single event listener on the parent and, using event delegation, detect which is the id of the element the user clicked
```
$('ul').on('click', function(evt) {
id = evt.target.id;
switch (id) {
"a" : ... break;
... | Whenever an event is fired, it "bubbles". This means it is called on the actual element associated with it, but it is also fired once for every parent element in the chain all the way up to the top. So in your case, whenever you click on `b` or `c`, the event will *also* be fired for `a`. To avoid this, you need to sto... |
9,767,714 | Say I have structure like:
```
<ul id="a">text
<li id="b">text</li>
<li id="c">text</li>
</ul>
```
How can I assign different event handlers (say, onclick listener) to a, b and c? When I assign a handler to `<ul>`, it will be triggered when any of the `<li>` is clicked. | 2012/03/19 | [
"https://Stackoverflow.com/questions/9767714",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1064959/"
] | Whenever an event is fired, it "bubbles". This means it is called on the actual element associated with it, but it is also fired once for every parent element in the chain all the way up to the top. So in your case, whenever you click on `b` or `c`, the event will *also* be fired for `a`. To avoid this, you need to sto... | You can use this.
```
$('ul li#a').click(function(){
//some thing here...
});
$('ul li#b').click(function(){
//some thing here...
});
``` |
9,767,714 | Say I have structure like:
```
<ul id="a">text
<li id="b">text</li>
<li id="c">text</li>
</ul>
```
How can I assign different event handlers (say, onclick listener) to a, b and c? When I assign a handler to `<ul>`, it will be triggered when any of the `<li>` is clicked. | 2012/03/19 | [
"https://Stackoverflow.com/questions/9767714",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1064959/"
] | Whenever an event is fired, it "bubbles". This means it is called on the actual element associated with it, but it is also fired once for every parent element in the chain all the way up to the top. So in your case, whenever you click on `b` or `c`, the event will *also* be fired for `a`. To avoid this, you need to sto... | Every event bubbles up the DOM tree (or at least "should", as there is IE). You may want to stop that bubbling, see [Ben Lee's answer](https://stackoverflow.com/a/9767775/1048572). But there is a better way:
Just check whether the event triggering your listener was fired for the element you're watching or not. Then ex... |
9,767,714 | Say I have structure like:
```
<ul id="a">text
<li id="b">text</li>
<li id="c">text</li>
</ul>
```
How can I assign different event handlers (say, onclick listener) to a, b and c? When I assign a handler to `<ul>`, it will be triggered when any of the `<li>` is clicked. | 2012/03/19 | [
"https://Stackoverflow.com/questions/9767714",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1064959/"
] | Whenever an event is fired, it "bubbles". This means it is called on the actual element associated with it, but it is also fired once for every parent element in the chain all the way up to the top. So in your case, whenever you click on `b` or `c`, the event will *also* be fired for `a`. To avoid this, you need to sto... | I also faced the same problem in one of my projects. What I did was first declared a global variable(for flag purpose and default value false). Then I triggered the onmouseover and onmouseout events on all the children and changed the flag value to true whenever the cursor is over a child ( and reverting it back to fal... |
9,767,714 | Say I have structure like:
```
<ul id="a">text
<li id="b">text</li>
<li id="c">text</li>
</ul>
```
How can I assign different event handlers (say, onclick listener) to a, b and c? When I assign a handler to `<ul>`, it will be triggered when any of the `<li>` is clicked. | 2012/03/19 | [
"https://Stackoverflow.com/questions/9767714",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1064959/"
] | instead of setting a single handler for each element inside your list it's better to use a single event listener on the parent and, using event delegation, detect which is the id of the element the user clicked
```
$('ul').on('click', function(evt) {
id = evt.target.id;
switch (id) {
"a" : ... break;
... | You can use this.
```
$('ul li#a').click(function(){
//some thing here...
});
$('ul li#b').click(function(){
//some thing here...
});
``` |
9,767,714 | Say I have structure like:
```
<ul id="a">text
<li id="b">text</li>
<li id="c">text</li>
</ul>
```
How can I assign different event handlers (say, onclick listener) to a, b and c? When I assign a handler to `<ul>`, it will be triggered when any of the `<li>` is clicked. | 2012/03/19 | [
"https://Stackoverflow.com/questions/9767714",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1064959/"
] | instead of setting a single handler for each element inside your list it's better to use a single event listener on the parent and, using event delegation, detect which is the id of the element the user clicked
```
$('ul').on('click', function(evt) {
id = evt.target.id;
switch (id) {
"a" : ... break;
... | Every event bubbles up the DOM tree (or at least "should", as there is IE). You may want to stop that bubbling, see [Ben Lee's answer](https://stackoverflow.com/a/9767775/1048572). But there is a better way:
Just check whether the event triggering your listener was fired for the element you're watching or not. Then ex... |
9,767,714 | Say I have structure like:
```
<ul id="a">text
<li id="b">text</li>
<li id="c">text</li>
</ul>
```
How can I assign different event handlers (say, onclick listener) to a, b and c? When I assign a handler to `<ul>`, it will be triggered when any of the `<li>` is clicked. | 2012/03/19 | [
"https://Stackoverflow.com/questions/9767714",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1064959/"
] | instead of setting a single handler for each element inside your list it's better to use a single event listener on the parent and, using event delegation, detect which is the id of the element the user clicked
```
$('ul').on('click', function(evt) {
id = evt.target.id;
switch (id) {
"a" : ... break;
... | I also faced the same problem in one of my projects. What I did was first declared a global variable(for flag purpose and default value false). Then I triggered the onmouseover and onmouseout events on all the children and changed the flag value to true whenever the cursor is over a child ( and reverting it back to fal... |
9,767,714 | Say I have structure like:
```
<ul id="a">text
<li id="b">text</li>
<li id="c">text</li>
</ul>
```
How can I assign different event handlers (say, onclick listener) to a, b and c? When I assign a handler to `<ul>`, it will be triggered when any of the `<li>` is clicked. | 2012/03/19 | [
"https://Stackoverflow.com/questions/9767714",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1064959/"
] | Every event bubbles up the DOM tree (or at least "should", as there is IE). You may want to stop that bubbling, see [Ben Lee's answer](https://stackoverflow.com/a/9767775/1048572). But there is a better way:
Just check whether the event triggering your listener was fired for the element you're watching or not. Then ex... | You can use this.
```
$('ul li#a').click(function(){
//some thing here...
});
$('ul li#b').click(function(){
//some thing here...
});
``` |
9,767,714 | Say I have structure like:
```
<ul id="a">text
<li id="b">text</li>
<li id="c">text</li>
</ul>
```
How can I assign different event handlers (say, onclick listener) to a, b and c? When I assign a handler to `<ul>`, it will be triggered when any of the `<li>` is clicked. | 2012/03/19 | [
"https://Stackoverflow.com/questions/9767714",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1064959/"
] | Every event bubbles up the DOM tree (or at least "should", as there is IE). You may want to stop that bubbling, see [Ben Lee's answer](https://stackoverflow.com/a/9767775/1048572). But there is a better way:
Just check whether the event triggering your listener was fired for the element you're watching or not. Then ex... | I also faced the same problem in one of my projects. What I did was first declared a global variable(for flag purpose and default value false). Then I triggered the onmouseover and onmouseout events on all the children and changed the flag value to true whenever the cursor is over a child ( and reverting it back to fal... |
58,028,539 | I want to run the code which has assigned some arrays in 2 worksheets and based on match returns the data from one sheet to the other.
**In the sheet1:**
Here, I have 3 columns of data (for an example there is not so many rows, but it will be many more):
[
Dim w_result As Worksheet
Dim w1 As Worksheet
Dim r As Long
Dim ... | The way I would solve approach this is the following. First, if you are working with a large dataset in Excel you do not want to loop through the front end range, but rather, loop through arrays (memory).
Now, how do we use arrays effectively? Well, what do we need? We need an array for the Sheet1 data, we need and ar... |
58,028,539 | I want to run the code which has assigned some arrays in 2 worksheets and based on match returns the data from one sheet to the other.
**In the sheet1:**
Here, I have 3 columns of data (for an example there is not so many rows, but it will be many more):
[
Dim w_result As Worksheet
Dim w1 As Worksheet
Dim r As Long
Dim ... | This example with assumption the content sheet2 and sheet1 as like as s/o sample, and sheet1 content is sorted by id:
```
Sub test()
Dim w_result As Worksheet
Dim w1 As Worksheet
Dim r As Long
Dim d As Long
Dim intLastRow As Long
Dim IntLastRow_Result As Long
Dim IntLastCol As Long
W... |
58,028,539 | I want to run the code which has assigned some arrays in 2 worksheets and based on match returns the data from one sheet to the other.
**In the sheet1:**
Here, I have 3 columns of data (for an example there is not so many rows, but it will be many more):
[.
Now, how do we use arrays effectively? Well, what do we need? We need an array for the Sheet1 data, we need and ar... | This example with assumption the content sheet2 and sheet1 as like as s/o sample, and sheet1 content is sorted by id:
```
Sub test()
Dim w_result As Worksheet
Dim w1 As Worksheet
Dim r As Long
Dim d As Long
Dim intLastRow As Long
Dim IntLastRow_Result As Long
Dim IntLastCol As Long
W... |
27,265,066 | I have a working AJAX file that will execute the content in a PHP file. However, if the php is within the function(there are alot of php funtion in a PHP file), how do I call only the function that I want.
My AJAX code:
```
$(document).ready(function(){
// use ajax, call the PHP
$.ajax({
url: 'postme.php',
... | 2014/12/03 | [
"https://Stackoverflow.com/questions/27265066",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3977211/"
] | You're facing [off-by-one](http://en.wikipedia.org/wiki/Off-by-one_error) error.
Remember, the element number `n` in array is marked by `n-1` the index.
for example,
```
if((i>=8)&&((array[i-1])==0)&&((array[i-2])==1)&&((array[i-3])==1)&&((array[i-4])==0)&& ((array[i-5])==0)&&((array[i-6])==0)&&((array[i-7])==... | ```
this line that checks for the sequence,
which is probably where the problem is located
is very difficult to read.
suggest writing it like so:
if( (i>=8)
&& (0 == array[i-1])
&& (1 == array[i-2])
&& (1 == array[i-3])
&& (0 == array[i-4])
&& (0 == array[i-5])
&& (0 == array[i-6])
&& (0 == arra... |
24,872,503 | I am trying to make the following work `onChange` when a user leaves the first name field. I cannot see what I am doing wrong.
```
function changeCase() //Change first letter to uppercase and the rest to lowercase
{
var fName = document.getElementById('firstName');
var properCaseString = fName.substring(0,1).toU... | 2014/07/21 | [
"https://Stackoverflow.com/questions/24872503",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3861895/"
] | fName is an element, not a string:
```
var fName = document.getElementById('firstName').value;
```
is probably what you actually wanted to get. | You can (sort of) do this with CSS.
```
//won't change a name that is all caps
<style>
#firstName{
text-transform:capitalize;
}
</style>
```
or if there is only 1 word, so if they entered "`mary jane`" it would be "`Mary jane`"
```
<style>
#firstName{ text-transform: lowercase; }
#firstName:first-letter { text-tr... |
10,814,952 | I've got a lot of secrets stored in `myfile.txt`, which I have to access more or less daily. So I encrypted it using `openssl` and decrypt it when I need to look at it:
```
openssl aes-256-cbc -a -d -in myfile.txt.enc
```
This will display the file in my terminal, however it will also stay there - is there a way to ... | 2012/05/30 | [
"https://Stackoverflow.com/questions/10814952",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/319422/"
] | ```
read -sp Password: OPENSSLPASS
OPENSSLPASS=$OPENSSLPASS openssl aes-256-cbc -a -d -in myfile.txt.enc -pass env:OPENSSLPASS | less
unset OPENSSLPASS
```
Does not involve any temporary on-disk storage. Your password is temporarily stored in the shell environment for the duration of your `less` session (which *might... | The data is buffered in the screen, the terminal emulator, not the system where the file is on. The only secure way is to close the terminal afterwards.
The editing method is ok against users other than root, it is not secure against root, who can look at files in /tmp and your vim swap file. |
10,814,952 | I've got a lot of secrets stored in `myfile.txt`, which I have to access more or less daily. So I encrypted it using `openssl` and decrypt it when I need to look at it:
```
openssl aes-256-cbc -a -d -in myfile.txt.enc
```
This will display the file in my terminal, however it will also stay there - is there a way to ... | 2012/05/30 | [
"https://Stackoverflow.com/questions/10814952",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/319422/"
] | ```
read -sp Password: OPENSSLPASS
OPENSSLPASS=$OPENSSLPASS openssl aes-256-cbc -a -d -in myfile.txt.enc -pass env:OPENSSLPASS | less
unset OPENSSLPASS
```
Does not involve any temporary on-disk storage. Your password is temporarily stored in the shell environment for the duration of your `less` session (which *might... | The secure way is not to use a temporary file at all.
As you are using VIM, vim can read in the encrypted binary file,
decrypt it in memory
and then let you edit it.
It reverses the process to encrypt it on save.
Add the following to your .vimrc (or other relevent files)
```
" OpenSSL encrypted files.
" PBKDF v1.5 (... |
35,799,356 | ```
var sqlStatement = string.Format("select * from CardDecks where deckid = {0}", id);
var getcardid = db.CardDecks.SqlQuery(sqlStatement).ToList();
var getDistinct = getcardid.Distinct().ToList();
```
What I expect from this code is for the last list to only pull distinct values but it still pulls duplicates. I nee... | 2016/03/04 | [
"https://Stackoverflow.com/questions/35799356",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4881241/"
] | I changed the SQL statement to this and it works:
```
List<CardDeck> distictList = getcardid.GroupBy(p => p.CardID).Select(g => g.First()).ToList();
``` | You could write your query like this:
```
select distinct column1, column2, column3 from CardDecks where deckid = {0}
```
... where `column1, column2, column3` are the columns that you want to show. |
1,422,930 | Suppose user taps on a button and video begins to play. Now when video plays, it always in full screen mode.
Video should be played in a portrait mode (but normally video is played in landscape mode). How can I do this? | 2009/09/14 | [
"https://Stackoverflow.com/questions/1422930",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/140765/"
] | ```
@interface MPMoviePlayerController (extend)
-(void)setOrientation:(int)orientation animated:(BOOL)value;
@end
moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:movieUR];
[moviePlayer setOrientation:UIDeviceOrientationPortrait animated:NO];
if (moviePlayer)
{
[self.moviePlayer play];
} ... | From the documented docs i do not think this is possible using the built in media player |
1,422,930 | Suppose user taps on a button and video begins to play. Now when video plays, it always in full screen mode.
Video should be played in a portrait mode (but normally video is played in landscape mode). How can I do this? | 2009/09/14 | [
"https://Stackoverflow.com/questions/1422930",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/140765/"
] | Just an update, the latest iPhone SDK 3.2+ will now allow the programmers to show the video in any desired size and Orientation, New MPMoviePlayerView is provided, which is a property of MPMoviePlayerController, this view will have the video, which you can add as a subview to your view. | From the documented docs i do not think this is possible using the built in media player |
1,422,930 | Suppose user taps on a button and video begins to play. Now when video plays, it always in full screen mode.
Video should be played in a portrait mode (but normally video is played in landscape mode). How can I do this? | 2009/09/14 | [
"https://Stackoverflow.com/questions/1422930",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/140765/"
] | ```
@interface MPMoviePlayerController (extend)
-(void)setOrientation:(int)orientation animated:(BOOL)value;
@end
moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:movieUR];
[moviePlayer setOrientation:UIDeviceOrientationPortrait animated:NO];
if (moviePlayer)
{
[self.moviePlayer play];
} ... | Try this out.
I found something new.
```
@interface MPMoviePlayerController (extend)
-(void)setOrientation:(int)orientation animated:(BOOL)value;
@end
moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:movieUR];
[moviePlayer setOrientation:UIDeviceOrientationPortrait animated:NO];
if (moviePlayer)
{
... |
1,422,930 | Suppose user taps on a button and video begins to play. Now when video plays, it always in full screen mode.
Video should be played in a portrait mode (but normally video is played in landscape mode). How can I do this? | 2009/09/14 | [
"https://Stackoverflow.com/questions/1422930",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/140765/"
] | Just an update, the latest iPhone SDK 3.2+ will now allow the programmers to show the video in any desired size and Orientation, New MPMoviePlayerView is provided, which is a property of MPMoviePlayerController, this view will have the video, which you can add as a subview to your view. | Try this out.
I found something new.
```
@interface MPMoviePlayerController (extend)
-(void)setOrientation:(int)orientation animated:(BOOL)value;
@end
moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:movieUR];
[moviePlayer setOrientation:UIDeviceOrientationPortrait animated:NO];
if (moviePlayer)
{
... |
1,422,930 | Suppose user taps on a button and video begins to play. Now when video plays, it always in full screen mode.
Video should be played in a portrait mode (but normally video is played in landscape mode). How can I do this? | 2009/09/14 | [
"https://Stackoverflow.com/questions/1422930",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/140765/"
] | ```
@interface MPMoviePlayerController (extend)
-(void)setOrientation:(int)orientation animated:(BOOL)value;
@end
moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:movieUR];
[moviePlayer setOrientation:UIDeviceOrientationPortrait animated:NO];
if (moviePlayer)
{
[self.moviePlayer play];
} ... | Here's what I did. Add NSNotification to notify you when preloading of the video finishes.
```
- (void)playVideoUrl:(NSString *)videoUrl {
NSURL *url = [NSURL URLWithString:videoUrl];
MPMoviePlayerController* theMovie=[[MPMoviePlayerController alloc]
initWithContentURL:url];
[[NSNotificati... |
1,422,930 | Suppose user taps on a button and video begins to play. Now when video plays, it always in full screen mode.
Video should be played in a portrait mode (but normally video is played in landscape mode). How can I do this? | 2009/09/14 | [
"https://Stackoverflow.com/questions/1422930",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/140765/"
] | Just an update, the latest iPhone SDK 3.2+ will now allow the programmers to show the video in any desired size and Orientation, New MPMoviePlayerView is provided, which is a property of MPMoviePlayerController, this view will have the video, which you can add as a subview to your view. | Here's what I did. Add NSNotification to notify you when preloading of the video finishes.
```
- (void)playVideoUrl:(NSString *)videoUrl {
NSURL *url = [NSURL URLWithString:videoUrl];
MPMoviePlayerController* theMovie=[[MPMoviePlayerController alloc]
initWithContentURL:url];
[[NSNotificati... |
23,068,820 | I am trying to run a sample CoffeeScript unit test for a CoffeeScript sample class hierarchy, using Mocha. But I keep getting errors and it doesn't seem I can fix them without some help. This is my sample CoffeeScript file, in /src folder :
```
#Animal.coffee
class Animal
constructor: (@name) ->
move: (met... | 2014/04/14 | [
"https://Stackoverflow.com/questions/23068820",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/828688/"
] | Looks like you have a number of issues. Try the following:
src/animal.coffee:
```
class Animal
constructor: (@name) ->
move: (meters) ->
console.log @name + " moved #{meters}m."
class Snake extends Animal
move: ->
console.log "Slithering..."
super 5
module.exports.Snake = Snake
... | I got test case broken *randomly* when using **CoffeeScript** 1.8.0, **mocha** 1.21.4.
The test case can be approved by hand, but it failed in **mocha** with strange exceptions like "undefined function...". Too trivial to copy the long long fails, exceptions, stack traces...
To solve it:
* Enjoy the trouble
* Comme... |
23,068,820 | I am trying to run a sample CoffeeScript unit test for a CoffeeScript sample class hierarchy, using Mocha. But I keep getting errors and it doesn't seem I can fix them without some help. This is my sample CoffeeScript file, in /src folder :
```
#Animal.coffee
class Animal
constructor: (@name) ->
move: (met... | 2014/04/14 | [
"https://Stackoverflow.com/questions/23068820",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/828688/"
] | So, this is totally weird. An explanation is more than welcome! This is what I did and the test passed :
```
should = require ("../npm/node_modules/should/should")
{ Snake } = require ("../src/Animal.coffee")
describe 'sample', ->
it 'should pass', ->
(new Snake "Venomous python").should.be.an.instanceO... | I got test case broken *randomly* when using **CoffeeScript** 1.8.0, **mocha** 1.21.4.
The test case can be approved by hand, but it failed in **mocha** with strange exceptions like "undefined function...". Too trivial to copy the long long fails, exceptions, stack traces...
To solve it:
* Enjoy the trouble
* Comme... |
4,960,753 | I'm successfully converting a ViewGroup (RelativeLayout) into Bitmap using a Canvas. However, when the draw happens I only see the ViewGroup with its background drawable and not its children (two TextViews) who should be laid out within the RelativeLayout using rules like FILL\_PARENT.
The RelativeLayout is created us... | 2011/02/10 | [
"https://Stackoverflow.com/questions/4960753",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/611833/"
] | The problem is that **you did not measure and layout the container.** You must call `v.measure(widthSpec, heightSpec)` and then `v.layout(left, top, right, bottom)` before drawing can work. The first method will make sure the view knows how big you want it to be, and the second method will ensure the children are posit... | Solution that based on `DisplayMetrics` for the Layouts could be useful as well. In order not to repeat - [look here](https://stackoverflow.com/a/16796504/968702) . |
1,648,651 | I am busy with an e-commerce web application using visual studio 2005 and IIS 7
I got this error
System.TypeInitializationException was unhandled by user code
Message="The type initializer for 'ShopConfiguration' threw an exception."
Source="App\_Code.r-ihwy-d"
TypeName="ShopConfiguration"
StackTrace:
```
at ... | 2009/10/30 | [
"https://Stackoverflow.com/questions/1648651",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | I am quite sure that the `TypeInitializationException` that is thrown has another exception assigned to its `InnerException` property. If you examine that exception, I think you will find the real cause of your problem. | Sounds like you have specified an invalid setting for DbProviderName so internal checking code reports this exception. You'd better review the connection string settings. |
166,150 | I was wondering if SQL Server behaves differently with a unique non-clustered index versus a non-unique clustered index when it comes to KEY locks. | 2017/03/03 | [
"https://dba.stackexchange.com/questions/166150",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/118846/"
] | Theoretically yes, practically no.
If SQL Server can guarantee that a field is unique, then it can build execution plans differently. [Rob Farley blogged an example with AdventureWorks](http://blogs.msmvps.com/robfarley/2008/11/09/unique-indexes-with-group-by/) where the unique index isn't even *shown* in the executio... | Generally speaking, in a SELECT operation, SQL Server will prefer a non-clustered index to a clustered index, all other things equal. The reason is that non-clustered indexes typically are "narrower", and as such generate fewer I/Os.
Locking keys or pages in a non-clustered index instead of the clustered index may red... |
1,729,325 | what is an xml parser? how many types of parsers are there? which is the best xml parser to parse an xml document? how does an xml parser will work? can any one tell it briefly? | 2009/11/13 | [
"https://Stackoverflow.com/questions/1729325",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2714770/"
] | An XML parser is, just like any other parser, a tool which converts from a transport representation (text, in this case) to something you can access from your code (in this case, a tree or a series of parsing events, depending on the parser type).
There are two major types of XML parsers nowadays: *[DOM](http://en.wik... | * A XML Parser is a tool that converts XML into an accessible object
(EDIT: Following the comments)
or into a series of events. Basically anything you can use to consume and act on XML data
* Can you specify a language for the other qustions? |
1,729,325 | what is an xml parser? how many types of parsers are there? which is the best xml parser to parse an xml document? how does an xml parser will work? can any one tell it briefly? | 2009/11/13 | [
"https://Stackoverflow.com/questions/1729325",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2714770/"
] | * A XML Parser is a tool that converts XML into an accessible object
(EDIT: Following the comments)
or into a series of events. Basically anything you can use to consume and act on XML data
* Can you specify a language for the other qustions? | DOM and SAX are relatively speaking, old technologies, for latest ones check out STaX and VTD-XML |
1,729,325 | what is an xml parser? how many types of parsers are there? which is the best xml parser to parse an xml document? how does an xml parser will work? can any one tell it briefly? | 2009/11/13 | [
"https://Stackoverflow.com/questions/1729325",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2714770/"
] | An XML parser is, just like any other parser, a tool which converts from a transport representation (text, in this case) to something you can access from your code (in this case, a tree or a series of parsing events, depending on the parser type).
There are two major types of XML parsers nowadays: *[DOM](http://en.wik... | DOM and SAX are relatively speaking, old technologies, for latest ones check out STaX and VTD-XML |
53,870,457 | There is a good [example](https://python-docx.readthedocs.io/en/latest/index.html) for Python Docx.
I have used multiple `document.add_heading('xxx', level=Y)` and can see when I open the generated document in MS Word that the levels are correct.
What I don't see is numbering, such a 1, 1.1, 1.1.1, etc I just see the... | 2018/12/20 | [
"https://Stackoverflow.com/questions/53870457",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/192910/"
] | Alphanumeric heading prefixes are automatically created based on the outline style and level of the heading. Set the outline style and insert the correct level and you will get the numbering.
From documentation:
>
> \_NumberingStyle objects class docx.styles.style.\_NumberingStyle[source] A numbering style. Not yet
... | this answer will realy help you
first you need to new a without number header like this
```
paragraph = document.add_paragraph()
paragraph.style = document.styles['Heading 4']
```
then you will have xml word like this
```
<w:pPr>
<w:pStyle w:val="4"/>
</w:pPr>
```
then you can access xml word "pStyle" property a... |
53,870,457 | There is a good [example](https://python-docx.readthedocs.io/en/latest/index.html) for Python Docx.
I have used multiple `document.add_heading('xxx', level=Y)` and can see when I open the generated document in MS Word that the levels are correct.
What I don't see is numbering, such a 1, 1.1, 1.1.1, etc I just see the... | 2018/12/20 | [
"https://Stackoverflow.com/questions/53870457",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/192910/"
] | Alphanumeric heading prefixes are automatically created based on the outline style and level of the heading. Set the outline style and insert the correct level and you will get the numbering.
From documentation:
>
> \_NumberingStyle objects class docx.styles.style.\_NumberingStyle[source] A numbering style. Not yet
... | ```
def __str__(self):
if self.nivel == 1:
return str(Level.count_1)+'.- '+self.titulo
elif self.nivel==2: #Imprime si es del nivel 2
return str(Level.count_1)+'.'+str(Level.count_2)+'.- '+self.titulo
elif self.nivel==3: #Imprime si es del nivel 3
return str(Level.count_1)+'.'+str(L... |
53,870,457 | There is a good [example](https://python-docx.readthedocs.io/en/latest/index.html) for Python Docx.
I have used multiple `document.add_heading('xxx', level=Y)` and can see when I open the generated document in MS Word that the levels are correct.
What I don't see is numbering, such a 1, 1.1, 1.1.1, etc I just see the... | 2018/12/20 | [
"https://Stackoverflow.com/questions/53870457",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/192910/"
] | Alphanumeric heading prefixes are automatically created based on the outline style and level of the heading. Set the outline style and insert the correct level and you will get the numbering.
From documentation:
>
> \_NumberingStyle objects class docx.styles.style.\_NumberingStyle[source] A numbering style. Not yet
... | There is a great work around with python docx for achieving complex operations like headings enumerations. Here how to proceed:
1. Create a new blank document in Word and define your complex individual multilevel list there .
2. Save the blank document as `my_template.docx`.
3. Create the document in your python scrip... |
53,870,457 | There is a good [example](https://python-docx.readthedocs.io/en/latest/index.html) for Python Docx.
I have used multiple `document.add_heading('xxx', level=Y)` and can see when I open the generated document in MS Word that the levels are correct.
What I don't see is numbering, such a 1, 1.1, 1.1.1, etc I just see the... | 2018/12/20 | [
"https://Stackoverflow.com/questions/53870457",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/192910/"
] | this answer will realy help you
first you need to new a without number header like this
```
paragraph = document.add_paragraph()
paragraph.style = document.styles['Heading 4']
```
then you will have xml word like this
```
<w:pPr>
<w:pStyle w:val="4"/>
</w:pPr>
```
then you can access xml word "pStyle" property a... | ```
def __str__(self):
if self.nivel == 1:
return str(Level.count_1)+'.- '+self.titulo
elif self.nivel==2: #Imprime si es del nivel 2
return str(Level.count_1)+'.'+str(Level.count_2)+'.- '+self.titulo
elif self.nivel==3: #Imprime si es del nivel 3
return str(Level.count_1)+'.'+str(L... |
53,870,457 | There is a good [example](https://python-docx.readthedocs.io/en/latest/index.html) for Python Docx.
I have used multiple `document.add_heading('xxx', level=Y)` and can see when I open the generated document in MS Word that the levels are correct.
What I don't see is numbering, such a 1, 1.1, 1.1.1, etc I just see the... | 2018/12/20 | [
"https://Stackoverflow.com/questions/53870457",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/192910/"
] | There is a great work around with python docx for achieving complex operations like headings enumerations. Here how to proceed:
1. Create a new blank document in Word and define your complex individual multilevel list there .
2. Save the blank document as `my_template.docx`.
3. Create the document in your python scrip... | this answer will realy help you
first you need to new a without number header like this
```
paragraph = document.add_paragraph()
paragraph.style = document.styles['Heading 4']
```
then you will have xml word like this
```
<w:pPr>
<w:pStyle w:val="4"/>
</w:pPr>
```
then you can access xml word "pStyle" property a... |
53,870,457 | There is a good [example](https://python-docx.readthedocs.io/en/latest/index.html) for Python Docx.
I have used multiple `document.add_heading('xxx', level=Y)` and can see when I open the generated document in MS Word that the levels are correct.
What I don't see is numbering, such a 1, 1.1, 1.1.1, etc I just see the... | 2018/12/20 | [
"https://Stackoverflow.com/questions/53870457",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/192910/"
] | There is a great work around with python docx for achieving complex operations like headings enumerations. Here how to proceed:
1. Create a new blank document in Word and define your complex individual multilevel list there .
2. Save the blank document as `my_template.docx`.
3. Create the document in your python scrip... | ```
def __str__(self):
if self.nivel == 1:
return str(Level.count_1)+'.- '+self.titulo
elif self.nivel==2: #Imprime si es del nivel 2
return str(Level.count_1)+'.'+str(Level.count_2)+'.- '+self.titulo
elif self.nivel==3: #Imprime si es del nivel 3
return str(Level.count_1)+'.'+str(L... |
42,326 | I was reviewing an English text as an exercise, English not being my mother tongue, and I came to this sentence:
>
> (...) with the two other articles that conclude several things about customers e.g.. It is (...)
>
>
>
Note the double periods at the end of the sentence. Now I've got a gut feeling that this isn't... | 2011/09/18 | [
"https://english.stackexchange.com/questions/42326",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/13125/"
] | First: No.
"E.g." is the abbreviated Latin phrase "exempli gratia," and it is used in place of "for example."
"E.g." is used to introduce a set of examples, which mean it needs to be followed by the examples. It cannot be correctly used to mean "et cetera," or "etc."
Here is a correct example using "e.g.": I like mo... | *[E.g.](http://en.wiktionary.org/wiki/e.g.)* stands for the Latin *exempli gratia* and means *for instance*. So it can never replace *[etc.](http://en.wiktionary.org/wiki/etc.)*, which stands for *et cetera* and means *and the rest*.
>
> * A comma may or may not follow e.g.. For example:
> In some sports (e.g. socc... |
42,326 | I was reviewing an English text as an exercise, English not being my mother tongue, and I came to this sentence:
>
> (...) with the two other articles that conclude several things about customers e.g.. It is (...)
>
>
>
Note the double periods at the end of the sentence. Now I've got a gut feeling that this isn't... | 2011/09/18 | [
"https://english.stackexchange.com/questions/42326",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/13125/"
] | If you read *e.g.* (*exempli gratia*) as a general replacement for *for example* then you might in theory be prepared to use it at the end of a sentence if you would use *for example* there. In that case, ending "e.g.." would be correct.
Personally I would only ever use *e.g.* before the example(s). I would not put a ... | *[E.g.](http://en.wiktionary.org/wiki/e.g.)* stands for the Latin *exempli gratia* and means *for instance*. So it can never replace *[etc.](http://en.wiktionary.org/wiki/etc.)*, which stands for *et cetera* and means *and the rest*.
>
> * A comma may or may not follow e.g.. For example:
> In some sports (e.g. socc... |
42,326 | I was reviewing an English text as an exercise, English not being my mother tongue, and I came to this sentence:
>
> (...) with the two other articles that conclude several things about customers e.g.. It is (...)
>
>
>
Note the double periods at the end of the sentence. Now I've got a gut feeling that this isn't... | 2011/09/18 | [
"https://english.stackexchange.com/questions/42326",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/13125/"
] | First: No.
"E.g." is the abbreviated Latin phrase "exempli gratia," and it is used in place of "for example."
"E.g." is used to introduce a set of examples, which mean it needs to be followed by the examples. It cannot be correctly used to mean "et cetera," or "etc."
Here is a correct example using "e.g.": I like mo... | If you read *e.g.* (*exempli gratia*) as a general replacement for *for example* then you might in theory be prepared to use it at the end of a sentence if you would use *for example* there. In that case, ending "e.g.." would be correct.
Personally I would only ever use *e.g.* before the example(s). I would not put a ... |
50,052,859 | I am going round in circles trying to update data to the database, I finally have got rid of all the errors so now its correctly redirects with no error yet it isnt updating on the site or on the database.
Any help would be greatly appreciated, thanks!
web.php
```
Route::put('/my-saved-routes/{myroute_id}', 'Myrout... | 2018/04/26 | [
"https://Stackoverflow.com/questions/50052859",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9182763/"
] | You can do like below
```
Myroutes::where('id', $id)
->update(['start' => $request->input('start'),
'end'=>$request->input('end'),
'waypoint'=>$request->input('waypoints')]
);
``` | try to
```
<form method="put" action="/my-saved-routes">
```
update
```
<form method="post" action="/my-saved-routes/{{ $myroute->myroute_id }}">
``` |
50,052,859 | I am going round in circles trying to update data to the database, I finally have got rid of all the errors so now its correctly redirects with no error yet it isnt updating on the site or on the database.
Any help would be greatly appreciated, thanks!
web.php
```
Route::put('/my-saved-routes/{myroute_id}', 'Myrout... | 2018/04/26 | [
"https://Stackoverflow.com/questions/50052859",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9182763/"
] | You can do like below
```
Myroutes::where('id', $id)
->update(['start' => $request->input('start'),
'end'=>$request->input('end'),
'waypoint'=>$request->input('waypoints')]
);
``` | Try the following:
```
<form class="form" method="post" action="/my-saved-routes/{{ $$myroute->myroute_id) }}">
{{ method_field('patch') }}
{{ csrf_field() }}
``` |
30,177,320 | We've been using the Typeahead.js library in our Ember app (via [this addon](https://github.com/thefrontside/ember-cli-twitter-typeahead)) with success on Ember versions prior to 1.10, but the upgrade to Ember 1.10 is causing us problems.
Until now we've had success compiling templates that are passed into the typeahe... | 2015/05/11 | [
"https://Stackoverflow.com/questions/30177320",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/763395/"
] | I remember I had a similar problem using `Handlebars.compile` I ended up opting for passing a function to `suggestion` instead, and then the template content:
```
templates: {
empty: '<span>No results</span>',
suggestion: function(item){
return '<div>' + item.name + '</div>';
}
}
```
Hope this works for you... | If such add-on is no longer being maintained I'd suggest you to use typeahead straight (no cli add-on), I've been using it like this since Ember 1.7 and now I'm on 1.11 |
30,177,320 | We've been using the Typeahead.js library in our Ember app (via [this addon](https://github.com/thefrontside/ember-cli-twitter-typeahead)) with success on Ember versions prior to 1.10, but the upgrade to Ember 1.10 is causing us problems.
Until now we've had success compiling templates that are passed into the typeahe... | 2015/05/11 | [
"https://Stackoverflow.com/questions/30177320",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/763395/"
] | I remember I had a similar problem using `Handlebars.compile` I ended up opting for passing a function to `suggestion` instead, and then the template content:
```
templates: {
empty: '<span>No results</span>',
suggestion: function(item){
return '<div>' + item.name + '</div>';
}
}
```
Hope this works for you... | In the end we just kept a separate handlebars dependency in our `bower.json` since it seems like the typeahead library requires you to pass in vanilla handlebars templates to it |
8,679,953 | I've looked at the Apple appPrefs code sample, but that seems to be for navigation controllers only. I'm working with an iPad UISplitViewController that has simple root and detail VCs.
I can change certain settings (colors, date formats, etc) but currently, I have to restart the app to have the changes effected. I wou... | 2011/12/30 | [
"https://Stackoverflow.com/questions/8679953",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/542019/"
] | * If you use `settings bundle to manage preferences from the Settings app`:
From what you said in your question, you already know how to get a notification(`UIApplicationDidBecomeActiveNotification`) when your app becomes active, right?
If so, the only problem left is how to reload your view after you receive the not... | So, to help others, I will post how I (with help from Apple) solved this.
In both root and detail view controllers, I added in styles based on user settings:
"Warm Tones", "Cool Tones", "Leather" etc. These translate to code like this:
```
switch (styleKey) {
case 0: // BASIC
fontName = @"Copper... |
56,787,534 | Here is my custom post type in functions.php. what I'm trying to accomplish is: Make tab translations and a pull title to a template in a child theme. But not through for example: translation-test.php, rather
(and not thru acf)
```
add_action( 'init', function() {
$label = 'Translations';
$type = 'translati... | 2019/06/27 | [
"https://Stackoverflow.com/questions/56787534",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5418856/"
] | There's some discussion about adding a starter for Web Flow in [this Spring Boot issue](https://github.com/spring-projects/spring-boot/issues/502) where, in 2014, Phil Webb said:
>
> I think on balance there isn't the audience for a dedicated Web Flow starter so I'm closing this one for now.
>
>
> Thanks for the su... | Maybe because it is build on the top of Spring MVC. So if it is autoconfigured, you just have to add the flow dependency and define where is the flow definition. All other is custom, so i think it would be overkill. But this is only my opinion. |
56,787,534 | Here is my custom post type in functions.php. what I'm trying to accomplish is: Make tab translations and a pull title to a template in a child theme. But not through for example: translation-test.php, rather
(and not thru acf)
```
add_action( 'init', function() {
$label = 'Translations';
$type = 'translati... | 2019/06/27 | [
"https://Stackoverflow.com/questions/56787534",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5418856/"
] | Maybe because it is build on the top of Spring MVC. So if it is autoconfigured, you just have to add the flow dependency and define where is the flow definition. All other is custom, so i think it would be overkill. But this is only my opinion. | The issue about creating such starter in Spring-Boot was just declined by Phil Web
<https://github.com/spring-projects/spring-boot/issues/502>
>
> Although Spring Web Flow still serves a purpose and is being maintained, we don't feel like it's a good candidate to have support out of the box in Spring Boot. We're mai... |
56,787,534 | Here is my custom post type in functions.php. what I'm trying to accomplish is: Make tab translations and a pull title to a template in a child theme. But not through for example: translation-test.php, rather
(and not thru acf)
```
add_action( 'init', function() {
$label = 'Translations';
$type = 'translati... | 2019/06/27 | [
"https://Stackoverflow.com/questions/56787534",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5418856/"
] | There's some discussion about adding a starter for Web Flow in [this Spring Boot issue](https://github.com/spring-projects/spring-boot/issues/502) where, in 2014, Phil Webb said:
>
> I think on balance there isn't the audience for a dedicated Web Flow starter so I'm closing this one for now.
>
>
> Thanks for the su... | The issue about creating such starter in Spring-Boot was just declined by Phil Web
<https://github.com/spring-projects/spring-boot/issues/502>
>
> Although Spring Web Flow still serves a purpose and is being maintained, we don't feel like it's a good candidate to have support out of the box in Spring Boot. We're mai... |
19,203,898 | I searched for the Ruby method but I was not able find what I was looking for. In the following method definition, it has = sign before the argument. I want to know how/when to use.
```
def age=(value)
@age = value
end
```
Do I need a bracket? Can I write like this?
```
def age=value
@age = value
end
```
Is i... | 2013/10/05 | [
"https://Stackoverflow.com/questions/19203898",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/119198/"
] | The `=` means it's a "setter" for a class. It can be defined as:
```
def age=(value)
@age = value
end
```
or
```
def age= value
@age = value
end
```
When so defined, if you have an instance of the class, say `foo`, then you can do this:
```
foo.age = 10
```
And it will set the value of `@age` for the class... | ```
# method name is age=
def age=(value)
@age = value
end
age = 1 #=> sets @age as 1
age=(1) #=> sets @age as 1
# same as before, parenthesis are needed when the method has multiple inputs
def age=value
@age = value
end
age = 1 #=> sets @age as 1
age=(1) #=> sets @age as 1
# method name is age
def age ... |
11,642 | One of the reasons we put in a coal stove as an alternative heat source was because several sources said coal stoves don't have creosote buildup, reducing the risk of chimney fire.
The instructions that came with the stove, however, state that we have to inspect the chimney for creosote buildup and clean it out once a... | 2012/01/22 | [
"https://diy.stackexchange.com/questions/11642",
"https://diy.stackexchange.com",
"https://diy.stackexchange.com/users/5011/"
] | Yes, to the best of my knowledge all combustion creates some form of creosote regardless of the fuel source. Wood tar and Coal tar are the most abundant and well known forms of creosote.
[Wikipedia](http://en.wikipedia.org/wiki/Creosote#Lignite-tar_creosote) | Trains use bituminous coal or lignite, which are lower (cheaper) grades than you're likely to use in your house (i.e., anthracite). Anthracite produces no creosote, although it did burn hotter, so you'll need to make sure you reduce or eliminate other combustible materials. |
265,873 | Can anybody please tell me the subject, verb, and object of this sentence:
>
> *Thank you all for conducting a landmark experiment.*
>
>
>
I would also like to please know what part of speech *thank you* belongs to when it’s used the way it is in the sentence given above. | 2015/08/09 | [
"https://english.stackexchange.com/questions/265873",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/133381/"
] | As has already been pointed out, the original phrase is "I thank you." subject-verb-object
I know from anecdotes told me years ago by an elderly relative that "I thank you." was very commonly used around the 1900s particularly by shopkeepers (in Britain).
It's still used often in certain circumstances but you don't h... | *Thank you* is an adjective and a noun:
* Adjective: I am thankful.
* Noun: I sent a thank you note to my teacher. |
265,873 | Can anybody please tell me the subject, verb, and object of this sentence:
>
> *Thank you all for conducting a landmark experiment.*
>
>
>
I would also like to please know what part of speech *thank you* belongs to when it’s used the way it is in the sentence given above. | 2015/08/09 | [
"https://english.stackexchange.com/questions/265873",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/133381/"
] | As has already been pointed out, the original phrase is "I thank you." subject-verb-object
I know from anecdotes told me years ago by an elderly relative that "I thank you." was very commonly used around the 1900s particularly by shopkeepers (in Britain).
It's still used often in certain circumstances but you don't h... | The sentence "Thank you all for conducting a landmark experiment" can be regarded as *elliptical* for the sentence "*I* thank you all for conducting a landmark experiment."
"I" is the **subject**. "thank" is the **verb**. "you all" is the **object**.
"Thank you" can be regarded as an **elliptical sentence** or maybe ... |
265,873 | Can anybody please tell me the subject, verb, and object of this sentence:
>
> *Thank you all for conducting a landmark experiment.*
>
>
>
I would also like to please know what part of speech *thank you* belongs to when it’s used the way it is in the sentence given above. | 2015/08/09 | [
"https://english.stackexchange.com/questions/265873",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/133381/"
] | The sentence "Thank you all for conducting a landmark experiment" can be regarded as *elliptical* for the sentence "*I* thank you all for conducting a landmark experiment."
"I" is the **subject**. "thank" is the **verb**. "you all" is the **object**.
"Thank you" can be regarded as an **elliptical sentence** or maybe ... | *Thank you* is an adjective and a noun:
* Adjective: I am thankful.
* Noun: I sent a thank you note to my teacher. |
31,896,755 | How do I install spree\_static\_content? I get following error.
```
In Gemfile:
spree_core (~> 3.0.0) ruby
spree_core (~> 3.0.0) ruby
spree_core (~> 3.0) ruby
spree_static_content (>= 0) ruby depends on
spree_core (~> 3.1.0.beta) ruby
spree_core (= 3.0.1) ruby
spree_core (= 3.0.1) ruby
spree_core (= 3.0.1) rub... | 2015/08/08 | [
"https://Stackoverflow.com/questions/31896755",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2767743/"
] | The `master` branch of `spree_static_content` is, as if this writing, referencing 3.1.0.beta of Spree. Any project using an older version of Spree, like 3.0-stable, will not be compatible.
To use this gem for a 3.0-stable Spree project, you'll need to use the branch of `spree_static_content` that is built to run again... | The error message tells you what to do.
The error is:
>
> spree\_static\_content (>= 0) ruby depends on spree\_core (~>
> 3.1.0.beta) ruby
>
>
>
That means you need spree\_core 3.1.0.beta or higher.
Running `bundle update` will not update a gem beyond the version specified in the Gemfile.
It appears you may h... |
15,901,223 | In SQL table person\_rate we have stored a rate float value which changes in time. Columns:
```
id (serial, PK)
person_id (int)
date_from (date)
rate (float)
```
`(person_id, date_from)` is unique, because at most one change per day is allowed (maybe it could be a PK, but it's not important)
Rate value for given pe... | 2013/04/09 | [
"https://Stackoverflow.com/questions/15901223",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2261426/"
] | The error is that you are doing something not allowed! Solutions:
1. Put all the code for `getReadableDatabase()` in the function being sure not to call non-static functions.
2. Make `getReadableDatabase()` static.
3. Make `getReadableDatabase()` non-static and change how you call it:
```
Database database = new Data... | The problem is, that you are trying to use a non-static method within your static method. The `getReadableDatabase()` should also be static, for this should work. |
15,901,223 | In SQL table person\_rate we have stored a rate float value which changes in time. Columns:
```
id (serial, PK)
person_id (int)
date_from (date)
rate (float)
```
`(person_id, date_from)` is unique, because at most one change per day is allowed (maybe it could be a PK, but it's not important)
Rate value for given pe... | 2013/04/09 | [
"https://Stackoverflow.com/questions/15901223",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2261426/"
] | `getReadableDatabase()` is a **instance** method, not a **class** method. You need an instance, e.g:
```
public static Cursor GetFavouritesList(SQLiteOpenHelper helper){
try
{
return(helper.getReadableDatabase().rawQuery("SELECT SocietyName FROM Favourites",null));
}
catch(SQLiteException e)
{
Log.e("Favourites", e.to... | The problem is, that you are trying to use a non-static method within your static method. The `getReadableDatabase()` should also be static, for this should work. |
15,901,223 | In SQL table person\_rate we have stored a rate float value which changes in time. Columns:
```
id (serial, PK)
person_id (int)
date_from (date)
rate (float)
```
`(person_id, date_from)` is unique, because at most one change per day is allowed (maybe it could be a PK, but it's not important)
Rate value for given pe... | 2013/04/09 | [
"https://Stackoverflow.com/questions/15901223",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2261426/"
] | The error is that you are doing something not allowed! Solutions:
1. Put all the code for `getReadableDatabase()` in the function being sure not to call non-static functions.
2. Make `getReadableDatabase()` static.
3. Make `getReadableDatabase()` non-static and change how you call it:
```
Database database = new Data... | `getReadableDatabase()` is a **instance** method, not a **class** method. You need an instance, e.g:
```
public static Cursor GetFavouritesList(SQLiteOpenHelper helper){
try
{
return(helper.getReadableDatabase().rawQuery("SELECT SocietyName FROM Favourites",null));
}
catch(SQLiteException e)
{
Log.e("Favourites", e.to... |
62,766,016 | So I have one pyspark dataframe like so, let's call it dataframe a:
```
+-------------------+---------------+----------------+
| reg| val1| val2 |
+-------------------+---------------+----------------+
| N110WA| 1590030660| 1590038340000|
| ... | 2020/07/06 | [
"https://Stackoverflow.com/questions/62766016",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12080808/"
] | You can try the below solution -- and let us know if works or anything else is expected ?
I have modified the imputes a little in order to showcase the working solution--
**Input here**
```
from pyspark.sql import functions as F
df_a = spark.createDataFrame([('N110WA',1590030660,1590038340000), ('N110WA',15900700785... | Yes, assuming `df_a` and `df_b` are both pyspark dataframes, you can use an inner join in pyspark:
```
delta = val
df = df_a.join(df_b, [
df_a.res == df_b.res,
df_a.posttime <= df_b.val1 + delta,
df_a.posttime >= df_b.val2 - delta
], "inner")
```
Will filter out the results to only include the ones speci... |
67,270,386 | I have the following app.py:
```
from flask import Flask
from waitress import serve
from bprint import api_blueprint
from errors import invalid_id, not_found, invalid_input, internal_server_error, unauthorized_access
app = Flask(__name__)
app.register_blueprint(api_blueprint)
app.register_error_handler(400, invalid... | 2021/04/26 | [
"https://Stackoverflow.com/questions/67270386",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12209302/"
] | Check if you have some custom decorators on views. Because flask take endpoint name either from `@route` parameter or from function name. In your case there're no `endpoint` parameter in any of functions.
Error says `api.wrapper` and it means that you have 2 or more function with name `wrapper`. Usually we see such nam... | Try by commenting few lines of code - It may help you to resolve your issue.
```
from flask import Flask
from waitress import serve
from bprint import api_blueprint
# from errors import invalid_id, not_found, invalid_input, internal_server_error, unauthorized_access
app = Flask(__name__)
app.register_blueprint(api_b... |
338,178 | >
> If $A$ and $B$ are sets, then $A+B=( A \setminus B )\cup( B \setminus A ) $.
>
>
> Prove that $+$ is an associative operation.
>
>
>
How do I prove these? | 2013/03/22 | [
"https://math.stackexchange.com/questions/338178",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/50948/"
] | One approach would be to first prove that $x \in A+B$ is equivalent to "x belongs to exactly one of the sets $A$ and $B$".
You can then deduce that $x \in (A+B)+C$ and $x \in A+(B+C)$ are both equivalent to the statement "$x$ belongs to either exactly one or all three of the sets $A, B, C$".
I will leave you to work ... | **Hint** The characteristic function of the set $A\subset X$ is defined by
$$\begin{array}{ccc}
1\_A: & X \rightarrow& \{0,1\} \\
& x\mapsto & \left\{
\begin{array}{ll}
1 & \hbox{if}\, x\in A \\
0 & \hbox{if}\, x\notin A
\end{array}
\right.
\end{array}$$
then it's easy to prove that
$$1\_{A\cap B}=1\_A 1\_B\qua... |
214,348 | You may have encountered a situation in which Mac changes the order of desktops based on some events like alerts on a program or a web page in browser.
How could I disable this logical change?
Note: I'm using El Capitan, but I had this problem since Mavericks. | 2015/11/05 | [
"https://apple.stackexchange.com/questions/214348",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/155924/"
] | Newer MacOS Ventura (v13)
-------------------------
>
> System Settings > Desktop & Dock > Scroll down to Mission Control section > Uncheck Automatically rearrange Spaces based on most recent use
>
>
>
[](https://i.stack.imgur.com/PmjC0.png)
---... | You can also use the terminal to change the setting.
To disable rearrangement:
```
defaults write com.apple.dock "mru-spaces" -bool "false" && killall Dock
```
To enable rearrangement:
```
defaults write com.apple.dock "mru-spaces" -bool "true" && killall Dock
``` |
66,077,169 | I have the following `df` with the `Date` column having hourly marks for an entire year:
```
Date TD RN D.RN Press Temp G.Temp. Rad
1 2018-01-01 00:00:00 154.0535 9.035156 1.416667 950.7833 7.000000 60.16667 11.27000
2 2018-01-0... | 2021/02/06 | [
"https://Stackoverflow.com/questions/66077169",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14513812/"
] | You can use an `ifelse`/`case_when` statement after extracting hour from time.
```
library(dplyr)
library(lubridate)
df %>%
mutate(hour = hour(Date),
label = case_when(hour >= 8 & hour <= 19 ~ 'Day',
TRUE ~ 'Night'))
```
In base R :
```
df$hour = as.integer(format(df$Date, '... | We can also do
```
library(dplyr)
library(lubridate)
df %>%
mutate(hour = hour(Date),
label = case_when(between(hour, 8, 19) ~ "Day", TRUE ~ "Night"))
``` |
22,480 | I'm not a native speaker. Is it good English to say
>
> the result is (still) *open*
>
>
>
meaning that for whatever reason the result (e.g., of a study, of an examination) is not available yet, but will be in the future? | 2011/04/24 | [
"https://english.stackexchange.com/questions/22480",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/2742/"
] | In that situation, I would go with [*pending*](http://en.wiktionary.org/wiki/pending):
>
> 1. awaiting a conclusion or a confirmation
> 2. begun but not completed
>
>
>
So,
>
> the results are (still) pending
>
>
> | or you can use the idiom ["up in the air"](http://www.learnenglishfeelgood.com/americanidioms/lefgidioms_u.html)
>
> The results of the examinations are
> still **up in the air**.
>
>
>
if you really want to use something with "open" you can try:
>
> The results of the examinations are
> still **open for spec... |
22,480 | I'm not a native speaker. Is it good English to say
>
> the result is (still) *open*
>
>
>
meaning that for whatever reason the result (e.g., of a study, of an examination) is not available yet, but will be in the future? | 2011/04/24 | [
"https://english.stackexchange.com/questions/22480",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/2742/"
] | In that situation, I would go with [*pending*](http://en.wiktionary.org/wiki/pending):
>
> 1. awaiting a conclusion or a confirmation
> 2. begun but not completed
>
>
>
So,
>
> the results are (still) pending
>
>
> | Your phrase makes sense but would feel incomplete to most English speakers because *open*'s placement in this phrase, while meaning *not finally settled*, could also mean *welcoming discussion, criticism, and inquiry* and would then be followed by *to* or *for*, e.g., *open to interpretation* or @pageman's *open for sp... |
22,480 | I'm not a native speaker. Is it good English to say
>
> the result is (still) *open*
>
>
>
meaning that for whatever reason the result (e.g., of a study, of an examination) is not available yet, but will be in the future? | 2011/04/24 | [
"https://english.stackexchange.com/questions/22480",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/2742/"
] | Your phrase makes sense but would feel incomplete to most English speakers because *open*'s placement in this phrase, while meaning *not finally settled*, could also mean *welcoming discussion, criticism, and inquiry* and would then be followed by *to* or *for*, e.g., *open to interpretation* or @pageman's *open for sp... | or you can use the idiom ["up in the air"](http://www.learnenglishfeelgood.com/americanidioms/lefgidioms_u.html)
>
> The results of the examinations are
> still **up in the air**.
>
>
>
if you really want to use something with "open" you can try:
>
> The results of the examinations are
> still **open for spec... |
7,652,821 | I have a Java app that displays a list from a database. Inside the class is the following code to open a new dialog for data entry:
```
@Action
public void addNewEntry() {
JFrame mainFrame = ADLog2App.getApplication().getMainFrame();
addNewDialog = new AddNewView(mainFrame, true);
addNewDialog.setLocationR... | 2011/10/04 | [
"https://Stackoverflow.com/questions/7652821",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/620723/"
] | If `AddNewView` is a [`Window`](http://download.oracle.com/javase/6/docs/api/java/awt/Window.html) such as a [`Dialog`](http://download.oracle.com/javase/6/docs/api/java/awt/Dialog.html) or [`JDialog`](http://download.oracle.com/javase/6/docs/api/javax/swing/JDialog.html), you could use the [Window.addWindowListener(..... | you have to add [WindowListener](http://download.oracle.com/javase/tutorial/uiswing/events/windowlistener.html) and override [windowClosing](http://download.oracle.com/javase/7/docs/api/java/awt/event/WindowListener.html#windowClosing%28java.awt.event.WindowEvent%29) Event, if event occured then just returs some flag, ... |
54,271,454 | I started to learn python selenium and have one small problem
```
>>> from selenium import webdriver
>>> dr = webdriver.Chrome('C:/Users/Dima/Desktop/chromedriver.exe')
>>> dr.get('https://www.instagram.com/accounts/login/?source=auth_switcher')
>>> pole = dr.find_element_by_id('f213cb817d764e4')
Traceback (most recen... | 2019/01/19 | [
"https://Stackoverflow.com/questions/54271454",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10873023/"
] | `@id` is generated dynamically, so it will be different each time you run your script. If you want to select Username input field, try to select by `@name`:
```
dr.find_element_by_name('username')
``` | The **username** field on **Instagram** is a *React Native* element so you have to induce *WebDriverWait* and then invoke `send_keys()` method as follows :
```
WebDriverWait(browser, 20).until(EC.element_to_be_clickable((By.CSS_SELECTOR, "input[name='username']"))).send_keys("ITishnik_ArtStudio")
```
**Note** : You ... |
31,201,037 | I am trying to compile a program, I am trying to track an object using openCV.
Now whenever i compile the code i get the following error.
disguise\_gui\_1306.cpp:101:5: error: ‘FaceRecognizer’ was not declared in this scope
Ptr model, mouthModel;
^
disguise\_gui\_1306.cpp:101:19: error: template argument 1 is inval... | 2015/07/03 | [
"https://Stackoverflow.com/questions/31201037",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2861137/"
] | Was your opencv3 built with OPENCV\_EXTRA\_MODULES\_PATH option in `make`?
```
-D OPENCV_EXTRA_MODULES_PATH=</path/to/opencv_contrib>/modules
``` | As mentioned above, first check if OpenCV was compiled with contrib modules as described in <https://docs.opencv.org/4.x/d7/d9f/tutorial_linux_install.html>
then:
1. Add the inlude directories in your cmake CMakeLists.txt as described in
<https://docs.opencv.org/4.x/db/df5/tutorial_linux_gcc_cmake.html> ; an example:... |
29,633,642 | I'm trying to open a user input url using ShellExecute in my c++ project but am finding difficulty in creating a main function within the project.
Currently I have
```
#include<Windows.h>
#include<stdlib.h>
#include<shellApi.h>
int findIE(const char*);
int main()
{
const char* url;
findIE(url);
return ... | 2015/04/14 | [
"https://Stackoverflow.com/questions/29633642",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1296852/"
] | You can't change username. You can check the following links that describe how to change master password and if Amazon adds the ability to change username you will find there:
Try to find at [AWS CLI for RDS](http://docs.aws.amazon.com/cli/latest/reference/rds/modify-db-instance.html):
```
modify-db-instance --db-in... | You cannot do it directly. However you can use the database migration service from AWS:
<https://aws.amazon.com/dms/>
Essentially you define the current database instance as your source and the new database with the correct username as your target of the migration.
This way you migrate the data from one to another d... |
29,633,642 | I'm trying to open a user input url using ShellExecute in my c++ project but am finding difficulty in creating a main function within the project.
Currently I have
```
#include<Windows.h>
#include<stdlib.h>
#include<shellApi.h>
int findIE(const char*);
int main()
{
const char* url;
findIE(url);
return ... | 2015/04/14 | [
"https://Stackoverflow.com/questions/29633642",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1296852/"
] | You can't change username. You can check the following links that describe how to change master password and if Amazon adds the ability to change username you will find there:
Try to find at [AWS CLI for RDS](http://docs.aws.amazon.com/cli/latest/reference/rds/modify-db-instance.html):
```
modify-db-instance --db-in... | No. As of April 2019 one cannot reset the 'master username'. |
29,633,642 | I'm trying to open a user input url using ShellExecute in my c++ project but am finding difficulty in creating a main function within the project.
Currently I have
```
#include<Windows.h>
#include<stdlib.h>
#include<shellApi.h>
int findIE(const char*);
int main()
{
const char* url;
findIE(url);
return ... | 2015/04/14 | [
"https://Stackoverflow.com/questions/29633642",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1296852/"
] | You can't change username. You can check the following links that describe how to change master password and if Amazon adds the ability to change username you will find there:
Try to find at [AWS CLI for RDS](http://docs.aws.amazon.com/cli/latest/reference/rds/modify-db-instance.html):
```
modify-db-instance --db-in... | Though this may not be ideal for every use-case, I did find a workaround that allows for changing the username of the master user of an AWS RDS DB.
>
> I am using PgAdmin4 with PostgreSQL 14 at the time of writing this answer.
>
>
>
1. Login with the master user you want to change the name of
2. Create a new user... |
29,633,642 | I'm trying to open a user input url using ShellExecute in my c++ project but am finding difficulty in creating a main function within the project.
Currently I have
```
#include<Windows.h>
#include<stdlib.h>
#include<shellApi.h>
int findIE(const char*);
int main()
{
const char* url;
findIE(url);
return ... | 2015/04/14 | [
"https://Stackoverflow.com/questions/29633642",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1296852/"
] | You can't change username. You can check the following links that describe how to change master password and if Amazon adds the ability to change username you will find there:
Try to find at [AWS CLI for RDS](http://docs.aws.amazon.com/cli/latest/reference/rds/modify-db-instance.html):
```
modify-db-instance --db-in... | As @tdubs's [answer](https://stackoverflow.com/a/72385333/118608) states, it is possible to change the master username for a Postgres DB instance in AWS RDS. Whether it is advisable – probably not.
Here are the SQL commands you need to issue:
1. Create a temporary user with the `CREATEROLE` privilege (while being log... |
29,633,642 | I'm trying to open a user input url using ShellExecute in my c++ project but am finding difficulty in creating a main function within the project.
Currently I have
```
#include<Windows.h>
#include<stdlib.h>
#include<shellApi.h>
int findIE(const char*);
int main()
{
const char* url;
findIE(url);
return ... | 2015/04/14 | [
"https://Stackoverflow.com/questions/29633642",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1296852/"
] | No. As of April 2019 one cannot reset the 'master username'. | You cannot do it directly. However you can use the database migration service from AWS:
<https://aws.amazon.com/dms/>
Essentially you define the current database instance as your source and the new database with the correct username as your target of the migration.
This way you migrate the data from one to another d... |
29,633,642 | I'm trying to open a user input url using ShellExecute in my c++ project but am finding difficulty in creating a main function within the project.
Currently I have
```
#include<Windows.h>
#include<stdlib.h>
#include<shellApi.h>
int findIE(const char*);
int main()
{
const char* url;
findIE(url);
return ... | 2015/04/14 | [
"https://Stackoverflow.com/questions/29633642",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1296852/"
] | You cannot do it directly. However you can use the database migration service from AWS:
<https://aws.amazon.com/dms/>
Essentially you define the current database instance as your source and the new database with the correct username as your target of the migration.
This way you migrate the data from one to another d... | As @tdubs's [answer](https://stackoverflow.com/a/72385333/118608) states, it is possible to change the master username for a Postgres DB instance in AWS RDS. Whether it is advisable – probably not.
Here are the SQL commands you need to issue:
1. Create a temporary user with the `CREATEROLE` privilege (while being log... |
29,633,642 | I'm trying to open a user input url using ShellExecute in my c++ project but am finding difficulty in creating a main function within the project.
Currently I have
```
#include<Windows.h>
#include<stdlib.h>
#include<shellApi.h>
int findIE(const char*);
int main()
{
const char* url;
findIE(url);
return ... | 2015/04/14 | [
"https://Stackoverflow.com/questions/29633642",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1296852/"
] | No. As of April 2019 one cannot reset the 'master username'. | Though this may not be ideal for every use-case, I did find a workaround that allows for changing the username of the master user of an AWS RDS DB.
>
> I am using PgAdmin4 with PostgreSQL 14 at the time of writing this answer.
>
>
>
1. Login with the master user you want to change the name of
2. Create a new user... |
29,633,642 | I'm trying to open a user input url using ShellExecute in my c++ project but am finding difficulty in creating a main function within the project.
Currently I have
```
#include<Windows.h>
#include<stdlib.h>
#include<shellApi.h>
int findIE(const char*);
int main()
{
const char* url;
findIE(url);
return ... | 2015/04/14 | [
"https://Stackoverflow.com/questions/29633642",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1296852/"
] | No. As of April 2019 one cannot reset the 'master username'. | As @tdubs's [answer](https://stackoverflow.com/a/72385333/118608) states, it is possible to change the master username for a Postgres DB instance in AWS RDS. Whether it is advisable – probably not.
Here are the SQL commands you need to issue:
1. Create a temporary user with the `CREATEROLE` privilege (while being log... |
29,633,642 | I'm trying to open a user input url using ShellExecute in my c++ project but am finding difficulty in creating a main function within the project.
Currently I have
```
#include<Windows.h>
#include<stdlib.h>
#include<shellApi.h>
int findIE(const char*);
int main()
{
const char* url;
findIE(url);
return ... | 2015/04/14 | [
"https://Stackoverflow.com/questions/29633642",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1296852/"
] | Though this may not be ideal for every use-case, I did find a workaround that allows for changing the username of the master user of an AWS RDS DB.
>
> I am using PgAdmin4 with PostgreSQL 14 at the time of writing this answer.
>
>
>
1. Login with the master user you want to change the name of
2. Create a new user... | As @tdubs's [answer](https://stackoverflow.com/a/72385333/118608) states, it is possible to change the master username for a Postgres DB instance in AWS RDS. Whether it is advisable – probably not.
Here are the SQL commands you need to issue:
1. Create a temporary user with the `CREATEROLE` privilege (while being log... |
23,737,085 | I have a problem with Android WebView. I want to display <http://www.azems.az/admin/get_item_data.php?lang=0&item=RQ245309883SG> link in my WebView . But it does not have an html tag, thus I couldn't display it as an html page. How can I solve this problem? Please, help me. | 2014/05/19 | [
"https://Stackoverflow.com/questions/23737085",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3652503/"
] | ```
WebView wv = (WebView) findViewById(R.id.webView1);
String str = "<table width='740' border='0' align='center' cellspacing='0' cellpadding='0'><tr><td width='80%' align='left' valign='top'><left><font face='Arial, Helvetica, sans-serif' size='3' color='#0363CA'><b>Göndərişin izlənilməsi</b... | Just get all data from the link and then
```
webview.loadData(Html.fromHtml(yourdata), "text/html", "UTF-8");
```
and that's it... |
22,761,895 | EDIT : This is all done in C.
Let's say I have the two following arrays :
```
int numFields[] = {5, 1, 3, 2, 7}
char charFields[] = {'a' , 'b', 'c', 'd', 'e'}
```
I want to sort numFields numerically and have charFields resorted to match the new order of numFields such that :
```
int numFields[] = {1, 2, 3, 5, 7... | 2014/03/31 | [
"https://Stackoverflow.com/questions/22761895",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2475380/"
] | `qsort` lets you specify your own compare function to specify on what criteria the array should be sorted. It lets you sort an array of any type (can be `int`, can be `struct`) as long as you know the size of the objects you're sorting. Your best bet will be to create a `struct pair { int numValue; char charValue }` to... | Here i try to devlop bubble sort program try using it.,
```
int temp;
char a;
for(i=0;i<no;i++)
{
for(j=i;j<no;j++)
{
if(numFields[i] > numFields[j])
{
temp=numFields[i];
numFields[i]=numFields[j];
numFields[j]=temp;
... |
22,761,895 | EDIT : This is all done in C.
Let's say I have the two following arrays :
```
int numFields[] = {5, 1, 3, 2, 7}
char charFields[] = {'a' , 'b', 'c', 'd', 'e'}
```
I want to sort numFields numerically and have charFields resorted to match the new order of numFields such that :
```
int numFields[] = {1, 2, 3, 5, 7... | 2014/03/31 | [
"https://Stackoverflow.com/questions/22761895",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2475380/"
] | `qsort` lets you specify your own compare function to specify on what criteria the array should be sorted. It lets you sort an array of any type (can be `int`, can be `struct`) as long as you know the size of the objects you're sorting. Your best bet will be to create a `struct pair { int numValue; char charValue }` to... | simply declare a struct array with each element holding the number as well as the letter corresponding to it. Then sort the array according to the numbers
or use `qsort` with a specific call back function to do what you need. |
22,761,895 | EDIT : This is all done in C.
Let's say I have the two following arrays :
```
int numFields[] = {5, 1, 3, 2, 7}
char charFields[] = {'a' , 'b', 'c', 'd', 'e'}
```
I want to sort numFields numerically and have charFields resorted to match the new order of numFields such that :
```
int numFields[] = {1, 2, 3, 5, 7... | 2014/03/31 | [
"https://Stackoverflow.com/questions/22761895",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2475380/"
] | `qsort` lets you specify your own compare function to specify on what criteria the array should be sorted. It lets you sort an array of any type (can be `int`, can be `struct`) as long as you know the size of the objects you're sorting. Your best bet will be to create a `struct pair { int numValue; char charValue }` to... | ```
#include <stdio.h>
#include <stdlib.h>
int numFields[] = {5, 1, 3, 2, 7};
char charFields[] = {'a' , 'b', 'c', 'd', 'e'};
// temporary arrays for sorted result
int numFields2[5];
int charFields2[5];
// an index for sorting
int idx[] = {0, 1, 2, 3, 4};
// A cmompare function compares the numFields using the inde... |
22,761,895 | EDIT : This is all done in C.
Let's say I have the two following arrays :
```
int numFields[] = {5, 1, 3, 2, 7}
char charFields[] = {'a' , 'b', 'c', 'd', 'e'}
```
I want to sort numFields numerically and have charFields resorted to match the new order of numFields such that :
```
int numFields[] = {1, 2, 3, 5, 7... | 2014/03/31 | [
"https://Stackoverflow.com/questions/22761895",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2475380/"
] | simply declare a struct array with each element holding the number as well as the letter corresponding to it. Then sort the array according to the numbers
or use `qsort` with a specific call back function to do what you need. | Here i try to devlop bubble sort program try using it.,
```
int temp;
char a;
for(i=0;i<no;i++)
{
for(j=i;j<no;j++)
{
if(numFields[i] > numFields[j])
{
temp=numFields[i];
numFields[i]=numFields[j];
numFields[j]=temp;
... |
22,761,895 | EDIT : This is all done in C.
Let's say I have the two following arrays :
```
int numFields[] = {5, 1, 3, 2, 7}
char charFields[] = {'a' , 'b', 'c', 'd', 'e'}
```
I want to sort numFields numerically and have charFields resorted to match the new order of numFields such that :
```
int numFields[] = {1, 2, 3, 5, 7... | 2014/03/31 | [
"https://Stackoverflow.com/questions/22761895",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2475380/"
] | ```
#include <stdio.h>
#include <stdlib.h>
int numFields[] = {5, 1, 3, 2, 7};
char charFields[] = {'a' , 'b', 'c', 'd', 'e'};
// temporary arrays for sorted result
int numFields2[5];
int charFields2[5];
// an index for sorting
int idx[] = {0, 1, 2, 3, 4};
// A cmompare function compares the numFields using the inde... | Here i try to devlop bubble sort program try using it.,
```
int temp;
char a;
for(i=0;i<no;i++)
{
for(j=i;j<no;j++)
{
if(numFields[i] > numFields[j])
{
temp=numFields[i];
numFields[i]=numFields[j];
numFields[j]=temp;
... |
30,502,433 | I have a working SignalR application that allows me to connect multiple JavaScript clients and exchange data. When I tried to connect with a .NET client I get the following error:
```
An exception of type 'Microsoft.AspNet.SignalR.Client.HttpClientException' occurred in mscorlib.dll but was not handled in user code
A... | 2015/05/28 | [
"https://Stackoverflow.com/questions/30502433",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/598346/"
] | This turned out to be a trivial mistake, but the error message was so useless I'm sure others will be stumped by the same issue. The name of the hub was wrong. I used "Chat" when I should have used "ChatHub".
If the exception had been 404, or "Hub not found" or something like that it would have been an easy fix rather... | Real issue was resolved **but** i think it's important to realise that SignalR server returning status 500 (Internal Server Error) (not very informative error indeed) is **security feature**.
If you need more information on server errors, you can do following:
1) [Enable tracing on server](http://www.asp.net/signalr... |
30,502,433 | I have a working SignalR application that allows me to connect multiple JavaScript clients and exchange data. When I tried to connect with a .NET client I get the following error:
```
An exception of type 'Microsoft.AspNet.SignalR.Client.HttpClientException' occurred in mscorlib.dll but was not handled in user code
A... | 2015/05/28 | [
"https://Stackoverflow.com/questions/30502433",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/598346/"
] | This turned out to be a trivial mistake, but the error message was so useless I'm sure others will be stumped by the same issue. The name of the hub was wrong. I used "Chat" when I should have used "ChatHub".
If the exception had been 404, or "Hub not found" or something like that it would have been an easy fix rather... | @Michael Tiller's comment in @Darren's answer turned out to be the solution for my problem, so I think it's fair to make this into its own answer:
Changing the Hub class to `public` solved my problem. I followed an example and missed the text that said to create a PUBLIC class that inherits from `Hub`, and when adding... |
30,502,433 | I have a working SignalR application that allows me to connect multiple JavaScript clients and exchange data. When I tried to connect with a .NET client I get the following error:
```
An exception of type 'Microsoft.AspNet.SignalR.Client.HttpClientException' occurred in mscorlib.dll but was not handled in user code
A... | 2015/05/28 | [
"https://Stackoverflow.com/questions/30502433",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/598346/"
] | This turned out to be a trivial mistake, but the error message was so useless I'm sure others will be stumped by the same issue. The name of the hub was wrong. I used "Chat" when I should have used "ChatHub".
If the exception had been 404, or "Hub not found" or something like that it would have been an easy fix rather... | I was doing similar trivial mistake took few hours to figure it out.
```
[HubName("Hostsync")] // Missed to add this attribute in Hub of SignalR Self Host
public class ChatHub : Hub
{
}
```
But i was trying to connect by defining the proxy name in Client.
```
HostProxyName = "Hostsync";
```
Just make sure there ... |
30,502,433 | I have a working SignalR application that allows me to connect multiple JavaScript clients and exchange data. When I tried to connect with a .NET client I get the following error:
```
An exception of type 'Microsoft.AspNet.SignalR.Client.HttpClientException' occurred in mscorlib.dll but was not handled in user code
A... | 2015/05/28 | [
"https://Stackoverflow.com/questions/30502433",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/598346/"
] | This turned out to be a trivial mistake, but the error message was so useless I'm sure others will be stumped by the same issue. The name of the hub was wrong. I used "Chat" when I should have used "ChatHub".
If the exception had been 404, or "Hub not found" or something like that it would have been an easy fix rather... | I had the same issue. I found out that the SignalR Jquery extension version was older than the referenced SignalR library. I corrected the script version and problem solved. If you have recently upgraded the SignalR to newer version, you would probably face the same issue like me. |
30,502,433 | I have a working SignalR application that allows me to connect multiple JavaScript clients and exchange data. When I tried to connect with a .NET client I get the following error:
```
An exception of type 'Microsoft.AspNet.SignalR.Client.HttpClientException' occurred in mscorlib.dll but was not handled in user code
A... | 2015/05/28 | [
"https://Stackoverflow.com/questions/30502433",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/598346/"
] | @Michael Tiller's comment in @Darren's answer turned out to be the solution for my problem, so I think it's fair to make this into its own answer:
Changing the Hub class to `public` solved my problem. I followed an example and missed the text that said to create a PUBLIC class that inherits from `Hub`, and when adding... | Real issue was resolved **but** i think it's important to realise that SignalR server returning status 500 (Internal Server Error) (not very informative error indeed) is **security feature**.
If you need more information on server errors, you can do following:
1) [Enable tracing on server](http://www.asp.net/signalr... |
30,502,433 | I have a working SignalR application that allows me to connect multiple JavaScript clients and exchange data. When I tried to connect with a .NET client I get the following error:
```
An exception of type 'Microsoft.AspNet.SignalR.Client.HttpClientException' occurred in mscorlib.dll but was not handled in user code
A... | 2015/05/28 | [
"https://Stackoverflow.com/questions/30502433",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/598346/"
] | Real issue was resolved **but** i think it's important to realise that SignalR server returning status 500 (Internal Server Error) (not very informative error indeed) is **security feature**.
If you need more information on server errors, you can do following:
1) [Enable tracing on server](http://www.asp.net/signalr... | I was doing similar trivial mistake took few hours to figure it out.
```
[HubName("Hostsync")] // Missed to add this attribute in Hub of SignalR Self Host
public class ChatHub : Hub
{
}
```
But i was trying to connect by defining the proxy name in Client.
```
HostProxyName = "Hostsync";
```
Just make sure there ... |
30,502,433 | I have a working SignalR application that allows me to connect multiple JavaScript clients and exchange data. When I tried to connect with a .NET client I get the following error:
```
An exception of type 'Microsoft.AspNet.SignalR.Client.HttpClientException' occurred in mscorlib.dll but was not handled in user code
A... | 2015/05/28 | [
"https://Stackoverflow.com/questions/30502433",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/598346/"
] | Real issue was resolved **but** i think it's important to realise that SignalR server returning status 500 (Internal Server Error) (not very informative error indeed) is **security feature**.
If you need more information on server errors, you can do following:
1) [Enable tracing on server](http://www.asp.net/signalr... | I had the same issue. I found out that the SignalR Jquery extension version was older than the referenced SignalR library. I corrected the script version and problem solved. If you have recently upgraded the SignalR to newer version, you would probably face the same issue like me. |
30,502,433 | I have a working SignalR application that allows me to connect multiple JavaScript clients and exchange data. When I tried to connect with a .NET client I get the following error:
```
An exception of type 'Microsoft.AspNet.SignalR.Client.HttpClientException' occurred in mscorlib.dll but was not handled in user code
A... | 2015/05/28 | [
"https://Stackoverflow.com/questions/30502433",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/598346/"
] | @Michael Tiller's comment in @Darren's answer turned out to be the solution for my problem, so I think it's fair to make this into its own answer:
Changing the Hub class to `public` solved my problem. I followed an example and missed the text that said to create a PUBLIC class that inherits from `Hub`, and when adding... | I was doing similar trivial mistake took few hours to figure it out.
```
[HubName("Hostsync")] // Missed to add this attribute in Hub of SignalR Self Host
public class ChatHub : Hub
{
}
```
But i was trying to connect by defining the proxy name in Client.
```
HostProxyName = "Hostsync";
```
Just make sure there ... |
30,502,433 | I have a working SignalR application that allows me to connect multiple JavaScript clients and exchange data. When I tried to connect with a .NET client I get the following error:
```
An exception of type 'Microsoft.AspNet.SignalR.Client.HttpClientException' occurred in mscorlib.dll but was not handled in user code
A... | 2015/05/28 | [
"https://Stackoverflow.com/questions/30502433",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/598346/"
] | @Michael Tiller's comment in @Darren's answer turned out to be the solution for my problem, so I think it's fair to make this into its own answer:
Changing the Hub class to `public` solved my problem. I followed an example and missed the text that said to create a PUBLIC class that inherits from `Hub`, and when adding... | I had the same issue. I found out that the SignalR Jquery extension version was older than the referenced SignalR library. I corrected the script version and problem solved. If you have recently upgraded the SignalR to newer version, you would probably face the same issue like me. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.