qid
int64
1
74.7M
question
stringlengths
15
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
4
30.2k
response_k
stringlengths
11
36.5k
34,019,654
how can I connect the MySQL database in **my local computer** to android application.? is this possible .? I developed an android application its working perfectly. Now I need access some data from MySQL database in my **Local computer** .I am searching a solution for this since 2 weeks. kindly help me to solve ``` ...
2015/12/01
[ "https://Stackoverflow.com/questions/34019654", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2496443/" ]
"current\_observation" does not contain an Array, it contains Dictionary ``` NSDictionary* weather = allData[@"current_observation"]; NSString *currentWeather = nil; NSString *currentTemp = nil; if (weather[@"temperature_string"]){ currentWeather = weather[@"temperature_string"]; } if (weather[@"temp_c"]) { cu...
It's not really good explanation for your problem,in previous comment.You have a `NSDictionary` not an `NSArray`. Simply solution is to just iterate: ``` NSString *weather =[NSString stringWithFormat:@"%@", [allData objectForKeyPath:@"temp_c"]]; ```
183,358
My hard disk crashed.. I can run Ubuntu using a pendrive by making a live USB of Ubuntu, which I made using Windows 7. In the similar way, I want to run Windows XP too using another pen drive (without hard disk) and I want to make it from Ubuntu (12.04). The resources I have are Ubuntu's live USB, Windows XP and Window...
2012/09/02
[ "https://askubuntu.com/questions/183358", "https://askubuntu.com", "https://askubuntu.com/users/87134/" ]
<http://www.iasptk.com/ubuntu-ppa-repositories/16958-ubuntu-and-winusb-a-simple-tool-that-enable-you-to-create-your-own-usb-stick-windows-installer-from-an-iso-image-or-a-real-dvd> **WinUSB** is a simple tool that enable you to create your own usb stick windows installer from an iso image or a real DVD. This package c...
I've tried various approaches to this in the past, and in the end, there are a few possible ways you *can* do it, but nothing that is guaranteed to work. For me, the easiest method is to install [Hiren's BootCD](http://www.hirensbootcd.org/download/) which includes a copy of a "windows live" version with it. Another ...
10,968,952
How would I apply "an empty text" template for WPF `ComboBox`? ``` <ComboBox ItemsSource="{Binding Messages}" DisplayMemberPath="CroppedMessage" Name="Messages" Width="150" Margin="0,4,4,4"> </ComboBox> ``` I use the above code to display a `ComboBox` with a few messages. Now...
2012/06/10
[ "https://Stackoverflow.com/questions/10968952", "https://Stackoverflow.com", "https://Stackoverflow.com/users/283055/" ]
Try this... ``` <ComboBox ItemsSource="{Binding Messages}" DisplayMemberPath="CroppedMessage" Name="Messages" Width="150" Margin="0,4,4,4" IsEditable="True" Text="select" /> ```
Try this ``` <ComboBox ItemsSource="{Binding Messages}" DisplayMemberPath="CroppedMessage" Name="Messages" Width="150" Margin="0,4,4,4" IsEditable="True" IsReadOnly="True" Text="Select"/> ```
6,927,690
Is there a way (in C) to write a construct like the `switch` statement, but for strings? Is there a way to write a C construct *at all* in C? By C construct I mean a statement with braces ... like an `if` statement has braces, and it's a C construct... right?
2011/08/03
[ "https://Stackoverflow.com/questions/6927690", "https://Stackoverflow.com", "https://Stackoverflow.com/users/569183/" ]
No, since the switch may only be used with integral types, or a type convertible to an integral type
Sure, depending on how much work you are willing to do. You can [use a preprocessor and some macros to map strings to integral identifiers](http://timj.testbit.eu/2007/07/14/13072007-switch-on-strings-in-c-and-c/), giving you a syntax like: ``` switch (SOSID_LOOKUP (sample_string)) { case SOSID (hello): printf ("H...
6,927,690
Is there a way (in C) to write a construct like the `switch` statement, but for strings? Is there a way to write a C construct *at all* in C? By C construct I mean a statement with braces ... like an `if` statement has braces, and it's a C construct... right?
2011/08/03
[ "https://Stackoverflow.com/questions/6927690", "https://Stackoverflow.com", "https://Stackoverflow.com/users/569183/" ]
The simplest approach is an if-else chain using `strcmp` to do the comparisons: ``` if (strcmp(str, "String 1") == 0) // do something else if (strcmp(str, "String 2") == 0) // do something else else if (strcmp(str, "String 3") == 0) // do something else ... else printf("%s not found\n", str); ``` A more com...
a [hashtable](http://en.wikipedia.org/wiki/Hash_table) if you have a large number of strings and speed is an issue
6,927,690
Is there a way (in C) to write a construct like the `switch` statement, but for strings? Is there a way to write a C construct *at all* in C? By C construct I mean a statement with braces ... like an `if` statement has braces, and it's a C construct... right?
2011/08/03
[ "https://Stackoverflow.com/questions/6927690", "https://Stackoverflow.com", "https://Stackoverflow.com/users/569183/" ]
The simplest approach is an if-else chain using `strcmp` to do the comparisons: ``` if (strcmp(str, "String 1") == 0) // do something else if (strcmp(str, "String 2") == 0) // do something else else if (strcmp(str, "String 3") == 0) // do something else ... else printf("%s not found\n", str); ``` A more com...
Sure, depending on how much work you are willing to do. You can [use a preprocessor and some macros to map strings to integral identifiers](http://timj.testbit.eu/2007/07/14/13072007-switch-on-strings-in-c-and-c/), giving you a syntax like: ``` switch (SOSID_LOOKUP (sample_string)) { case SOSID (hello): printf ("H...
6,927,690
Is there a way (in C) to write a construct like the `switch` statement, but for strings? Is there a way to write a C construct *at all* in C? By C construct I mean a statement with braces ... like an `if` statement has braces, and it's a C construct... right?
2011/08/03
[ "https://Stackoverflow.com/questions/6927690", "https://Stackoverflow.com", "https://Stackoverflow.com/users/569183/" ]
if you have the function **lfind** in your lib (POSIX or gcc) you can use it like: ``` enum { NOTFOUND, HELLO, WORLD, FOO, BAR }; char list[][100]={"hello","world","foo","bar"}; size_t r, siz = sizeof*list, num = sizeof list/siz; char *tosearch = "foo"; switch ( (r=lfind(tosearch,list,&num,siz,strcmp...
Sure, depending on how much work you are willing to do. You can [use a preprocessor and some macros to map strings to integral identifiers](http://timj.testbit.eu/2007/07/14/13072007-switch-on-strings-in-c-and-c/), giving you a syntax like: ``` switch (SOSID_LOOKUP (sample_string)) { case SOSID (hello): printf ("H...
6,927,690
Is there a way (in C) to write a construct like the `switch` statement, but for strings? Is there a way to write a C construct *at all* in C? By C construct I mean a statement with braces ... like an `if` statement has braces, and it's a C construct... right?
2011/08/03
[ "https://Stackoverflow.com/questions/6927690", "https://Stackoverflow.com", "https://Stackoverflow.com/users/569183/" ]
a [hashtable](http://en.wikipedia.org/wiki/Hash_table) if you have a large number of strings and speed is an issue
Yes, and the way is - long `if-else-if` statement. (for reference: [Why switch statement cannot be applied on strings?](https://stackoverflow.com/questions/650162/why-switch-statement-cannot-be-applied-on-strings) ) And what do you mean by "a C construct at all in C" o.O ? I'll edit my post, when you answer :)
6,927,690
Is there a way (in C) to write a construct like the `switch` statement, but for strings? Is there a way to write a C construct *at all* in C? By C construct I mean a statement with braces ... like an `if` statement has braces, and it's a C construct... right?
2011/08/03
[ "https://Stackoverflow.com/questions/6927690", "https://Stackoverflow.com", "https://Stackoverflow.com/users/569183/" ]
The simplest approach is an if-else chain using `strcmp` to do the comparisons: ``` if (strcmp(str, "String 1") == 0) // do something else if (strcmp(str, "String 2") == 0) // do something else else if (strcmp(str, "String 3") == 0) // do something else ... else printf("%s not found\n", str); ``` A more com...
if you have the function **lfind** in your lib (POSIX or gcc) you can use it like: ``` enum { NOTFOUND, HELLO, WORLD, FOO, BAR }; char list[][100]={"hello","world","foo","bar"}; size_t r, siz = sizeof*list, num = sizeof list/siz; char *tosearch = "foo"; switch ( (r=lfind(tosearch,list,&num,siz,strcmp...
6,927,690
Is there a way (in C) to write a construct like the `switch` statement, but for strings? Is there a way to write a C construct *at all* in C? By C construct I mean a statement with braces ... like an `if` statement has braces, and it's a C construct... right?
2011/08/03
[ "https://Stackoverflow.com/questions/6927690", "https://Stackoverflow.com", "https://Stackoverflow.com/users/569183/" ]
The simplest approach is an if-else chain using `strcmp` to do the comparisons: ``` if (strcmp(str, "String 1") == 0) // do something else if (strcmp(str, "String 2") == 0) // do something else else if (strcmp(str, "String 3") == 0) // do something else ... else printf("%s not found\n", str); ``` A more com...
Yes, and the way is - long `if-else-if` statement. (for reference: [Why switch statement cannot be applied on strings?](https://stackoverflow.com/questions/650162/why-switch-statement-cannot-be-applied-on-strings) ) And what do you mean by "a C construct at all in C" o.O ? I'll edit my post, when you answer :)
6,927,690
Is there a way (in C) to write a construct like the `switch` statement, but for strings? Is there a way to write a C construct *at all* in C? By C construct I mean a statement with braces ... like an `if` statement has braces, and it's a C construct... right?
2011/08/03
[ "https://Stackoverflow.com/questions/6927690", "https://Stackoverflow.com", "https://Stackoverflow.com/users/569183/" ]
No, you have to do it yourself. There are many variants: ``` if (strcmp(str, "toto") == 0) { // ... } else if (strcmp(str, "tata") == 0) { // ... } else { // ... } ``` If the number of strings is expected to grow, then a dispatch table with function pointers ``` struct dispatch_entry { const char ...
Sure, depending on how much work you are willing to do. You can [use a preprocessor and some macros to map strings to integral identifiers](http://timj.testbit.eu/2007/07/14/13072007-switch-on-strings-in-c-and-c/), giving you a syntax like: ``` switch (SOSID_LOOKUP (sample_string)) { case SOSID (hello): printf ("H...
6,927,690
Is there a way (in C) to write a construct like the `switch` statement, but for strings? Is there a way to write a C construct *at all* in C? By C construct I mean a statement with braces ... like an `if` statement has braces, and it's a C construct... right?
2011/08/03
[ "https://Stackoverflow.com/questions/6927690", "https://Stackoverflow.com", "https://Stackoverflow.com/users/569183/" ]
if you have the function **lfind** in your lib (POSIX or gcc) you can use it like: ``` enum { NOTFOUND, HELLO, WORLD, FOO, BAR }; char list[][100]={"hello","world","foo","bar"}; size_t r, siz = sizeof*list, num = sizeof list/siz; char *tosearch = "foo"; switch ( (r=lfind(tosearch,list,&num,siz,strcmp...
a [hashtable](http://en.wikipedia.org/wiki/Hash_table) if you have a large number of strings and speed is an issue
6,927,690
Is there a way (in C) to write a construct like the `switch` statement, but for strings? Is there a way to write a C construct *at all* in C? By C construct I mean a statement with braces ... like an `if` statement has braces, and it's a C construct... right?
2011/08/03
[ "https://Stackoverflow.com/questions/6927690", "https://Stackoverflow.com", "https://Stackoverflow.com/users/569183/" ]
No, since the switch may only be used with integral types, or a type convertible to an integral type
No, `switch` works on an integer value (I think floats/doubles are not even allowed). You can emulate that with if/else if/else doing `strcmp`. ``` if (strcmp(mystr, "this") == 0) { //mystr == "this" } else if (strcmp(mystr, "that") == 0) { //mystr == "that" } else { //mystr is not "this" or "that" } ```
70,811,082
I have this code that transposes a matrix using loop tiling strategy. ``` void transposer(int n, int m, double *dst, const double *src) { int blocksize; for (int i = 0; i < n; i += blocksize) { for (int j = 0; j < m; j += blocksize) { // transpose the block beginning at [i,j] for (int k...
2022/01/22
[ "https://Stackoverflow.com/questions/70811082", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14271622/" ]
You can use the collapse specifier to parallelize over two loops. ``` # pragma omp parallel for collapse(2) for (int i = 0; i < n; i += blocksize) { for (int j = 0; j < m; j += blocksize) { // transpose the block beginning at [i,j] for (int k = i; k < i + blocksize; ++k) { ...
> > I thought about just adding #pragma omp parallel for but doesnt this > just parallelize the outer loop? > > > Yes. To parallelize multiple consecutive loops one can utilize OpenMP' [collapse](https://stackoverflow.com/questions/28482833/understanding-the-collapse-clause-in-openmp) clause. Bear in mind, however...
70,811,082
I have this code that transposes a matrix using loop tiling strategy. ``` void transposer(int n, int m, double *dst, const double *src) { int blocksize; for (int i = 0; i < n; i += blocksize) { for (int j = 0; j < m; j += blocksize) { // transpose the block beginning at [i,j] for (int k...
2022/01/22
[ "https://Stackoverflow.com/questions/70811082", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14271622/" ]
When you try to parallelize a loop nest, you should ask yourself how many levels are conflict free. As in: every iteration writing to a different location. If two iterations write (potentially) to the same location, you need to 1. use a reduction 2. use a critical section or other synchronization 3. decide that this lo...
You can use the collapse specifier to parallelize over two loops. ``` # pragma omp parallel for collapse(2) for (int i = 0; i < n; i += blocksize) { for (int j = 0; j < m; j += blocksize) { // transpose the block beginning at [i,j] for (int k = i; k < i + blocksize; ++k) { ...
70,811,082
I have this code that transposes a matrix using loop tiling strategy. ``` void transposer(int n, int m, double *dst, const double *src) { int blocksize; for (int i = 0; i < n; i += blocksize) { for (int j = 0; j < m; j += blocksize) { // transpose the block beginning at [i,j] for (int k...
2022/01/22
[ "https://Stackoverflow.com/questions/70811082", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14271622/" ]
When you try to parallelize a loop nest, you should ask yourself how many levels are conflict free. As in: every iteration writing to a different location. If two iterations write (potentially) to the same location, you need to 1. use a reduction 2. use a critical section or other synchronization 3. decide that this lo...
> > I thought about just adding #pragma omp parallel for but doesnt this > just parallelize the outer loop? > > > Yes. To parallelize multiple consecutive loops one can utilize OpenMP' [collapse](https://stackoverflow.com/questions/28482833/understanding-the-collapse-clause-in-openmp) clause. Bear in mind, however...
37,711,447
Relevant code: ``` addDay.setOnClickListener(new View.OnClickListener(){ @Override public void onClick(View v){ ++fragIdCount; FragmentManager fragmentManager = getFragmentManager(); FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction(); ...
2016/06/08
[ "https://Stackoverflow.com/questions/37711447", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6195990/" ]
If you know that the `searchBar` is the first responder then either: 1. Pass a reference to the `searchBar` to the `UITableViewController` 2. Use KVC: Post a notification that you're loading more results and keyboard should be hidden, and in your `UISeachController` listen for that notification.
``` [[UIApplication sharedApplication]sendAction:@selector(resignFirstResponder) to:nil from:nil forEvent:nil]; ```
15,078,725
I've set up the tableview with correct delegate and datasource linkages.. the reloadData method calls the datasource and the delegate methods except for `viewForHeaderInSection:`. Why is that so?
2013/02/25
[ "https://Stackoverflow.com/questions/15078725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/962724/" ]
The trick is that those two methods belong to different `UITableView` protocols: `tableView:titleForHeaderInSection:` is a **`UITableViewDataSource`** protocol method, where `tableView:viewForHeaderInSection` belongs to **`UITableViewDelegate`**. That means: * If you implement the methods but assign yourself only as ...
Same issue occured with me but as I was using **automatic height calculation** from **xCode 9**, I cannot give any explicit height value as mentioned above. After some experimentation I **got solution**, we have to override this method as, ``` -(CGFloat)tableView:(UITableView *)tableView estimatedHeightForH...
15,078,725
I've set up the tableview with correct delegate and datasource linkages.. the reloadData method calls the datasource and the delegate methods except for `viewForHeaderInSection:`. Why is that so?
2013/02/25
[ "https://Stackoverflow.com/questions/15078725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/962724/" ]
Giving `estimatedSectionHeaderHeight` and `sectionHeaderHeight` values fixed my problem. e.g., `self.tableView.estimatedSectionHeaderHeight = 100 self.tableView.sectionHeaderHeight = UITableViewAutomaticDimension`
It's worth briefly noting that if your implementation of `tableView:heightForHeaderInSection:` returns `UITableViewAutomaticDimension`, then `tableView:viewForHeaderInSection:` will not be called. `UITableViewAutomaticDimension` assumes that a standard `UITableViewHeaderFooterView` will be used that is populated with ...
15,078,725
I've set up the tableview with correct delegate and datasource linkages.. the reloadData method calls the datasource and the delegate methods except for `viewForHeaderInSection:`. Why is that so?
2013/02/25
[ "https://Stackoverflow.com/questions/15078725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/962724/" ]
You should implement `tableView:heightForHeaderInSection:` and set the height for the header >0. This delegate method goes along with the `viewForHeaderInSection:` method. I hope this helps. ``` - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { return 40; } ```
Sometimes setting `tableview.delegate` or `datasource = nil` in the `viewWillAppear:` or `viewDidAppear:` methods can cause this issue. Make sure not to do this...
15,078,725
I've set up the tableview with correct delegate and datasource linkages.. the reloadData method calls the datasource and the delegate methods except for `viewForHeaderInSection:`. Why is that so?
2013/02/25
[ "https://Stackoverflow.com/questions/15078725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/962724/" ]
@rmaddy has misstated the rule, twice: in reality, `tableView:viewForHeaderInSection:` does *not* require that you also implement `tableView:heightForHeaderInSection:`, and also it is perfectly fine to call both `titleForHeader` and `viewForHeader`. I will state the rule correctly just for the record: The rule is simp...
Sometimes setting `tableview.delegate` or `datasource = nil` in the `viewWillAppear:` or `viewDidAppear:` methods can cause this issue. Make sure not to do this...
15,078,725
I've set up the tableview with correct delegate and datasource linkages.. the reloadData method calls the datasource and the delegate methods except for `viewForHeaderInSection:`. Why is that so?
2013/02/25
[ "https://Stackoverflow.com/questions/15078725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/962724/" ]
The use of `tableView:viewForHeaderInSection:` requires that you also implement `tableView:heightForHeaderInSection:`. This should return an appropriate non-zero height for the header. Also make sure you do not also implement the `tableView:titleForHeaderInSection:`. You should only use one or the other (`viewForHeader...
Here's what I've found (**Swift 4**) (thanks to [this comment](https://stackoverflow.com/a/28488181/428981) on another question) Whether I used titleForHeaderInSection or viewForHeaderInSection - it wasn't that they weren't getting called when the tableview was scrolled and new cells were being loaded, but any font ch...
15,078,725
I've set up the tableview with correct delegate and datasource linkages.. the reloadData method calls the datasource and the delegate methods except for `viewForHeaderInSection:`. Why is that so?
2013/02/25
[ "https://Stackoverflow.com/questions/15078725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/962724/" ]
The use of `tableView:viewForHeaderInSection:` requires that you also implement `tableView:heightForHeaderInSection:`. This should return an appropriate non-zero height for the header. Also make sure you do not also implement the `tableView:titleForHeaderInSection:`. You should only use one or the other (`viewForHeader...
@rmaddy has misstated the rule, twice: in reality, `tableView:viewForHeaderInSection:` does *not* require that you also implement `tableView:heightForHeaderInSection:`, and also it is perfectly fine to call both `titleForHeader` and `viewForHeader`. I will state the rule correctly just for the record: The rule is simp...
15,078,725
I've set up the tableview with correct delegate and datasource linkages.. the reloadData method calls the datasource and the delegate methods except for `viewForHeaderInSection:`. Why is that so?
2013/02/25
[ "https://Stackoverflow.com/questions/15078725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/962724/" ]
The trick is that those two methods belong to different `UITableView` protocols: `tableView:titleForHeaderInSection:` is a **`UITableViewDataSource`** protocol method, where `tableView:viewForHeaderInSection` belongs to **`UITableViewDelegate`**. That means: * If you implement the methods but assign yourself only as ...
I've just had an issue with headers not showing for **iOS 7.1**, but working fine with later releases I have tested, explicitly with 8.1 and 8.4. For the exact same code, 7.1 was *not* calling any of the section header delegate methods at all, including: `tableView:heightForHeaderInSection:` and `tableView:viewForHea...
15,078,725
I've set up the tableview with correct delegate and datasource linkages.. the reloadData method calls the datasource and the delegate methods except for `viewForHeaderInSection:`. Why is that so?
2013/02/25
[ "https://Stackoverflow.com/questions/15078725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/962724/" ]
It's worth briefly noting that if your implementation of `tableView:heightForHeaderInSection:` returns `UITableViewAutomaticDimension`, then `tableView:viewForHeaderInSection:` will not be called. `UITableViewAutomaticDimension` assumes that a standard `UITableViewHeaderFooterView` will be used that is populated with ...
The reason why `viewForHeaderInSection` does not get called is for one of two reasons: Either you did not set up your `UITableViewDelegate`, or you set up your `UITableViewDelegate` incorrectly.
15,078,725
I've set up the tableview with correct delegate and datasource linkages.. the reloadData method calls the datasource and the delegate methods except for `viewForHeaderInSection:`. Why is that so?
2013/02/25
[ "https://Stackoverflow.com/questions/15078725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/962724/" ]
The use of `tableView:viewForHeaderInSection:` requires that you also implement `tableView:heightForHeaderInSection:`. This should return an appropriate non-zero height for the header. Also make sure you do not also implement the `tableView:titleForHeaderInSection:`. You should only use one or the other (`viewForHeader...
In my case it was cause I did not implement: ``` func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat ```
15,078,725
I've set up the tableview with correct delegate and datasource linkages.. the reloadData method calls the datasource and the delegate methods except for `viewForHeaderInSection:`. Why is that so?
2013/02/25
[ "https://Stackoverflow.com/questions/15078725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/962724/" ]
@rmaddy has misstated the rule, twice: in reality, `tableView:viewForHeaderInSection:` does *not* require that you also implement `tableView:heightForHeaderInSection:`, and also it is perfectly fine to call both `titleForHeader` and `viewForHeader`. I will state the rule correctly just for the record: The rule is simp...
Here's what I've found (**Swift 4**) (thanks to [this comment](https://stackoverflow.com/a/28488181/428981) on another question) Whether I used titleForHeaderInSection or viewForHeaderInSection - it wasn't that they weren't getting called when the tableview was scrolled and new cells were being loaded, but any font ch...
20,179,793
What is the differences between property owned by an association and a property owned by a class in UML? is there a simple example helps me understand the differences?
2013/11/24
[ "https://Stackoverflow.com/questions/20179793", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2021253/" ]
There are, multiple reasons, each one good enough to just the choice: 1. You can partially specialize class templates but you can only fully specialized function templates (at least, so far). Thus, you can provide a replacement for an entire suite of related template arguments with `std::hash<T>` being a class templat...
A template function **can not** be partially specialized for types, while `std::hash` specialized for different types as a class template. And, in this template class based way, you can do some meta programming such as accessing to return type and key type like below: ``` std::hash<X>::argument_type std::hash<X>::res...
141,484
I’ve recently started an LLC with a co-worker and am looking for some advice. We’re currently both employed by a fairly large company that produces software that is specialized and only really relevant in that market. One of the first products we plan on developing for this business was inspired by our current project...
2019/08/01
[ "https://workplace.stackexchange.com/questions/141484", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/107522/" ]
You need legal advice here, not workplace-related advise. At the least, make sure you have not signed any non-compete clause, and are not violating any terms of job agreement with your current employer. Seek professional legal assistance if you find the language in the offer letter hard to understand. It is crucial to...
Not on the legal aspect of things, but I do not see this working out well with you staying on good terms with your company. If you release the service, they will have essentially lost their edge over their competitors as their competitors can easily solve the problem your company has been paying you to fix. While you...
53,580,952
Recently, we started working to convert an established Django project from a docker stack to Google App Engine. On the way, Google Cloud Build turned out to come handy. Cloudbuild takes care of a few items in preparation of rolling out, in particular the front end part of the application. Now when it comes to python a...
2018/12/02
[ "https://Stackoverflow.com/questions/53580952", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1569491/" ]
Without `apiIsReady` set to true, you are creating loop that adds new value to array with each iteration of that same array. ``` function load_all_waitting_inits() { for(var opts of waitting_inits) // new values are being added with each iteration, preventing loop to end { init(opts); // parse value of waittin...
If you remove `apiIsReady = true;` then it creates an infinity loop. And that's why, the browser will freeze.
66,490,089
Consider the following code: ``` typedef struct { char byte; } byte_t; typedef struct { char bytes[10]; } blob_t; int f(void) { blob_t a = {0}; *(byte_t *)a.bytes = (byte_t){10}; return a.bytes[0]; } ``` Does this give aliasing problems in the return statement? You do have that `a.bytes` dereferences a type t...
2021/03/05
[ "https://Stackoverflow.com/questions/66490089", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4869375/" ]
The main issue here is that those two structs are not compatible types. And so there can be various problems with alignment and padding. That issue aside, the standard 6.5/7 only allows for this (the "strict aliasing rule"): > > An object shall have its stored value accessed only by an lvalue expression that has one...
The error is in `*(byte_t *)a.bytes = (byte_t){10};`. The C spec has a special rule about character types (6.5§7), but that rule only applies when using character type to access any other type, not when using any type to access a character.
66,490,089
Consider the following code: ``` typedef struct { char byte; } byte_t; typedef struct { char bytes[10]; } blob_t; int f(void) { blob_t a = {0}; *(byte_t *)a.bytes = (byte_t){10}; return a.bytes[0]; } ``` Does this give aliasing problems in the return statement? You do have that `a.bytes` dereferences a type t...
2021/03/05
[ "https://Stackoverflow.com/questions/66490089", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4869375/" ]
The error is in `*(byte_t *)a.bytes = (byte_t){10};`. The C spec has a special rule about character types (6.5§7), but that rule only applies when using character type to access any other type, not when using any type to access a character.
According to the Standard, the syntax `array[index]` is shorthand for `*((array)+(index))`. Thus, `p->array[index]` is equivalent to `*((p->array) + (index))`, which uses the address of `p` to compute the address of `p->array`, and then without regard for `p`'s type, adds `index` (scaled by the size of the array-elemen...
66,490,089
Consider the following code: ``` typedef struct { char byte; } byte_t; typedef struct { char bytes[10]; } blob_t; int f(void) { blob_t a = {0}; *(byte_t *)a.bytes = (byte_t){10}; return a.bytes[0]; } ``` Does this give aliasing problems in the return statement? You do have that `a.bytes` dereferences a type t...
2021/03/05
[ "https://Stackoverflow.com/questions/66490089", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4869375/" ]
The main issue here is that those two structs are not compatible types. And so there can be various problems with alignment and padding. That issue aside, the standard 6.5/7 only allows for this (the "strict aliasing rule"): > > An object shall have its stored value accessed only by an lvalue expression that has one...
According to the Standard, the syntax `array[index]` is shorthand for `*((array)+(index))`. Thus, `p->array[index]` is equivalent to `*((p->array) + (index))`, which uses the address of `p` to compute the address of `p->array`, and then without regard for `p`'s type, adds `index` (scaled by the size of the array-elemen...
3,898,485
For instance adding new categories to a list. Once a new category has been added, and successfully submitted to the db, should I use JS to directly append this value to the list or should I query the table again and repopulate the list?
2010/10/10
[ "https://Stackoverflow.com/questions/3898485", "https://Stackoverflow.com", "https://Stackoverflow.com/users/219609/" ]
Yes, what you're doing makes some sense. I find it much more intuitive to have the Window listen to the Game than the other way round. I've also found that Java is much more maintainable if you separate out the different areas of the GUI and pass the Game into each of them through a fine-grained interface. I normally g...
I think you should implement the Observer design pattern (http://en.wikipedia.org/wiki/Observer\_pattern) without using .NET's events. In my approach, you need to define a couple of interfaces and add a little bit of code. For each different kind of event, create a pair of symmetric interfaces ``` public interface IEv...
212,877
I tried searching but could not find a definitive answer on blender stackexchange. I'm looking to upgrade a rendering Rig, and the RAM is a bit old... I know for most of my work I use cycles which relies on the GPU for rendering. My question is that, Is there any benefit to upgrading the normal RAM i use? e.g. If I ha...
2021/02/23
[ "https://blender.stackexchange.com/questions/212877", "https://blender.stackexchange.com", "https://blender.stackexchange.com/users/77364/" ]
There's a setup procedure that happens when you render (subdiv/displacement, BVH calculation, etc) that is heavily CPU bound and uses system memory until it settles on the final scene data which is then copied over to the rendering device. There's a balance to be struck.
RAM matters with ( in my experience ) with regards to simulations. For rendering the biggest bottleneck ( and in many cases direct crashes ) is VRAM. I would look into getting video cards with the most VRAM you can justify paying for. 8GB or higher ( ideally 12+ GB ) for heavy high poly count sims. I am on 64GB of RAM ...
212,877
I tried searching but could not find a definitive answer on blender stackexchange. I'm looking to upgrade a rendering Rig, and the RAM is a bit old... I know for most of my work I use cycles which relies on the GPU for rendering. My question is that, Is there any benefit to upgrading the normal RAM i use? e.g. If I ha...
2021/02/23
[ "https://blender.stackexchange.com/questions/212877", "https://blender.stackexchange.com", "https://blender.stackexchange.com/users/77364/" ]
There's a setup procedure that happens when you render (subdiv/displacement, BVH calculation, etc) that is heavily CPU bound and uses system memory until it settles on the final scene data which is then copied over to the rendering device. There's a balance to be struck.
tl;dr = Quantity matters a lot; speed matters almost not at all. Blender does "care" about system RAM quite a lot. Until the point that you're actually rendering, the whole scene resides in system memory. The amount of system memory you have will limit what you can make. Also, although Cycles is 100x faster on GPU, it...
212,877
I tried searching but could not find a definitive answer on blender stackexchange. I'm looking to upgrade a rendering Rig, and the RAM is a bit old... I know for most of my work I use cycles which relies on the GPU for rendering. My question is that, Is there any benefit to upgrading the normal RAM i use? e.g. If I ha...
2021/02/23
[ "https://blender.stackexchange.com/questions/212877", "https://blender.stackexchange.com", "https://blender.stackexchange.com/users/77364/" ]
tl;dr = Quantity matters a lot; speed matters almost not at all. Blender does "care" about system RAM quite a lot. Until the point that you're actually rendering, the whole scene resides in system memory. The amount of system memory you have will limit what you can make. Also, although Cycles is 100x faster on GPU, it...
RAM matters with ( in my experience ) with regards to simulations. For rendering the biggest bottleneck ( and in many cases direct crashes ) is VRAM. I would look into getting video cards with the most VRAM you can justify paying for. 8GB or higher ( ideally 12+ GB ) for heavy high poly count sims. I am on 64GB of RAM ...
52,361,501
I have two div outside wrapper div. But I want to push both div inside wrapper. Here is my code ``` <div class="eg-section-separetor"></div> <div class="eg-parallax-scene"></div> <div class="eg-section-separetor-wrapper eg-section-parallax"></div> function pushInsideSection(){ "use strict"; jQuery(".eg-section-se...
2018/09/17
[ "https://Stackoverflow.com/questions/52361501", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4767484/" ]
It's because `.next()` worked for immediate next element. while `eg-section-separetor-wrapper` is not immediate element after `eg-section-separetor` So use [.siblings()](https://api.jquery.com/siblings/) ``` var elem=jQuery(this).siblings(".eg-section-separetor-wrapper")[0]; ``` Or use `.next()` 2 times:- ``` var ...
You can use `append` to put elements inside of another. ```js function pushInsideSection() { var wrapper = $('.eg-section-separetor-wrapper'); var sep = $('.eg-section-separetor'); var scene = $('.eg-parallax-scene'); wrapper.append(sep, scene); } $('#nest').click(function($) { pushInsideSection(); ...
8,995
I want to get a really nice photo album for myself, without going through some middleman. Why do so many companies require that I be a "professional photographer" before they'll talk to me? Example of several I've found while searching: * <http://asukabook.com/prices.html> * <https://www.pictobooks.com/html/sign.php?...
2011/02/19
[ "https://photo.stackexchange.com/questions/8995", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/36/" ]
Two reasons: 1. They don't have the time/patience to deal with amateurs/brides. 2. They don't want to get in the middle of any copyright issues by dealing with images from someone who may not actually own the rights to have them assembled into a book. I honestly suspect #1 is the prime reason. They price their servic...
There is a separate issue that [cabbey](https://photo.stackexchange.com/questions/8995/why-do-nice-photo-albums-require-professional-photographers-to-buy/8997#8997) didn't touch on, and it is a common one in services to business -- hiding prices from consumers helps their business customers in a big way. > > If Compa...
8,995
I want to get a really nice photo album for myself, without going through some middleman. Why do so many companies require that I be a "professional photographer" before they'll talk to me? Example of several I've found while searching: * <http://asukabook.com/prices.html> * <https://www.pictobooks.com/html/sign.php?...
2011/02/19
[ "https://photo.stackexchange.com/questions/8995", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/36/" ]
Two reasons: 1. They don't have the time/patience to deal with amateurs/brides. 2. They don't want to get in the middle of any copyright issues by dealing with images from someone who may not actually own the rights to have them assembled into a book. I honestly suspect #1 is the prime reason. They price their servic...
I go through this question quite a bit at work (I am not a pro photographer), where we sell business to business not to end consumer. There are additional challenges as Cabbey outlined with doing work directly with the end consumer. The main one being the amount of training in the process that is needed. Having said t...
8,995
I want to get a really nice photo album for myself, without going through some middleman. Why do so many companies require that I be a "professional photographer" before they'll talk to me? Example of several I've found while searching: * <http://asukabook.com/prices.html> * <https://www.pictobooks.com/html/sign.php?...
2011/02/19
[ "https://photo.stackexchange.com/questions/8995", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/36/" ]
Two reasons: 1. They don't have the time/patience to deal with amateurs/brides. 2. They don't want to get in the middle of any copyright issues by dealing with images from someone who may not actually own the rights to have them assembled into a book. I honestly suspect #1 is the prime reason. They price their servic...
You may think the pro markup is astronomical but in reality, the actual cost of these types of high end books that are only available to pro photographers typically *begin* at $350. And that's only for a 10 page, simple cover 10x10 book. When you start changing sizes, cover options such as metal or photo covers, gildin...
8,995
I want to get a really nice photo album for myself, without going through some middleman. Why do so many companies require that I be a "professional photographer" before they'll talk to me? Example of several I've found while searching: * <http://asukabook.com/prices.html> * <https://www.pictobooks.com/html/sign.php?...
2011/02/19
[ "https://photo.stackexchange.com/questions/8995", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/36/" ]
Two reasons: 1. They don't have the time/patience to deal with amateurs/brides. 2. They don't want to get in the middle of any copyright issues by dealing with images from someone who may not actually own the rights to have them assembled into a book. I honestly suspect #1 is the prime reason. They price their servic...
This is just business, and is not unique to photography. I'm a electrical engineer and have a consulting company that also sells small gizmos on the side that I designed. I won't sell you certain things directly either. The broad reasons are the same regarless of industry. For example, we just got another lot of 1000 ...
8,995
I want to get a really nice photo album for myself, without going through some middleman. Why do so many companies require that I be a "professional photographer" before they'll talk to me? Example of several I've found while searching: * <http://asukabook.com/prices.html> * <https://www.pictobooks.com/html/sign.php?...
2011/02/19
[ "https://photo.stackexchange.com/questions/8995", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/36/" ]
There is a separate issue that [cabbey](https://photo.stackexchange.com/questions/8995/why-do-nice-photo-albums-require-professional-photographers-to-buy/8997#8997) didn't touch on, and it is a common one in services to business -- hiding prices from consumers helps their business customers in a big way. > > If Compa...
I go through this question quite a bit at work (I am not a pro photographer), where we sell business to business not to end consumer. There are additional challenges as Cabbey outlined with doing work directly with the end consumer. The main one being the amount of training in the process that is needed. Having said t...
8,995
I want to get a really nice photo album for myself, without going through some middleman. Why do so many companies require that I be a "professional photographer" before they'll talk to me? Example of several I've found while searching: * <http://asukabook.com/prices.html> * <https://www.pictobooks.com/html/sign.php?...
2011/02/19
[ "https://photo.stackexchange.com/questions/8995", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/36/" ]
There is a separate issue that [cabbey](https://photo.stackexchange.com/questions/8995/why-do-nice-photo-albums-require-professional-photographers-to-buy/8997#8997) didn't touch on, and it is a common one in services to business -- hiding prices from consumers helps their business customers in a big way. > > If Compa...
You may think the pro markup is astronomical but in reality, the actual cost of these types of high end books that are only available to pro photographers typically *begin* at $350. And that's only for a 10 page, simple cover 10x10 book. When you start changing sizes, cover options such as metal or photo covers, gildin...
8,995
I want to get a really nice photo album for myself, without going through some middleman. Why do so many companies require that I be a "professional photographer" before they'll talk to me? Example of several I've found while searching: * <http://asukabook.com/prices.html> * <https://www.pictobooks.com/html/sign.php?...
2011/02/19
[ "https://photo.stackexchange.com/questions/8995", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/36/" ]
There is a separate issue that [cabbey](https://photo.stackexchange.com/questions/8995/why-do-nice-photo-albums-require-professional-photographers-to-buy/8997#8997) didn't touch on, and it is a common one in services to business -- hiding prices from consumers helps their business customers in a big way. > > If Compa...
This is just business, and is not unique to photography. I'm a electrical engineer and have a consulting company that also sells small gizmos on the side that I designed. I won't sell you certain things directly either. The broad reasons are the same regarless of industry. For example, we just got another lot of 1000 ...
71,976,778
I'm trying to make a textbox which whenever a textchanged event happens, the function will use the textbox text to search through the database to find the right records. For example: I have 3 rows (name, phone number, birthday - the format is year - month - day - in SQL Server): | Name | PhoneNumber | Birthday | | --...
2022/04/23
[ "https://Stackoverflow.com/questions/71976778", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18676736/" ]
You have to use a Series as `x-axis` not a DataFrame: ``` pl.plot(x_train['YearsExperience'], model.predict(x_train)) # OR pl.plot(x_train.squeeze(), model.predict(x_train)) ``` [![enter image description here](https://i.stack.imgur.com/0a5Lh.png)](https://i.stack.imgur.com/0a5Lh.png)
this is solving my problem dont known why? ``` x = df.iloc[:, :-1].values y = df.iloc[:, 1].values ``` thas full code ``` import pandas as pd from sklearn.linear_model import LinearRegression from sklearn.model_selection import train_test_split df = pd.read_csv('Salary_Data.csv') x = df.iloc[:, :-1].values y = df....
71,976,778
I'm trying to make a textbox which whenever a textchanged event happens, the function will use the textbox text to search through the database to find the right records. For example: I have 3 rows (name, phone number, birthday - the format is year - month - day - in SQL Server): | Name | PhoneNumber | Birthday | | --...
2022/04/23
[ "https://Stackoverflow.com/questions/71976778", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18676736/" ]
this is solving my problem dont known why? ``` x = df.iloc[:, :-1].values y = df.iloc[:, 1].values ``` thas full code ``` import pandas as pd from sklearn.linear_model import LinearRegression from sklearn.model_selection import train_test_split df = pd.read_csv('Salary_Data.csv') x = df.iloc[:, :-1].values y = df....
I had a similar problem, with the exact same error reported: `TypeError: '(slice(None, None, None), None)' is an invalid key`. I also solved it by using `df.iloc[:, :-1].values` instead on `df.iloc[:, :-1]` in `plot`. For me the problem appears only on one computer but not on another, with different matplotlib and/or p...
71,976,778
I'm trying to make a textbox which whenever a textchanged event happens, the function will use the textbox text to search through the database to find the right records. For example: I have 3 rows (name, phone number, birthday - the format is year - month - day - in SQL Server): | Name | PhoneNumber | Birthday | | --...
2022/04/23
[ "https://Stackoverflow.com/questions/71976778", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18676736/" ]
You have to use a Series as `x-axis` not a DataFrame: ``` pl.plot(x_train['YearsExperience'], model.predict(x_train)) # OR pl.plot(x_train.squeeze(), model.predict(x_train)) ``` [![enter image description here](https://i.stack.imgur.com/0a5Lh.png)](https://i.stack.imgur.com/0a5Lh.png)
I had a similar problem, with the exact same error reported: `TypeError: '(slice(None, None, None), None)' is an invalid key`. I also solved it by using `df.iloc[:, :-1].values` instead on `df.iloc[:, :-1]` in `plot`. For me the problem appears only on one computer but not on another, with different matplotlib and/or p...
44,654,505
Is it possible to create a CSS grid that allows for different sized content blocks that don't have fixed starting positions with other blocks flowing around? Here's my test HTML ``` <div class="grid"> <div class="item">Small 1</div> <div class="item">Small 2</div> <div class="item large">Large 1</div> <div ...
2017/06/20
[ "https://Stackoverflow.com/questions/44654505", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1662536/" ]
Of course you can! Simply add `height: <insert value that's above 100px here>` to your CSS under `.large` and find the correct values to reach the expected result. Example: ```css * { padding: 0; margin: 0; box-sizing: border-box; } body { padding: 5em; } .grid { display: grid; grid-template-c...
Actually your code will work the way as you expected. Try adding a large paragraph into the 'large 1' area with many lines as possible and see the output yourself. > > `<div class="item large">`**Add a large paragraph with many new lines as > possible and check the ouput**`</div>` > > > Anyway you can also use t...
2,523,703
I have a pop-up window a user logs into, once they are logged in successful, I have a message that has a link to close the window. But I want it to not only close that pop up window, but I want it to refresh the webpage the pop-up window was clicked on. So the page can refresh to see that there is a valid login sessio...
2010/03/26
[ "https://Stackoverflow.com/questions/2523703", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26130/" ]
You can do this: ``` window.location.reload() ``` It just tells javascript to reload the page, this is not dependent on jQuery.
Works efficiently for me: ``` $(window).unload(function() { if (!window.opener.closed) { window.opener.__doPostBack('', ''); e.preventDefault(); } }); ```
2,523,703
I have a pop-up window a user logs into, once they are logged in successful, I have a message that has a link to close the window. But I want it to not only close that pop up window, but I want it to refresh the webpage the pop-up window was clicked on. So the page can refresh to see that there is a valid login sessio...
2010/03/26
[ "https://Stackoverflow.com/questions/2523703", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26130/" ]
You can do this: ``` window.location.reload() ``` It just tells javascript to reload the page, this is not dependent on jQuery.
Here is a code that refresh parent window and closes the popup in one operation. ``` <script language="JavaScript"> <!-- function refreshParent() { window.opener.location.href = window.opener.location.href; if (window.opener.progressWindow) { window.opener.progressWindow.close() } window.close(); } //-->...
2,523,703
I have a pop-up window a user logs into, once they are logged in successful, I have a message that has a link to close the window. But I want it to not only close that pop up window, but I want it to refresh the webpage the pop-up window was clicked on. So the page can refresh to see that there is a valid login sessio...
2010/03/26
[ "https://Stackoverflow.com/questions/2523703", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26130/" ]
In your popup window: ``` $('#closeButton').click(function(e) { window.opener.location.reload(true); window.close(); e.preventDefault(); }); ``` Reloads the parent page and closes the popup.
You can do this: ``` window.location.reload() ``` It just tells javascript to reload the page, this is not dependent on jQuery.
2,523,703
I have a pop-up window a user logs into, once they are logged in successful, I have a message that has a link to close the window. But I want it to not only close that pop up window, but I want it to refresh the webpage the pop-up window was clicked on. So the page can refresh to see that there is a valid login sessio...
2010/03/26
[ "https://Stackoverflow.com/questions/2523703", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26130/" ]
In your popup window: ``` $('#closeButton').click(function(e) { window.opener.location.reload(true); window.close(); e.preventDefault(); }); ``` Reloads the parent page and closes the popup.
Works efficiently for me: ``` $(window).unload(function() { if (!window.opener.closed) { window.opener.__doPostBack('', ''); e.preventDefault(); } }); ```
2,523,703
I have a pop-up window a user logs into, once they are logged in successful, I have a message that has a link to close the window. But I want it to not only close that pop up window, but I want it to refresh the webpage the pop-up window was clicked on. So the page can refresh to see that there is a valid login sessio...
2010/03/26
[ "https://Stackoverflow.com/questions/2523703", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26130/" ]
``` onclick="javascript:window.opener.location.reload(true);self.close();" ```
Here is a code that refresh parent window and closes the popup in one operation. ``` <script language="JavaScript"> <!-- function refreshParent() { window.opener.location.href = window.opener.location.href; if (window.opener.progressWindow) { window.opener.progressWindow.close() } window.close(); } //-->...
2,523,703
I have a pop-up window a user logs into, once they are logged in successful, I have a message that has a link to close the window. But I want it to not only close that pop up window, but I want it to refresh the webpage the pop-up window was clicked on. So the page can refresh to see that there is a valid login sessio...
2010/03/26
[ "https://Stackoverflow.com/questions/2523703", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26130/" ]
In your popup window: ``` $('#closeButton').click(function(e) { window.opener.location.reload(true); window.close(); e.preventDefault(); }); ``` Reloads the parent page and closes the popup.
``` onclick="javascript:window.opener.location.reload(true);self.close();" ```
2,523,703
I have a pop-up window a user logs into, once they are logged in successful, I have a message that has a link to close the window. But I want it to not only close that pop up window, but I want it to refresh the webpage the pop-up window was clicked on. So the page can refresh to see that there is a valid login sessio...
2010/03/26
[ "https://Stackoverflow.com/questions/2523703", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26130/" ]
You can do this: ``` window.location.reload() ``` It just tells javascript to reload the page, this is not dependent on jQuery.
``` onclick="javascript:window.opener.location.reload(true);self.close();" ```
2,523,703
I have a pop-up window a user logs into, once they are logged in successful, I have a message that has a link to close the window. But I want it to not only close that pop up window, but I want it to refresh the webpage the pop-up window was clicked on. So the page can refresh to see that there is a valid login sessio...
2010/03/26
[ "https://Stackoverflow.com/questions/2523703", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26130/" ]
In your popup window: ``` $('#closeButton').click(function(e) { window.opener.location.reload(true); window.close(); e.preventDefault(); }); ``` Reloads the parent page and closes the popup.
Here is a code that refresh parent window and closes the popup in one operation. ``` <script language="JavaScript"> <!-- function refreshParent() { window.opener.location.href = window.opener.location.href; if (window.opener.progressWindow) { window.opener.progressWindow.close() } window.close(); } //-->...
2,523,703
I have a pop-up window a user logs into, once they are logged in successful, I have a message that has a link to close the window. But I want it to not only close that pop up window, but I want it to refresh the webpage the pop-up window was clicked on. So the page can refresh to see that there is a valid login sessio...
2010/03/26
[ "https://Stackoverflow.com/questions/2523703", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26130/" ]
``` onclick="javascript:window.opener.location.reload(true);self.close();" ```
Use this code in window close event like ``` $('#close').click(function(e) { window.opener.location.reload(); window.close(); self.close(); }); ``` <http://www.delhincrjob.com/blog/how-to-close-popup-window-and-refresh-parent-window-in-jquery/>
2,523,703
I have a pop-up window a user logs into, once they are logged in successful, I have a message that has a link to close the window. But I want it to not only close that pop up window, but I want it to refresh the webpage the pop-up window was clicked on. So the page can refresh to see that there is a valid login sessio...
2010/03/26
[ "https://Stackoverflow.com/questions/2523703", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26130/" ]
In your popup window: ``` $('#closeButton').click(function(e) { window.opener.location.reload(true); window.close(); e.preventDefault(); }); ``` Reloads the parent page and closes the popup.
Use this code in `ajaxlogin.js` file for mvc 4 user ``` $('#closeButton').click(function(e) { window.opener.location.reload(true); window.close(); e.preventDefault(); }); ``` Its working fine
65,746,585
During a .map from an array of data, I have another array of data, which I need to do a .map inside it too. It's looking a bit like this First Data load ``` async function handleSubmit(event: FormEvent){ event.preventDefault(); await api.get(`people/?search=${input}`).then(response =>{ setCharacters(r...
2021/01/16
[ "https://Stackoverflow.com/questions/65746585", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15016805/" ]
`getFilmName` is Promise object. So It can't get file name in JSX context. So you need to use it in `useEffect` or other event handler and you need to save data in `state`. And you can render with right data. And in that case, you can make some new component like, ``` function FileName ({file}){ const [fileName,set...
I think you ware using same variable name here ``` {characters.map(character =>{ return ( <div> <Link to={`character/${character.url.split("/")[5]}`}>{character.name}</Link> {character.films.map((films) =>{ return( ...
49,171,623
have tried upgrading to the professional version of visual studio 2017 v 15.6.0 (Preview 7.0) and installed aspnetcore-runtime-2.1.0-preview1-final-win-x64 and .net core SDK 2.1.4. When I created a new web application I get an error saying > > "The current .NET SDK does not support targeting .NET Core 2.1. Either >...
2018/03/08
[ "https://Stackoverflow.com/questions/49171623", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8559109/" ]
I resolved the problem. the cause was that i installed * `aspnetcore-runtime-2.1.0-preview1-final-win-x64` and * `.net core SDK 2.1.4-x64` versions. * The installation placed the sdk files in `c:\Program Files\dotnet` * but VS2017 32bit was looking for the sdk files in `c:\Program Files(x86)\dotnet`. To resolve this...
I had this problem and I did a fresh install of VS2017. That fixed it!
49,171,623
have tried upgrading to the professional version of visual studio 2017 v 15.6.0 (Preview 7.0) and installed aspnetcore-runtime-2.1.0-preview1-final-win-x64 and .net core SDK 2.1.4. When I created a new web application I get an error saying > > "The current .NET SDK does not support targeting .NET Core 2.1. Either >...
2018/03/08
[ "https://Stackoverflow.com/questions/49171623", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8559109/" ]
Same happened to me, but then for version 2.2 of .NET Core. I installed the latest version of .NET Core 2.2 SDK, which was 2.2.202 at that time. Visual studio allowed me to create a new project for Core 2.2, but it was showing the error: > > "The current .NET SDK does not support targeting .NET Core 2.2. Either targe...
I started getting this error after I installed SDK 2.2.300. After reading this post and some other I **downgrade it to SDK 2.2.1xx** and the error went away. Note: I had to uninstall SDK 2.2.300 and restart after installing SDK 2.2.1xx.
49,171,623
have tried upgrading to the professional version of visual studio 2017 v 15.6.0 (Preview 7.0) and installed aspnetcore-runtime-2.1.0-preview1-final-win-x64 and .net core SDK 2.1.4. When I created a new web application I get an error saying > > "The current .NET SDK does not support targeting .NET Core 2.1. Either >...
2018/03/08
[ "https://Stackoverflow.com/questions/49171623", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8559109/" ]
Stopping IIS for publishing solved the problem. But first I needed to install net core 2.1 SDK and update the Visual Studio.
I had this problem and I did a fresh install of VS2017. That fixed it!
49,171,623
have tried upgrading to the professional version of visual studio 2017 v 15.6.0 (Preview 7.0) and installed aspnetcore-runtime-2.1.0-preview1-final-win-x64 and .net core SDK 2.1.4. When I created a new web application I get an error saying > > "The current .NET SDK does not support targeting .NET Core 2.1. Either >...
2018/03/08
[ "https://Stackoverflow.com/questions/49171623", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8559109/" ]
The problem here is that Microsoft confused a whole lot of people with how they numbered their .NET Core SDKs. In the original poster's message the path C:\Program Files\dotnet\sdk\2.1.100\ DOES NOT appear to represent the .NET Core 2.1 runtime (but you'd think it does). I came across this post [The current .NET SDK ...
Check to make sure you don't have `global.json` file in your project root folder that forces your project to use .NET SDK 2.1 only. If you have this global.json file, **delete it**, and then restart visual studio. As embarrassing as it might sound, I spent almost an hour tinkering and I even downloaded several SDK ve...
49,171,623
have tried upgrading to the professional version of visual studio 2017 v 15.6.0 (Preview 7.0) and installed aspnetcore-runtime-2.1.0-preview1-final-win-x64 and .net core SDK 2.1.4. When I created a new web application I get an error saying > > "The current .NET SDK does not support targeting .NET Core 2.1. Either >...
2018/03/08
[ "https://Stackoverflow.com/questions/49171623", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8559109/" ]
Installing [`.NET Core SDK 2.1.300-preview2`](https://www.microsoft.com/net/download/dotnet-core/sdk-2.1.300-preview2) did the trick for me: UPDATE: just in case, there is a newer version has been released recently. You can download the new .NET Core SDK for 2.2.0-preview1 (which includes ASP.NET 2.2.0-preview1) [here...
It looks like Microsoft are encouraging better coding practice for those early adopters of latest development software in Net Core 2.1 by removing the capability to use older software where bad habits prevail. Net Core 2.0 and the older versions are almost end of life so should not be being used at all. (<https://blogs...
49,171,623
have tried upgrading to the professional version of visual studio 2017 v 15.6.0 (Preview 7.0) and installed aspnetcore-runtime-2.1.0-preview1-final-win-x64 and .net core SDK 2.1.4. When I created a new web application I get an error saying > > "The current .NET SDK does not support targeting .NET Core 2.1. Either >...
2018/03/08
[ "https://Stackoverflow.com/questions/49171623", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8559109/" ]
Same happened to me, but then for version 2.2 of .NET Core. I installed the latest version of .NET Core 2.2 SDK, which was 2.2.202 at that time. Visual studio allowed me to create a new project for Core 2.2, but it was showing the error: > > "The current .NET SDK does not support targeting .NET Core 2.2. Either targe...
Go to your pipeline. Click on Edit pipeline. Click on the Agent Specification dropdown. Change it to Windows 2019. Click Save And Queue. And here you Go. It worked fine for me.
49,171,623
have tried upgrading to the professional version of visual studio 2017 v 15.6.0 (Preview 7.0) and installed aspnetcore-runtime-2.1.0-preview1-final-win-x64 and .net core SDK 2.1.4. When I created a new web application I get an error saying > > "The current .NET SDK does not support targeting .NET Core 2.1. Either >...
2018/03/08
[ "https://Stackoverflow.com/questions/49171623", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8559109/" ]
This happened to me after installing 2.2.100-preview3-009430 and then updating to Visual Studio 15.9.2. I resolved by enabling the "Use previews of the .NET Core SDK" option. 1. Go to: *Tools > Options > Projects and Solutions > .NET Core* 2. Check the "Use previews of the .NET Core SDK" box 3. Restart Visual Studio ...
I resolved the problem. the cause was that i installed * `aspnetcore-runtime-2.1.0-preview1-final-win-x64` and * `.net core SDK 2.1.4-x64` versions. * The installation placed the sdk files in `c:\Program Files\dotnet` * but VS2017 32bit was looking for the sdk files in `c:\Program Files(x86)\dotnet`. To resolve this...
49,171,623
have tried upgrading to the professional version of visual studio 2017 v 15.6.0 (Preview 7.0) and installed aspnetcore-runtime-2.1.0-preview1-final-win-x64 and .net core SDK 2.1.4. When I created a new web application I get an error saying > > "The current .NET SDK does not support targeting .NET Core 2.1. Either >...
2018/03/08
[ "https://Stackoverflow.com/questions/49171623", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8559109/" ]
The problem here is that Microsoft confused a whole lot of people with how they numbered their .NET Core SDKs. In the original poster's message the path C:\Program Files\dotnet\sdk\2.1.100\ DOES NOT appear to represent the .NET Core 2.1 runtime (but you'd think it does). I came across this post [The current .NET SDK ...
I started getting this error after I installed SDK 2.2.300. After reading this post and some other I **downgrade it to SDK 2.2.1xx** and the error went away. Note: I had to uninstall SDK 2.2.300 and restart after installing SDK 2.2.1xx.
49,171,623
have tried upgrading to the professional version of visual studio 2017 v 15.6.0 (Preview 7.0) and installed aspnetcore-runtime-2.1.0-preview1-final-win-x64 and .net core SDK 2.1.4. When I created a new web application I get an error saying > > "The current .NET SDK does not support targeting .NET Core 2.1. Either >...
2018/03/08
[ "https://Stackoverflow.com/questions/49171623", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8559109/" ]
I had the .Net Core SDK 2.1.4 installed and followed the other answers in this post without solving my problem. What finally did it for me was **installing .Net Core SDK version 2.1.301**, and uninstalling every other version. Seems like the SDK 2.1.4 cannot target .Net Core 2.1 but SDK 2.1.301 does the job.
Go to your pipeline. Click on Edit pipeline. Click on the Agent Specification dropdown. Change it to Windows 2019. Click Save And Queue. And here you Go. It worked fine for me.
49,171,623
have tried upgrading to the professional version of visual studio 2017 v 15.6.0 (Preview 7.0) and installed aspnetcore-runtime-2.1.0-preview1-final-win-x64 and .net core SDK 2.1.4. When I created a new web application I get an error saying > > "The current .NET SDK does not support targeting .NET Core 2.1. Either >...
2018/03/08
[ "https://Stackoverflow.com/questions/49171623", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8559109/" ]
Stopping IIS for publishing solved the problem. But first I needed to install net core 2.1 SDK and update the Visual Studio.
Had this issue when opening an old project. Solution was to install **.NET Core 2.1 development tools** for my IDE (VS 2017) from Visual Studio Installer [![Visual Studio Installer](https://i.stack.imgur.com/eHglp.png)](https://i.stack.imgur.com/eHglp.png)
57,411,124
I have one data sets with name `DATA_TEST`.This data frame contain 6-observations in character format.You can see table below. ```r dput(DATA_TEST) structure(list(Ten_digits = c("NA", "207", "0101", "0208 90", "0206 90 99 00", "103")), .Names = "Ten_digits", row.names = c(NA, -6L), class = "data.frame") # ----------...
2019/08/08
[ "https://Stackoverflow.com/questions/57411124", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10924836/" ]
You can use `str_length` from `stringr`: ``` library(tidyverse) # in order to load all required packages at once DATA_TEST %>% mutate(Ten_digits = case_when( str_length(Ten_digits) == 3 ~ paste0("0", Ten_digits), TRUE ~ Ten_digits )) # Ten_digits #1 NA #2 0207 #3 0101 #4 ...
We can do this simply by pasting a `0` in front of 3-char strings, i.e. ``` DATA_TEST$Ten_digits[nchar(DATA_TEST$Ten_digits) == 3] <- paste0("0", DATA_TEST$Ten_digits[nchar(DATA_TEST$Ten_digits) == 3]) DATA_TEST # Ten_digits #1 NA #2 0207 #3 0101 #4 0208 90 #5 0206 90 99 00 #6 ...
57,411,124
I have one data sets with name `DATA_TEST`.This data frame contain 6-observations in character format.You can see table below. ```r dput(DATA_TEST) structure(list(Ten_digits = c("NA", "207", "0101", "0208 90", "0206 90 99 00", "103")), .Names = "Ten_digits", row.names = c(NA, -6L), class = "data.frame") # ----------...
2019/08/08
[ "https://Stackoverflow.com/questions/57411124", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10924836/" ]
You can use `str_length` from `stringr`: ``` library(tidyverse) # in order to load all required packages at once DATA_TEST %>% mutate(Ten_digits = case_when( str_length(Ten_digits) == 3 ~ paste0("0", Ten_digits), TRUE ~ Ten_digits )) # Ten_digits #1 NA #2 0207 #3 0101 #4 ...
You can use `str_pad` from `stingr`. Note that it'll pad any string with length less than 4 characters so the code will need modification if you specifically want to focus on strings with length 3. Also `ifelse` won't be needed if you had a literal `NA` instead of "NA". - ``` DATA_TEST %>% mutate( Ten_digits = ...
57,411,124
I have one data sets with name `DATA_TEST`.This data frame contain 6-observations in character format.You can see table below. ```r dput(DATA_TEST) structure(list(Ten_digits = c("NA", "207", "0101", "0208 90", "0206 90 99 00", "103")), .Names = "Ten_digits", row.names = c(NA, -6L), class = "data.frame") # ----------...
2019/08/08
[ "https://Stackoverflow.com/questions/57411124", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10924836/" ]
You may use a simple regex with `sub`: ``` DATA_TEST<-data.frame(Ten_digits=c("NA","207","0101","0208 90","0206 90 99 00","103"),stringsAsFactors = FALSE) DATA_TEST$Ten_digits <- sub("^(\\d{3})$", "0\\1", DATA_TEST$Ten_digits) DATA_TEST ## => Ten_digits 1 NA 2 0207 3 0101 4 0208 90 5...
We can do this simply by pasting a `0` in front of 3-char strings, i.e. ``` DATA_TEST$Ten_digits[nchar(DATA_TEST$Ten_digits) == 3] <- paste0("0", DATA_TEST$Ten_digits[nchar(DATA_TEST$Ten_digits) == 3]) DATA_TEST # Ten_digits #1 NA #2 0207 #3 0101 #4 0208 90 #5 0206 90 99 00 #6 ...
57,411,124
I have one data sets with name `DATA_TEST`.This data frame contain 6-observations in character format.You can see table below. ```r dput(DATA_TEST) structure(list(Ten_digits = c("NA", "207", "0101", "0208 90", "0206 90 99 00", "103")), .Names = "Ten_digits", row.names = c(NA, -6L), class = "data.frame") # ----------...
2019/08/08
[ "https://Stackoverflow.com/questions/57411124", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10924836/" ]
We can do this simply by pasting a `0` in front of 3-char strings, i.e. ``` DATA_TEST$Ten_digits[nchar(DATA_TEST$Ten_digits) == 3] <- paste0("0", DATA_TEST$Ten_digits[nchar(DATA_TEST$Ten_digits) == 3]) DATA_TEST # Ten_digits #1 NA #2 0207 #3 0101 #4 0208 90 #5 0206 90 99 00 #6 ...
You can use `str_pad` from `stingr`. Note that it'll pad any string with length less than 4 characters so the code will need modification if you specifically want to focus on strings with length 3. Also `ifelse` won't be needed if you had a literal `NA` instead of "NA". - ``` DATA_TEST %>% mutate( Ten_digits = ...
57,411,124
I have one data sets with name `DATA_TEST`.This data frame contain 6-observations in character format.You can see table below. ```r dput(DATA_TEST) structure(list(Ten_digits = c("NA", "207", "0101", "0208 90", "0206 90 99 00", "103")), .Names = "Ten_digits", row.names = c(NA, -6L), class = "data.frame") # ----------...
2019/08/08
[ "https://Stackoverflow.com/questions/57411124", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10924836/" ]
You may use a simple regex with `sub`: ``` DATA_TEST<-data.frame(Ten_digits=c("NA","207","0101","0208 90","0206 90 99 00","103"),stringsAsFactors = FALSE) DATA_TEST$Ten_digits <- sub("^(\\d{3})$", "0\\1", DATA_TEST$Ten_digits) DATA_TEST ## => Ten_digits 1 NA 2 0207 3 0101 4 0208 90 5...
You can use `str_pad` from `stingr`. Note that it'll pad any string with length less than 4 characters so the code will need modification if you specifically want to focus on strings with length 3. Also `ifelse` won't be needed if you had a literal `NA` instead of "NA". - ``` DATA_TEST %>% mutate( Ten_digits = ...
1,359,983
Let $G$ be a group of order $150$. I must show that it has a normal subgroup of order $25$. The hint says to show that is has a normal subgroup of order $5$ or $25$. Now from Sylow, I know that the number $n\_5$ of Sylow-$5$ subgroups (which each have $25$ elements) must be either $1$ or $6$, since $n\_5$ must also di...
2015/07/13
[ "https://math.stackexchange.com/questions/1359983", "https://math.stackexchange.com", "https://math.stackexchange.com/users/235510/" ]
As you say, by Sylow's theorem, either $n\_5=1$ or $n\_5=6$. If $n\_5=1$, we have found a normal subgroup of $25$, so we are done. So let's assume that $n\_5=6$. We will exhibit a normal subgroup of order $5$ as follows. Let $P$ and $Q$ be *distinct* Sylow $5$-subgroups. Using the fact that $|PQ| = \frac{|P|\cdot |Q|}{...
There are easier solutions, especially if your primary goal is to show the group is not simple. (See the paragraph starting (C) for a really simple argument.) (A) For non-simplicity: You already know by Sylow that if the group is simple it must have $6$ $5$-Sylow subgroups. If this is the case, then it acts by conjuga...
1,359,983
Let $G$ be a group of order $150$. I must show that it has a normal subgroup of order $25$. The hint says to show that is has a normal subgroup of order $5$ or $25$. Now from Sylow, I know that the number $n\_5$ of Sylow-$5$ subgroups (which each have $25$ elements) must be either $1$ or $6$, since $n\_5$ must also di...
2015/07/13
[ "https://math.stackexchange.com/questions/1359983", "https://math.stackexchange.com", "https://math.stackexchange.com/users/235510/" ]
As you say, by Sylow's theorem, either $n\_5=1$ or $n\_5=6$. If $n\_5=1$, we have found a normal subgroup of $25$, so we are done. So let's assume that $n\_5=6$. We will exhibit a normal subgroup of order $5$ as follows. Let $P$ and $Q$ be *distinct* Sylow $5$-subgroups. Using the fact that $|PQ| = \frac{|P|\cdot |Q|}{...
Just to state the simplest answer alone so people see it: Since $|G|=2m$ with $m$ odd, $G$ has an index $2$ subgroup $H$ of order $75$. By Sylow, $H$ has a unique 5-Sylow $P$ of order $25$. Since $P$ is characteristic in $H$, which is normal in $G$ (because index $2$), $P$ is normal in $G$, so it is the unique $5$-Sylo...
33,083,616
As I'm writing more and more Groovy to use with the Jenkins Workflow plugin I've started getting to the point where I've got re-usable code that could be used in multiple scripts. What would be the best way of sharing this code? Is it possible to produce my own .jar with the shared code in and utilize this from within...
2015/10/12
[ "https://Stackoverflow.com/questions/33083616", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3617723/" ]
You can use Global Lib as pointed in other comments and/or use the `load` step to load you own scripts from somewhere (i.e. your SCM just checked out previously). More info about `load`: <https://github.com/jenkinsci/workflow-plugin/blob/master/TUTORIAL.md#triggering-manual-loading>
This is what the Workflow Global Library is for! <https://github.com/jenkinsci/workflow-plugin/blob/master/cps-global-lib/README.md> I use this in my installation, it's a great feature of Workflow. Right now I just have one "helper" class that contains methods common to all builds, but as other teams start to adopt Wor...
33,083,616
As I'm writing more and more Groovy to use with the Jenkins Workflow plugin I've started getting to the point where I've got re-usable code that could be used in multiple scripts. What would be the best way of sharing this code? Is it possible to produce my own .jar with the shared code in and utilize this from within...
2015/10/12
[ "https://Stackoverflow.com/questions/33083616", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3617723/" ]
I've actually got this working in the end by using our own git repo but putting a symlink into workflow-libs/src to point at that repo.
This is what the Workflow Global Library is for! <https://github.com/jenkinsci/workflow-plugin/blob/master/cps-global-lib/README.md> I use this in my installation, it's a great feature of Workflow. Right now I just have one "helper" class that contains methods common to all builds, but as other teams start to adopt Wor...
33,083,616
As I'm writing more and more Groovy to use with the Jenkins Workflow plugin I've started getting to the point where I've got re-usable code that could be used in multiple scripts. What would be the best way of sharing this code? Is it possible to produce my own .jar with the shared code in and utilize this from within...
2015/10/12
[ "https://Stackoverflow.com/questions/33083616", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3617723/" ]
You can use Global Lib as pointed in other comments and/or use the `load` step to load you own scripts from somewhere (i.e. your SCM just checked out previously). More info about `load`: <https://github.com/jenkinsci/workflow-plugin/blob/master/TUTORIAL.md#triggering-manual-loading>
The [Workflow Remote File Loader plugin](https://github.com/jenkinsci/workflow-remote-loader-plugin/) might meet your needs.
33,083,616
As I'm writing more and more Groovy to use with the Jenkins Workflow plugin I've started getting to the point where I've got re-usable code that could be used in multiple scripts. What would be the best way of sharing this code? Is it possible to produce my own .jar with the shared code in and utilize this from within...
2015/10/12
[ "https://Stackoverflow.com/questions/33083616", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3617723/" ]
I've actually got this working in the end by using our own git repo but putting a symlink into workflow-libs/src to point at that repo.
The [Workflow Remote File Loader plugin](https://github.com/jenkinsci/workflow-remote-loader-plugin/) might meet your needs.
43,423,508
I am really struggling to optimize this query: ``` SELECT wins / (wins + COUNT(loosers.match_id) + 0.) winrate, wins + COUNT(loosers.match_id) matches, winners.winning_champion_one_id, winners.winning_champion_two_id, winners.winning_champion_three_id, winners.winning_champion_four_id, winners.winning_champion_five_id...
2017/04/15
[ "https://Stackoverflow.com/questions/43423508", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5851426/" ]
Your query and explain output don't look so bad. Still, a couple of observations: 1. An [**index-only scan**](https://www.postgresql.org/docs/current/indexes-index-only-scans.html) instead of an index scan on `matches_loosing_champion_ids_index` would be faster. The reason you don't see that: the useless `count(match_...
The execution plan looks pretty good in my opinion. What you could try is to see if performance improves when a nested loop join is avoided. To test this, run ``` SET enable_nestloop = off; ``` before your query and see if that improves the speed. Other than that, I cannot think of any improvements.
71,058,311
Similar to this question, but in XSLT 2.0 or 3.0, and I want to break on the last non-word character (like the regex \W) [Finding the last occurrence of a string xslt 1.0](https://stackoverflow.com/questions/11166784/xslt-1-0-finding-the-last-occurence-and-taking-string-before) The input is `REMOVE-THIS-IS-A-TEST-LIN...
2022/02/10
[ "https://Stackoverflow.com/questions/71058311", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3826797/" ]
Think I figured it out myself. In your yaml file, change the target vmImage from windows-latest, to windows-2019. ``` pool: vmImage: 'windows-2019' ```
It might be caused by environment variables of Azure Agent server(build serer). You can review environment variables via project setting - agent pools - your agent pool - agents tab - agent - capabilities tab [![enter image description here](https://i.stack.imgur.com/ISrBA.png)](https://i.stack.imgur.com/ISrBA.png) ...
246,639
I'm trying to lower radon gas levels at home. I currently have one Airthings Wave Plus device in one room and I'm waiting for a second one to triangulate radon sources, but I'm looking for another hopefully faster way to solve this problem because the manufacturer says that to get a 10% accurate reading (no definition...
2022/03/24
[ "https://diy.stackexchange.com/questions/246639", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/149964/" ]
Radon is a noble gas and won't be affected by dyes like that. You could rent a smoke machine and see how the air moves. However the source of the smoke will be of your choosing. Not where the radon is emitting from. Also the smoke tends to stink. and if airflow is too low it's difficult to differentiate between nat...
There is no practical way to color Radon gas which enters the basement of a house. But if a gas or oil burner, which depends on room air, is working in the basement, there would be a pretty high air exchange rate in the cold season. And also in the warm season, if the warm water is made by that burner. The measuring ...
246,639
I'm trying to lower radon gas levels at home. I currently have one Airthings Wave Plus device in one room and I'm waiting for a second one to triangulate radon sources, but I'm looking for another hopefully faster way to solve this problem because the manufacturer says that to get a 10% accurate reading (no definition...
2022/03/24
[ "https://diy.stackexchange.com/questions/246639", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/149964/" ]
Radon mitigation best practices are well defined - radon is heavy and tends to accumulate at the lowest point of the house where there is no ventilation. Really I don't see much point in trying to find the source. [![enter image description here](https://i.stack.imgur.com/2VCxa.gif)](https://i.stack.imgur.com/2VCxa.g...
Radon is a noble gas and won't be affected by dyes like that. You could rent a smoke machine and see how the air moves. However the source of the smoke will be of your choosing. Not where the radon is emitting from. Also the smoke tends to stink. and if airflow is too low it's difficult to differentiate between nat...
246,639
I'm trying to lower radon gas levels at home. I currently have one Airthings Wave Plus device in one room and I'm waiting for a second one to triangulate radon sources, but I'm looking for another hopefully faster way to solve this problem because the manufacturer says that to get a 10% accurate reading (no definition...
2022/03/24
[ "https://diy.stackexchange.com/questions/246639", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/149964/" ]
Radon is a noble gas and won't be affected by dyes like that. You could rent a smoke machine and see how the air moves. However the source of the smoke will be of your choosing. Not where the radon is emitting from. Also the smoke tends to stink. and if airflow is too low it's difficult to differentiate between nat...
Radon is produced in miniscule traces by radium. Radium is an alkali earth like calcium , very similar chemical properties. So if there is any radium it tends to be with calcium. Limestone is mostly calcium and may contain traces of radium. Some radium produces radon VERY,VERY slowly. Because it is a gas it seeps out c...
246,639
I'm trying to lower radon gas levels at home. I currently have one Airthings Wave Plus device in one room and I'm waiting for a second one to triangulate radon sources, but I'm looking for another hopefully faster way to solve this problem because the manufacturer says that to get a 10% accurate reading (no definition...
2022/03/24
[ "https://diy.stackexchange.com/questions/246639", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/149964/" ]
Radon is a noble gas and won't be affected by dyes like that. You could rent a smoke machine and see how the air moves. However the source of the smoke will be of your choosing. Not where the radon is emitting from. Also the smoke tends to stink. and if airflow is too low it's difficult to differentiate between nat...
There are tools like Radon Sniffer which don't color gas but give you Radon levels in as little as 15secs but cost about $1750. It's too expensive for my purpose, but might be useful to others.
246,639
I'm trying to lower radon gas levels at home. I currently have one Airthings Wave Plus device in one room and I'm waiting for a second one to triangulate radon sources, but I'm looking for another hopefully faster way to solve this problem because the manufacturer says that to get a 10% accurate reading (no definition...
2022/03/24
[ "https://diy.stackexchange.com/questions/246639", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/149964/" ]
Radon mitigation best practices are well defined - radon is heavy and tends to accumulate at the lowest point of the house where there is no ventilation. Really I don't see much point in trying to find the source. [![enter image description here](https://i.stack.imgur.com/2VCxa.gif)](https://i.stack.imgur.com/2VCxa.g...
There is no practical way to color Radon gas which enters the basement of a house. But if a gas or oil burner, which depends on room air, is working in the basement, there would be a pretty high air exchange rate in the cold season. And also in the warm season, if the warm water is made by that burner. The measuring ...
246,639
I'm trying to lower radon gas levels at home. I currently have one Airthings Wave Plus device in one room and I'm waiting for a second one to triangulate radon sources, but I'm looking for another hopefully faster way to solve this problem because the manufacturer says that to get a 10% accurate reading (no definition...
2022/03/24
[ "https://diy.stackexchange.com/questions/246639", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/149964/" ]
Radon mitigation best practices are well defined - radon is heavy and tends to accumulate at the lowest point of the house where there is no ventilation. Really I don't see much point in trying to find the source. [![enter image description here](https://i.stack.imgur.com/2VCxa.gif)](https://i.stack.imgur.com/2VCxa.g...
Radon is produced in miniscule traces by radium. Radium is an alkali earth like calcium , very similar chemical properties. So if there is any radium it tends to be with calcium. Limestone is mostly calcium and may contain traces of radium. Some radium produces radon VERY,VERY slowly. Because it is a gas it seeps out c...
246,639
I'm trying to lower radon gas levels at home. I currently have one Airthings Wave Plus device in one room and I'm waiting for a second one to triangulate radon sources, but I'm looking for another hopefully faster way to solve this problem because the manufacturer says that to get a 10% accurate reading (no definition...
2022/03/24
[ "https://diy.stackexchange.com/questions/246639", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/149964/" ]
Radon mitigation best practices are well defined - radon is heavy and tends to accumulate at the lowest point of the house where there is no ventilation. Really I don't see much point in trying to find the source. [![enter image description here](https://i.stack.imgur.com/2VCxa.gif)](https://i.stack.imgur.com/2VCxa.g...
There are tools like Radon Sniffer which don't color gas but give you Radon levels in as little as 15secs but cost about $1750. It's too expensive for my purpose, but might be useful to others.
29,928,903
Currently my design\_dialog is saving the settings under etc/designs/default/jcr, how do I modify the template in order for it to save under etc/designs/(mydesign)/jcr. I was looking at the documentation but couldn't find anything specific on how to ensure the design\_dialog creates the properties under its own design...
2015/04/28
[ "https://Stackoverflow.com/questions/29928903", "https://Stackoverflow.com", "https://Stackoverflow.com/users/209904/" ]
You can try this with a Grid instead of Stack, also add RowHeight to your ListView ``` <ListView ... RowHeight="55"> ... <ViewCell Height="55"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="44"/> <ColumnDefinition Width="*"/> <ColumnDefinition Width="44"/> <!-- for the checkm...
Set HasUnevenRows="True" on the ListView
14,397,788
Default style for DataGridRow is as following: ``` <Style x:Key="{x:Type DataGridRow}" TargetType="{x:Type DataGridRow}"> <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" /> <Setter Property="SnapsToDevicePixels" Value="true"/> ...
2013/01/18
[ "https://Stackoverflow.com/questions/14397788", "https://Stackoverflow.com", "https://Stackoverflow.com/users/85443/" ]
I think the problem is to bind to relative source of the given element's property (PlacementTarget), not the element itself. But RelativeSource markup extension describes the location of the binding source relative to the given element. So, what I did was to set PlacementTarget to the ancestor of original tooltip targe...
Use the ancestor level in that textblock as like below ``` <TextBlock Text="{Binding RelativeSource={ RelativeSource FindAncestor, AncestorType={x:Type DataGridRow},AncestorLevel=1}, Path=Item.Error}" TextWrapping="Wrap"...
9,324,723
I want to make a TCPserver and send/receive message to clients **as needed**, not OnExecute event of the TCPserver. Send/receive message is not a problem; I do like that: ``` procedure TFormMain.SendMessage(IP, Msg: string); var I: Integer; begin with TCPServer.Contexts.LockList do try for I := 0 to Count-...
2012/02/17
[ "https://Stackoverflow.com/questions/9324723", "https://Stackoverflow.com", "https://Stackoverflow.com/users/62313/" ]
Use OnExecute and if you have nothing to do, Sleep() for a period of time, say 10 milliseconds. Each connection has its own OnExecute handler so this will only affect each individual connection.
The `Indy` component set is designed to emulate *blocking* operation on a network connection. You're supposed to encapsulate all your code in the `OnExecute` event handler. That's supposed to be *easier*, because most protocols are blocking any way (send command, wait for response, etc). You apparently don't like it's...
9,324,723
I want to make a TCPserver and send/receive message to clients **as needed**, not OnExecute event of the TCPserver. Send/receive message is not a problem; I do like that: ``` procedure TFormMain.SendMessage(IP, Msg: string); var I: Integer; begin with TCPServer.Contexts.LockList do try for I := 0 to Count-...
2012/02/17
[ "https://Stackoverflow.com/questions/9324723", "https://Stackoverflow.com", "https://Stackoverflow.com/users/62313/" ]
Use OnExecute and if you have nothing to do, Sleep() for a period of time, say 10 milliseconds. Each connection has its own OnExecute handler so this will only affect each individual connection.
In the OnExecute handler, you can use thread communication methods like TEvent and TMonitor to wait until there is data for the client. TMonitor is available since Delphi 2009 and provides methods (Wait, Pulse and PulseAll) to send / receive notifications with mininmal CPU usage.
9,324,723
I want to make a TCPserver and send/receive message to clients **as needed**, not OnExecute event of the TCPserver. Send/receive message is not a problem; I do like that: ``` procedure TFormMain.SendMessage(IP, Msg: string); var I: Integer; begin with TCPServer.Contexts.LockList do try for I := 0 to Count-...
2012/02/17
[ "https://Stackoverflow.com/questions/9324723", "https://Stackoverflow.com", "https://Stackoverflow.com/users/62313/" ]
Use OnExecute and if you have nothing to do, Sleep() for a period of time, say 10 milliseconds. Each connection has its own OnExecute handler so this will only affect each individual connection.
I had similar situation taking 100% CPU and it solved by adding IdThreadComponent and: ``` void __fastcall TForm3::IdThreadComponent1Run(TIdThreadComponent *Sender) { Sleep(10); } ``` Is it right? I am not sure.
9,324,723
I want to make a TCPserver and send/receive message to clients **as needed**, not OnExecute event of the TCPserver. Send/receive message is not a problem; I do like that: ``` procedure TFormMain.SendMessage(IP, Msg: string); var I: Integer; begin with TCPServer.Contexts.LockList do try for I := 0 to Count-...
2012/02/17
[ "https://Stackoverflow.com/questions/9324723", "https://Stackoverflow.com", "https://Stackoverflow.com/users/62313/" ]
`TIdTCPServer` requires an `OnExecute` event handler assigned by default. To get around that, you would have to derive a new class from `TIdTCPServer` and override its virtual `CheckOkToBeActive()` method, and should also override the virtual `DoExecute()` to call `Sleep()`. Otherwise, just assign an event handler and ...
The `Indy` component set is designed to emulate *blocking* operation on a network connection. You're supposed to encapsulate all your code in the `OnExecute` event handler. That's supposed to be *easier*, because most protocols are blocking any way (send command, wait for response, etc). You apparently don't like it's...
9,324,723
I want to make a TCPserver and send/receive message to clients **as needed**, not OnExecute event of the TCPserver. Send/receive message is not a problem; I do like that: ``` procedure TFormMain.SendMessage(IP, Msg: string); var I: Integer; begin with TCPServer.Contexts.LockList do try for I := 0 to Count-...
2012/02/17
[ "https://Stackoverflow.com/questions/9324723", "https://Stackoverflow.com", "https://Stackoverflow.com/users/62313/" ]
`TIdTCPServer` requires an `OnExecute` event handler assigned by default. To get around that, you would have to derive a new class from `TIdTCPServer` and override its virtual `CheckOkToBeActive()` method, and should also override the virtual `DoExecute()` to call `Sleep()`. Otherwise, just assign an event handler and ...
In the OnExecute handler, you can use thread communication methods like TEvent and TMonitor to wait until there is data for the client. TMonitor is available since Delphi 2009 and provides methods (Wait, Pulse and PulseAll) to send / receive notifications with mininmal CPU usage.
9,324,723
I want to make a TCPserver and send/receive message to clients **as needed**, not OnExecute event of the TCPserver. Send/receive message is not a problem; I do like that: ``` procedure TFormMain.SendMessage(IP, Msg: string); var I: Integer; begin with TCPServer.Contexts.LockList do try for I := 0 to Count-...
2012/02/17
[ "https://Stackoverflow.com/questions/9324723", "https://Stackoverflow.com", "https://Stackoverflow.com/users/62313/" ]
`TIdTCPServer` requires an `OnExecute` event handler assigned by default. To get around that, you would have to derive a new class from `TIdTCPServer` and override its virtual `CheckOkToBeActive()` method, and should also override the virtual `DoExecute()` to call `Sleep()`. Otherwise, just assign an event handler and ...
I had similar situation taking 100% CPU and it solved by adding IdThreadComponent and: ``` void __fastcall TForm3::IdThreadComponent1Run(TIdThreadComponent *Sender) { Sleep(10); } ``` Is it right? I am not sure.
24,337,958
I have a function I want to add to dynamically as the program runs. Let's say I have function Foo: ``` function foo() Function1() Function2() Function3() end ``` and I want to change Foo() to: ``` function foo() Function1() Function2() Function3() Function4() end ``` later in the prog...
2014/06/21
[ "https://Stackoverflow.com/questions/24337958", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3762069/" ]
Just do it. The code that you wrote works fine. Functions in Lua can be redefined as desired. If you don't know what `foo` does, you can do this: ``` do local old = foo foo = function () old() Function4() end end ``` Or perhaps it is clearer to use a table of functions: ``` local F={ Function1, Function2, Func...
This is a supplementary answer with background information. Lua identifiers are used for global variables, local variables, parameters and table fields. They hold any type of value. Lua functions are values. Lua functions are all anonymous, regardless of the syntax used to define them. ``` function f() --... end ...
955,155
I have a server running 2012. I have a file in a directory, and I wish to move it to a sub directory, which I do by dragging and dropping. I get an error telling me I require admin priveleges to do this. I search for file explorer in the TRULY AWFUL 2012 startmenu and find it but it won't allow me to run as administ...
2015/08/11
[ "https://superuser.com/questions/955155", "https://superuser.com", "https://superuser.com/users/3765/" ]
How can I click-drag to move a folder that needs admin permissions in explorer? ------------------------------------------------------------------------------- 1. `Win+X` --> `Command prompt (admin)` (alternatively right click the `Start` tile in `Desktop` mode) 2. `explorer` (`Enter`) 3. Using the new administrative ...
In order to move something that requires admin privileges, you will have to go through the UAC process in order to move it. Launching Windows Explorer as an administrator will enable you to drag and drop. This can be done with the right click context menu, or launch command prompt with administrator privileges and type...