Questions tagged [p-lang]

P is a language for asynchronous event-driven programming written by Microsoft. Questions should include code examples sufficient to reproduce the problem.

P allows the programmer to specify the system as a collection of interacting state machines, which communicate with each other using events.

Project Home

Language Manual

27 questions
3
votes
3 answers

Return error on unknown fields in JSON request body of specific controllers

I have SpringBoot application X that has customer facing APIs. Those APIs receive request body as JSON. Application X issues API calls to application Y and receives responses with JSON body. I want to prevent application X from receiving unknown…
Victoriia
  • 105
  • 9
3
votes
2 answers

Count the number of overlaps between groups

I have two large data sets that look like this. library(tidyverse) dat1 <- tibble(chrom=c(rep(c("Chr1","Chr2"),each=5)), start=c(9885,11944, 13271,15104,19059,25793,97514,104718,118862,120950), …
LDT
  • 2,856
  • 2
  • 15
  • 32
1
vote
1 answer

Why is my Python code returning a list of characters instead of items?

Question: I'm trying to solve the following problem: given two arrays of strings list1 and list2, find the common strings with the least index sum. A common string is a string that appeared in both list1 and list2. A common string with the least…
gizmo
  • 19
  • 4
1
vote
1 answer

Resolving collision - separating interescting objects causing incident ray to changed

I read some articles that says As objects intersecting each other isn't physically possible, we have to maintain the realism of the simulation by resolving those collisions by separating them out so that they aren't overlapping. And to do that, we…
Panda World
  • 1,704
  • 1
  • 20
  • 28
1
vote
1 answer

PANDAS group by with 30 minute intervals and calculate total difference

I have a data frame that looks like this: date week id 20/07/21 12:46:00 1 d1 20/07/21 12:56:00 1 d1 20/07/21 13:09:00 1 d1 20/07/21 14:11:00 1 d1 20/07/21 14:42:00 1 d1 I want to group by date in in 30 minutes interval- so if 2…
kri
  • 95
  • 6
1
vote
1 answer

Building the P compiler on Mac OS X

I'm having trouble building Microsoft's P language compiler on Mac OS X El Capitan 10.11.6. Relevant portions of the build log (cd Bld; ./build.sh): ~/workspace/P/Bld -- The C compiler identification is AppleClang 8.0.0.8000038 -- The CXX compiler…
JAL
  • 41,701
  • 23
  • 172
  • 300
0
votes
0 answers

Can anyone help me solve this python code for login email

I try to write a code for login email with website but the browser open but username and password not work fillout the input def open_browser(self): # Open the browser processes for each profile directory url = self.txt_weblink.text() #…
0
votes
1 answer

P value and sample size relationship

Say for a 2x2 experiment, the power analysis said the sample size should be over 1000 to detect 0.1 effect size. Right now, with the sample size of below 100, the effect size of .12 is insignificant with the p value being 0.8 (very far from .05) Is…
0
votes
0 answers

I'm looking for ways to convert Bezier curves into .svg images

I'm trying to use potrace in python to convert a directory of .pngs into .svgs. The .pngs in question are traced in black and white. The code I'm currently using traces just fine, but it outputs data as a bunch of coordinates of how steep the curve…
TOZ
  • 1
0
votes
1 answer

Tinymce change p tag to div

and i have an issue i want that enter (which creates a big space because it makes a p tag) to work as shift + enter. And I made it work with force_br_newlines: true, force_p_newlines: false, forced_root_block: false, But when you use shift +…
0
votes
1 answer

Changing the video src with JS after have page loaded does not work in Safari

I am trying to improve page speed on my site, and I have an 8mb autoplay video. I have been looking at loading the video after the page load. I managed to get to work in chrome, firefox, etc. but not on some versions of Safari. In some versions, I…
0
votes
2 answers

Unable to install the deepspeech library from pip. Can't find the module

I am attempting to install the Deepspeech library for Python on my Ubuntu 22.04 system. I've created a virtual environment and then run pip install deepspeech. However, all I get back is the following error: ERROR: Could not find a version that…
redmage123
  • 413
  • 8
  • 15
0
votes
1 answer

Parse the column value and save the first section in new column

I need to parse column values in a data frame and save the first parsed section in a new column if it has a parsing delimiter like "-" if not leave it empty raw_data = {'name': ['Willard Morris', 'Al Jennings', 'Omar Mullins', 'Spencer…
Marwa
  • 97
  • 7
0
votes
0 answers

is there an R function for finding the index of an element vector?

write a program that displays two table side by side (note that 1 kilogram is 2.2 pounds and that 1 pound is 0.45 kilogram) I am trying python3 in pycharm coding, I am expected the code will run and display correct result, the actual result is error…
0
votes
0 answers

In a mobile how can I let the user choose the filename and directory to download with write.table

In a shiny app how can I let the user choose the filename and directory to download with write.table
1
2