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 |
|---|---|---|---|---|---|
64,366,504 | I have records that relate to the location of an RFID tagged asset within a building. The records have start and end timestamps and the location where the asset was between those 2 timestamps.
```html
<table>
<tr>
<td>ZONEID</td>
<td>MACADDRESS</td>
<td>START_TS</td>
<td>END_TS</td>
</tr>
<tr>
... | 2020/10/15 | [
"https://Stackoverflow.com/questions/64366504",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14371648/"
] | For me that was happening while I had an widget instead of sliver in `CustomScrollView` | If still anyone getting this error I solved mine by adding
WidgetsFlutterBinding.ensureInitialized() before runApp function.
```
void main() {
WidgetsFlutterBinding.ensureInitialized();
runApp(const App());
}
``` |
64,366,504 | I have records that relate to the location of an RFID tagged asset within a building. The records have start and end timestamps and the location where the asset was between those 2 timestamps.
```html
<table>
<tr>
<td>ZONEID</td>
<td>MACADDRESS</td>
<td>START_TS</td>
<td>END_TS</td>
</tr>
<tr>
... | 2020/10/15 | [
"https://Stackoverflow.com/questions/64366504",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14371648/"
] | If you are using Hive (<https://pub.dev/packages/hive>), it could come from the fact that you used the wrong type `T` when calling `await Hive.openBox<T>("boxName")`.
(Took me so long to figure out, so hopefully this can save you some time, maybe even to future me lol) | My issue: I had two classes with the same name. Removing one of them fixed the issue for me β
|
64,366,504 | I have records that relate to the location of an RFID tagged asset within a building. The records have start and end timestamps and the location where the asset was between those 2 timestamps.
```html
<table>
<tr>
<td>ZONEID</td>
<td>MACADDRESS</td>
<td>START_TS</td>
<td>END_TS</td>
</tr>
<tr>
... | 2020/10/15 | [
"https://Stackoverflow.com/questions/64366504",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14371648/"
] | I just had a similiar error:
```
ββββββββ Exception caught by widgets library βββββββββββββββββββββββββββββββββββ
The following StackOverflowError was thrown building Container:
Stack Overflow
The relevant error-causing widget was
Container
lib/widgets/profile_wiget.dart:9
When the exception was thrown, this was the ... | Are you using FirebaseMessaging? If so, it could be a conflict of advance\_pdf\_viewer with onBackgroundMessage of FirebaseMessaging. |
64,366,504 | I have records that relate to the location of an RFID tagged asset within a building. The records have start and end timestamps and the location where the asset was between those 2 timestamps.
```html
<table>
<tr>
<td>ZONEID</td>
<td>MACADDRESS</td>
<td>START_TS</td>
<td>END_TS</td>
</tr>
<tr>
... | 2020/10/15 | [
"https://Stackoverflow.com/questions/64366504",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14371648/"
] | I just had a similiar error:
```
ββββββββ Exception caught by widgets library βββββββββββββββββββββββββββββββββββ
The following StackOverflowError was thrown building Container:
Stack Overflow
The relevant error-causing widget was
Container
lib/widgets/profile_wiget.dart:9
When the exception was thrown, this was the ... | If still anyone getting this error I solved mine by adding
WidgetsFlutterBinding.ensureInitialized() before runApp function.
```
void main() {
WidgetsFlutterBinding.ensureInitialized();
runApp(const App());
}
``` |
64,366,504 | I have records that relate to the location of an RFID tagged asset within a building. The records have start and end timestamps and the location where the asset was between those 2 timestamps.
```html
<table>
<tr>
<td>ZONEID</td>
<td>MACADDRESS</td>
<td>START_TS</td>
<td>END_TS</td>
</tr>
<tr>
... | 2020/10/15 | [
"https://Stackoverflow.com/questions/64366504",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14371648/"
] | For me that was happening while I had an widget instead of sliver in `CustomScrollView` | My issue: I had two classes with the same name. Removing one of them fixed the issue for me β
|
64,366,504 | I have records that relate to the location of an RFID tagged asset within a building. The records have start and end timestamps and the location where the asset was between those 2 timestamps.
```html
<table>
<tr>
<td>ZONEID</td>
<td>MACADDRESS</td>
<td>START_TS</td>
<td>END_TS</td>
</tr>
<tr>
... | 2020/10/15 | [
"https://Stackoverflow.com/questions/64366504",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14371648/"
] | I just had a similiar error:
```
ββββββββ Exception caught by widgets library βββββββββββββββββββββββββββββββββββ
The following StackOverflowError was thrown building Container:
Stack Overflow
The relevant error-causing widget was
Container
lib/widgets/profile_wiget.dart:9
When the exception was thrown, this was the ... | Yes! There is a conflict with `advance_pdf_viewer` only if you are using Firebase Cloud Messaging Service's Background Message handler.
For example if you have something like :
```
Future<void> initNotifs() async {
FirebaseMessaging.onMessage.listen((RemoteMessage message) async {
print("onMessage: $message... |
64,366,504 | I have records that relate to the location of an RFID tagged asset within a building. The records have start and end timestamps and the location where the asset was between those 2 timestamps.
```html
<table>
<tr>
<td>ZONEID</td>
<td>MACADDRESS</td>
<td>START_TS</td>
<td>END_TS</td>
</tr>
<tr>
... | 2020/10/15 | [
"https://Stackoverflow.com/questions/64366504",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14371648/"
] | For me that was happening while I had an widget instead of sliver in `CustomScrollView` | I solved this issue by changing the name of one of my Stateless widget.
Be Very Careful while making the name of your widget, If you make any two widgets with the same name unconsciously then you will get this type of error.
Make sure to assign the name of widget that are relevant to it so that you will not get this ... |
64,366,504 | I have records that relate to the location of an RFID tagged asset within a building. The records have start and end timestamps and the location where the asset was between those 2 timestamps.
```html
<table>
<tr>
<td>ZONEID</td>
<td>MACADDRESS</td>
<td>START_TS</td>
<td>END_TS</td>
</tr>
<tr>
... | 2020/10/15 | [
"https://Stackoverflow.com/questions/64366504",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14371648/"
] | If still anyone getting this error I solved mine by adding
WidgetsFlutterBinding.ensureInitialized() before runApp function.
```
void main() {
WidgetsFlutterBinding.ensureInitialized();
runApp(const App());
}
``` | My issue: I had two classes with the same name. Removing one of them fixed the issue for me β
|
64,366,504 | I have records that relate to the location of an RFID tagged asset within a building. The records have start and end timestamps and the location where the asset was between those 2 timestamps.
```html
<table>
<tr>
<td>ZONEID</td>
<td>MACADDRESS</td>
<td>START_TS</td>
<td>END_TS</td>
</tr>
<tr>
... | 2020/10/15 | [
"https://Stackoverflow.com/questions/64366504",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14371648/"
] | I had the same issue and the problem was I had called the class inside the same class. See the body: below. Replacing it with another widget fixed the issue.
```
class DicePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaf... | I solved this issue by changing the name of one of my Stateless widget.
Be Very Careful while making the name of your widget, If you make any two widgets with the same name unconsciously then you will get this type of error.
Make sure to assign the name of widget that are relevant to it so that you will not get this ... |
12,768,811 | Validating a tridion TCM ID using Regex on javascript, looks quiet simple but unfortunately I failed to do this.
I have attempted all the possible ways to validate a tcm id.
Below is the last tried regex:-
```
(tcm:(\d)+-(\d)+(-16|-4|-64))\W
```
Here, `TCM ID` can be `component` or `SG` or `Page`.
Valid tcm id's... | 2012/10/07 | [
"https://Stackoverflow.com/questions/12768811",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/500725/"
] | Try:
```
/^tcm:\d{3}-\d{4}(?:-16|-4|-64)?$/
``` | I used this in c# to validate a Tcm Uri (and I believe this is also how `TcmUri.IsValid()` is doing it)
```cs
"^tcm:(?<pubId>[0-9]+)-(?<itemId>[0-9]+)(-(?<itemType>[0-9]+))?(-v(?<version>[0-9]+))?$"
```
If you want to validate that it is a page or a component, then itemType should be empty, 16 or 64. |
12,768,811 | Validating a tridion TCM ID using Regex on javascript, looks quiet simple but unfortunately I failed to do this.
I have attempted all the possible ways to validate a tcm id.
Below is the last tried regex:-
```
(tcm:(\d)+-(\d)+(-16|-4|-64))\W
```
Here, `TCM ID` can be `component` or `SG` or `Page`.
Valid tcm id's... | 2012/10/07 | [
"https://Stackoverflow.com/questions/12768811",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/500725/"
] | Try:
```
/^tcm:\d{3}-\d{4}(?:-16|-4|-64)?$/
``` | The regex xdazz provided is great for matching the examples you gave. But for more generic handling you might want to:
1. remove the exact cardinalities from, since there may be more or fewer digits in each of the numbers. So `/^tcm:\d+-\d+(?:-16|-4|-64)?$/`
2. consider if you want to match every item type and if so, ... |
13,867,558 | I receive the following error when trying to run the new project per the instruction in the Readme file.
1: querying Todos
2: Query failed: The action 'Todos' on controller 'BreezeSample' with return type 'System.Collections.Generic.List`1[[MyTasks.Api.Models.BreezeSampleTodoItem, MyTasks.Api, Version=1.0.0.0, Cultur... | 2012/12/13 | [
"https://Stackoverflow.com/questions/13867558",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/142248/"
] | **UPDATE: December 15**
The critical piece of information ... the reason for the problem ... is the use of the **pre-release SPA template**.
That template is not the same as the MVC 4 **Web API** or **Empty** templates that are described in the Breeze documentation
The **SPA Template** and the MVC update include th... | The sample from NuGet is set up to drop and re-create the database every time you run the code. Do you happen to have the database open in a SQL Management Studio? I ran into this as well.
Take a look at the BreezeSampleDatabaseInitializer class. Check out the comment that talks about preserving the changes between s... |
4,198,908 | So, I have a string of 13 characters.
```
string str = "HELLOWORLDZZZ";
```
and I need to store this as ASCII representation (hex) in a uint variable. How do I do this? | 2010/11/16 | [
"https://Stackoverflow.com/questions/4198908",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/396077/"
] | You can use [`Encoding.ASCII`](http://msdn.microsoft.com/en-us/library/system.text.encoding.ascii)`.`[`GetBytes`](http://msdn.microsoft.com/en-us/library/system.text.encoding.getbytes) to convert your string to a `byte` array with ASCII encoding (each character taking one `byte`). Then, call [`BitConverter.ToUInt32`](h... | ```
uint.Parse(hexString, System.Globalization.NumberStyles.HexNumber);
``` |
4,198,908 | So, I have a string of 13 characters.
```
string str = "HELLOWORLDZZZ";
```
and I need to store this as ASCII representation (hex) in a uint variable. How do I do this? | 2010/11/16 | [
"https://Stackoverflow.com/questions/4198908",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/396077/"
] | ```
uint.Parse(hexString, System.Globalization.NumberStyles.HexNumber);
``` | Now I guess I understand what you want in a comment on bdukes answer.
If you want the `hex` code for each character in the string you can get it using LINQ.
```
var str = "ABCD";
var hex = str.Select(c => ((int)c).ToString("X"))
.Aggregate(String.Empty, (x, y) => x + y);
```
`hex` will be a string `41424344` |
4,198,908 | So, I have a string of 13 characters.
```
string str = "HELLOWORLDZZZ";
```
and I need to store this as ASCII representation (hex) in a uint variable. How do I do this? | 2010/11/16 | [
"https://Stackoverflow.com/questions/4198908",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/396077/"
] | I think this is the method you want
```
Convert.ToUInt32(yourHexNumber, 16);
```
see the documentation [here](http://msdn.microsoft.com/en-us/library/swz6z5ks%28v=VS.90%29.aspx). | This will convert your `string` (with a Base 16 representation) to a `uint`.
```
uint val = Convert.ToUInt32(str, 16);
``` |
4,198,908 | So, I have a string of 13 characters.
```
string str = "HELLOWORLDZZZ";
```
and I need to store this as ASCII representation (hex) in a uint variable. How do I do this? | 2010/11/16 | [
"https://Stackoverflow.com/questions/4198908",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/396077/"
] | I think this is the method you want
```
Convert.ToUInt32(yourHexNumber, 16);
```
see the documentation [here](http://msdn.microsoft.com/en-us/library/swz6z5ks%28v=VS.90%29.aspx). | ```
uint.Parse(hexString, System.Globalization.NumberStyles.HexNumber);
``` |
4,198,908 | So, I have a string of 13 characters.
```
string str = "HELLOWORLDZZZ";
```
and I need to store this as ASCII representation (hex) in a uint variable. How do I do this? | 2010/11/16 | [
"https://Stackoverflow.com/questions/4198908",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/396077/"
] | You can use [`Encoding.ASCII`](http://msdn.microsoft.com/en-us/library/system.text.encoding.ascii)`.`[`GetBytes`](http://msdn.microsoft.com/en-us/library/system.text.encoding.getbytes) to convert your string to a `byte` array with ASCII encoding (each character taking one `byte`). Then, call [`BitConverter.ToUInt32`](h... | I think this is the method you want
```
Convert.ToUInt32(yourHexNumber, 16);
```
see the documentation [here](http://msdn.microsoft.com/en-us/library/swz6z5ks%28v=VS.90%29.aspx). |
4,198,908 | So, I have a string of 13 characters.
```
string str = "HELLOWORLDZZZ";
```
and I need to store this as ASCII representation (hex) in a uint variable. How do I do this? | 2010/11/16 | [
"https://Stackoverflow.com/questions/4198908",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/396077/"
] | You can use [`Encoding.ASCII`](http://msdn.microsoft.com/en-us/library/system.text.encoding.ascii)`.`[`GetBytes`](http://msdn.microsoft.com/en-us/library/system.text.encoding.getbytes) to convert your string to a `byte` array with ASCII encoding (each character taking one `byte`). Then, call [`BitConverter.ToUInt32`](h... | Now I guess I understand what you want in a comment on bdukes answer.
If you want the `hex` code for each character in the string you can get it using LINQ.
```
var str = "ABCD";
var hex = str.Select(c => ((int)c).ToString("X"))
.Aggregate(String.Empty, (x, y) => x + y);
```
`hex` will be a string `41424344` |
4,198,908 | So, I have a string of 13 characters.
```
string str = "HELLOWORLDZZZ";
```
and I need to store this as ASCII representation (hex) in a uint variable. How do I do this? | 2010/11/16 | [
"https://Stackoverflow.com/questions/4198908",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/396077/"
] | You can use [`Encoding.ASCII`](http://msdn.microsoft.com/en-us/library/system.text.encoding.ascii)`.`[`GetBytes`](http://msdn.microsoft.com/en-us/library/system.text.encoding.getbytes) to convert your string to a `byte` array with ASCII encoding (each character taking one `byte`). Then, call [`BitConverter.ToUInt32`](h... | See my comment, but if you want to just convert an ASCII string to Hex, which is what I suspect:
```
public string HexIt(string yourString)
{
string hex = "";
foreach (char c in yourString)
{
int tmp = c;
hex += String.Format("{0:x2}", (uint)System.Convert.ToUInt32(tmp.ToString()));
}
... |
4,198,908 | So, I have a string of 13 characters.
```
string str = "HELLOWORLDZZZ";
```
and I need to store this as ASCII representation (hex) in a uint variable. How do I do this? | 2010/11/16 | [
"https://Stackoverflow.com/questions/4198908",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/396077/"
] | You can use [`Encoding.ASCII`](http://msdn.microsoft.com/en-us/library/system.text.encoding.ascii)`.`[`GetBytes`](http://msdn.microsoft.com/en-us/library/system.text.encoding.getbytes) to convert your string to a `byte` array with ASCII encoding (each character taking one `byte`). Then, call [`BitConverter.ToUInt32`](h... | This will convert your `string` (with a Base 16 representation) to a `uint`.
```
uint val = Convert.ToUInt32(str, 16);
``` |
4,198,908 | So, I have a string of 13 characters.
```
string str = "HELLOWORLDZZZ";
```
and I need to store this as ASCII representation (hex) in a uint variable. How do I do this? | 2010/11/16 | [
"https://Stackoverflow.com/questions/4198908",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/396077/"
] | I think this is the method you want
```
Convert.ToUInt32(yourHexNumber, 16);
```
see the documentation [here](http://msdn.microsoft.com/en-us/library/swz6z5ks%28v=VS.90%29.aspx). | Now I guess I understand what you want in a comment on bdukes answer.
If you want the `hex` code for each character in the string you can get it using LINQ.
```
var str = "ABCD";
var hex = str.Select(c => ((int)c).ToString("X"))
.Aggregate(String.Empty, (x, y) => x + y);
```
`hex` will be a string `41424344` |
4,198,908 | So, I have a string of 13 characters.
```
string str = "HELLOWORLDZZZ";
```
and I need to store this as ASCII representation (hex) in a uint variable. How do I do this? | 2010/11/16 | [
"https://Stackoverflow.com/questions/4198908",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/396077/"
] | See my comment, but if you want to just convert an ASCII string to Hex, which is what I suspect:
```
public string HexIt(string yourString)
{
string hex = "";
foreach (char c in yourString)
{
int tmp = c;
hex += String.Format("{0:x2}", (uint)System.Convert.ToUInt32(tmp.ToString()));
}
... | Now I guess I understand what you want in a comment on bdukes answer.
If you want the `hex` code for each character in the string you can get it using LINQ.
```
var str = "ABCD";
var hex = str.Select(c => ((int)c).ToString("X"))
.Aggregate(String.Empty, (x, y) => x + y);
```
`hex` will be a string `41424344` |
207,976 | I have table `mytable` as shown below
```
CREATE TABLE mytable( id, created_at, total_number )
AS VALUES
( 17330 , '2018-05-24 19:25:29'::timestamp, 26909 ),
( 46331 , '2018-05-25 00:57:34', 26914 ),
( 72131 , '2018-05-26 00:48:12', 26944 ),
( 102583 , '2018-05-27 00:53:50', ... | 2018/05/27 | [
"https://dba.stackexchange.com/questions/207976",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/148054/"
] | Another variation. Here the function `first_value` is used to get both the first and last total\_number (different directions):
```
select abs(lst - fst) as diff, number_of_rows
, abs(lst - fst) / number_of_rows as average
from (
select count(1) over () as number_of_rows
, first_value(total_number) ... | Select the `total_number` where `created_at` is the maximum or the minimum, respectively and subtract them to get the `difference`. For `number_of_rows` use `count()`. And `avg` just uses the previously built expressions in the arithmetic expression. It should look something like:
```
SELECT (SELECT mi.total_number
... |
207,976 | I have table `mytable` as shown below
```
CREATE TABLE mytable( id, created_at, total_number )
AS VALUES
( 17330 , '2018-05-24 19:25:29'::timestamp, 26909 ),
( 46331 , '2018-05-25 00:57:34', 26914 ),
( 72131 , '2018-05-26 00:48:12', 26944 ),
( 102583 , '2018-05-27 00:53:50', ... | 2018/05/27 | [
"https://dba.stackexchange.com/questions/207976",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/148054/"
] | >
> I would like to get total\_number difference between first and the last
>
>
>
My assumption is that there is no faster way to do this if you have a sufficiently large data set and an index on `created_at`
```
SELECT tmax.max - tmin.min AS diff,
tcount.cnt AS number_of_rows,
(tmax.max - tmin.min)::double p... | Select the `total_number` where `created_at` is the maximum or the minimum, respectively and subtract them to get the `difference`. For `number_of_rows` use `count()`. And `avg` just uses the previously built expressions in the arithmetic expression. It should look something like:
```
SELECT (SELECT mi.total_number
... |
207,976 | I have table `mytable` as shown below
```
CREATE TABLE mytable( id, created_at, total_number )
AS VALUES
( 17330 , '2018-05-24 19:25:29'::timestamp, 26909 ),
( 46331 , '2018-05-25 00:57:34', 26914 ),
( 72131 , '2018-05-26 00:48:12', 26944 ),
( 102583 , '2018-05-27 00:53:50', ... | 2018/05/27 | [
"https://dba.stackexchange.com/questions/207976",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/148054/"
] | Another variation. Here the function `first_value` is used to get both the first and last total\_number (different directions):
```
select abs(lst - fst) as diff, number_of_rows
, abs(lst - fst) / number_of_rows as average
from (
select count(1) over () as number_of_rows
, first_value(total_number) ... | I assume "first" and "last" value are defined by the `created_at` column. Your approach can be extended to use both sub-query and combine them into a single one:
```
with fvalue as (
-- get the first value and count the total number of rows
select id,
created_at,
total_number,
count(*)... |
207,976 | I have table `mytable` as shown below
```
CREATE TABLE mytable( id, created_at, total_number )
AS VALUES
( 17330 , '2018-05-24 19:25:29'::timestamp, 26909 ),
( 46331 , '2018-05-25 00:57:34', 26914 ),
( 72131 , '2018-05-26 00:48:12', 26944 ),
( 102583 , '2018-05-27 00:53:50', ... | 2018/05/27 | [
"https://dba.stackexchange.com/questions/207976",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/148054/"
] | >
> I would like to get total\_number difference between first and the last
>
>
>
My assumption is that there is no faster way to do this if you have a sufficiently large data set and an index on `created_at`
```
SELECT tmax.max - tmin.min AS diff,
tcount.cnt AS number_of_rows,
(tmax.max - tmin.min)::double p... | I assume "first" and "last" value are defined by the `created_at` column. Your approach can be extended to use both sub-query and combine them into a single one:
```
with fvalue as (
-- get the first value and count the total number of rows
select id,
created_at,
total_number,
count(*)... |
207,976 | I have table `mytable` as shown below
```
CREATE TABLE mytable( id, created_at, total_number )
AS VALUES
( 17330 , '2018-05-24 19:25:29'::timestamp, 26909 ),
( 46331 , '2018-05-25 00:57:34', 26914 ),
( 72131 , '2018-05-26 00:48:12', 26944 ),
( 102583 , '2018-05-27 00:53:50', ... | 2018/05/27 | [
"https://dba.stackexchange.com/questions/207976",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/148054/"
] | Another variation. Here the function `first_value` is used to get both the first and last total\_number (different directions):
```
select abs(lst - fst) as diff, number_of_rows
, abs(lst - fst) / number_of_rows as average
from (
select count(1) over () as number_of_rows
, first_value(total_number) ... | >
> I would like to get total\_number difference between first and the last
>
>
>
My assumption is that there is no faster way to do this if you have a sufficiently large data set and an index on `created_at`
```
SELECT tmax.max - tmin.min AS diff,
tcount.cnt AS number_of_rows,
(tmax.max - tmin.min)::double p... |
53,617,084 | I want to create a non-copyable allocator (in C++14) which just allocates a fixed memory block a `std::vector` can use. I want to prevent the allocator (and therefore also the vector) from being copyable to prevent the user from accidentally allocating memory. The allocator is only intended to be used with a `std::vect... | 2018/12/04 | [
"https://Stackoverflow.com/questions/53617084",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2934305/"
] | This is not possible. From [[container.requirements.general]/8](https://timsong-cpp.github.io/cppwp/container.requirements.general#8)
>
> [...] **All other constructors for these container types take a `const allocator_Βtype&` argument**. [βNote: If an invocation of a constructor uses the default value of an optiona... | According to the [requirements for an `Allocator` type](https://en.cppreference.com/w/cpp/named_req/Allocator) your allocator type needs to satisfy [`CopyConstructible`](https://en.cppreference.com/w/cpp/named_req/CopyConstructible) which means that you can't delete your copy con:
>
>
> ```
> A a1(a)
> A a1 = a
>
>... |
53,617,084 | I want to create a non-copyable allocator (in C++14) which just allocates a fixed memory block a `std::vector` can use. I want to prevent the allocator (and therefore also the vector) from being copyable to prevent the user from accidentally allocating memory. The allocator is only intended to be used with a `std::vect... | 2018/12/04 | [
"https://Stackoverflow.com/questions/53617084",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2934305/"
] | According to the [requirements for an `Allocator` type](https://en.cppreference.com/w/cpp/named_req/Allocator) your allocator type needs to satisfy [`CopyConstructible`](https://en.cppreference.com/w/cpp/named_req/CopyConstructible) which means that you can't delete your copy con:
>
>
> ```
> A a1(a)
> A a1 = a
>
>... | You said: *I want [...] to prevent the user from accidentally allocating memory.*
But the solution you propose *I want to prevent the allocator (and therefore also the vector) from being copyable* as said in other answers is not feasable. As it is written your question looks like an [XY problem](https://meta.stackexch... |
53,617,084 | I want to create a non-copyable allocator (in C++14) which just allocates a fixed memory block a `std::vector` can use. I want to prevent the allocator (and therefore also the vector) from being copyable to prevent the user from accidentally allocating memory. The allocator is only intended to be used with a `std::vect... | 2018/12/04 | [
"https://Stackoverflow.com/questions/53617084",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2934305/"
] | This is not possible. From [[container.requirements.general]/8](https://timsong-cpp.github.io/cppwp/container.requirements.general#8)
>
> [...] **All other constructors for these container types take a `const allocator_Βtype&` argument**. [βNote: If an invocation of a constructor uses the default value of an optiona... | You said: *I want [...] to prevent the user from accidentally allocating memory.*
But the solution you propose *I want to prevent the allocator (and therefore also the vector) from being copyable* as said in other answers is not feasable. As it is written your question looks like an [XY problem](https://meta.stackexch... |
76,259 | More specifically, I would like a verb that means to hold something with low value to oneself in a low opinion and/or to treat it as such.
I am looking for a verb that might fit into this sentence with the aforesaid meaning:
>
> IΒ Β **\_\_** Β Β this TV show.
>
>
>
Rather than saying:
>
> I *have a low opinion... | 2012/07/28 | [
"https://english.stackexchange.com/questions/76259",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/24168/"
] | I think [*loathe*](http://www.merriam-webster.com/dictionary/loathe) would work in your sentence. It means that you both detest and cannot tolerate something.
***loathe***
>
> to dislike greatly and often with disgust or intolerance: detest
>
>
> | There are many words which could fit that description. A few are...
1. Dislike
2. Abhor
3. Loathe
4. Hate
5. Detest
6. Condemn
7. Despise
In my opinion, the word "detest" best fits your description.
You could also say 'I believe this tv show is a waste' |
76,259 | More specifically, I would like a verb that means to hold something with low value to oneself in a low opinion and/or to treat it as such.
I am looking for a verb that might fit into this sentence with the aforesaid meaning:
>
> IΒ Β **\_\_** Β Β this TV show.
>
>
>
Rather than saying:
>
> I *have a low opinion... | 2012/07/28 | [
"https://english.stackexchange.com/questions/76259",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/24168/"
] | Though it's generally a more popular phrase in the UK than in in the rest of the English speaking world, "don't rate" works well here I think.
Ex. "I don't rate this TV show."
You should note that this isn't a very formal way of speaking, especially since the word "highly" is largely implied. It does fit naturally.... | While a verb was requested, I think nalply's suggestion of **disdain** is a good one:
**disdain** (noun) - a feeling of contempt for someone or something regarded as unworthy or inferior : scorn
I would say *"I have **disdain** for this TV show."* |
76,259 | More specifically, I would like a verb that means to hold something with low value to oneself in a low opinion and/or to treat it as such.
I am looking for a verb that might fit into this sentence with the aforesaid meaning:
>
> IΒ Β **\_\_** Β Β this TV show.
>
>
>
Rather than saying:
>
> I *have a low opinion... | 2012/07/28 | [
"https://english.stackexchange.com/questions/76259",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/24168/"
] | It turns out that the OED does attest a verb (and resulting noun) ***disesteem***. They suggest that it may be related to its French cognate *dΓ©sestimer* from the 16th century, or to the equivalent Italian version, *disestimare*. I get the feeling these were used more way back when than they are now.
The OED gives *to... | There are many words which could fit that description. A few are...
1. Dislike
2. Abhor
3. Loathe
4. Hate
5. Detest
6. Condemn
7. Despise
In my opinion, the word "detest" best fits your description.
You could also say 'I believe this tv show is a waste' |
76,259 | More specifically, I would like a verb that means to hold something with low value to oneself in a low opinion and/or to treat it as such.
I am looking for a verb that might fit into this sentence with the aforesaid meaning:
>
> IΒ Β **\_\_** Β Β this TV show.
>
>
>
Rather than saying:
>
> I *have a low opinion... | 2012/07/28 | [
"https://english.stackexchange.com/questions/76259",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/24168/"
] | It turns out that the OED does attest a verb (and resulting noun) ***disesteem***. They suggest that it may be related to its French cognate *dΓ©sestimer* from the 16th century, or to the equivalent Italian version, *disestimare*. I get the feeling these were used more way back when than they are now.
The OED gives *to... | A proper substitute for *having a low opinion* would be **belittle**:
>
> To make small
>
>
> To make (something or someone) out to be insignificant or unimportant
>
>
>
But in your sentence I doubt if it could act as a proper substitute while conveying the same meaning. Instead you could use one of the many sy... |
76,259 | More specifically, I would like a verb that means to hold something with low value to oneself in a low opinion and/or to treat it as such.
I am looking for a verb that might fit into this sentence with the aforesaid meaning:
>
> IΒ Β **\_\_** Β Β this TV show.
>
>
>
Rather than saying:
>
> I *have a low opinion... | 2012/07/28 | [
"https://english.stackexchange.com/questions/76259",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/24168/"
] | It turns out that the OED does attest a verb (and resulting noun) ***disesteem***. They suggest that it may be related to its French cognate *dΓ©sestimer* from the 16th century, or to the equivalent Italian version, *disestimare*. I get the feeling these were used more way back when than they are now.
The OED gives *to... | While a verb was requested, I think nalply's suggestion of **disdain** is a good one:
**disdain** (noun) - a feeling of contempt for someone or something regarded as unworthy or inferior : scorn
I would say *"I have **disdain** for this TV show."* |
76,259 | More specifically, I would like a verb that means to hold something with low value to oneself in a low opinion and/or to treat it as such.
I am looking for a verb that might fit into this sentence with the aforesaid meaning:
>
> IΒ Β **\_\_** Β Β this TV show.
>
>
>
Rather than saying:
>
> I *have a low opinion... | 2012/07/28 | [
"https://english.stackexchange.com/questions/76259",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/24168/"
] | I think [*loathe*](http://www.merriam-webster.com/dictionary/loathe) would work in your sentence. It means that you both detest and cannot tolerate something.
***loathe***
>
> to dislike greatly and often with disgust or intolerance: detest
>
>
> | "I *dislike* this TV show" is a good substitute for "I have a low opinion of it", but it doesn't really have the specific connotation of holding it of low value.
To *belittle* or *disparage* something implies not only that you hold it of low value, but also that you share that opinion with others.
To *despise* someth... |
76,259 | More specifically, I would like a verb that means to hold something with low value to oneself in a low opinion and/or to treat it as such.
I am looking for a verb that might fit into this sentence with the aforesaid meaning:
>
> IΒ Β **\_\_** Β Β this TV show.
>
>
>
Rather than saying:
>
> I *have a low opinion... | 2012/07/28 | [
"https://english.stackexchange.com/questions/76259",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/24168/"
] | It turns out that the OED does attest a verb (and resulting noun) ***disesteem***. They suggest that it may be related to its French cognate *dΓ©sestimer* from the 16th century, or to the equivalent Italian version, *disestimare*. I get the feeling these were used more way back when than they are now.
The OED gives *to... | I think [*loathe*](http://www.merriam-webster.com/dictionary/loathe) would work in your sentence. It means that you both detest and cannot tolerate something.
***loathe***
>
> to dislike greatly and often with disgust or intolerance: detest
>
>
> |
76,259 | More specifically, I would like a verb that means to hold something with low value to oneself in a low opinion and/or to treat it as such.
I am looking for a verb that might fit into this sentence with the aforesaid meaning:
>
> IΒ Β **\_\_** Β Β this TV show.
>
>
>
Rather than saying:
>
> I *have a low opinion... | 2012/07/28 | [
"https://english.stackexchange.com/questions/76259",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/24168/"
] | For OP's general definition of what he wants to convey, I like [disparage](http://www.google.co.uk/#hl=en&q=disparage&tbs=dfn:1&tbo=u&sa=X&ei=rjUUUIPhApKa1AXV94HQAw&sqi=2&ved=0CFMQkQ4&bav=on.2,or.r_gc.r_pw.r_qf.,cf.osb&fp=57e8b400932e467d&biw=1306&bih=905) *- to regard or represent as being of little worth*.
Being Bri... | While a verb was requested, I think nalply's suggestion of **disdain** is a good one:
**disdain** (noun) - a feeling of contempt for someone or something regarded as unworthy or inferior : scorn
I would say *"I have **disdain** for this TV show."* |
76,259 | More specifically, I would like a verb that means to hold something with low value to oneself in a low opinion and/or to treat it as such.
I am looking for a verb that might fit into this sentence with the aforesaid meaning:
>
> IΒ Β **\_\_** Β Β this TV show.
>
>
>
Rather than saying:
>
> I *have a low opinion... | 2012/07/28 | [
"https://english.stackexchange.com/questions/76259",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/24168/"
] | A proper substitute for *having a low opinion* would be **belittle**:
>
> To make small
>
>
> To make (something or someone) out to be insignificant or unimportant
>
>
>
But in your sentence I doubt if it could act as a proper substitute while conveying the same meaning. Instead you could use one of the many sy... | "I *dislike* this TV show" is a good substitute for "I have a low opinion of it", but it doesn't really have the specific connotation of holding it of low value.
To *belittle* or *disparage* something implies not only that you hold it of low value, but also that you share that opinion with others.
To *despise* someth... |
76,259 | More specifically, I would like a verb that means to hold something with low value to oneself in a low opinion and/or to treat it as such.
I am looking for a verb that might fit into this sentence with the aforesaid meaning:
>
> IΒ Β **\_\_** Β Β this TV show.
>
>
>
Rather than saying:
>
> I *have a low opinion... | 2012/07/28 | [
"https://english.stackexchange.com/questions/76259",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/24168/"
] | Though it's generally a more popular phrase in the UK than in in the rest of the English speaking world, "don't rate" works well here I think.
Ex. "I don't rate this TV show."
You should note that this isn't a very formal way of speaking, especially since the word "highly" is largely implied. It does fit naturally.... | There are many words which could fit that description. A few are...
1. Dislike
2. Abhor
3. Loathe
4. Hate
5. Detest
6. Condemn
7. Despise
In my opinion, the word "detest" best fits your description.
You could also say 'I believe this tv show is a waste' |
19,086,192 | I have a JSON URL :: `http://54.218.73.244:7006/DescriptionSortedRating/`
**JSON STRUCT**::
```
"restaurants": [
{
"restaurantID": 4,
"restaurantNAME": "CopperChimney1",
"restaurantIMAGE": "MarkBoulevard1.jpg",
"restaurantDISTANCE": 15,
"restaurantTYPE": "Indian",
"restaurantRA... | 2013/09/30 | [
"https://Stackoverflow.com/questions/19086192",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | Most servers, including Apache Tomcat server, are configured to parameter encoding with `ISO-8859-1` by default. I think you won't change this unless you have a private dedicated server instance. So, the programmer's technique is to encode/decode those parameters manually. Because you are using javascript, there's `enc... | Are you testing the output using `System.out.println`? If so, it may be that it is not configured for UTF-8.
See this: [Can not send special characters (UTF-8) from JSP to Servlet: question marks displayed](https://stackoverflow.com/questions/7539590/can-not-send-special-characters-utf-8-from-jsp-to-servlet-question-... |
19,086,192 | I have a JSON URL :: `http://54.218.73.244:7006/DescriptionSortedRating/`
**JSON STRUCT**::
```
"restaurants": [
{
"restaurantID": 4,
"restaurantNAME": "CopperChimney1",
"restaurantIMAGE": "MarkBoulevard1.jpg",
"restaurantDISTANCE": 15,
"restaurantTYPE": "Indian",
"restaurantRA... | 2013/09/30 | [
"https://Stackoverflow.com/questions/19086192",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | Are you testing the output using `System.out.println`? If so, it may be that it is not configured for UTF-8.
See this: [Can not send special characters (UTF-8) from JSP to Servlet: question marks displayed](https://stackoverflow.com/questions/7539590/can-not-send-special-characters-utf-8-from-jsp-to-servlet-question-... | I have similar error and solve it use Servlet filter if you are using Spring, just add this definition to web.xml
```
<!-- CharacterEncodingFilter / UTF-8 -->
<filter>
<filter-name>encodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
... |
19,086,192 | I have a JSON URL :: `http://54.218.73.244:7006/DescriptionSortedRating/`
**JSON STRUCT**::
```
"restaurants": [
{
"restaurantID": 4,
"restaurantNAME": "CopperChimney1",
"restaurantIMAGE": "MarkBoulevard1.jpg",
"restaurantDISTANCE": 15,
"restaurantTYPE": "Indian",
"restaurantRA... | 2013/09/30 | [
"https://Stackoverflow.com/questions/19086192",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | Are you testing the output using `System.out.println`? If so, it may be that it is not configured for UTF-8.
See this: [Can not send special characters (UTF-8) from JSP to Servlet: question marks displayed](https://stackoverflow.com/questions/7539590/can-not-send-special-characters-utf-8-from-jsp-to-servlet-question-... | I would like to escale a comment from [f.khantsis](https://stackoverflow.com/users/356083/f-khantsis) to an answer, because it turned out to be important in my case.
>
> Important: make sure this filter is carried out FIRST, before any others, otherwise it won't work.
>
>
>
We had a correct encoding setting in ou... |
19,086,192 | I have a JSON URL :: `http://54.218.73.244:7006/DescriptionSortedRating/`
**JSON STRUCT**::
```
"restaurants": [
{
"restaurantID": 4,
"restaurantNAME": "CopperChimney1",
"restaurantIMAGE": "MarkBoulevard1.jpg",
"restaurantDISTANCE": 15,
"restaurantTYPE": "Indian",
"restaurantRA... | 2013/09/30 | [
"https://Stackoverflow.com/questions/19086192",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | Most servers, including Apache Tomcat server, are configured to parameter encoding with `ISO-8859-1` by default. I think you won't change this unless you have a private dedicated server instance. So, the programmer's technique is to encode/decode those parameters manually. Because you are using javascript, there's `enc... | I have similar error and solve it use Servlet filter if you are using Spring, just add this definition to web.xml
```
<!-- CharacterEncodingFilter / UTF-8 -->
<filter>
<filter-name>encodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
... |
19,086,192 | I have a JSON URL :: `http://54.218.73.244:7006/DescriptionSortedRating/`
**JSON STRUCT**::
```
"restaurants": [
{
"restaurantID": 4,
"restaurantNAME": "CopperChimney1",
"restaurantIMAGE": "MarkBoulevard1.jpg",
"restaurantDISTANCE": 15,
"restaurantTYPE": "Indian",
"restaurantRA... | 2013/09/30 | [
"https://Stackoverflow.com/questions/19086192",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | Most servers, including Apache Tomcat server, are configured to parameter encoding with `ISO-8859-1` by default. I think you won't change this unless you have a private dedicated server instance. So, the programmer's technique is to encode/decode those parameters manually. Because you are using javascript, there's `enc... | I would like to escale a comment from [f.khantsis](https://stackoverflow.com/users/356083/f-khantsis) to an answer, because it turned out to be important in my case.
>
> Important: make sure this filter is carried out FIRST, before any others, otherwise it won't work.
>
>
>
We had a correct encoding setting in ou... |
19,086,192 | I have a JSON URL :: `http://54.218.73.244:7006/DescriptionSortedRating/`
**JSON STRUCT**::
```
"restaurants": [
{
"restaurantID": 4,
"restaurantNAME": "CopperChimney1",
"restaurantIMAGE": "MarkBoulevard1.jpg",
"restaurantDISTANCE": 15,
"restaurantTYPE": "Indian",
"restaurantRA... | 2013/09/30 | [
"https://Stackoverflow.com/questions/19086192",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | I have similar error and solve it use Servlet filter if you are using Spring, just add this definition to web.xml
```
<!-- CharacterEncodingFilter / UTF-8 -->
<filter>
<filter-name>encodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
... | I would like to escale a comment from [f.khantsis](https://stackoverflow.com/users/356083/f-khantsis) to an answer, because it turned out to be important in my case.
>
> Important: make sure this filter is carried out FIRST, before any others, otherwise it won't work.
>
>
>
We had a correct encoding setting in ou... |
10,593,576 | ok i have this following codes
```
$from = "Asia/Manila";
$to = "UTC";
$org_time = new DateTime("2012-05-15 10:50:00");
$org_time = $org_time->format("Y-m-d H:i:s");
$conv_time = NULL;
$userTimezone = new DateTimeZone($from);
$gmtTimezone = new DateTimeZone($to);
$myDateTime = new DateTime($org_time, $gmtTimezone);
$... | 2012/05/15 | [
"https://Stackoverflow.com/questions/10593576",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/877819/"
] | You are making things way too hard. To convert between time zones, all you need to do is create a `DateTime` object with the proper source time zone, and then set the destination time zone via `setTimeZone()`.
```
$src_dt = '2012-05-15 10:50:00';
$src_tz = new DateTimeZone('Asia/Manila');
$dest_tz = new DateTimeZone(... | It looks like you need to subtract the offset instead of add it to me, from a quick glance at the results. It makes sense: say you're in GMT-5 and you want to convert your time to GMT. You wouldn't subtract 5 hours (time + offset), you would add 5 hours (time - offset). Granted, I am fairly tired, so I may be thinking ... |
10,593,576 | ok i have this following codes
```
$from = "Asia/Manila";
$to = "UTC";
$org_time = new DateTime("2012-05-15 10:50:00");
$org_time = $org_time->format("Y-m-d H:i:s");
$conv_time = NULL;
$userTimezone = new DateTimeZone($from);
$gmtTimezone = new DateTimeZone($to);
$myDateTime = new DateTime($org_time, $gmtTimezone);
$... | 2012/05/15 | [
"https://Stackoverflow.com/questions/10593576",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/877819/"
] | Don't use getOffset and calculate it by yourself, you should use [setTimezone](http://php.net/manual/en/datetime.settimezone.php) for display
```
<?php
function conv($fromTime, $fromTimezone, $toTimezone) {
$from = new DateTimeZone($fromTimezone);
$to = new DateTimeZone($toTimezone);
$orgTime = new DateT... | It looks like you need to subtract the offset instead of add it to me, from a quick glance at the results. It makes sense: say you're in GMT-5 and you want to convert your time to GMT. You wouldn't subtract 5 hours (time + offset), you would add 5 hours (time - offset). Granted, I am fairly tired, so I may be thinking ... |
10,593,576 | ok i have this following codes
```
$from = "Asia/Manila";
$to = "UTC";
$org_time = new DateTime("2012-05-15 10:50:00");
$org_time = $org_time->format("Y-m-d H:i:s");
$conv_time = NULL;
$userTimezone = new DateTimeZone($from);
$gmtTimezone = new DateTimeZone($to);
$myDateTime = new DateTime($org_time, $gmtTimezone);
$... | 2012/05/15 | [
"https://Stackoverflow.com/questions/10593576",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/877819/"
] | You are making things way too hard. To convert between time zones, all you need to do is create a `DateTime` object with the proper source time zone, and then set the destination time zone via `setTimeZone()`.
```
$src_dt = '2012-05-15 10:50:00';
$src_tz = new DateTimeZone('Asia/Manila');
$dest_tz = new DateTimeZone(... | Don't use getOffset and calculate it by yourself, you should use [setTimezone](http://php.net/manual/en/datetime.settimezone.php) for display
```
<?php
function conv($fromTime, $fromTimezone, $toTimezone) {
$from = new DateTimeZone($fromTimezone);
$to = new DateTimeZone($toTimezone);
$orgTime = new DateT... |
2,266,104 | If I have valvo that obtain from database, How can I set volvo option status into active(checked) by using JQuery?
```
<select name="car">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>
</sele... | 2010/02/15 | [
"https://Stackoverflow.com/questions/2266104",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/103583/"
] | Since your example is a drop down list you have to use val()
```
$("select[name='car']").val('volvo');
```
If you want to use radio button then you can use
```
$(":radio[value='volvo']").attr ( "checked" , true );
```
for the following HTML
```
<input type="radio" value="volvo" />
<input type="radio" value="saab... | Does JQuery support multiple CSS attribute selectors? If so, this should work:
```
$('input[name=car][value=volvo]').attr('checked', true);
```
Otherwise, you can always loop through all available radio buttons, check their value, and check them when the value matches. |
2,266,104 | If I have valvo that obtain from database, How can I set volvo option status into active(checked) by using JQuery?
```
<select name="car">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>
</sele... | 2010/02/15 | [
"https://Stackoverflow.com/questions/2266104",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/103583/"
] | Since your example is a drop down list you have to use val()
```
$("select[name='car']").val('volvo');
```
If you want to use radio button then you can use
```
$(":radio[value='volvo']").attr ( "checked" , true );
```
for the following HTML
```
<input type="radio" value="volvo" />
<input type="radio" value="saab... | This also works:
```
$("select[name=car]").val('volvo');
``` |
2,266,104 | If I have valvo that obtain from database, How can I set volvo option status into active(checked) by using JQuery?
```
<select name="car">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>
</sele... | 2010/02/15 | [
"https://Stackoverflow.com/questions/2266104",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/103583/"
] | Since your example is a drop down list you have to use val()
```
$("select[name='car']").val('volvo');
```
If you want to use radio button then you can use
```
$(":radio[value='volvo']").attr ( "checked" , true );
```
for the following HTML
```
<input type="radio" value="volvo" />
<input type="radio" value="saab... | ```
$('select[name="car"]').val("volvo");
```
A select box is different to a radio button, it doesn't have a 'checked' attribute. The above works, although the specific attribute you want to set on the `option` element is `selected`:
```
$('select[name="car"]').attr("selected", "selected");
``` |
2,266,104 | If I have valvo that obtain from database, How can I set volvo option status into active(checked) by using JQuery?
```
<select name="car">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>
</sele... | 2010/02/15 | [
"https://Stackoverflow.com/questions/2266104",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/103583/"
] | Since your example is a drop down list you have to use val()
```
$("select[name='car']").val('volvo');
```
If you want to use radio button then you can use
```
$(":radio[value='volvo']").attr ( "checked" , true );
```
for the following HTML
```
<input type="radio" value="volvo" />
<input type="radio" value="saab... | This should work for radio buttons as stated on your original question.
```
$('input[name=car]:radio').attr('checked','checked');
```
This should work for select
```
$('select[name=car]').val('volvo');
``` |
2,266,104 | If I have valvo that obtain from database, How can I set volvo option status into active(checked) by using JQuery?
```
<select name="car">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>
</sele... | 2010/02/15 | [
"https://Stackoverflow.com/questions/2266104",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/103583/"
] | This also works:
```
$("select[name=car]").val('volvo');
``` | Does JQuery support multiple CSS attribute selectors? If so, this should work:
```
$('input[name=car][value=volvo]').attr('checked', true);
```
Otherwise, you can always loop through all available radio buttons, check their value, and check them when the value matches. |
2,266,104 | If I have valvo that obtain from database, How can I set volvo option status into active(checked) by using JQuery?
```
<select name="car">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>
</sele... | 2010/02/15 | [
"https://Stackoverflow.com/questions/2266104",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/103583/"
] | ```
$('select[name="car"]').val("volvo");
```
A select box is different to a radio button, it doesn't have a 'checked' attribute. The above works, although the specific attribute you want to set on the `option` element is `selected`:
```
$('select[name="car"]').attr("selected", "selected");
``` | Does JQuery support multiple CSS attribute selectors? If so, this should work:
```
$('input[name=car][value=volvo]').attr('checked', true);
```
Otherwise, you can always loop through all available radio buttons, check their value, and check them when the value matches. |
2,266,104 | If I have valvo that obtain from database, How can I set volvo option status into active(checked) by using JQuery?
```
<select name="car">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>
</sele... | 2010/02/15 | [
"https://Stackoverflow.com/questions/2266104",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/103583/"
] | This also works:
```
$("select[name=car]").val('volvo');
``` | ```
$('select[name="car"]').val("volvo");
```
A select box is different to a radio button, it doesn't have a 'checked' attribute. The above works, although the specific attribute you want to set on the `option` element is `selected`:
```
$('select[name="car"]').attr("selected", "selected");
``` |
2,266,104 | If I have valvo that obtain from database, How can I set volvo option status into active(checked) by using JQuery?
```
<select name="car">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>
</sele... | 2010/02/15 | [
"https://Stackoverflow.com/questions/2266104",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/103583/"
] | This also works:
```
$("select[name=car]").val('volvo');
``` | This should work for radio buttons as stated on your original question.
```
$('input[name=car]:radio').attr('checked','checked');
```
This should work for select
```
$('select[name=car]').val('volvo');
``` |
2,266,104 | If I have valvo that obtain from database, How can I set volvo option status into active(checked) by using JQuery?
```
<select name="car">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>
</sele... | 2010/02/15 | [
"https://Stackoverflow.com/questions/2266104",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/103583/"
] | ```
$('select[name="car"]').val("volvo");
```
A select box is different to a radio button, it doesn't have a 'checked' attribute. The above works, although the specific attribute you want to set on the `option` element is `selected`:
```
$('select[name="car"]').attr("selected", "selected");
``` | This should work for radio buttons as stated on your original question.
```
$('input[name=car]:radio').attr('checked','checked');
```
This should work for select
```
$('select[name=car]').val('volvo');
``` |
15,302,856 | Basically I have this HTML table (which acts as a menu):
```
<table class="content" align="center">
<tr>
<td class="links">
<table class="links">
<tr>
<td>
<div id="i1">
<a href="http://www.google.com">St... | 2013/03/08 | [
"https://Stackoverflow.com/questions/15302856",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2148796/"
] | This is a known side-effect of [toggle()](http://api.jquery.com/toggle-event/). The documentation says:
>
> The implementation also calls `.preventDefault()` on the event, so links
> will not be followed and buttons will not be clicked if `.toggle()` has
> been called on the element.
>
>
>
To work around that, ... | Use the following code, this will only enable the toggle if there are children for the div:
```
$(document).ready(function(){
$("table.links").find(".i2").parent().toggle(
function(e){
$(e.target).closest("div").children("div").slideDown(200);
},
function(e){
$(this... |
19,130,321 | Let me exemplify this,
```
int a = 100;
int b = a;
int main(int argc, char **argv, char ** env)
{
printf("The value of b=%d\r\n",b);
return 0;
}
```
Now, I get the compilation error as expected.
```
[joshis1@localhost global_var]$ gcc global_var.c -o global_var.out
global_var.c:4:1: error: initializer elemen... | 2013/10/02 | [
"https://Stackoverflow.com/questions/19130321",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2735434/"
] | The official documentation, taken from [line 1644, 6.7.8 Initialization](http://c0x.coding-guidelines.com/6.7.8.html), says:
>
> All the expressions in an initializer for an object that has static storage duration shall be constant expressions or string literals.
>
>
>
Why the rule exists is a more difficult ques... | C is portable to very simple, small machines. Evaluating expressions that aren't constant requires runtime code, in a function. In embedded programming you might not want any functions (or code) that you did not explicitly program.
Your compiler probably will evaluate the initializer as a language extension, if config... |
19,130,321 | Let me exemplify this,
```
int a = 100;
int b = a;
int main(int argc, char **argv, char ** env)
{
printf("The value of b=%d\r\n",b);
return 0;
}
```
Now, I get the compilation error as expected.
```
[joshis1@localhost global_var]$ gcc global_var.c -o global_var.out
global_var.c:4:1: error: initializer elemen... | 2013/10/02 | [
"https://Stackoverflow.com/questions/19130321",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2735434/"
] | From your comment:
>
> ...how can I force compiler to make this work?
>
>
>
Well you can't make the compiler accept what you have but you can accomplish your goal by defining the value you want to assign to both variables.
```
#define INITIAL_VALUE_FOR_A 100
int a = INITIAL_VALUE_FOR_A;
int b = INITIAL_VALUE_F... | C is portable to very simple, small machines. Evaluating expressions that aren't constant requires runtime code, in a function. In embedded programming you might not want any functions (or code) that you did not explicitly program.
Your compiler probably will evaluate the initializer as a language extension, if config... |
19,130,321 | Let me exemplify this,
```
int a = 100;
int b = a;
int main(int argc, char **argv, char ** env)
{
printf("The value of b=%d\r\n",b);
return 0;
}
```
Now, I get the compilation error as expected.
```
[joshis1@localhost global_var]$ gcc global_var.c -o global_var.out
global_var.c:4:1: error: initializer elemen... | 2013/10/02 | [
"https://Stackoverflow.com/questions/19130321",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2735434/"
] | C is portable to very simple, small machines. Evaluating expressions that aren't constant requires runtime code, in a function. In embedded programming you might not want any functions (or code) that you did not explicitly program.
Your compiler probably will evaluate the initializer as a language extension, if config... | Others have stated why initializers in general can't be allowed to be arbitrary expressions.
The way to "*force the compiler to accept the code*" is to **change the code**. The canonical way to perform arbitrary initialization of file scope, external linkage (vulgo: "global") variables is to call an initialization fun... |
19,130,321 | Let me exemplify this,
```
int a = 100;
int b = a;
int main(int argc, char **argv, char ** env)
{
printf("The value of b=%d\r\n",b);
return 0;
}
```
Now, I get the compilation error as expected.
```
[joshis1@localhost global_var]$ gcc global_var.c -o global_var.out
global_var.c:4:1: error: initializer elemen... | 2013/10/02 | [
"https://Stackoverflow.com/questions/19130321",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2735434/"
] | The official documentation, taken from [line 1644, 6.7.8 Initialization](http://c0x.coding-guidelines.com/6.7.8.html), says:
>
> All the expressions in an initializer for an object that has static storage duration shall be constant expressions or string literals.
>
>
>
Why the rule exists is a more difficult ques... | From your comment:
>
> ...how can I force compiler to make this work?
>
>
>
Well you can't make the compiler accept what you have but you can accomplish your goal by defining the value you want to assign to both variables.
```
#define INITIAL_VALUE_FOR_A 100
int a = INITIAL_VALUE_FOR_A;
int b = INITIAL_VALUE_F... |
19,130,321 | Let me exemplify this,
```
int a = 100;
int b = a;
int main(int argc, char **argv, char ** env)
{
printf("The value of b=%d\r\n",b);
return 0;
}
```
Now, I get the compilation error as expected.
```
[joshis1@localhost global_var]$ gcc global_var.c -o global_var.out
global_var.c:4:1: error: initializer elemen... | 2013/10/02 | [
"https://Stackoverflow.com/questions/19130321",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2735434/"
] | The official documentation, taken from [line 1644, 6.7.8 Initialization](http://c0x.coding-guidelines.com/6.7.8.html), says:
>
> All the expressions in an initializer for an object that has static storage duration shall be constant expressions or string literals.
>
>
>
Why the rule exists is a more difficult ques... | Others have stated why initializers in general can't be allowed to be arbitrary expressions.
The way to "*force the compiler to accept the code*" is to **change the code**. The canonical way to perform arbitrary initialization of file scope, external linkage (vulgo: "global") variables is to call an initialization fun... |
19,130,321 | Let me exemplify this,
```
int a = 100;
int b = a;
int main(int argc, char **argv, char ** env)
{
printf("The value of b=%d\r\n",b);
return 0;
}
```
Now, I get the compilation error as expected.
```
[joshis1@localhost global_var]$ gcc global_var.c -o global_var.out
global_var.c:4:1: error: initializer elemen... | 2013/10/02 | [
"https://Stackoverflow.com/questions/19130321",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2735434/"
] | From your comment:
>
> ...how can I force compiler to make this work?
>
>
>
Well you can't make the compiler accept what you have but you can accomplish your goal by defining the value you want to assign to both variables.
```
#define INITIAL_VALUE_FOR_A 100
int a = INITIAL_VALUE_FOR_A;
int b = INITIAL_VALUE_F... | Others have stated why initializers in general can't be allowed to be arbitrary expressions.
The way to "*force the compiler to accept the code*" is to **change the code**. The canonical way to perform arbitrary initialization of file scope, external linkage (vulgo: "global") variables is to call an initialization fun... |
10,888,080 | I am new here . Sorry if I this question is being repeated but I have a slightly different issue than the others.
My app crashes randomly after certain amount of time interval without any error logs or stack trace. I suspect it's an memory issue . I have the following questions :
>
> 1.) How to get stack trace (I ha... | 2012/06/04 | [
"https://Stackoverflow.com/questions/10888080",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1426859/"
] | That does sound like maybe the device is running low on memory and shutting you down. There's lots of threads on stackoverflow on debugging memory warnings.
This one talks a little about [what to look for when using the Instruments tool](https://stackoverflow.com/a/6085952/119114).
Here is an explanation of how to [g... | I recommend instrument
<https://developer.apple.com/library/mac/#documentation/developertools/conceptual/InstrumentsUserGuide/AboutTracing/AboutTracing.html> |
10,888,080 | I am new here . Sorry if I this question is being repeated but I have a slightly different issue than the others.
My app crashes randomly after certain amount of time interval without any error logs or stack trace. I suspect it's an memory issue . I have the following questions :
>
> 1.) How to get stack trace (I ha... | 2012/06/04 | [
"https://Stackoverflow.com/questions/10888080",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1426859/"
] | >
> My app crashes randomly after certain amount of time interval without any error logs or stack trace. I suspect it's an memory issue.
>
>
>
To confirm that it's a memory issue, sync your device with iTunes,and look in `~/Library/Logs/CrashReporter/MobileDevice/` for a files with `LowMemory` in their name. If yo... | I recommend instrument
<https://developer.apple.com/library/mac/#documentation/developertools/conceptual/InstrumentsUserGuide/AboutTracing/AboutTracing.html> |
10,888,080 | I am new here . Sorry if I this question is being repeated but I have a slightly different issue than the others.
My app crashes randomly after certain amount of time interval without any error logs or stack trace. I suspect it's an memory issue . I have the following questions :
>
> 1.) How to get stack trace (I ha... | 2012/06/04 | [
"https://Stackoverflow.com/questions/10888080",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1426859/"
] | Not sure but reading the registers might help.
First go to Exceptions tab and 'Add Exception Breakpoint' using the + at the bottom left corner.

Then when the app crashes click on "0 objc\_exception\_throw" under Thread 1
![enter image description he... | I recommend instrument
<https://developer.apple.com/library/mac/#documentation/developertools/conceptual/InstrumentsUserGuide/AboutTracing/AboutTracing.html> |
10,888,080 | I am new here . Sorry if I this question is being repeated but I have a slightly different issue than the others.
My app crashes randomly after certain amount of time interval without any error logs or stack trace. I suspect it's an memory issue . I have the following questions :
>
> 1.) How to get stack trace (I ha... | 2012/06/04 | [
"https://Stackoverflow.com/questions/10888080",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1426859/"
] | I recommend instrument
<https://developer.apple.com/library/mac/#documentation/developertools/conceptual/InstrumentsUserGuide/AboutTracing/AboutTracing.html> | In my case i closed all other apps and it started working normally, maybe it was a memory issue |
10,888,080 | I am new here . Sorry if I this question is being repeated but I have a slightly different issue than the others.
My app crashes randomly after certain amount of time interval without any error logs or stack trace. I suspect it's an memory issue . I have the following questions :
>
> 1.) How to get stack trace (I ha... | 2012/06/04 | [
"https://Stackoverflow.com/questions/10888080",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1426859/"
] | >
> My app crashes randomly after certain amount of time interval without any error logs or stack trace. I suspect it's an memory issue.
>
>
>
To confirm that it's a memory issue, sync your device with iTunes,and look in `~/Library/Logs/CrashReporter/MobileDevice/` for a files with `LowMemory` in their name. If yo... | That does sound like maybe the device is running low on memory and shutting you down. There's lots of threads on stackoverflow on debugging memory warnings.
This one talks a little about [what to look for when using the Instruments tool](https://stackoverflow.com/a/6085952/119114).
Here is an explanation of how to [g... |
10,888,080 | I am new here . Sorry if I this question is being repeated but I have a slightly different issue than the others.
My app crashes randomly after certain amount of time interval without any error logs or stack trace. I suspect it's an memory issue . I have the following questions :
>
> 1.) How to get stack trace (I ha... | 2012/06/04 | [
"https://Stackoverflow.com/questions/10888080",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1426859/"
] | That does sound like maybe the device is running low on memory and shutting you down. There's lots of threads on stackoverflow on debugging memory warnings.
This one talks a little about [what to look for when using the Instruments tool](https://stackoverflow.com/a/6085952/119114).
Here is an explanation of how to [g... | In my case i closed all other apps and it started working normally, maybe it was a memory issue |
10,888,080 | I am new here . Sorry if I this question is being repeated but I have a slightly different issue than the others.
My app crashes randomly after certain amount of time interval without any error logs or stack trace. I suspect it's an memory issue . I have the following questions :
>
> 1.) How to get stack trace (I ha... | 2012/06/04 | [
"https://Stackoverflow.com/questions/10888080",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1426859/"
] | >
> My app crashes randomly after certain amount of time interval without any error logs or stack trace. I suspect it's an memory issue.
>
>
>
To confirm that it's a memory issue, sync your device with iTunes,and look in `~/Library/Logs/CrashReporter/MobileDevice/` for a files with `LowMemory` in their name. If yo... | Not sure but reading the registers might help.
First go to Exceptions tab and 'Add Exception Breakpoint' using the + at the bottom left corner.

Then when the app crashes click on "0 objc\_exception\_throw" under Thread 1
![enter image description he... |
10,888,080 | I am new here . Sorry if I this question is being repeated but I have a slightly different issue than the others.
My app crashes randomly after certain amount of time interval without any error logs or stack trace. I suspect it's an memory issue . I have the following questions :
>
> 1.) How to get stack trace (I ha... | 2012/06/04 | [
"https://Stackoverflow.com/questions/10888080",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1426859/"
] | >
> My app crashes randomly after certain amount of time interval without any error logs or stack trace. I suspect it's an memory issue.
>
>
>
To confirm that it's a memory issue, sync your device with iTunes,and look in `~/Library/Logs/CrashReporter/MobileDevice/` for a files with `LowMemory` in their name. If yo... | In my case i closed all other apps and it started working normally, maybe it was a memory issue |
10,888,080 | I am new here . Sorry if I this question is being repeated but I have a slightly different issue than the others.
My app crashes randomly after certain amount of time interval without any error logs or stack trace. I suspect it's an memory issue . I have the following questions :
>
> 1.) How to get stack trace (I ha... | 2012/06/04 | [
"https://Stackoverflow.com/questions/10888080",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1426859/"
] | Not sure but reading the registers might help.
First go to Exceptions tab and 'Add Exception Breakpoint' using the + at the bottom left corner.

Then when the app crashes click on "0 objc\_exception\_throw" under Thread 1
![enter image description he... | In my case i closed all other apps and it started working normally, maybe it was a memory issue |
28,272,497 | Created UI using Angular and Ionic, and wrapper usign Phonegap, How can I have pushnotification in Android implemented.
Is there any effective and accurate library in Phonegap for Pushnotification Implemented.
Already using <https://github.com/phonegap-build/PushPlugin>, but getting some issues, like push notififcatio... | 2015/02/02 | [
"https://Stackoverflow.com/questions/28272497",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/585387/"
] | 1. First create a project in Google console
2. Enable GCM
3. Create a server api Key
use the following plugin
```
cordova plugin add phonegap-plugin-push --variable SENDER_ID="XXXXXXX"
```
replace the xxxxxx with your sender id
n your javascript add the following code for registering to GCM server it will give you... | I was having the same problem lately, using Ionic and Cordova (not Phonegap, but should work the same).
I ended up using this library for local push notifications <https://github.com/Wizcorp/phonegap-plugin-localNotifications>
They worked pretty well except the PN would not start the app on Android, but I [opened a pu... |
28,272,497 | Created UI using Angular and Ionic, and wrapper usign Phonegap, How can I have pushnotification in Android implemented.
Is there any effective and accurate library in Phonegap for Pushnotification Implemented.
Already using <https://github.com/phonegap-build/PushPlugin>, but getting some issues, like push notififcatio... | 2015/02/02 | [
"https://Stackoverflow.com/questions/28272497",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/585387/"
] | 1. First create a project in Google console
2. Enable GCM
3. Create a server api Key
use the following plugin
```
cordova plugin add phonegap-plugin-push --variable SENDER_ID="XXXXXXX"
```
replace the xxxxxx with your sender id
n your javascript add the following code for registering to GCM server it will give you... | You should be using [ngCordova's Push Plugin](http://ngcordova.com/docs/plugins/pushNotifications/) for this.
From the docs:
>
> Allows your application to receive push notifications. To receive notifications in your controllers or services, listen for pushNotificationReceived event.
>
>
> |
28,272,497 | Created UI using Angular and Ionic, and wrapper usign Phonegap, How can I have pushnotification in Android implemented.
Is there any effective and accurate library in Phonegap for Pushnotification Implemented.
Already using <https://github.com/phonegap-build/PushPlugin>, but getting some issues, like push notififcatio... | 2015/02/02 | [
"https://Stackoverflow.com/questions/28272497",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/585387/"
] | 1. First create a project in Google console
2. Enable GCM
3. Create a server api Key
use the following plugin
```
cordova plugin add phonegap-plugin-push --variable SENDER_ID="XXXXXXX"
```
replace the xxxxxx with your sender id
n your javascript add the following code for registering to GCM server it will give you... | As Push Notification is a native feature, so to integrate Push in PhoneGap Android application you have to make a plugin that will communicate with Android Native code.
You can go through with [Sample application](https://github.com/VishnuGShephertz/Android-Push-Notification-in-PhoneGap-application) available on Git H... |
29,419,392 | I have a table that looks like this:

When the user clicks on the `+` button I am trying to copy the row shown and append it below, but also with a remove link so something like this after the `Component Thickness` column.
`<td><a href='#' id='remov... | 2015/04/02 | [
"https://Stackoverflow.com/questions/29419392",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2057853/"
] | In what you tried, you forgot to include the `#` before the ID, that's why it didn't work, but still it would've appended the entire element to itself, causing all sorts of issues.
What you need to clone is the first `<tr>`.
```
$(function() {
var $componentTB = $("#component_tb"),
$firstTRCopy = $compone... | [Try this](http://jsfiddle.net/ambiguous/LAECx/) This will clone a table
```
$("input.tr_clone_add").live('click', function() {
var $tr = $(this).closest('.tr_clone');
var $clone = $tr.clone();
$clone.find(':text').val('');
$tr.after($clone);
});
``` |
114,199 | Trying to figure out how to write a formula in Google Sheets that will automatically calculate a deadline for me based on priority and an established date.
I have 3 columns: Date (A), Priority (B), and Deadline (C).
Here's what I'm trying to accomplish:
* If Priority (B) equals 1, then return A.
* If Priority (B) eq... | 2018/01/30 | [
"https://webapps.stackexchange.com/questions/114199",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/177331/"
] | I'm a developer with [Cognito Forms](https://www.cognitoforms.com).
The Content field can only be targeted as a whole, so inside the Content field you will have to set the text that you want to adjust to a heading in order to give it a tag that you can target.
So if you are not using the 'Heading 6' for anything els... | Custom css could also help you.
See Example
<https://codepen.io/hardo91/full/OrMMBZ> |
44,927,128 | I have a data set that is sorted by account key. when coming to certain rows which have NULL as group key, it should add current account key as a parent key for all above rows which have NULL as parentkey. So when coming to the next row with null as group key, you would set the current account key as parent key for all... | 2017/07/05 | [
"https://Stackoverflow.com/questions/44927128",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8259238/"
] | If I understood your question you could use:
```
SELECT Accountkey, ParentKey,GroupKey,AccountNumber, NEW_PARID
FROM (
SELECT Accountkey, ParentKey,GroupKey,AccountNumber, AccountKey AS NEW_PARID, LAG(ACCOUNTKEY) OVER (ORDER BY Accountkey) AS PREC
FROM MYT
WHERE GroupKey IS NUL... | This is the code I need to rewrite to work on SQL Server 2008
```
SELECT AccountKey,
LineName,
AccountName,
GroupKey,
AccountNumber,
ParentAccountKey
INTO tempAccount
FROM
(
SELECT AccountKey,
LineName,
AccountName,
GroupKey,
AccountNum... |
40,496,114 | I have white and red, full circles, absolutely positioned divs. Is there a way that I can cut out all white circles to be transparent with CSS and to be cross-browser compatible? Looking for the most "primitive" way.
[](https://i.stack.imgur.com/ksSKY... | 2016/11/08 | [
"https://Stackoverflow.com/questions/40496114",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2244696/"
] | You can use border-radius for that.
Check this example:
```css
.container {
background: black;
width: 490px;
height: 490px;
position: relative;
background: black url(http://www.planwallpaper.com/static/images/recycled_texture_background_by_sandeep_m-d6aeau9_PZ9chud.jpg) no-repeat -500px -500px;
}
.r1... | you may take a look at radial gradient:
```css
html {
min-height: 100%;
background-image: radial-gradient(
circle /* a circle*/
closest-side at 50% 50% /* set as closed as possible to center*/,
transparent 0 /* from center */,
/* to */transparent 50px,
/* from */red 50px,
/* t... |
40,496,114 | I have white and red, full circles, absolutely positioned divs. Is there a way that I can cut out all white circles to be transparent with CSS and to be cross-browser compatible? Looking for the most "primitive" way.
[](https://i.stack.imgur.com/ksSKY... | 2016/11/08 | [
"https://Stackoverflow.com/questions/40496114",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2244696/"
] | you may take a look at radial gradient:
```css
html {
min-height: 100%;
background-image: radial-gradient(
circle /* a circle*/
closest-side at 50% 50% /* set as closed as possible to center*/,
transparent 0 /* from center */,
/* to */transparent 50px,
/* from */red 50px,
/* t... | You can use SVG as well.
```css
body {
height: 100vh;
margin: 0;
display: flex;
}
svg {
flex: 1;
background: url(http://fillmurray.com/638/220) no-repeat center center / cover;
}
```
```html
<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
<circle cx="50%" cy="50%" r="40" stroke="#F44336" s... |
40,496,114 | I have white and red, full circles, absolutely positioned divs. Is there a way that I can cut out all white circles to be transparent with CSS and to be cross-browser compatible? Looking for the most "primitive" way.
[](https://i.stack.imgur.com/ksSKY... | 2016/11/08 | [
"https://Stackoverflow.com/questions/40496114",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2244696/"
] | You can use border-radius for that.
Check this example:
```css
.container {
background: black;
width: 490px;
height: 490px;
position: relative;
background: black url(http://www.planwallpaper.com/static/images/recycled_texture_background_by_sandeep_m-d6aeau9_PZ9chud.jpg) no-repeat -500px -500px;
}
.r1... | You can use SVG as well.
```css
body {
height: 100vh;
margin: 0;
display: flex;
}
svg {
flex: 1;
background: url(http://fillmurray.com/638/220) no-repeat center center / cover;
}
```
```html
<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
<circle cx="50%" cy="50%" r="40" stroke="#F44336" s... |
17,010,473 | I have a table on Parse.com that allows me to store Event information. Image, title, date and description. I am trying to obtain the image and assign it to a UIImageView within a custom cell that I have developed... The data loads fine, and the custom cell works, but the image doesn't ever update... The logic in my cod... | 2013/06/09 | [
"https://Stackoverflow.com/questions/17010473",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1846637/"
] | It's not possible with a background color, but possible with [a gradient background image](http://jsfiddle.net/MVST6/3/):
```
background-image:
linear-gradient(to right, transparent 50px, #c2e8fb 50px),
url(http://tax.allfaces.lv/templates/tax/images/poga_keksis.png);
```
And if you need to support oldie bro... | You can't do it this way. Maybe try something like this:
HTML
```
<p class="tax-free-keksis">
<img src="http://tax.allfaces.lv/templates/tax/images/poga_keksis.png">
text here text here text here text here text here text here text here text here text here text here text here text heretext here text hered
... |
17,010,473 | I have a table on Parse.com that allows me to store Event information. Image, title, date and description. I am trying to obtain the image and assign it to a UIImageView within a custom cell that I have developed... The data loads fine, and the custom cell works, but the image doesn't ever update... The logic in my cod... | 2013/06/09 | [
"https://Stackoverflow.com/questions/17010473",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1846637/"
] | Here's another option:
```
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<style>
p.tax-free-keksis {
position: relative;
background-color: #c2e8fb;
padding-top: 15px;
margin-left: 50px;
padding-right: 10px;
text-align: left;
}
.tax-free-keksis:before {
content: url(http:/... | You can't do it this way. Maybe try something like this:
HTML
```
<p class="tax-free-keksis">
<img src="http://tax.allfaces.lv/templates/tax/images/poga_keksis.png">
text here text here text here text here text here text here text here text here text here text here text here text heretext here text hered
... |
17,010,473 | I have a table on Parse.com that allows me to store Event information. Image, title, date and description. I am trying to obtain the image and assign it to a UIImageView within a custom cell that I have developed... The data loads fine, and the custom cell works, but the image doesn't ever update... The logic in my cod... | 2013/06/09 | [
"https://Stackoverflow.com/questions/17010473",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1846637/"
] | It's not possible with a background color, but possible with [a gradient background image](http://jsfiddle.net/MVST6/3/):
```
background-image:
linear-gradient(to right, transparent 50px, #c2e8fb 50px),
url(http://tax.allfaces.lv/templates/tax/images/poga_keksis.png);
```
And if you need to support oldie bro... | You can use this code:
```
position: fixed;
top: 0;
left: -120px;
width: 50%;
height: 100%;
border-right:1px solid #d0d0d0;
background-color: red; (if you want you can put image here)
z-index: -10;
```
this code is for image. Then, You should give a style to text and give padding to it. |
17,010,473 | I have a table on Parse.com that allows me to store Event information. Image, title, date and description. I am trying to obtain the image and assign it to a UIImageView within a custom cell that I have developed... The data loads fine, and the custom cell works, but the image doesn't ever update... The logic in my cod... | 2013/06/09 | [
"https://Stackoverflow.com/questions/17010473",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1846637/"
] | Here's another option:
```
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<style>
p.tax-free-keksis {
position: relative;
background-color: #c2e8fb;
padding-top: 15px;
margin-left: 50px;
padding-right: 10px;
text-align: left;
}
.tax-free-keksis:before {
content: url(http:/... | You can use this code:
```
position: fixed;
top: 0;
left: -120px;
width: 50%;
height: 100%;
border-right:1px solid #d0d0d0;
background-color: red; (if you want you can put image here)
z-index: -10;
```
this code is for image. Then, You should give a style to text and give padding to it. |
17,010,473 | I have a table on Parse.com that allows me to store Event information. Image, title, date and description. I am trying to obtain the image and assign it to a UIImageView within a custom cell that I have developed... The data loads fine, and the custom cell works, but the image doesn't ever update... The logic in my cod... | 2013/06/09 | [
"https://Stackoverflow.com/questions/17010473",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1846637/"
] | It's not possible with a background color, but possible with [a gradient background image](http://jsfiddle.net/MVST6/3/):
```
background-image:
linear-gradient(to right, transparent 50px, #c2e8fb 50px),
url(http://tax.allfaces.lv/templates/tax/images/poga_keksis.png);
```
And if you need to support oldie bro... | Here's another option:
```
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<style>
p.tax-free-keksis {
position: relative;
background-color: #c2e8fb;
padding-top: 15px;
margin-left: 50px;
padding-right: 10px;
text-align: left;
}
.tax-free-keksis:before {
content: url(http:/... |
62,520,999 | I'm new to .net and testing. My following code looks like this:
```
using System.Xml.Linq;
public class AnimalXmlService
{
public Animal GetAnimalInfoFromXml(string url) {
XElement xml_doc = GetXmlInfo(url);
if (xml_doc == null)
{
return null;
... | 2020/06/22 | [
"https://Stackoverflow.com/questions/62520999",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2394970/"
] | In this situations you can use test doubles.
First , you should make your codes more testable ( Breaking dependency )
```
public class AnimalXmlService
{
private readonly IXmlReader _xmlReader;
public AnimalXmlService(IXmlReader xmlReader)
{
this._xmlReader = xmlReader;
}
public Animal Ge... | You can have another method in your class like the one below which returns an XmlDocument.
```
public XmlDocument GetXmlFile()
{
XmlDocument doc = new XmlDocument();
doc.LoadXml("<Animal><Name>Bobby the tiger</Name></Animal>");
return doc;
}
``` |
13,209,027 | I got images prepared for 7 inch and 10 inch tablets now i want to put them into corresponding drawable folder.I have searched some sources and got some information that both 7inch and 10inch tablets densities are **mdpi**. I can't put both images of different resolution on the same mdpi folder.Can anybody suggest me s... | 2012/11/03 | [
"https://Stackoverflow.com/questions/13209027",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1427961/"
] | Option #1: Use `res/drawable-xlarge-mdpi/` for the 10-inch `-mdpi` tablet images and `res/drawable-large-mdpi/` for the 5-to-10-inch `-mdpi` tablet images.
Option #2: Do not have different icons based on screen size. | Refer below link for your solution.
Try to use
>
> drawable-large
>
>
> drawable-xlarge
>
>
>
Different category for support all resolution. [Refer this](http://developer.android.com/training/basics/supporting-devices/screens.html) |
13,209,027 | I got images prepared for 7 inch and 10 inch tablets now i want to put them into corresponding drawable folder.I have searched some sources and got some information that both 7inch and 10inch tablets densities are **mdpi**. I can't put both images of different resolution on the same mdpi folder.Can anybody suggest me s... | 2012/11/03 | [
"https://Stackoverflow.com/questions/13209027",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1427961/"
] | Option #1: Use `res/drawable-xlarge-mdpi/` for the 10-inch `-mdpi` tablet images and `res/drawable-large-mdpi/` for the 5-to-10-inch `-mdpi` tablet images.
Option #2: Do not have different icons based on screen size. | large and xlarge are deprecated from android 3.2
Use drawable-sw600dp-mdpi for 7" tabs and drawable-sw720dp-mdpi for 10" tabs. |
13,209,027 | I got images prepared for 7 inch and 10 inch tablets now i want to put them into corresponding drawable folder.I have searched some sources and got some information that both 7inch and 10inch tablets densities are **mdpi**. I can't put both images of different resolution on the same mdpi folder.Can anybody suggest me s... | 2012/11/03 | [
"https://Stackoverflow.com/questions/13209027",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1427961/"
] | 7 inch tablets, comes into the largescreen category, and 10 inch tablets falls into xlarge-screen. so use following folders for both these:
1 `drawable-large`
2 `drawable-xlarge` | Refer below link for your solution.
Try to use
>
> drawable-large
>
>
> drawable-xlarge
>
>
>
Different category for support all resolution. [Refer this](http://developer.android.com/training/basics/supporting-devices/screens.html) |
13,209,027 | I got images prepared for 7 inch and 10 inch tablets now i want to put them into corresponding drawable folder.I have searched some sources and got some information that both 7inch and 10inch tablets densities are **mdpi**. I can't put both images of different resolution on the same mdpi folder.Can anybody suggest me s... | 2012/11/03 | [
"https://Stackoverflow.com/questions/13209027",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1427961/"
] | 7 inch tablets, comes into the largescreen category, and 10 inch tablets falls into xlarge-screen. so use following folders for both these:
1 `drawable-large`
2 `drawable-xlarge` | large and xlarge are deprecated from android 3.2
Use drawable-sw600dp-mdpi for 7" tabs and drawable-sw720dp-mdpi for 10" tabs. |
56,481,872 | To explain my question more simply, I will take an example of just outputting to the console.
I have a simple func that takes string and print this to console:
```
func printer(text: String) {
print(text)
}
```
Sometimes, I need to print text with some additional string
```
func printer(text: String, _ additio... | 2019/06/06 | [
"https://Stackoverflow.com/questions/56481872",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9014720/"
] | use substring instead
```
String res = "2019-06-06 13:01:53.263Z|abc|alfkdjas|alfjdlaksd|alkjdfs "
res0.substring(res0.indexOf('|')) // 2019-06-06 13:01:53.263Z
res0.substring(0,res0.indexOf('|'))// |abc|alfkdjas|alfjdlaksd|alkjdfs
``` | Extracting a date with the method you created `isValid()`, does not make any sense. That method will return a `boolean` type object (true or false).
By slightly modifying your method, you can create the following which extracts the date from the String examples you provided and finally returns a `Date`-type object:
`... |
56,481,872 | To explain my question more simply, I will take an example of just outputting to the console.
I have a simple func that takes string and print this to console:
```
func printer(text: String) {
print(text)
}
```
Sometimes, I need to print text with some additional string
```
func printer(text: String, _ additio... | 2019/06/06 | [
"https://Stackoverflow.com/questions/56481872",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9014720/"
] | It seems that you are looking for something like the following.
First, you need a method to read **each line** from a file. *(If it is not line by line, please let me know. This is what I understand from your question)*.
This method will return an `ArrayList` containing each line of the input file.
```
public ArrayL... | use substring instead
```
String res = "2019-06-06 13:01:53.263Z|abc|alfkdjas|alfjdlaksd|alkjdfs "
res0.substring(res0.indexOf('|')) // 2019-06-06 13:01:53.263Z
res0.substring(0,res0.indexOf('|'))// |abc|alfkdjas|alfjdlaksd|alkjdfs
``` |
56,481,872 | To explain my question more simply, I will take an example of just outputting to the console.
I have a simple func that takes string and print this to console:
```
func printer(text: String) {
print(text)
}
```
Sometimes, I need to print text with some additional string
```
func printer(text: String, _ additio... | 2019/06/06 | [
"https://Stackoverflow.com/questions/56481872",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9014720/"
] | It seems that you are looking for something like the following.
First, you need a method to read **each line** from a file. *(If it is not line by line, please let me know. This is what I understand from your question)*.
This method will return an `ArrayList` containing each line of the input file.
```
public ArrayL... | Extracting a date with the method you created `isValid()`, does not make any sense. That method will return a `boolean` type object (true or false).
By slightly modifying your method, you can create the following which extracts the date from the String examples you provided and finally returns a `Date`-type object:
`... |
25,750,685 | I'm using a third party library to emulate the 3x3 android pattern lock screen using js and jQuery.
repo: <https://github.com/s-yadav/patternLock>
emulator: <http://ignitersworld.com/lab/patternLock.html#intro>
I would like to add `disable()` and `enable()` functions to the `PatternLock.prototype`, in order to disab... | 2014/09/09 | [
"https://Stackoverflow.com/questions/25750685",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2782404/"
] | *I don't know Ruby, but I can google and guess.*
```
a = [1,2,3,4,5,6,7,8,9]
a[a.size * 0.6..-1] ==> [6, 7, 8, 9]
a.last(a.size * 0.4) ==> [7, 8, 9]
```
The reason for this is that you first have to give the array a name, before you can reference it. In this case, `a`.
You can look up the functionality like this in... | If you really want the functionality you are requesting you could use `#tap` which allows you to alter the method chain inside a block like this
```
[1,2,3,4,5,6,7,8,9].tap do |a|
#a is the original array passed into a block
a.delete_if.with_index{|index,element| element if index + 1 < a.size * 0.7}
end
#... |
25,750,685 | I'm using a third party library to emulate the 3x3 android pattern lock screen using js and jQuery.
repo: <https://github.com/s-yadav/patternLock>
emulator: <http://ignitersworld.com/lab/patternLock.html#intro>
I would like to add `disable()` and `enable()` functions to the `PatternLock.prototype`, in order to disab... | 2014/09/09 | [
"https://Stackoverflow.com/questions/25750685",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2782404/"
] | You need to use `tap` in order to reference the object like you want.
```
[1,2,3,4,5,6,7,8,9].tap { |this| break this.last(this.size*0.7) }
```
The `break` is needed because tap normally ignores the block's return value. | *I don't know Ruby, but I can google and guess.*
```
a = [1,2,3,4,5,6,7,8,9]
a[a.size * 0.6..-1] ==> [6, 7, 8, 9]
a.last(a.size * 0.4) ==> [7, 8, 9]
```
The reason for this is that you first have to give the array a name, before you can reference it. In this case, `a`.
You can look up the functionality like this in... |
25,750,685 | I'm using a third party library to emulate the 3x3 android pattern lock screen using js and jQuery.
repo: <https://github.com/s-yadav/patternLock>
emulator: <http://ignitersworld.com/lab/patternLock.html#intro>
I would like to add `disable()` and `enable()` functions to the `PatternLock.prototype`, in order to disab... | 2014/09/09 | [
"https://Stackoverflow.com/questions/25750685",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2782404/"
] | You need to use `tap` in order to reference the object like you want.
```
[1,2,3,4,5,6,7,8,9].tap { |this| break this.last(this.size*0.7) }
```
The `break` is needed because tap normally ignores the block's return value. | If you really want the functionality you are requesting you could use `#tap` which allows you to alter the method chain inside a block like this
```
[1,2,3,4,5,6,7,8,9].tap do |a|
#a is the original array passed into a block
a.delete_if.with_index{|index,element| element if index + 1 < a.size * 0.7}
end
#... |
30,688,403 | not expecting anyone to write the whole code for this but any hints and tips will be appreciated.
Here's the problem:
>
> `In main()`, instantiate 60 BankAccount objects,
> using random numbers for account numbers (8 digits, integer!),
> 3 distinct sort codes (form: xx-xx-xx),
> and random numbers for balances (ty... | 2015/06/06 | [
"https://Stackoverflow.com/questions/30688403",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4971233/"
] | A little longwinded but:
```
select
t1.[Group], t1.StudentID, t1.SumOfMark
from
(select [Group], StudentID, sum(Mark) as SumOfMark
from QueryTotalGrades
group by [Group], StudentID) as t1
where
(select count(*) from
(select [Group], StudentID, sum(Mark) as SumOfMark
from QueryT... | **Query**
```
;with cte as
(
select rn=row_number() over
(
partition by [Group]
order by sum(Mark) desc
),
[Group],StudentID,
sum(Mark) as SumOfMark
from student
group by [Group],StudentID
)
select [Group],StudentId,SumOfMark from cte where rn in (1,2);
```
[fiddle demo](http://www.s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.