How to get the 1st occurrence of Sex (male & female both) from sashelp.class

I am trying to get all the details in a row for the first occurence of sex=’m’ and sex=’f’ from sashelp.class. Sex is a column in sashelp.class Till now I have done this: Proc sql; Select * From sashelp.class Where sex=’m’ or sex=’f’ Order by sex Limit 1; Quit; This gives me an error in… Read More How to get the 1st occurrence of Sex (male & female both) from sashelp.class

How to change the x axis scale limits to adjust itself depending on the max value of each group in ggplot2, for R?

Here is some randomly generated sample data: [Data Info: The number of customers that visit a particular shop per day, across different branches] library(tidyverse) library(ggplot2) make_skewed_data <- function(n = 20){ round(rlnorm(n = n, meanlog = 0.3, sdlog = 0.5)*1000, 0) } num_customers <- c(make_skewed_data(50), make_skewed_data(50), make_skewed_data(50), make_skewed_data(50), make_skewed_data(50), make_skewed_data(50)) DF <- tibble(day = paste0("day", seq(1:50))… Read More How to change the x axis scale limits to adjust itself depending on the max value of each group in ggplot2, for R?

pandas multIndex from product – ignore same row comparison

I have a pandas dataframe like as shown below Company,year T123 Inc Ltd,1990 T124 PVT ltd,1991 ABC Limited,1992 ABCDE Ltd,1994 tf = pd.read_clipboard(sep=’,’) tf[‘Company_copy’] = tf[‘Company’] I would like to compare each value from tf[‘company’] against each value of tf[‘company_copy] but exclude same matching row number or index number, string For ex: I want T123… Read More pandas multIndex from product – ignore same row comparison

Parse over large JSON array of Objects from Facebook

This is the JSON array: { "id": "", "name": "", "posts": { "data": [ { "likes": { "data": [ ], "paging": { "cursors": { "before": "QVFIUnpFd2IwMlhuOWI3dJqelFNNEZAPWDlqeENTNkg1N2RqMm9zQXBreVV6bE9KNXJzX29LeXlMZAzhNT2x3TEhlcGk3OG1Bd3ZABRmpyTXhnNDZAWV2hR", "after": "QVFIUl9Vbm14cld0dm41OTFtKYmgtelBKall2bnBINjBQMXBiNkNCMUM0d21lQXptOXRvbklkU0pHbV9yejNBVG9Jb2hqQTFoem1mdm9zMnJn" }, "next": "" }, "summary": { "total_count": 84, "can_like": true, "has_liked": false } }, "comments": { "data": [ { "created_time": "2022-05-25T18:22:19+0000", "message": "", "id": "" }, {… Read More Parse over large JSON array of Objects from Facebook

How can I remove a specific role from everyone that has it in Discord.js v13

I want my bot to remove a specific role from everyone that has it when a message is sent in a channel client.on(‘messageCreate’, async message => { if(message.channel.id === ‘954375143965216869’){ //counting message.guild.roles.get(‘944674567811645472′).members.map(m=>m.member.id).delete(); } }) I’m using discord.js v13 and node.js v16.4.2 >Solution : This should work, it’ll fetch all the members in the guild and… Read More How can I remove a specific role from everyone that has it in Discord.js v13

Decomposing a string into words separared by spaces, ignoring spaces within quoted strings, and considering ( and ) as words

How can I explode the following string: +test +word any -sample (+toto +titi "generic test") -column:"test this" (+data id:1234) into Array(‘+test’, ‘+word’, ‘any’, ‘-sample’, ‘(‘, ‘+toto’, ‘+titi’, ‘"generic test"’, ‘)’, ‘-column:"test this"’, ‘(‘, ‘+data’, ‘id:1234’, ‘)’) I would like to extend the boolean fulltext search SQL query, adding the feature to specify specific columns using… Read More Decomposing a string into words separared by spaces, ignoring spaces within quoted strings, and considering ( and ) as words