qid
int64
1
74.7M
question
stringlengths
0
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
2
48.3k
response_k
stringlengths
2
40.5k
68,967,488
Check if there are any orders before a given date (`Date` column). The procedure has a passing parameter "date" as date and another passing parameter "count". This parameter returns the number of orders before this date. The simple way of doing it would be: ``` SELECT COUNT([Sales].[dbo].[Order].[Date]) FROM [Sales]....
2021/08/28
[ "https://Stackoverflow.com/questions/68967488", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16769977/" ]
Thanks for all your input! I think it works now with the code like this: ``` CREATE OR ALTER PROC OrderBeforeDate(@date date, @count int out) AS BEGIN SET @count = 0; DECLARE cursor1 scroll cursor for SELECT [Sales].[dbo].[Order].[Date] FROM [Sales].[dbo].[Order] FOR READ ONLY OPEN cursor1; FETCH NEXT FROM cursor1...
Probably you miss giving the value for date parameter when call OrderBeforeDate procedure. You only pass in 1 argument and SQL server may regard @count value as the value for date paramter. ``` EXEC OrderBeforeDate @count OUT ```
68,967,488
Check if there are any orders before a given date (`Date` column). The procedure has a passing parameter "date" as date and another passing parameter "count". This parameter returns the number of orders before this date. The simple way of doing it would be: ``` SELECT COUNT([Sales].[dbo].[Order].[Date]) FROM [Sales]....
2021/08/28
[ "https://Stackoverflow.com/questions/68967488", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16769977/" ]
You are not passing the expected parameters. In your mock-up I would expect to see ``` DECLARE @count int=0, @Date date='20190311' EXEC OrderBeforeDate @Date, @count OUT PRINT 'Number of Orders after 2019-03-11: ' + CAST(@count AS VARCHAR(10)) ``` I would also point out (as you presumably already know) this cursor...
Yor stored procedure expects 2 parameters while you pro ide only one. Date parameter is missing. Your cursor has infinite loop and yoyr procedure will never end Using a cursor for this is a verry bad idea, put your count in the sored procedure
68,967,488
Check if there are any orders before a given date (`Date` column). The procedure has a passing parameter "date" as date and another passing parameter "count". This parameter returns the number of orders before this date. The simple way of doing it would be: ``` SELECT COUNT([Sales].[dbo].[Order].[Date]) FROM [Sales]....
2021/08/28
[ "https://Stackoverflow.com/questions/68967488", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16769977/" ]
Thanks for all your input! I think it works now with the code like this: ``` CREATE OR ALTER PROC OrderBeforeDate(@date date, @count int out) AS BEGIN SET @count = 0; DECLARE cursor1 scroll cursor for SELECT [Sales].[dbo].[Order].[Date] FROM [Sales].[dbo].[Order] FOR READ ONLY OPEN cursor1; FETCH NEXT FROM cursor1...
Yor stored procedure expects 2 parameters while you pro ide only one. Date parameter is missing. Your cursor has infinite loop and yoyr procedure will never end Using a cursor for this is a verry bad idea, put your count in the sored procedure
152,448
I saw in a [recent answer](https://rpg.stackexchange.com/a/152447/15689) a reference to 1/3 casters and 1/2 casters, and have never encountered this terminology before: > > Paladin's are known as 1/2 casters, so their spell progression isn't as big as full casters. > > > What does it mean to be a 1/3 caster vs a...
2019/07/25
[ "https://rpg.stackexchange.com/questions/152448", "https://rpg.stackexchange.com", "https://rpg.stackexchange.com/users/15689/" ]
It refers to the speed at which classes gain spell slots and new levels of spells during their progression. Full casters (like a Wizard) gain spell slots fastest, while 1/3rd casters only gain slots and new spell levels at about a third that rate. The name "1/2 caster" and "1/3 caster" comes from the Multiclassing rul...
The fractions here come from the multiclassing rules: when figuring out what level of “multiclassed spellcaster” you are, in order to figure out your spell slots, you need to add your full level in some classes (like wizard), half your level in other classes (like paladin), and a third of your level in yet other classe...
152,448
I saw in a [recent answer](https://rpg.stackexchange.com/a/152447/15689) a reference to 1/3 casters and 1/2 casters, and have never encountered this terminology before: > > Paladin's are known as 1/2 casters, so their spell progression isn't as big as full casters. > > > What does it mean to be a 1/3 caster vs a...
2019/07/25
[ "https://rpg.stackexchange.com/questions/152448", "https://rpg.stackexchange.com", "https://rpg.stackexchange.com/users/15689/" ]
"1/X Caster" is shorthand for how quickly a character gains "spellcaster levels" (and with them, more spell slots) ================================================================================================================== The progression for each of these spellcaster types looks like this, with the first colum...
The fractions here come from the multiclassing rules: when figuring out what level of “multiclassed spellcaster” you are, in order to figure out your spell slots, you need to add your full level in some classes (like wizard), half your level in other classes (like paladin), and a third of your level in yet other classe...
152,448
I saw in a [recent answer](https://rpg.stackexchange.com/a/152447/15689) a reference to 1/3 casters and 1/2 casters, and have never encountered this terminology before: > > Paladin's are known as 1/2 casters, so their spell progression isn't as big as full casters. > > > What does it mean to be a 1/3 caster vs a...
2019/07/25
[ "https://rpg.stackexchange.com/questions/152448", "https://rpg.stackexchange.com", "https://rpg.stackexchange.com/users/15689/" ]
"1/X Caster" is shorthand for how quickly a character gains "spellcaster levels" (and with them, more spell slots) ================================================================================================================== The progression for each of these spellcaster types looks like this, with the first colum...
It refers to the speed at which classes gain spell slots and new levels of spells during their progression. Full casters (like a Wizard) gain spell slots fastest, while 1/3rd casters only gain slots and new spell levels at about a third that rate. The name "1/2 caster" and "1/3 caster" comes from the Multiclassing rul...
2,616,443
I'm looking for some examples which could show that normal topological space doesn't imply the space is paracompact. Thanks in advance.
2018/01/22
[ "https://math.stackexchange.com/questions/2616443", "https://math.stackexchange.com", "https://math.stackexchange.com/users/333019/" ]
The space $\omega\_1$, the set of countable ordinals, in the order topology, is hereditarily normal (as all ordered spaces), countably (para)compact, collectionwise normal, but not paracompact, because a paracompact countably compact is compact, which $\omega\_1$ is not. The nice resource [$\pi$-base](https://topolog...
An example is built here, have you read it: <https://projecteuclid.org/download/pdf_1/euclid.bams/1183549052>
501,816
I'm using C++ to understand how exactly pointers work. I have this piece of code using arrays, which I'm using just to understand how the equivalent works with pointers. ``` int main() { int arr[10] = {1,2,3}; char arr2[10] = {'c','i','a','o','\0'}; cout << arr << endl; cout << arr2 << endl; } ...
2009/02/01
[ "https://Stackoverflow.com/questions/501816", "https://Stackoverflow.com", "https://Stackoverflow.com/users/50394/" ]
Because cout's `operator <<` is overloaded for `char*` to output strings, and `arr2` matches that. If you want the address, try casting the character array as a void pointer.
There is a standard overload for char\* that outputs a NUL terminated string.
501,816
I'm using C++ to understand how exactly pointers work. I have this piece of code using arrays, which I'm using just to understand how the equivalent works with pointers. ``` int main() { int arr[10] = {1,2,3}; char arr2[10] = {'c','i','a','o','\0'}; cout << arr << endl; cout << arr2 << endl; } ...
2009/02/01
[ "https://Stackoverflow.com/questions/501816", "https://Stackoverflow.com", "https://Stackoverflow.com/users/50394/" ]
It's the operator<< that is overloaded for `const void*` and for `const char*`. Your char array is converted to `const char*` and passed to that overload, because it fits better than to `const void*`. The int array, however, is converted to `const void*` and passed to that version. The version of operator<< taking `con...
There is a standard overload for char\* that outputs a NUL terminated string.
501,816
I'm using C++ to understand how exactly pointers work. I have this piece of code using arrays, which I'm using just to understand how the equivalent works with pointers. ``` int main() { int arr[10] = {1,2,3}; char arr2[10] = {'c','i','a','o','\0'}; cout << arr << endl; cout << arr2 << endl; } ...
2009/02/01
[ "https://Stackoverflow.com/questions/501816", "https://Stackoverflow.com", "https://Stackoverflow.com/users/50394/" ]
It's the operator<< that is overloaded for `const void*` and for `const char*`. Your char array is converted to `const char*` and passed to that overload, because it fits better than to `const void*`. The int array, however, is converted to `const void*` and passed to that version. The version of operator<< taking `con...
Because cout's `operator <<` is overloaded for `char*` to output strings, and `arr2` matches that. If you want the address, try casting the character array as a void pointer.
501,816
I'm using C++ to understand how exactly pointers work. I have this piece of code using arrays, which I'm using just to understand how the equivalent works with pointers. ``` int main() { int arr[10] = {1,2,3}; char arr2[10] = {'c','i','a','o','\0'}; cout << arr << endl; cout << arr2 << endl; } ...
2009/02/01
[ "https://Stackoverflow.com/questions/501816", "https://Stackoverflow.com", "https://Stackoverflow.com/users/50394/" ]
Because cout's `operator <<` is overloaded for `char*` to output strings, and `arr2` matches that. If you want the address, try casting the character array as a void pointer.
While casting is probably a more meaningful approach, you could also use the addressof operator: ``` cout << &arr2 << endl; ```
501,816
I'm using C++ to understand how exactly pointers work. I have this piece of code using arrays, which I'm using just to understand how the equivalent works with pointers. ``` int main() { int arr[10] = {1,2,3}; char arr2[10] = {'c','i','a','o','\0'}; cout << arr << endl; cout << arr2 << endl; } ...
2009/02/01
[ "https://Stackoverflow.com/questions/501816", "https://Stackoverflow.com", "https://Stackoverflow.com/users/50394/" ]
It's the operator<< that is overloaded for `const void*` and for `const char*`. Your char array is converted to `const char*` and passed to that overload, because it fits better than to `const void*`. The int array, however, is converted to `const void*` and passed to that version. The version of operator<< taking `con...
While casting is probably a more meaningful approach, you could also use the addressof operator: ``` cout << &arr2 << endl; ```
46,226,287
I have a cluster/server with multiple nodes that handle requests from the application. The application the user is running, opens 2 web clients with the following URLs: * <https://myprocess.myapp.com/api/json/v1> * <https://myprocess.myapp.com/api/protobuf/v1> In order to support stickiness (I want each of the 2 web...
2017/09/14
[ "https://Stackoverflow.com/questions/46226287", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1806982/" ]
If you still have a problem, check that your CommunicationWebClient is not disposed too often. It disposes HttpClient but it behaves not as usually people expect. Checkout this article: <https://learn.microsoft.com/en-us/azure/architecture/antipatterns/improper-instantiation/> Shortly speaking when you dispose HttpCl...
In most cases, http client are recommended to use one per application. Disposing http client doesn't get throwing the socket it used right away .
38,439,194
I must create webhook endpoint that will consume JSON messages. Messages is send as x-www-form-urlencoded in form: > > key = json > > value = {"user\_Id": "728409840", "call\_id": "1114330","answered\_time": "2015-04-16 15:37:47"} > > > as shown in PostMan: [![enter image description here](https://i.stac...
2016/07/18
[ "https://Stackoverflow.com/questions/38439194", "https://Stackoverflow.com", "https://Stackoverflow.com/users/965722/" ]
You can use `JsonProperty` attribute for mapping json object properties to c# object properties: ``` public class CallDetails { [JsonProperty("user_id")] public string UserId { get; set; } [JsonProperty("call_id")] public string CallId { get; set; } [JsonProperty("answered_time")] public string...
Json.NET by NewtonSoft can help you [deserialize an object](http://www.newtonsoft.com/json/help/html/deserializeobject.htm). If your json property names don't match your actual class names you can write a custom converter to help. **EDIT** You could try this if you are on MVC6. Change your parameter from type `Tmp` t...
38,439,194
I must create webhook endpoint that will consume JSON messages. Messages is send as x-www-form-urlencoded in form: > > key = json > > value = {"user\_Id": "728409840", "call\_id": "1114330","answered\_time": "2015-04-16 15:37:47"} > > > as shown in PostMan: [![enter image description here](https://i.stac...
2016/07/18
[ "https://Stackoverflow.com/questions/38439194", "https://Stackoverflow.com", "https://Stackoverflow.com/users/965722/" ]
You can use `JsonProperty` attribute for mapping json object properties to c# object properties: ``` public class CallDetails { [JsonProperty("user_id")] public string UserId { get; set; } [JsonProperty("call_id")] public string CallId { get; set; } [JsonProperty("answered_time")] public string...
You don´t forget to decode the url encoded before use JObject.Parse ?, it´s maybe works. And the properties of the object don´t match the json atributes
39,729,591
Is there a way to clone an object with only few properties of the object in JS? For example.. ``` var Person = { name: "Bob", age: 32, salary: 20000 }; ``` I have to create another person object with just the name and age property so that it will look something like this : ``` var clonedPerson = { ...
2016/09/27
[ "https://Stackoverflow.com/questions/39729591", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1614244/" ]
Using the latest ES6, you can achieve this by the following code.. ```js const Person = { name: "Bob", age: 32, salary: 20000 }; const { salary , ...clonedPerson } = Person console.log(clonedPerson) ```
More simple? ```js var Person = { name: "Bob", age: 32, salary: 20000 }; var ClonedPerson = jQuery.extend({}, Person); delete ClonedPerson.salary; console.log(JSON.stringify(Person)); console.log(JSON.stringify(ClonedPerson)); ``` ```html <script src="https://ajax.googleapis.com/ajax/libs/jquery/...
39,729,591
Is there a way to clone an object with only few properties of the object in JS? For example.. ``` var Person = { name: "Bob", age: 32, salary: 20000 }; ``` I have to create another person object with just the name and age property so that it will look something like this : ``` var clonedPerson = { ...
2016/09/27
[ "https://Stackoverflow.com/questions/39729591", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1614244/" ]
More simple? ```js var Person = { name: "Bob", age: 32, salary: 20000 }; var ClonedPerson = jQuery.extend({}, Person); delete ClonedPerson.salary; console.log(JSON.stringify(Person)); console.log(JSON.stringify(ClonedPerson)); ``` ```html <script src="https://ajax.googleapis.com/ajax/libs/jquery/...
an alternative approach using Array member methods: ``` var clone = Object.keys(Person) // convert to an Array of Person keys .filter(function(key){return ["salary"].indexOf(key) == -1;}) // exclude key salary .reduce(function(clone, current){clone[current] = Person[current]; return clone;}, {}...
39,729,591
Is there a way to clone an object with only few properties of the object in JS? For example.. ``` var Person = { name: "Bob", age: 32, salary: 20000 }; ``` I have to create another person object with just the name and age property so that it will look something like this : ``` var clonedPerson = { ...
2016/09/27
[ "https://Stackoverflow.com/questions/39729591", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1614244/" ]
Using the latest ES6, you can achieve this by the following code.. ```js const Person = { name: "Bob", age: 32, salary: 20000 }; const { salary , ...clonedPerson } = Person console.log(clonedPerson) ```
an alternative approach using Array member methods: ``` var clone = Object.keys(Person) // convert to an Array of Person keys .filter(function(key){return ["salary"].indexOf(key) == -1;}) // exclude key salary .reduce(function(clone, current){clone[current] = Person[current]; return clone;}, {}...
16,817
My question is what are potential reasons for Naive Bayes to perform well on a train set but poorly on a test set? I am working with a variation of the [20news dataset](http://qwone.com/~jason/20Newsgroups/). The dataset has documents, which are represented as "bag of words" with no metadata. My goal is to classify ea...
2017/02/07
[ "https://datascience.stackexchange.com/questions/16817", "https://datascience.stackexchange.com", "https://datascience.stackexchange.com/users/23480/" ]
Text mining is rather a tricky field of machine learning application, since all you've got is "unstructured and semi structured data" and the preprocessing and feature extraction step matters a lot. [The text mining handbook](http://www.goodreads.com/book/show/893219.The_Text_Mining_Handbook) is a priceless reference i...
Unless you're doing it on some other related file, you're not removing stopwords. If label 16 makes a great use of such, that's a plausible explanation for such result. On the other hand (unless again, you're doing it on some other file) you're not reducing words to their morphemes. Not doing so might cause these kin...
16,817
My question is what are potential reasons for Naive Bayes to perform well on a train set but poorly on a test set? I am working with a variation of the [20news dataset](http://qwone.com/~jason/20Newsgroups/). The dataset has documents, which are represented as "bag of words" with no metadata. My goal is to classify ea...
2017/02/07
[ "https://datascience.stackexchange.com/questions/16817", "https://datascience.stackexchange.com", "https://datascience.stackexchange.com/users/23480/" ]
Let me try to answer your questions point by point. Perhaps you already solved your problem, but your questions are interesting and so perhaps other people can benefit from this discussion. * Is Naive Bayes overfitting to the training set? If Naive Bayes is implemented correctly, I don't think it should be overfitting...
Unless you're doing it on some other related file, you're not removing stopwords. If label 16 makes a great use of such, that's a plausible explanation for such result. On the other hand (unless again, you're doing it on some other file) you're not reducing words to their morphemes. Not doing so might cause these kin...
16,817
My question is what are potential reasons for Naive Bayes to perform well on a train set but poorly on a test set? I am working with a variation of the [20news dataset](http://qwone.com/~jason/20Newsgroups/). The dataset has documents, which are represented as "bag of words" with no metadata. My goal is to classify ea...
2017/02/07
[ "https://datascience.stackexchange.com/questions/16817", "https://datascience.stackexchange.com", "https://datascience.stackexchange.com/users/23480/" ]
Let me try to answer your questions point by point. Perhaps you already solved your problem, but your questions are interesting and so perhaps other people can benefit from this discussion. * Is Naive Bayes overfitting to the training set? If Naive Bayes is implemented correctly, I don't think it should be overfitting...
Text mining is rather a tricky field of machine learning application, since all you've got is "unstructured and semi structured data" and the preprocessing and feature extraction step matters a lot. [The text mining handbook](http://www.goodreads.com/book/show/893219.The_Text_Mining_Handbook) is a priceless reference i...
52,540,983
I have a quick question. I have a form with a for loop. Each for loop has a text box. I want to have two buttons that when I click on one, all the text boxes get populated with the value in the button. For example, when I click on the button "Add 50 minutes," I want all my text boxes to populate with 50. The same goes ...
2018/09/27
[ "https://Stackoverflow.com/questions/52540983", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9554984/" ]
Rather than hiding, showing, and repositioning the dice elements you have created, you could just create the element you need on click (with some css modifications to take advantage of the random number generation to help position the dots). As an aside, there is no real need for jQuery here, but it is used in the exam...
Something possessed me to create a Vanilla JS version of @benvc's excellent answer (upvoted). This uses the exact same strategy, but of course without the jQuery conveniences like `.empty()` and `.append()` I also chose to use `const` in place of `let` where possible, collapsed the determination of the class name "...
39,808,267
I have a script that inserts a new user into a table, and the user is defined by the id. I use the id in several other tables to relate certain aspects to that user. For example: ``` USER TABLE id | phone number CATEGORY TABLE id | userID | cat1 | cat2 TRACKING TABLE id | userID | track1 ``` In the three tables ab...
2016/10/01
[ "https://Stackoverflow.com/questions/39808267", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6605868/" ]
Use `last_insert_id()`: ``` insert into usertable ( phone ) values ( '12345' ); set @userid = last_insert_id(); insert into category ( userid, cat1, cat2 ) values (@userid, 'cat1', 'cat2'); insert into tracking ( userid, track1 ) values (@userid, 'track1'); ```
``` insert into usertable ( phone ) values ( '12345' ); insert into category ( userid, cat1, cat2 ) select u.id , 'cat1', 'cat2' from usertable u where u.phone='12345'; insert into tracking ( userid, track1 ) select id, 'track1' from usertable u where u.phone='12345'; ``` You should probably place a unique constraint...
26,939,837
For some reason im losing scope of ngtable params in my view , everything in ngtableparams is undefined ( i see in angularjs batarang binding ). my controller code is ``` this.contractsParams = new ngTableParams({ defaultSort: 'asc', counts: [], total: 10, // length of data getData: f...
2014/11/14
[ "https://Stackoverflow.com/questions/26939837", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1638366/" ]
For each condition there's a different answer For ``` coalesce(Indicator, 'N') = 'N' ``` You get ``` coalesce('N', 'N') = 'N' --> 'N' = 'N' --> True coalesce('Y', 'N') = 'N' --> 'Y' = 'N' --> False coalesce(Null, 'N') = 'N' --> 'N' = 'N' --> True ``` and for ``` coalesce(Indicator, 'N') = 'Y' ``` you get `...
The logic does two things. Functionally, the first expression is equivalent to: ``` (Indicator = 'N' or Indicator is null) ``` In addition, it also prevents an index from being used on `indicator` (in most databases). For a binary indicator, the use of the index is typically of minor importance. In addition, SQL op...
26,939,837
For some reason im losing scope of ngtable params in my view , everything in ngtableparams is undefined ( i see in angularjs batarang binding ). my controller code is ``` this.contractsParams = new ngTableParams({ defaultSort: 'asc', counts: [], total: 10, // length of data getData: f...
2014/11/14
[ "https://Stackoverflow.com/questions/26939837", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1638366/" ]
For each condition there's a different answer For ``` coalesce(Indicator, 'N') = 'N' ``` You get ``` coalesce('N', 'N') = 'N' --> 'N' = 'N' --> True coalesce('Y', 'N') = 'N' --> 'Y' = 'N' --> False coalesce(Null, 'N') = 'N' --> 'N' = 'N' --> True ``` and for ``` coalesce(Indicator, 'N') = 'Y' ``` you get `...
`coalesce(Indicator, 'N')` says if `Indicator is null` then take `N` as it's value else the value holded by `Indicator`. so, if `Indicator is null` then the below condition holds `TRUE` ``` coalesce(Indicator, 'N') = 'N' ```
65,856,095
How can I auto reload html page based on the value assigned to the session? ``` if ($_SESSION["LoadPage"]) { //Reload my html page } ``` I know how to use `<meta http-equiv="refresh" content="5" >` but it cannot start auto refresh itself without someone to refresh Please anyone can help me
2021/01/23
[ "https://Stackoverflow.com/questions/65856095", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13303505/" ]
Try; adb root This will switch the adb server as root.
According to android doc. > > Apps that run on Android 11 but target Android 10 (API level 29) can still request the requestLegacyExternalStorage attribute. > > > So try to change your target API level. Recommended way would be to use [ContentResolver](https://developer.android.com/reference/android/content/Conte...
65,856,095
How can I auto reload html page based on the value assigned to the session? ``` if ($_SESSION["LoadPage"]) { //Reload my html page } ``` I know how to use `<meta http-equiv="refresh" content="5" >` but it cannot start auto refresh itself without someone to refresh Please anyone can help me
2021/01/23
[ "https://Stackoverflow.com/questions/65856095", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13303505/" ]
Try `adb push test.txt /sdcard/`, this will work. On Android 11, we cannot access /mnt by ADB. But use the symlink is ok, see [this link](https://android.stackexchange.com/a/229825/342816) for details. I run `ls` command on the Android 11 emulator, we can see `sdcard -> ?` within `/mnt`, and `sdcard -> /storage/self/...
According to android doc. > > Apps that run on Android 11 but target Android 10 (API level 29) can still request the requestLegacyExternalStorage attribute. > > > So try to change your target API level. Recommended way would be to use [ContentResolver](https://developer.android.com/reference/android/content/Conte...
15,590,977
I have read [this](http://entityframework.codeplex.com/wikipage?title=Custom%20Conventions) documentation about convention in Entity Framework 6. But it does not contain convention for Relationship. Suppose I have following model: ``` [TablePrefix("mst")] public class Guru { public int Id { get; set; } publ...
2013/03/23
[ "https://Stackoverflow.com/questions/15590977", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1091308/" ]
firstly, you cannot change div's `background-color`, without changing its CSS `background-color` property. How could you? Guessing what you want is to maintain last background-color (for some action or to swap it back), then save it in some hidden input variables. And then, you can use it to display anywhere you want...
As Manish said, you cannot change the appearance of the div without changing the CSS property - but there are several hacky ways of doing the same thing. One example is to create a child div in each of the coloured squares that covers the entire area and then set the colour of that div to grey. You can then use the CSS...
15,590,977
I have read [this](http://entityframework.codeplex.com/wikipage?title=Custom%20Conventions) documentation about convention in Entity Framework 6. But it does not contain convention for Relationship. Suppose I have following model: ``` [TablePrefix("mst")] public class Guru { public int Id { get; set; } publ...
2013/03/23
[ "https://Stackoverflow.com/questions/15590977", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1091308/" ]
Not sure if I understand what you are going for... but would using :after work? ``` .card { position: relative; } .card:after { content: ""; display: block; position: absolute; left: 0; right: 0; top: 0; bottom: 0; background: black; } .card:hover:after { display: none; } ``` ...
firstly, you cannot change div's `background-color`, without changing its CSS `background-color` property. How could you? Guessing what you want is to maintain last background-color (for some action or to swap it back), then save it in some hidden input variables. And then, you can use it to display anywhere you want...
15,590,977
I have read [this](http://entityframework.codeplex.com/wikipage?title=Custom%20Conventions) documentation about convention in Entity Framework 6. But it does not contain convention for Relationship. Suppose I have following model: ``` [TablePrefix("mst")] public class Guru { public int Id { get; set; } publ...
2013/03/23
[ "https://Stackoverflow.com/questions/15590977", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1091308/" ]
Not sure if I understand what you are going for... but would using :after work? ``` .card { position: relative; } .card:after { content: ""; display: block; position: absolute; left: 0; right: 0; top: 0; bottom: 0; background: black; } .card:hover:after { display: none; } ``` ...
As Manish said, you cannot change the appearance of the div without changing the CSS property - but there are several hacky ways of doing the same thing. One example is to create a child div in each of the coloured squares that covers the entire area and then set the colour of that div to grey. You can then use the CSS...
51,282
I am using the `subfig` package for including subfigures into my thesis. That alone has been going without problem. However, as soon as I use the `\ContinuedFloat` command in order to split a figure over a single page, the following figure, which also uses the `\ContinuedFloat` command, just carries on with the subfig...
2012/04/09
[ "https://tex.stackexchange.com/questions/51282", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/13419/" ]
This question has been cross-posted to [LaTeX-Community.org](http://latex-community.org/) and there's a possible [solution](http://latex-community.org/forum/viewtopic.php?f=45&t=19752). The effect is caused by using the `float` package and the `H` option. Removing H and using `!htbp` instead (or less) fixed it for me.
Try to add `\setcounter{subfigure}{0}` in place where you want to reset the counter of subfig. In your case: ``` \documentclass[12pt,twoside,a4paper]{report} (...) \begin{figure}[H] \ContinuedFloat \centering \subfloat[]{\includegraphics[width=12cm]{...figue code...}} \caption[figure1]{figure1} \end{figure} \begin{...
51,282
I am using the `subfig` package for including subfigures into my thesis. That alone has been going without problem. However, as soon as I use the `\ContinuedFloat` command in order to split a figure over a single page, the following figure, which also uses the `\ContinuedFloat` command, just carries on with the subfig...
2012/04/09
[ "https://tex.stackexchange.com/questions/51282", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/13419/" ]
This question has been cross-posted to [LaTeX-Community.org](http://latex-community.org/) and there's a possible [solution](http://latex-community.org/forum/viewtopic.php?f=45&t=19752). The effect is caused by using the `float` package and the `H` option. Removing H and using `!htbp` instead (or less) fixed it for me.
I have used `\setcounter{subfigure}{number_initial}` or `\setcounter{figure}{number_initial}` and I have solved my problems. The new problem in this case is that you need to know the number or your figure/subfigure, but if you edit the text where your figures are located, this is a good option.
51,282
I am using the `subfig` package for including subfigures into my thesis. That alone has been going without problem. However, as soon as I use the `\ContinuedFloat` command in order to split a figure over a single page, the following figure, which also uses the `\ContinuedFloat` command, just carries on with the subfig...
2012/04/09
[ "https://tex.stackexchange.com/questions/51282", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/13419/" ]
The problem seems to go away if you don't use the `[H]` position specifier (you should also load `caption` before `subfig`). If you really must use `[H]`, you can put this in your preamble and use `\resetsubfigs` after `\begin{figure}` to reset the subfigure labels. ``` \makeatletter \newcommand\resetsubfigs{\setcoun...
Try to add `\setcounter{subfigure}{0}` in place where you want to reset the counter of subfig. In your case: ``` \documentclass[12pt,twoside,a4paper]{report} (...) \begin{figure}[H] \ContinuedFloat \centering \subfloat[]{\includegraphics[width=12cm]{...figue code...}} \caption[figure1]{figure1} \end{figure} \begin{...
51,282
I am using the `subfig` package for including subfigures into my thesis. That alone has been going without problem. However, as soon as I use the `\ContinuedFloat` command in order to split a figure over a single page, the following figure, which also uses the `\ContinuedFloat` command, just carries on with the subfig...
2012/04/09
[ "https://tex.stackexchange.com/questions/51282", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/13419/" ]
The problem seems to go away if you don't use the `[H]` position specifier (you should also load `caption` before `subfig`). If you really must use `[H]`, you can put this in your preamble and use `\resetsubfigs` after `\begin{figure}` to reset the subfigure labels. ``` \makeatletter \newcommand\resetsubfigs{\setcoun...
I have used `\setcounter{subfigure}{number_initial}` or `\setcounter{figure}{number_initial}` and I have solved my problems. The new problem in this case is that you need to know the number or your figure/subfigure, but if you edit the text where your figures are located, this is a good option.
51,282
I am using the `subfig` package for including subfigures into my thesis. That alone has been going without problem. However, as soon as I use the `\ContinuedFloat` command in order to split a figure over a single page, the following figure, which also uses the `\ContinuedFloat` command, just carries on with the subfig...
2012/04/09
[ "https://tex.stackexchange.com/questions/51282", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/13419/" ]
I have used `\setcounter{subfigure}{number_initial}` or `\setcounter{figure}{number_initial}` and I have solved my problems. The new problem in this case is that you need to know the number or your figure/subfigure, but if you edit the text where your figures are located, this is a good option.
Try to add `\setcounter{subfigure}{0}` in place where you want to reset the counter of subfig. In your case: ``` \documentclass[12pt,twoside,a4paper]{report} (...) \begin{figure}[H] \ContinuedFloat \centering \subfloat[]{\includegraphics[width=12cm]{...figue code...}} \caption[figure1]{figure1} \end{figure} \begin{...
2,682,259
**UPDATE** I have reverted back to Jquery 1.3.2 and everything is working, not sure what the problem is/was as I have not changed anything else apart of the jquery and ui library versions. **UPDATE END** I having an issue with the [JQuery UI datepicker](http://jqueryui.com/demos/datepicker/). The datepicker is bei...
2010/04/21
[ "https://Stackoverflow.com/questions/2682259", "https://Stackoverflow.com", "https://Stackoverflow.com/users/322194/" ]
I had the same issue: the Date Picker was added successfully (and could even be found in FireBug), but was not visible. If you use FireBug to remove the class "ui-helper-hidden-accessible" from the Date Picker div (ID of: "ui-datepicker-div"), the Date Picker becomes visible and will work like normal. If you add the f...
Just posting because the root cause for my case has not been described her. In my case the problem was that "assets/js/fuelux/treeview/fuelux.min.js" was adding a constructor .datepicker(), so that was overriding the assets/js/datetime/bootstrap-datepicker.js just moving the to be just before the $('.date-picker') ...
2,682,259
**UPDATE** I have reverted back to Jquery 1.3.2 and everything is working, not sure what the problem is/was as I have not changed anything else apart of the jquery and ui library versions. **UPDATE END** I having an issue with the [JQuery UI datepicker](http://jqueryui.com/demos/datepicker/). The datepicker is bei...
2010/04/21
[ "https://Stackoverflow.com/questions/2682259", "https://Stackoverflow.com", "https://Stackoverflow.com/users/322194/" ]
Had the same problem that the datepicker-DIV has been created but didnt get filled and show up on click. My fault was to give the input the class "hasDatepicker" staticly. jQuery-ui hat to set this class by its own. then it works for me.
Had the same problem while working with bootstrap modal. I had accidentally set the z-index for `.ui-datepicker` using `!important` which overrides the date picker z-index css attribute on the element. Removing `!important` worked.
2,682,259
**UPDATE** I have reverted back to Jquery 1.3.2 and everything is working, not sure what the problem is/was as I have not changed anything else apart of the jquery and ui library versions. **UPDATE END** I having an issue with the [JQuery UI datepicker](http://jqueryui.com/demos/datepicker/). The datepicker is bei...
2010/04/21
[ "https://Stackoverflow.com/questions/2682259", "https://Stackoverflow.com", "https://Stackoverflow.com/users/322194/" ]
Try putting the z-index of your datepicker css a lot higher (eg z-index: 1000). The datepicker is probably shown under your original content. I had the same problem and this helped me out.
In case you are having this issue when working with WordPress control panel and using a ThemeRoller generated theme - be sure that you are using 1.7.3 Version of theme, 1.8.13 will not work. (If you look closely, the element is being rendered, but .ui-helper-hidden-accessible is causing it to not be displayed. Curren...
2,682,259
**UPDATE** I have reverted back to Jquery 1.3.2 and everything is working, not sure what the problem is/was as I have not changed anything else apart of the jquery and ui library versions. **UPDATE END** I having an issue with the [JQuery UI datepicker](http://jqueryui.com/demos/datepicker/). The datepicker is bei...
2010/04/21
[ "https://Stackoverflow.com/questions/2682259", "https://Stackoverflow.com", "https://Stackoverflow.com/users/322194/" ]
Had the same problem that the datepicker-DIV has been created but didnt get filled and show up on click. My fault was to give the input the class "hasDatepicker" staticly. jQuery-ui hat to set this class by its own. then it works for me.
In case you are having this issue when working with WordPress control panel and using a ThemeRoller generated theme - be sure that you are using 1.7.3 Version of theme, 1.8.13 will not work. (If you look closely, the element is being rendered, but .ui-helper-hidden-accessible is causing it to not be displayed. Curren...
2,682,259
**UPDATE** I have reverted back to Jquery 1.3.2 and everything is working, not sure what the problem is/was as I have not changed anything else apart of the jquery and ui library versions. **UPDATE END** I having an issue with the [JQuery UI datepicker](http://jqueryui.com/demos/datepicker/). The datepicker is bei...
2010/04/21
[ "https://Stackoverflow.com/questions/2682259", "https://Stackoverflow.com", "https://Stackoverflow.com/users/322194/" ]
I was having the same problem, and I found that in my case the cause was the datepicker div for some reason is retaining the class .ui-helper-hidden-accessible, which has the following CSS: ``` .ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); } ...
I had the same issue: the Date Picker was added successfully (and could even be found in FireBug), but was not visible. If you use FireBug to remove the class "ui-helper-hidden-accessible" from the Date Picker div (ID of: "ui-datepicker-div"), the Date Picker becomes visible and will work like normal. If you add the f...
2,682,259
**UPDATE** I have reverted back to Jquery 1.3.2 and everything is working, not sure what the problem is/was as I have not changed anything else apart of the jquery and ui library versions. **UPDATE END** I having an issue with the [JQuery UI datepicker](http://jqueryui.com/demos/datepicker/). The datepicker is bei...
2010/04/21
[ "https://Stackoverflow.com/questions/2682259", "https://Stackoverflow.com", "https://Stackoverflow.com/users/322194/" ]
it's the css file in the new one doesn't work. Try to include the old 1.7.\* css file on your header too, and try again. Also, did you try to do a .datepicker( "show" ) right after it constructed?
I had the same issue: the Date Picker was added successfully (and could even be found in FireBug), but was not visible. If you use FireBug to remove the class "ui-helper-hidden-accessible" from the Date Picker div (ID of: "ui-datepicker-div"), the Date Picker becomes visible and will work like normal. If you add the f...
2,682,259
**UPDATE** I have reverted back to Jquery 1.3.2 and everything is working, not sure what the problem is/was as I have not changed anything else apart of the jquery and ui library versions. **UPDATE END** I having an issue with the [JQuery UI datepicker](http://jqueryui.com/demos/datepicker/). The datepicker is bei...
2010/04/21
[ "https://Stackoverflow.com/questions/2682259", "https://Stackoverflow.com", "https://Stackoverflow.com/users/322194/" ]
I've had a similar issue with 1.7.2 versions of jQuery and jQuery UI. The popup wasn't showing up and none of the applicable suggestions above helped. What helped in my case was taking out the class="hasDatepicker" which (as the accepted answer here notes: [jQuery UI datepicker will not display - full code included](ht...
Here is the full code, it's working from my side: just test. ``` <!doctype html> <html lang="en"> <head> <title>jQuery Datepicker</title> <link href="http://code.jquery.com/ui/1.10.4/themes/ui-lightness/jquery-ui.css" rel="stylesheet"> <script src="http://code.jquery.com/jquery-1.10.2.js"></script...
2,682,259
**UPDATE** I have reverted back to Jquery 1.3.2 and everything is working, not sure what the problem is/was as I have not changed anything else apart of the jquery and ui library versions. **UPDATE END** I having an issue with the [JQuery UI datepicker](http://jqueryui.com/demos/datepicker/). The datepicker is bei...
2010/04/21
[ "https://Stackoverflow.com/questions/2682259", "https://Stackoverflow.com", "https://Stackoverflow.com/users/322194/" ]
I had the same problem using JQuery-UI 1.8.21, and JQuery-UI 1.8.22. Problem was because I had two DatePicker script, one embedded with *jquery-ui-1.8.22.custom.min.js* and another one in *jquery.ui.datepicker.js* (an old version before I upgrade to 1.8.21). Deleting the **duplicate** *jquery.ui.datepicker.js*, resol...
``` * html .ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); } ``` This just works for IE, so I apply this hack and works fine on FF, Safari and others.
2,682,259
**UPDATE** I have reverted back to Jquery 1.3.2 and everything is working, not sure what the problem is/was as I have not changed anything else apart of the jquery and ui library versions. **UPDATE END** I having an issue with the [JQuery UI datepicker](http://jqueryui.com/demos/datepicker/). The datepicker is bei...
2010/04/21
[ "https://Stackoverflow.com/questions/2682259", "https://Stackoverflow.com", "https://Stackoverflow.com/users/322194/" ]
Had the same problem that the datepicker-DIV has been created but didnt get filled and show up on click. My fault was to give the input the class "hasDatepicker" staticly. jQuery-ui hat to set this class by its own. then it works for me.
Seems to happen with some themes (cupertino/theme.css) in my case. And the problem is the .ui-helper-hidden-accessible class which have clip property, like previous users said. Just Overwrite it and it will be fine ``` $(document).ready(function() { $("#datePicker").datepicker({ dateFormat: "yy-m-d" }); $('#...
2,682,259
**UPDATE** I have reverted back to Jquery 1.3.2 and everything is working, not sure what the problem is/was as I have not changed anything else apart of the jquery and ui library versions. **UPDATE END** I having an issue with the [JQuery UI datepicker](http://jqueryui.com/demos/datepicker/). The datepicker is bei...
2010/04/21
[ "https://Stackoverflow.com/questions/2682259", "https://Stackoverflow.com", "https://Stackoverflow.com/users/322194/" ]
I've had a similar issue with 1.7.2 versions of jQuery and jQuery UI. The popup wasn't showing up and none of the applicable suggestions above helped. What helped in my case was taking out the class="hasDatepicker" which (as the accepted answer here notes: [jQuery UI datepicker will not display - full code included](ht...
Seems to happen with some themes (cupertino/theme.css) in my case. And the problem is the .ui-helper-hidden-accessible class which have clip property, like previous users said. Just Overwrite it and it will be fine ``` $(document).ready(function() { $("#datePicker").datepicker({ dateFormat: "yy-m-d" }); $('#...
4,949,338
Is there any way to put a non printing or non obtrusive character at the beginning of a string of data in sqlserver. so that when an **order by** is performed, the string is sorted after the letter z alphabetically? I have used a space at the beginning of the string to get the string at the top of the sorted list, bu...
2011/02/09
[ "https://Stackoverflow.com/questions/4949338", "https://Stackoverflow.com", "https://Stackoverflow.com/users/105407/" ]
Since no one is venturing to answer your question properly, here's my answer **Given:** You are already adding `<space>` to some other data to make them appear top **Solution:** Add CHAR(160) to make it appear at the bottom. This is in reality also a space, but is designed for computer systems to not treat it as a wo...
Could you you include something like: ``` "<SORT1>This is my string" "<SORT2>I'd like this to go second" ``` And remove them later? I think using invisible characters is fragile and hacky.
4,949,338
Is there any way to put a non printing or non obtrusive character at the beginning of a string of data in sqlserver. so that when an **order by** is performed, the string is sorted after the letter z alphabetically? I have used a space at the beginning of the string to get the string at the top of the sorted list, bu...
2011/02/09
[ "https://Stackoverflow.com/questions/4949338", "https://Stackoverflow.com", "https://Stackoverflow.com/users/105407/" ]
Since no one is venturing to answer your question properly, here's my answer **Given:** You are already adding `<space>` to some other data to make them appear top **Solution:** Add CHAR(160) to make it appear at the bottom. This is in reality also a space, but is designed for computer systems to not treat it as a wo...
You could put a sort order in the query and use unions (no guarantees on performance). ``` select 1 as SortOrder, * from table where ... --first tier union select 2, * from table where ... --second tier order by SortOrder ```
4,949,338
Is there any way to put a non printing or non obtrusive character at the beginning of a string of data in sqlserver. so that when an **order by** is performed, the string is sorted after the letter z alphabetically? I have used a space at the beginning of the string to get the string at the top of the sorted list, bu...
2011/02/09
[ "https://Stackoverflow.com/questions/4949338", "https://Stackoverflow.com", "https://Stackoverflow.com/users/105407/" ]
Since no one is venturing to answer your question properly, here's my answer **Given:** You are already adding `<space>` to some other data to make them appear top **Solution:** Add CHAR(160) to make it appear at the bottom. This is in reality also a space, but is designed for computer systems to not treat it as a wo...
I'm with everyone else that the ideal way to do this is by adding an additional column for sort order. But if you don't want to add another column, and you already use a space for those items you want to appear at the top of the list, how do you feel about using a pipe (|) for items at the bottom of the list? [By def...
4,949,338
Is there any way to put a non printing or non obtrusive character at the beginning of a string of data in sqlserver. so that when an **order by** is performed, the string is sorted after the letter z alphabetically? I have used a space at the beginning of the string to get the string at the top of the sorted list, bu...
2011/02/09
[ "https://Stackoverflow.com/questions/4949338", "https://Stackoverflow.com", "https://Stackoverflow.com/users/105407/" ]
Since no one is venturing to answer your question properly, here's my answer **Given:** You are already adding `<space>` to some other data to make them appear top **Solution:** Add CHAR(160) to make it appear at the bottom. This is in reality also a space, but is designed for computer systems to not treat it as a wo...
In my opinion, an invisible character for this purpose is a bad idea because it pollutes the data. I would do exactly what you would rather not do and add a new column. To modify the idea slightly, you could implement it not as a sort order, but a grouping order, defaults to 0, where a negative integer puts the group ...
4,949,338
Is there any way to put a non printing or non obtrusive character at the beginning of a string of data in sqlserver. so that when an **order by** is performed, the string is sorted after the letter z alphabetically? I have used a space at the beginning of the string to get the string at the top of the sorted list, bu...
2011/02/09
[ "https://Stackoverflow.com/questions/4949338", "https://Stackoverflow.com", "https://Stackoverflow.com/users/105407/" ]
Since no one is venturing to answer your question properly, here's my answer **Given:** You are already adding `<space>` to some other data to make them appear top **Solution:** Add CHAR(160) to make it appear at the bottom. This is in reality also a space, but is designed for computer systems to not treat it as a wo...
You should use another column in the database to help specify the ordering rather than modifying the string: ``` SELECT * FROM yourtable ORDER BY sortorder, yourstring ``` Where you data might look like this: ``` yourstring sortorder foo 0 bar 0 baz ...
4,949,338
Is there any way to put a non printing or non obtrusive character at the beginning of a string of data in sqlserver. so that when an **order by** is performed, the string is sorted after the letter z alphabetically? I have used a space at the beginning of the string to get the string at the top of the sorted list, bu...
2011/02/09
[ "https://Stackoverflow.com/questions/4949338", "https://Stackoverflow.com", "https://Stackoverflow.com/users/105407/" ]
You should use another column in the database to help specify the ordering rather than modifying the string: ``` SELECT * FROM yourtable ORDER BY sortorder, yourstring ``` Where you data might look like this: ``` yourstring sortorder foo 0 bar 0 baz ...
Could you you include something like: ``` "<SORT1>This is my string" "<SORT2>I'd like this to go second" ``` And remove them later? I think using invisible characters is fragile and hacky.
4,949,338
Is there any way to put a non printing or non obtrusive character at the beginning of a string of data in sqlserver. so that when an **order by** is performed, the string is sorted after the letter z alphabetically? I have used a space at the beginning of the string to get the string at the top of the sorted list, bu...
2011/02/09
[ "https://Stackoverflow.com/questions/4949338", "https://Stackoverflow.com", "https://Stackoverflow.com/users/105407/" ]
Could you you include something like: ``` "<SORT1>This is my string" "<SORT2>I'd like this to go second" ``` And remove them later? I think using invisible characters is fragile and hacky.
I'm with everyone else that the ideal way to do this is by adding an additional column for sort order. But if you don't want to add another column, and you already use a space for those items you want to appear at the top of the list, how do you feel about using a pipe (|) for items at the bottom of the list? [By def...
4,949,338
Is there any way to put a non printing or non obtrusive character at the beginning of a string of data in sqlserver. so that when an **order by** is performed, the string is sorted after the letter z alphabetically? I have used a space at the beginning of the string to get the string at the top of the sorted list, bu...
2011/02/09
[ "https://Stackoverflow.com/questions/4949338", "https://Stackoverflow.com", "https://Stackoverflow.com/users/105407/" ]
You should use another column in the database to help specify the ordering rather than modifying the string: ``` SELECT * FROM yourtable ORDER BY sortorder, yourstring ``` Where you data might look like this: ``` yourstring sortorder foo 0 bar 0 baz ...
You could put a sort order in the query and use unions (no guarantees on performance). ``` select 1 as SortOrder, * from table where ... --first tier union select 2, * from table where ... --second tier order by SortOrder ```
4,949,338
Is there any way to put a non printing or non obtrusive character at the beginning of a string of data in sqlserver. so that when an **order by** is performed, the string is sorted after the letter z alphabetically? I have used a space at the beginning of the string to get the string at the top of the sorted list, bu...
2011/02/09
[ "https://Stackoverflow.com/questions/4949338", "https://Stackoverflow.com", "https://Stackoverflow.com/users/105407/" ]
Could you you include something like: ``` "<SORT1>This is my string" "<SORT2>I'd like this to go second" ``` And remove them later? I think using invisible characters is fragile and hacky.
In my opinion, an invisible character for this purpose is a bad idea because it pollutes the data. I would do exactly what you would rather not do and add a new column. To modify the idea slightly, you could implement it not as a sort order, but a grouping order, defaults to 0, where a negative integer puts the group ...
4,949,338
Is there any way to put a non printing or non obtrusive character at the beginning of a string of data in sqlserver. so that when an **order by** is performed, the string is sorted after the letter z alphabetically? I have used a space at the beginning of the string to get the string at the top of the sorted list, bu...
2011/02/09
[ "https://Stackoverflow.com/questions/4949338", "https://Stackoverflow.com", "https://Stackoverflow.com/users/105407/" ]
You should use another column in the database to help specify the ordering rather than modifying the string: ``` SELECT * FROM yourtable ORDER BY sortorder, yourstring ``` Where you data might look like this: ``` yourstring sortorder foo 0 bar 0 baz ...
In my opinion, an invisible character for this purpose is a bad idea because it pollutes the data. I would do exactly what you would rather not do and add a new column. To modify the idea slightly, you could implement it not as a sort order, but a grouping order, defaults to 0, where a negative integer puts the group ...
36,701,729
I'm having trouble writing a MySQL subquery. The SALES table has the column names: ``` sales_date | staff_id | sales_amount ``` to record each individual employee's sales. What I'm trying to achieve with this query is a table that displays the average daily sales for a selected employee as well as the average dail...
2016/04/18
[ "https://Stackoverflow.com/questions/36701729", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6214240/" ]
I use Oracle, so there will likely be a typo in this MySQL SQL. But, I hope it works properly... You have two concepts: Average sales for everyone per day and average sales per user per day. You want to join those two things together. You can easily. First, you have the average sales per day. ``` select sales_date, ...
You can join a table to itself in a query, rather than use a subquery. Try this: ``` SELECT sales.staff_id, sales.sales_date, AVG(sales.sales_amount), AVG(emp.sales_amount) FROM sales LEFT JOIN sales emp ON (emp.staff_id=$staff_id) WHERE sales.staff_id=$staff_id GROUP BY sales_date; ``` So essentially this creates a...
16,140,415
I'm struggling to handle the back button and ask confirmation to the user, if app state is dirty. Closing tab and reload is already handled via the `onbeforeunload` hook. I've played with `$routeChangeStart`, `$beforeRouteChange`, etc. but can't handle it correctly. With `$routeChangeStart`, the route is effectively c...
2013/04/22
[ "https://Stackoverflow.com/questions/16140415", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1506051/" ]
you could use: ``` $scope.$on('$routeChangeStart', function(next, current) { //broadcasted before a route change // do something here }); ``` See more of it on : [$route](http://docs.angularjs.org/api/ng.%24route)
Keep a model of the dirty state in a parent controller, common to all views? An alert/confirm appears if a dirty state is detected by any view's controller, with a "Cancel" button that resets $location.path(...) to the dirty page.
16,140,415
I'm struggling to handle the back button and ask confirmation to the user, if app state is dirty. Closing tab and reload is already handled via the `onbeforeunload` hook. I've played with `$routeChangeStart`, `$beforeRouteChange`, etc. but can't handle it correctly. With `$routeChangeStart`, the route is effectively c...
2013/04/22
[ "https://Stackoverflow.com/questions/16140415", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1506051/" ]
I believe $locationChangeStart fires when you would like it to.
you could use: ``` $scope.$on('$routeChangeStart', function(next, current) { //broadcasted before a route change // do something here }); ``` See more of it on : [$route](http://docs.angularjs.org/api/ng.%24route)
16,140,415
I'm struggling to handle the back button and ask confirmation to the user, if app state is dirty. Closing tab and reload is already handled via the `onbeforeunload` hook. I've played with `$routeChangeStart`, `$beforeRouteChange`, etc. but can't handle it correctly. With `$routeChangeStart`, the route is effectively c...
2013/04/22
[ "https://Stackoverflow.com/questions/16140415", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1506051/" ]
I believe $locationChangeStart fires when you would like it to.
Keep a model of the dirty state in a parent controller, common to all views? An alert/confirm appears if a dirty state is detected by any view's controller, with a "Cancel" button that resets $location.path(...) to the dirty page.
34,369,398
[![enter image description here](https://i.stack.imgur.com/hJUjp.png)](https://i.stack.imgur.com/hJUjp.png) Hi All, Does any of you face this problem before? My Android studio stuck on startup. I've tried restart/shut down. Btw, my android studio version is 1.5 on mac
2015/12/19
[ "https://Stackoverflow.com/questions/34369398", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2128070/" ]
If you experience system crash or system auto restart, then please be patient. It take sometime to startup and everything will back to normal :) cheer!
You should go to the %appdata% and delete InteliJ folder, after that run program as administrator. This is probably caused by: * No space on partition * No write permission in %appdata% * Bug If it does not work, try to reinstall. ... 1 more! * Slow write speed or compute speed so it takes much more time as usual.
28,882,907
I know I can get the first character of a line of standard input by using getchar(), but I *only* want the first character of each line. Is there a function I can use to get rid of the rest of the string entered into standard input (if it is more than one character)? if not, what methodology should I consider using to ...
2015/03/05
[ "https://Stackoverflow.com/questions/28882907", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3735278/" ]
``` char buf[100]; while(fgets(buf,sizeof(buf),stdin) != NULL) { if(strlen(buf)>0) buf[1] = '\0'; printf("%s",buf); } ``` Read the whole line using `fgets()` and just nul terminate it after the first character.
``` #include <stdio.h> int main(void) { int ch; size_t len; for (len = 0; 1; ) { ch = getc(stdin); if (ch == EOF) break; if (!len++) putc(ch, stdout); /* the first character on a line */ if (ch == '\n') len = 0; /* the line has ended */ } return 0; } ``` Please ...
28,882,907
I know I can get the first character of a line of standard input by using getchar(), but I *only* want the first character of each line. Is there a function I can use to get rid of the rest of the string entered into standard input (if it is more than one character)? if not, what methodology should I consider using to ...
2015/03/05
[ "https://Stackoverflow.com/questions/28882907", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3735278/" ]
``` char buf[100]; while(fgets(buf,sizeof(buf),stdin) != NULL) { if(strlen(buf)>0) buf[1] = '\0'; printf("%s",buf); } ``` Read the whole line using `fgets()` and just nul terminate it after the first character.
``` // Get the character you need char c = getchar(); // Skip the rest int a; while((a = getchar()) != '\n' && a != EOF); ``` If you know how many lines you'll have, you can put it in a loop.
11,584,745
I'm writing a shell script with `#!/bin/sh` as the first line so that the script exits on the first error. There are a few lines in the file that are in the form of `command || true` so that the script doesn't exit right there if the command fails. However, I still want to know know the exit code of the command. How wo...
2012/07/20
[ "https://Stackoverflow.com/questions/11584745", "https://Stackoverflow.com", "https://Stackoverflow.com/users/381521/" ]
Your question appears to imply `set -e`. Assuming `set -e`: Instead of `command || true` you can use `command || exitCode=$?`. The script will continue and the exit status of `command` is captured in `exitCode`. `$?` is an internal variable that keeps the exit code of the last command. Since `||` short-circuits if ...
If you want to know the status of the command, then presumably you take different actions depending on its value. In which case your code should look something like: ``` if command; then # do something when command succeeds else # do something when command fails fi ``` In that case you don't need to do anyth...
35,922,016
I have been struggling on how to get the quantity of distinct values from a collection in Eloquent. I have been trying several methods, such as unique(), values(), etc., found on the [docs](https://laravel.com/docs/5.2/collections). Even though there is indeed a count() method, there is no method to get the count of d...
2016/03/10
[ "https://Stackoverflow.com/questions/35922016", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1883256/" ]
Update for 2021/L6+ *thanks @JeremyWadhams* ```php $degrees->groupBy('Degree')->map(fn ($people) => $people->count()); // or using HigherOrder proxy on the collection $degrees->groupBy('Degree')->map->count(); ``` --- Using collection methods this would be it: ```php $degrees->groupBy('Degree')->map(function ($pe...
Could also do the following: ``` $master = $degrees->sum('Master'); return $master; $bachelor = $degrees->sum('Bachelor'); return $bachelor; $phD = $degrees->sum('PhD'); return $phD; ```
35,922,016
I have been struggling on how to get the quantity of distinct values from a collection in Eloquent. I have been trying several methods, such as unique(), values(), etc., found on the [docs](https://laravel.com/docs/5.2/collections). Even though there is indeed a count() method, there is no method to get the count of d...
2016/03/10
[ "https://Stackoverflow.com/questions/35922016", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1883256/" ]
Update for 2021/L6+ *thanks @JeremyWadhams* ```php $degrees->groupBy('Degree')->map(fn ($people) => $people->count()); // or using HigherOrder proxy on the collection $degrees->groupBy('Degree')->map->count(); ``` --- Using collection methods this would be it: ```php $degrees->groupBy('Degree')->map(function ($pe...
There is a Collection Helper called CountBy, does exactly what you need. [Collections CountBy](https://laravel.com/docs/8.x/collections#method-countBy) ``` $degrees->countBy('Degree'); ``` It will retourn as expected ``` Array ( [Master] => 13 [Bachelor] => 9 [PhD] => 3 ) ``` Simple :D
35,922,016
I have been struggling on how to get the quantity of distinct values from a collection in Eloquent. I have been trying several methods, such as unique(), values(), etc., found on the [docs](https://laravel.com/docs/5.2/collections). Even though there is indeed a count() method, there is no method to get the count of d...
2016/03/10
[ "https://Stackoverflow.com/questions/35922016", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1883256/" ]
There is a Collection Helper called CountBy, does exactly what you need. [Collections CountBy](https://laravel.com/docs/8.x/collections#method-countBy) ``` $degrees->countBy('Degree'); ``` It will retourn as expected ``` Array ( [Master] => 13 [Bachelor] => 9 [PhD] => 3 ) ``` Simple :D
Could also do the following: ``` $master = $degrees->sum('Master'); return $master; $bachelor = $degrees->sum('Bachelor'); return $bachelor; $phD = $degrees->sum('PhD'); return $phD; ```
38,162,681
I want the user to input the coordinates of 4 points such as (xa,ya),(xb,yb),(xc,yc),(xd,yd) but all of it at once. I used this code: > > xa=input("Enter x-coordinate for node 1:") > > > ya=input("Enter y-coordinate for node 1:") > > > xb=input("Enter x-coordinate for node 2:") > > > yb=input("Enter y-coordinat...
2016/07/02
[ "https://Stackoverflow.com/questions/38162681", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6542071/" ]
You can do that using the [jQuery - insertBefore](http://api.jquery.com/insertbefore/) method. I have updated your [jsFiddle](https://jsfiddle.net/sjncgaLf/10/) ``` $(document).ready(function() { // create elements var test = $('<div class = "test">test</div>'); var el = $('<div class = "el">el</div>'); // add...
Based on your update, you just need to edit your variable, not worry about appending data in order. So for your $markup variable, if it already has data and you want to add your month label at the beginning, just use: ``` $temp = $label + $markup; $markup = $temp; ``` To add weeks or day data to the end of your $ma...
38,162,681
I want the user to input the coordinates of 4 points such as (xa,ya),(xb,yb),(xc,yc),(xd,yd) but all of it at once. I used this code: > > xa=input("Enter x-coordinate for node 1:") > > > ya=input("Enter y-coordinate for node 1:") > > > xb=input("Enter x-coordinate for node 2:") > > > yb=input("Enter y-coordinat...
2016/07/02
[ "https://Stackoverflow.com/questions/38162681", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6542071/" ]
try like this. ``` $("body").append(el,test); ``` the updated fiddle : <https://jsfiddle.net/sjncgaLf/14/>
Based on your update, you just need to edit your variable, not worry about appending data in order. So for your $markup variable, if it already has data and you want to add your month label at the beginning, just use: ``` $temp = $label + $markup; $markup = $temp; ``` To add weeks or day data to the end of your $ma...
31,741,744
I am struggling with debugging my WatchKit Extension/App on a real Apple Watch. Debugging both the iPhone App and the WatchKit Extension using the simulator the simulator is not problem: 1. Select the WatchKit App Profile and run in Simulator ==> App is launched on in Watch Simulator and I can use breakpoints in the *...
2015/07/31
[ "https://Stackoverflow.com/questions/31741744", "https://Stackoverflow.com", "https://Stackoverflow.com/users/777861/" ]
I am having the same kind of issue but to improve a little bit the debugging experience I usually restart my devices a few times. Try to restart your Apple Watch or your iPhone. Before launching your app from Xcode, make sure that the app is completely closed on your Apple Watch (not stuck in the loading screen for ex...
Here's a technique that seems to be be the most reliable for me, even though it still only works about 25% of the time (Xcode 7 beta 4, 7A165t): 1. Run the phone target in debug (on your actual iPhone of course) 2. While the iPhone app is still running, switch to the watch target and run that in debug. 3. Keep an eye ...
31,741,744
I am struggling with debugging my WatchKit Extension/App on a real Apple Watch. Debugging both the iPhone App and the WatchKit Extension using the simulator the simulator is not problem: 1. Select the WatchKit App Profile and run in Simulator ==> App is launched on in Watch Simulator and I can use breakpoints in the *...
2015/07/31
[ "https://Stackoverflow.com/questions/31741744", "https://Stackoverflow.com", "https://Stackoverflow.com/users/777861/" ]
thank you for your answers. I finally managed to get the debugging running (most of the time) on my real Apple Watch. However it is quite cumbersome and not very reliable. There is not enough space in the comments so I will use this answer to describe my solution. Maybe it is help full to other: 1. Make sure, the App ...
I am having the same kind of issue but to improve a little bit the debugging experience I usually restart my devices a few times. Try to restart your Apple Watch or your iPhone. Before launching your app from Xcode, make sure that the app is completely closed on your Apple Watch (not stuck in the loading screen for ex...
31,741,744
I am struggling with debugging my WatchKit Extension/App on a real Apple Watch. Debugging both the iPhone App and the WatchKit Extension using the simulator the simulator is not problem: 1. Select the WatchKit App Profile and run in Simulator ==> App is launched on in Watch Simulator and I can use breakpoints in the *...
2015/07/31
[ "https://Stackoverflow.com/questions/31741744", "https://Stackoverflow.com", "https://Stackoverflow.com/users/777861/" ]
I am having the same kind of issue but to improve a little bit the debugging experience I usually restart my devices a few times. Try to restart your Apple Watch or your iPhone. Before launching your app from Xcode, make sure that the app is completely closed on your Apple Watch (not stuck in the loading screen for ex...
This question has different answers. All are good. The reason is: in my experience there are at least two different problems that prevent debugging on a real watch. Both require a different strategy. This answer tries to help you to decide when to use which strategy. 1. XCode installs, tells you it is running for a ...
31,741,744
I am struggling with debugging my WatchKit Extension/App on a real Apple Watch. Debugging both the iPhone App and the WatchKit Extension using the simulator the simulator is not problem: 1. Select the WatchKit App Profile and run in Simulator ==> App is launched on in Watch Simulator and I can use breakpoints in the *...
2015/07/31
[ "https://Stackoverflow.com/questions/31741744", "https://Stackoverflow.com", "https://Stackoverflow.com/users/777861/" ]
thank you for your answers. I finally managed to get the debugging running (most of the time) on my real Apple Watch. However it is quite cumbersome and not very reliable. There is not enough space in the comments so I will use this answer to describe my solution. Maybe it is help full to other: 1. Make sure, the App ...
Here's a technique that seems to be be the most reliable for me, even though it still only works about 25% of the time (Xcode 7 beta 4, 7A165t): 1. Run the phone target in debug (on your actual iPhone of course) 2. While the iPhone app is still running, switch to the watch target and run that in debug. 3. Keep an eye ...
31,741,744
I am struggling with debugging my WatchKit Extension/App on a real Apple Watch. Debugging both the iPhone App and the WatchKit Extension using the simulator the simulator is not problem: 1. Select the WatchKit App Profile and run in Simulator ==> App is launched on in Watch Simulator and I can use breakpoints in the *...
2015/07/31
[ "https://Stackoverflow.com/questions/31741744", "https://Stackoverflow.com", "https://Stackoverflow.com/users/777861/" ]
thank you for your answers. I finally managed to get the debugging running (most of the time) on my real Apple Watch. However it is quite cumbersome and not very reliable. There is not enough space in the comments so I will use this answer to describe my solution. Maybe it is help full to other: 1. Make sure, the App ...
This question has different answers. All are good. The reason is: in my experience there are at least two different problems that prevent debugging on a real watch. Both require a different strategy. This answer tries to help you to decide when to use which strategy. 1. XCode installs, tells you it is running for a ...
548,196
I would like to get an auto-updating version of Firefox Developer Edition rather than a [once-off installation](https://askubuntu.com/questions/548003). From [comments on the announcement](https://hacks.mozilla.org/2014/11/mozilla-introduces-the-first-browser-built-for-developers-firefox-developer-edition/comment-page-...
2014/11/11
[ "https://askubuntu.com/questions/548196", "https://askubuntu.com", "https://askubuntu.com/users/7146/" ]
The [OMG! Ubuntu! post covering the announcement](http://www.omgubuntu.co.uk/2014/11/mozilla-releases-firefox-developer-edition) notes that the version released is [Aurora 35.0a2](https://www.mozilla.org/en-US/firefox/35.0a2/auroranotes/) which matches [the version in the PPA](https://launchpad.net/~ubuntu-mozilla-dail...
You can actually get firefox's built-in auto-update to work if you have manually installed it. Just set the ownership and permissions so your regular user can write to the install directory. Assuming your user belongs to the `sudo` group and firefox has been installed in `/opt/firefox-dev`: ``` sudo chown -R root:sud...
169,360
**Plot Details/Summary** Another one where I have only sketchy memories of the tale, I fear. The setting for this one is the near future (from the writer's perspective, which I think was the 1970s). Man's reached a point where bloodshed and loss of life are no longer necessary to settle conflicts. Instead, all dispute...
2017/09/10
[ "https://scifi.stackexchange.com/questions/169360", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/69621/" ]
["A Short History of World War LXXVIII"](https://www.isfdb.org/cgi-bin/title.cgi?50251), a short story by [Roy L. Prosterman](https://www.isfdb.org/cgi-bin/ea.cgi?12378) in [*Analog Science Fiction/Science Fact*, April 1977](https://www.isfdb.org/cgi-bin/pl.cgi?57054+c). **Man's reached a point where bloodshed and los...
I read this one or something a whole lot like it, I think in a 1970s edition of Analog. The version I read was a "war" between "Usa" (that one I remember) and Arabia (although I don't think it was called that). Two robots fight it out on the moon, Usa wins (of course). The kicker line was that oil prices would remain ...
47,307,950
I'm completely new to Assembly and looking to confirm where, in the following statements, I have a misunderstanding and need to be corrected. **The stack pointer** (`ESP`) refers to the top (lowest memory address) of the stack. **The base Pointer** (`EBP`) is used for temporarily storing various memory addresses when...
2017/11/15
[ "https://Stackoverflow.com/questions/47307950", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2386745/" ]
> > Arguments being passed into a function are generally moved into an address space which is an offset of the stack pointer. ie. [ESP-12]. > > > Often arguments are pushed on the stack, **before** the call. ``` push paramA ; ( some 32bit value, register, whatever ) push paramB call myFunct ``` This leads to t...
> > Once something has been pushed to the stack, it can't be changed in-place. ie. If we PUSH EBP to the stack, we are pushing the current value of EBP, not some kind of reference or pointer to it. **We can't then change that value in-place.** > > > Sure you can. Stack is ordinary computer memory, there's nothing ...
248,580
I'm having a problem, creating a fixed-size overall panel for a touchscreen GUI application that has to take up the entire screen. In a nutshell, the touchscreen is 800 x 600 pixels, and therefore I want the main GUI panel to be that size. When I start a new GUI project in NetBeans, I set the properties of the main pa...
2008/10/29
[ "https://Stackoverflow.com/questions/248580", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Have you tried [java full screen mode](http://java.sun.com/docs/books/tutorial/extra/fullscreen/index.html)?
I use this method to complete the task, not sure if its the best and you need to wait calling it until the frame is actually on the screen. ``` protected void growBig() { int screenWidth = java.awt.Toolkit.getDefaultToolkit().getScreenSize().width; int screenHeight = java.awt.Toolkit.getDefaultToolkit().get...
248,580
I'm having a problem, creating a fixed-size overall panel for a touchscreen GUI application that has to take up the entire screen. In a nutshell, the touchscreen is 800 x 600 pixels, and therefore I want the main GUI panel to be that size. When I start a new GUI project in NetBeans, I set the properties of the main pa...
2008/10/29
[ "https://Stackoverflow.com/questions/248580", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Have you tried [java full screen mode](http://java.sun.com/docs/books/tutorial/extra/fullscreen/index.html)?
I'm not sure how your touchscreen device works. But if you use Netbeans preview your panel is put in some outer container like JFrame/JWindow. And just maybe you set the frame to 800x600. If so, then the problem might be that the frame eats a few pixels for its own border, leaving your panel size < 800x600. And in tha...
20,407,906
I'm trying to get objects to "slide in" from the bottom of the screen, but since I can't get the screen height as a unit in CSS, I'm trying to do this with media queries, like so: ``` @media(max-height:500px) { @keyframe slideUp { 0% { transform: translate3d(0,500px,0); } 100% { transform: translate3d(0,...
2013/12/05
[ "https://Stackoverflow.com/questions/20407906", "https://Stackoverflow.com", "https://Stackoverflow.com/users/221814/" ]
A way of doing a slide up animation regardless of screen or element height is to use `position: fixed`: ``` .box { position: fixed; animation: slideUp 1s forwards; } @keyframes slideUp { from { top: 100%; } to { top: 0; } } ``` **Demo:** <http://jsfiddle.net/myajouri/Kvtd2/> If you want to slide r...
If you have to use `translate3d` to get hardware acceleration on mobile devices (as you mentioned), and given that you can't use at-rules inside `@media`: You could define one `@keyframes` with large `translateX` (say `5000px`) and change the `animation-duration` based on the screen height to ensure the speed is more ...
20,407,906
I'm trying to get objects to "slide in" from the bottom of the screen, but since I can't get the screen height as a unit in CSS, I'm trying to do this with media queries, like so: ``` @media(max-height:500px) { @keyframe slideUp { 0% { transform: translate3d(0,500px,0); } 100% { transform: translate3d(0,...
2013/12/05
[ "https://Stackoverflow.com/questions/20407906", "https://Stackoverflow.com", "https://Stackoverflow.com/users/221814/" ]
I don't know why no one else has suggested this, but instead of setting the keyframes in the media query you can set the animation in the media query. ``` @media(max-height:500px) { #selectorGroup { animation: slideUp500 1s forwards; } } @media(max-height:750px) { #selectorGroup { animat...
A way of doing a slide up animation regardless of screen or element height is to use `position: fixed`: ``` .box { position: fixed; animation: slideUp 1s forwards; } @keyframes slideUp { from { top: 100%; } to { top: 0; } } ``` **Demo:** <http://jsfiddle.net/myajouri/Kvtd2/> If you want to slide r...
20,407,906
I'm trying to get objects to "slide in" from the bottom of the screen, but since I can't get the screen height as a unit in CSS, I'm trying to do this with media queries, like so: ``` @media(max-height:500px) { @keyframe slideUp { 0% { transform: translate3d(0,500px,0); } 100% { transform: translate3d(0,...
2013/12/05
[ "https://Stackoverflow.com/questions/20407906", "https://Stackoverflow.com", "https://Stackoverflow.com/users/221814/" ]
Nowadays you can solve this using native CSS variables. In your case: ``` @media(max-height:500px) { :root { --slide-up-y: 500px } } @media(max-height:750px) { :root { --slide-up-y: 750px } } @keyframes slideUp { 0% { transform: translate3d(0,var(--slide-up-y),0); } 100% ...
A way of doing a slide up animation regardless of screen or element height is to use `position: fixed`: ``` .box { position: fixed; animation: slideUp 1s forwards; } @keyframes slideUp { from { top: 100%; } to { top: 0; } } ``` **Demo:** <http://jsfiddle.net/myajouri/Kvtd2/> If you want to slide r...
20,407,906
I'm trying to get objects to "slide in" from the bottom of the screen, but since I can't get the screen height as a unit in CSS, I'm trying to do this with media queries, like so: ``` @media(max-height:500px) { @keyframe slideUp { 0% { transform: translate3d(0,500px,0); } 100% { transform: translate3d(0,...
2013/12/05
[ "https://Stackoverflow.com/questions/20407906", "https://Stackoverflow.com", "https://Stackoverflow.com/users/221814/" ]
I don't know why no one else has suggested this, but instead of setting the keyframes in the media query you can set the animation in the media query. ``` @media(max-height:500px) { #selectorGroup { animation: slideUp500 1s forwards; } } @media(max-height:750px) { #selectorGroup { animat...
If you have to use `translate3d` to get hardware acceleration on mobile devices (as you mentioned), and given that you can't use at-rules inside `@media`: You could define one `@keyframes` with large `translateX` (say `5000px`) and change the `animation-duration` based on the screen height to ensure the speed is more ...
20,407,906
I'm trying to get objects to "slide in" from the bottom of the screen, but since I can't get the screen height as a unit in CSS, I'm trying to do this with media queries, like so: ``` @media(max-height:500px) { @keyframe slideUp { 0% { transform: translate3d(0,500px,0); } 100% { transform: translate3d(0,...
2013/12/05
[ "https://Stackoverflow.com/questions/20407906", "https://Stackoverflow.com", "https://Stackoverflow.com/users/221814/" ]
Long time since this question was asked. But I'm seeing that nobody has answered the solution that I'll give you, and this one, in my opinion, is easier than creating different `media-queries` for different screen sizes. @myajouri proposed you to use a `fixed` position and you discarded this solution because you need ...
If you have to use `translate3d` to get hardware acceleration on mobile devices (as you mentioned), and given that you can't use at-rules inside `@media`: You could define one `@keyframes` with large `translateX` (say `5000px`) and change the `animation-duration` based on the screen height to ensure the speed is more ...
20,407,906
I'm trying to get objects to "slide in" from the bottom of the screen, but since I can't get the screen height as a unit in CSS, I'm trying to do this with media queries, like so: ``` @media(max-height:500px) { @keyframe slideUp { 0% { transform: translate3d(0,500px,0); } 100% { transform: translate3d(0,...
2013/12/05
[ "https://Stackoverflow.com/questions/20407906", "https://Stackoverflow.com", "https://Stackoverflow.com/users/221814/" ]
Nowadays you can solve this using native CSS variables. In your case: ``` @media(max-height:500px) { :root { --slide-up-y: 500px } } @media(max-height:750px) { :root { --slide-up-y: 750px } } @keyframes slideUp { 0% { transform: translate3d(0,var(--slide-up-y),0); } 100% ...
If you have to use `translate3d` to get hardware acceleration on mobile devices (as you mentioned), and given that you can't use at-rules inside `@media`: You could define one `@keyframes` with large `translateX` (say `5000px`) and change the `animation-duration` based on the screen height to ensure the speed is more ...
20,407,906
I'm trying to get objects to "slide in" from the bottom of the screen, but since I can't get the screen height as a unit in CSS, I'm trying to do this with media queries, like so: ``` @media(max-height:500px) { @keyframe slideUp { 0% { transform: translate3d(0,500px,0); } 100% { transform: translate3d(0,...
2013/12/05
[ "https://Stackoverflow.com/questions/20407906", "https://Stackoverflow.com", "https://Stackoverflow.com/users/221814/" ]
I don't know why no one else has suggested this, but instead of setting the keyframes in the media query you can set the animation in the media query. ``` @media(max-height:500px) { #selectorGroup { animation: slideUp500 1s forwards; } } @media(max-height:750px) { #selectorGroup { animat...
Long time since this question was asked. But I'm seeing that nobody has answered the solution that I'll give you, and this one, in my opinion, is easier than creating different `media-queries` for different screen sizes. @myajouri proposed you to use a `fixed` position and you discarded this solution because you need ...
20,407,906
I'm trying to get objects to "slide in" from the bottom of the screen, but since I can't get the screen height as a unit in CSS, I'm trying to do this with media queries, like so: ``` @media(max-height:500px) { @keyframe slideUp { 0% { transform: translate3d(0,500px,0); } 100% { transform: translate3d(0,...
2013/12/05
[ "https://Stackoverflow.com/questions/20407906", "https://Stackoverflow.com", "https://Stackoverflow.com/users/221814/" ]
I don't know why no one else has suggested this, but instead of setting the keyframes in the media query you can set the animation in the media query. ``` @media(max-height:500px) { #selectorGroup { animation: slideUp500 1s forwards; } } @media(max-height:750px) { #selectorGroup { animat...
Nowadays you can solve this using native CSS variables. In your case: ``` @media(max-height:500px) { :root { --slide-up-y: 500px } } @media(max-height:750px) { :root { --slide-up-y: 750px } } @keyframes slideUp { 0% { transform: translate3d(0,var(--slide-up-y),0); } 100% ...
20,407,906
I'm trying to get objects to "slide in" from the bottom of the screen, but since I can't get the screen height as a unit in CSS, I'm trying to do this with media queries, like so: ``` @media(max-height:500px) { @keyframe slideUp { 0% { transform: translate3d(0,500px,0); } 100% { transform: translate3d(0,...
2013/12/05
[ "https://Stackoverflow.com/questions/20407906", "https://Stackoverflow.com", "https://Stackoverflow.com/users/221814/" ]
Nowadays you can solve this using native CSS variables. In your case: ``` @media(max-height:500px) { :root { --slide-up-y: 500px } } @media(max-height:750px) { :root { --slide-up-y: 750px } } @keyframes slideUp { 0% { transform: translate3d(0,var(--slide-up-y),0); } 100% ...
Long time since this question was asked. But I'm seeing that nobody has answered the solution that I'll give you, and this one, in my opinion, is easier than creating different `media-queries` for different screen sizes. @myajouri proposed you to use a `fixed` position and you discarded this solution because you need ...
42,289,896
How do I get the text of a richtextbox? I've searched for so long and I can't find an answer! Why isn't there something like `richTextBox1.getText()`?
2017/02/17
[ "https://Stackoverflow.com/questions/42289896", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6911249/" ]
You can write directly `richTextBox1.Text`
Please try this: ``` string text = richTextBox1.Text().Trim(); ```
8,496,086
Background Schema: ``` class Checkpoint(db.Model): id = db.Column(db.Integer, primary_key=True) creator = db.Column(db.Integer, db.ForeignKey('user.id')) name = db.Column(db.String(255)) description = db.Column(db.String(255), nullable=True) price = db.Column(db.Float, nullable=True) expiry = d...
2011/12/13
[ "https://Stackoverflow.com/questions/8496086", "https://Stackoverflow.com", "https://Stackoverflow.com/users/118644/" ]
Each relation has two methods to defined conditions on related objects: `.has()` for single referred object and `.any()` for collections. These methods allow straightforward translation of your task to SQLAlchemy expression. Let's add missing relations to `FacebookUser`: ``` class FacebookUser(Model): # Definition...
Basically your query can be split in two parts: 1. Given the `user_id`, create a list of users which will contain the user herself as well as all direct friends 2. Given the list of users from 1., get all `UserCheckpoint` whose `Checkpoint` would satisfy the criteria. **Not tested code:** ``` # get direct user for g...
20,390,148
I've been trying to search for an alternative for browsers that have disabled cookies in their browser and forms that require the antiforgerytoken for validation. How should a case like this be handled? Any suggestions or alternatives to preventing CSRF in ASP.Net MVC forms would be greatly appreciated. Thanks you!
2013/12/05
[ "https://Stackoverflow.com/questions/20390148", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1930778/" ]
You can create your own CUSTOM ANTIFORGERYTOKEN FILTER for more details check the links... <http://forums.asp.net/t/1938599.aspx> <http://www.prideparrot.com/blog/archive/2012/7/securing_all_forms_using_antiforgerytoken>
There are a number of alternatives to using AntiForgeryTokens stored in session as part of the Synchroniser Token Pattern. One method gaining traction is the [Encrypted Token Pattern](http://insidethecpu.wordpress.com/2013/09/23/encrypted-token-pattern/), implemented by a Framework called ARMOR. The premise here is tha...
62,087,540
**I'm working with SQL queries in Snowflake.** I'm able to work in the browser (chrome), or on SQLWorkbenchJ. I'm comfortable with both, but prefer the browser. I'm working with moderately large numbers, up into the hundreds of billions (10^8), so it would be really helpful if I could **make the program print my numbe...
2020/05/29
[ "https://Stackoverflow.com/questions/62087540", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13641962/" ]
The [numeric format models](https://docs.snowflake.com/en/sql-reference/sql-format-models.html#numeric-format-models) appears to cover your need via the `9` (nine), `,` (comma), and `.` (period) symbols. Quoting some relevant portions from the documentation: > > `9`: Position for a digit; leading/trailing zeros are r...
Looks like your wish has been partially granted! In Snowflake's new web interface (they call it [Snowsight](https://docs.snowflake.com/en/user-guide/ui-snowsight.html)), you can choose to display numbers using commas as the separator for thousands. It only affects the display in the UI though - it doesn't work for ex...
7,887,865
When I try to send a HTTP request like `GET /` I can't reach to index.html or index.php. The host brings the page `/cgi-sys/defaultwebpage.cgi`. When I try `GET /index.html` This time i get a 404 not found error. It says `(none)/index.html` not found. What could be the reason?
2011/10/25
[ "https://Stackoverflow.com/questions/7887865", "https://Stackoverflow.com", "https://Stackoverflow.com/users/663229/" ]
There is no `index.html` in the web root. The server has been configured to redirect requests for `/` to `/cgi-sys/defaultwebpage.cgi` instead, and you should honor that.
If you are using apache, check if you set your [DirectoryIndex](http://httpd.apache.org/docs/2.0/mod/mod_dir.html) value in `httpd.conf` correct. For example: ``` DirectoryIndex index.html ```
7,887,865
When I try to send a HTTP request like `GET /` I can't reach to index.html or index.php. The host brings the page `/cgi-sys/defaultwebpage.cgi`. When I try `GET /index.html` This time i get a 404 not found error. It says `(none)/index.html` not found. What could be the reason?
2011/10/25
[ "https://Stackoverflow.com/questions/7887865", "https://Stackoverflow.com", "https://Stackoverflow.com/users/663229/" ]
There is no `index.html` in the web root. The server has been configured to redirect requests for `/` to `/cgi-sys/defaultwebpage.cgi` instead, and you should honor that.
I thought I had the same problem until looked at my page via anonymous access service (like [this](http://eu.amnotseen.com/)). Actually the problem was with my DNS cache.
7,887,865
When I try to send a HTTP request like `GET /` I can't reach to index.html or index.php. The host brings the page `/cgi-sys/defaultwebpage.cgi`. When I try `GET /index.html` This time i get a 404 not found error. It says `(none)/index.html` not found. What could be the reason?
2011/10/25
[ "https://Stackoverflow.com/questions/7887865", "https://Stackoverflow.com", "https://Stackoverflow.com/users/663229/" ]
Looks like that `DocumentRoot` in the `httpd.conf` file is pointing to a different directory instead of where your `index.html` is.
If you are using apache, check if you set your [DirectoryIndex](http://httpd.apache.org/docs/2.0/mod/mod_dir.html) value in `httpd.conf` correct. For example: ``` DirectoryIndex index.html ```
7,887,865
When I try to send a HTTP request like `GET /` I can't reach to index.html or index.php. The host brings the page `/cgi-sys/defaultwebpage.cgi`. When I try `GET /index.html` This time i get a 404 not found error. It says `(none)/index.html` not found. What could be the reason?
2011/10/25
[ "https://Stackoverflow.com/questions/7887865", "https://Stackoverflow.com", "https://Stackoverflow.com/users/663229/" ]
Looks like that `DocumentRoot` in the `httpd.conf` file is pointing to a different directory instead of where your `index.html` is.
I thought I had the same problem until looked at my page via anonymous access service (like [this](http://eu.amnotseen.com/)). Actually the problem was with my DNS cache.
34,122,747
I am making a browser-based video game. In the game, objects have a graphic and a title bar. The title bar holds their name, the spell they are currently casting, cast completion %, and spell icon. Objects have a size (dimensions) as determined by the server. I want to attach the title bar to the object. I want the ti...
2015/12/06
[ "https://Stackoverflow.com/questions/34122747", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2626428/" ]
Here's an older answer which hopefully answers your question and solves your problem. Is seems indeed to be a bug. <https://stackoverflow.com/a/19115950/543224>
I guess that you update UI on from background. If you want update UI you have to update in main queue. If you don't do it, some strange issue will come. So you can change your code to: ``` dispatch_async(dispatch_get_main_queue()) { () -> Void in if let object = currentObject.objectForKey("postText") as? String {...
34,122,747
I am making a browser-based video game. In the game, objects have a graphic and a title bar. The title bar holds their name, the spell they are currently casting, cast completion %, and spell icon. Objects have a size (dimensions) as determined by the server. I want to attach the title bar to the object. I want the ti...
2015/12/06
[ "https://Stackoverflow.com/questions/34122747", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2626428/" ]
Did you set the attributes on the text view itself (i.e. the text view text is "plain", and not "attributed")? Or did you use attributed text? If the latter, it's quite normal that if you replace the attributed text with plain text with no attributes, it reverts to the attributes of the text view itself. Make sure th...
I guess that you update UI on from background. If you want update UI you have to update in main queue. If you don't do it, some strange issue will come. So you can change your code to: ``` dispatch_async(dispatch_get_main_queue()) { () -> Void in if let object = currentObject.objectForKey("postText") as? String {...
24,713,282
I want to open an app chooser that will list of the installed apps on the phone. When clicking on an app in the chooser I don't need to open it but get it's package name. I know that I can create a specific intent for example with Intent.ACTION\_SEND and the ``` Intent.createChooser() ``` I also know that I can lis...
2014/07/12
[ "https://Stackoverflow.com/questions/24713282", "https://Stackoverflow.com", "https://Stackoverflow.com/users/826235/" ]
**Chooser.java** ``` public class Chooser extends ListActivity { AppAdapter adapter=null; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.chooser_layout); PackageManager pm=getPackageManager(); I...
Use the results of `PackageManager` and `queryIntentActivities()` to populate your own UI that lists them. [This sample application](https://github.com/commonsguy/cw-omnibus/tree/master/Introspection/Launchalot) loads them into a `ListView`. While that sample application turns around and launches the selected activity...
9,656,867
I was trying to create a linked list with structs. The idea is to use 2 different stucts, one which is a node, and another which is a pointer to the nodes (so, I can link the nodes together). But I wanted to initialize the pointer to the first node as NULL, and create subsequent nodes later: I am having an error in t...
2012/03/11
[ "https://Stackoverflow.com/questions/9656867", "https://Stackoverflow.com", "https://Stackoverflow.com/users/989359/" ]
You can use `SoundPool`. It fits what you want to do perfectly. You'll just need a way to store the sound effect IDs corresponding to each image (or button). Perhaps extend Button to store associated sound effect ID. And use a common SoundPool to play the sound effect associated to the id when the button is touched....
@Rikonator is on the right track there with Soundpool. It's much more suited to the kind of functionality you are after. If you decide to go with the mediaplayer anyway, though, don't forget the prepareAsync () method to prevent it from hanging the UI thread. You can read more about playing media [here](http://develop...
9,656,867
I was trying to create a linked list with structs. The idea is to use 2 different stucts, one which is a node, and another which is a pointer to the nodes (so, I can link the nodes together). But I wanted to initialize the pointer to the first node as NULL, and create subsequent nodes later: I am having an error in t...
2012/03/11
[ "https://Stackoverflow.com/questions/9656867", "https://Stackoverflow.com", "https://Stackoverflow.com/users/989359/" ]
You can use `SoundPool`. It fits what you want to do perfectly. You'll just need a way to store the sound effect IDs corresponding to each image (or button). Perhaps extend Button to store associated sound effect ID. And use a common SoundPool to play the sound effect associated to the id when the button is touched....
``` MediaPlayer mp = MediaPlayer.create(getApplicationContext(), R.raw.sound); try { if (mp.isPlaying()) { mp.stop(); mp.release(); mp = MediaPlayer.create(getApplicationContext(), R.raw.sound); } mp.start(); } catch (Exception e) { e.printStackTrace(); } ```