Dataset Viewer
Auto-converted to Parquet Duplicate
Search is not available for this dataset
qid
int64
1
74.7M
question
stringlengths
10
43.1k
date
stringlengths
10
10
metadata
sequence
response_j
stringlengths
0
33.7k
response_k
stringlengths
0
40.5k
62,673,500
I have a table like this.a,b,c,d,e are the columns of table [![enter image description here](https://i.stack.imgur.com/K7nA3.png)](https://i.stack.imgur.com/K7nA3.png) I want to find distinct records on a combination of group by(d,e) and do some operation on the table The final table should remove duplicate keys. Th...
2020/07/01
[ "https://Stackoverflow.com/questions/62673500", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12464504/" ]
I think i found a solution ``` SELECT concat(x.a,"cis") as a_1,concat(x.b,'cis1') as b_1,x.c as c_1, concat(x.d,'cis2') as d_1,x.e as e_1 FROM (SELECT a,b,c,d,e, ROW_NUMBER() OVER (PARTITION BY d, e order by d,e) as cnt FROM table ) x WHERE cnt = 1 ```
You can try below way - ``` SELECT concat(a,'cis') as a_1, concat(b,'cis1') as b_1, c as c_1, concat(d,'cis2') as d_1, max(e) as e_1 FROM table1 group by concat(a,'cis'),concat(b,'cis1'),c,concat(d,'cis2') ```
62,673,500
I have a table like this.a,b,c,d,e are the columns of table [![enter image description here](https://i.stack.imgur.com/K7nA3.png)](https://i.stack.imgur.com/K7nA3.png) I want to find distinct records on a combination of group by(d,e) and do some operation on the table The final table should remove duplicate keys. Th...
2020/07/01
[ "https://Stackoverflow.com/questions/62673500", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12464504/" ]
I think i found a solution ``` SELECT concat(x.a,"cis") as a_1,concat(x.b,'cis1') as b_1,x.c as c_1, concat(x.d,'cis2') as d_1,x.e as e_1 FROM (SELECT a,b,c,d,e, ROW_NUMBER() OVER (PARTITION BY d, e order by d,e) as cnt FROM table ) x WHERE cnt = 1 ```
I don't see why your are using `row_number()`. How about this? ``` SELECT concat(x.a, 'cis') as a_1, concat(x.b, 'cis1') as b_1, x.c as c_1, concat(MIN(x.d), 'cis2') as d_1, x.e as e_1F FROM t GROUP BY x.a, x.b, x.c, x.e ``` You should also be able to use `||` for string concatenation: ``` SELECT (x.a || 'ci...
62,673,504
I have a pair of coordinates (lat, long). I need to generate an image of displaying these coordinates on the map. And then generate such images with other coordinates in the future without the Internet. Please tell me whether there are solutions that allow you to display coordinates offline? Upd: is there any opportu...
2020/07/01
[ "https://Stackoverflow.com/questions/62673504", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7136335/" ]
I think i found a solution ``` SELECT concat(x.a,"cis") as a_1,concat(x.b,'cis1') as b_1,x.c as c_1, concat(x.d,'cis2') as d_1,x.e as e_1 FROM (SELECT a,b,c,d,e, ROW_NUMBER() OVER (PARTITION BY d, e order by d,e) as cnt FROM table ) x WHERE cnt = 1 ```
You can try below way - ``` SELECT concat(a,'cis') as a_1, concat(b,'cis1') as b_1, c as c_1, concat(d,'cis2') as d_1, max(e) as e_1 FROM table1 group by concat(a,'cis'),concat(b,'cis1'),c,concat(d,'cis2') ```
62,673,504
I have a pair of coordinates (lat, long). I need to generate an image of displaying these coordinates on the map. And then generate such images with other coordinates in the future without the Internet. Please tell me whether there are solutions that allow you to display coordinates offline? Upd: is there any opportu...
2020/07/01
[ "https://Stackoverflow.com/questions/62673504", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7136335/" ]
I think i found a solution ``` SELECT concat(x.a,"cis") as a_1,concat(x.b,'cis1') as b_1,x.c as c_1, concat(x.d,'cis2') as d_1,x.e as e_1 FROM (SELECT a,b,c,d,e, ROW_NUMBER() OVER (PARTITION BY d, e order by d,e) as cnt FROM table ) x WHERE cnt = 1 ```
I don't see why your are using `row_number()`. How about this? ``` SELECT concat(x.a, 'cis') as a_1, concat(x.b, 'cis1') as b_1, x.c as c_1, concat(MIN(x.d), 'cis2') as d_1, x.e as e_1F FROM t GROUP BY x.a, x.b, x.c, x.e ``` You should also be able to use `||` for string concatenation: ``` SELECT (x.a || 'ci...
62,673,530
So I am having a state somewhat like this ``` this.state={ angles:{} } ``` So how can I do setState on this empty object. For instance if I want to set a key and value inside my empty angles. How can I do that. ( Likewise I want 0:90 inside my `this.state.anlges`. After setting the state it should look like ``` t...
2020/07/01
[ "https://Stackoverflow.com/questions/62673530", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13234895/" ]
You'd do it by setting a new `angles` object, like this if you want to completely replace it: ``` this.setState({angles: {0: 90}}); ``` or like this if you want to preserve any other properties and just replace the `0` property: ``` // Callback form (often best) this.setState(({angles}) => ({angles: {...angles, 0: ...
You can write something like this: ``` this.setState((currentState) => ({ angles: { ...currentState.angles, 0: 90, } })); ``` be aware that number as key in objects is not recommended if both 0 and 90 are values then `angles` should be an array containing duos of values. example: ``` angles: [[0,90], ...
62,673,530
So I am having a state somewhat like this ``` this.state={ angles:{} } ``` So how can I do setState on this empty object. For instance if I want to set a key and value inside my empty angles. How can I do that. ( Likewise I want 0:90 inside my `this.state.anlges`. After setting the state it should look like ``` t...
2020/07/01
[ "https://Stackoverflow.com/questions/62673530", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13234895/" ]
You can write something like this: ``` this.setState((currentState) => ({ angles: { ...currentState.angles, 0: 90, } })); ``` be aware that number as key in objects is not recommended if both 0 and 90 are values then `angles` should be an array containing duos of values. example: ``` angles: [[0,90], ...
I think this is the simplest way to do it: ``` this.setState({angles: {0:99}}); ```
62,673,530
So I am having a state somewhat like this ``` this.state={ angles:{} } ``` So how can I do setState on this empty object. For instance if I want to set a key and value inside my empty angles. How can I do that. ( Likewise I want 0:90 inside my `this.state.anlges`. After setting the state it should look like ``` t...
2020/07/01
[ "https://Stackoverflow.com/questions/62673530", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13234895/" ]
You can write something like this: ``` this.setState((currentState) => ({ angles: { ...currentState.angles, 0: 90, } })); ``` be aware that number as key in objects is not recommended if both 0 and 90 are values then `angles` should be an array containing duos of values. example: ``` angles: [[0,90], ...
You probably want something like this: ```js const state = { angles: {} }; const setThisToState = { 0: 90 }; const key = Object.keys(setThisToState).toString(); const value = Object.values(setThisToState).toString(); state.angels = { [key]: value }; // { angles: { '0': '90' } ``` **EDIT:** Since you asked for...
62,673,530
So I am having a state somewhat like this ``` this.state={ angles:{} } ``` So how can I do setState on this empty object. For instance if I want to set a key and value inside my empty angles. How can I do that. ( Likewise I want 0:90 inside my `this.state.anlges`. After setting the state it should look like ``` t...
2020/07/01
[ "https://Stackoverflow.com/questions/62673530", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13234895/" ]
You'd do it by setting a new `angles` object, like this if you want to completely replace it: ``` this.setState({angles: {0: 90}}); ``` or like this if you want to preserve any other properties and just replace the `0` property: ``` // Callback form (often best) this.setState(({angles}) => ({angles: {...angles, 0: ...
I think this is the simplest way to do it: ``` this.setState({angles: {0:99}}); ```
62,673,530
So I am having a state somewhat like this ``` this.state={ angles:{} } ``` So how can I do setState on this empty object. For instance if I want to set a key and value inside my empty angles. How can I do that. ( Likewise I want 0:90 inside my `this.state.anlges`. After setting the state it should look like ``` t...
2020/07/01
[ "https://Stackoverflow.com/questions/62673530", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13234895/" ]
You'd do it by setting a new `angles` object, like this if you want to completely replace it: ``` this.setState({angles: {0: 90}}); ``` or like this if you want to preserve any other properties and just replace the `0` property: ``` // Callback form (often best) this.setState(({angles}) => ({angles: {...angles, 0: ...
You probably want something like this: ```js const state = { angles: {} }; const setThisToState = { 0: 90 }; const key = Object.keys(setThisToState).toString(); const value = Object.values(setThisToState).toString(); state.angels = { [key]: value }; // { angles: { '0': '90' } ``` **EDIT:** Since you asked for...
62,673,530
So I am having a state somewhat like this ``` this.state={ angles:{} } ``` So how can I do setState on this empty object. For instance if I want to set a key and value inside my empty angles. How can I do that. ( Likewise I want 0:90 inside my `this.state.anlges`. After setting the state it should look like ``` t...
2020/07/01
[ "https://Stackoverflow.com/questions/62673530", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13234895/" ]
I think this is the simplest way to do it: ``` this.setState({angles: {0:99}}); ```
You probably want something like this: ```js const state = { angles: {} }; const setThisToState = { 0: 90 }; const key = Object.keys(setThisToState).toString(); const value = Object.values(setThisToState).toString(); state.angels = { [key]: value }; // { angles: { '0': '90' } ``` **EDIT:** Since you asked for...
62,673,550
I've recently cloned my netlify [site](http://yonseiuicscribe.netlify.app). After deploying via netlify on my cloned github repo, I get the following error ``` gatsby-plugin-netlify-cms" threw an error while running the onCreateWebpackConfig lifecycle: Module build failed (from ./node_modules/gatsby/dist/utils/babel-l...
2020/07/01
[ "https://Stackoverflow.com/questions/62673550", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12146388/" ]
deleted `node_modules` and `package-lock.json` and did `npm install` to reinstall everything. I think some babel dependencies were outdated. Answer inspired from this [source](https://github.com/babel/babel/issues/11216)
You can try adding this to your netlify.toml ``` [functions] # Specifies `esbuild` for functions bundling node_bundler = "esbuild" ``` source: <https://github.com/netlify/netlify-plugin-nextjs/issues/597>
62,673,553
I'm trying to search for 3 (or more) specific RegEx inside HTML documents. The HTML files do all have different forms and layouts but specific words, so I can search for the words. Now, I'd like to return the line: ```html <div> <p>This 17 is A BIG test</p> <p>This is another greaterly test</p> <p>17738 that is yet <...
2020/07/01
[ "https://Stackoverflow.com/questions/62673553", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2110476/" ]
deleted `node_modules` and `package-lock.json` and did `npm install` to reinstall everything. I think some babel dependencies were outdated. Answer inspired from this [source](https://github.com/babel/babel/issues/11216)
You can try adding this to your netlify.toml ``` [functions] # Specifies `esbuild` for functions bundling node_bundler = "esbuild" ``` source: <https://github.com/netlify/netlify-plugin-nextjs/issues/597>
62,673,554
I want to trigger longer running operation via rest request and WebFlux. The result of a call should just return an info that operation has started. The long running operation I want to run on different scheduler (e.g. Schedulers.single()). To achieve that I used subscribeOn: ``` Mono<RecalculationRequested> recalcula...
2020/07/01
[ "https://Stackoverflow.com/questions/62673554", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2092052/" ]
One caveat of `subscribeOn` is it does what it says: it runs the act of "subscribing" on the provided `Scheduler`. Subscribing flows from bottom to top (the `Subscriber` subscribes to its parent `Publisher`), at runtime. Usually you see in documentation and presentations that `subscribeOn` affects the whole chain. Tha...
As per the [documentation](https://projectreactor.io/docs/core/release/reference/) , all operators prefixed with doOn , are sometimes referred to as having a “side-effect”. They let you peek inside the sequence’s events without modifying them. If you want to chain the 'recalculate' step after 'provider.size()' do it w...
62,673,569
I have a code which will read file data from the defined path and copies the data to my Macro workbook's sheet. When I am running the code line by line, it is working perfectly fine. But when I run the entire code, it is getting closed automatically without my permission. Below is my previous code. ``` Set thisWB = Th...
2020/07/01
[ "https://Stackoverflow.com/questions/62673569", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13737789/" ]
Best way to solve this is by declaring a variable to fully control the open workbook in the same way you have for thisWB, eg: ``` Dim thatWB As Workbook Set thatWB = Workbooks.Open(TimFilePath) 'do the work thatWB.Close SaveChanges:=False ```
This code should work without relying on `Active` anything. ``` Option Explicit 'This line is REALLY important. 'It forces you to declare each variable. 'Tools ~ Options ~ Editor. Tick 'Require Variable Declaration' to 'add it to each new module you create. Public Sub Test() 'Set references to required files. ...
62,673,585
Currently, images with the attribute `loading="lazy"` (<https://web.dev/native-lazy-loading/>) are displayed immediately when loaded, i.e. without fade-in effect. Is there a way to animate images with the `loading="lazy"` attribute when they are loaded and preferably without JavaScript? I know, there are many lazyloa...
2020/07/01
[ "https://Stackoverflow.com/questions/62673585", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1329470/" ]
I managed to use a simple jQuery solution, since its already used in my case: ``` //fade in lazy loaded images $('article img').on('load', function(){ $(this).addClass('loaded'); }); ``` The images have 0 opacity by default and opacity 1 from the new class ``` img{ opacity: 0; transition: opacity 300...
Unfortunately it is not as simple as the simple jQuery solution above. `.on('load')` does not work properly for all Browsers (like Chrome) as discussed here: [Check if an image is loaded (no errors) with jQuery](https://stackoverflow.com/questions/1977871/check-if-an-image-is-loaded-no-errors-with-jquery)
62,673,586
I am trying to create multiple consumers in a consumer group for parallel processing since we have heavy inflow of messages. I am using spring boot and KafkTemplate. How can we create multiple consumers belonging to single consumer group, in single instance of spring boot application? Does having multiple methods annot...
2020/07/01
[ "https://Stackoverflow.com/questions/62673586", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3696393/" ]
You have to use `ConcurrentMessageListenerContainer`. It delegates to one or more `KafkaMessageListenerContainer` instances to provide multi-threaded consumption. ```java @Bean KafkaListenerContainerFactory<ConcurrentMessageListenerContainer<String, String>> kafkaListenerContainerFactory() { ConcurrentKafkaListene...
Yes, the `@KafkaListener` will create multiple consumers for you. With that you can configure all of them to use the same topic and belong to the same group. The Kafka coordinator will distribute partitions to your consumers. Although if you have only one partition in the topic, the concurrency won't happen: a single...
62,673,586
I am trying to create multiple consumers in a consumer group for parallel processing since we have heavy inflow of messages. I am using spring boot and KafkTemplate. How can we create multiple consumers belonging to single consumer group, in single instance of spring boot application? Does having multiple methods annot...
2020/07/01
[ "https://Stackoverflow.com/questions/62673586", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3696393/" ]
You have to use `ConcurrentMessageListenerContainer`. It delegates to one or more `KafkaMessageListenerContainer` instances to provide multi-threaded consumption. ```java @Bean KafkaListenerContainerFactory<ConcurrentMessageListenerContainer<String, String>> kafkaListenerContainerFactory() { ConcurrentKafkaListene...
As @Salavat Yalalo suggested I made my Kafka container factory to be `ConcurrentKafkaListenerContainerFactory`. On the @KafkaListenere method I added option called concurrency which accepts an integer as a string which indicates number of consumers to be spanned, like below ``` @KafakListener(concurrency ="4", contain...
62,673,586
I am trying to create multiple consumers in a consumer group for parallel processing since we have heavy inflow of messages. I am using spring boot and KafkTemplate. How can we create multiple consumers belonging to single consumer group, in single instance of spring boot application? Does having multiple methods annot...
2020/07/01
[ "https://Stackoverflow.com/questions/62673586", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3696393/" ]
Yes, the `@KafkaListener` will create multiple consumers for you. With that you can configure all of them to use the same topic and belong to the same group. The Kafka coordinator will distribute partitions to your consumers. Although if you have only one partition in the topic, the concurrency won't happen: a single...
As @Salavat Yalalo suggested I made my Kafka container factory to be `ConcurrentKafkaListenerContainerFactory`. On the @KafkaListenere method I added option called concurrency which accepts an integer as a string which indicates number of consumers to be spanned, like below ``` @KafakListener(concurrency ="4", contain...
62,673,592
I am currently trying to figure out a formula; I have the following: `=IF(G18>109,"A*",IF(G18>103,"A",IF(G18>85,"B",IF(G18>67,"C","F"))))` This allows me to work out grades for my students in my French class but I want to add another part to the formula... I want it so that if `C18:F18` says "INC", then the cell this ...
2020/07/01
[ "https://Stackoverflow.com/questions/62673592", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13846125/" ]
You have to use `ConcurrentMessageListenerContainer`. It delegates to one or more `KafkaMessageListenerContainer` instances to provide multi-threaded consumption. ```java @Bean KafkaListenerContainerFactory<ConcurrentMessageListenerContainer<String, String>> kafkaListenerContainerFactory() { ConcurrentKafkaListene...
Yes, the `@KafkaListener` will create multiple consumers for you. With that you can configure all of them to use the same topic and belong to the same group. The Kafka coordinator will distribute partitions to your consumers. Although if you have only one partition in the topic, the concurrency won't happen: a single...
62,673,592
I am currently trying to figure out a formula; I have the following: `=IF(G18>109,"A*",IF(G18>103,"A",IF(G18>85,"B",IF(G18>67,"C","F"))))` This allows me to work out grades for my students in my French class but I want to add another part to the formula... I want it so that if `C18:F18` says "INC", then the cell this ...
2020/07/01
[ "https://Stackoverflow.com/questions/62673592", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13846125/" ]
You have to use `ConcurrentMessageListenerContainer`. It delegates to one or more `KafkaMessageListenerContainer` instances to provide multi-threaded consumption. ```java @Bean KafkaListenerContainerFactory<ConcurrentMessageListenerContainer<String, String>> kafkaListenerContainerFactory() { ConcurrentKafkaListene...
As @Salavat Yalalo suggested I made my Kafka container factory to be `ConcurrentKafkaListenerContainerFactory`. On the @KafkaListenere method I added option called concurrency which accepts an integer as a string which indicates number of consumers to be spanned, like below ``` @KafakListener(concurrency ="4", contain...
62,673,592
I am currently trying to figure out a formula; I have the following: `=IF(G18>109,"A*",IF(G18>103,"A",IF(G18>85,"B",IF(G18>67,"C","F"))))` This allows me to work out grades for my students in my French class but I want to add another part to the formula... I want it so that if `C18:F18` says "INC", then the cell this ...
2020/07/01
[ "https://Stackoverflow.com/questions/62673592", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13846125/" ]
Yes, the `@KafkaListener` will create multiple consumers for you. With that you can configure all of them to use the same topic and belong to the same group. The Kafka coordinator will distribute partitions to your consumers. Although if you have only one partition in the topic, the concurrency won't happen: a single...
As @Salavat Yalalo suggested I made my Kafka container factory to be `ConcurrentKafkaListenerContainerFactory`. On the @KafkaListenere method I added option called concurrency which accepts an integer as a string which indicates number of consumers to be spanned, like below ``` @KafakListener(concurrency ="4", contain...
62,673,595
Can you tell me why the OUTPUT of this program is `ABBBCDE`? It was my exam question. ``` #include <stdio.h> int main (void) { int i; for (i = 0; i < 2; i++) { printf ("A"); for (; i < 3; i++) printf ("B"); printf ("C"); for (; i < 4; i++) printf ("D"); ...
2020/07/01
[ "https://Stackoverflow.com/questions/62673595", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
``` int main (void) { int i; for (i = 0; i < 2; i++) { printf ("A"); for (; i < 3; i++) printf ("B"); printf ("C"); for (; i < 4; i++) printf ("D"); printf ("E"); } return 0; } ``` is the same as ``` int main (void) { int i; for (i = 0; i < 2; i++) { ...
If you indent the code properly it will help you understand what's going on: ``` #include <stdio.h> int main(void) { int i; for (i = 0; i < 2; i++) { printf("A"); // prints A 1 time, i is still 0 for (; i < 3; i++) // prints B 3 times, i will now be 3, the cycle ends pr...
62,673,595
Can you tell me why the OUTPUT of this program is `ABBBCDE`? It was my exam question. ``` #include <stdio.h> int main (void) { int i; for (i = 0; i < 2; i++) { printf ("A"); for (; i < 3; i++) printf ("B"); printf ("C"); for (; i < 4; i++) printf ("D"); ...
2020/07/01
[ "https://Stackoverflow.com/questions/62673595", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
``` int main (void) { int i; for (i = 0; i < 2; i++) { printf ("A"); for (; i < 3; i++) printf ("B"); printf ("C"); for (; i < 4; i++) printf ("D"); printf ("E"); } return 0; } ``` is the same as ``` int main (void) { int i; for (i = 0; i < 2; i++) { ...
Because you have a for loop that checks if i is less than three. It starts at zero, zero is less than three so it prints B once, then it adds one to i and i becomes one, which is still less than three, so it prints another B. Then it ads one to i, making it two, which is still less than zero, which makes it print B a t...
62,673,595
Can you tell me why the OUTPUT of this program is `ABBBCDE`? It was my exam question. ``` #include <stdio.h> int main (void) { int i; for (i = 0; i < 2; i++) { printf ("A"); for (; i < 3; i++) printf ("B"); printf ("C"); for (; i < 4; i++) printf ("D"); ...
2020/07/01
[ "https://Stackoverflow.com/questions/62673595", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
If you indent the code properly it will help you understand what's going on: ``` #include <stdio.h> int main(void) { int i; for (i = 0; i < 2; i++) { printf("A"); // prints A 1 time, i is still 0 for (; i < 3; i++) // prints B 3 times, i will now be 3, the cycle ends pr...
Because you have a for loop that checks if i is less than three. It starts at zero, zero is less than three so it prints B once, then it adds one to i and i becomes one, which is still less than three, so it prints another B. Then it ads one to i, making it two, which is still less than zero, which makes it print B a t...
62,673,610
I am using WebdriverIO version 5 and would like to see the logs of my test run. I tried the command: `npm run rltest --logLevel=info`, but all I can see is the output of the spec reporter. ``` [chrome 83.0.4103.116 Mac OS X #0-0] Running: chrome (v83.0.4103.116) on Mac OS X [chrome 83.0.4103.116 Mac OS X #0-0] Sessio...
2020/07/01
[ "https://Stackoverflow.com/questions/62673610", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10431512/" ]
Check documentation - [logLevel](https://webdriver.io/docs/options.html#loglevel) So basically you need to setup this property in `wdio.conf.js`: ``` // =================== // Test Configurations // =================== // Define all options that are relevant for the WebdriverIO instance here // // Level of...
You should see the `wdio` logs in your console, as WebdriverIO defaults to dumping all the Selenium logs into `stdout`. Hope I understood correctly and you're talking about the `webdriver` logs, as below: ``` [0-0] 2020-07-01T09:28:53.869Z INFO webdriver: [GET] http://127.0.0.1:4444/wd/hub/session/933eeee4135ea0ca37d5...
62,673,611
I’m trying to fetch some data, specifically the ‘html’ from the [1] array from the json displayed below. However when I console log welcomeTXT after setting the variable to that json selector it says ``` undefined ``` Any idea why the data is returning as undefined? ``` var welcomeTXT; fetch('http://ip.ip.ip...
2020/07/01
[ "https://Stackoverflow.com/questions/62673611", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13612518/" ]
you forgot `data` here: ```js welcomeTXT = data['pages'][0]['title']; ```
In promise then you missed the "data" > > welcomeTXT = ['pages'][0]['title']; > > > it should be > > welcomeTXT = data['pages'][0]['title']; > > > ``` var welcomeTXT; fetch('http://ip.ip.ip.ip4/ghost/api/v3/content/pages/?key=276f4fc58131dfcf7a268514e5') .then(response => response.json()) .then(data =>...
62,673,628
I want to have a field `tags` as `completion`, and I do not want this field to participate in the scoring, so I am trying to apply the mapping ``` "tags": { "type": "completion", "index": false } ``` And I am getting an error ``` ElasticsearchStatusException[Elasticsearch exception [type=mapper_parsing_exce...
2020/07/01
[ "https://Stackoverflow.com/questions/62673628", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13674325/" ]
The `completion` type stores the data in a different way in a finite state transducer (FST) data structure and not in the inverted index. You can find more information about the completion suggester here: * [Official documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-suggesters.html...
mapper\_parsing\_exception says that it is not able to parse suppose if you are writing in python false --> False data = "tags": { "type": "completion", "index": False } send this in request as json json.loads(data)
62,673,634
I don't know why first it prints `data return` instead of after loop done code ``` exports.put = async function (req, res, next) { const data = Array.from(req.body); let errors = false; data.forEach(async (update, index) => { try { const result = await TypeofAccount.findByIdAndUpdate( ...
2020/07/01
[ "https://Stackoverflow.com/questions/62673634", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10842900/" ]
The `completion` type stores the data in a different way in a finite state transducer (FST) data structure and not in the inverted index. You can find more information about the completion suggester here: * [Official documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-suggesters.html...
mapper\_parsing\_exception says that it is not able to parse suppose if you are writing in python false --> False data = "tags": { "type": "completion", "index": False } send this in request as json json.loads(data)
62,673,652
I added collapsing toolbar in my app but now it only collapses when a user scrolls the image view inside the CollapsingToolbarLayout. How can collapse the toolbar when a user scrolls from anywhere within the view? this is my layout ``` <?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.CoordinatorL...
2020/07/01
[ "https://Stackoverflow.com/questions/62673652", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10264518/" ]
Put your included layout inside `NestedScrollView` view, since the `ConstraintLayout` is not a scrollable view. Like this: ``` <androidx.core.widget.NestedScrollView android:layout_width="match_parent" android:layout_height="match_parent" android:layout_gravity="bottom" app:layout_anchor="@+id/app_ba...
Add this in the `profile_contents` layout's root view ``` app:layout_behavior="@string/appbar_scrolling_view_behavior" ``` > > We need to define an association between the AppBarLayout and the View that will be scrolled. Add an `app:layout_behavior` to a RecyclerView or any other View capable of nested scrolling su...
62,673,653
I am having an issue when running multiple tests one after another in webdriverio. When I am running multiple tests (for example a describe that contains multiple it) I am getting a recapcha that basically fails the test. Is there a way to overcome this? Thanks
2020/07/01
[ "https://Stackoverflow.com/questions/62673653", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10431512/" ]
Put your included layout inside `NestedScrollView` view, since the `ConstraintLayout` is not a scrollable view. Like this: ``` <androidx.core.widget.NestedScrollView android:layout_width="match_parent" android:layout_height="match_parent" android:layout_gravity="bottom" app:layout_anchor="@+id/app_ba...
Add this in the `profile_contents` layout's root view ``` app:layout_behavior="@string/appbar_scrolling_view_behavior" ``` > > We need to define an association between the AppBarLayout and the View that will be scrolled. Add an `app:layout_behavior` to a RecyclerView or any other View capable of nested scrolling su...
62,673,671
I am trying to iterate through a set of results, similar to the below, so to select that I perform the below: ``` for a in browser.find_elements_by_css_selector(".inner-row"): ``` What I then want to do is return: a. The x in the class next to time-x (e.g. 26940 in the example) b. filter to bananas only c. Gr...
2020/07/01
[ "https://Stackoverflow.com/questions/62673671", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1513726/" ]
I guess this html is the each of the `a` in your code then you can exract the `id` and `time` with following code: ```py for a in browser.find_elements_by_css_selector(".inner-row"): try: el = a.find_element_by_css_selector("div.bananas") print("id: %s", el.get_attribute("id").split("-")[1]) ...
You can get the ids like so ```py print([e.get_attribute('id') for e in driver.find_elements(By.CSS_SELECTOR, 'div.bananas')]) ``` Prints `['row-1522076067']`
62,673,671
I am trying to iterate through a set of results, similar to the below, so to select that I perform the below: ``` for a in browser.find_elements_by_css_selector(".inner-row"): ``` What I then want to do is return: a. The x in the class next to time-x (e.g. 26940 in the example) b. filter to bananas only c. Gr...
2020/07/01
[ "https://Stackoverflow.com/questions/62673671", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1513726/" ]
I guess this html is the each of the `a` in your code then you can exract the `id` and `time` with following code: ```py for a in browser.find_elements_by_css_selector(".inner-row"): try: el = a.find_element_by_css_selector("div.bananas") print("id: %s", el.get_attribute("id").split("-")[1]) ...
To handle dynamic element Induce `WebDriverWait`() and wait for `visibility_of_all_elements_located`() and following css selector. Then use **regular expression** to get the value from element attribute. **Code** ``` from selenium import webdriver from selenium.webdriver.support.ui import WebDriverWait from selenium...
62,673,672
There are a lot of similar questions to this, but none have helped me so I assume a nuance to my version which I'm missing. I have two DataFrames: df1, df2 (of same dimensions which can me mapped 1-2-1 on unique column, ie Name) and I want all rows which exist in df1 and are different to the corresponding row in df2. ...
2020/07/01
[ "https://Stackoverflow.com/questions/62673672", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4508879/" ]
I guess this html is the each of the `a` in your code then you can exract the `id` and `time` with following code: ```py for a in browser.find_elements_by_css_selector(".inner-row"): try: el = a.find_element_by_css_selector("div.bananas") print("id: %s", el.get_attribute("id").split("-")[1]) ...
You can get the ids like so ```py print([e.get_attribute('id') for e in driver.find_elements(By.CSS_SELECTOR, 'div.bananas')]) ``` Prints `['row-1522076067']`
62,673,672
There are a lot of similar questions to this, but none have helped me so I assume a nuance to my version which I'm missing. I have two DataFrames: df1, df2 (of same dimensions which can me mapped 1-2-1 on unique column, ie Name) and I want all rows which exist in df1 and are different to the corresponding row in df2. ...
2020/07/01
[ "https://Stackoverflow.com/questions/62673672", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4508879/" ]
I guess this html is the each of the `a` in your code then you can exract the `id` and `time` with following code: ```py for a in browser.find_elements_by_css_selector(".inner-row"): try: el = a.find_element_by_css_selector("div.bananas") print("id: %s", el.get_attribute("id").split("-")[1]) ...
To handle dynamic element Induce `WebDriverWait`() and wait for `visibility_of_all_elements_located`() and following css selector. Then use **regular expression** to get the value from element attribute. **Code** ``` from selenium import webdriver from selenium.webdriver.support.ui import WebDriverWait from selenium...
62,673,697
When I save a pair rdd by `rdd.repartition(1).saveAsTextFile(file_path)`, an error meets. ``` Py4JJavaError: An error occurred while calling o142.saveAsTextFile. : org.apache.spark.SparkException: Job aborted. at org.apache.spark.internal.io.SparkHadoopWriter$.write(SparkHadoopWriter.scala:100) at org.apache.s...
2020/07/01
[ "https://Stackoverflow.com/questions/62673697", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9276708/" ]
Repartion method is triggering full shuffle, and if the dataset is large driver will result into memory error. Try to increase the number of partitions vaue in repartitton.
Check your java version. By uninstalling 32bit and installing 64bit version solve mine.
62,673,701
`data = {string1,string2}` The array data is fetched from PostgreSQL database that has a column of type text[] ie text array. I need to empty this array. OUTPUT: `data = {}` Can I use `tablename.update_attributes!(data: "")` OR `tablename.data.map!{ |e| e.destroy }` Context: ``` EMAILS.each do |e...
2020/07/01
[ "https://Stackoverflow.com/questions/62673701", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8203419/" ]
Repartion method is triggering full shuffle, and if the dataset is large driver will result into memory error. Try to increase the number of partitions vaue in repartitton.
Check your java version. By uninstalling 32bit and installing 64bit version solve mine.
62,673,726
there is a react component stored inside of a state variable. I've attached a sample code and created a [codesandbox sample](https://codesandbox.io/s/mystifying-robinson-wz4uf). As you can see, `nameBadgeComponent` is supposed to display `{name}` field from state. It works fine for the default value, but does not react...
2020/07/01
[ "https://Stackoverflow.com/questions/62673726", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9890829/" ]
You can't create a component from a useState. A state is all the properties and data that define in what condition/appearance/etc the component is. A useState allows to control a piece of information or data, but doesn't respond to changes, a component does. The fact that you put "Component" in the name should give yo...
Why are you extracting the nameBadgeComponent to a state? That is useless as it only relies on `name`, keeping your code as close to the original as possible: ```js const [name, setName] = useState("DefaultName"); const nameBadgeComponent = <h2>My name is: {name}</h2>; return ( <div className="App"> {nameBadge...
62,673,733
I am a total beginner to python and coding. I Was just wondering if there is a way for python to read what I've typed into the console, For example: If it prints out a question, I can answer with many choices. This is what I've tried yet. ``` `answer = input("Vilken?") if answer.lower().strip() == "1": print("Okej...
2020/07/01
[ "https://Stackoverflow.com/questions/62673733", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13846121/" ]
You can't create a component from a useState. A state is all the properties and data that define in what condition/appearance/etc the component is. A useState allows to control a piece of information or data, but doesn't respond to changes, a component does. The fact that you put "Component" in the name should give yo...
Why are you extracting the nameBadgeComponent to a state? That is useless as it only relies on `name`, keeping your code as close to the original as possible: ```js const [name, setName] = useState("DefaultName"); const nameBadgeComponent = <h2>My name is: {name}</h2>; return ( <div className="App"> {nameBadge...
62,673,738
I have a pretty simple .csv table: [![enter image description here](https://i.stack.imgur.com/q4fbi.png)](https://i.stack.imgur.com/q4fbi.png) I use this table as an input parameter when creating a model in Create ML, where the target is PRICE, CITY and DATE are feature columns. I need to get a price prediction for...
2020/07/01
[ "https://Stackoverflow.com/questions/62673738", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1213848/" ]
You can't create a component from a useState. A state is all the properties and data that define in what condition/appearance/etc the component is. A useState allows to control a piece of information or data, but doesn't respond to changes, a component does. The fact that you put "Component" in the name should give yo...
Why are you extracting the nameBadgeComponent to a state? That is useless as it only relies on `name`, keeping your code as close to the original as possible: ```js const [name, setName] = useState("DefaultName"); const nameBadgeComponent = <h2>My name is: {name}</h2>; return ( <div className="App"> {nameBadge...
62,673,739
I have an Android App (written in Java) which retrieves a JSON object from the backend, parses it, and displays the data in the app. Everything is working fine (meaning that every field is being displayed correctly) except for one field. All the fields being displayed correctly are `String` whereas the one field which ...
2020/07/01
[ "https://Stackoverflow.com/questions/62673739", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7015166/" ]
You can't create a component from a useState. A state is all the properties and data that define in what condition/appearance/etc the component is. A useState allows to control a piece of information or data, but doesn't respond to changes, a component does. The fact that you put "Component" in the name should give yo...
Why are you extracting the nameBadgeComponent to a state? That is useless as it only relies on `name`, keeping your code as close to the original as possible: ```js const [name, setName] = useState("DefaultName"); const nameBadgeComponent = <h2>My name is: {name}</h2>; return ( <div className="App"> {nameBadge...
62,673,756
I am trying to autofill a text box based on the state from another component. Which works fine. But when I go to add ngModel to the text box to take in the value when submitting the form. The value is cleared and not displayed to the user. ```html <div *ngIf="autoFill; else noFillMode" class="row"> <label>Mode of Tr...
2020/07/01
[ "https://Stackoverflow.com/questions/62673756", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4682626/" ]
You can't create a component from a useState. A state is all the properties and data that define in what condition/appearance/etc the component is. A useState allows to control a piece of information or data, but doesn't respond to changes, a component does. The fact that you put "Component" in the name should give yo...
Why are you extracting the nameBadgeComponent to a state? That is useless as it only relies on `name`, keeping your code as close to the original as possible: ```js const [name, setName] = useState("DefaultName"); const nameBadgeComponent = <h2>My name is: {name}</h2>; return ( <div className="App"> {nameBadge...
62,673,771
If i declare a function like below: ``` function a(){ //do something } ``` And if i execute it with `a()` it gets putted onto the top of the callstack and gets popped of when its finished. While the function is in the callstack the main thread is blocked and cant do other things until the callstack is empty. But ...
2020/07/01
[ "https://Stackoverflow.com/questions/62673771", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10990737/" ]
Yes, `async function`s will be on the call stack during their execution just like normal functions. You can consider the desugaring of the `await` keyword: ``` function log(x) { console.log("at "+x); } function delay(t) { return new Promise(resolve => setTimeout(resolve, t)); } async function example() { log(1);...
it does go onto the call stack, when its time for the async function to run it gets moved off of the call stack until the function is either fulfilled.or rejected. at this point it get moved into the callback queue while all other synchronous functions can continue to execute off of the callstack, then when the callsta...
62,673,780
I need the basename of a file that is given as an argument to a bash script. The basename should be stripped of its file extension. Let's assume `$1 = "/somefolder/andanotherfolder/myfile.txt"`, the desired output would be `"myfile"`. The current attempt creates an intermediate variable that I would like to avoid: ``...
2020/07/01
[ "https://Stackoverflow.com/questions/62673780", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6908422/" ]
``` NOEXT="${1##*/}"; NOEXT="${NOEXT%.*}" ```
How about: ``` $ [[ $var =~ [^/]*$ ]] && echo ${BASH_REMATCH%.*} myfile ```
62,673,780
I need the basename of a file that is given as an argument to a bash script. The basename should be stripped of its file extension. Let's assume `$1 = "/somefolder/andanotherfolder/myfile.txt"`, the desired output would be `"myfile"`. The current attempt creates an intermediate variable that I would like to avoid: ``...
2020/07/01
[ "https://Stackoverflow.com/questions/62673780", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6908422/" ]
Why not Zoidberg ? Ehhmm.. I meant why not remove the ext before going for basename ? ``` basename "${1%.*}" ``` Unless of course you have directory paths with dots, then you'll have to use basename before and remove the extension later: ``` echo $(basename "$1") | awk 'BEGIN { FS = "." }; { print $1 }' ``` The a...
How about: ``` $ [[ $var =~ [^/]*$ ]] && echo ${BASH_REMATCH%.*} myfile ```
62,673,780
I need the basename of a file that is given as an argument to a bash script. The basename should be stripped of its file extension. Let's assume `$1 = "/somefolder/andanotherfolder/myfile.txt"`, the desired output would be `"myfile"`. The current attempt creates an intermediate variable that I would like to avoid: ``...
2020/07/01
[ "https://Stackoverflow.com/questions/62673780", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6908422/" ]
How about this? ```sh NEXT="$(basename -- "${1%.*}")" ``` Testing: ```sh set -- '/somefolder/andanotherfolder/myfile.txt' NEXT="$(basename -- "${1%.*}")" echo "$NEXT" ``` > > `myfile` > > > Alternatively: ```sh set -- "${1%.*}"; NEXT="${1##*/}" ```
How about: ``` $ [[ $var =~ [^/]*$ ]] && echo ${BASH_REMATCH%.*} myfile ```
62,673,780
I need the basename of a file that is given as an argument to a bash script. The basename should be stripped of its file extension. Let's assume `$1 = "/somefolder/andanotherfolder/myfile.txt"`, the desired output would be `"myfile"`. The current attempt creates an intermediate variable that I would like to avoid: ``...
2020/07/01
[ "https://Stackoverflow.com/questions/62673780", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6908422/" ]
Why not Zoidberg ? Ehhmm.. I meant why not remove the ext before going for basename ? ``` basename "${1%.*}" ``` Unless of course you have directory paths with dots, then you'll have to use basename before and remove the extension later: ``` echo $(basename "$1") | awk 'BEGIN { FS = "." }; { print $1 }' ``` The a...
``` NOEXT="${1##*/}"; NOEXT="${NOEXT%.*}" ```
62,673,780
I need the basename of a file that is given as an argument to a bash script. The basename should be stripped of its file extension. Let's assume `$1 = "/somefolder/andanotherfolder/myfile.txt"`, the desired output would be `"myfile"`. The current attempt creates an intermediate variable that I would like to avoid: ``...
2020/07/01
[ "https://Stackoverflow.com/questions/62673780", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6908422/" ]
Why not Zoidberg ? Ehhmm.. I meant why not remove the ext before going for basename ? ``` basename "${1%.*}" ``` Unless of course you have directory paths with dots, then you'll have to use basename before and remove the extension later: ``` echo $(basename "$1") | awk 'BEGIN { FS = "." }; { print $1 }' ``` The a...
How about this? ```sh NEXT="$(basename -- "${1%.*}")" ``` Testing: ```sh set -- '/somefolder/andanotherfolder/myfile.txt' NEXT="$(basename -- "${1%.*}")" echo "$NEXT" ``` > > `myfile` > > > Alternatively: ```sh set -- "${1%.*}"; NEXT="${1##*/}" ```
62,673,785
``` { "AWSTemplateFormatVersion": "2010-09-09", "Parameters": { "VpcId": { "Type": "AWS::EC2::VPC::Id", "Description": "VpcId of your existing Virtual Private Cloud (VPC)", "ConstraintDescription": "must be the VPC Id of an existing Virtual Private Cloud." },...
2020/07/01
[ "https://Stackoverflow.com/questions/62673785", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12409879/" ]
I have ran your template through [cfn-lint](https://github.com/aws-cloudformation/cfn-python-lint) and got a lot of problems reported: ``` W2030 You must specify a valid allowed value for InstanceType (cg1.4xlarge). Valid values are ['a1.2xlarge', 'a1.4xlarge', 'a1.large', 'a1.medium', 'a1.metal', 'a1.xlarge', 'c1.med...
This is coming down to `HealthCheckType` being in the target group resource, it should instead be attached to your autoscaling group. The fixed template for this error is below ``` { "AWSTemplateFormatVersion": "2010-09-09", "Parameters": { "VpcId": { "Type": "AWS::EC2::VPC::Id", ...
62,673,787
What I'm trying to get is the immediate upper div value (Accounts Admin) when I'm clicking on a radio button. Below is my HTML structure. Whenever I click on the admin or alan radio button give me the div inner text Accounts Admin. How can get that value? ```html <div class="display-flex flex-row"> <div class="p-1...
2020/07/01
[ "https://Stackoverflow.com/questions/62673787", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2414345/" ]
Assuming you have multiple blocks of this, I would change the html structure a bit so you have a wrapper around the complete block. With the `closest()` function you can find the first wrapper parent and then use `find()` to look for the header element. You can use `trim()` to remove the whitespace caused by code inde...
With your HTML structure as it is, you need to find the closest (nearest parent) `.row` and then use `prevAll` to get the header row. ``` $(this).closest(".row").prevAll(".flex-row").first().text().trim() ``` ```js $("input.userlist").click(function() { console.log($(this).closest(".row").prevAll(".flex-row").firs...
62,673,802
I am using the lightning chart and would like to make the background transparent I tried setting the following on my chart but it just gives me a black background ``` .setChartBackgroundFillStyle( new SolidFill({ // A (alpha) is optional - 255 by default color: ColorRGBA(255, 0, 0,0) }) ) .setBackgrou...
2020/07/01
[ "https://Stackoverflow.com/questions/62673802", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13061693/" ]
In LightningChart JS version 2.0.0 and above it's possible to set the chart background color to transparent with [`chart.setChartBackgroundFillStyle(transparentFill)`](https://www.arction.com/lightningchart-js-api-documentation/v2.0.0/classes/chartxy.html#setchartbackgroundfillstyle) and [`chart.setBackgroundFillStyle(...
You can use css "**background-color:transparent**"
62,673,821
One of our client asks to get all the video that they uploaded to the system. The files are stored at s3. Client expect to get one link that will download archive with all the videos. Is there a way to create such an archive without downloading files archiving it and uploading back to aws? So far I didn't find the so...
2020/07/01
[ "https://Stackoverflow.com/questions/62673821", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8870505/" ]
Unfortunately, you **can't create a zip-like archives from existing objects** directly on S3. Similarly you can't transfer them to Glacier to do this. Glacier is not going to produce a single zip or rar (or any time of) archive from multiple s3 objects for you. Instead, you have to **download** them first, zip or rar ...
You can create a glacier archive for a specific prefix (what you see as a subfolder) by using AWS lifecycle rules to perform this action. More information available [here](https://docs.aws.amazon.com/AmazonS3/latest/dev/lifecycle-transition-general-considerations.html). **Original answer** There is no native way to ...
62,673,839
I use some approaches similar to the following one in Java: ``` public static void main(String[] args) { Scanner scan = new Scanner(System.in); int[] a= new int[3]; //assign inputs for (int i=0;i<3;i++) a[i] = scan.nextInt(); scan.close(); //print inputs for(int j=0;j<3;j++) ...
2020/07/01
[ "https://Stackoverflow.com/questions/62673839", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Unfortunately, you **can't create a zip-like archives from existing objects** directly on S3. Similarly you can't transfer them to Glacier to do this. Glacier is not going to produce a single zip or rar (or any time of) archive from multiple s3 objects for you. Instead, you have to **download** them first, zip or rar ...
You can create a glacier archive for a specific prefix (what you see as a subfolder) by using AWS lifecycle rules to perform this action. More information available [here](https://docs.aws.amazon.com/AmazonS3/latest/dev/lifecycle-transition-general-considerations.html). **Original answer** There is no native way to ...
End of preview. Expand in Data Studio

No dataset card yet

Downloads last month
9