It's in the main question snippet. Match everything not preceeded by @:test(
What specific exclusion are you trying to do? Can you give some examples of what should match and what shouldn't?
I wonder how his indexing went. I have the same problem on my dictionary I just started, unscramble.com but I plan to keep adding to it. How do you keep adding to a dictionary when it is done. Add thesaurus? Or just create content related to dictionaries like news?
apkgurug is a platform that provides all kinds of updated Android & iOS APK mod versions, possibly<a href=" https://apkgurug.com/ > unlocked apps you need for Android targeted apk downloading apps or games.
When I first started learning to program, I don't even start with any mainstream programming language. I still remember fondly the Mediachance Multimedia Builder (MMB), it was the first thing that I learned back in 2012. It's a software that lets you create an app mainly for "autorun" for CD and thumb drive. It offers a simple to use and WYSIWYG editor and close to no coding skill to build an app. But it has a scripting support to create more complicated logic. This were my first experience with writing code.
As time progress, I learned HTML and CSS with Microsoft FrontPage 2003, then Adobe Dreamweaver CS5. Back then jQuery was the SOTA library for creating web apps. I also learned a bit about PHP but never really liked it.
Then I started learning about Visual Basic in Microsoft Office (VBA) and then I stumbled upon Visual Basic 6.0 where I can create a more "proper program" so to say. Windows Forms was my new toy. VB6 was already outdated in 2015, and I stared exploring .NET Framework 4.0 and Visual Studio 2010 Express. Back then there was no VS Community Edition and .NET is still a proprietary, compared to .NET 10 now which is open source. Various websites such as Stackoverflow, CodeProject, VBForums, CodePlex (now gone), Planet Source Code (now gone), random blogs, and MSDN (now MS Learn) were my primary source of learning materials. I also liked O'Reilly books as it provides a more concrete example of how things are done from an expert point of view (compared to random blogs).
I still used VB.NET until I changed to C# in late 2017. Then I got my first job in 2019 and was quite shocked to learn that I were assigned to a team with NodeJS as the main framework as I don't have any experience with it. My previous experience with reading technical blogs and documentations proved to be invaluable for my career. It allows me to learn new stuff quickly and adapt to strange areas such as web development using React/Vue (crazy gibberish: JSX)
My way of learning:
I remember switching from framework to framework, library to library, language to language, database to database. I never completely finished the project, but the journey learning various language, framework, libraries, and databases is the most fun thing about learning to program.
I argue that it is harder to start learning programming now even with abundance of resources, because the technological advancement and AI have gone so far that it is hard to learn the basics to the current industry standard. It would take a huge amount of time and efforts to understand the nuances of why certain application use X or Y approach. I still struggle when changing job because the tech stack is constantly changing.
If you're feeling lost and overwhelmed with the amount of information you need to learn, you're not alone. All great programmers have gone through similar process. I think having a mentor would be the best way to learn. Keep up the good work.
Rasp Pi 5 peeps:
if your page size is 16, then use this https://hub.docker.com/r/haktansuren/qdrant-pi5-fixed-jemalloc
hope it helps!
You can’t. I’m on iPad so I can’t do it
You can create a wrapper with any structure you wish. Declare interfaces with the contract you want, create concrete implementations which call the library appropriately, and use your interfaces in lieu of the library classes throughout the project where possible. This is arguably good practice even when the library classes are "well designed", for reasons including improved maintainability and separation of concerns.
just copy and paste and rename under here C:\Program Files\gs\gs10.06.0\bin\
copy this gswin64c.exe and paste it there and rename the copy to gs.exe then ur good to go gs.exe → ghostscript gswin64c.exe → original
dont forget to add this C:\Program Files\gs\gs10.06.0\bin\ in ur enviroment variables path
Udemy, YouTube ... educational video services.
I have a repository that reproduces the Pascal Unified Memory demand-paging behavior described in Robert Crovella’s accepted answer, created on a physical GTX 1080 system using CUDA 12.0 tooling.
https://github.com/parallelArchitect/pascal-um-benchmark
I encountered this problem as well. My problem was caused by one of the vars is an empty string. You might want to check the vars before using them.
In your case, you also have another problem which is you should either use token or image. No need to use all of them, can be seen in their source code caprover/deploy-from-github
@Mohit thanks for the answer - can I then do manual overload resolution, i.e., given a type, can I deduce which overload from an overload set would be used?
It's for ABI versioning. See the definitions of those macros.
within a single clang-tidy run you cannot “re‑parse” the already-modified expression and get a new AST; clang-tidy analyses the original AST only, and your fixes are just textual replacements applied afterwards.
were you able to succeed with the same as I'm facing same errors?
This question makes me feel 30 years older immediately. So there are already people who don't know that books, www, youtube exists? And that happened in just 3 years? How did you learn stuff in school?
One of the first steps might be to view ChatGPT less as a source of quasi-autoritative learning material, and more as a tool that can help you figure out what to search for elsewhere. Looking up information ("google-fu") was one of the core skills before AI came along, and it still is. AI can be helpful, but it can also "hallucinate", as they say. This is because any LLM today is essentially making up a statistically plausible answer to your question/prompt - it's just that it's so good at it that it works a lot of the time. Strive to make Chat GPT (or Copilot, or whatever) just one of the tools in your toolbox, rather than the tool.
If you must use AI to generate code, then don't generate the bits you want to learn. Generate the supporting scaffolding code that you don't care about, but write the stuff you want to learn yourself. Yes, it will not be perfect, it might not even be just OK, but that's the point - you learn the most (and retain that knowledge the longest) by making your own mistakes, and by grappling with the problem, by getting stuck and then pushing through. By making a mess, then throwing it away and doing it again, but a bit better, cause you obtained some insight in the process.
Don't settle for easy answers. Instead, try to understand the "why" behind things. There's a lot of advice out there, design principles, "best practices", and a lot of what you'll find will be contradictory, poorly explained and apparently unmotivated. But do your best to figure out what the main points are, and what the reasoning behind it all is, and accumulate that understanding over time. Be aware that not every such principle or advice applies in every situation, and that "best practices" is a bit of a misnomer - for a lot of things, there are no truly best practices, only practices that work pretty well under certain conditions/assumptions. Therefore, building this understanding will be a challenging, long process, and you have to be OK with that.
Read as much as you can (books, articles, blogs, computer science papers), listen to talks (many conference talks are freely available on YouTube), etc. Many of these conference speakers have technical blogs, some have a YouTube channel, some of them have written books - so if you find someone who seems knowledgeable and is good at explaining things, look them up. Also, a lot of problems you'll encounter, people have encountered before, so if you just google the issue, you'll often find a stackoverflow question about something similar, and sometimes, answers will be surprisingly in-depth and information-packed. And don't limit yourself to your particular niche, and your particular programming language. There are valuable insights to be obtained from folks who are doing other things in other languages. These will recontextualize your knowledge and expand your horizons. Do learn at least a little bit about the low level stuff - what compilers actually do, how are things represented in memory, what memory looks like in modern computer architectures, etc.
Blogs and articles (and sometimes even documentation) will have links to other blogs and articles, and books, papers and Wikipedia articles will have references to other books and papers, so just follow the bread crumbs. Some bloggers will even have a page with recommended reading material. And, ChatGPT and Copilot can point you to sources of information as well, and search the web for you (although sometimes they will randomly claim they can't access the web, or will make up links, but that's just how it is with these services). You can find important insight even in old and "outdated" books and papers, so don't dismiss them. Some things in them no longer apply, but many do. Some of these older books are available for free on archive.org. Some books and papers, old or new, might come up in a google search, available as PDFs hosted on various university sites, or elsewhere. Papers might be available on arXiv.org, academia.edu, or personal pages of researches. Also, conferences will sometimes publish slides from past talks.
Another thing that's going to supercharge your learning is teaching others - there's always someone who has yet to learn what you have learned, and trying to answer their questions is going to reveal to yourself holes in your own understanding, and you'll want to patch them up cause you'll be invested in providing a good answer. The next thing you know, you're digging through blog posts, discussions, books, and writing code just to clarify something for your own sake.
"My go-to workflow is to ask Chat-GPT what's the best tech stack and then type out the sample project they provide"
That will get you started, but you'll learn very little by just typing things out. What you need to do is set for yourself small challenges that are just outside of your comfort zone, and attempt them. Something that you think you could tackle, but aren't quite sure yet how to do it. These can then turn into interesting side projects. You can learn a lot by reading, but you can learn more by doing - by trying things out, by testing ideas. And don't get discouraged if it's a bit of a struggle. Learn to be comfortable at the edge of the unknown. Try something out. Do an experiment, see what happens. If you get stuck, take a break, try again. It's even fine if you get so stuck that you feel kind of stupid, cause once you manage to figure it out, you'll be over the moon and it will all be worth it. All that is just how learning is - it's all perfectly normal.
And when you do figure it out, don't stop there. Go a few extra steps and try to improve it further in some way. Maybe clarity would be improved if you extracted some bit of code into a separate function. Maybe you can generalize your current algorithm so that it can work in a wider range of situations. Maybe you can tweak two seemingly different functions so that they look the same - then replace them with a single one. Maybe you find a way to simplify the code, and this then opens up possibilities you didn't see before, etc.
Also, don't worry too much the "best tech stack". That isn't so important, and will change over time - frameworks come and go. Yeah, you'll need to learn a few of those for your job, but over time you'll realize that they all fall into a small number of different categories, and you'll be able to pick up new ones easier because of familiarity with some other framework you've used before. And as convenient as they can be, they are also often a bloated mess designed to cover a range of use cases. Try also building something without them. Figure out what the minimal version of the application looks like, then play around with that - start small, then add features. This will give you some idea as to what the core of the application is, without all the distracting fancy bits. This might help inform how to make a better use of the full-blown framework, how to customize it, etc., cause it'll now seem a little less like magic.
Finally, find documentation for your tools (libraries, frameworks), and learn how to utilize it. Official stuff and popular libraries and frameworks will usually have a dedicated website, with technical documentation, various tutorials, a "getting started" page. In some cases, it'll be a website that's not official but is everyone's go-to site. Smaller or less widely used libraries might just have a README.md on GitHub. You can also find things like starter project templates and "architecture skeletons" on GitHib, though YMMV with these.
What you do want to pay closer attention to is the standard library of your language - have mastery of the most frequently used things, core data structures and algorithms, and then have some idea of what else the library provides (as in, what is it for), and where to find those things if and when you need them. Often, you can make your code simpler and more elegant by utilizing the standard library.
And don't get carried away too much by the fancy stuff. Focus on the fundamentals, and learn them well, and revisit them from time to time. Everything else stems from there.
declare @op char(1)
if (select count(*) from deleted) = 0
set @op = 'I'
else if (select count(*) from inserted) = 0
set @op = 'D'
else
set @op = 'U'
Not an answer to your (already answered) question, but a different approach to your menu.
Instead of handcrafting a menu, an easy way to provide a selection in PowerShell is to use the underrated Out-GridView.
By default, it will just show whatever it is told to show, and the script will continue.
But with the -PassThru or the -OutputMode parameter, it will wait for the user to select something, and return the row(s) selected.
So your menu part of the script could look like this:
# Multiple distinct log folders found
Write-Host "Multiple script directories were found in the command list."
Write-Host "Please select one in the form that just popped up."
$chosenLogFolder = $uniqueLogFolders | Out-GridView -Title "$($MyInvocation.MyCommand.Name): found multiple script directories; select one to use for logging:" -OutputMode Single
If (-not $chosenLogFolder) {
Write-Warning 'No folder selected, aborting.'
Return
}
I think this is just a constraint with the current models, but would be happy to be proven otherwise. As far as LLMs go, they cannot be creative, they will, as for now atleast, always only transform already known content. Maybe you can try extracting certain topics and concepts and then try to let the model combine them to create more demanding and creative problems?
On Manjaro as of Nov 2025, the default gcc version is 15.2.1 and it does not work well with old ruby versions. To install ruby 2.1.9, I needed to do two things:
Install gcc-5 with yay -S gcc5
Run install command with setting environment variable CC=/usr/bin/gcc-5 rbenv install 2.1.9
Have you seen https://github.com/microsoft/vscode-platform-specific-sample/tree/main and https://code.visualstudio.com/api/working-with-extensions/publishing-extension#platformspecific-extensions for platform-specific extensions?
input() takes input from the console (stdin) and you can store it in a variable. You can also pass a string as an argument and it will print it out before waiting for input. After the Enter key is pressed, you can do whatever you want with this variable in the if statements.
The traefik config without the webserver docker-compose is only half of the problem.
It doesn't explain why the TYPO3 folder isn't accessible.
I have run into the same problem with flet-ads, but running on android
Compatibility with compilers that don’t support namespaces.
I don't think anyone will be able to help you with this unless you can produce a single, clear question with details. Maybe a discussion group or chatroom would suit you better?
Late as it might be, I was having the same issue, I have found the solution to this is that the Serial2 initialization is the problem. Here is my code, just make sure the fingerprint is initialized after the Serial2 on ESP32.
#include <Adafruit_Fingerprint.h>
#include <Arduino.h>
Adafruit_Fingerprint *finger;
uint8_t id;
uint8_t getFingerprintEnroll() {
int p = -1;
Serial.print("Waiting for valid finger to enroll as #");
Serial.println(id);
while (p != FINGERPRINT_OK) {
p = finger->getImage();
switch (p) {
case FINGERPRINT_OK:
Serial.println("Image taken");
break;
case FINGERPRINT_NOFINGER:
break;
case FINGERPRINT_PACKETRECIEVEERR:
Serial.println("Communication error");
break;
case FINGERPRINT_IMAGEFAIL:
Serial.println("Imaging error");
break;
default:
Serial.println("Unknown error");
break;
}
}
// OK success!
p = finger->image2Tz(1);
switch (p) {
case FINGERPRINT_OK:
Serial.println("Image converted");
break;
case FINGERPRINT_IMAGEMESS:
Serial.println("Image too messy");
return p;
case FINGERPRINT_PACKETRECIEVEERR:
Serial.println("Communication error");
return p;
case FINGERPRINT_FEATUREFAIL:
Serial.println("Could not find fingerprint features");
return p;
case FINGERPRINT_INVALIDIMAGE:
Serial.println("Could not find fingerprint features");
return p;
default:
Serial.println("Unknown error");
return p;
}
Serial.println("Remove finger");
delay(2000);
p = 0;
while (p != FINGERPRINT_NOFINGER) {
p = finger->getImage();
}
Serial.print("ID ");
Serial.println(id);
p = -1;
Serial.println("Place same finger again");
while (p != FINGERPRINT_OK) {
p = finger->getImage();
switch (p) {
case FINGERPRINT_OK:
Serial.println("Image taken");
break;
case FINGERPRINT_NOFINGER:
break;
case FINGERPRINT_PACKETRECIEVEERR:
Serial.println("Communication error");
break;
case FINGERPRINT_IMAGEFAIL:
Serial.println("Imaging error");
break;
default:
Serial.println("Unknown error");
break;
}
}
// OK success!
p = finger->image2Tz(2);
switch (p) {
case FINGERPRINT_OK:
Serial.println("Image converted");
break;
case FINGERPRINT_IMAGEMESS:
Serial.println("Image too messy");
return p;
case FINGERPRINT_PACKETRECIEVEERR:
Serial.println("Communication error");
return p;
case FINGERPRINT_FEATUREFAIL:
Serial.println("Could not find fingerprint features");
return p;
case FINGERPRINT_INVALIDIMAGE:
Serial.println("Could not find fingerprint features");
return p;
default:
Serial.println("Unknown error");
return p;
}
// OK converted!
Serial.print("Creating model for #");
Serial.println(id);
p = finger->createModel();
if (p == FINGERPRINT_OK) {
Serial.println("Prints matched!");
} else if (p == FINGERPRINT_PACKETRECIEVEERR) {
Serial.println("Communication error");
return p;
} else if (p == FINGERPRINT_ENROLLMISMATCH) {
Serial.println("Fingerprints did not match");
return p;
} else {
Serial.println("Unknown error");
return p;
}
Serial.print("ID ");
Serial.println(id);
p = finger->storeModel(id);
if (p == FINGERPRINT_OK) {
Serial.println("Stored!");
} else if (p == FINGERPRINT_PACKETRECIEVEERR) {
Serial.println("Communication error");
return p;
} else if (p == FINGERPRINT_BADLOCATION) {
Serial.println("Could not store in that location");
return p;
} else if (p == FINGERPRINT_FLASHERR) {
Serial.println("Error writing to flash");
return p;
} else {
Serial.println("Unknown error");
return p;
}
return -1;
}
void setup() {
Serial.begin(115200);
Serial2.begin(57600, SERIAL_8N1, 17, 16);
while (!Serial)
; // For Yun/Leo/Micro/Zero/...
delay(100);
Serial.println("\n\nAdafruit Fingerprint sensor enrollment");
// set the data rate for the sensor serial port
finger = new Adafruit_Fingerprint(&Serial2);
finger->begin(57600);
if (finger->verifyPassword()) {
Serial.println("Found fingerprint sensor!");
} else {
Serial.println("Did not find fingerprint sensor :(");
while (1) {
delay(1);
}
}
}
uint8_t readnumber(void) {
uint8_t num = 0;
while (num == 0) {
while (!Serial.available())
;
num = Serial.parseInt();
}
return num;
}
void loop() // run over and over again
{
Serial.println("Ready to enroll a fingerprint!");
Serial.println("Please type in the ID # (from 1 to 127) you want to save "
"this finger as...");
id = readnumber();
if (id == 0) { // ID #0 not allowed, try again!
return;
}
Serial.print("Enrolling ID #");
Serial.println(id);
while (!getFingerprintEnroll())
;
}
add this in the top of you CMakeLists.txt
set(CMAKE_AUTOUIC_SEARCH_PATHS "YOURPATH")
This is the solution I have come up with after implementing everyone's input in case someone else runs into a similar problem.
Starting with the student table:
| registration Number | firstName | lastName | dateofBirth | password | idGroup |
|---|
The updated addStudent function with SQL injection safety (Thanks for the clarification Tim Moore) :
public boolean addStudent( Student s) throws SQLException {
String request="INSERT INTO student values (?,?,?,?,?,?);";
PreparedStatement pst=myConnection.getMyConnection().prepareStatement(request);
pst.setString(1, s.getRegistrationNumber());
pst.setString(2, s.getFirstName());
pst.setString(3, s.getLastName());
pst.setDate(4, s.getDateOfBirth());
pst.setString(5, s.getPassword());
pst.setInt(6, s.getGroup().getIdGroup());
return pst.executeUpdate()>0;
}
s.getGroup().getIdGroup() saves the student's group to the foreign key idGroup.
I have same problem. I switched to Laragon and still. If I also use Filament, I see 10 secs loading times.
You have to use v1.0.2 (You can downgrade even further but do not upgrade) as the socket needs compatible client-server version which is mentioned in the package documentation.
and Welcome to Stack Overflow. auth.expo.io and expo-auth-session are no longer reliable and usable, and instead you should use @react-native-google-signin/google-signin. Here is a link to another, similar, Stack Overflow post that I have given a successful answer to; read that link for more details.
I need an answer to this also.
If you want debugger behavior:
Attach as a debugger
Use hardware data breakpoints to monitor the 8 variables
If 4 registers are not enough - dynamically swap/watch only the ones currently in scope or important
For 32-bit processes this approach works well and is widely used.
Those log lines come from Celery’s startup logging; they show some built‑in tasks (group, xmap, backend_cleanup) being registered and are safe to hide.stackoverflow+1​
If you just want Celery to shut up, start your worker with a higher log level, for example:
bash
celery -A your_project worker -l WARNING
or in celery.py / settings, set:
python
worker_hijack_root_logger = False
and then configure your own logging (so you don’t log at INFO for Celery’s root logger).celeryq+1​
If you’re using Django and django-celery, make sure your Django logging config either:
sets Celery loggers to WARNING or above, or
disables propagation for celery loggers so those startup messages are not printed.
You can access elements in several different ways. This link covers all access methods supported by nlohmann::json. Below, I’ll explain in short using the same example you have provided:
// Source - https://stackoverflow.com/q/38099308
// Posted by Jeremy Kuah
// Retrieved 2025-11-30, License - CC BY-SA 3.0
{
"active" : false,
"list1" : ["A", "B", "C"],
"objList" : [
{
"key1" : "value1",
"key2" : [ 0, 1 ]
}
]
}
Using operator[]: This works similar to accessing elements in a std::map. For example, to read the value of "active", you can just write json["active"] (assuming your JSON object is named json). To access the first element of "list1", you can index into it like this: json["list1"][0].
using at(): Similar to above, use .at() instead of []. For eg, json.at("active") or something like json.at("list1").at(0).
using value(): This method is useful because it first checks whether the key exists. If the key is missing, you can provide a default value that will be returned instead. For example, json.value("active", true) will return the actual value of "active", while json.value("notSoActive", true) will return the default value true since the key doesn’t exist. Bonus tip: If I have to do the same thing using the above [] operator, I can do it this way:
try
{
auto& returnValue = json["notSoActive"];
}
catch (const json::out_of_range& e)
{
std::cout << "message: " << e.what() << '\n'
<< "exception id: " << e.id << std::endl; // return the default value
}
how would you get started on that kind of project?
a messaging app with a front end in React-Native and a backend in Go.
Use google. Type in google what you want to learn and read what it has to offer.
For react-native: https://www.google.com/search?client=firefox-b-d&q=react-native+tutorial -> https://www.tutorialspoint.com/react_native/index.htm https://reactnative.dev/docs/getting-started
For go: https://www.google.com/search?client=firefox-b-d&q=go+tutorial -> https://go.dev/doc/tutorial/getting-started https://go.dev/doc/tutorial/
Find similar applications and read their source code.
React native example frontend: https://www.google.com/search?client=firefox-b-d&q=react+native+messageing+app+github -> https://github.com/Ctere1/react-native-chat
Go backend example: https://www.google.com/search?q=go+web+backend+github -> https://github.com/amitshekhariitbhu/go-backend-clean-architecture
Basically just answering the same as some people, but if you wanna learn without ai, get into documentation of your favorite language/library/tech stack.
Documentation can sometimes get you out of doubt when some weird error occurs, you can also use stackoverflow or even forums to find out when you have some of those weird errors
Embrace autonomy, not dependency
import numpy as np
from scipy.io.wavfile import write
sr = 44100
duration = 10
t = np.linspace(0, duration, int(sr*duration), endpoint=False)
bass = 0.3*np.sin(2*np.pi*55*t)
kick = 0.6*(np.sin(2*np.pi*60*t)*(t%0.5<0.05))
hat = 0.2*(np.random.randn(len(t))*(t%0.25<0.01))
mel = 0.15*np.sin(2*np.pi*440*(1+0.2*np.sin(2*np.pi*2*t))*t)
audio = bass + kick + hat + mel
audio = np.clip(audio, -1, 1)
path = "/mnt/data/phonk_beat.wav"
write(path, sr, (audio*32767).astype(np.int16))
path
I had same problem, but my widget was public. And i was using it in React App. I had to move script into index.html file to make it work, instead of placing it in Component or a Page. Hope it helps someone.
As someone who has been coding and learning to code for about 30 years: If you know what you need to figure out, there are lots of approaches. (Documentation, web search, stack overflow, textbooks, etc.) But if you don't know what you don't know, and you are looking at a very broad question like "How do I decide what web framework to use? What frameworks even exist?" I think asking AI is a good place to start. For those kinds of questions, the previous state of the art was "find someone knowledgeable and get them to teach you", or "google around and hope someone has written something good about it (and that it's not secretly spam advertising their own framework)", or "post on stack overflow, and hope your question doesn't get closed as 'too broad'". For asking very open-ended vague questions, trying to rapidly get up to speed in an area you know little about, such that you don't even know what you don't know, AI can be hard to beat. (Especially for areas like frontend development, which the AIs know pretty well.)
Apparently I can't delete the thread despite it being in error. I have flagged it for moderator attention. As such, please due not reply to this thread do it being in error. The correct question can be found at CLGeocoder deprecation: How can I obtain geocoding bounds in MapKit?.
I don't want to just code it for you. I will give you a step by step what you need to do. Also, you're answer is cut off. According to the tag it says C#. So I am going to give relevant C# stack overflow links.
Get the PDF's How to read an entire file to a string using C#?
Run the PDF's through a base64 converter. https://stackoverflow.com/a/25919641/24903843
Insert the data into an sql database SQL Insert Query Using C# This assumes that you know the basics of sql if you don't then read w3schools
Best of luck. In order to solve this problem you just have to break it down into steps and solve each one, one by one.
Think I got it ported over now: CLGeocoder deprecation: How can I obtain geocoding bounds in MapKit?
Going to delete this thread since I had posted under the wrong category.
My apologies, I thought I was posting a question and we had to specify what type of question we were asking. Looks like there's been a change to the Stack Overflow formats, can you link to a meta that explains this?
This should be posted as a regular stack overflow question, not as an "Advice" question.
Current directory on mysql shell point to the $datadir.
On mysql shell: SHOW VARIABLES LIKE 'datadir';
On bash: pwdx $(pidof mysqld)
I usually just use a file manager from the app store. Some are much better than others.
Also, ios has the "Connect to server" option which is very useful built-in to its own file manager. When I use that I just browse the shared content on whatever device I'm connected to. You can copy and paste files from the server to your ios device as well. I'm not sure how to edit them, like a text file, due to permissions (I think).
That's kind of like showing your friend pictures from a zoo and asking not just "what animals are these" (which your friend could probably answer pretty accurately) but instead asking "why does the zoo have three elephants, what are their names, what do they eat, and how did they transport them to the zoo?"
Basically, looking at raw data is not enough to answer all of those questions, so any answer you do get would be a guess and would most likely be wrong.
saya sudah terbiasa dengan langsung menyalin tanpa melihat kode html
You can generate CSS based on animate.style directly on css.makeup
I would recommend using the mediawiki api which is supported by fandom to do this task. Perhaps wikitext is easier to parse than html for this usecase you're talking about. I can't really tell what opperation you're trying to do but whatever it is it's probably easier to do it on the markdown format of wikitext instead of plain html.
I got the api endpoint above from reading this page (method 3) on the mediawiki api documentation https://www.mediawiki.org/wiki/API:Get_the_contents_of_a_page
i know, its was asked 9 years ago but, i think using explode may help.
something like
exploded = df.explode("genre")
exploded[exploded["genre"] == "comedy"]
I think its very usful to expand the line for each genre
import java.math.BigInteger;
BigInteger sum = BigInteger.ZERO;
for (int i = 0; i < n; i++) {
BigInteger val = sc.nextBigInteger();
sum = sum.add(val);
}
System.out.println(sum);
I taught myself computer programming before AI became mainstream, and I still elect to avoid using AI tools because I know they can be unreliable or introduce security vulnerabilities if their output is not inspected closely. Often the process of auditing AI code offsets any productivity gains it provides, so I commend you for your desire to actually learn how to code.
Every programmer's journey will be different, and what works for one person may not work for everyone, but I will share my experience here in the hopes that it will be useful.
I first learned about programming when I was given an Arduino Uno as a kid because I wanted to build robots and LED displays. I started by reading the official Arduino book, then modifying those examples in the IDE and running my own code. Eventually, after lots of iterative testing and research on Github and blogs, I had gone from my first program ("sketch", as they are called in the Arduino world) which simply flashed a red, green, and blue LED alternately in sequence, to displaying custom graphics on a 32x32 LED matrix and even playing text-to-speech files over an 8Ω speaker. Today, I don't do much with hardware anymore as I now am developing apps for iOS.
What matters here in my opinion isn't the particular resources or technologies used, but rather finding a project you are passionate about and then starting from the smallest possible unit. If that's writing a server in Go, start with the net/http documentation and a simple 'Hello World'-style script (such as this server), then work on adding your own application specific methods and eventually adding HTTPS support. If your goal is writing a messaging application, perhaps start with learning how to build a beautiful user interface with React (again, building step by step and adding complexity iteratively rather than all at once). Then, after you have something working, try to make it interface with your backend server, perhaps starting off with a simple mock "echo" server that simply replies with your text before moving on to handle user management, encryption, etc.
I personally find that this method of small steps makes learning more accessible and engaging. Seeing an application slowly develop over time is a much better motivator than trying to do everything all at once, and then spending hours debugging. And if you do choose this approach, it is important to augment it with continuous learning so you are aware of potential pitfalls such as security vulnerabilities, UI bugs, and (especially in the case of Go) concurrency-related problems such as deadlock. However, be warned that many of these issues may seem very abstract and/or unlikely (at least they did for me), but once your first Go program dies in deadlock you will quickly see the importance of these essential considerations. And that is something that AI can't do for you (at least right now): The AI will always generate code that looks correct, but it will be far less obvious if something has gone wrong than if you have built iteratively step-by-step and know exactly which line of code caused the undesirable behavior.
That also helps you generate a minimal reproducible example, which is essential for getting help on Stack Overflow. Never underestimate the power of this forum for learning programming &em; a simple web search of your problem or question will often reveal many Stack Overflow questions, and reading through these and the answers is an invaluable debugging resource, especially when you are first learning. And by doing this, you significantly reduce the likelihood of asking a duplicate question which may get closed and/or downvoted.
In summary, start small. Learn from books, official documentation, blogs (but make sure they're from real people, as "AI slop" becomes more prevalent every day), and leverage web searches and forums for debugging. Build a simple project iteratively, and add complexity as you go. Fix bugs as they occur, but also proactively educate yourself on the bugs that can arise so they are less likely to so. Don't try to learn everything at once, and don't expect your first application to do everything you want it to right away. Know that debugging sessions can be confusing and frustrating at first, but recognize they are an essential part of the programming experience. And don't hesitate to ask for help on Stack Overflow when you get stuck.
Most of all, have fun with the process, and welcome to the community!
A quick rule of thumb is: do you have all the information required for whatever you want to do in both contexts? If you only have it when you make the call then it's pretty clear: go for callbacks. Else I would stick with events.
It looks like my .clangd file was massively overcomplicated. It seems to work with just this...
CompileFlags:
CompilationDatabase: build
The np.real_if_close function can be useful here.
Make sure to disable Single-click to open items option in File explorer setting.
You can use WebDAV instead of FTP. I’ve built an iOS app that can run a WebDAV server directly on your phone, and also works as a WebDAV client/browser for accessing WebDAV servers. apps.apple.com/us/app/zwind-webdav-server/id6755239096
Yes, you can. I’ve built an iOS app that can run a WebDAV server directly on your phone, and also works as a WebDAV client/browser for accessing WebDAV servers. apps.apple.com/us/app/zwind-webdav-server/id6755239096
You can implement a HTTP web server. I’ve built an iOS app that can run a WebDAV server directly on your phone, and also works as a WebDAV client/browser for accessing WebDAV servers. Zwind - WebDAV server: https://apps.apple.com/us/app/zwind-webdav-server/id6755239096
No limitations. I’ve built an iOS app that can run a WebDAV server directly on your phone, and also works as a WebDAV client/browser for accessing WebDAV servers. Zwind - WebDAV server: https://apps.apple.com/us/app/zwind-webdav-server/id6755239096
Yes, indexes are updated immediately and visiblity is the same as the collection: uncommitted changes visible only by your transaction, until commit where it is visible by all. It's different with Atlas Search indexes (text and vector) but you are using regular index.
https://dev.to/manujdixit/how-to-upgrade-to-prisma-v7-zero-confusion-guide-2ljd
i had already tried to cover the whole migration process in this blog
check this
and if i dont have any access to root path in my server?
A. Open the iOS project
In your project root folder, open the "ios" directory.
Open the .xcworkspace file (not the .xcodeproj).
Xcode will open the project normally.
B. Create a new target
In the left Project Navigator, click the project name at the top.
You will see two sections: PROJECT and TARGETS.
In the TARGETS section, click the small "+" button.
Choose the same App template used by your main target.
Name the new target something like "MyApp-Test".
(You can rename it later by selecting it and pressing Enter.)
This creates a second, separate app.
C. Set a unique Bundle Identifier
Select the new target.
Open the "General" tab.
In the Identity section, set a unique bundle identifier, for example:
com.username.myapptest
Every bundle ID must be unique, otherwise iOS will not allow both apps to be installed.
D. Create a separate Info.plist (you may see in Xcode just "Info")
Xcode sometimes duplicates the plist automatically (find something like MyApp-Test-Info.plist). If not:
Find the original Info.plist in the navigator.
Right-click → Duplicate.
Rename the duplicate to something like "MyApp-Test-Info.plist".
E. Update the new MyApp-Test-Info.plist
Open the duplicated plist and update these fields:
Bundle display name = MyApp-Test
Bundle name = MyApp-Test
This is the name that appears under the app icon and in App Store Connect.
F. Assign the new plist file to the new target
Select the new target.
Go to Build Settings.
Scroll to the Packaging section.
Set "Info.plist File" to the new file name (for example: MyApp-Test-Info.plist).
Also verify that "Bundle Display Name" matches your chosen app name.
G. Configure Signing
Select the new target.
Open the Signing & Capabilities tab.
Enable "Automatically manage signing".
Choose your Team.
Ensure that the Bundle Identifier matches the value you set in step C.
H. Building the correct target
If you use Expo, run this first in your project root:
npx expo prebuild
Then in Xcode:
In the top toolbar, to the right of the Run button (and next to the device/simulator selector), open the Scheme menu.
Choose the scheme that corresponds to the new target (MyApp-Test).
This determines which target and bundle identifier Xcode will build.
I. Archive and upload
In the Xcode menu: Product → Archive.
When the Organizer window appears, select the new archive.
Click "Distribute App".
Choose "App Store Connect".
Choose "Upload".
Complete the upload steps.
Use TestFlight app on the phone.
The new build will appear in App Store Connect under TestFlight, and because it uses a different bundle ID and display name, it installs alongside the development version without overwriting it.
This process allows both app versions (dev and test) to coexist on the same device.
You need to understand the difference between the following concepts:
As others already have mentioned, IDs have to be unique on your page. You can read more about why here.
In short: Selecting via ID will always return ONE element, no matter if you use getElementById or querySelectorAll. What might be confusing is, that CSS does not care and will always apply the style to all elements with the same ID. You can check the following snippet and play around with the concept:
https://jsfiddle.net/wt6sna8c/2/
Classes however can be reused however often you want.
You can read more about when to use classes and when to use IDs here.
Classes are always selected with a prefix of .. Meaning if you want to select an element with the class "myclass" you would need .myclass as the CSS selector. IDs on the other hand are selected with the prefix #. In your example the selector for ONE element with the id="ss" would be #ss.
These CSS selectors are also used in JavaScript code. The function, that you use, document.querySelectorAll("..."); takes a CSS selector as an argument and returns all matching elements. However, as mentioned, since IDs have to be unique it will always return 0-1 elements if you select via ID, even if you use the function select all.
To fix your code just replace the assignment of id="ss" to class="ss" and use the correct selector prefix in your JS. Here is how that would look like:
https://jsfiddle.net/ma2v1h4n/1
I advise you to play around with selectors and read up on it a bit yourself so you properly understand the concept.
Edit:
As @trincot correctly mentioned your current code actually looks for <ss> tags. Maybe, with that information, you could tell me how you could make the code run as expected without using classes or ids?
The folder reactpress/config/src/ is empty
ReactPress tries to compile TypeScript config files with:
tsc src/*.ts
…but since there are no .ts files inside /config/src, the build script fails.
This is a known bug in ReactPress v1.6.0.
Fix 1 — Create an empty TypeScript file
This is the easiest fix and works immediately.
Inside:
reactpress/config/src/
Create a file named:
index.ts
It can be empty or contain:
export {};
Then run:
pnpm run dev
âś” Build passes
âś” ReactPress starts
âś” No impact on functionality
Fix 2 — Change the config build command to avoid wildcard
Open:
reactpress/config/package.json
Find this line:
"build": "tsc src/*.ts --outDir lib --skipLibCheck --declaration"
Replace it with:
"build": "tsc --project tsconfig.json"
Or simply:
"build": "tsc"
Then run:
pnpm run dev
âś” Works even if src/ is empty
âś” Correct TypeScript behavior
Fix 3 — Copy missing config files from a working version
If you want the intended default config, copy from ReactPress 1.5 or 1.4:
Create files:
reactpress/config/src/index.ts
reactpress/config/src/types.ts
Example content:
index.ts
export const defaultConfig = {};
types.ts
export type Config = Record<string, any>;
Then run again.
Scientific development has profoundly transformed the way food is produced, preserved, and consumed. While these advancements aim to improve human life, they also bring consequences that shape our health and environment. Understanding both the positive and negative effects of science on our diet helps answer the broader question: Should science influence what we eat?
One major cause of change in the modern diet is the rapid growth of food technology. Scientists have created methods such as genetic modification, artificial preservation, and large-scale food processing. These innovations were originally designed to solve problems like food shortages and spoilage. As a result, many countries now have year-round access to affordable and diverse foods that were once seasonal or rare.
However, these advancements also produce significant effects on consumers’ health. For instance, processed foods often contain high levels of salt, sugar, and chemical additives, which can contribute to obesity and heart disease. Furthermore, the long-term impact of genetically modified ingredients is still debated, causing many people to question whether scientific intervention has gone too far. Thus, while science can expand food availability, it may unintentionally harm public health when not properly regulated.
Science also affects the environment through modern agricultural practices. Techniques such as pesticide use and intensive farming help increase crop yields but lead to soil degradation and water pollution. These environmental consequences can eventually influence the quality of the food supply itself, creating a cycle of problems that science must again attempt to solve.
In conclusion, science has undeniably shaped what we eat by making food more accessible and affordable, yet it also introduces health and environmental risks. Therefore, science should influence our diet—but only when such influence is guided by careful research, responsible regulation, and a commitment to long-term well-being.
Ciò fired # Source - how to get back on intranet's default.aspx from internet's default.aspx
# Posted by bamboat_3
# Retrieved 2025-11-29, License - CC BY-SA 3.0
http://202.61.43.37/html/Doc1.
html
# Source - https://stackoverflow.com/q
# Posted by Manpreet Kaur
# Retrieved 2025-11-29, License - CC BY-SA 4.0
#snake head
head = turtle.Turtle()
def draw_circle(color, radius, x, y):
#head(turtle.Turtle())
head.penup()
head.fillcolor(color)
head.goto(x, y)
head.begin_fill()
head.circle(radius)
head.end_fill()
head.hideturtle()
draw_circle("#FF4500", 30, 0, -40) #face OrangeRed #FF4500 green #2CD717
draw_circle("#ffffff", 10, -10, -5) #left eye 9659BD purple
draw_circle("#ffffff", 10, 10, -5) #right eye B4BCE2 light blue
draw_circle("#4a70e3", 7, -8, -4) #5e7ede 9eb1eb 4a70e3 royalblue light colors
draw_circle("#4a70e3", 7, 8, -4)
draw_circle("#17202A", 5, -10, -5) ##17202A black
draw_circle("#17202A", 5, 10, -5)
#colors = random.choice(['green','black'])
#shapes = random.choice(['square'])
#head.shape(shapes)
#head.color(colors)
head.goto(0,0)
head.penup()
head.speed(0) #animation speed
head.direction = 'stop'
#segment = []
body {
background-image: url("https://wallpapercave.com/wp/wp2360203.jpg");
background-repeat: no-repeat;
background-attachment: fixed; <!-- this is to make sure even when you scroll the image remains static over the background -->
}
This is my first answer on this website and I'm a beginner and a fresher in college, so feel free to criticise any mistakes in my answer
// Source - https://stackoverflow.com/a/79833153
// Posted by EldHasp
// Retrieved 2025-11-29, License - CC BY-SA 4.0
using System.Windows;
using System.Windows.Input;
namespace SOQuestions2025.Questions.AdamWritesCode.question79831972
{
public static class UIElementHelper
{
public static bool GetIsBubbleLeftClick(UIElement obj)
{
return (bool)obj.GetValue(IsBubbleLeftClickProperty);
}
public static void SetIsBubbleLeftClick(UIElement obj, bool value)
{
obj.SetValue(IsBubbleLeftClickProperty, value);
}
// Using a DependencyProperty as the backing store for IsBubbleLeftClick. This enables animation, styling, binding, etc...
public static readonly DependencyProperty IsBubbleLeftClickProperty =
DependencyProperty.RegisterAttached(nameof(IsBubbleLeftClickProperty)[0..^8],
typeof(bool),
typeof(UIElementHelper),
new PropertyMetadata(true)
{
PropertyChangedCallback = OnIsBubbleLeftClickChanged
});
private static void OnIsBubbleLeftClickChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
UIElement uie = (UIElement)d;
uie.RemoveHandler(UIElement.MouseLeftButtonDownEvent, (MouseButtonEventHandler)HandledEvent);
if (false.Equals(e.NewValue))
{
uie.AddHandler(UIElement.MouseLeftButtonDownEvent, (MouseButtonEventHandler)HandledEvent, true);
}
}
private static void HandledEvent(object sender, RoutedEventArgs e)
{
e.Handled = true;
}
}
}
bro use :ytdl-core with FFmpeg
// Source - https://stackoverflow.com/q
// Posted by user636525, modified by community. See post 'Timeline' for change history
// Retrieved 2025-11-29, License - CC BY-SA 3.0
\<uses-permission android:name="android.permission.RECORD_AUDIO" /\>
\<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /\>
\<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /\>
\<uses-permission android:name="android.permission.WRITE_EXTERNAL_STOR
AGE" />
have a similar problem. But the thing is, the writing on the websites displays fine. It is just the writing in the Google Chrome tab that doesn't show. It comes up with squares. To fix this, I had to change the encoding to Auto-Detect and UTF-8 (I have to deselect it and then select it again). Then restart my computer in order for the writing in the tabs to display.
However, I find that the next time I turn on my computer, I have to go through the same process and it's quite irritating. Has anyone else had this problem and if so, how do we work about this?
Cheers, C
When you run df.describe(), PySpark returns a DataFrame where every column is a String, so first we should cast the strings and then use pyspark.sql.functions.format_number to round the columns.
from pyspark.sql.functions import col, format_number
describe = df.describe()
columns = describe.columns[1:]
for column in columns:
describe = describe.withColumn(
column,
format_number(col(column).cast('double'), 2)
)
describe.show()
VSCode 1.106.2, November 2025 version.
Option 1 (through the extensions list):
In the extensions view, right-click the GitHub Copilot extension or click the "manage" gear icon on it.
In the pop-up menu, select "Account Preferences".
Option 2 (through the "Command Palette"):
On press F1 or Shift+Ctrl(Cmd)+P to get to the VSCode Command Palette.
Type: "accounts manage" and select the "Accounts: Manage Extension Account Preferences".
A list will show up, showing all extensions that support account logins. Select the "GitHub Copilot Chat".
On the top (command palette) it will show your account name, the second option will be "Use a new account...", which takes you to the web login.
https://www.solidsolutions.co.uk/solidworks/partner-products/emworks.aspx
HACE ALGUNOS AÑOS YO USABA ESTE GO PARTNHER DENTRO DEL ENTORNO DE SOLIDWORKS
Are you using Turbo repo?
Update your turbo.json file with env vars that you want to expose for specific tasks. For Sanity studio, most likely your build task.
https://turborepo.com/docs/crafting-your-repository/using-environment-variables
The integral quoted in this question diverges!
So the suggestion "Changing the integral's upper limit from infinity to some exact value may be a good compromise." is not really a compromise, it is the only way to get a finite answer>
Use applymap:
df[['Age', 'Salary']] = df[['Age', 'Salary']].applymap(lambda x: x + 100 if x > 30 else 0)
It does exactly what your single-column apply does, but works for multiple columns in one line.
You need the firebase_app_check package, and then
see the implementation of it in this URL, it's easy https://firebase.google.com/docs/app-check/flutter/default-providers#initialize
I did the following steps instead and they worked:
Run the dev build in XCode project directly
Run npx expo start
I see your points and it is definitely much simpler to just contain a Compiler struct within compile.
pub fn compile(source: &str) -> Result<Chunk, String> {
let mut chunk = Chunk::new();
let mut compiler = Compiler::new(&mut chunk, source);
compiler.consume()?;
Ok(chunk)
}
Solution found, after import it on all nodes of cluster
sudo ctr -n k8s.io images import ftp1.tar
kubectl get pod
NAME READY STATUS RESTARTS AGE
ftp1-54f69594b-4cf7b 1/1 Running 0 55m
The iterative procedure y(n+1)=(1+y(n)^2)/(2y(n)+x) converges to sqrt(1 + (x/2)^2) - x/2 (NB note the minus sign as opposed to the original question). Easy to prove by solving the equation for the limit value y: y=(1+y^2)/(2y+x) which transforms into a quadratic equation. It can be derived by working out the Newton-Raphson algorithm for this case.
With a starting value y(0)=1/x it converges very quickly for any x>10 and because it doesn't need the square of x there are no overflow issues for large x. Simply terminate the iterations when y(n+1)=y(n) (i.e. machine precision).
I suppose this is what is under the bonnet for most hypot-implementations
Start by defining the basic features of your app, like messaging and user sign-ups. Learn React Native for the front end and Go for the backend through tutorials. Begin with something simple like sending messages, then add features like authentication.If you get stuck, look at sample projects on GitHub or ask for help in dev communities or check out this article ,it covers everything from launching and monetizing your app. he key is to keep building step by step and focus on learning each part along the way.
Check if you try to open the payment view in side an model.
the payment view will not open. because does not support the double model to open togather.
This works fine for me on PyCharm 2025.2.3.
Given that you run a two year old version - from around the time when JetBrains was in the process of adding Polars support - updating to a newer version should be your best bet.
Here is my .bat file to help run this. Works straight out of the box and with venv!
@echo off
REM Source https://stackoverflow.com/questions/69592796
REM Original by BeginnersMindTruly
REM Modified on 2025-11-29, License - CC BY-SA 4.0
set "PROJECT_DIR=C:\Users\bob\Dune\Jupyter Lab"
set "VENV_DIR=%PROJECT_DIR%\venv"
REM Check if Jupyter is already running on port 8888
netstat -ano | find ":8888" >nul
if %errorlevel% equ 0 (
echo Jupyter Lab is already running on port 8888
start http://localhost:8888
) else (
cd /d "%PROJECT_DIR%"
start /B "" "%VENV_DIR%\Scripts\pythonw.exe" -m jupyterlab --port=8888
)
Common Causes
Google Analytics DebugView requires the debug_mode parameter to be active in GA4 requests for events to appear, which GTM Preview mode should automatically add, but several issues can prevent this from reaching DebugView. In WordPress setups with GTM, logging into the admin panel often blocks debug events entirely—log out completely and test again, as this resolves the issue for many users. Browser extensions (ad blockers, privacy tools), cached data, or developer tools blocking requests to google-analytics.com or gtm.js can also stop data flow despite GTM showing tags firing.
Key Troubleshooting Steps
Verify debug parameter: Open browser DevTools > Network tab, filter for collect?v=2, and check recent GA4 requests for dbg or ep.debug_mode=true. If missing, confirm GTM Preview connects properly.
Check GA4 filters: In GA4 Admin > Data Settings > Data Filters, temporarily set "Internal traffic" to Testing (it blocks DebugView even with Developer filter active).
Clear interferences: Disable all extensions, clear cache/cookies, use incognito mode or another browser (avoid Brave), and ensure no ga-disable-XXXXXX code exists in page source.
WordPress-specific: Clear site cache, check for plugin conflicts (e.g., avoid duplicate GA via plugins like Site Kit alongside GTM), and confirm no legacy Universal Analytics tags remain—remove them and use GA4 config via GTM.
Additional Checks
Ensure you're viewing the correct GA4 property (match Measurement ID from GTM/site to Admin > Data Streams) and the right device in DebugView's dropdown, even if it shows "No devices". Consent mode or privacy controls might limit events if not consented; test without them. Delays or bugs can occur—wait 10-60 minutes or restart browser fully. If issues persist, share your GA4 Measurement ID, GTM Preview console screenshots, and Network tab details for collect requests.
Maybe a bit late to add to this, but I've expanded the code to handle invalid password entry.
Option Explicit
#Const InvalidPWD = True
#If VBA7 Then
Private Declare PtrSafe Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hwndParent As LongPtr, ByVal hwndChildAfter As LongPtr, ByVal lpszClass As String, ByVal lpszWindow As String) As LongPtr
Private Declare PtrSafe Function GetParent Lib "user32" (ByVal hWnd As LongPtr) As LongPtr
Private Declare PtrSafe Function GetDlgItem Lib "user32" (ByVal hDlg As LongPtr, ByVal nIDDlgItem As Long) As LongPtr ' nIDDlgItem = int?
Private Declare PtrSafe Function GetDesktopWindow Lib "user32" () As LongPtr
Private Declare PtrSafe Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As LongPtr, ByVal Msg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Declare PtrSafe Function SetFocusAPI Lib "user32" Alias "SetFocus" (ByVal hWnd As LongPtr) As LongPtr
Private Declare PtrSafe Function LockWindowUpdate Lib "user32" (ByVal hWndLock As LongPtr) As Long
Private Declare PtrSafe Function SetTimer Lib "user32" (ByVal hWnd As LongPtr, ByVal nIDEvent As LongPtr, ByVal uElapse As Long, ByVal lpTimerFunc As LongPtr) As LongPtr
Private Declare PtrSafe Function KillTimer Lib "user32" (ByVal hWnd As LongPtr, ByVal uIDEvent As LongPtr) As Long
Private Declare PtrSafe Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
#Else
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hwndParent As Long, ByVal hwndChildAfter As Long, ByVal lpszClass As String, ByVal lpszWindow As String) As Long
Private Declare Function GetParent Lib "user32" (ByVal hWnd As Long) As Long
Private Declare Function GetDlgItem Lib "user32" (ByVal hDlg As Long, ByVal nIDDlgItem As Long) As Long ' nIDDlgItem = int?
Private Declare Function GetDesktopWindow Lib "user32" () As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal Msg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Declare Function SetFocusAPI Lib "user32" Alias "SetFocus" (ByVal hWnd As Long) As Long
Private Declare Function LockWindowUpdate Lib "user32" (ByVal hWndLock As Long) As Long
Private Declare Function SetTimer Lib "user32" (ByVal hWnd As Long, ByVal nIDEvent As Long, ByVal uElapse As Long, ByVal lpTimerFunc As Long) As Long
Private Declare Function KillTimer Lib "user32" (ByVal hWnd As Long, ByVal uIDEvent As Long) As Long
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
#End If
Private Const WM_CLOSE As Long = &H10
Private Const WM_GETTEXT As Long = &HD
Private Const EM_REPLACESEL As Long = &HC2
Private Const EM_SETSEL As Long = &HB1
Private Const BM_CLICK As Long = &HF5&
Private Const TCM_SETCURFOCUS As Long = &H1330&
Private Const IDPassword As Long = &H155E&
Private Const IDOK As Long = &H1&
#If InvalidPWD Then
Private Const IDCANCEL As Long = &H2&
#End If
Private Const TimeoutSecond As Long = 2
Private g_ProjectName As String
Private g_Password As String
Private g_Result As Long
#If VBA7 Then
Private g_hwndVBE As LongPtr
'Private g_hwndPassword As LongPtr
#Else
Private g_hwndVBE As Long
'Private g_hwndPassword As Long
#End If
#If InvalidPWD Then
#If VBA7 Then
Private g_hwndTmp As LongPtr
#Else
Private g_hwndTmp As Long
#End If
#End If
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'Sub Test_UnlockProject()
' 'Application.ScreenUpdating = True
' Select Case UnlockProject(ActiveWorkbook.VBProject, "Test")
' Case 0: MsgBox "The project was unlocked"
' Case 1: MsgBox "Errorhandler"
' Case 2: MsgBox "The active project was already unlocked"
' Case 3: MsgBox "Wrong password"
' Case Else: MsgBox "Error or timeout"
' End Select
'End Sub
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Public Function UnlockProject(ByVal Project As Object, ByVal Password As String) As Long
#If VBA7 Then
Dim lRet As LongPtr
#Else
Dim lRet As Long
#End If
Dim timeout As Date
On Error GoTo ErrorHandler
UnlockProject = 1
' If project already unlocked then no need to do anything fancy
' Return status 2 to indicate already unlocked
If Project.Protection <> vbext_pp_locked Then
UnlockProject = 2
Exit Function
End If
' Set global varaibles for the project name, the password and the result of the callback
g_ProjectName = Project.Name
g_Password = Password
g_Result = 0
' Freeze windows updates so user doesn't see the magic happening :)
' This is dangerous if the program crashes as will 'lock' user out of Windows
' LockWindowUpdate GetDesktopWindow()
' Switch to the VBE and set the VBE window handle as a global variable
Application.VBE.MainWindow.Visible = True
g_hwndVBE = Application.VBE.MainWindow.hWnd
' Run 'UnlockTimerProc' as a callback
lRet = SetTimer(0, 0, 100, AddressOf UnlockTimerProc)
If lRet = 0 Then GoTo ErrorHandler
' Switch to the project we want to unlock
Set Application.VBE.ActiveVBProject = Project
If Not Application.VBE.ActiveVBProject Is Project Then GoTo ErrorHandler
' Launch the menu item Tools -> VBA Project Properties
' This will trigger the password dialog which will then get picked up by the callback
Application.VBE.CommandBars.FindControl(ID:=2578).Execute
' Loop until callback procedure 'UnlockTimerProc' has run
' determine run by watching the state of the global variable 'g_result'
' ... or backstop of 2 seconds max
timeout = Now() + TimeSerial(0, 0, TimeoutSecond)
Do While g_Result = 0 And Now() < timeout
DoEvents
Loop
#If InvalidPWD Then
If g_Result = 1 Then UnlockProject = 0
If g_Result = 2 Then UnlockProject = 3
#Else
If g_Result Then UnlockProject = 0
#End If
ErrorHandler:
' Switch back to the Excel application
AppActivate Application.Caption
' Unfreeze window updates
LockWindowUpdate 0
End Function
#If VBA7 Then
Private Function UnlockTimerProc(ByVal hWnd As LongPtr, ByVal uMsg As Long, ByVal idEvent As LongPtr, ByVal dwTime As Long) As Long
#Else
Private Function UnlockTimerProc(ByVal hWnd As Long, ByVal uMsg As Long, ByVal idEvent As Long, ByVal dwTime As Long) As Long
#End If
#If VBA7 Then
Dim hWndPassword As LongPtr
Dim hWndOK As LongPtr
Dim hWndTmp As LongPtr
Dim lRet As LongPtr
#Else
Dim hWndPassword As Long
Dim hWndOK As Long
Dim hWndTmp As Long
Dim lRet As Long
#End If
Dim lRet2 As Long
Dim sCaption As String
Dim timeout As Date
Dim timeout2 As Date
Dim pwd As String
#If InvalidPWD Then
#If VBA7 Then
Dim hWndCancel As LongPtr
#Else
Dim hWndCancel As Long
#End If
#End If
' Protect ourselves against failure :)
On Error GoTo ErrorHandler
' Kill timer used to initiate this callback
KillTimer 0, idEvent
' Determine the Title for the password dialog
Select Case Application.LanguageSettings.LanguageID(msoLanguageIDUI)
' For the japanese version
Case 1041
sCaption = ChrW(&H30D7) & ChrW(&H30ED) & ChrW(&H30B8) & _
ChrW(&H30A7) & ChrW(&H30AF) & ChrW(&H30C8) & _
ChrW(&H20) & ChrW(&H30D7) & ChrW(&H30ED) & _
ChrW(&H30D1) & ChrW(&H30C6) & ChrW(&H30A3)
Case Else
sCaption = " Password"
End Select
sCaption = g_ProjectName & sCaption
' Set a max timeout of 2 seconds to guard against endless loop failure
timeout = Now() + TimeSerial(0, 0, TimeoutSecond)
Do While Now() < timeout
hWndPassword = 0
hWndOK = 0
hWndTmp = 0
' Loop until find a window with the correct title that is a child of the
' VBE handle for the project to unlock we found in 'UnlockProject'
Do
hWndTmp = FindWindowEx(0, hWndTmp, vbNullString, sCaption)
If hWndTmp = 0 Then Exit Do
Loop Until GetParent(hWndTmp) = g_hwndVBE
#If InvalidPWD Then
g_hwndTmp = hWndTmp
#End If
' If we don't find it then could be that the calling routine hasn't yet triggered the appearance of the dialog box
' Skip to the end of the loop, wait 0.1 secs and try again
If hWndTmp = 0 Then GoTo Continue
' Found the dialog box, make sure it has focus
lRet2 = SendMessage(hWndTmp, TCM_SETCURFOCUS, 1, ByVal 0&)
' Get the handle for the password input
hWndPassword = GetDlgItem(hWndTmp, IDPassword)
' Get the handle for the OK button
hWndOK = GetDlgItem(hWndTmp, IDOK)
' If either handle is zero then we have an issue
' Skip to the end of the loop, wait 0.1 secs and try again
If (hWndTmp And hWndOK) = 0 Then GoTo Continue
' Enter the password into the password box
' lRet = SetFocusAPI(hWndPassword)
lRet2 = SendMessage(hWndPassword, EM_SETSEL, 0, ByVal -1&)
lRet2 = SendMessage(hWndPassword, EM_REPLACESEL, 0, ByVal g_Password)
' As a check, get the text back out of the pasword box and verify it's the same
pwd = String(260, Chr(0))
lRet2 = SendMessage(hWndPassword, WM_GETTEXT, Len(pwd), ByVal pwd)
pwd = Left(pwd, InStr(1, pwd, Chr(0), 0) - 1) 'pwd = VBA.Left(pwd, InStr(1, pwd, Chr(0), 0) - 1)
' If not the same then we have an issue
' Skip to the end of the loop, wait 0.1 secs and try again
If pwd <> g_Password Then GoTo Continue
' Now we need to close the Project Properties window we opened to trigger the password input in the first place
' Like the current routine, do it as a callback
lRet = SetTimer(0, 0, 100, AddressOf ClosePropertiesWindow)
' Click the OK button
' lRet = SetFocusAPI(hWndOK)
lRet2 = SendMessage(hWndOK, BM_CLICK, 0, ByVal 0&)
' Set the global variable to success to flag back up to the initiating routine that this worked (if global variable was not set to fail before)
#If InvalidPWD Then
If g_Result = 2 Then
' Get the handle for the Cancel button
hWndCancel = GetDlgItem(hWndTmp, IDCANCEL)
' Click the Cancel button
lRet = SetFocusAPI(hWndCancel)
lRet2 = SendMessage(hWndCancel, BM_CLICK, 0, ByVal 0&)
Else
g_Result = 1
End If
#Else
g_Result = 1
#End If
Exit Do
' If we get here then something didn't work above
' Wait 0.1 secs and try again
' Master loop is capped with a longstop of 2 secs to terminate endless loops
Continue:
DoEvents
Sleep 100
Loop
Exit Function
' If we get here something went wrong so close the password dialog box (if we have a handle)
' and unfreeze window updates (if we set that in the first place)
ErrorHandler:
' Debug.Print Err.Number
If hWndPassword <> 0 Then SendMessage hWndPassword, WM_CLOSE, 0, ByVal 0&
LockWindowUpdate 0
End Function
#If VBA7 Then
Private Function ClosePropertiesWindow(ByVal hWnd As LongPtr, ByVal uMsg As Long, ByVal idEvent As LongPtr, ByVal dwTime As Long) As Long
#Else
Private Function ClosePropertiesWindow(ByVal hWnd As Long, ByVal uMsg As Long, ByVal idEvent As Long, ByVal dwTime As Long) As Long
#End If
#If VBA7 Then
Dim hWndTmp As LongPtr
Dim hWndOK As LongPtr
Dim lRet As LongPtr
#Else
Dim hWndTmp As Long
Dim hWndOK As Long
Dim lRet As Long
#End If
Dim lRet2 As Long
Dim timeout As Date
Dim sCaption As String
' Protect ourselves against failure :)
On Error GoTo ErrorHandler
' Kill timer used to initiate this callback
KillTimer 0, idEvent
' Determine the Title for the project properties dialog
sCaption = g_ProjectName & " - Project Properties"
' Set a max timeout of 2 seconds to guard against endless loop failure
timeout = Now() + TimeSerial(0, 0, TimeoutSecond)
Do While Now() < timeout
hWndTmp = 0
' Loop until find a window with the correct title that is a child of the
' VBE handle for the project to unlock we found in 'UnlockProject'
Do
hWndTmp = FindWindowEx(0, hWndTmp, vbNullString, sCaption)
If hWndTmp = 0 Then Exit Do
Loop Until GetParent(hWndTmp) = g_hwndVBE
' If we don't find it then could be that the calling routine hasn't yet triggered
' the appearance of the dialog box
' Skip to the end of the loop, wait 0.1 secs and try again
If hWndTmp = 0 Then GoTo Continue
' Found the dialog box, make sure it has focus
lRet2 = SendMessage(hWndTmp, TCM_SETCURFOCUS, 1, ByVal 0&)
' Get the handle for the OK button
hWndOK = GetDlgItem(hWndTmp, IDOK)
' If either handle is zero then we have an issue
' Skip to the end of the loop, wait 0.1 secs and try again
If (hWndTmp And hWndOK) = 0 Then GoTo Continue
' Click the OK button
' lRet = SetFocusAPI(hWndOK)
lRet2 = SendMessage(hWndOK, BM_CLICK, 0, ByVal 0&)
' Set the global variable to success to flag back up to the initiating routine that this worked
g_Result = 1
Exit Do
' If we get here then something didn't work above
' Wait 0.1 secs and try again
' Master loop is capped with a longstop of 2 secs to terminate endless loops
Continue:
DoEvents
Sleep 100
Loop
#If InvalidPWD Then
' Set the global variable to fail to flag back up to the initiating routine that this has not worked (we have timed out)
If g_Result = 0 Then
g_Result = 2
' Run 'InvalidTimerProc' as a callback
lRet2 = SetTimer(0, 0, 100, AddressOf InvalidTimerProc)
If lRet2 = 0 Then
GoTo ErrorHandler
End If
End If
#End If
Exit Function
' If we get here something went wrong so unfreeze window updates (if we set that in the first place)
ErrorHandler:
' Debug.Print Err.Number
LockWindowUpdate 0
End Function
#If InvalidPWD Then
#If VBA7 Then
Private Function InvalidTimerProc(ByVal hWnd As LongPtr, ByVal uMsg As Long, ByVal idEvent As LongPtr, ByVal dwTime As Long) As Long
#Else
Private Function InvalidTimerProc(ByVal hWnd As Long, ByVal uMsg As Long, ByVal idEvent As Long, ByVal dwTime As Long) As Long
#End If
#If VBA7 Then
Dim hWndOK As LongPtr
Dim hWndTmp As LongPtr
Dim lRet As LongPtr
#Else
Dim hWndOK As Long
Dim hWndTmp As Long
Dim lRet As Long
#End If
Dim lRet2 As Long
Dim sCaption As String
Dim timeout As Date
' Protect ourselves against failure :)
On Error GoTo ErrorHandler
' Kill timer used to initiate this callback
KillTimer 0, idEvent
' Determine the Title for the password dialog
Select Case Application.LanguageSettings.LanguageID(msoLanguageIDUI)
' For the japanese version
Case 1041
sCaption = "NO JAPANESE VERSION YET"
Case Else
sCaption = "Project Locked"
End Select
' Set a max timeout of 2 seconds to guard against endless loop failure
timeout = Now() + TimeSerial(0, 0, TimeoutSecond)
Do While Now() < timeout
hWndOK = 0
hWndTmp = 0
' Loop until find a window with the correct title that is a child of the password dialog
Do
hWndTmp = FindWindowEx(0, hWndTmp, vbNullString, sCaption)
If hWndTmp = 0 Then Exit Do
Loop Until GetParent(hWndTmp) = g_hwndTmp
' If we don't find it then could be that the calling routine hasn't yet triggered the appearance of the dialog box
' Skip to the end of the loop, wait 0.1 secs and try again
If hWndTmp = 0 Then GoTo Continue
' Found the message box, make sure it has focus
lRet2 = SendMessage(hWndTmp, TCM_SETCURFOCUS, 1, ByVal 0&)
' Get the handle for the OK button
hWndOK = GetDlgItem(hWndTmp, IDOK) ' can't find handle of OK button :(
' If either handle is zero then we have an issue
' Skip to the end of the loop, wait 0.1 secs and try again
If (hWndTmp And hWndOK) = 0 Then GoTo Continue
' Click the OK button
' lRet = SetFocusAPI(hWndOK)
lRet2 = SendMessage(hWndOK, BM_CLICK, 0, ByVal 0&)
' Set the global variable to fail to flag back up to the initiating routine that this worked
'g_Result = 2
Exit Do
' If we get here then something didn't work above
' Wait 0.1 secs and try again
' Master loop is capped with a longstop of 2 secs to terminate endless loops
Continue:
DoEvents
Sleep 100
Loop
If g_Result = 2 Then GoTo ErrorHandler ' since we couldn't find OK button handle, close window this way :(
Exit Function
' If we get here something went wrong so close the message box (if we have a handle)
' and unfreeze window updates (if we set that in the first place)
ErrorHandler:
' Debug.Print Err.Number
If hWndTmp <> 0 Then SendMessage hWndTmp, WM_CLOSE, 0, ByVal 0&
LockWindowUpdate 0
End Function
#End If
I found when installing my venv, scripts was in 'bin' instead so i had to use
venv/bin/activate
i don't know why it installed like this because it definitely installed differently on another pc but oh well.
try "rescan solution" from project menu