Categories
Mastering Development

Selecting following characters after a pattern match in R

I have a data frame which has one column of text with info that I need to extract, here is one observation from that column: each question has three attributes associated to it objectives,KeyResults and responsible [{“text”:”Newideas.”,”translationKey”:”new.question-4″,”id”:4,”objectives”:”Great”,”KeyResults”:”Awesome”,”responsible”:”myself”},{“text”:”customer focus.”,”translationKey”:”new.question-5″,”id”:5,”objectives”:”Goalset”,”KeyResults”:”Amazing”,”responsible”:”myself”} ————————-DESIRED OUTPUT ———————– Question# Objectives KeyResults responsible Question# Objectives KeyResults responsible 4 Great Awesome myself 5 Goalset […]

Categories
Mastering Development

How do I filter multiple values in array

const arr1 = [{id:2},{id:3},{id:4},{id:5}] const arr2 = [{Id:2},{id:4}] I want to filter arr1 that contains arr2.id

Categories
Development

PHP; MySQL JOIN query on large datasets gets slower as WHERE conditions update

So this might be a bit silly, but the alternative I was using is worse. I am trying to write an excel sheet using data from my database and a PHP tool called Box/Spout. The thing is that Box/Spout reads rows one at a time, and they are not retrieved via index ( e.g. rows[10], […]

Categories
Development

React Native TapGestureHandler – how to call a function and send a custom id param

class InfoScreen extends Component { constructor(props) { super(props); this.infoData =[ { id:1, title: ‘React Native’, shortDescription: ‘Wat is React Native en wat kan het voor u betekenen. Met React Native maken wij moderne apps op maat!’, color:’green’, }, { id:2, title: ‘Magento 2 koppeling’, shortDescription: ‘Een app met een Magento 2 koppeling is mogelijk. Link […]

Categories
Development

Gatling: How to extract one object from array?

I am new in Gatling and Scala. Sending Get Request the response body is Array and I need to extract only one object from Array and post it in Gatling. Can someone explain to me how to do it? Here is my code example: private val getUsers = exec( http(“Get users”) .get(“/users”) .check(status.is(200)) .check(bodyString.saveAs(“Users”))) The […]

Categories
Development

Gatling: How to extract one object from array?

I am new in Gatling and Scala. Sending Get Request the response body is Array and I need to extract only one object from Array and post it in Gatling. Can someone explain to me how to do it? Here is my code example: private val getUsers = exec( http(“Get users”) .get(“/users”) .check(status.is(200)) .check(bodyString.saveAs(“Users”))) The […]

Categories
Development

React beautiful DND – I get “Unable to find draggable with id: 1”

In the code below the UI renders two “Column” components and each column contains two draggable elements called “Tasks”. When the user drags a “Task” between columns the code works – up to a point. When the user continuously drags the task components around eventually they will stop dragging and the user gets an error […]

Categories
Development

Bash script to sort rows in a csv file

I have a bunch of rows and each field in the row has a header identifying that field. Currently the file is just a csv, and although the first few fields would line up when put into excel, the rest of the row becomes misaligned due to some rows not having some of the fields […]

Categories
Development

How do I move values to empty cells in another dataframe in R?

I have two dataframes. Both have a ‘year’ column and a series of other IDs like this: year <- c(“1990”, “2000”, “2010”, “”, “”) name <- c(“id1”, “id2”, “id3”, “id4”, “id5”) other <- c(“dhg”, “fsgh”, “fgskgs”, “fsjg”, “wod”) df1 <- data.frame(name, year) year <- c(“”, “”, “”, “2009”, “2013”) name <- c(“id1”, “id2”, “id3”, “id4”, […]

Categories
Development

R: boxplot: draw lines between each subject in case of repeated measurements

I have data where I have measurements of same subjects on 4 different stages. My goal is to make one graph on which there is both a boxplot, as well as the point of each subject with a line connecting each subject between each stage. The end result would be to combine both the graph […]