Random snippets of all sorts of code, mixed with a selection of help and advice.
Microsoft Copilot Studio Agent – Severe Latency with SharePoint Knowledge Sources (20–30s Response Times)
17 March 2026 @ 2:57 am
SharePoint Knowledge Source (50–60 documents)
I created a Copilot Studio agent with a SharePoint connector pointing to ~50–60 documents (a mix of .aspx pages and Word/PPT docs). When I ask relevant questions in the Agent Test Panel, responses take 20–25 seconds. When the agent is integrated into an application, latency climbs to ~30 seconds.
I have not found any configuration in Copilot Studio to improve this latency. The agent configuration doesn't expose obvious performance tuning knobs.
Is there any way to reduce response time for an agent grounded on 50–60 SharePoint documents? Are there configuration settings, architectural patterns, or feature toggle.
Important note: This is not purely a document-count issue. Even with only 10–15 documents, the agent still takes ~15 seconds to respond. Scaling down the knowledge source does
Tell me about c language
17 March 2026 @ 2:56 am
I want to learn the C programming language properly from the beginning. Please explain what C is, why it is important in computer science, and where it is commonly used. Also guide me on the best way to start learning C as a beginner, including the basic topics I should study first and the order in which I should learn them.
I would also like to know how I can improve my C programming skills faster through practice, projects, or problem-solving methods. Please explain some of the advanced features of C, such as pointers, memory management, structures, file handling, and dynamic memory allocation.
Finally, after learning C, which programming language should I learn next to further improve my programming and software development skills? Please suggest languages that are useful for students and developers, such as C++, Python, or Java, and explain how they help build stronger programming knowledge.
Develop a Command Interpreter for their prototype robot
17 March 2026 @ 2:31 am
You’ve been recruited by the Robotics Division to develop a Command Interpreter for their prototype robot. This robot can perform complex tasks—but only if the instructions are syntactically perfect. Your job is to write a program in the language of your choice (or adapt parse.cc) that checks whether a user-submitted instruction follows one of the five approved syntactic patterns.
If the instruction is valid, the robot will execute it. If not, your program must diagnose the error, explaining which part of the syntax is broken and why the robot would misinterpret it.
Instruction Rules/Patterns Your robot understands only the following formats: 1️⃣ <Time> <Behaviour> <Object> e.g., "2seconds push block"
2️⃣ <Object> <Colour> <Behaviour> e.g., "car red lift"
3️⃣ <Weight> <Behaviour> e.g., "heavy pull"
4️⃣ <Time> <Dir
C clang code fails on mac - with no error. Simply prints out "2", then the first two characters in a file
17 March 2026 @ 2:22 am
I can't explain the problem any further. This is literally the end of my knowledge.
What happens with the program is that it prints out "2" on a newline, then the first two characters in a file. This appears strange, because there is no obvious error with the program. I have tried simplifying my program, but it fails even in this simplified form.
I am considering giving up at this point. This isn't even a joke, I'm just not sure what's wrong with my computer that would make this code not compile correctly. (I've tried error handling - there is no error).
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
typedef int32_t i32;
int main(int argc, char **argv) {
FILE *file = fopen("Makefile", "rb");
fseek(file, SEEK_END, 0);
i32 filesize = ftell(file);
fseek(file, SEEK_SET, 0);
fprintf(stderr, "%u\n", filesize);
char *text = mal
What is the best way for a beginner to learn SQL?
17 March 2026 @ 2:17 am
I am new to the world of SQL and data analytics and would like to learn how to work within SQL and be literate in the platform to prepare myself for entry-level data analytics roles. Do you have any recommendations as to the best site or way to learn SQL and get practice?
can you help Create a memory management program using either the fifo page replacement approach or the lru approach
17 March 2026 @ 2:12 am
can you help Create a program in any programming language you wish that performs memory management using either the first in first out page replacement approach or the least recently used approach. The user should enter the sequence that the pages are called and the number of page frames in the RAM. The program should output how the pages are stored in RAM overtime in the form of a table and the page faults created. Below is just an example of how the output might be shown (this uses the random page replacement approach).
Manual code signing with ssl.com certificate
16 March 2026 @ 11:38 pm
I am trying to manually sign code with an ssl.com code certificate. I am using the Windows signtool to do the manual signing.
According to the documentation, I must first run esignerCKA.exe which will automatically import the ssl.com code signing certificates in the Windows certificate manager. This step does not appear to work, so I doubled clicked on the certificate in the esignerCKA and installed the certificate. Once I did this, I see the certificate in the Windows certificate manager.
Next, I use the Windows sign tool to manually sign the tool. The sign tool cannot find the certificate because it doesn't have a private key. According to the documentation it should get the private key from esigner.
Here are the documents on how to manually sign the code.
Has anyone successfully manually sign code using
How can we train a LLM from scractch in R with the R package torch?
16 March 2026 @ 4:39 pm
How can we train a LLM from scractch in R with the R package torch? Could you provide an example?
Achievements system for edu platform
16 March 2026 @ 3:58 pm
I want to add achievements system into my educational platform. Admin can create new achievements(so how they will be created for each user) also user must be able to pin achievements to his profile. and for now im thinking like that:
type Achievement struct{
ID
Name
Descr
Quantity //how many times user must do some action
Action
}
type UserAchievements struct{
ID
UserID
AchievementID
Quantity
Status
}
and add event listener so after action it will be recorded into db.
How can i improve this solution
How to print an image on an ESC/POS thermal printer in .NET MAUI?
16 March 2026 @ 10:13 am
I was trying to print an image using ESC/POS commands in a .NET MAUI application but the printer only prints text correctly.
Images require conversion to monochrome and ESC/POS byte format.
What is the correct workflow for converting and printing an image to an ESC/POS thermal printer in .NET MAUI?
I am building a .NET MAUI application where I need to print images (such as logos or QR codes) on a thermal receipt printer.
Most thermal printers support ESC/POS commands and require the image to be converted into a monochrome bitmap format before printing.
I want to understand the correct workflow to:
Load an image from a file or URL
Convert the image into monochrome (black & white)
Convert the image into ESC/POS compatible byte format
Send the byte array to the thermal printer
What is the recomme