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 |
|---|---|---|---|---|---|
26,699,450 | I am going read codes(binary) from a text file which will have data like "000101" or "100010". Then I am concatenating 2 bits with this binary strings further. I am having trouble with leading zeros,which i cant skip. I have been trying to do it by first converting the binary string to int (using atoi()) and then to he... | 2014/11/02 | [
"https://Stackoverflow.com/questions/26699450",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3429329/"
] | 1. get the number of binary digits (before calling atoi)
```
size_t binlen = strlen(input);
```
2. get the number of hex digits to output (it's just `binlen/4` rounded up)
```
size_t hexlen = ((binlen % 4 ? binlen+4 : binlen) / 4);
```
3. print the integer as hex, with the correct number of leading zeroes
```
spri... | You should not start by converting the number to `int` (the loop where you construct `decimal`).
Instead, you should write a separate function that takes four characters representing a binary number, and produces a single hex character. Then you could implement your target function as a sequence of calls to this funct... |
61,890,423 | I trying to upload a simpale text as file to oneDrive using REST API.
I Create App inportal.azure.com
And i add the follow API permissions
[](https://i.stack.imgur.com/mkIkS.jpg)
I create a token:
<https://login.microsoftonline.com/>< My tenantName>/... | 2020/05/19 | [
"https://Stackoverflow.com/questions/61890423",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4112376/"
] | If you want to use Microsoft Graph to upload file to onedrive, please refer to the [document](https://learn.microsoft.com/en-us/graph/api/driveitem-put-content?view=graph-rest-1.0&tabs=http)
```
PUT /drives/{drive-id}/items/{parent-id}:/{filename}:/content
PUT /users/{user-id}/drive/items/{parent-id}:/{filename}:/cont... | To upload file (<4MB in size) to your OneDrive in the tenant.
This command will do the job
```
foo@bar:~$ ACCESS_TOKEN=eyJ0eXAiOiJKV1QiLCJub25jZSI6IlZ0MVBN...
foo@bar:~$ curl -X PUT 'https://graph.microsoft.com/v1.0/me/drive/root:/myNewFolder/file.tgz:/content' -H 'Authorization: Bearer '"${ACCESS_TOKEN}"'' -T test.t... |
61,890,423 | I trying to upload a simpale text as file to oneDrive using REST API.
I Create App inportal.azure.com
And i add the follow API permissions
[](https://i.stack.imgur.com/mkIkS.jpg)
I create a token:
<https://login.microsoftonline.com/>< My tenantName>/... | 2020/05/19 | [
"https://Stackoverflow.com/questions/61890423",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4112376/"
] | In case anyone else has a similar issue, a few days ago, I had the same problem, and I partially solve it by creating a tenant in Azure Active Directory(ADD) and switching to this new one. But with this new tenant for personal Microsoft accounts, I had the `"Tenant does not have a SPO license."` error. This happened be... | To upload file (<4MB in size) to your OneDrive in the tenant.
This command will do the job
```
foo@bar:~$ ACCESS_TOKEN=eyJ0eXAiOiJKV1QiLCJub25jZSI6IlZ0MVBN...
foo@bar:~$ curl -X PUT 'https://graph.microsoft.com/v1.0/me/drive/root:/myNewFolder/file.tgz:/content' -H 'Authorization: Bearer '"${ACCESS_TOKEN}"'' -T test.t... |
110,774 | We are thinking about buying an `SQL Standard Server` for implementing an `ETL via SSIS`. Since it is very expensive for us I would like to test developing SSIS Packages on a free version. Since the express version does not integrate the SSIS I want to try it on the [Evaluation 180 Expires Version](https://www.microsof... | 2015/08/12 | [
"https://dba.stackexchange.com/questions/110774",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/39065/"
] | You can use Evaluation Edition for that, yes. Beware that it has the functionality of Enterprise Edition, and you plan to have Standard Edition in production, which has less functionality. But if you are careful about what you use, you'll be fine. | SSIS does comes with SQL Server evaluation.
Additionally if you're a small company or a start up you could take advantage of the [Bizspark](https://www.microsoft.com/bizspark) program and test the full version throughout and/or develop with it for 3 years.
And to spice it up a bit this article can give you an additio... |
110,774 | We are thinking about buying an `SQL Standard Server` for implementing an `ETL via SSIS`. Since it is very expensive for us I would like to test developing SSIS Packages on a free version. Since the express version does not integrate the SSIS I want to try it on the [Evaluation 180 Expires Version](https://www.microsof... | 2015/08/12 | [
"https://dba.stackexchange.com/questions/110774",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/39065/"
] | You can use Evaluation Edition for that, yes. Beware that it has the functionality of Enterprise Edition, and you plan to have Standard Edition in production, which has less functionality. But if you are careful about what you use, you'll be fine. | Developer Edition was created for this specific reason and can be used perpetually. It was $50 USD last time I looked. Like the Eval, it has all the Enterprise Edition features. If that's not the target for deployment, take care not to use those features.
Another thought is that Amazon offers AWS instances that includ... |
110,774 | We are thinking about buying an `SQL Standard Server` for implementing an `ETL via SSIS`. Since it is very expensive for us I would like to test developing SSIS Packages on a free version. Since the express version does not integrate the SSIS I want to try it on the [Evaluation 180 Expires Version](https://www.microsof... | 2015/08/12 | [
"https://dba.stackexchange.com/questions/110774",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/39065/"
] | For SQL Server 2005 and 2008 R2, the only way to get the Integration Services development environment, Business Intelligence Design Studio a.k.a. BIDS, was through the installation media aka you already bought Developer, Standard or Enterprise Edition. However, if you're looking to purchase SQL Server for the first tim... | You can use Evaluation Edition for that, yes. Beware that it has the functionality of Enterprise Edition, and you plan to have Standard Edition in production, which has less functionality. But if you are careful about what you use, you'll be fine. |
110,774 | We are thinking about buying an `SQL Standard Server` for implementing an `ETL via SSIS`. Since it is very expensive for us I would like to test developing SSIS Packages on a free version. Since the express version does not integrate the SSIS I want to try it on the [Evaluation 180 Expires Version](https://www.microsof... | 2015/08/12 | [
"https://dba.stackexchange.com/questions/110774",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/39065/"
] | For SQL Server 2005 and 2008 R2, the only way to get the Integration Services development environment, Business Intelligence Design Studio a.k.a. BIDS, was through the installation media aka you already bought Developer, Standard or Enterprise Edition. However, if you're looking to purchase SQL Server for the first tim... | SSIS does comes with SQL Server evaluation.
Additionally if you're a small company or a start up you could take advantage of the [Bizspark](https://www.microsoft.com/bizspark) program and test the full version throughout and/or develop with it for 3 years.
And to spice it up a bit this article can give you an additio... |
110,774 | We are thinking about buying an `SQL Standard Server` for implementing an `ETL via SSIS`. Since it is very expensive for us I would like to test developing SSIS Packages on a free version. Since the express version does not integrate the SSIS I want to try it on the [Evaluation 180 Expires Version](https://www.microsof... | 2015/08/12 | [
"https://dba.stackexchange.com/questions/110774",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/39065/"
] | For SQL Server 2005 and 2008 R2, the only way to get the Integration Services development environment, Business Intelligence Design Studio a.k.a. BIDS, was through the installation media aka you already bought Developer, Standard or Enterprise Edition. However, if you're looking to purchase SQL Server for the first tim... | Developer Edition was created for this specific reason and can be used perpetually. It was $50 USD last time I looked. Like the Eval, it has all the Enterprise Edition features. If that's not the target for deployment, take care not to use those features.
Another thought is that Amazon offers AWS instances that includ... |
17,508,464 | in the past I have mostly been programming in .NET and because of that I haven't had to worry about things like pointers especially much but recently I have gotten into Objective-C and I have decided to try and fully understand the workings of memory management.
So, first I'd like to say I know you shouldn't make poin... | 2013/07/07 | [
"https://Stackoverflow.com/questions/17508464",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2557273/"
] | ```
intPointer = integer;
```
This only works because of implicit conversion. Pointer is just a memory offset, which is numeric, so it can be assigned from an int (and you should get compiler warning about that).
In case of CLLocationCoordinate2D, struct cannot be converted to pointer, so compiler reports error. And... | Your initial assumption that is is working, is false:
intPointer = integer;
What actually is happening that if you store 10 in variable "integer", then it will get copied in intPointer. So when you will try to get value from intPointer using \*intPointer, it will give you the value stored at memory 10, which could be... |
17,508,464 | in the past I have mostly been programming in .NET and because of that I haven't had to worry about things like pointers especially much but recently I have gotten into Objective-C and I have decided to try and fully understand the workings of memory management.
So, first I'd like to say I know you shouldn't make poin... | 2013/07/07 | [
"https://Stackoverflow.com/questions/17508464",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2557273/"
] | ```
intPointer = integer;
```
This only works because of implicit conversion. Pointer is just a memory offset, which is numeric, so it can be assigned from an int (and you should get compiler warning about that).
In case of CLLocationCoordinate2D, struct cannot be converted to pointer, so compiler reports error. And... | The question that you asked was all about plain C pointers. Objective-C is C with additions (there is also Objective-C++ which is C++ with additions). When you write code with Xcode, you can decide what warnings the compiler gives you and whether these warnings should be treated as errors. With lowest warnings settings... |
17,508,464 | in the past I have mostly been programming in .NET and because of that I haven't had to worry about things like pointers especially much but recently I have gotten into Objective-C and I have decided to try and fully understand the workings of memory management.
So, first I'd like to say I know you shouldn't make poin... | 2013/07/07 | [
"https://Stackoverflow.com/questions/17508464",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2557273/"
] | Your initial assumption that is is working, is false:
intPointer = integer;
What actually is happening that if you store 10 in variable "integer", then it will get copied in intPointer. So when you will try to get value from intPointer using \*intPointer, it will give you the value stored at memory 10, which could be... | The question that you asked was all about plain C pointers. Objective-C is C with additions (there is also Objective-C++ which is C++ with additions). When you write code with Xcode, you can decide what warnings the compiler gives you and whether these warnings should be treated as errors. With lowest warnings settings... |
42,936,296 | I will present a question about 'aliasing' values from a column. I will use days of the week as an intuitive example to get my question across, but I am ***not*** asking for datetime conversions.
Suppose I have the following SQL script:
```
SELECT DaysOfWeek
FROM [databasename].[dbo].[tablename]
```
Now, the colu... | 2017/03/21 | [
"https://Stackoverflow.com/questions/42936296",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3856609/"
] | You can do this using `case`:
```
SELECT (CASE DaysOfWeek
WHEN 'Monday' THEN 1
WHEN 'Tuesday' THEN 2
. . .
END)
```
Under most circumstances, it is unnecessary to store the day of the week like this. You can readily use a function, `datepart()` or `datename()`, to extr... | If you wanted to define your own corresponding value for another value, the best way is to use a table, and join that table.
For example:
```
create table dbo.EmployeeTitle (
id int not null identity(1,1) primary key
, title varchar(32)
);
create table dbo.Employee (
id int not null identity(1,1) primar... |
42,936,296 | I will present a question about 'aliasing' values from a column. I will use days of the week as an intuitive example to get my question across, but I am ***not*** asking for datetime conversions.
Suppose I have the following SQL script:
```
SELECT DaysOfWeek
FROM [databasename].[dbo].[tablename]
```
Now, the colu... | 2017/03/21 | [
"https://Stackoverflow.com/questions/42936296",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3856609/"
] | If you wanted to define your own corresponding value for another value, the best way is to use a table, and join that table.
For example:
```
create table dbo.EmployeeTitle (
id int not null identity(1,1) primary key
, title varchar(32)
);
create table dbo.Employee (
id int not null identity(1,1) primar... | The easiest way I can think of is to have a table variable or CTE; create your lookup as rows and join to it. Something like this:
```
with cte as (
select 1 as emp_code, 'value1' as emp_title
union
select 2 as emp_code, 'value2' as emp_title
union
select 3 as emp_code, 'value3' as emp_title
)
select cte.em... |
42,936,296 | I will present a question about 'aliasing' values from a column. I will use days of the week as an intuitive example to get my question across, but I am ***not*** asking for datetime conversions.
Suppose I have the following SQL script:
```
SELECT DaysOfWeek
FROM [databasename].[dbo].[tablename]
```
Now, the colu... | 2017/03/21 | [
"https://Stackoverflow.com/questions/42936296",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3856609/"
] | You can do this using `case`:
```
SELECT (CASE DaysOfWeek
WHEN 'Monday' THEN 1
WHEN 'Tuesday' THEN 2
. . .
END)
```
Under most circumstances, it is unnecessary to store the day of the week like this. You can readily use a function, `datepart()` or `datename()`, to extr... | Use CASE, [here](https://msdn.microsoft.com/es-ar/library/ms181765.aspx) you have the definition and one example :
```
select
CASE
WHEN(DaysOfWeek="Monday") THEN 1
WHEN(DaysOfWeek="Thusday") THEN 2
....
ELSE -1
from table
```
Hope this help! |
42,936,296 | I will present a question about 'aliasing' values from a column. I will use days of the week as an intuitive example to get my question across, but I am ***not*** asking for datetime conversions.
Suppose I have the following SQL script:
```
SELECT DaysOfWeek
FROM [databasename].[dbo].[tablename]
```
Now, the colu... | 2017/03/21 | [
"https://Stackoverflow.com/questions/42936296",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3856609/"
] | You can do this using `case`:
```
SELECT (CASE DaysOfWeek
WHEN 'Monday' THEN 1
WHEN 'Tuesday' THEN 2
. . .
END)
```
Under most circumstances, it is unnecessary to store the day of the week like this. You can readily use a function, `datepart()` or `datename()`, to extr... | The easiest way I can think of is to have a table variable or CTE; create your lookup as rows and join to it. Something like this:
```
with cte as (
select 1 as emp_code, 'value1' as emp_title
union
select 2 as emp_code, 'value2' as emp_title
union
select 3 as emp_code, 'value3' as emp_title
)
select cte.em... |
42,936,296 | I will present a question about 'aliasing' values from a column. I will use days of the week as an intuitive example to get my question across, but I am ***not*** asking for datetime conversions.
Suppose I have the following SQL script:
```
SELECT DaysOfWeek
FROM [databasename].[dbo].[tablename]
```
Now, the colu... | 2017/03/21 | [
"https://Stackoverflow.com/questions/42936296",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3856609/"
] | Use CASE, [here](https://msdn.microsoft.com/es-ar/library/ms181765.aspx) you have the definition and one example :
```
select
CASE
WHEN(DaysOfWeek="Monday") THEN 1
WHEN(DaysOfWeek="Thusday") THEN 2
....
ELSE -1
from table
```
Hope this help! | The easiest way I can think of is to have a table variable or CTE; create your lookup as rows and join to it. Something like this:
```
with cte as (
select 1 as emp_code, 'value1' as emp_title
union
select 2 as emp_code, 'value2' as emp_title
union
select 3 as emp_code, 'value3' as emp_title
)
select cte.em... |
11,567 | We "teached" our product owner to write user stories using the template "As a ... I want ... so that ..." (see <http://en.wikipedia.org/wiki/User_story#Format>) . However he/she is now writing the user stories like
>
> As a product owner I want ... so that ... .
>
>
>
Is this a way how user stories could be writt... | 2014/05/14 | [
"https://pm.stackexchange.com/questions/11567",
"https://pm.stackexchange.com",
"https://pm.stackexchange.com/users/8693/"
] | No, they would only make sense if you were writing a product where a "product owner" was a customer -- for example, a tool for keeping a backlog would have stories that start with "As a product owner" because *a product owner would actually be using the product you are developing*.
But normally, no. The product owner ... | Here some examples I pulled this template off scrumalliance.org and its worked nicely when I've adapted it
User story in front, acceptance criteria at the back
*First Example*
**As a student**
**User stories title:** Student registers
I want to register with on the website
So that I can view and apply for IT jobs
... |
11,567 | We "teached" our product owner to write user stories using the template "As a ... I want ... so that ..." (see <http://en.wikipedia.org/wiki/User_story#Format>) . However he/she is now writing the user stories like
>
> As a product owner I want ... so that ... .
>
>
>
Is this a way how user stories could be writt... | 2014/05/14 | [
"https://pm.stackexchange.com/questions/11567",
"https://pm.stackexchange.com",
"https://pm.stackexchange.com/users/8693/"
] | We should always write stories from the perspective of user role you are catering to. The user stories are the foundation to 3C's. [Reference Link](http://xprogramming.com/articles/expcardconversationconfirmation/)
1. Card
2. Conversation
3. Confirmation
***Card*** : This is to write user stories which will help the ... | One thing that I'd like to add as a product owner.
Sometimes, when a design is needed, I'll write the story like:
As a: PO
I want: a design for feature xyz
so that: further work can be identified for implementation of xyz
Usually, that'll get assigned to an architect on the team. That's usually the only time I use t... |
11,567 | We "teached" our product owner to write user stories using the template "As a ... I want ... so that ..." (see <http://en.wikipedia.org/wiki/User_story#Format>) . However he/she is now writing the user stories like
>
> As a product owner I want ... so that ... .
>
>
>
Is this a way how user stories could be writt... | 2014/05/14 | [
"https://pm.stackexchange.com/questions/11567",
"https://pm.stackexchange.com",
"https://pm.stackexchange.com/users/8693/"
] | We should always write stories from the perspective of user role you are catering to. The user stories are the foundation to 3C's. [Reference Link](http://xprogramming.com/articles/expcardconversationconfirmation/)
1. Card
2. Conversation
3. Confirmation
***Card*** : This is to write user stories which will help the ... | Here some examples I pulled this template off scrumalliance.org and its worked nicely when I've adapted it
User story in front, acceptance criteria at the back
*First Example*
**As a student**
**User stories title:** Student registers
I want to register with on the website
So that I can view and apply for IT jobs
... |
11,567 | We "teached" our product owner to write user stories using the template "As a ... I want ... so that ..." (see <http://en.wikipedia.org/wiki/User_story#Format>) . However he/she is now writing the user stories like
>
> As a product owner I want ... so that ... .
>
>
>
Is this a way how user stories could be writt... | 2014/05/14 | [
"https://pm.stackexchange.com/questions/11567",
"https://pm.stackexchange.com",
"https://pm.stackexchange.com/users/8693/"
] | Product Owner is the name given to a role which is specific to the process/framework you are using to manage the project or to execute software development. This particular name has no meaning outside the context of this process. The system which you are trying to build will have its own specific users. Each of those r... | Some stories can be written only from the point of view of the Product Owner
----------------------------------------------------------------------------
Let me give a couple of examples:
1. Analytics stories: The end users of the application do not care whether you collect any analytics data at all. In fact some end... |
11,567 | We "teached" our product owner to write user stories using the template "As a ... I want ... so that ..." (see <http://en.wikipedia.org/wiki/User_story#Format>) . However he/she is now writing the user stories like
>
> As a product owner I want ... so that ... .
>
>
>
Is this a way how user stories could be writt... | 2014/05/14 | [
"https://pm.stackexchange.com/questions/11567",
"https://pm.stackexchange.com",
"https://pm.stackexchange.com/users/8693/"
] | No, they would only make sense if you were writing a product where a "product owner" was a customer -- for example, a tool for keeping a backlog would have stories that start with "As a product owner" because *a product owner would actually be using the product you are developing*.
But normally, no. The product owner ... | Generally speaking, the product owner is the stakeholder representative and voice of the customer. I would expect the user stories that they write to identify which stakeholder or customer group (or groups) are impacted by the story. Because the product owner can be considered a stakeholder, though, I don't see the iss... |
11,567 | We "teached" our product owner to write user stories using the template "As a ... I want ... so that ..." (see <http://en.wikipedia.org/wiki/User_story#Format>) . However he/she is now writing the user stories like
>
> As a product owner I want ... so that ... .
>
>
>
Is this a way how user stories could be writt... | 2014/05/14 | [
"https://pm.stackexchange.com/questions/11567",
"https://pm.stackexchange.com",
"https://pm.stackexchange.com/users/8693/"
] | Generally speaking, the product owner is the stakeholder representative and voice of the customer. I would expect the user stories that they write to identify which stakeholder or customer group (or groups) are impacted by the story. Because the product owner can be considered a stakeholder, though, I don't see the iss... | Here some examples I pulled this template off scrumalliance.org and its worked nicely when I've adapted it
User story in front, acceptance criteria at the back
*First Example*
**As a student**
**User stories title:** Student registers
I want to register with on the website
So that I can view and apply for IT jobs
... |
11,567 | We "teached" our product owner to write user stories using the template "As a ... I want ... so that ..." (see <http://en.wikipedia.org/wiki/User_story#Format>) . However he/she is now writing the user stories like
>
> As a product owner I want ... so that ... .
>
>
>
Is this a way how user stories could be writt... | 2014/05/14 | [
"https://pm.stackexchange.com/questions/11567",
"https://pm.stackexchange.com",
"https://pm.stackexchange.com/users/8693/"
] | We should always write stories from the perspective of user role you are catering to. The user stories are the foundation to 3C's. [Reference Link](http://xprogramming.com/articles/expcardconversationconfirmation/)
1. Card
2. Conversation
3. Confirmation
***Card*** : This is to write user stories which will help the ... | Some stories can be written only from the point of view of the Product Owner
----------------------------------------------------------------------------
Let me give a couple of examples:
1. Analytics stories: The end users of the application do not care whether you collect any analytics data at all. In fact some end... |
11,567 | We "teached" our product owner to write user stories using the template "As a ... I want ... so that ..." (see <http://en.wikipedia.org/wiki/User_story#Format>) . However he/she is now writing the user stories like
>
> As a product owner I want ... so that ... .
>
>
>
Is this a way how user stories could be writt... | 2014/05/14 | [
"https://pm.stackexchange.com/questions/11567",
"https://pm.stackexchange.com",
"https://pm.stackexchange.com/users/8693/"
] | Generally speaking, the product owner is the stakeholder representative and voice of the customer. I would expect the user stories that they write to identify which stakeholder or customer group (or groups) are impacted by the story. Because the product owner can be considered a stakeholder, though, I don't see the iss... | Product Owner is the name given to a role which is specific to the process/framework you are using to manage the project or to execute software development. This particular name has no meaning outside the context of this process. The system which you are trying to build will have its own specific users. Each of those r... |
11,567 | We "teached" our product owner to write user stories using the template "As a ... I want ... so that ..." (see <http://en.wikipedia.org/wiki/User_story#Format>) . However he/she is now writing the user stories like
>
> As a product owner I want ... so that ... .
>
>
>
Is this a way how user stories could be writt... | 2014/05/14 | [
"https://pm.stackexchange.com/questions/11567",
"https://pm.stackexchange.com",
"https://pm.stackexchange.com/users/8693/"
] | Product Owner is the name given to a role which is specific to the process/framework you are using to manage the project or to execute software development. This particular name has no meaning outside the context of this process. The system which you are trying to build will have its own specific users. Each of those r... | One thing that I'd like to add as a product owner.
Sometimes, when a design is needed, I'll write the story like:
As a: PO
I want: a design for feature xyz
so that: further work can be identified for implementation of xyz
Usually, that'll get assigned to an architect on the team. That's usually the only time I use t... |
11,567 | We "teached" our product owner to write user stories using the template "As a ... I want ... so that ..." (see <http://en.wikipedia.org/wiki/User_story#Format>) . However he/she is now writing the user stories like
>
> As a product owner I want ... so that ... .
>
>
>
Is this a way how user stories could be writt... | 2014/05/14 | [
"https://pm.stackexchange.com/questions/11567",
"https://pm.stackexchange.com",
"https://pm.stackexchange.com/users/8693/"
] | One thing that I'd like to add as a product owner.
Sometimes, when a design is needed, I'll write the story like:
As a: PO
I want: a design for feature xyz
so that: further work can be identified for implementation of xyz
Usually, that'll get assigned to an architect on the team. That's usually the only time I use t... | Some stories can be written only from the point of view of the Product Owner
----------------------------------------------------------------------------
Let me give a couple of examples:
1. Analytics stories: The end users of the application do not care whether you collect any analytics data at all. In fact some end... |
66,132,074 | **i'm looking for help converting this jquery code to angular**
```
if($('#radioid li input:checked')){
$(this).parent().addClass("active_radio");
}
$('#radioid input').on('change', function(){
$("#radioid li").removeClass("active_radio");
if($('input:checked')){
$(this).parent().addClass("active_radio");
... | 2021/02/10 | [
"https://Stackoverflow.com/questions/66132074",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2823480/"
] | You have to update your code to:
```
<script>
var json = {
"html": "<h3>COVID-19 Visitor Declaration</h3><script><\/script>"
};
</script>
```
Escaped tag </script> is most important for that. | By using the `Escape` characters, for your closing tag `<\/script>`
```js
var json = {
"html": "<h3>COVID-19 Visitor Declaration</h3><script><\/script>"
};
document.getElementById("html-content").innerHTML = json.html;
```
```html
<div id="html-content"></div>
```
`<scripta>` works because it's not a valid tag ... |
18,450,076 | I've been setting up PHP deployments with Capistrano on CentOS 6 and have run into an interesting issue. The way capistrano works, it sets up folders like this:
* /var/www/myapp.com/
+ current (symlink to latest release in /releases)
+ shared
+ releases
- 20130826172737
- 20130826172114
When I look at the "cur... | 2013/08/26 | [
"https://Stackoverflow.com/questions/18450076",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/468592/"
] | That has not changed since Day 1 of .NET. All reference types must be created with a `New` statement somewhere or else they will remain a null reference (`Nothing`).
It sounds like some other part of the app that used to create the dataset has been removed or changed so that it sometimes returns `Nothing`. | There is a difference between declaring and instantiating.
This line declares a `DataSet`:
```
Dim myDataSet As DataSet
```
Note: Since you only declared a `DataSet` object, it is not set to an instance, therefore it is `Nothing`.
This line instantiates a `DataSet`:
```
myDataSet = New DataSet()
```
Often you w... |
36,737,872 | I have created two templates in AngularJs respectively `home.html` and `navTemplate.html`.
**home.html**
```
<html>
<head>//necessary files goes here</head>
<body ng-app="myApp">
//include navTemplate using ng-include
<ng-include src="'navTemplate.html'"></ng-include>
</body>
</html>
```
**navTemplate.html**
```... | 2016/04/20 | [
"https://Stackoverflow.com/questions/36737872",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4318982/"
] | You can use `ng-class` to dynamically change your class. For example
```
$scope.isActive = false;
$scope.checkIfActive = function(isActive) {
if (isActive) {
return "active"
}
return "not-active"
}
```
you can use it like `<li id="home" ng-class="checkIfActive(isActive)">`
this is needed insid... | I would suggest to do it this way:
1. Decorate your nav links with a class, like "navLink".
2. Use this script instead of yours:
`<script>
$("#left-panel").on("click", function(e) {
$("#left-panel ul li").removeClass("active");
$(this).parent().addClass("active");
}, "li a.navLink");
</script>`
This way you will... |
36,737,872 | I have created two templates in AngularJs respectively `home.html` and `navTemplate.html`.
**home.html**
```
<html>
<head>//necessary files goes here</head>
<body ng-app="myApp">
//include navTemplate using ng-include
<ng-include src="'navTemplate.html'"></ng-include>
</body>
</html>
```
**navTemplate.html**
```... | 2016/04/20 | [
"https://Stackoverflow.com/questions/36737872",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4318982/"
] | You can use `ng-class` to dynamically change your class. For example
```
$scope.isActive = false;
$scope.checkIfActive = function(isActive) {
if (isActive) {
return "active"
}
return "not-active"
}
```
you can use it like `<li id="home" ng-class="checkIfActive(isActive)">`
this is needed insid... | each time one of the links is/are clicked in the nav bar it navigated directly to the url which reloads the javascript again, so there's no way to determine which link was clicked after except you want to do someting complicated like getting the href of the page.
The best to do is use angularjs route then add an ng-cli... |
36,737,872 | I have created two templates in AngularJs respectively `home.html` and `navTemplate.html`.
**home.html**
```
<html>
<head>//necessary files goes here</head>
<body ng-app="myApp">
//include navTemplate using ng-include
<ng-include src="'navTemplate.html'"></ng-include>
</body>
</html>
```
**navTemplate.html**
```... | 2016/04/20 | [
"https://Stackoverflow.com/questions/36737872",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4318982/"
] | each time one of the links is/are clicked in the nav bar it navigated directly to the url which reloads the javascript again, so there's no way to determine which link was clicked after except you want to do someting complicated like getting the href of the page.
The best to do is use angularjs route then add an ng-cli... | I would suggest to do it this way:
1. Decorate your nav links with a class, like "navLink".
2. Use this script instead of yours:
`<script>
$("#left-panel").on("click", function(e) {
$("#left-panel ul li").removeClass("active");
$(this).parent().addClass("active");
}, "li a.navLink");
</script>`
This way you will... |
1,530,879 | If $f$ is such a homomorphism, then $f(x+y)=f(x)f(y)$.
I know of examples of $f$ which satisfy this property, such as $f(x)=e^x$, but how do I find all of them? | 2015/11/15 | [
"https://math.stackexchange.com/questions/1530879",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/26447/"
] | There is exactly one such homomorphism, namely the constant map $x\mapsto 1$, because $1$ is the only number whose $k$th roots are all rational. In more detail:
Let $x$ be arbitrary. Since $f(x)=f(\frac x2+\frac x2)=f(\frac x2)^2$ it must be positive; take $f(x)=n/m$ in lowest terms.
Suppose that $n/m\ne 1$; then the... | Consider some such homomorphism $f$. Consider an arbitrary element $a/b \in \mathbb{Q}$. If $f(a/b)=p/q$, we can write $p/q$ in lowest terms and get a unique prime factorization $p/q = \frac{p\_1^{r\_1} \dots p\_n^{r\_n}}{{q\_1^{s\_1} \dots q\_m^{s\_m}}}$. the $p\_1 \dots p\_n, q\_1 \dots q\_m$ are distinct prime numbe... |
1,530,879 | If $f$ is such a homomorphism, then $f(x+y)=f(x)f(y)$.
I know of examples of $f$ which satisfy this property, such as $f(x)=e^x$, but how do I find all of them? | 2015/11/15 | [
"https://math.stackexchange.com/questions/1530879",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/26447/"
] | There is exactly one such homomorphism, namely the constant map $x\mapsto 1$, because $1$ is the only number whose $k$th roots are all rational. In more detail:
Let $x$ be arbitrary. Since $f(x)=f(\frac x2+\frac x2)=f(\frac x2)^2$ it must be positive; take $f(x)=n/m$ in lowest terms.
Suppose that $n/m\ne 1$; then the... | There is only the trivial morphism $x \mapsto 1$.
Indeed, we can check that for any $n \in \mathbb{Z}$ and $x\in \mathbb{Q}$, we have $f(nx)=f(x)^n$.
In particular, since $f\left(\frac{1}{n}\right)^n = f(1)$, the number $f(1)$ has a rational $n^{\textrm{th}}$ root for all $n \ge 1$. So $f(1) = 1$ and $f\left(\frac{1}... |
1,530,879 | If $f$ is such a homomorphism, then $f(x+y)=f(x)f(y)$.
I know of examples of $f$ which satisfy this property, such as $f(x)=e^x$, but how do I find all of them? | 2015/11/15 | [
"https://math.stackexchange.com/questions/1530879",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/26447/"
] | There is exactly one such homomorphism, namely the constant map $x\mapsto 1$, because $1$ is the only number whose $k$th roots are all rational. In more detail:
Let $x$ be arbitrary. Since $f(x)=f(\frac x2+\frac x2)=f(\frac x2)^2$ it must be positive; take $f(x)=n/m$ in lowest terms.
Suppose that $n/m\ne 1$; then the... | Two proofs that there are no nontrivial homomorphisms.
This is kind of the same thing as what others have suggested, but in more abstract terms: ${\bf Q}$ is a divisible group. The image by a homomorphism of a divisible group is always divisible (this is easy to show), but ${\bf Q}^\*$ has no nontrivial divisible subg... |
1,530,879 | If $f$ is such a homomorphism, then $f(x+y)=f(x)f(y)$.
I know of examples of $f$ which satisfy this property, such as $f(x)=e^x$, but how do I find all of them? | 2015/11/15 | [
"https://math.stackexchange.com/questions/1530879",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/26447/"
] | Consider some such homomorphism $f$. Consider an arbitrary element $a/b \in \mathbb{Q}$. If $f(a/b)=p/q$, we can write $p/q$ in lowest terms and get a unique prime factorization $p/q = \frac{p\_1^{r\_1} \dots p\_n^{r\_n}}{{q\_1^{s\_1} \dots q\_m^{s\_m}}}$. the $p\_1 \dots p\_n, q\_1 \dots q\_m$ are distinct prime numbe... | There is only the trivial morphism $x \mapsto 1$.
Indeed, we can check that for any $n \in \mathbb{Z}$ and $x\in \mathbb{Q}$, we have $f(nx)=f(x)^n$.
In particular, since $f\left(\frac{1}{n}\right)^n = f(1)$, the number $f(1)$ has a rational $n^{\textrm{th}}$ root for all $n \ge 1$. So $f(1) = 1$ and $f\left(\frac{1}... |
1,530,879 | If $f$ is such a homomorphism, then $f(x+y)=f(x)f(y)$.
I know of examples of $f$ which satisfy this property, such as $f(x)=e^x$, but how do I find all of them? | 2015/11/15 | [
"https://math.stackexchange.com/questions/1530879",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/26447/"
] | Consider some such homomorphism $f$. Consider an arbitrary element $a/b \in \mathbb{Q}$. If $f(a/b)=p/q$, we can write $p/q$ in lowest terms and get a unique prime factorization $p/q = \frac{p\_1^{r\_1} \dots p\_n^{r\_n}}{{q\_1^{s\_1} \dots q\_m^{s\_m}}}$. the $p\_1 \dots p\_n, q\_1 \dots q\_m$ are distinct prime numbe... | Two proofs that there are no nontrivial homomorphisms.
This is kind of the same thing as what others have suggested, but in more abstract terms: ${\bf Q}$ is a divisible group. The image by a homomorphism of a divisible group is always divisible (this is easy to show), but ${\bf Q}^\*$ has no nontrivial divisible subg... |
5,209,395 | I have a list `a = ['a1', 'b1', 'c1', 'd1', 'a2', 'b2', 'c2', 'd2',]`
How can I get list `b = ['a1,', 'a2', 'b1', 'b2', 'c1', 'c2', 'd1', 'd2']` without using `.sorted()`?
Thanks! | 2011/03/06 | [
"https://Stackoverflow.com/questions/5209395",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/465137/"
] | It seems a bit arbitrary, not to use `sorted()`. I think you mean, that you don't want to sort the list in the (default) alphanumerical order.
Here is how you define a key for sorting strings that represent playing cards (a1 through d13) by suit, then rank:
```
>>> def cardsortkey(card):
... return (card[0], int(... | ```
l = ['a1', 'b1', 'c1', 'd1', 'a2', 'b2', 'c2', 'd2']
numbersPerLetter = 2
lsorted = []
for i in range(len(l) / numbersPerLetter):
lsorted.extend([l[x+i] for x in range(0, len(l), len(l) / numbersPerLetter)])
print(lsorted)
```
Output:
```
['a1', 'a2', 'b1', 'b2', 'c1', 'c2', 'd1', 'd2']
```
In Python 3.X yo... |
5,209,395 | I have a list `a = ['a1', 'b1', 'c1', 'd1', 'a2', 'b2', 'c2', 'd2',]`
How can I get list `b = ['a1,', 'a2', 'b1', 'b2', 'c1', 'c2', 'd1', 'd2']` without using `.sorted()`?
Thanks! | 2011/03/06 | [
"https://Stackoverflow.com/questions/5209395",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/465137/"
] | There is no `.sorted()` method for lists, though there is the `sorted()` function, as S.Mark pointed out (which returns a new sorted list), and a `.sort()` method (which sorts a list in place and returns `None`). If you meant to not use the `sorted()` function, then:
```
a = ['a1', 'b1', 'c1', 'd1', 'a2', 'b2', 'c2', ... | You can also sort it this way
```
for i1, e1 in enumerate(a):
for i2, e2 in enumerate(a):
if e2 > e1:
e1 = a[i2]
a[i2] = a[i1]
a[i1] = e1
``` |
5,209,395 | I have a list `a = ['a1', 'b1', 'c1', 'd1', 'a2', 'b2', 'c2', 'd2',]`
How can I get list `b = ['a1,', 'a2', 'b1', 'b2', 'c1', 'c2', 'd1', 'd2']` without using `.sorted()`?
Thanks! | 2011/03/06 | [
"https://Stackoverflow.com/questions/5209395",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/465137/"
] | just `b = sorted(a)` ? | You can also sort it this way
```
for i1, e1 in enumerate(a):
for i2, e2 in enumerate(a):
if e2 > e1:
e1 = a[i2]
a[i2] = a[i1]
a[i1] = e1
``` |
5,209,395 | I have a list `a = ['a1', 'b1', 'c1', 'd1', 'a2', 'b2', 'c2', 'd2',]`
How can I get list `b = ['a1,', 'a2', 'b1', 'b2', 'c1', 'c2', 'd1', 'd2']` without using `.sorted()`?
Thanks! | 2011/03/06 | [
"https://Stackoverflow.com/questions/5209395",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/465137/"
] | without using sorted, but expensive way.
```
a = ['a1', 'b1', 'c1', 'd1', 'a2', 'b2', 'c2', 'd2',]
```
split it to 2 parts
```
['a1', 'b1', 'c1', 'd1',] ['a2', 'b2', 'c2', 'd2',]
```
zip it
```
[('a1', 'a2'), ('b1', 'b2'), ('c1', 'c2'), ('d1', 'd2')]
```
and flatten it (with itertools here)
```
import itertoo... | You can also sort it this way
```
for i1, e1 in enumerate(a):
for i2, e2 in enumerate(a):
if e2 > e1:
e1 = a[i2]
a[i2] = a[i1]
a[i1] = e1
``` |
5,209,395 | I have a list `a = ['a1', 'b1', 'c1', 'd1', 'a2', 'b2', 'c2', 'd2',]`
How can I get list `b = ['a1,', 'a2', 'b1', 'b2', 'c1', 'c2', 'd1', 'd2']` without using `.sorted()`?
Thanks! | 2011/03/06 | [
"https://Stackoverflow.com/questions/5209395",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/465137/"
] | without using sorted, but expensive way.
```
a = ['a1', 'b1', 'c1', 'd1', 'a2', 'b2', 'c2', 'd2',]
```
split it to 2 parts
```
['a1', 'b1', 'c1', 'd1',] ['a2', 'b2', 'c2', 'd2',]
```
zip it
```
[('a1', 'a2'), ('b1', 'b2'), ('c1', 'c2'), ('d1', 'd2')]
```
and flatten it (with itertools here)
```
import itertoo... | just `b = sorted(a)` ? |
5,209,395 | I have a list `a = ['a1', 'b1', 'c1', 'd1', 'a2', 'b2', 'c2', 'd2',]`
How can I get list `b = ['a1,', 'a2', 'b1', 'b2', 'c1', 'c2', 'd1', 'd2']` without using `.sorted()`?
Thanks! | 2011/03/06 | [
"https://Stackoverflow.com/questions/5209395",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/465137/"
] | There is no `.sorted()` method for lists, though there is the `sorted()` function, as S.Mark pointed out (which returns a new sorted list), and a `.sort()` method (which sorts a list in place and returns `None`). If you meant to not use the `sorted()` function, then:
```
a = ['a1', 'b1', 'c1', 'd1', 'a2', 'b2', 'c2', ... | without using sorted, but expensive way.
```
a = ['a1', 'b1', 'c1', 'd1', 'a2', 'b2', 'c2', 'd2',]
```
split it to 2 parts
```
['a1', 'b1', 'c1', 'd1',] ['a2', 'b2', 'c2', 'd2',]
```
zip it
```
[('a1', 'a2'), ('b1', 'b2'), ('c1', 'c2'), ('d1', 'd2')]
```
and flatten it (with itertools here)
```
import itertoo... |
5,209,395 | I have a list `a = ['a1', 'b1', 'c1', 'd1', 'a2', 'b2', 'c2', 'd2',]`
How can I get list `b = ['a1,', 'a2', 'b1', 'b2', 'c1', 'c2', 'd1', 'd2']` without using `.sorted()`?
Thanks! | 2011/03/06 | [
"https://Stackoverflow.com/questions/5209395",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/465137/"
] | It seems a bit arbitrary, not to use `sorted()`. I think you mean, that you don't want to sort the list in the (default) alphanumerical order.
Here is how you define a key for sorting strings that represent playing cards (a1 through d13) by suit, then rank:
```
>>> def cardsortkey(card):
... return (card[0], int(... | You can also sort it this way
```
for i1, e1 in enumerate(a):
for i2, e2 in enumerate(a):
if e2 > e1:
e1 = a[i2]
a[i2] = a[i1]
a[i1] = e1
``` |
5,209,395 | I have a list `a = ['a1', 'b1', 'c1', 'd1', 'a2', 'b2', 'c2', 'd2',]`
How can I get list `b = ['a1,', 'a2', 'b1', 'b2', 'c1', 'c2', 'd1', 'd2']` without using `.sorted()`?
Thanks! | 2011/03/06 | [
"https://Stackoverflow.com/questions/5209395",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/465137/"
] | It seems a bit arbitrary, not to use `sorted()`. I think you mean, that you don't want to sort the list in the (default) alphanumerical order.
Here is how you define a key for sorting strings that represent playing cards (a1 through d13) by suit, then rank:
```
>>> def cardsortkey(card):
... return (card[0], int(... | just `b = sorted(a)` ? |
5,209,395 | I have a list `a = ['a1', 'b1', 'c1', 'd1', 'a2', 'b2', 'c2', 'd2',]`
How can I get list `b = ['a1,', 'a2', 'b1', 'b2', 'c1', 'c2', 'd1', 'd2']` without using `.sorted()`?
Thanks! | 2011/03/06 | [
"https://Stackoverflow.com/questions/5209395",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/465137/"
] | There is no `.sorted()` method for lists, though there is the `sorted()` function, as S.Mark pointed out (which returns a new sorted list), and a `.sort()` method (which sorts a list in place and returns `None`). If you meant to not use the `sorted()` function, then:
```
a = ['a1', 'b1', 'c1', 'd1', 'a2', 'b2', 'c2', ... | It seems a bit arbitrary, not to use `sorted()`. I think you mean, that you don't want to sort the list in the (default) alphanumerical order.
Here is how you define a key for sorting strings that represent playing cards (a1 through d13) by suit, then rank:
```
>>> def cardsortkey(card):
... return (card[0], int(... |
5,209,395 | I have a list `a = ['a1', 'b1', 'c1', 'd1', 'a2', 'b2', 'c2', 'd2',]`
How can I get list `b = ['a1,', 'a2', 'b1', 'b2', 'c1', 'c2', 'd1', 'd2']` without using `.sorted()`?
Thanks! | 2011/03/06 | [
"https://Stackoverflow.com/questions/5209395",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/465137/"
] | without using sorted, but expensive way.
```
a = ['a1', 'b1', 'c1', 'd1', 'a2', 'b2', 'c2', 'd2',]
```
split it to 2 parts
```
['a1', 'b1', 'c1', 'd1',] ['a2', 'b2', 'c2', 'd2',]
```
zip it
```
[('a1', 'a2'), ('b1', 'b2'), ('c1', 'c2'), ('d1', 'd2')]
```
and flatten it (with itertools here)
```
import itertoo... | ```
l = ['a1', 'b1', 'c1', 'd1', 'a2', 'b2', 'c2', 'd2']
numbersPerLetter = 2
lsorted = []
for i in range(len(l) / numbersPerLetter):
lsorted.extend([l[x+i] for x in range(0, len(l), len(l) / numbersPerLetter)])
print(lsorted)
```
Output:
```
['a1', 'a2', 'b1', 'b2', 'c1', 'c2', 'd1', 'd2']
```
In Python 3.X yo... |
31,054 | I have a one generation old MacBook Air. I upgraded to Lion when it came out. Now I wish to go back to Snow Leopard. I booted from the thumb drive installer for Snow Leopard. There is a Lion installer image that I can't delete. Disk Utility greys out for that partition. It's not the end of the world, but I would like t... | 2011/11/12 | [
"https://apple.stackexchange.com/questions/31054",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/13585/"
] | Another issue is you might not be in the same workgroup. To fix this go to
System Preferences -> Network -> Advanced -> WINS:
Make sure his Windows box is set the same. What OrangeBox suggested must be done as well.
 | In my experience there is no quickfix way to get windows and mac machines to *always* be visible in the others networks list.
The best thing you can do is enable Samba filesharing on your mac, then when you want to connect you just type `smb://Jonathan's MacBook Pro` into the address bar in Explorer (or into the run ... |
31,054 | I have a one generation old MacBook Air. I upgraded to Lion when it came out. Now I wish to go back to Snow Leopard. I booted from the thumb drive installer for Snow Leopard. There is a Lion installer image that I can't delete. Disk Utility greys out for that partition. It's not the end of the world, but I would like t... | 2011/11/12 | [
"https://apple.stackexchange.com/questions/31054",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/13585/"
] | In my experience there is no quickfix way to get windows and mac machines to *always* be visible in the others networks list.
The best thing you can do is enable Samba filesharing on your mac, then when you want to connect you just type `smb://Jonathan's MacBook Pro` into the address bar in Explorer (or into the run ... | Try changing the workgroup name from the iMac and windows PC. I have same problem and after I change the workgroup name it work. Try to ping your iMac check if the connectivity is good. Start - run - cmd - ping and the IP address of your Mac. |
31,054 | I have a one generation old MacBook Air. I upgraded to Lion when it came out. Now I wish to go back to Snow Leopard. I booted from the thumb drive installer for Snow Leopard. There is a Lion installer image that I can't delete. Disk Utility greys out for that partition. It's not the end of the world, but I would like t... | 2011/11/12 | [
"https://apple.stackexchange.com/questions/31054",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/13585/"
] | Another issue is you might not be in the same workgroup. To fix this go to
System Preferences -> Network -> Advanced -> WINS:
Make sure his Windows box is set the same. What OrangeBox suggested must be done as well.
 | Try changing the workgroup name from the iMac and windows PC. I have same problem and after I change the workgroup name it work. Try to ping your iMac check if the connectivity is good. Start - run - cmd - ping and the IP address of your Mac. |
31,054 | I have a one generation old MacBook Air. I upgraded to Lion when it came out. Now I wish to go back to Snow Leopard. I booted from the thumb drive installer for Snow Leopard. There is a Lion installer image that I can't delete. Disk Utility greys out for that partition. It's not the end of the world, but I would like t... | 2011/11/12 | [
"https://apple.stackexchange.com/questions/31054",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/13585/"
] | Another issue is you might not be in the same workgroup. To fix this go to
System Preferences -> Network -> Advanced -> WINS:
Make sure his Windows box is set the same. What OrangeBox suggested must be done as well.
 | I was able to resolve the issue by copying the name given in the `NetBIOS Name` field in the answer given by rubixibuc and pasting it into a run dialog, typing \\ and then the NetBIOS Name (so in rubixibuc's example the full path would be `\\MACBOOKPRO-D04A`)
To open the Run dialog, simply type `[
To open the Run dialog, simply type `[
```
\begin{figure}
\centerin... | 2016/04/04 | [
"https://tex.stackexchange.com/questions/302466",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/72473/"
] | Two main suggestions:
* Remove the second `\hfill` instruction. (And, remove the redundant `\centering` instruction.)
* Replace the two instances of `scale=0.2` with `width=\linewidth`. If that makes the graphs look too small in your opinion, consider changing both instances of `{0.4\textwidth}` to `{0.45\textwidth}`.... | Another possible cause is that you are editing in draft mode. Removing draft option might eliminate the black stripe at the end. |
63,025,965 | Is there a way to control Grandchildren and Nested Components with ViewChild? I need to access/run a public method within a Grandchild component, from a top layer. It doesn't seem to be working for me. Prefer not to utilize a service or input/output for now.
Its working for me, for only direct child components.
**Res... | 2020/07/22 | [
"https://Stackoverflow.com/questions/63025965",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | Even though you said you would rather not utilize a service, that is probably your best option.
You can follow [this](https://stackoverflow.com/a/52744815/10637527) solution.
Using `@ViewChild`, you can follow [this](https://angular.io/guide/component-interaction?fireglass_rsn=true#parent-calls-an-viewchild) guide, w... | The @ViewChild annotation allow to get a component from your View, using is type or using an hashtag
-- parent.component.ts
```js
@Component()
export class ParentComponant {
@ViewChild("childComponent") child : ChildComponant;
@ViewChild(ChildComponant) ifOnlyOneChildOfThisType : ChildComponant;
// child are ... |
17,240,544 | I need my Jquery code to animate `summary_box` div as so it slides the following way.
On load it will be on on browser window and when `summary_button2` div is clicked it will slide(change width to 0) to the right and despair and appear again once the button is clicked again.
What I have sort of works, but I'm not sur... | 2013/06/21 | [
"https://Stackoverflow.com/questions/17240544",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2129446/"
] | It's a ternary operator, and it's basically just a shortened if / else statement that does :
```
if ( $("#summary_box").width() == 300 ) {
var toggleWidth = '0';
}else{
var toggleWidth = '300px';
}
```
As a sidenote, jQuery's `animate()` has a toggle option that would do the same thing:
```
$('#summary_box').... | Check [this](https://stackoverflow.com/questions/10781620/toggle-width-with-jquery) question on StackOverflow out.
Gives a similar solution to your's try.
Check [this](http://jsfiddle.net/mareebsiddiqui/ZfHZV/376/) fiddle as well.
**JS:**
```
$(document).ready( function(){
$('#toggle-button').click( function() ... |
17,240,544 | I need my Jquery code to animate `summary_box` div as so it slides the following way.
On load it will be on on browser window and when `summary_button2` div is clicked it will slide(change width to 0) to the right and despair and appear again once the button is clicked again.
What I have sort of works, but I'm not sur... | 2013/06/21 | [
"https://Stackoverflow.com/questions/17240544",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2129446/"
] | That is ternary operation - equivalent to this -
```
var toggleWidth;
if ($("#summary_box").width() == 300) {
toggleWidth = "0";
} else {
toggleWidth "300px";
}
```
[MDN reference](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Conditional_Operator) | Check [this](https://stackoverflow.com/questions/10781620/toggle-width-with-jquery) question on StackOverflow out.
Gives a similar solution to your's try.
Check [this](http://jsfiddle.net/mareebsiddiqui/ZfHZV/376/) fiddle as well.
**JS:**
```
$(document).ready( function(){
$('#toggle-button').click( function() ... |
17,240,544 | I need my Jquery code to animate `summary_box` div as so it slides the following way.
On load it will be on on browser window and when `summary_button2` div is clicked it will slide(change width to 0) to the right and despair and appear again once the button is clicked again.
What I have sort of works, but I'm not sur... | 2013/06/21 | [
"https://Stackoverflow.com/questions/17240544",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2129446/"
] | This piece of code reads like the following:
```
$("#summary_box").width() == 300 ? "0" : "300px";
```
If width() is equal to 300, return 0, else return "300px".
See [Ternary Operator](http://en.wikipedia.org/wiki/Ternary_operation) for more info. | Check [this](https://stackoverflow.com/questions/10781620/toggle-width-with-jquery) question on StackOverflow out.
Gives a similar solution to your's try.
Check [this](http://jsfiddle.net/mareebsiddiqui/ZfHZV/376/) fiddle as well.
**JS:**
```
$(document).ready( function(){
$('#toggle-button').click( function() ... |
17,240,544 | I need my Jquery code to animate `summary_box` div as so it slides the following way.
On load it will be on on browser window and when `summary_button2` div is clicked it will slide(change width to 0) to the right and despair and appear again once the button is clicked again.
What I have sort of works, but I'm not sur... | 2013/06/21 | [
"https://Stackoverflow.com/questions/17240544",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2129446/"
] | Check [this](https://stackoverflow.com/questions/10781620/toggle-width-with-jquery) question on StackOverflow out.
Gives a similar solution to your's try.
Check [this](http://jsfiddle.net/mareebsiddiqui/ZfHZV/376/) fiddle as well.
**JS:**
```
$(document).ready( function(){
$('#toggle-button').click( function() ... | I tried this, and works fine
```
$("#searchIcon").click(function(){
var toggleWidth = "0px";
if($("#searchbox").width() == 118)
{
toggleWidth="0px";
}
else
{
toggleWidth="120px";
}
$('#searchbox').animate({ width: toggleWidth });
});
``` |
17,240,544 | I need my Jquery code to animate `summary_box` div as so it slides the following way.
On load it will be on on browser window and when `summary_button2` div is clicked it will slide(change width to 0) to the right and despair and appear again once the button is clicked again.
What I have sort of works, but I'm not sur... | 2013/06/21 | [
"https://Stackoverflow.com/questions/17240544",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2129446/"
] | That is ternary operation - equivalent to this -
```
var toggleWidth;
if ($("#summary_box").width() == 300) {
toggleWidth = "0";
} else {
toggleWidth "300px";
}
```
[MDN reference](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Conditional_Operator) | It's a ternary operator, and it's basically just a shortened if / else statement that does :
```
if ( $("#summary_box").width() == 300 ) {
var toggleWidth = '0';
}else{
var toggleWidth = '300px';
}
```
As a sidenote, jQuery's `animate()` has a toggle option that would do the same thing:
```
$('#summary_box').... |
17,240,544 | I need my Jquery code to animate `summary_box` div as so it slides the following way.
On load it will be on on browser window and when `summary_button2` div is clicked it will slide(change width to 0) to the right and despair and appear again once the button is clicked again.
What I have sort of works, but I'm not sur... | 2013/06/21 | [
"https://Stackoverflow.com/questions/17240544",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2129446/"
] | It's a ternary operator, and it's basically just a shortened if / else statement that does :
```
if ( $("#summary_box").width() == 300 ) {
var toggleWidth = '0';
}else{
var toggleWidth = '300px';
}
```
As a sidenote, jQuery's `animate()` has a toggle option that would do the same thing:
```
$('#summary_box').... | I tried this, and works fine
```
$("#searchIcon").click(function(){
var toggleWidth = "0px";
if($("#searchbox").width() == 118)
{
toggleWidth="0px";
}
else
{
toggleWidth="120px";
}
$('#searchbox').animate({ width: toggleWidth });
});
``` |
17,240,544 | I need my Jquery code to animate `summary_box` div as so it slides the following way.
On load it will be on on browser window and when `summary_button2` div is clicked it will slide(change width to 0) to the right and despair and appear again once the button is clicked again.
What I have sort of works, but I'm not sur... | 2013/06/21 | [
"https://Stackoverflow.com/questions/17240544",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2129446/"
] | That is ternary operation - equivalent to this -
```
var toggleWidth;
if ($("#summary_box").width() == 300) {
toggleWidth = "0";
} else {
toggleWidth "300px";
}
```
[MDN reference](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Conditional_Operator) | This piece of code reads like the following:
```
$("#summary_box").width() == 300 ? "0" : "300px";
```
If width() is equal to 300, return 0, else return "300px".
See [Ternary Operator](http://en.wikipedia.org/wiki/Ternary_operation) for more info. |
17,240,544 | I need my Jquery code to animate `summary_box` div as so it slides the following way.
On load it will be on on browser window and when `summary_button2` div is clicked it will slide(change width to 0) to the right and despair and appear again once the button is clicked again.
What I have sort of works, but I'm not sur... | 2013/06/21 | [
"https://Stackoverflow.com/questions/17240544",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2129446/"
] | That is ternary operation - equivalent to this -
```
var toggleWidth;
if ($("#summary_box").width() == 300) {
toggleWidth = "0";
} else {
toggleWidth "300px";
}
```
[MDN reference](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Conditional_Operator) | I tried this, and works fine
```
$("#searchIcon").click(function(){
var toggleWidth = "0px";
if($("#searchbox").width() == 118)
{
toggleWidth="0px";
}
else
{
toggleWidth="120px";
}
$('#searchbox').animate({ width: toggleWidth });
});
``` |
17,240,544 | I need my Jquery code to animate `summary_box` div as so it slides the following way.
On load it will be on on browser window and when `summary_button2` div is clicked it will slide(change width to 0) to the right and despair and appear again once the button is clicked again.
What I have sort of works, but I'm not sur... | 2013/06/21 | [
"https://Stackoverflow.com/questions/17240544",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2129446/"
] | This piece of code reads like the following:
```
$("#summary_box").width() == 300 ? "0" : "300px";
```
If width() is equal to 300, return 0, else return "300px".
See [Ternary Operator](http://en.wikipedia.org/wiki/Ternary_operation) for more info. | I tried this, and works fine
```
$("#searchIcon").click(function(){
var toggleWidth = "0px";
if($("#searchbox").width() == 118)
{
toggleWidth="0px";
}
else
{
toggleWidth="120px";
}
$('#searchbox').animate({ width: toggleWidth });
});
``` |
74,383,155 | How can I create a predicate so that when the user selects "Full Body" it returns the entire list with no predicate? Right now, it is returning "part" which corresponds to the muscle groups I have set (Abs, Legs, Push, Pull). I want to return all of the options when "Full Body" is selected. How could I write an If stat... | 2022/11/10 | [
"https://Stackoverflow.com/questions/74383155",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20186634/"
] | I made the es6 javascript code.
First I put the approval array and batas into the variable first.
Then I use for loop iteration to find data less than 10, then I delete it using splice.
The last time I returned it was an object
This is my code :
```js
const batas = (data) => {
let arr = data.approval
... | Using `filter` method can do this, for more info check: [MDN - filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).
```js
let data = {
approval: [
{
name: 'XXXX',
kode: '10'
},
{
... |
74,383,155 | How can I create a predicate so that when the user selects "Full Body" it returns the entire list with no predicate? Right now, it is returning "part" which corresponds to the muscle groups I have set (Abs, Legs, Push, Pull). I want to return all of the options when "Full Body" is selected. How could I write an If stat... | 2022/11/10 | [
"https://Stackoverflow.com/questions/74383155",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20186634/"
] | I made the es6 javascript code.
First I put the approval array and batas into the variable first.
Then I use for loop iteration to find data less than 10, then I delete it using splice.
The last time I returned it was an object
This is my code :
```js
const batas = (data) => {
let arr = data.approval
... | Use `Array#filter` method as follows:
```js
const
data = { approval: [ { name: 'XXXX', kode: '10' }, { name: 'YYYY', kode: '12' }, { name: 'ZZZZ', kode: '14' }, { name: 'HHHH', kode: '09' } ], batas: "10" },
output = [ data ]
.map(
({approval,batas}) =>
({approval:approval.fil... |
74,383,155 | How can I create a predicate so that when the user selects "Full Body" it returns the entire list with no predicate? Right now, it is returning "part" which corresponds to the muscle groups I have set (Abs, Legs, Push, Pull). I want to return all of the options when "Full Body" is selected. How could I write an If stat... | 2022/11/10 | [
"https://Stackoverflow.com/questions/74383155",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20186634/"
] | These are some of the many ways to do what you want:
```js
let data = {
approval: [
{
name: 'XXXX',
kode: '10'
},
{
name: 'YYYY',
kode: '12'
},
... | Using `filter` method can do this, for more info check: [MDN - filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).
```js
let data = {
approval: [
{
name: 'XXXX',
kode: '10'
},
{
... |
74,383,155 | How can I create a predicate so that when the user selects "Full Body" it returns the entire list with no predicate? Right now, it is returning "part" which corresponds to the muscle groups I have set (Abs, Legs, Push, Pull). I want to return all of the options when "Full Body" is selected. How could I write an If stat... | 2022/11/10 | [
"https://Stackoverflow.com/questions/74383155",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20186634/"
] | These are some of the many ways to do what you want:
```js
let data = {
approval: [
{
name: 'XXXX',
kode: '10'
},
{
name: 'YYYY',
kode: '12'
},
... | Use `Array#filter` method as follows:
```js
const
data = { approval: [ { name: 'XXXX', kode: '10' }, { name: 'YYYY', kode: '12' }, { name: 'ZZZZ', kode: '14' }, { name: 'HHHH', kode: '09' } ], batas: "10" },
output = [ data ]
.map(
({approval,batas}) =>
({approval:approval.fil... |
8,493,437 | I need to rotate an image dinamically by angle specified by the user.
I use the following code, but it only works for IE and not for any other browser.
```
<div id="frame1" style="overflow:hidden" width='300' height='300'>
<div id="frame2" width='200' height='200'>
<img src='1.jpeg'' id='im' src='1.jpeg' ... | 2011/12/13 | [
"https://Stackoverflow.com/questions/8493437",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/429775/"
] | Look at a CSS example:
```
-webkit-transform: rotate(45deg);
```
As you can see you forgot to add **deg**
```
elem.style.mozTransform = 'rotate(' + deg + 'deg)';
elem.style.webkitTransform = 'rotate(' + deg + 'deg)';
elem.style.oTransform = 'rotate(' + deg + 'deg)';
elem.style.msTransform = 'rotate(' + ... | It's actually easier in browsers that aren't IE. The MDN has [good documentation](https://developer.mozilla.org/en/CSS/transform) on how to do it with CSS3. There's some [here](https://developer.mozilla.org/en/CSS/Using_CSS_transforms) as well.
For Webkit browsers, [this page](http://tekkie.flashbit.net/css/css3-trans... |
8,493,437 | I need to rotate an image dinamically by angle specified by the user.
I use the following code, but it only works for IE and not for any other browser.
```
<div id="frame1" style="overflow:hidden" width='300' height='300'>
<div id="frame2" width='200' height='200'>
<img src='1.jpeg'' id='im' src='1.jpeg' ... | 2011/12/13 | [
"https://Stackoverflow.com/questions/8493437",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/429775/"
] | Look at a CSS example:
```
-webkit-transform: rotate(45deg);
```
As you can see you forgot to add **deg**
```
elem.style.mozTransform = 'rotate(' + deg + 'deg)';
elem.style.webkitTransform = 'rotate(' + deg + 'deg)';
elem.style.oTransform = 'rotate(' + deg + 'deg)';
elem.style.msTransform = 'rotate(' + ... | You forgot to add `deg` to the css property.
You should also add a `transform origin` to the image to make it rotate around the center (assuming that's what you're trying to do).
This code should do it.
```
<!DOCTYPE html>
<html>
<head>
<title></title>
<style>
</style>
</head>
<body>
<div id="frame1" style="overf... |
741,402 | I am not sure if I am getting in a little too deep but I have decided i'd like to learn how to develop applications built using the Oracle technology stack.
I don't come from a programming background (I have always been on the business side) but I love that no matter what problem you encounter, you can almost always s... | 2009/04/12 | [
"https://Stackoverflow.com/questions/741402",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/89932/"
] | If you don't have any object-oriented programming background, I suggest you should start out by getting familiar with basic OO concept. I recommend reading this book "Head First Java" [http://www.amazon.com/Head-First-Java-Kathy-Sierra/dp/0596009208](https://rads.stackoverflow.com/amzn/click/com/0596009208) and the off... | As natch3z has mentioned, if you don't have a programming background it might be worthwhile starting a little simpler than the oracle tech stack.
By Oracle tech stack, I am assuming using things like oc4j, ADF, oracle DB etc all within Oracle's JDeveloper IDE. Even though technologies like this can be powerful and ac... |
741,402 | I am not sure if I am getting in a little too deep but I have decided i'd like to learn how to develop applications built using the Oracle technology stack.
I don't come from a programming background (I have always been on the business side) but I love that no matter what problem you encounter, you can almost always s... | 2009/04/12 | [
"https://Stackoverflow.com/questions/741402",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/89932/"
] | If you don't have any object-oriented programming background, I suggest you should start out by getting familiar with basic OO concept. I recommend reading this book "Head First Java" [http://www.amazon.com/Head-First-Java-Kathy-Sierra/dp/0596009208](https://rads.stackoverflow.com/amzn/click/com/0596009208) and the off... | Why Java ? More specifically, what sort of stuff are you aiming to develop ?
For web applications, you could look at PHP. Oracle also has a web development/runtime environment in the database, called [Application Express](http://www.oracle.com/technology/products/database/application_express/html/what_is_apex.html). T... |
741,402 | I am not sure if I am getting in a little too deep but I have decided i'd like to learn how to develop applications built using the Oracle technology stack.
I don't come from a programming background (I have always been on the business side) but I love that no matter what problem you encounter, you can almost always s... | 2009/04/12 | [
"https://Stackoverflow.com/questions/741402",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/89932/"
] | If you don't have any object-oriented programming background, I suggest you should start out by getting familiar with basic OO concept. I recommend reading this book "Head First Java" [http://www.amazon.com/Head-First-Java-Kathy-Sierra/dp/0596009208](https://rads.stackoverflow.com/amzn/click/com/0596009208) and the off... | For Oracle questions you could try posting on the new dedicated Oracle stack exchange site, <http://www.oracleoverflow.com/>, maintained by Simple Talk Publishing. |
57,729,942 | I have my site so that people can upload urls of the videos to the database and with php it should in theory display said video. I don't want to use the embed tag because that doesn't work from mobile device. Is there a way to use the videos with just the url's?
```html
<video controls>
<source src="https://www.you... | 2019/08/30 | [
"https://Stackoverflow.com/questions/57729942",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11866436/"
] | try passing .environmentObject on your destination:
```
NavigationLink(destination: detailView(feed: self._feed, i: i).environmentObject(x))
``` | 1. You have to use willSet instead of didSet.
2. TestItem should be a value type: struct or enum. SwiftUI's observation system properly works only with value types. |
615,977 | My question is simple: could a decoupling capacitor be designed in such a way that it could in theory power on a CPU core?
Do these types of capacitors have sufficient power to power on a core without changes to the design? | 2022/04/15 | [
"https://electronics.stackexchange.com/questions/615977",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/121309/"
] | One can put energy into a capacitor and then briefly power something from it. You can easily confirm this by charging up a capacitor to a few volts and then placing an LED and resistor across it.
The basic equation for a capacitor is...
$$I=C\frac{dv}{dt} $$
And also
Q = C \* V or alternately (Charge = Capacitance ... | >
> Would it be possible for a Surface Mounted Capacitor (Decoupling) to Power on a CPU core?
>
>
>
There's nothing theoretical about it. **Those capacitors already do it**! The output impedance of the power supply is too high to maintain adequate supply voltage during the very fast current spikes demanded by powe... |
12,912,114 | I want tov compare previous and new value coming from a loop and based on data increment some rows.For that i am doing like below but the data is getting overwritten since i am doing inside for loop.How can i perform this.
```
for (RecordData recordData : recordDataList) {
prevRespondentId = recordDa... | 2012/10/16 | [
"https://Stackoverflow.com/questions/12912114",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1636728/"
] | Would this fix your issue?
```
prevRespondentId = recordDataList.get(0).getRespondentId(); //Initialize to first or default value probably -1?
for (RecordData recordData : recordDataList) {
if (recordData.getRespondentId() != prevRespondentId) {
rowDataNumber++;
}
... | Difficult to understand what your trying to do however perhaps something like this:
```
for (RecordData recordData : recordDataList) {
if (recordData.getRespondentId() != prevRespondentId) {
rowDataNumber++;
}
prevRespondentId = recordData.getRespondentId();
}
```
Basically don't ... |
12,912,114 | I want tov compare previous and new value coming from a loop and based on data increment some rows.For that i am doing like below but the data is getting overwritten since i am doing inside for loop.How can i perform this.
```
for (RecordData recordData : recordDataList) {
prevRespondentId = recordDa... | 2012/10/16 | [
"https://Stackoverflow.com/questions/12912114",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1636728/"
] | Would this fix your issue?
```
prevRespondentId = recordDataList.get(0).getRespondentId(); //Initialize to first or default value probably -1?
for (RecordData recordData : recordDataList) {
if (recordData.getRespondentId() != prevRespondentId) {
rowDataNumber++;
}
... | ```
..some type.. prevRespondentId = -1;
for (RecordData recordData : recordDataList) {
if (recordData.getRespondentId() != prevRespondentId) {
rowDataNumber++;
}
prevRespondentId = recordData.getRespondentId();
}
``` |
18,928,217 | I have written a script that is supposed to open up pages, then print them. I had set it up to run a sleep delay to allow the new page to pop up. However, the pages are not loading in a predictable time.
As the pages are loading, there is a message at the bottom of the window that the page is Loading. Once it is loa... | 2013/09/21 | [
"https://Stackoverflow.com/questions/18928217",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2793006/"
] | `ArrayList<?>` simply means "any type." In other words, any type of `ArrayList` can be assigned to such variable. That could be `ArrayList<Integers>`, `ArrayList<JButton>` or anything else. Using the wildcard alone, without the keyword super (followed by a type), means that you cannot **ADD** anything to the list defin... | ```
ArrayList list = new ArrayList();
```
We are declaring an array list that can accept any type of objects.
For example:
```
list.add(new Dog());
list.add(new Person());
list.add("Test");
```
For `ArrayList<?> list = new ArrayList();`
We are declaring an array list using generics that can accept any object usi... |
18,928,217 | I have written a script that is supposed to open up pages, then print them. I had set it up to run a sleep delay to allow the new page to pop up. However, the pages are not loading in a predictable time.
As the pages are loading, there is a message at the bottom of the window that the page is Loading. Once it is loa... | 2013/09/21 | [
"https://Stackoverflow.com/questions/18928217",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2793006/"
] | `ArrayList<?>` simply means "any type." In other words, any type of `ArrayList` can be assigned to such variable. That could be `ArrayList<Integers>`, `ArrayList<JButton>` or anything else. Using the wildcard alone, without the keyword super (followed by a type), means that you cannot **ADD** anything to the list defin... | ArrayList < ? > means array list of type unknown. it is called a wildcard type.
Using the wild card, the following occurs
```
Collection<?> c = new ArrayList<String>();
c.add(new Object()); // Compile time error
```
Without the wildcard you can add whatever you like to your array |
18,928,217 | I have written a script that is supposed to open up pages, then print them. I had set it up to run a sleep delay to allow the new page to pop up. However, the pages are not loading in a predictable time.
As the pages are loading, there is a message at the bottom of the window that the page is Loading. Once it is loa... | 2013/09/21 | [
"https://Stackoverflow.com/questions/18928217",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2793006/"
] | `ArrayList<?>` simply means "any type." In other words, any type of `ArrayList` can be assigned to such variable. That could be `ArrayList<Integers>`, `ArrayList<JButton>` or anything else. Using the wildcard alone, without the keyword super (followed by a type), means that you cannot **ADD** anything to the list defin... | ```
ArrayList list = new ArrayList();
```
This the non-parameterized container that predates java generics. Objects read out of it usually have to be cast to get what you want.
```
ArrayList<String> list = new ArrayList<String>();
```
Here we we specified that the container holds String objects. No casting is need... |
18,928,217 | I have written a script that is supposed to open up pages, then print them. I had set it up to run a sleep delay to allow the new page to pop up. However, the pages are not loading in a predictable time.
As the pages are loading, there is a message at the bottom of the window that the page is Loading. Once it is loa... | 2013/09/21 | [
"https://Stackoverflow.com/questions/18928217",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2793006/"
] | `ArrayList<?>` simply means "any type." In other words, any type of `ArrayList` can be assigned to such variable. That could be `ArrayList<Integers>`, `ArrayList<JButton>` or anything else. Using the wildcard alone, without the keyword super (followed by a type), means that you cannot **ADD** anything to the list defin... | There is no difference in the behaviour.
The real difference is in the way that the compiler treats them. In the first case, you are telling the compiler "treat this as a *raw* type" and don't try to do any generic static typing. In the second case, you are saying "treat this as a generic type" ... but that the actual... |
18,928,217 | I have written a script that is supposed to open up pages, then print them. I had set it up to run a sleep delay to allow the new page to pop up. However, the pages are not loading in a predictable time.
As the pages are loading, there is a message at the bottom of the window that the page is Loading. Once it is loa... | 2013/09/21 | [
"https://Stackoverflow.com/questions/18928217",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2793006/"
] | ```
ArrayList list = new ArrayList();
```
We are declaring an array list that can accept any type of objects.
For example:
```
list.add(new Dog());
list.add(new Person());
list.add("Test");
```
For `ArrayList<?> list = new ArrayList();`
We are declaring an array list using generics that can accept any object usi... | ArrayList < ? > means array list of type unknown. it is called a wildcard type.
Using the wild card, the following occurs
```
Collection<?> c = new ArrayList<String>();
c.add(new Object()); // Compile time error
```
Without the wildcard you can add whatever you like to your array |
18,928,217 | I have written a script that is supposed to open up pages, then print them. I had set it up to run a sleep delay to allow the new page to pop up. However, the pages are not loading in a predictable time.
As the pages are loading, there is a message at the bottom of the window that the page is Loading. Once it is loa... | 2013/09/21 | [
"https://Stackoverflow.com/questions/18928217",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2793006/"
] | ```
ArrayList list = new ArrayList();
```
We are declaring an array list that can accept any type of objects.
For example:
```
list.add(new Dog());
list.add(new Person());
list.add("Test");
```
For `ArrayList<?> list = new ArrayList();`
We are declaring an array list using generics that can accept any object usi... | ```
ArrayList list = new ArrayList();
```
This the non-parameterized container that predates java generics. Objects read out of it usually have to be cast to get what you want.
```
ArrayList<String> list = new ArrayList<String>();
```
Here we we specified that the container holds String objects. No casting is need... |
18,928,217 | I have written a script that is supposed to open up pages, then print them. I had set it up to run a sleep delay to allow the new page to pop up. However, the pages are not loading in a predictable time.
As the pages are loading, there is a message at the bottom of the window that the page is Loading. Once it is loa... | 2013/09/21 | [
"https://Stackoverflow.com/questions/18928217",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2793006/"
] | ```
ArrayList list = new ArrayList();
```
We are declaring an array list that can accept any type of objects.
For example:
```
list.add(new Dog());
list.add(new Person());
list.add("Test");
```
For `ArrayList<?> list = new ArrayList();`
We are declaring an array list using generics that can accept any object usi... | There is no difference in the behaviour.
The real difference is in the way that the compiler treats them. In the first case, you are telling the compiler "treat this as a *raw* type" and don't try to do any generic static typing. In the second case, you are saying "treat this as a generic type" ... but that the actual... |
18,928,217 | I have written a script that is supposed to open up pages, then print them. I had set it up to run a sleep delay to allow the new page to pop up. However, the pages are not loading in a predictable time.
As the pages are loading, there is a message at the bottom of the window that the page is Loading. Once it is loa... | 2013/09/21 | [
"https://Stackoverflow.com/questions/18928217",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2793006/"
] | ```
ArrayList list = new ArrayList();
```
This the non-parameterized container that predates java generics. Objects read out of it usually have to be cast to get what you want.
```
ArrayList<String> list = new ArrayList<String>();
```
Here we we specified that the container holds String objects. No casting is need... | ArrayList < ? > means array list of type unknown. it is called a wildcard type.
Using the wild card, the following occurs
```
Collection<?> c = new ArrayList<String>();
c.add(new Object()); // Compile time error
```
Without the wildcard you can add whatever you like to your array |
18,928,217 | I have written a script that is supposed to open up pages, then print them. I had set it up to run a sleep delay to allow the new page to pop up. However, the pages are not loading in a predictable time.
As the pages are loading, there is a message at the bottom of the window that the page is Loading. Once it is loa... | 2013/09/21 | [
"https://Stackoverflow.com/questions/18928217",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2793006/"
] | There is no difference in the behaviour.
The real difference is in the way that the compiler treats them. In the first case, you are telling the compiler "treat this as a *raw* type" and don't try to do any generic static typing. In the second case, you are saying "treat this as a generic type" ... but that the actual... | ArrayList < ? > means array list of type unknown. it is called a wildcard type.
Using the wild card, the following occurs
```
Collection<?> c = new ArrayList<String>();
c.add(new Object()); // Compile time error
```
Without the wildcard you can add whatever you like to your array |
250,191 | I have written a plugin for my own site where I have an issue like "after user login to the site if he logout then again if he clicks on browser back button then the previous page showing again instead of login page". Iam trying the below code but it doesn't work.
```
<script>
window.onhashchange = function() {
... | 2016/12/23 | [
"https://wordpress.stackexchange.com/questions/250191",
"https://wordpress.stackexchange.com",
"https://wordpress.stackexchange.com/users/106542/"
] | There's a [**trash post**](https://codex.wordpress.org/Plugin_API/Action_Reference/trash_post) hook
```
add_action( 'trash_post', 'my_func' );
function my_func( $postid ){
// We check if the global post type isn't ours and just return
global $post_type;
if ( $post_type != 'my_custom_post_type' ) return... | if you want to to catch it when user delete( means click trash on post)
then possible solution is to use **trash\_post** hook
```
add_action( 'trash_post', 'my_func_before_trash',999,1);
function my_func_before_trash($postid){
//my custom code
}
``` |
40,456,330 | I am trying to set an accordion in multiple tables.
Once user clicks on a `<tr>`, another table shows at the bottom.
HTML
----
```
<table class="table m-0 stocks" border="0" cellspacing="0" cellpadding="0">
<thead>
<tr>
<th>#</th>
<th>First Name</th>
<th>Last Name</th>
<th>Username</... | 2016/11/07 | [
"https://Stackoverflow.com/questions/40456330",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6892684/"
] | The reason the 2nd block of code (1st Swift example) prevents you from changing the value of `name` is because in Swift 3, all parameters are constants. In other words they are essentially all declared with `let`.
Imagine your first Swift example as:
```
func greet(let name: String) {
name = "Ardvark"
print(nam... | In the `func greet(name: String) {}` function `name` is a constant, actually it looks like `func greet(let name: String) {}` so you can't modify it. Let add a new variable and assign value of `name` to it:
```
func greet(name: String) {
var newName = name
newName = "Ardvark"
print(newName)
}
``` |
40,456,330 | I am trying to set an accordion in multiple tables.
Once user clicks on a `<tr>`, another table shows at the bottom.
HTML
----
```
<table class="table m-0 stocks" border="0" cellspacing="0" cellpadding="0">
<thead>
<tr>
<th>#</th>
<th>First Name</th>
<th>Last Name</th>
<th>Username</... | 2016/11/07 | [
"https://Stackoverflow.com/questions/40456330",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6892684/"
] | The reason the 2nd block of code (1st Swift example) prevents you from changing the value of `name` is because in Swift 3, all parameters are constants. In other words they are essentially all declared with `let`.
Imagine your first Swift example as:
```
func greet(let name: String) {
name = "Ardvark"
print(nam... | Just read some of the Swift docs. Came to two conclusions.
(1) By default, parameters in Swift are CONSTANTS, so it's as if there is a let keyword before the parameter. Meaning inside the function, the parameter value cannot be changed, or an error will be thrown.
(2) Changing your function to an 'inout' function cha... |
40,456,330 | I am trying to set an accordion in multiple tables.
Once user clicks on a `<tr>`, another table shows at the bottom.
HTML
----
```
<table class="table m-0 stocks" border="0" cellspacing="0" cellpadding="0">
<thead>
<tr>
<th>#</th>
<th>First Name</th>
<th>Last Name</th>
<th>Username</... | 2016/11/07 | [
"https://Stackoverflow.com/questions/40456330",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6892684/"
] | In the `func greet(name: String) {}` function `name` is a constant, actually it looks like `func greet(let name: String) {}` so you can't modify it. Let add a new variable and assign value of `name` to it:
```
func greet(name: String) {
var newName = name
newName = "Ardvark"
print(newName)
}
``` | Just read some of the Swift docs. Came to two conclusions.
(1) By default, parameters in Swift are CONSTANTS, so it's as if there is a let keyword before the parameter. Meaning inside the function, the parameter value cannot be changed, or an error will be thrown.
(2) Changing your function to an 'inout' function cha... |
133,728 | I'm making a simple test to force a transaction to be reverted, but it just doesn't happen.
I have this function where I intend to limit the `gas` to just 1.
```
contract MyContract {
constructor() payable {}
function pleaseFail(uint256 _guess) public {
(bool sent, ) = msg.sender.call{value: 0.1 ethe... | 2022/08/16 | [
"https://ethereum.stackexchange.com/questions/133728",
"https://ethereum.stackexchange.com",
"https://ethereum.stackexchange.com/users/86152/"
] | Please send the value slightly greater than `0.1` ether and also you have `ff.deploy` where it should be `FF.deploy` and please use assert statements to make sure it behaves as you wish. | ```
it("Should fail", async function () {
const FF = await ethers.getContractFactory("MyContract");
const _f = await FF.deploy({ value: utils.parseEther("0.1") });
await _f.deployed();
await _f.pleaseFail(7);
/*await expect(_f.pleaseFail(7)).revertWith('Failed do send ether'... |
43,932,424 | My Sublime 3 Text Editor looks like this, with 2 panels and no open files. The files I open are shown only in the right part, the left remains empty even when I open multiple files.
[](https://i.stack.imgur.com/Ny1ht.png) | 2017/05/12 | [
"https://Stackoverflow.com/questions/43932424",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7970195/"
] | try to do this
view -> layout -> single | Go to sublime text view>layout click on single |
1,808,994 | So here is the story. I have this device that uses Linux and more open source tools(btw its an **ARM**). And I was given the task of creating some magic cashier application with it.
I have done it and now my boss have made a new request. He wants me to make that stuff(the device) connect to a remote database(preferabl... | 2009/11/27 | [
"https://Stackoverflow.com/questions/1808994",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/212112/"
] | Erm... is there an instant-client (or any Oracle client) for Linux+ARM at all? I don't see one on the downloads page.
If not, you will have to use ODBC, or another database that has an open-source client you can compile. | Well i'm pretty sure that you'd need the windows version of the Oracle Client if you're running on a windows machine. |
1,808,994 | So here is the story. I have this device that uses Linux and more open source tools(btw its an **ARM**). And I was given the task of creating some magic cashier application with it.
I have done it and now my boss have made a new request. He wants me to make that stuff(the device) connect to a remote database(preferabl... | 2009/11/27 | [
"https://Stackoverflow.com/questions/1808994",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/212112/"
] | If you do not have ARM versions of the Oracle library, you're totally out of luck there and would need to get one (perhaps there is a free driver?) or implement the wire protocol manually. | Erm... is there an instant-client (or any Oracle client) for Linux+ARM at all? I don't see one on the downloads page.
If not, you will have to use ODBC, or another database that has an open-source client you can compile. |
1,808,994 | So here is the story. I have this device that uses Linux and more open source tools(btw its an **ARM**). And I was given the task of creating some magic cashier application with it.
I have done it and now my boss have made a new request. He wants me to make that stuff(the device) connect to a remote database(preferabl... | 2009/11/27 | [
"https://Stackoverflow.com/questions/1808994",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/212112/"
] | Erm... is there an instant-client (or any Oracle client) for Linux+ARM at all? I don't see one on the downloads page.
If not, you will have to use ODBC, or another database that has an open-source client you can compile. | 1. You need to move the `-L` arguments before the `-l` arguments.
2. You'll need ARM libraries to run on the device, not x86 libraries, no idea if Oracle provides those.
3. You probably don't want to have the device directly accessing the database. It would be better to stick a middle-tier server in the stack, and have... |
1,808,994 | So here is the story. I have this device that uses Linux and more open source tools(btw its an **ARM**). And I was given the task of creating some magic cashier application with it.
I have done it and now my boss have made a new request. He wants me to make that stuff(the device) connect to a remote database(preferabl... | 2009/11/27 | [
"https://Stackoverflow.com/questions/1808994",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/212112/"
] | How about using java with a jdbc-driver ? Oracle-thin-driver is pure-java so it should work on arm. If you cannot write a pure java-app and need to use other libraries on your arm-device, you can use JNI-calls from java to use native-arm libraries. | Your best chances are either to use Java and the JDBC driver, as suggested by tjin, or completely forget the idea of directly connecting to the database; create a web service on the server and use that instead. |
1,808,994 | So here is the story. I have this device that uses Linux and more open source tools(btw its an **ARM**). And I was given the task of creating some magic cashier application with it.
I have done it and now my boss have made a new request. He wants me to make that stuff(the device) connect to a remote database(preferabl... | 2009/11/27 | [
"https://Stackoverflow.com/questions/1808994",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/212112/"
] | If you do not have ARM versions of the Oracle library, you're totally out of luck there and would need to get one (perhaps there is a free driver?) or implement the wire protocol manually. | Well i'm pretty sure that you'd need the windows version of the Oracle Client if you're running on a windows machine. |
1,808,994 | So here is the story. I have this device that uses Linux and more open source tools(btw its an **ARM**). And I was given the task of creating some magic cashier application with it.
I have done it and now my boss have made a new request. He wants me to make that stuff(the device) connect to a remote database(preferabl... | 2009/11/27 | [
"https://Stackoverflow.com/questions/1808994",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/212112/"
] | How about using java with a jdbc-driver ? Oracle-thin-driver is pure-java so it should work on arm. If you cannot write a pure java-app and need to use other libraries on your arm-device, you can use JNI-calls from java to use native-arm libraries. | Well i'm pretty sure that you'd need the windows version of the Oracle Client if you're running on a windows machine. |
1,808,994 | So here is the story. I have this device that uses Linux and more open source tools(btw its an **ARM**). And I was given the task of creating some magic cashier application with it.
I have done it and now my boss have made a new request. He wants me to make that stuff(the device) connect to a remote database(preferabl... | 2009/11/27 | [
"https://Stackoverflow.com/questions/1808994",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/212112/"
] | If you do not have ARM versions of the Oracle library, you're totally out of luck there and would need to get one (perhaps there is a free driver?) or implement the wire protocol manually. | Your best chances are either to use Java and the JDBC driver, as suggested by tjin, or completely forget the idea of directly connecting to the database; create a web service on the server and use that instead. |
1,808,994 | So here is the story. I have this device that uses Linux and more open source tools(btw its an **ARM**). And I was given the task of creating some magic cashier application with it.
I have done it and now my boss have made a new request. He wants me to make that stuff(the device) connect to a remote database(preferabl... | 2009/11/27 | [
"https://Stackoverflow.com/questions/1808994",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/212112/"
] | If you do not have ARM versions of the Oracle library, you're totally out of luck there and would need to get one (perhaps there is a free driver?) or implement the wire protocol manually. | 1. You need to move the `-L` arguments before the `-l` arguments.
2. You'll need ARM libraries to run on the device, not x86 libraries, no idea if Oracle provides those.
3. You probably don't want to have the device directly accessing the database. It would be better to stick a middle-tier server in the stack, and have... |
1,808,994 | So here is the story. I have this device that uses Linux and more open source tools(btw its an **ARM**). And I was given the task of creating some magic cashier application with it.
I have done it and now my boss have made a new request. He wants me to make that stuff(the device) connect to a remote database(preferabl... | 2009/11/27 | [
"https://Stackoverflow.com/questions/1808994",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/212112/"
] | How about using java with a jdbc-driver ? Oracle-thin-driver is pure-java so it should work on arm. If you cannot write a pure java-app and need to use other libraries on your arm-device, you can use JNI-calls from java to use native-arm libraries. | 1. You need to move the `-L` arguments before the `-l` arguments.
2. You'll need ARM libraries to run on the device, not x86 libraries, no idea if Oracle provides those.
3. You probably don't want to have the device directly accessing the database. It would be better to stick a middle-tier server in the stack, and have... |
1,808,994 | So here is the story. I have this device that uses Linux and more open source tools(btw its an **ARM**). And I was given the task of creating some magic cashier application with it.
I have done it and now my boss have made a new request. He wants me to make that stuff(the device) connect to a remote database(preferabl... | 2009/11/27 | [
"https://Stackoverflow.com/questions/1808994",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/212112/"
] | Erm... is there an instant-client (or any Oracle client) for Linux+ARM at all? I don't see one on the downloads page.
If not, you will have to use ODBC, or another database that has an open-source client you can compile. | Your best chances are either to use Java and the JDBC driver, as suggested by tjin, or completely forget the idea of directly connecting to the database; create a web service on the server and use that instead. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.