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
0
votes
0 answers

How to close the child process Popen with shell = True

This is the second day I've been puzzling over it. The situation is as follows. I start the bot with the command subprocess.Popen('stater.bat',cwd='F:/1/bot/', shell=True). Everything works, but I need the ability to shut down the bot. And that's…
Xcen
  • 1
  • 2
0
votes
1 answer

Flutter TCP Socket with Python send any different string

I'm trying send data to python on flutter. But I am only send "data", ı want send different "string" but this code not working. I want to send "psk" and "ssid" string. Can you help me? import 'package:flutter/material.dart'; import…
Mesut
  • 11
  • 3
0
votes
0 answers

HTML_ERROR_IN_VS_CODE

When I run my Html code of index.html using visual studio code, it closes itself in chrome immediately when I run it, so kindly help me determine why it does that
0
votes
0 answers

Import the NLTK library and texts from the Project Gutenberg electronic text archive, take the text specified by the option

I need to process a text file chesterton-brown.txt. Determine the number of words in the text. Identify the 10 most frequently used words in the text, build a bar chart based on these data. Remove stop words and punctuation from the text, then again…
Dima
  • 1
0
votes
2 answers

grouping values in pandas column

I have a pandas dataframe that contain score such as score 0.1 0.15 0.2 0.3 0.35 0.4 0.5 etc I want to group these value into the gorups of 0.2 so if score is between 0.1 or 0.2 the value for this row in sore will be 0.2 if…
Krish
  • 33
  • 5
0
votes
1 answer

fixed-width font (usually Courier) in htm

i'm, new on learning html (for front-end) i encountered with a subject that includes fixed-width font (usually Courier) in some web pages like w3schools.So after seraching alot, i couldn't find a good answer for that.Can anyone explain it with an…
Mahdi
  • 9
  • 2
-1
votes
0 answers

I dont understand how to patch same name methods with harmony

I have two methods with same names public static List GetPlayers() { return GetPlayers(); } public static List GetPlayers() where T : IPlayer { if (!FactoryManager.FactoryTypes.TryGetValue(typeof(T), out var value)) …
ART0022VI
  • 63
  • 4
-1
votes
1 answer

How do I make my discord bot (Discord.js v14.9.0) shutdown, while it's using PM2 Asked today?

I am trying to make a kill switch for my Discord Bot that uses PM2 to keep it running. After I use the command, PM2 just restarts the bot. How do I kill the process until I restart it manually? try to best experimentand expecting best suggestions
-1
votes
1 answer

Regex that captures all characters except "^"

I have the following problem: I want a regex to capture all characters in a paragraph that contains "#flashcard" and a string after a line break that starts with a "^" sign. E.g., lorem ipsum #flashcard ^4599993 However, the regex should…
Val Chus
  • 11
  • 1
-1
votes
1 answer

Reset from Port to internal components connection

I have a Module consisting from another module. e.g. entity Layer is port ( CLK: IN std_logic; -- Clock DIN: IN std_logic; RST: IN std_logic -- Reset ); -- Data end Layer; architecture Behavioral Layer is component MVM port ( CLK: IN std_logic;…
hajo
  • 314
  • 1
  • 4
  • 12
-2
votes
1 answer

How do I print const char?

#include using namespace std; int main() { int age = 20; const char* pDept = "electronics"; cout << age << " " << pDept; } The above code is normal. Why shouldn't I use cout << *pDept instead of cout << pDept above?
-3
votes
2 answers

How to create a QR code of the content in

using qrious?

I am trying to include a QR code in a Bill design that I am creating using qrious.js ALL the examples on the internet use live text input to create the QR code, while I want a QR of the static text that I want. Please give some possible solutions.
1
2