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
44,268,305
I am a programming student, I'm trying to build a simple website using HTML, JavaScripts, and jQuery for the front-end, and node.js + Express frameworks for the back-end. In this example, I am using Ajax to get data, then append HTML codes + this data to a div element with the id = 'listFile'. The implementation work...
2017/05/30
[ "https://Stackoverflow.com/questions/44268305", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4776227/" ]
Change your `click` binding like below: ``` $(document).on('click', '#deleteButton',function(){ alert("DELETED"); }); ``` **Explanation:** `$('#deleteButton').click` event will work only for available DOM element when window load successfully. As Delete button is created dynamically using ajax so you should use `...
This is all about having the ".click" method bound to the new item you created. .click is setup to look at the dom on first load but will not attach any newly created buttons to the click event. By using ".on" you are telling your script to look at whatever you are targeting and then attach whatever event to it. ``` $...
44,268,305
I am a programming student, I'm trying to build a simple website using HTML, JavaScripts, and jQuery for the front-end, and node.js + Express frameworks for the back-end. In this example, I am using Ajax to get data, then append HTML codes + this data to a div element with the id = 'listFile'. The implementation work...
2017/05/30
[ "https://Stackoverflow.com/questions/44268305", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4776227/" ]
Change your `click` binding like below: ``` $(document).on('click', '#deleteButton',function(){ alert("DELETED"); }); ``` **Explanation:** `$('#deleteButton').click` event will work only for available DOM element when window load successfully. As Delete button is created dynamically using ajax so you should use `...
Your jquery selector is based on an id of "deleteButton." ID's should be unique within a document but your code will generate multiple links with ID=deleteButton. Consider adding a class to your delete button and then using that as the selector: ``` $.ajax({ url: '/download', method: "get", success: func...
44,268,305
I am a programming student, I'm trying to build a simple website using HTML, JavaScripts, and jQuery for the front-end, and node.js + Express frameworks for the back-end. In this example, I am using Ajax to get data, then append HTML codes + this data to a div element with the id = 'listFile'. The implementation work...
2017/05/30
[ "https://Stackoverflow.com/questions/44268305", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4776227/" ]
Change your `click` binding like below: ``` $(document).on('click', '#deleteButton',function(){ alert("DELETED"); }); ``` **Explanation:** `$('#deleteButton').click` event will work only for available DOM element when window load successfully. As Delete button is created dynamically using ajax so you should use `...
You need to use **Event Delegation**. This means that instead of attaching the click event on the `delete` button itself, you attach it on any of its ascendent. Now whenever the button is clicked, due to the `Event Bubbling` process, the event is moved all the way up to the DOM. As soon as the event reaches the target ...
73,082,119
I'm new to Web Development, and I have made a good progress so far. I've encountered this in a recent CSS tutorial while building my Portfolio: ```css .container { width: var(--container-width-lg); margin: 0 auto; } .container.contact__container { width: 50%; display: grid; grid-templa...
2022/07/22
[ "https://Stackoverflow.com/questions/73082119", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8302581/" ]
You can most definitely just define the class for contact\_\_container alone. Although, the way this is set up is to disallow that class styling from being applied anywhere outside of a 'container' class element. As an example, in a setup similar to yours, 'bar' would receive styling: ``` <div class="foo"> <div ...
It works both ways, but it is a good practice to write the two classes. It makes your code more readable and understandable.
73,082,119
I'm new to Web Development, and I have made a good progress so far. I've encountered this in a recent CSS tutorial while building my Portfolio: ```css .container { width: var(--container-width-lg); margin: 0 auto; } .container.contact__container { width: 50%; display: grid; grid-templa...
2022/07/22
[ "https://Stackoverflow.com/questions/73082119", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8302581/" ]
You can most definitely just define the class for contact\_\_container alone. Although, the way this is set up is to disallow that class styling from being applied anywhere outside of a 'container' class element. As an example, in a setup similar to yours, 'bar' would receive styling: ``` <div class="foo"> <div ...
In the example you shared `.container` has some styles and `container.contact__container` has extra styles. This is saying apply the styles targeting `.container` to **ANY** div which has a class of `.container`, but **ONLY** apply the second set of styles to an element with the class of `.container` if it **ALSO** ha...
33,619,956
I have a view controller in a navigation stack that represents a form that the user can fill out. The form has a handful of text fields and an "Apply" button at the bottom. If the user taps the native back button on the navigation bar after entering some information, I want the user to be prompted with a confirmation m...
2015/11/09
[ "https://Stackoverflow.com/questions/33619956", "https://Stackoverflow.com", "https://Stackoverflow.com/users/397230/" ]
In Objective C you can override the navigationShouldPopOnBackButton function of the ViewController class to display a prompt message to the user ``` -(BOOL) navigationShouldPopOnBackButton { // Do your logic return NO; } ```
You need to set `UINavigationItem` to the custom button in you `UIViewController` class. After that you can execute your custom code in the `backButtonTouch:` function: ``` self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Back", nil) ...
17,032,440
I have the following JSON object. Using JQuery I need to find the values of the following: summary.nameValues.ID and detail.TypedNameValues.size Could somebody please show how this can be achieved using JQuery? ``` [ { "path": "\\Users\\john.smith\\test", "summary": { "NameValues": [ { ...
2013/06/10
[ "https://Stackoverflow.com/questions/17032440", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1513388/" ]
jQuery doesn't work on plain object literals. You can use the below function in a similar way to search all 'id's (or any other property), regardless of its depth in the object: ``` function getObjects(obj, key, val) { var objects = []; for (var i in obj) { if (!obj.hasOwnProperty(i)) continue; ...
Some one else as already answered, either way here is my version for the same. ``` <textarea id="ta" style="display:none;">[ { "path": "\\Users\\john.smith\\test", "summary": { "NameValues": [ { "Name": "Id", "Values": [ "232639" ...
17,032,440
I have the following JSON object. Using JQuery I need to find the values of the following: summary.nameValues.ID and detail.TypedNameValues.size Could somebody please show how this can be achieved using JQuery? ``` [ { "path": "\\Users\\john.smith\\test", "summary": { "NameValues": [ { ...
2013/06/10
[ "https://Stackoverflow.com/questions/17032440", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1513388/" ]
jQuery doesn't work on plain object literals. You can use the below function in a similar way to search all 'id's (or any other property), regardless of its depth in the object: ``` function getObjects(obj, key, val) { var objects = []; for (var i in obj) { if (!obj.hasOwnProperty(i)) continue; ...
Performing this kind of queries on JSON structures are trivial using DefiantJS (<http://defiantjs.com>). This lib extends the global object JSON with the method "search" - with which one can execute XPath expressive searches. Check out this fiddle; <http://jsfiddle.net/hbi99/kLE2v/> The code can look like this: `...
17,032,440
I have the following JSON object. Using JQuery I need to find the values of the following: summary.nameValues.ID and detail.TypedNameValues.size Could somebody please show how this can be achieved using JQuery? ``` [ { "path": "\\Users\\john.smith\\test", "summary": { "NameValues": [ { ...
2013/06/10
[ "https://Stackoverflow.com/questions/17032440", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1513388/" ]
Performing this kind of queries on JSON structures are trivial using DefiantJS (<http://defiantjs.com>). This lib extends the global object JSON with the method "search" - with which one can execute XPath expressive searches. Check out this fiddle; <http://jsfiddle.net/hbi99/kLE2v/> The code can look like this: `...
Some one else as already answered, either way here is my version for the same. ``` <textarea id="ta" style="display:none;">[ { "path": "\\Users\\john.smith\\test", "summary": { "NameValues": [ { "Name": "Id", "Values": [ "232639" ...
54,976
Ashley got all healed up and on her feet again, and I was expecting her to be somewhere on the Normandy after leaving the Citadel, but she's nowhere to be found. I talked to Udina, but his answer was just that she's become a Spectre, the first of many since the war broke out, apparently. Doesn't she know she's more tha...
2012/03/11
[ "https://gaming.stackexchange.com/questions/54976", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/1351/" ]
The answer is yes, Spoiler: > > but it will be *after* the assault on the Citadel by Cerberus. > > Eventually, Ashley/Kaidan will be fully healed but will be recruited by Udina to be a bodyguard for the Councilors; Ashley/Kaidan is unaware that Udina and Cerberus are working together to lead the Councilors into...
Yes, they will after a certain event. Spoiler: > > After Cerberus attacks the Citadel > > >
54,976
Ashley got all healed up and on her feet again, and I was expecting her to be somewhere on the Normandy after leaving the Citadel, but she's nowhere to be found. I talked to Udina, but his answer was just that she's become a Spectre, the first of many since the war broke out, apparently. Doesn't she know she's more tha...
2012/03/11
[ "https://gaming.stackexchange.com/questions/54976", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/1351/" ]
Yes, they will after a certain event. Spoiler: > > After Cerberus attacks the Citadel > > >
Yes. To do so, you MUST have done all of the following: 1. Save the ORIGINAL Council in Mass Effect 1. * If you let the Council die, then in ME2 and ME3 the NEW Council feels that you would put human interests before galactic concerns (something Cerberus would do). 2. Visited them at the hospital all 3 times. * Wh...
54,976
Ashley got all healed up and on her feet again, and I was expecting her to be somewhere on the Normandy after leaving the Citadel, but she's nowhere to be found. I talked to Udina, but his answer was just that she's become a Spectre, the first of many since the war broke out, apparently. Doesn't she know she's more tha...
2012/03/11
[ "https://gaming.stackexchange.com/questions/54976", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/1351/" ]
Yes, they will after a certain event. Spoiler: > > After Cerberus attacks the Citadel > > >
As far as if Ashley or Kaiden return to the Normandy, they don't have to but yet, there is the option to get them back. Just keep playing the story, I can't say any more than that without spoilers. What I can say though, is you won't be able to miss the conversation that determines this.
54,976
Ashley got all healed up and on her feet again, and I was expecting her to be somewhere on the Normandy after leaving the Citadel, but she's nowhere to be found. I talked to Udina, but his answer was just that she's become a Spectre, the first of many since the war broke out, apparently. Doesn't she know she's more tha...
2012/03/11
[ "https://gaming.stackexchange.com/questions/54976", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/1351/" ]
The answer is yes, Spoiler: > > but it will be *after* the assault on the Citadel by Cerberus. > > Eventually, Ashley/Kaidan will be fully healed but will be recruited by Udina to be a bodyguard for the Councilors; Ashley/Kaidan is unaware that Udina and Cerberus are working together to lead the Councilors into...
Yes. To do so, you MUST have done all of the following: 1. Save the ORIGINAL Council in Mass Effect 1. * If you let the Council die, then in ME2 and ME3 the NEW Council feels that you would put human interests before galactic concerns (something Cerberus would do). 2. Visited them at the hospital all 3 times. * Wh...
54,976
Ashley got all healed up and on her feet again, and I was expecting her to be somewhere on the Normandy after leaving the Citadel, but she's nowhere to be found. I talked to Udina, but his answer was just that she's become a Spectre, the first of many since the war broke out, apparently. Doesn't she know she's more tha...
2012/03/11
[ "https://gaming.stackexchange.com/questions/54976", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/1351/" ]
The answer is yes, Spoiler: > > but it will be *after* the assault on the Citadel by Cerberus. > > Eventually, Ashley/Kaidan will be fully healed but will be recruited by Udina to be a bodyguard for the Councilors; Ashley/Kaidan is unaware that Udina and Cerberus are working together to lead the Councilors into...
As far as if Ashley or Kaiden return to the Normandy, they don't have to but yet, there is the option to get them back. Just keep playing the story, I can't say any more than that without spoilers. What I can say though, is you won't be able to miss the conversation that determines this.
810,606
$$\int\frac{x^5+x-1}{x^3 +1} dx$$ Have tried everything ... polynomial long division, partial fractions, trig substitution etc... Not for an assignment, so if a complete solution could be provided that'd be much appreaciated
2014/05/27
[ "https://math.stackexchange.com/questions/810606", "https://math.stackexchange.com", "https://math.stackexchange.com/users/149271/" ]
Let $S$ be the shift operator on sequences. That is, for any sequence, $a$, $$ (Sa)\_i=a\_{i+1}\tag{1} $$ Then, the recursion becomes $$ U\_n=\frac{c^nS-I}{c^n-1}U\_{n-1}\tag{2} $$ Consider the polynomial $$ \prod\_{k=1}^n\left(c^kx-1\right)=\sum\_{p=0}^na\_{n,p}x^p\tag{3} $$ We have that $a\_{n,0}=(-1)^n$ and since ea...
Here’s what I hope is a good start. I’m stuck at the very end, but maybe you can finish it up. (It is homework, after all.) The special functions experts might have a quicker way to answer this, I imagine. For $h=0$, the desired result is exactly what “we know.” Use induction, and assume the result for $h<M$. $$ \be...
69,008,105
I have setup a Django project on a virtual environment on my PC. When using the command ``` python manage.py runserver 0.0.0.0:8000 ``` Bit Bash stops doing anything and I have to end the program to start over. I have waited several minutes and when I end the session, a dialogue says: ``` Processes are running in s...
2021/09/01
[ "https://Stackoverflow.com/questions/69008105", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1029365/" ]
This is because something already running on port `8000`. You can run the Django server by hosting on another port like `8080` but, you can also kill the already running task on the port. Follow the [link](https://stackoverflow.com/questions/11583562/how-to-kill-a-process-running-on-particular-port-in-linux) to know ho...
python manage.py runserver 127.0.0.1:8080
69,008,105
I have setup a Django project on a virtual environment on my PC. When using the command ``` python manage.py runserver 0.0.0.0:8000 ``` Bit Bash stops doing anything and I have to end the program to start over. I have waited several minutes and when I end the session, a dialogue says: ``` Processes are running in s...
2021/09/01
[ "https://Stackoverflow.com/questions/69008105", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1029365/" ]
It is highly likely that another application is running using the port 8000. Try running the server using another port, say 8088 and share if the same issue persists.
python manage.py runserver 127.0.0.1:8080
69,008,105
I have setup a Django project on a virtual environment on my PC. When using the command ``` python manage.py runserver 0.0.0.0:8000 ``` Bit Bash stops doing anything and I have to end the program to start over. I have waited several minutes and when I end the session, a dialogue says: ``` Processes are running in s...
2021/09/01
[ "https://Stackoverflow.com/questions/69008105", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1029365/" ]
To run on specific port kill all pids which is showing you on Git bash (`ps -ef`)... kill them using (`kill -9 pid_no`)... then run your runserver command. Ex: ``` ps -ef kill -9 123 ```
python manage.py runserver 127.0.0.1:8080
69,008,105
I have setup a Django project on a virtual environment on my PC. When using the command ``` python manage.py runserver 0.0.0.0:8000 ``` Bit Bash stops doing anything and I have to end the program to start over. I have waited several minutes and when I end the session, a dialogue says: ``` Processes are running in s...
2021/09/01
[ "https://Stackoverflow.com/questions/69008105", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1029365/" ]
I ended up paying someone to fix this. Here is the conversation I had with the person who found the issue. Hope this helps someone out there. Also, I noticed sometimes it still does freeze up on the `watching for file changes with StateReloader` until I go the browser and type in `http://localhost:8000/`. Once I do th...
python manage.py runserver 127.0.0.1:8080
69,008,105
I have setup a Django project on a virtual environment on my PC. When using the command ``` python manage.py runserver 0.0.0.0:8000 ``` Bit Bash stops doing anything and I have to end the program to start over. I have waited several minutes and when I end the session, a dialogue says: ``` Processes are running in s...
2021/09/01
[ "https://Stackoverflow.com/questions/69008105", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1029365/" ]
I have never found solutions to this problem even with killing ports, changing port etc. [![enter image description here](https://i.stack.imgur.com/PvF7I.png)](https://i.stack.imgur.com/PvF7I.png) It never display the following part: ``` Starting development server at http://127.0.0.1:8000/ ``` However, when I use...
python manage.py runserver 127.0.0.1:8080
22,927,334
Can I get a quick reality check? The idea that I'm working on is that I have text in a HTML template that looks like `{Field1}` and I want to populate the values for that field from a MySQLi connection where the database field is `Field1`. So in theory I should get the data in an array, then cycle through that array,...
2014/04/08
[ "https://Stackoverflow.com/questions/22927334", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1502198/" ]
If you don't want to write it by hand you'll need a library. [moment.js](http://momentjs.com) is a good choice.
Given `I will have the dateforamt in a string ie "dd-mm-yyyy"` you can easily parse the string using a function like: ``` function parseString(s) { s = s.split(/\D+/); return new Date(s[2], --s[1], s[0],0,0,0,0); } console.log(parseString('04-03-2014')); // Tuesday, 4 March 2014 ```
18,539,121
I'm importing a fairly hefty amount of data into a SQL Server database. The source data originates from PgSql (including table defs), which I throw through some fairly simple regex to translate to TSql. This creates tables with no primary key. As far as I understand, lack of a primary key/clustering index means that t...
2013/08/30
[ "https://Stackoverflow.com/questions/18539121", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14357/" ]
When you execute ``` ALTER TABLE someTable ADD CONSTRAINT PK_someTable PRIMARY KEY (id); ``` if there is no clustered index on `someTable` then the PK will be a clustered PK. Otherwise, if there is a clustered index before executing `ALTER .. ADD ... PRIMARY KEY (id)` the PK will be a non-clustered PK. **-- Test #...
In sql server, a primary keys defaults to clustered if no clustered index exists. A clustered index really means that the "index" is not kept in a separate storage area (as is a non-clustered index), but that the index data is "interspersed" with the corresponding regular table data. If you thing about this, you will r...
18,539,121
I'm importing a fairly hefty amount of data into a SQL Server database. The source data originates from PgSql (including table defs), which I throw through some fairly simple regex to translate to TSql. This creates tables with no primary key. As far as I understand, lack of a primary key/clustering index means that t...
2013/08/30
[ "https://Stackoverflow.com/questions/18539121", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14357/" ]
When you execute ``` ALTER TABLE someTable ADD CONSTRAINT PK_someTable PRIMARY KEY (id); ``` if there is no clustered index on `someTable` then the PK will be a clustered PK. Otherwise, if there is a clustered index before executing `ALTER .. ADD ... PRIMARY KEY (id)` the PK will be a non-clustered PK. **-- Test #...
Thanks for a nice demonstration of the subject ! The conclusions in the above is **not** wrong, but it shows the structure of the index, and not of the the table. I think the following SQL will show information for the actual table: ``` select o.name, o.object_id, case when p.index_id = 0 then '...
18,539,121
I'm importing a fairly hefty amount of data into a SQL Server database. The source data originates from PgSql (including table defs), which I throw through some fairly simple regex to translate to TSql. This creates tables with no primary key. As far as I understand, lack of a primary key/clustering index means that t...
2013/08/30
[ "https://Stackoverflow.com/questions/18539121", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14357/" ]
In sql server, a primary keys defaults to clustered if no clustered index exists. A clustered index really means that the "index" is not kept in a separate storage area (as is a non-clustered index), but that the index data is "interspersed" with the corresponding regular table data. If you thing about this, you will r...
Thanks for a nice demonstration of the subject ! The conclusions in the above is **not** wrong, but it shows the structure of the index, and not of the the table. I think the following SQL will show information for the actual table: ``` select o.name, o.object_id, case when p.index_id = 0 then '...
62,543,211
I made a script to automatically redirect to English Wikipedia and Wiktionary. However, my script doesn't work anymore after I added the functionality to Wiktionary. ``` // @match https://*.wikipedia.org/* // @exclude https://en.wikipedia.org/* // Change the above to fit your language // @match htt...
2020/06/23
[ "https://Stackoverflow.com/questions/62543211", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13795217/" ]
I believe this is different enough to my previous answer to justify a second one. I answered the latter in complete denial of the new scale functions that came with ggplot2 3.3.0, and now here we go, they make it much easier. I'd still keep the other solution because it might help for ... well very specific requirement...
**edit** I recommend not to use this answer - my second answer in this thread is much more appropriate, but I have answered this here in ignorance of the new functions. I still think it may be useful in very specific situations, so I leave it for future readers. The functions are taken and modified taken from [Claus W...
62,543,211
I made a script to automatically redirect to English Wikipedia and Wiktionary. However, my script doesn't work anymore after I added the functionality to Wiktionary. ``` // @match https://*.wikipedia.org/* // @exclude https://en.wikipedia.org/* // Change the above to fit your language // @match htt...
2020/06/23
[ "https://Stackoverflow.com/questions/62543211", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13795217/" ]
**edit** I recommend not to use this answer - my second answer in this thread is much more appropriate, but I have answered this here in ignorance of the new functions. I still think it may be useful in very specific situations, so I leave it for future readers. The functions are taken and modified taken from [Claus W...
If I'm not mistaken, the ggplot version 3.3.0 might solve all your problems (as shown in part [here](https://www.tidyverse.org/blog/2020/03/ggplot2-3-3-0/)). metR package seems to be no longer needed. Although the question is old, this might help future readers. You can use the `guide_colorsteps` function to change fro...
62,543,211
I made a script to automatically redirect to English Wikipedia and Wiktionary. However, my script doesn't work anymore after I added the functionality to Wiktionary. ``` // @match https://*.wikipedia.org/* // @exclude https://en.wikipedia.org/* // Change the above to fit your language // @match htt...
2020/06/23
[ "https://Stackoverflow.com/questions/62543211", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13795217/" ]
I believe this is different enough to my previous answer to justify a second one. I answered the latter in complete denial of the new scale functions that came with ggplot2 3.3.0, and now here we go, they make it much easier. I'd still keep the other solution because it might help for ... well very specific requirement...
Another option is to make use of `guide_bins`. To get nice labels you can probably make use of the `labels` argument to `cut` as I do in my approach. Unfortunately I could not figure out a way to remove the spacing between the legend keys or to have a black frame around the keys. Also, without a glance at your data ...
62,543,211
I made a script to automatically redirect to English Wikipedia and Wiktionary. However, my script doesn't work anymore after I added the functionality to Wiktionary. ``` // @match https://*.wikipedia.org/* // @exclude https://en.wikipedia.org/* // Change the above to fit your language // @match htt...
2020/06/23
[ "https://Stackoverflow.com/questions/62543211", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13795217/" ]
Another option is to make use of `guide_bins`. To get nice labels you can probably make use of the `labels` argument to `cut` as I do in my approach. Unfortunately I could not figure out a way to remove the spacing between the legend keys or to have a black frame around the keys. Also, without a glance at your data ...
If I'm not mistaken, the ggplot version 3.3.0 might solve all your problems (as shown in part [here](https://www.tidyverse.org/blog/2020/03/ggplot2-3-3-0/)). metR package seems to be no longer needed. Although the question is old, this might help future readers. You can use the `guide_colorsteps` function to change fro...
62,543,211
I made a script to automatically redirect to English Wikipedia and Wiktionary. However, my script doesn't work anymore after I added the functionality to Wiktionary. ``` // @match https://*.wikipedia.org/* // @exclude https://en.wikipedia.org/* // Change the above to fit your language // @match htt...
2020/06/23
[ "https://Stackoverflow.com/questions/62543211", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13795217/" ]
I believe this is different enough to my previous answer to justify a second one. I answered the latter in complete denial of the new scale functions that came with ggplot2 3.3.0, and now here we go, they make it much easier. I'd still keep the other solution because it might help for ... well very specific requirement...
This is an old answer, but the `metR` package might solve this issue with the new discretised scale (disclaimer, I'm the author :) ). Use `ggplot2::geom_contour_filled()` (or `metR::geom_contour_fill(aes(fill = stat(level)))`) and then use `metR::scale_fill_discretised()` ```r library(ggplot2) breaks <- c(-Inf,-2., ...
62,543,211
I made a script to automatically redirect to English Wikipedia and Wiktionary. However, my script doesn't work anymore after I added the functionality to Wiktionary. ``` // @match https://*.wikipedia.org/* // @exclude https://en.wikipedia.org/* // Change the above to fit your language // @match htt...
2020/06/23
[ "https://Stackoverflow.com/questions/62543211", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13795217/" ]
I believe this is different enough to my previous answer to justify a second one. I answered the latter in complete denial of the new scale functions that came with ggplot2 3.3.0, and now here we go, they make it much easier. I'd still keep the other solution because it might help for ... well very specific requirement...
If I'm not mistaken, the ggplot version 3.3.0 might solve all your problems (as shown in part [here](https://www.tidyverse.org/blog/2020/03/ggplot2-3-3-0/)). metR package seems to be no longer needed. Although the question is old, this might help future readers. You can use the `guide_colorsteps` function to change fro...
62,543,211
I made a script to automatically redirect to English Wikipedia and Wiktionary. However, my script doesn't work anymore after I added the functionality to Wiktionary. ``` // @match https://*.wikipedia.org/* // @exclude https://en.wikipedia.org/* // Change the above to fit your language // @match htt...
2020/06/23
[ "https://Stackoverflow.com/questions/62543211", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13795217/" ]
This is an old answer, but the `metR` package might solve this issue with the new discretised scale (disclaimer, I'm the author :) ). Use `ggplot2::geom_contour_filled()` (or `metR::geom_contour_fill(aes(fill = stat(level)))`) and then use `metR::scale_fill_discretised()` ```r library(ggplot2) breaks <- c(-Inf,-2., ...
If I'm not mistaken, the ggplot version 3.3.0 might solve all your problems (as shown in part [here](https://www.tidyverse.org/blog/2020/03/ggplot2-3-3-0/)). metR package seems to be no longer needed. Although the question is old, this might help future readers. You can use the `guide_colorsteps` function to change fro...
30,187,199
I had to upgrade a legacy project from Visual Studio 2010 to Visual Studio 2013. When in VS 2013 I tried to load solutions, it showed migration report with warnings (and no errors!) - all warnings where `­Visual Studio needs to make non-functional changes to this project in order to enable the project to open in Visu...
2015/05/12
[ "https://Stackoverflow.com/questions/30187199", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1721298/" ]
It was a project to create SQL CLR assembly, and as it turns out this project type (Visual C# SQL CLR Database Project) is no more available in Visual Studio 2012 and Visual Studio 2013
Save original version to some directory, then upgrade and compare directories with some comparison tool like kdiff3, etc and see what has changed
51,505,237
This error is displayed: > > Render problem - Failed to load AppCompat ActionBar with unknown error. > > > --- xml (text): ``` <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/...
2018/07/24
[ "https://Stackoverflow.com/questions/51505237", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10129021/" ]
We can use `lapply` on 'start' to get the `seq`uence with `length.out` specified as 'len'. Then either extract the 'l' as a `vector` ``` df$l[unlist(lapply(start, function(x) seq(x, length.out =len)))] ``` or as a `list` of `vector`s ``` lapply(start, function(x) as.character(df$l)[seq(x, length.out = len)]) ```
Here are two options to get the exact output you have specified, but first make sure your df$l is not a factor. ``` df <- data.frame(l = letters[1:10], n = 1:10, stringsAsFactors = FALSE) start <- c(2, 4) len <- 2 for (s in start) {cat(df[s:(s+len-1), 1]); cat("\n")} # b c # d e cat(sapply(start, function(x) {paste(...
55,269,867
here is my program: ``` #include <iostream> using namespace std; int main(){ int num; int numtotal = 0; int numcount = 0; int big = 0; int low = 0; cout<<"enter number or 0 to exit"<<endl; cin>>num; while(num != 0){ numtotal = numtotal + num; numcount++; big = ...
2019/03/20
[ "https://Stackoverflow.com/questions/55269867", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10568815/" ]
I think you are better off getting the posts you want based a specific category to begin with rather than filtering everything. ``` $term = get_term_by('name', 'Today', 'category'); if ($term) { $category = get_the_category($term->term_id); } else { echo "Category not found"; } ```
You can loop through the returned `$category` array: ``` foreach($category as $cat) { if ($cat->name == 'Today') { //do your stuff } } ```
24,038,499
I am loading `ImageView` using the below code from URL ``` int resID = getResources().getIdentifier(name, "drawable", this.getPackageName()); chat_home.setImageResource(resID); ``` while I refresh the page, `ImageView` (i.e `chat_home`) is disappear for several second during that time I have to discard the `chat_ho...
2014/06/04
[ "https://Stackoverflow.com/questions/24038499", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3145553/" ]
Here's one approach using `qdap` + `tm` packages: ``` library(qdap); library(tm); library(qdapTools) dat <- list2df(list(doc1 = "very good, very bad, you are great", doc2 = "very bad, good restaurent, nice place to visit"), "text", "docs") x <- sub_holder(", ", dat$text) m <- dtm(wfm(x$unhold(gsub(" ", "~~", x$out...
What if you just used strsplit to split on commas and then turned your phrases into single "words" by combining with some character. For example ``` library(tm) docs <- c(D1 = "very good, very bad, you are great", D2 = "very bad, good restaurent, nice place to visit") dd <- Corpus(VectorSource(docs)) dd <- tm_ma...
24,038,499
I am loading `ImageView` using the below code from URL ``` int resID = getResources().getIdentifier(name, "drawable", this.getPackageName()); chat_home.setImageResource(resID); ``` while I refresh the page, `ImageView` (i.e `chat_home`) is disappear for several second during that time I have to discard the `chat_ho...
2014/06/04
[ "https://Stackoverflow.com/questions/24038499", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3145553/" ]
Here's one approach using `qdap` + `tm` packages: ``` library(qdap); library(tm); library(qdapTools) dat <- list2df(list(doc1 = "very good, very bad, you are great", doc2 = "very bad, good restaurent, nice place to visit"), "text", "docs") x <- sub_holder(", ", dat$text) m <- dtm(wfm(x$unhold(gsub(" ", "~~", x$out...
For anyone using text2vec this is quite handy solution based on custom vocabulary: ``` library(text2vec) doc1 <- 'very good, very bad, you are great' doc2 <- 'very bad, good restaurent, nice place to visit' docs <- list(doc1, doc2) docs <- sapply(docs, strsplit, split=', ') vocab <- vocab_vectorizer(create_vocabulary(...
48,310,924
For an easter egg, I want to be able to replace every word on my webpage with a constant string. Existing questions focus on replacing *certain* words, elements that don't contain many other elements, or use libraries such as JQuery. Structure should be kept, i.e. `<li>Some text <span>link</span> more text</li>` should...
2018/01/17
[ "https://Stackoverflow.com/questions/48310924", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1726797/" ]
How fun! You can get and assign to the `nodeValue` of a text node. regex will get you at the very least really close with `/[\w\x7f-\xff]+/g` (The hex values match a good portion of special characters. [See here](https://stackoverflow.com/a/22152471/854246)) ```js (function recur (el) { if (typeof el === 'undefine...
This is one of the simplest ways (Borrowed some help from [this answer](https://stackoverflow.com/questions/2525368/loop-through-text-nodes-inside-a-div)): ```js function ReplaceChildText(node, replaceText) { //Is this a text node? if (node.nodeType === 3) { //Simply replace the value with your regex:...
48,310,924
For an easter egg, I want to be able to replace every word on my webpage with a constant string. Existing questions focus on replacing *certain* words, elements that don't contain many other elements, or use libraries such as JQuery. Structure should be kept, i.e. `<li>Some text <span>link</span> more text</li>` should...
2018/01/17
[ "https://Stackoverflow.com/questions/48310924", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1726797/" ]
I would highly suggest you look into using a [TreeWalker](https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker), a DOM API used for exactly this purpose - traversing a DOM tree. It can find all of the text nodes in the document and it finds them very efficiently, since modern browsers run API calls like this in ...
How fun! You can get and assign to the `nodeValue` of a text node. regex will get you at the very least really close with `/[\w\x7f-\xff]+/g` (The hex values match a good portion of special characters. [See here](https://stackoverflow.com/a/22152471/854246)) ```js (function recur (el) { if (typeof el === 'undefine...
48,310,924
For an easter egg, I want to be able to replace every word on my webpage with a constant string. Existing questions focus on replacing *certain* words, elements that don't contain many other elements, or use libraries such as JQuery. Structure should be kept, i.e. `<li>Some text <span>link</span> more text</li>` should...
2018/01/17
[ "https://Stackoverflow.com/questions/48310924", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1726797/" ]
I would highly suggest you look into using a [TreeWalker](https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker), a DOM API used for exactly this purpose - traversing a DOM tree. It can find all of the text nodes in the document and it finds them very efficiently, since modern browsers run API calls like this in ...
This is one of the simplest ways (Borrowed some help from [this answer](https://stackoverflow.com/questions/2525368/loop-through-text-nodes-inside-a-div)): ```js function ReplaceChildText(node, replaceText) { //Is this a text node? if (node.nodeType === 3) { //Simply replace the value with your regex:...
443,874
I have 32bit Ubuntu on AMD 64 machine, if I install 64 bit GNU/Linux will it will run faster?
2012/07/02
[ "https://superuser.com/questions/443874", "https://superuser.com", "https://superuser.com/users/50659/" ]
It depends. **On average** it will use slightly more memory (possibly slowing it down) but also gain access to a lot more registers in the CPU. The difference is usually quite small.
It all depends on the programs that you run. If they are optimized to utilize the power of 64 bit computing then you will definitely find boost in performance.
443,874
I have 32bit Ubuntu on AMD 64 machine, if I install 64 bit GNU/Linux will it will run faster?
2012/07/02
[ "https://superuser.com/questions/443874", "https://superuser.com", "https://superuser.com/users/50659/" ]
It depends. **On average** it will use slightly more memory (possibly slowing it down) but also gain access to a lot more registers in the CPU. The difference is usually quite small.
Think of it like a vehicle... a truck carrying 32 tons of stuff can travel just as fast as a truck carrying 64 tons of stuff... this would be the frequency of the system... but their PAYLOAD is different. The 64bit system can move twice as much data per 'clock tick' than the 32bit system... both may run at 2GHz, but t...
443,874
I have 32bit Ubuntu on AMD 64 machine, if I install 64 bit GNU/Linux will it will run faster?
2012/07/02
[ "https://superuser.com/questions/443874", "https://superuser.com", "https://superuser.com/users/50659/" ]
It all depends on the programs that you run. If they are optimized to utilize the power of 64 bit computing then you will definitely find boost in performance.
Think of it like a vehicle... a truck carrying 32 tons of stuff can travel just as fast as a truck carrying 64 tons of stuff... this would be the frequency of the system... but their PAYLOAD is different. The 64bit system can move twice as much data per 'clock tick' than the 32bit system... both may run at 2GHz, but t...
23,811,268
I am trying to manipulate a file which have around 1 million rows. Below is my example input- ``` chr1 GeneA E1 - chr1 GeneA E2 - chr1 GeneA E3 - chr1 GeneB E1 + chr1 GeneB E2 + chr1 GeneB E3 + chr1 GeneB E4 + chr1 GeneC E1 - chr1 GeneC E2 - chr2 GeneD E1 + ``` I want to reverse the ord...
2014/05/22
[ "https://Stackoverflow.com/questions/23811268", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1173417/" ]
I can't make proper sense of your description and code, but from your data example I think this is what you want. Basically the third field in each row is copied to form a new fifth field. Then, in every sequence of rows where the first and second fields match and trhe fourth is a hyphen `-`, the row order of the new ...
Create a buffer of lines with `-`. ``` use warnings; use strict; my @buf; while (<DATA>) { chomp; my @cols = split; if ($cols[3] eq '-') { push @buf, $_; } else { if (@buf) { my @lasts = reverse map { (split)[2] } @buf; my $i = 0; for my $line (@...
23,811,268
I am trying to manipulate a file which have around 1 million rows. Below is my example input- ``` chr1 GeneA E1 - chr1 GeneA E2 - chr1 GeneA E3 - chr1 GeneB E1 + chr1 GeneB E2 + chr1 GeneB E3 + chr1 GeneB E4 + chr1 GeneC E1 - chr1 GeneC E2 - chr2 GeneD E1 + ``` I want to reverse the ord...
2014/05/22
[ "https://Stackoverflow.com/questions/23811268", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1173417/" ]
Always include [`use strict;`](http://perldoc.perl.org/strict.html) and [`use warnings;`](http://perldoc.perl.org/warnings.html) at the top of EVERY script. To do this project, you just need to keep a buffer of lines to later process once you see a change in your first two fields. This is a fairly common programming c...
Create a buffer of lines with `-`. ``` use warnings; use strict; my @buf; while (<DATA>) { chomp; my @cols = split; if ($cols[3] eq '-') { push @buf, $_; } else { if (@buf) { my @lasts = reverse map { (split)[2] } @buf; my $i = 0; for my $line (@...
23,811,268
I am trying to manipulate a file which have around 1 million rows. Below is my example input- ``` chr1 GeneA E1 - chr1 GeneA E2 - chr1 GeneA E3 - chr1 GeneB E1 + chr1 GeneB E2 + chr1 GeneB E3 + chr1 GeneB E4 + chr1 GeneC E1 - chr1 GeneC E2 - chr2 GeneD E1 + ``` I want to reverse the ord...
2014/05/22
[ "https://Stackoverflow.com/questions/23811268", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1173417/" ]
Always include [`use strict;`](http://perldoc.perl.org/strict.html) and [`use warnings;`](http://perldoc.perl.org/warnings.html) at the top of EVERY script. To do this project, you just need to keep a buffer of lines to later process once you see a change in your first two fields. This is a fairly common programming c...
I can't make proper sense of your description and code, but from your data example I think this is what you want. Basically the third field in each row is copied to form a new fifth field. Then, in every sequence of rows where the first and second fields match and trhe fourth is a hyphen `-`, the row order of the new ...
111,588
In Israel, there is an idiom that is literally "flipping a table over" (להפוך שולחן, Lahafokh Shoolkhan) and means an overly assertive, sometimes vulgar act out of desperation that is intended to shock the other party. It is almost always used in the context of complaining about a service that was so bad one has to "f...
2013/04/17
[ "https://english.stackexchange.com/questions/111588", "https://english.stackexchange.com", "https://english.stackexchange.com/users/6318/" ]
You might *[throw your toys out of the pram](http://oxforddictionaries.com/definition/english/throw%2Bone%27s%2Btoys%2Bout%2Bof%2Bthe%2Bpram___1)*:- > > British informal behave in a childish and petulant way; have a > tantrum: > > > Lorenzo threw his toys out of the pram after being sent off > > >
Are you going to give me the milkshake I ordered 27 minutes ago, or should I "[hold a gun to your head](http://idioms.thefreedictionary.com/hold+a+gun+to+head)" and make a shake out of your brains?
111,588
In Israel, there is an idiom that is literally "flipping a table over" (להפוך שולחן, Lahafokh Shoolkhan) and means an overly assertive, sometimes vulgar act out of desperation that is intended to shock the other party. It is almost always used in the context of complaining about a service that was so bad one has to "f...
2013/04/17
[ "https://english.stackexchange.com/questions/111588", "https://english.stackexchange.com", "https://english.stackexchange.com/users/6318/" ]
A bit prosaic, but such a person is said to 'make a scene' (a scene being part of a play or film, the person is being overly dramatic). They might [make a song and dance about](http://oxforddictionaries.com/definition/english/song?q=make%20a%20song%20and%20dance%20about#song__15) the thing they are dissatisfied with. ...
Are you going to give me the milkshake I ordered 27 minutes ago, or should I "[hold a gun to your head](http://idioms.thefreedictionary.com/hold+a+gun+to+head)" and make a shake out of your brains?
111,588
In Israel, there is an idiom that is literally "flipping a table over" (להפוך שולחן, Lahafokh Shoolkhan) and means an overly assertive, sometimes vulgar act out of desperation that is intended to shock the other party. It is almost always used in the context of complaining about a service that was so bad one has to "f...
2013/04/17
[ "https://english.stackexchange.com/questions/111588", "https://english.stackexchange.com", "https://english.stackexchange.com/users/6318/" ]
Are you going to give me the milkshake I ordered 27 minutes ago, or should I "[hold a gun to your head](http://idioms.thefreedictionary.com/hold+a+gun+to+head)" and make a shake out of your brains?
The phrase you're looking for is to '[flip a table](https://www.urbandictionary.com/define.php?term=flip%20a%20table)'.
111,588
In Israel, there is an idiom that is literally "flipping a table over" (להפוך שולחן, Lahafokh Shoolkhan) and means an overly assertive, sometimes vulgar act out of desperation that is intended to shock the other party. It is almost always used in the context of complaining about a service that was so bad one has to "f...
2013/04/17
[ "https://english.stackexchange.com/questions/111588", "https://english.stackexchange.com", "https://english.stackexchange.com/users/6318/" ]
Are you going to give me the milkshake I ordered 27 minutes ago, or should I "[hold a gun to your head](http://idioms.thefreedictionary.com/hold+a+gun+to+head)" and make a shake out of your brains?
If you're in really, really informal company with plenty of drinks on hand, you might ask: > > [Am I gonna have to choke a bitch?](http://knowyourmeme.com/memes/is-x-gonna-have-to-choke-a-bitch "Am I gonna have to choke a bitch?") > > > This is from the very well known skit with Dave Chappelle and Wayne Brady whe...
111,588
In Israel, there is an idiom that is literally "flipping a table over" (להפוך שולחן, Lahafokh Shoolkhan) and means an overly assertive, sometimes vulgar act out of desperation that is intended to shock the other party. It is almost always used in the context of complaining about a service that was so bad one has to "f...
2013/04/17
[ "https://english.stackexchange.com/questions/111588", "https://english.stackexchange.com", "https://english.stackexchange.com/users/6318/" ]
A bit prosaic, but such a person is said to 'make a scene' (a scene being part of a play or film, the person is being overly dramatic). They might [make a song and dance about](http://oxforddictionaries.com/definition/english/song?q=make%20a%20song%20and%20dance%20about#song__15) the thing they are dissatisfied with. ...
You might *[throw your toys out of the pram](http://oxforddictionaries.com/definition/english/throw%2Bone%27s%2Btoys%2Bout%2Bof%2Bthe%2Bpram___1)*:- > > British informal behave in a childish and petulant way; have a > tantrum: > > > Lorenzo threw his toys out of the pram after being sent off > > >
111,588
In Israel, there is an idiom that is literally "flipping a table over" (להפוך שולחן, Lahafokh Shoolkhan) and means an overly assertive, sometimes vulgar act out of desperation that is intended to shock the other party. It is almost always used in the context of complaining about a service that was so bad one has to "f...
2013/04/17
[ "https://english.stackexchange.com/questions/111588", "https://english.stackexchange.com", "https://english.stackexchange.com/users/6318/" ]
You might *[throw your toys out of the pram](http://oxforddictionaries.com/definition/english/throw%2Bone%27s%2Btoys%2Bout%2Bof%2Bthe%2Bpram___1)*:- > > British informal behave in a childish and petulant way; have a > tantrum: > > > Lorenzo threw his toys out of the pram after being sent off > > >
The phrase you're looking for is to '[flip a table](https://www.urbandictionary.com/define.php?term=flip%20a%20table)'.
111,588
In Israel, there is an idiom that is literally "flipping a table over" (להפוך שולחן, Lahafokh Shoolkhan) and means an overly assertive, sometimes vulgar act out of desperation that is intended to shock the other party. It is almost always used in the context of complaining about a service that was so bad one has to "f...
2013/04/17
[ "https://english.stackexchange.com/questions/111588", "https://english.stackexchange.com", "https://english.stackexchange.com/users/6318/" ]
You might *[throw your toys out of the pram](http://oxforddictionaries.com/definition/english/throw%2Bone%27s%2Btoys%2Bout%2Bof%2Bthe%2Bpram___1)*:- > > British informal behave in a childish and petulant way; have a > tantrum: > > > Lorenzo threw his toys out of the pram after being sent off > > >
If you're in really, really informal company with plenty of drinks on hand, you might ask: > > [Am I gonna have to choke a bitch?](http://knowyourmeme.com/memes/is-x-gonna-have-to-choke-a-bitch "Am I gonna have to choke a bitch?") > > > This is from the very well known skit with Dave Chappelle and Wayne Brady whe...
111,588
In Israel, there is an idiom that is literally "flipping a table over" (להפוך שולחן, Lahafokh Shoolkhan) and means an overly assertive, sometimes vulgar act out of desperation that is intended to shock the other party. It is almost always used in the context of complaining about a service that was so bad one has to "f...
2013/04/17
[ "https://english.stackexchange.com/questions/111588", "https://english.stackexchange.com", "https://english.stackexchange.com/users/6318/" ]
A bit prosaic, but such a person is said to 'make a scene' (a scene being part of a play or film, the person is being overly dramatic). They might [make a song and dance about](http://oxforddictionaries.com/definition/english/song?q=make%20a%20song%20and%20dance%20about#song__15) the thing they are dissatisfied with. ...
The phrase you're looking for is to '[flip a table](https://www.urbandictionary.com/define.php?term=flip%20a%20table)'.
111,588
In Israel, there is an idiom that is literally "flipping a table over" (להפוך שולחן, Lahafokh Shoolkhan) and means an overly assertive, sometimes vulgar act out of desperation that is intended to shock the other party. It is almost always used in the context of complaining about a service that was so bad one has to "f...
2013/04/17
[ "https://english.stackexchange.com/questions/111588", "https://english.stackexchange.com", "https://english.stackexchange.com/users/6318/" ]
A bit prosaic, but such a person is said to 'make a scene' (a scene being part of a play or film, the person is being overly dramatic). They might [make a song and dance about](http://oxforddictionaries.com/definition/english/song?q=make%20a%20song%20and%20dance%20about#song__15) the thing they are dissatisfied with. ...
If you're in really, really informal company with plenty of drinks on hand, you might ask: > > [Am I gonna have to choke a bitch?](http://knowyourmeme.com/memes/is-x-gonna-have-to-choke-a-bitch "Am I gonna have to choke a bitch?") > > > This is from the very well known skit with Dave Chappelle and Wayne Brady whe...
47,752,292
I've been trying to connect to my local GraphQL server using Apollo. Below is my attempt using `react-apollo2.0`. But I have also tried with `react-apollo1.4` with `createNetworkInterface`, but I am getting the same error. ``` import { graphql } from 'react-apollo'; import gql from 'graphql-tag'; import { AppRegistry ...
2017/12/11
[ "https://Stackoverflow.com/questions/47752292", "https://Stackoverflow.com", "https://Stackoverflow.com/users/538471/" ]
From [Android docs](https://developer.android.com/studio/run/emulator-networking.html) : > > Each instance of the emulator runs behind a virtual router/firewall > service that isolates it from your development machine network > interfaces and settings and from the internet. An emulated device > can't see your develop...
i think the error i not related to apollo , it seems that you are using export default twice in one file since it is not allowed
57,907,368
I am trying to create child inside child -LoVaDPuBRr4K2JSkc\_j , but how? ![Structure in my Firebase](https://i.stack.imgur.com/5jW7h.png) Code : ``` firebaseAuth = FirebaseAuth.getInstance(); firebaseDatabase = FirebaseDatabase.getInstance(); databaseDocument = firebaseDatabase.getReference(firebaseAuth.getUid()).c...
2019/09/12
[ "https://Stackoverflow.com/questions/57907368", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11997362/" ]
To create a child in `-LoVaDPuBRr4K2JSkc_j`, you can do: ``` databaseDocument.child("-LoVaDPuBRr4K2JSkc_j").child("newProperty").setValue("new value"); ``` If you want to generate a new child with an auto-generated key, it'd be: ``` databaseDocument.child("-LoVaDPuBRr4K2JSkc_j").push().setValue("new value"); ``` ...
The simplest solution to add a new property inside your `-LoVaDPuBRr4K2JSkc_j` object would be use that pushed id in your reference like in the following lines of code: ``` String uid = FirebaseAuth.getInstance().getCurrentUser().getUid(); DatabaseReference rootRef = FirebaseDatabase.getInstance().getReference(); Data...
57,907,368
I am trying to create child inside child -LoVaDPuBRr4K2JSkc\_j , but how? ![Structure in my Firebase](https://i.stack.imgur.com/5jW7h.png) Code : ``` firebaseAuth = FirebaseAuth.getInstance(); firebaseDatabase = FirebaseDatabase.getInstance(); databaseDocument = firebaseDatabase.getReference(firebaseAuth.getUid()).c...
2019/09/12
[ "https://Stackoverflow.com/questions/57907368", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11997362/" ]
The simplest solution to add a new property inside your `-LoVaDPuBRr4K2JSkc_j` object would be use that pushed id in your reference like in the following lines of code: ``` String uid = FirebaseAuth.getInstance().getCurrentUser().getUid(); DatabaseReference rootRef = FirebaseDatabase.getInstance().getReference(); Data...
My code and its work : ``` firebaseAuth = FirebaseAuth.getInstance(); firebaseDatabase = FirebaseDatabase.getInstance(); databaseProduct = firebaseDatabase.getReference(firebaseAuth.getUid()).child("Document"); String id = databaseProduct.push().getKey(); final String productID = databaseP...
57,907,368
I am trying to create child inside child -LoVaDPuBRr4K2JSkc\_j , but how? ![Structure in my Firebase](https://i.stack.imgur.com/5jW7h.png) Code : ``` firebaseAuth = FirebaseAuth.getInstance(); firebaseDatabase = FirebaseDatabase.getInstance(); databaseDocument = firebaseDatabase.getReference(firebaseAuth.getUid()).c...
2019/09/12
[ "https://Stackoverflow.com/questions/57907368", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11997362/" ]
To create a child in `-LoVaDPuBRr4K2JSkc_j`, you can do: ``` databaseDocument.child("-LoVaDPuBRr4K2JSkc_j").child("newProperty").setValue("new value"); ``` If you want to generate a new child with an auto-generated key, it'd be: ``` databaseDocument.child("-LoVaDPuBRr4K2JSkc_j").push().setValue("new value"); ``` ...
My code and its work : ``` firebaseAuth = FirebaseAuth.getInstance(); firebaseDatabase = FirebaseDatabase.getInstance(); databaseProduct = firebaseDatabase.getReference(firebaseAuth.getUid()).child("Document"); String id = databaseProduct.push().getKey(); final String productID = databaseP...
717,246
I am reading a notes in statistical inference, and I am constantly being confused about the term 'common support', i hardly find any definition of this,here is an example, 'Suppose S is a space of all probability distributions with common support' and the picture below is what I am reading, and it says ' here pdf of...
2014/03/18
[ "https://math.stackexchange.com/questions/717246", "https://math.stackexchange.com", "https://math.stackexchange.com/users/63526/" ]
The support of a Borel measure on $\mathbb R^n$, say, is defined as the set of points $x$ such that, for every $r\gt0$, $\mu(B(x,r))\gt0$. In your context, one considers a family $\{P\_\theta;\theta\in\Theta\}$ and one asks that the support of $P\_\theta$ does not depend on $\theta$.
In general, it means the set of all points where at least one density function is non-zero. For example, if you have two uniform random variables, where one ranges from 0 to 1, and one ranges from 1 to 2, then the common support is 0 to 2. (Sometimes "common support" means the topological closure of this set, but this ...
29,146,304
I am trying to connect an SQL server from an Ubuntu machine, everythings works great except for named instances: **this works** ``` 'data' => array( 'driver' => 'sqlsrv', 'host' => 'xxxx', 'port' => 1433, 'database' => 'db', 'username' => 'user', ...
2015/03/19
[ "https://Stackoverflow.com/questions/29146304", "https://Stackoverflow.com", "https://Stackoverflow.com/users/379105/" ]
I finally found a solution, there were two problems : * The SQL server wasn't listening on the good default port (my bad) * Laravel (PDO ?) doesn't know how to handle (or at least I haven't found how) named instances, I have tried any possible combination (see Question) So I finally used a combination of FreeTDS DSN...
Thanks for the participation to solve this connection problem. I also encountered this problem, here is how I solved it. For info in my case the connection with tsql works but not since Laravel (5.4) One trick I took to understand is that it is not the default port (**1433**) that is used. To find the port you must ...
29,146,304
I am trying to connect an SQL server from an Ubuntu machine, everythings works great except for named instances: **this works** ``` 'data' => array( 'driver' => 'sqlsrv', 'host' => 'xxxx', 'port' => 1433, 'database' => 'db', 'username' => 'user', ...
2015/03/19
[ "https://Stackoverflow.com/questions/29146304", "https://Stackoverflow.com", "https://Stackoverflow.com/users/379105/" ]
I finally found a solution, there were two problems : * The SQL server wasn't listening on the good default port (my bad) * Laravel (PDO ?) doesn't know how to handle (or at least I haven't found how) named instances, I have tried any possible combination (see Question) So I finally used a combination of FreeTDS DSN...
hi i was with this problem but i solved it. I'm using docker, I installed the latest version of laravel with curl ([curl -s https://laravel.build/example-app | bash](https://laravel.build/example-app%20%7C%20bash)), this installation contains php8.0, laravel 8.0 and Ubuntu 21.04. modify the Dockerfile and add the follo...
29,146,304
I am trying to connect an SQL server from an Ubuntu machine, everythings works great except for named instances: **this works** ``` 'data' => array( 'driver' => 'sqlsrv', 'host' => 'xxxx', 'port' => 1433, 'database' => 'db', 'username' => 'user', ...
2015/03/19
[ "https://Stackoverflow.com/questions/29146304", "https://Stackoverflow.com", "https://Stackoverflow.com/users/379105/" ]
hi i was with this problem but i solved it. I'm using docker, I installed the latest version of laravel with curl ([curl -s https://laravel.build/example-app | bash](https://laravel.build/example-app%20%7C%20bash)), this installation contains php8.0, laravel 8.0 and Ubuntu 21.04. modify the Dockerfile and add the follo...
Thanks for the participation to solve this connection problem. I also encountered this problem, here is how I solved it. For info in my case the connection with tsql works but not since Laravel (5.4) One trick I took to understand is that it is not the default port (**1433**) that is used. To find the port you must ...
40,454,816
I'm trying to write a query which does the below: For every guest who has the word “Edinburgh” in their address show the total number of nights booked. Be sure to include 0 for those guests who have never had a booking. Show last name, first name, address and number of nights. Order by last name then first name. I am...
2016/11/06
[ "https://Stackoverflow.com/questions/40454816", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2697493/" ]
Your query seems almost correct. You were joining the booking id with guets id which gave you some results because of overlapping (matching) ids, but this most likely doesn't correspond to the foreign keys. You should join on `guest_id` from booking to `id` from guest. I'd add grouping to sum all booked nights for a p...
This post answers your questions about how to make the query. [MySQL SUM with same ID](https://stackoverflow.com/questions/10869407/mysql-sum-with-same-id) You can simply use COALESCE as referenced here to avoid the NULL Values [How do I get SUM function in MySQL to return '0' if no values are found?](https://stack...
40,454,816
I'm trying to write a query which does the below: For every guest who has the word “Edinburgh” in their address show the total number of nights booked. Be sure to include 0 for those guests who have never had a booking. Show last name, first name, address and number of nights. Order by last name then first name. I am...
2016/11/06
[ "https://Stackoverflow.com/questions/40454816", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2697493/" ]
Your query seems almost correct. You were joining the booking id with guets id which gave you some results because of overlapping (matching) ids, but this most likely doesn't correspond to the foreign keys. You should join on `guest_id` from booking to `id` from guest. I'd add grouping to sum all booked nights for a p...
``` SELECT g.first_name, g.last_name, g.address, COALESCE(Sum(b.nights), 0) FROM booking b RIGHT JOIN guest g ON ( b.guest_id = g.id ) WHERE address LIKE 'edinburgh%' GROUP BY g.last_name, g.first_name, g.address; ```
40,454,816
I'm trying to write a query which does the below: For every guest who has the word “Edinburgh” in their address show the total number of nights booked. Be sure to include 0 for those guests who have never had a booking. Show last name, first name, address and number of nights. Order by last name then first name. I am...
2016/11/06
[ "https://Stackoverflow.com/questions/40454816", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2697493/" ]
``` SELECT g.first_name, g.last_name, g.address, COALESCE(Sum(b.nights), 0) FROM booking b RIGHT JOIN guest g ON ( b.guest_id = g.id ) WHERE address LIKE 'edinburgh%' GROUP BY g.last_name, g.first_name, g.address; ```
This post answers your questions about how to make the query. [MySQL SUM with same ID](https://stackoverflow.com/questions/10869407/mysql-sum-with-same-id) You can simply use COALESCE as referenced here to avoid the NULL Values [How do I get SUM function in MySQL to return '0' if no values are found?](https://stack...
51,077,172
That's an shell script snippet: ``` KVS_VARIABLES=$(awk -F= '!($1 && $2 && NF==2) { print "File failed validation on line " NR | "cat 1>&2"; next } { print $1, $2 }' $ENV_FILE_LOCATION) echo ${KVS_VARIABLES} for kv in ${KVS_VARIABLES} do echo $kv key=$(echo $kv | awk -FS=" " '{print $1}') value=$(echo $kv | awk...
2018/06/28
[ "https://Stackoverflow.com/questions/51077172", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3227319/" ]
Try this awk script: ``` $ awk -F= -v OFS=' | ' '{$1="key: "$1;$2="value: "$2}1' file key: VAR1 | value: VAL1 key: VAR2 | value: VAL2 key: VAR3 | value: VAL3 ``` The input and output field separators are set to `=` and `|`values. The only awk statement is adding the string before keys and values.
It has nothing to do with awk. ``` KVS_VARIABLES="VAR1 VAL1 VAR2 VAL2 VAR3 VAL3" ``` Now with a `for kv in ${KVS_VARIABLES}` you just iterate over the words (single words, not lines). The newlines gets ignored, because the variable is not escaped. Now you want to iterate over lines or read two variables at a time...
70,507,550
I have created a schedule in Anylogic within the population of agents "customer", where customers have to create orders and send it to "terminals". Every day, the amount of orders that has to be send to terminals is different for every customer. I want to create multiple orders at once (every day, that is the *start* c...
2021/12/28
[ "https://Stackoverflow.com/questions/70507550", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17658498/" ]
Use coalesce(). ```sql with the_data(id, sum, parent_id) as ( values (1, 10, null), (2, 10, null), (3, 15, 5), (4, 30, 5), (5, 0, null), (6, 0, 8), (7, 0, 8), (8, 20, null) ) select coalesce(parent_id, id) as id, sum(sum) from the_data group by 1 order by 1 ``` Read about the feature...
Your query isn't valid in PostgreSQL: ```sql SELECT t.id, sum(o.amount), t.parent_id FROM tab t LEFT JOIN order o ON o.deal = t.id GROUP BY t.id ``` Unlike MySQL, PostgreSQL doesn't have implicit `GROUP BY` columns (unless something changed recently). Anyway, if you're using `t.id` in your `GRO...
128,092
In Britain (and perhaps former British colonies) the term "whip" is used in a number of different ways in politics. The following article, in particular, talks about "losing" or "removal" of the whip. There are 3-line whips, and other references to the term common in British politics. ![enter image description here](h...
2013/09/20
[ "https://english.stackexchange.com/questions/128092", "https://english.stackexchange.com", "https://english.stackexchange.com/users/8889/" ]
*The whip* is a parliamentary term dating back to 1742. The term originates from the political party needing to "whip" MPs to get them to attend and vote according to the party line in the chamber, with the term originating from fox hunting. It was originally used metaphorically to mean ensuring that the MPs for the p...
Here in Canada, we have party "whips." They are the ones who contact the members of parliament and lobby the party talking points and remind members to (and how to) vote on matters in chamber. The derivation of the word is simply to "whip" things into shape—to blend everyone into a cohesive mix. Similarly, they "whip"...
128,092
In Britain (and perhaps former British colonies) the term "whip" is used in a number of different ways in politics. The following article, in particular, talks about "losing" or "removal" of the whip. There are 3-line whips, and other references to the term common in British politics. ![enter image description here](h...
2013/09/20
[ "https://english.stackexchange.com/questions/128092", "https://english.stackexchange.com", "https://english.stackexchange.com/users/8889/" ]
The US Congress has both minority and majority party whips, and they serve much the same function as in the UK Parliament, but they don't have anywhere near as much power. But we still have them. Whip 'em into line! See [HERE](https://en.wikipedia.org/wiki/Whip_%28politics%29#United_States) for "whip" in US plitics.
Here in Canada, we have party "whips." They are the ones who contact the members of parliament and lobby the party talking points and remind members to (and how to) vote on matters in chamber. The derivation of the word is simply to "whip" things into shape—to blend everyone into a cohesive mix. Similarly, they "whip"...
128,092
In Britain (and perhaps former British colonies) the term "whip" is used in a number of different ways in politics. The following article, in particular, talks about "losing" or "removal" of the whip. There are 3-line whips, and other references to the term common in British politics. ![enter image description here](h...
2013/09/20
[ "https://english.stackexchange.com/questions/128092", "https://english.stackexchange.com", "https://english.stackexchange.com/users/8889/" ]
Here in Canada, we have party "whips." They are the ones who contact the members of parliament and lobby the party talking points and remind members to (and how to) vote on matters in chamber. The derivation of the word is simply to "whip" things into shape—to blend everyone into a cohesive mix. Similarly, they "whip"...
In British politics, to "lose" the (i.e. one's own) (party's) "whip", have it "removed" or have "the whip withdrawn" (by the party (leader)) means, in effect, that one is, in U.S. parlance, "no longer in 'good standing'" with the party's leadership; with that comes, for example, the loss of (if one had been enjoying it...
128,092
In Britain (and perhaps former British colonies) the term "whip" is used in a number of different ways in politics. The following article, in particular, talks about "losing" or "removal" of the whip. There are 3-line whips, and other references to the term common in British politics. ![enter image description here](h...
2013/09/20
[ "https://english.stackexchange.com/questions/128092", "https://english.stackexchange.com", "https://english.stackexchange.com/users/8889/" ]
I don't think I've seen it explicitly said yet in another post, so I wanted to describe exactly what "the whip" means in the expression "removal of the whip" or "losing the whip". Aside from being used to refer to a certain party administrative official, "the whip" is also used to refer to a document (a weekly letter ...
Here in Canada, we have party "whips." They are the ones who contact the members of parliament and lobby the party talking points and remind members to (and how to) vote on matters in chamber. The derivation of the word is simply to "whip" things into shape—to blend everyone into a cohesive mix. Similarly, they "whip"...
128,092
In Britain (and perhaps former British colonies) the term "whip" is used in a number of different ways in politics. The following article, in particular, talks about "losing" or "removal" of the whip. There are 3-line whips, and other references to the term common in British politics. ![enter image description here](h...
2013/09/20
[ "https://english.stackexchange.com/questions/128092", "https://english.stackexchange.com", "https://english.stackexchange.com/users/8889/" ]
*The whip* is a parliamentary term dating back to 1742. The term originates from the political party needing to "whip" MPs to get them to attend and vote according to the party line in the chamber, with the term originating from fox hunting. It was originally used metaphorically to mean ensuring that the MPs for the p...
The US Congress has both minority and majority party whips, and they serve much the same function as in the UK Parliament, but they don't have anywhere near as much power. But we still have them. Whip 'em into line! See [HERE](https://en.wikipedia.org/wiki/Whip_%28politics%29#United_States) for "whip" in US plitics.
128,092
In Britain (and perhaps former British colonies) the term "whip" is used in a number of different ways in politics. The following article, in particular, talks about "losing" or "removal" of the whip. There are 3-line whips, and other references to the term common in British politics. ![enter image description here](h...
2013/09/20
[ "https://english.stackexchange.com/questions/128092", "https://english.stackexchange.com", "https://english.stackexchange.com/users/8889/" ]
*The whip* is a parliamentary term dating back to 1742. The term originates from the political party needing to "whip" MPs to get them to attend and vote according to the party line in the chamber, with the term originating from fox hunting. It was originally used metaphorically to mean ensuring that the MPs for the p...
In British politics, to "lose" the (i.e. one's own) (party's) "whip", have it "removed" or have "the whip withdrawn" (by the party (leader)) means, in effect, that one is, in U.S. parlance, "no longer in 'good standing'" with the party's leadership; with that comes, for example, the loss of (if one had been enjoying it...
128,092
In Britain (and perhaps former British colonies) the term "whip" is used in a number of different ways in politics. The following article, in particular, talks about "losing" or "removal" of the whip. There are 3-line whips, and other references to the term common in British politics. ![enter image description here](h...
2013/09/20
[ "https://english.stackexchange.com/questions/128092", "https://english.stackexchange.com", "https://english.stackexchange.com/users/8889/" ]
*The whip* is a parliamentary term dating back to 1742. The term originates from the political party needing to "whip" MPs to get them to attend and vote according to the party line in the chamber, with the term originating from fox hunting. It was originally used metaphorically to mean ensuring that the MPs for the p...
I don't think I've seen it explicitly said yet in another post, so I wanted to describe exactly what "the whip" means in the expression "removal of the whip" or "losing the whip". Aside from being used to refer to a certain party administrative official, "the whip" is also used to refer to a document (a weekly letter ...
128,092
In Britain (and perhaps former British colonies) the term "whip" is used in a number of different ways in politics. The following article, in particular, talks about "losing" or "removal" of the whip. There are 3-line whips, and other references to the term common in British politics. ![enter image description here](h...
2013/09/20
[ "https://english.stackexchange.com/questions/128092", "https://english.stackexchange.com", "https://english.stackexchange.com/users/8889/" ]
The US Congress has both minority and majority party whips, and they serve much the same function as in the UK Parliament, but they don't have anywhere near as much power. But we still have them. Whip 'em into line! See [HERE](https://en.wikipedia.org/wiki/Whip_%28politics%29#United_States) for "whip" in US plitics.
In British politics, to "lose" the (i.e. one's own) (party's) "whip", have it "removed" or have "the whip withdrawn" (by the party (leader)) means, in effect, that one is, in U.S. parlance, "no longer in 'good standing'" with the party's leadership; with that comes, for example, the loss of (if one had been enjoying it...
128,092
In Britain (and perhaps former British colonies) the term "whip" is used in a number of different ways in politics. The following article, in particular, talks about "losing" or "removal" of the whip. There are 3-line whips, and other references to the term common in British politics. ![enter image description here](h...
2013/09/20
[ "https://english.stackexchange.com/questions/128092", "https://english.stackexchange.com", "https://english.stackexchange.com/users/8889/" ]
I don't think I've seen it explicitly said yet in another post, so I wanted to describe exactly what "the whip" means in the expression "removal of the whip" or "losing the whip". Aside from being used to refer to a certain party administrative official, "the whip" is also used to refer to a document (a weekly letter ...
The US Congress has both minority and majority party whips, and they serve much the same function as in the UK Parliament, but they don't have anywhere near as much power. But we still have them. Whip 'em into line! See [HERE](https://en.wikipedia.org/wiki/Whip_%28politics%29#United_States) for "whip" in US plitics.
128,092
In Britain (and perhaps former British colonies) the term "whip" is used in a number of different ways in politics. The following article, in particular, talks about "losing" or "removal" of the whip. There are 3-line whips, and other references to the term common in British politics. ![enter image description here](h...
2013/09/20
[ "https://english.stackexchange.com/questions/128092", "https://english.stackexchange.com", "https://english.stackexchange.com/users/8889/" ]
I don't think I've seen it explicitly said yet in another post, so I wanted to describe exactly what "the whip" means in the expression "removal of the whip" or "losing the whip". Aside from being used to refer to a certain party administrative official, "the whip" is also used to refer to a document (a weekly letter ...
In British politics, to "lose" the (i.e. one's own) (party's) "whip", have it "removed" or have "the whip withdrawn" (by the party (leader)) means, in effect, that one is, in U.S. parlance, "no longer in 'good standing'" with the party's leadership; with that comes, for example, the loss of (if one had been enjoying it...
85,588
I just got these presentations of groups: $\langle a,b\mid aba^{-1}b^{-1}\rangle$ $\langle a,b\mid aba^{-1}b^{-2},bab^{-1}a^{-2}\rangle$ $\langle a,b\mid abab^{-1}\rangle $ Are any of them trivial? How do you prove it?
2011/11/25
[ "https://math.stackexchange.com/questions/85588", "https://math.stackexchange.com", "https://math.stackexchange.com/users/20110/" ]
For the first and last group, try finding a homomorphism from your group $G$ to an abelian group. If you can find an onto map $G \to A$ where $A$ is nontrivial, then $G$ is non-trivial. If you have a group $G=\langle a,b\mid r\rangle$ and you decide you want to map $G\to A$ by $a\mapsto x$ and $b \mapsto y$, you get a ...
Standard techniques that work with the kinds of groups you've given is to compute the abelianization of the group. At least one of your groups is abelian - so you can describe it using the classification of finitely-generated abelian groups. Sometimes the abelianization gives you further ideas, like trying to prove y...
48,108,462
**Requirement:** On checking/unchecking 1st checkbox, I need to show/hide 1st dropdown, similarly on checking/unchecking 2nd checkbox, I need to show/hide 2nd dropdown. Please note that since these values of checkboxes comes from DB, and I iterate over them to show on front-end.. I can only have a common `showMe()` fu...
2018/01/05
[ "https://Stackoverflow.com/questions/48108462", "https://Stackoverflow.com", "https://Stackoverflow.com/users/673680/" ]
Does this do what you want it to do? ```js function showMe (box, box1) { var chkboxes = document.getElementsByName('c1'); var selects = document.getElementsByTagName('select') var bools = [] for (var i = 0; i < chkboxes.length; i++) { if (chkboxes[i].checked) { selects[i].style.display = 'block...
This works. ```js function showMe (elem, box) { if(elem.checked) { vis = "block"; } else { vis="none"; } document.getElementsByName(box)[0].style.display = vis; } ``` ```html <input type="checkbox" name="c1" onclick="showMe(this, 'catsndogs')">Checkbox1 <input type="checkbox" name...
48,108,462
**Requirement:** On checking/unchecking 1st checkbox, I need to show/hide 1st dropdown, similarly on checking/unchecking 2nd checkbox, I need to show/hide 2nd dropdown. Please note that since these values of checkboxes comes from DB, and I iterate over them to show on front-end.. I can only have a common `showMe()` fu...
2018/01/05
[ "https://Stackoverflow.com/questions/48108462", "https://Stackoverflow.com", "https://Stackoverflow.com/users/673680/" ]
Does this do what you want it to do? ```js function showMe (box, box1) { var chkboxes = document.getElementsByName('c1'); var selects = document.getElementsByTagName('select') var bools = [] for (var i = 0; i < chkboxes.length; i++) { if (chkboxes[i].checked) { selects[i].style.display = 'block...
```js function showMe (selectName) { var select = document.querySelector("select[name='" + selectName + "']"); if(event.target.checked){ select.classList.add('show'); } else{ select.classList.remove('show'); } } ``` ```css select{ display:none; } .show{ display:block...
48,108,462
**Requirement:** On checking/unchecking 1st checkbox, I need to show/hide 1st dropdown, similarly on checking/unchecking 2nd checkbox, I need to show/hide 2nd dropdown. Please note that since these values of checkboxes comes from DB, and I iterate over them to show on front-end.. I can only have a common `showMe()` fu...
2018/01/05
[ "https://Stackoverflow.com/questions/48108462", "https://Stackoverflow.com", "https://Stackoverflow.com/users/673680/" ]
Does this do what you want it to do? ```js function showMe (box, box1) { var chkboxes = document.getElementsByName('c1'); var selects = document.getElementsByTagName('select') var bools = [] for (var i = 0; i < chkboxes.length; i++) { if (chkboxes[i].checked) { selects[i].style.display = 'block...
Pure js approach; associate each checkbox with a dropdown and toggle display accordingly. ```js window.onload = () => loadFunctions(); loadFunctions = () => { document.getElementById('check1').onclick = () => toggle('drop1','blockDis'); document.getElementById('check2').onclick = () => toggle('drop2','b...
48,108,462
**Requirement:** On checking/unchecking 1st checkbox, I need to show/hide 1st dropdown, similarly on checking/unchecking 2nd checkbox, I need to show/hide 2nd dropdown. Please note that since these values of checkboxes comes from DB, and I iterate over them to show on front-end.. I can only have a common `showMe()` fu...
2018/01/05
[ "https://Stackoverflow.com/questions/48108462", "https://Stackoverflow.com", "https://Stackoverflow.com/users/673680/" ]
Pure js approach; associate each checkbox with a dropdown and toggle display accordingly. ```js window.onload = () => loadFunctions(); loadFunctions = () => { document.getElementById('check1').onclick = () => toggle('drop1','blockDis'); document.getElementById('check2').onclick = () => toggle('drop2','b...
This works. ```js function showMe (elem, box) { if(elem.checked) { vis = "block"; } else { vis="none"; } document.getElementsByName(box)[0].style.display = vis; } ``` ```html <input type="checkbox" name="c1" onclick="showMe(this, 'catsndogs')">Checkbox1 <input type="checkbox" name...
48,108,462
**Requirement:** On checking/unchecking 1st checkbox, I need to show/hide 1st dropdown, similarly on checking/unchecking 2nd checkbox, I need to show/hide 2nd dropdown. Please note that since these values of checkboxes comes from DB, and I iterate over them to show on front-end.. I can only have a common `showMe()` fu...
2018/01/05
[ "https://Stackoverflow.com/questions/48108462", "https://Stackoverflow.com", "https://Stackoverflow.com/users/673680/" ]
Pure js approach; associate each checkbox with a dropdown and toggle display accordingly. ```js window.onload = () => loadFunctions(); loadFunctions = () => { document.getElementById('check1').onclick = () => toggle('drop1','blockDis'); document.getElementById('check2').onclick = () => toggle('drop2','b...
```js function showMe (selectName) { var select = document.querySelector("select[name='" + selectName + "']"); if(event.target.checked){ select.classList.add('show'); } else{ select.classList.remove('show'); } } ``` ```css select{ display:none; } .show{ display:block...
599,060
I've been hearing some British and Irish actors and presenters pronounce *ss* like *s* instead of *sh*, so tissue sounds like *tisyu* rather than *tishu* for example. I also heard someone pronounce *appreSEEate* instead of *appreSHEEate*. Now, I couldn't find much online about this apart from someone saying it's receiv...
2022/11/27
[ "https://english.stackexchange.com/questions/599060", "https://english.stackexchange.com", "https://english.stackexchange.com/users/468726/" ]
This phenomenon is explained by a process that encompasses several principle and that is called "*assimilation*". "Assimilation" is defined as follows in *The Longman Pronunciation Dictionary* (3rd edition, 2008). ([]: user LPH's comments) > > (P. 159) **Coarticulation** > > **1** Speech sounds tend to be influe...
In English pronunciation is notoriously inconsistent. Take, for example, '...ough': we have 'cough' (as in 'off'), 'enough' (as in 'cuff'), 'through' (as in 'true'), 'though' (as in 'throw'), 'thorough' (I cannot think of a word by the 'ough' sounds 'er'; 'thought' as in 'fort'; and probably others I have missed. Yours...
29,281,711
An unfortunately large number of methods are written in the following form: ``` def my_method(foo = {}, bar = {}) # Do stuff with foo and bar end ``` While I appreciate not having to write `my_method({}, {})` everywhere I reference the method, using something other than the default for the second parameter makes m...
2015/03/26
[ "https://Stackoverflow.com/questions/29281711", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
This is the problem which keyword arguments (new to ruby 2) were made to solve (provided that you control the method definition). ``` def foo(a: {}, b: {}) "a: #{a}, b: #{b}" end foo # => "a: {}, b: {}" foo(a: 1, b: 2) # => "a: 1, b: 2" foo(a: 3) # => "a: 3, b: {}" foo(b: 4) # => "a: {}, b: 4" ```
You can just refactor the code to something like this, so it gets assigned to the default value only if the named parameter isn't provided a value. ``` def my_method(foo, bar) foo ||= {}; bar ||= {}; #=> Do something with foo and bar now. end ``` What `||=` operator does is, it assigns the value on the right to ...
29,281,711
An unfortunately large number of methods are written in the following form: ``` def my_method(foo = {}, bar = {}) # Do stuff with foo and bar end ``` While I appreciate not having to write `my_method({}, {})` everywhere I reference the method, using something other than the default for the second parameter makes m...
2015/03/26
[ "https://Stackoverflow.com/questions/29281711", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
This is the problem which keyword arguments (new to ruby 2) were made to solve (provided that you control the method definition). ``` def foo(a: {}, b: {}) "a: #{a}, b: #{b}" end foo # => "a: {}, b: {}" foo(a: 1, b: 2) # => "a: 1, b: 2" foo(a: 3) # => "a: 3, b: {}" foo(b: 4) # => "a: {}, b: 4" ```
You could set defaults to nil then handle the actual defaulting of values within the body of the method. ie., ``` def my_method(first=nil, second=nil) first_value = first || 1 second_value = second || 2 end ``` This allows you to pass 'nil' when you want that value to be its default. For example, ``` my_metho...
1,481,536
By default, eclipse generates getters/setters according to JavaBeans regular properties style: ``` * public void setName(String name) * public String getName() ``` As of J2SE 5.0 JavaBeans specification allows IndexedPropertyChangeEvents which have a different getter/setter naming scheme for arrays: ``` * public v...
2009/09/26
[ "https://Stackoverflow.com/questions/1481536", "https://Stackoverflow.com", "https://Stackoverflow.com/users/78202/" ]
If there was a simple option for it, it would be in the Windows->Preferences->Java->Code Style. This is where the setting for telling the generator to use "is" for the getter on boolean variables. You'd probably have to write a plug-in or alter the code generation mechanism. As an alternative you can do them when you ...
> > You cant. eclipse does not support > that. – 01 Sep 26 '09 at 21:07 > > > I think [01](https://stackoverflow.com/users/30453/01) is right - nobody's made it easy to accomplish this yet.
5,705
I am new to the French (so forgive me if the question seems elementary). I've just come across the pawn break `...f6` for black in the French advance variation, and I find the pawn break quite dubious for me for several reasons: 1. When we are attacking the opponent's pawn chain, we are told that to attack the pawn ch...
2014/06/30
[ "https://chess.stackexchange.com/questions/5705", "https://chess.stackexchange.com", "https://chess.stackexchange.com/users/3381/" ]
> > I am new to french (so forgive me if the question seems elementary) I've just came across the pawn break f6 for black in the french advance variation, and I find the pawn break quite dubious for me for several reasons > > > You must understand one whole new concept of chess modern strategy : **Weakness is not ...
Playing ...f6 is less common in the Advance than certain other French lines (such as the 3... Nf6 Tarrasch). As with most thematic moves to open the position, the f6 break has to be timed correctly or white will indeed have a great target on e6. 1. Your pawn chain isn't particularly weak in the normal French f7-e6-d5...
69,983,063
I got an error while building backend docker, specifically installing Puppeteer. I'm using M1 MacBook, and I found a solution on the local machine(<https://github.com/puppeteer/puppeteer/issues/6622>), but this didn't work on the docker. Has anyone who has the same Puppeteer issue on the docker? ``` #12 15.58 npm ERR!...
2021/11/16
[ "https://Stackoverflow.com/questions/69983063", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14161006/" ]
I had the same error, and this made it work for me: <https://github.com/puppeteer/puppeteer/issues/7740#issuecomment-970490323> It seems the npm installation cannot find a chromium binary for M1. To not make npm try to install Chromium, you can add `ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true`. But then I needed to also...
Add puppeteer env after building dependencies. Worked for me. ``` FROM node:16-alpine3.11 WORKDIR /usr/app COPY package*.json ./ COPY tsconfig.json ./ RUN apk --no-cache --virtual build-dependencies add \ python3 \ make \ g++ ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true RUN npm install --quie...
69,983,063
I got an error while building backend docker, specifically installing Puppeteer. I'm using M1 MacBook, and I found a solution on the local machine(<https://github.com/puppeteer/puppeteer/issues/6622>), but this didn't work on the docker. Has anyone who has the same Puppeteer issue on the docker? ``` #12 15.58 npm ERR!...
2021/11/16
[ "https://Stackoverflow.com/questions/69983063", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14161006/" ]
This is the dockerfile that worked for me. ``` # reference https://developers.google.com/web/tools/puppeteer/troubleshooting#setting_up_chrome_linux_sandbox FROM node:current-alpine # manually installing chrome RUN apk add chromium # skips puppeteer installing chrome and points to correct binary ENV PUPPETEER_SKIP_C...
Add puppeteer env after building dependencies. Worked for me. ``` FROM node:16-alpine3.11 WORKDIR /usr/app COPY package*.json ./ COPY tsconfig.json ./ RUN apk --no-cache --virtual build-dependencies add \ python3 \ make \ g++ ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true RUN npm install --quie...
69,983,063
I got an error while building backend docker, specifically installing Puppeteer. I'm using M1 MacBook, and I found a solution on the local machine(<https://github.com/puppeteer/puppeteer/issues/6622>), but this didn't work on the docker. Has anyone who has the same Puppeteer issue on the docker? ``` #12 15.58 npm ERR!...
2021/11/16
[ "https://Stackoverflow.com/questions/69983063", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14161006/" ]
This is the dockerfile that worked for me. ``` # reference https://developers.google.com/web/tools/puppeteer/troubleshooting#setting_up_chrome_linux_sandbox FROM node:current-alpine # manually installing chrome RUN apk add chromium # skips puppeteer installing chrome and points to correct binary ENV PUPPETEER_SKIP_C...
I had the same error, and this made it work for me: <https://github.com/puppeteer/puppeteer/issues/7740#issuecomment-970490323> It seems the npm installation cannot find a chromium binary for M1. To not make npm try to install Chromium, you can add `ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true`. But then I needed to also...
62,253,169
I am trying to update table (@query annotation) using Spring CRUDRepository Class. But system is throwing below error on update. I have googled and found many threads informing to add transactional annotation. I did but no effect. Can someone please help me on this. ``` import java.util.ArrayList; import java.util.Lis...
2020/06/08
[ "https://Stackoverflow.com/questions/62253169", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13029949/" ]
Try `@Transactional` at PrintJobItemRepo instead of applying it at method level ``` @Repository @Transactional public interface PrintJobItemRepo extends CrudRepository<PrintJobItem, Integer> ```
The @Transactional annotation works as a Spring aspect, that means Spring creates a proxy of the class with the annotation method (and a proxy method), so in runtime the call to the method will be directed to the proxy method, which wraps the call to the real method in a transaction. In your code, remove the @Transact...
62,253,169
I am trying to update table (@query annotation) using Spring CRUDRepository Class. But system is throwing below error on update. I have googled and found many threads informing to add transactional annotation. I did but no effect. Can someone please help me on this. ``` import java.util.ArrayList; import java.util.Lis...
2020/06/08
[ "https://Stackoverflow.com/questions/62253169", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13029949/" ]
The @Transactional annotation works as a Spring aspect, that means Spring creates a proxy of the class with the annotation method (and a proxy method), so in runtime the call to the method will be directed to the proxy method, which wraps the call to the real method in a transaction. In your code, remove the @Transact...
In my case.... put the methods @Transactional into context of Spring not outside
62,253,169
I am trying to update table (@query annotation) using Spring CRUDRepository Class. But system is throwing below error on update. I have googled and found many threads informing to add transactional annotation. I did but no effect. Can someone please help me on this. ``` import java.util.ArrayList; import java.util.Lis...
2020/06/08
[ "https://Stackoverflow.com/questions/62253169", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13029949/" ]
the answer of @abhinav kumar works for me, you only need to put @Transactional annotations in your interface ``` @Repository @Transactional public interface PrintJobItemRepo extends CrudRepository<PrintJobItem, Integer> ```
The @Transactional annotation works as a Spring aspect, that means Spring creates a proxy of the class with the annotation method (and a proxy method), so in runtime the call to the method will be directed to the proxy method, which wraps the call to the real method in a transaction. In your code, remove the @Transact...
62,253,169
I am trying to update table (@query annotation) using Spring CRUDRepository Class. But system is throwing below error on update. I have googled and found many threads informing to add transactional annotation. I did but no effect. Can someone please help me on this. ``` import java.util.ArrayList; import java.util.Lis...
2020/06/08
[ "https://Stackoverflow.com/questions/62253169", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13029949/" ]
Try `@Transactional` at PrintJobItemRepo instead of applying it at method level ``` @Repository @Transactional public interface PrintJobItemRepo extends CrudRepository<PrintJobItem, Integer> ```
In my case.... put the methods @Transactional into context of Spring not outside
62,253,169
I am trying to update table (@query annotation) using Spring CRUDRepository Class. But system is throwing below error on update. I have googled and found many threads informing to add transactional annotation. I did but no effect. Can someone please help me on this. ``` import java.util.ArrayList; import java.util.Lis...
2020/06/08
[ "https://Stackoverflow.com/questions/62253169", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13029949/" ]
the answer of @abhinav kumar works for me, you only need to put @Transactional annotations in your interface ``` @Repository @Transactional public interface PrintJobItemRepo extends CrudRepository<PrintJobItem, Integer> ```
In my case.... put the methods @Transactional into context of Spring not outside
42,098,345
I have a spring boot app, and I want to send DTO validation constraints as well as field value to the client. Having DTO ``` class PetDTO { @Length(min=5, max=15) String name; } ``` where name happens to be 'Leviathan', should result in this JSON being sent to client: ``` { name: 'Leviathan' name_const...
2017/02/07
[ "https://Stackoverflow.com/questions/42098345", "https://Stackoverflow.com", "https://Stackoverflow.com/users/690954/" ]
Just ran in to the same issue. Most likely this you need to add the Broadcast alias to your `config/app.php` file ``` 'aliases' => [ 'Broadcast' => Illuminate\Support\Facades\Broadcast::class ] ```
For some reason the Broadcast facade isn't making it through from the `BroadcastServiceProvider.php` to your auth listings in `channels.php`. The quick easy fix is to directly require the Broadcast facade in your channels.php file: ``` <?php use Illuminate\Support\Facades\Broadcast; /* All of your broadcast auth st...
9,148,394
I have a ul-menu that exists out of images with different widths for every li. I use a sprite for the mouseovers and bg. The sprite contains all the possible images for the menu. When I hover I want the background image to slide 160px up on every li, and somehow inherit the horizontal background position (I understand ...
2012/02/05
[ "https://Stackoverflow.com/questions/9148394", "https://Stackoverflow.com", "https://Stackoverflow.com/users/565380/" ]
This is currently not possible by just using CSS (In most used browsers). You have to use `background-position: YOURVALUE -160px;` on every hover. Maybe we will one day live in a world where this ís possible. Possible solutions: jQuery can do this for you, but thats probably more work then just brainless copy pasti...
I wouldn't hold your breath for `background-position-y` as it isn't even a part of the CSS3 spec. (The issue is here <http://www.w3.org/Style/CSS/Tracker/issues/9>). Certain browsers like Chrome have gone ahead and implemented it anyways, but at least Firefox and Opera have yet to follow, if they even will. Unless you...
48,577,398
Background ---------- I have succesfully made some HTTP GET requests with [pypiwin32](https://pypi.python.org/pypi/pypiwin32/220) using ``` import pythoncom import win32com.client pythoncom.CoInitialize() h = win32com.client.Dispatch('WinHTTP.WinHTTPRequest.5.1') h.SetAutoLogonPolicy(0) # log in automatically h.Ope...
2018/02/02
[ "https://Stackoverflow.com/questions/48577398", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3015186/" ]
``` import pythoncom import win32com.client pythoncom.CoInitialize() h = win32com.client.Dispatch('WinHTTP.WinHTTPRequest.5.1') h.SetAutoLogonPolicy(0) # log in automatically h.Open('POST', url, True) h.SetRequestHeaders(Your_Headers) h.Send("{"Id":"8974552","Action":"Analysis"}") ```
After some trials and errors, I think I got it right. Here is an example using [httpbin](https://httpbin.org/). I found out that using the json.dumps() is quite handy since it automatically writes False as 'false' and None as 'null'. ``` import json import win32com.client h = win32com.client.Dispatch('WinHTTP.WinHTTP...
44,860,485
I am trying to package and run a Kivy app on my Android phone using Buildozer. The app works fine on my Ubuntu/Windows machine, but on my phone it stops on the Kivy loading screen. The full code of my app, if it is necessary, can be found [here](https://github.com/marcogdepinto/LifeCounter/tree/master) - Consider onl...
2017/07/01
[ "https://Stackoverflow.com/questions/44860485", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5539313/" ]
The error indicates that your app does not find a main.py file in your specified app directory. Is your app entrypoint named main.py?
If you have the main.py file and you still get this error, it is because of the poor indentation in your code. I always experience this problem when i edit my code using buildozer mousepad.