When you merge declarations, such as when extending existing types,TypeScript will merge the type declarations it finds, but the loading order of those types matters. TypeScript should look in the custom type path first Ensure your custom type path exemple.
❌ Wrong way
{
"compilerOptions": {
"typeRoots": ["./node_modules/@types", "./src/types"]
}
}
✅ Right way
{
"compilerOptions": {
"typeRoots": ["./src/types", "./node_modules/@types"]
}
}
I would have to use a scripting language to get the desired result fastest. I think I would write a regex that could be used for the needles by a regex match function like re.match('INV [0-9]* ') that is run across each line and line no's and invoice numbers are stored in a dictionary.
Run the program again against the haystack and generate a dictionary of line number, invoice number.
A function that lists the line number from the needles string and haystack string and outputs a tuple of the form {line no in needles file, line number in haystack file} then simple iterate the list of tuple pairs and concatenate those respective lines and print the result for all the matches in the dictionary.
Let me know where you're stuck if you don't find a simpler approach. I don't know how to do this with just regex or some other one liner approach !
The Maildir object itself can be iterated to loop through the messages in the top-level folder.
mbox = mailbox.Maildir(dirpath, create=False)
for msg in mbox.itervalues():
...
or just:
for msg in mbox:
...
https://docs.python.org/3/library/mailbox.html#maildir-objects
I think the file you are looking for doesn't exist on your system, i hope this help!
Suppose we are making an auction application, and a product has owner property. Initially, the owner is undefined. After the auction is completed, if the owner is null, it means the product went unsold. And if it is sold, it has some owner ID.
In such a case, we can do the filtering, UI and other operations based on undefined === null (false), treating null and undefined as different things.
Note - that in such scenarios, if we use undefined == null (True) it could result in wrong data and operations.
I've got an update to z4k's answer. It's possible it's because of changes since he posted his answer eight years ago.
First off, I'd recommend including sizes 36 and 72 because they are used for program icons in the start menu and for medium desktop icons respectively at the popular 144 pixels per logical inch / 150% scaling factor.
Secondly, I'd recommend excluding sizes 31 and 47, because they're only used for small start menu tiles and shown at the wrong sizes, 30 and 42 respectively, so they'll be blurry anyway. (This is actually a common theme. I've noticed a lot of blurry icons everywhere on recent Windows versions so I can only assume that Microsoft's programmers have become less competent over the years.) I also recommend excluding 63 which may either have been a copying error on z4k's part or the result of a really obscure bug, I cannot image.
The final list of recommended resolutions then becomes: 16, 20, 24, 28, 30, 32, 36, 40, 42, 48, 56, 60, 72, 84, 256
If your program has to run on older systems or work better with remote desktop you also have to include low colour icons. I'd recommend the following: 32 monochrome if you need it, and 16, 32 and 48 in both 16 colours and 256 colours. As a matter of fact at the small size of an icon the difference between true colour and 256 colours may not be possible to spot and it keeps the file size down as well so you may opt to also use that for larger sizes. As a final note, some programming frameworks have the annoying tendency to be picky about the order in which the icons appear in the file. I vaguely remember having once used one where it would use the wrong icon unless size 16 was first in the file. So if you don't see the right icon, experiment with the order of the sizes in the file.
please stop making it so easy for half assed hackers to stalk people and break into their accounts and violate every civil liberty that regardless of your agreements, the constitution declares it unalienable, rights to life liberty and the pursuit of happiness, unless Google keeps making it easier to hack life and never implement safety w/o making you pay 100’s a year for it. This is harassment,stalking,and forgery, liable and other things also, leave me alone. Stop eavesdropping on people’s privacy you sick weirdos.
Change the calling convention from __cdecl to __stdcall.
in Configuration -> C/C++ ->Advanced -> Calling Convention
Ctrl+p did not work for linux mint 22.1 for me, any shortkeys assigned to that is ignored. Might be a shortkey consumed by the system?
Either way, by default vscode (v1.99.3) maps "go to file..." (thanks Dinei) to Ctrl+E for me. This shows the quick search bar without a preceding character (# with Ctrl+T or > with Ctrl+shift+p).
I found this question helpful to figure out if I had any shortkeys overwritten or removed myself and forgot about it.
The signature of addActionListener
method is public void addActionListener(ActionListener l)
where ActionListener
it is a functional interface (in Java programming language a functional interface it is an interface with a sole method) defining the actionPerformed
method accepting one argument of type ActionEvent
, the method signature being void actionPerformed(ActionEvent e)
.
this::increasePoints
it is method reference that should be possible to translate to...
new ActionListener() {
public void actionPerformed(ActionEvent e) {
. . .
}
}
...therefore the increasePoints
method signature must match the signature of actionPerformed
method defined by th ActionListener
interface.
The reason we use .get(0) after selecting a form in jQuery (like $('form').get(0).reset()) is because:
・jQuery selectors return a jQuery object, which is a wrapper around the DOM elements.
・The reset() method is a native JavaScript method that exists on DOM elements (specifically the element).
・.get(index) is a jQuery method that retrieves the DOM element at the specified index from the jQuery object. get(0) gets the first (and usually the only) form element as a plain JavaScript DOM element. Therefore, $('form').get(0) extracts the underlying DOM element of the form, allowing you to call the native JavaScript reset() method on it. jQuery objects themselves don't have a reset() method.
Regarding your experience with beforeSend and reset(), if reset() worked there, it means that within that context, the form variable was likely referencing the native DOM element (either directly or after extraction from a jQuery object).
What if you try it like this instead of your localhost:
add name="Access-Control-Allow-Origin" value="domain"
Domain refers to your IIS server
Just in case someone ends here having similar issue using ubuntu 24 and docker desktop:
My issue was due to a default configuration value in docker-desktop that needs to be activated to use network_mode: host
.
Just activate Enable host networking
, pretty clear instructions on the UI :) (I just was struggling with this for days)
Anyone who is facing the problem after Nov 26, 2018
you guys can use the new version https://mvnrepository.com/artifact/com.github.mwiede/jsch
I was facing this issue and it turned out the earlier version only allowed for RSA PEM keys which OpenSSH disabled or something I'm not sure, so upgrading to the new version and using ed25519 keys I was able to make it work.
Hey @Kannan J and @Vy Do
Thanks for your answers, but for clarifications for newbies like me. Getting into more details.
Yes, as @Kannan J mentioned, the created stub for HelloWorldService.sayHello
is expected as it is mentioned in question. The parameter for HelloWorldResponse can be considered as a Consumer of the response (Drawing analogy from Java 8's Consumer methods) which needs to be consuming the response which needs to be sent back to the client. Whereas, Request is also a consumer (again, the same Java 8's Consumer method's analogy) here will be called once a HelloWorldRequest
is received, so we need to define what needs to be done by implementing and returning that.
Here's the sample implementation of the same:
@Override
public StreamObserver<HelloWorldRequest> sayHello(StreamObserver<HelloWorldResponse> responseObserver) {
return new StreamObserver<>() {
@Override
public void onNext(HelloWorldRequest helloWorldRequest) {
String name = helloWorldRequest.getName();
String greeting = null;
if (StringUtils.hasText(name)) {
if (!name.startsWith("Hello"))
greeting = "Hello " + name;
} else {
greeting = "Hello World";
}
if (StringUtils.hasText(name)) {
HelloWorldResponse response = HelloWorldResponse.newBuilder()
.setGreeting(greeting)
.build();
responseObserver.onNext(response);
}
}
@Override
public void onError(Throwable throwable) {
// Handle error
log.error("Error occurred: {}", throwable.getMessage(), throwable);
responseObserver.onError(throwable);
}
@Override
public void onCompleted() {
// Complete the response
log.info("Request completed");
HelloWorldResponse response = HelloWorldResponse.newBuilder()
.setGreeting("Quitting chat , Thank you")
.build();
responseObserver.onNext(response);
responseObserver.onCompleted();
}
};
}
Here, I am creating a new StreamObserver for the request , which tells what to do with the incoming messages (since, it is a stream there could be more than one, like a P2P chat). onNext
tells what to do when a message is received, which can be used using the parameter provided for the same. onError
when something breaks, and finally onCompleted
when a streaming connection is closed. Within these methods responseObserver
for sending messages (or emitting messages, analogy from Reactor streams) back to the client.
Generally this is a tough ask. As we can easily see here (when done in one second by Google Translate). There are problems since a decompressed PDF does not use the same source data as was used for import and compression. PDF is NOT lossless.
There is a single checkbox for enabling Stretch for SubviewportContainer
. Turn the stretch on option for properties of SubviewportContainer
.
There is no requirement of resizing code for Subviewport
, only put Resizing for the SubviewportContainer
which will manage the resizing of its child Subviewport
.
I haven't used NetBeans a lot before, but I researched a bit for finding a proper solution. I think common sense debugging techniques should work, for example:
- Try copying your entire code in a fresh file and run it again, as some files are simply corrupted. Additional to this, you could run your code on a different editor; this way, you'll see if the problem occurs on NetBeans itself or if it is indeed a problem with your code.
- As the comment on your post said, you should also try cleaning and rebuilding your project. I haven't used this feature before, but as this post from Stack Overflow suggests: Netbeans 8.0.2 Clean and Build then Run results in old code being run, try going on BUILD and then CLEAN AND BUILD PROJECT (or use command "Shift + F11"). If this is not how it is displayed on your platform setup, try the way @markspace suggested, and I quote: <<Pick "Clean" from the menu at the top, then "Build" the entire project again.>>.
- Another thing that could cause the problem, although I doubt this is the root of the bug, is to check if the debugger is not causing misleading stack traces by checking its settings.
CREDITS TO @markspace for the second suggestion I offered in my answer.
Seeking through the bootstrap
script and found this:
CC=*) CC=`cmake_arg "$1"` ;;
CXX=*) CXX=`cmake_arg "$1"` ;;
CFLAGS=*) CFLAGS=`cmake_arg "$1"` ;;
CXXFLAGS=*) CXXFLAGS=`cmake_arg "$1"` ;;
LDFLAGS=*) LDFLAGS=`cmake_arg "$1"` ;;
Looks like invoking ./configure CFLAGS="-Werror=vla"
will do.
I went round the houses for weeks with this one. The solutions above did not work for me.
The sequence of terminal commands that finally got "Quartz" to work for me on a M2 Mac Sequoia 15.3.2 was the following:
pip install --upgrade pip
pip install pyobjc-framework-Quartz
pip install pyobjc
python3 -m pip install pyautogui
The key reference is at: https://pyautogui.readthedocs.io/en/latest/install.html
My script contained:
#!/bin/zsh
from Quartz.CoreGraphics import CGEventCreateMouseEvent
from Quartz.CoreGraphics import CGEventCreate
from Quartz.CoreGraphics import CGEventPost
from Quartz.CoreGraphics import CGEventGetLocation
from Quartz.CoreGraphics import kCGEventMouseMoved
from Quartz.CoreGraphics import kCGEventLeftMouseDown
from Quartz.CoreGraphics import kCGEventLeftMouseUp
from Quartz.CoreGraphics import kCGMouseButtonLeft
from Quartz.CoreGraphics import kCGHIDEventTap
import Quartz
import sys
import time
def mouseEvent(type, posx, posy):
theEvent = CGEventCreateMouseEvent(None, type, (posx,posy), kCGMouseButtonLeft)
CGEventPost(kCGHIDEventTap, theEvent)
def mousemove(posx,posy):
mouseEvent(kCGEventMouseMoved, posx,posy)
def mouseclickdn(posx,posy):
mouseEvent(kCGEventLeftMouseDown, posx,posy)
def mouseclickup(posx,posy):
mouseEvent(kCGEventLeftMouseUp, posx,posy)
def mousedrag(posx,posy):
mouseEvent(kCGEventLeftMouseDragged, posx,posy)
and the error message before the solution was:
Traceback (most recent call last):
File "wmap1.py", line 2, in <module>
from Quartz.CoreGraphics import CGEventCreateMouseEvent
ModuleNotFoundError: No module named 'Quartz'
I have a question. I'm building an app in React Native using Expo. I want to add a custom splash image, but even though I've set the correct path, the image still doesn't appear — no image shows up at all.
Code:
"splash": {
"image": "./assets/images/car.png",
"resizeMode": "contain"}
if it could be any help in here, here's how this heck can be done in BW4/HANA based systems:
DATA(is_bw_cloud) = SWITCH #( cl_rs_utilities=>get_is_cloud_bw4_system( i_read_from_db = rs_c_true )
WHEN abap_true THEN 'CLOUD' ELSE 'ONPREM' ).
Do you know of any additions to this list
Although this is one old question, when I wrote this answer, there is no one saying about title case (see wikipedia).
"The Quick Brown Fox Jumps over the Lazy Dog"
A mixed-case style with all words capitalised, except for certain subsets (particularly articles and short prepositions and conjunctions) defined by rules that are not universally standardised.
Notice for VSCode and Python, that means start case in wikipedia definition (JS lib lodash uses the latter naming). More details are show in this reddit comment thread.
"The Quick Brown Fox Jumps Over The Lazy Dog"
Start case, initial caps or proper case is a simplified variant of title case. In text processing, start case usually involves the capitalisation of all words irrespective of their part of speech.
I didn't see anyone else post this answer so I wrote this solution.
If you wanna stay in server components and don't wanna use any hooks. You can achieve this by passing relative pathnames to Next/Link Component.
<Link href={"../"} >Go Back</Link>
The simple method is actually...
$w::Up
$a::Left
$s::Down
$d::Right
My other method allows toggling off the script for normal keyboard use and toggling back on when its needed. Either are valid depending on needs.
I was using vercel to connect to mongo cluster.
I installed vercel integration for mongo atlas and checked env variables in vercel.
In your Stripe dashboard, you will find settings ->payments->custom payment methods. There, you will find the create option, which will give you the option to add PayPal to Stripe. let me know if you need any more help
I finally found a solution for retrieving only the visible part of a PDField.
//Flatten the AcroForm first to remove the PDField but keep the text.
acroForm.flatten()
//Get the page of the document where the text is located.
PDPage page = document.getPage(0);
//Create a PDFTextStripperByArea.
PDFTextStripperByArea stripper = new PDFTextStripperByArea();
//Create a Rectangle2D. All the text which is located within the rectangle will be
//included in the stripper. So put the rectangle excactly above the visible part of
//the text. The params for the coordinates are (x, y, width, height). You likely need
//to experiment a bit to find the right values.
Rectangle2D rectangle2D = new Rectangle2D.Float(50, 525, 500, 140);
//Add the rectangle as a region for the stripper.
stripper.addRegion("region", rectangle2D);
//Extract the region.
stripper.extractRegions(page);
//Get the text.
String text = stripper.getTextForRegion("region");
This feature is called sticky lines. To turn it off, open Settings, go to Editor | General | Sticky lines and unselect Show sticky lines while scrolling.
Actually I could solve my first question, but i don't get why sometimes the old cell output is stored and overwrites the newer output. Nevertheless to subset isin_dataframes by isin_dataframes[isin] worked.
The only problem Iam still having is, that merge_all[isin]['value'] is not represented in the final DataFrame merge_all[isin] properly, so that the entire column ['value'] is NaN.
The code you provided is an example of using a while
loop in Python to iterate through a list. Here's how it works:
marks = [95, 98, 97] # Create a list of marks
i = 0 # Initialize the index i to 0
while i < len(marks): # Loop until i is less than the length of the marks list
print(marks[i]) # Print the element at index i
i = i + 1 # Increment i by 1 after each iteration
Detailed Explanation:
marks = [95, 98, 97]: This creates a list called marks that contains three values: 95, 98, and 97.
i = 0: The variable i is initialized to 0. This variable will be used to track the position of elements in the list.
while i < len(marks):: The while loop condition checks if the value of i is less than the length of the marks list. If this condition is true, the loop continues. In this case, len(marks) returns 3, since the list has 3 elements.
print(marks[i]): This command prints the element at index i in the marks list. On the first iteration, i is 0, so the first element (95) is printed. Then, i is incremented by 1, and the loop continues.
i = i + 1: After each iteration, the value of i is incremented by 1, which allows the loop to move to the next element in the list. Result: When running this code, you will get the following output:
95 98 97
Each value corresponds to an element in the marks list.
I hope this answer helps you better understand how the while loop works in Python! If you have any further questions, feel free to ask. 😊
You can now copy this answer and post it on Stack Overflow. Once your answer gets upvoted or accepted, you'll start earning reputation points.
Let me know if you need any further assistance or if you'd like me to adjust the answer!
So the issue seemed to be the lack of quotation marks surrounding the interpolated variable within the url()
e.g.
style={{backgroundImage: `url('${coverImagePath}')`}}
But the following is invalid
style={{backgroundImage: `url(${coverImagePath})`}}
You could also do: var checkedBoxes = document.querySelectorAll('input[type=checkbox]:checked');
This issue is fixed. I updated my confluent CLI to v4.25.0. Control-center is added into the local services command. It works fine now.
amazin i just rename pages to (pages) and now there is no such kind of build errors
Importing typing.BinaryIO and casting in to open writer object, as @Youth Dream proposed does not work - pyCharm reports issue with BinaryIO as well.
This seems to be known pyCharm issue thugh:
"Expected type 'SupportsWrite[bytes]', got 'BinaryIO' instead"
I encountered exactly the same error after updating to Xcode 16. This is a compatibility issue between Xcode 16's stricter C++ compiler and certain syntax in recent versions of gRPC-Core.
To solve this problem, simply specify more stable versions of gRPC in your Podfile:
pod 'gRPC-Core', '~> 1.44.0'
pod 'gRPC-C++', '~> 1.44.0'
# Something like this :
platform :ios, '15.0'
target 'collegeMarketPlace' do
use_frameworks!
# Your existing Firebase pods
pod 'FirebaseAuth'
pod 'FirebaseFirestore'
pod 'FirebaseStorage'
pod 'FirebaseAnalytics'
pod 'FirebaseFunctions'
pod 'FirebaseMessaging'
pod 'FirebaseFirestoreSwift'
# Specify stable gRPC versions
pod 'gRPC-Core', '~> 1.44.0'
pod 'gRPC-C++', '~> 1.44.0'
end
Then run:
pod deintegrate
pod install --repo-update
public Task<Stream> GetStream(CancellationToken token)
{
var aesHelper = new AesHelper();
var fileStream = File.OpenRead(_filePath);
var fs = aesHelper.GetDecryptedStream(fileStream);
return Task.FromResult<Stream>(fs);
}
this is GetStream method.
after struggling with this issue for a while, I finally found a solution that worked for me! Just set the Gradle JDK in File > Settings > Build, Execution, Deployment > Gradle to a compatible version like Amazon Corretto 17 to fix the issue.enter image description here
Had the same issue in Firebase Functions using Python. What fixed it for me is making sure all my dependencies are listed in requirements.txt
Then reset venv
Delete it
rm -rf venv
create it again
python3 -m venv venv
Activate it
source venv/bin/activate
Then install
pip install -r requirements.txt
Create CSR file on you Mac
https://developer.apple.com/help/account/certificates/create-a-certificate-signing-request/
Create distribution certificate on
https://developer.apple.com/account/resources/certificates/add
based on CSR file
Download and install CER file on your Mac
Open Keychan Access. Find installed certificate
Right key mouse -> Export -> .p12 format
Be sure to set a password!! Not empty
send .p12 file to your window machine with VS 2022
In VS 2022 use key (on the topic picture ) Import Certificate and select .p12 file
Success!
Also, you can downgrade your Django if you can't upgrade your Postgresql DB.
Try copying [-map 0:3 -c:s:0 copy] the subtitle stream instead of encoding it to dvdsub like you did for the video stream
There are 2 possible problems:
the target exe was not found (this contains the symbol table required for gdb too): In most cases this is because the path of the exe contains spaces and Code Blocks passed the absolute path as -args. A workaround is to set Settings->Debugger settings->Default->Arguments to: -args bin\Debug\*.exe. CB passes this to gdb (the -args with the absolute pass fails but is ignored). This works as CB starts in the absolute project starting dir the gcc creates the exe in this local subdir. Using *.exe instead of <target>.exe works and does not require future manual changes. I have only tested with 1 exe in the bin/Debug subdir.
the program path of gdb.exe contains spaces -> set the complete path in "". Settings->Debugger settings->Default->Executable path (incl. gdb.exe)
All verified in latest version 20.03 with MinGW installed.
One of the best places to eat in Las Vegas without spending too much is Denny’s. Their Las Vegas Strip location has a full menu that includes breakfast, lunch, dinner, and desserts—all available 24/7. I recently came across this updated Denny’s Las Vegas Menu 2025 with prices and calorie info. Super helpful if you're planning your meals ahead of a Vegas trip! https://dennysmenu.us/dennys-10-dollar-menu/
You can listen for TYPE_WINDOW_STATE_CHANGED or TYPE_WINDOW_CONTENT_CHANGED events and check which app or activity is currently in the foreground.
Back press usually results in a window change or app closure, so you can infer it by comparing the current and previous window package names or activity classes.
When Home is pressed, your current app/activity will be replaced by the launcher/home screen.
You can follow the below class for detecting Back and Home button actions using AccessibilityService.
I hope it will be helpful for you
class MyAccessibilityService : AccessibilityService() {
private var previousPackageName: String? = null
override fun onAccessibilityEvent(event: AccessibilityEvent) {
if (event.eventType == AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED) {
val currentPackage = event.packageName?.toString()
// Detect HOME press
if (isLauncherApp(currentPackage)) {
Log.d("AccessService", "Home button pressed")
}
// Detect BACK press (indirectly)
if (previousPackageName != null && currentPackage != previousPackageName) {
Log.d("AccessService", "Possibly back button pressed (window changed)")
}
previousPackageName = currentPackage
}
}
override fun onInterrupt() {}
private fun isLauncherApp(packageName: String?): Boolean {
val intent = Intent(Intent.ACTION_MAIN)
intent.addCategory(Intent.CATEGORY_HOME)
val resolveInfo = packageManager.resolveActivity(intent, PackageManager.MATCH_DEFAULT_ONLY)
return packageName == resolveInfo?.activityInfo?.packageName
}
}
Snapseed, a photo editing app by Google, offers stylish text overlays with clean, minimalist designs. To create text like Snapseed, use bold, simple fonts (like Bebas Neue or Montserrat), add semi-transparent background shapes, and adjust opacity for a soft, modern look. You can replicate this in apps like Canva, Photoshop, or mobile editors by focusing on minimalistic, high-contrast styles.
������ ����!
�� �������� ������ �� ���� (��������)
��� �901��977 ����� ��������� ���������� ���89251913410 ������� 4614 757947 ����� ��?6 ������������ ����� ������ �� ���������� ���. � ��������� ��������� ������� 22.01.2015
Thank you - that worked! I ended up defining a helper function to wrap any string that contains double quotes with escaped quotes and applied it dynamically across all columns in the dataframe. This way, the transformation adapts to whatever structure the incoming data has, without needing to know the column names ahead of time. Appreciate the help!
For me the, Remote-SSH: Uninstall VS Code Server from Host
option worked, the Kill VS Code Server didn't work.
It is requested to please if I can be helped to reinstall VKApp in my device .An easy and early action she'll be highly appreciated.Thanks in anticipation.I am sorry that is difficult for me to do it.I am using Android phone and not an iPhone.
As an addition, because I got here with a similar issue: Don't forget to make your guards request scoped, if your injecting request scoped services.
A bit late but for anyone who find this I would recommand one of 2 options:
templates/{lang}/{page name}.html
and a localized_template
function in viewsPage
modellocalized_template
functionwrite untranslated page templates in language-specific subfolders (ex en/my-page.html
, en-gb/my-page.html
, es/my-page.html
)
write a localized_template
utility function, for ex in an app named my_app
# my_app/views.py
from os import path
from django.http import HttpResponse
from django.shortcuts import render
from django.utils.translation import get_language
def localized_template(name: str) -> str:
return path.join(get_language(), name)
# usable in render like
def my_page(request: HttpRequest) -> HttpResponse:
return render(request, localized_template("my-page.html"))
Page
modelmy_app
# my_app/models.py
from django.db.models import Model, TextField
class Page(Model):
content: TextField[str, str] = TextField()
add django model translation or an equivalent and configure it for your app
setup the model translation
# my_app/translation.py
from modeltranslation.translator import register, TranslationOptions
from .models import Page
@register(Page)
class PageTranslationOptions(TranslationOptions):
fields = ('content',)
After that, how you edit the model is up to you. If you need to persist default data, you could dump it as fixtures:
./manage.py dumpdata my_app.page > default_pages.json
🚀 Flutter Devs!
Ditch heavy emulators. Preview your app instantly with Flutter Web Emulator Extenstion in VS Code – hot reload, real-time updates, multiple device presets & zero CPU stress. 💻🔥
solved this problem by adding asyncio
decorator with loop_scope="session"
for each test case, like:
import pytest
@pytest.mark.asyncio(loop_scope="session")
async def test_some_func():
pass
Preamble
The distribution of print queues to users by group policies is called GPP and not GPO. The main difference between GPO and GPP is: if the applied GPO is no longer applied, the effect does not occur. This does not happen in GPP. If the applied GPP is no longer applied, the effect continues on the client that received it.
Someone might say: "but everyone calls it a GPO". This is a false statement. People who call GPP a GPO actually mean to call it a group policy, in a generic way. Many do not even know the difference between GPP and GPO. Since we believe that we are writing in a technical way, it is more appropriate to use the correct technical terms to designate certain situations and avoid possible ambiguities.
In the case mentioned by @dave-g, a created GPP was modified or deleted. It is necessary to remove the effects of the old GPP. A GPP for distributing print queues usually affects the user profile. So, to the best of my knowledge, the affected branch is HKCU.
So, how do you "act" on the HKCU branch in the context of the "System" account? In theory, the script to modify the HKCU branch needs to be executed in the context of the account, and will only affect the profile of this account. If the account has administrative privileges, the script can act in the context of the machine (HKLM).
Some will say that the System account can act on the HKU branch and affect users. This will only be true for account profiles in memory, such as S-1-5-18, S-1-5-19, S-1-5-20, S-1-5-21-[User SID]
and the profile without an interactive account (.DEFAULT). Profiles that have not been loaded will not be affected. It is possible to act on the branches of all profiles, even if they are not loaded. It is quite complex, so I will not cover it here in this post.
Conclusion: in general, a script will act on the HKLM branch in the context of the account, if it has administrative privileges, or if it is executed by the System account; it will act on the HKCU branch in the context of the account itself and not other profiles; it will act on the HKU branch if the account has administrative privileges, and only profiles loaded in memory will be affected.
1st Draft
The created function has some errors. I will try to explain.
Here is the only syntactical error in the draft presented param([type]$Parameter1 [,[type]$Parameter2])
[string]$KeyName = "',,server-01,printer-01',',,server-01,printer-01'"
[string]$RegistryRoot = "HKLM:, HKCU:"
Parameters must be separated by commas.
Another problem, which is not a syntactic, semantic or logical error. Although quotation marks serve as string delimiters, it is recommended to use an apostrophe when the string is invariable, that is, it does not have a variable between the delimiters. This helps the language interpreter not to analyze the content of the string during execution.
As already mentioned by @mathias-r-jessen, the variable can be a string array.
Here I believe it was the famous "copy and paste". The same value appears twice in the variable "server-01,printer-01".
This is a rare issue, but it could cause problems during execution. Imagine the command del c:*.exe
. If the current folder of the c: drive is "\Windows\System32", the command will be executed in the current folder. To ensure that the reference is from the root of a drive, you should use ":\" and not ":".
So, one way to rewrite such lines would be:
[string[]]$KeyName = @( ',,server-01,printer-01', ',,server-01,printer-02' ),
[string[]]$RegistryRoot = 'HKLM:\', 'HKCU:\'
As already discussed by @mathias-r-jessen, there is no need for the Split
method if the variable is already an array.
$registryPaths = $RegistryRoot.Split(",")
foreach ($root in $registryPaths) {
So, one way to rewrite such lines would be:
$registryPaths |
ForEach-Object {
$root = $PSItem
Since the variable was a string, the like
comparison is inverted, based on the available information. And the property should be PSChildName
and not Name
, since it is a registry item.
Where-Object { $_.Name -like "*$KeyName*" } |
It should be, according to the draft proposal:
Where-Object { $KeyName -like "*'$( $_.PSChildName )'*" } |
But since the variable should be an array, one way to rewrite the line would be:
Where-Object { $PSItem.PSChildName -in $KeyName } |
And finally, there is one more logical error.
Remove-Item -Path $_.FullName -Recurse -Force
In the registry item, as far as I know, there is no FullName
property, but rather PSPath
. One way to rewrite the line would be:
Remove-Item -Path $PSItem.PSPath -Recurse -Force
2nd Draft
Using the Recurse
parameter at the root of a drive may cause some slowness. In this specific case, the paths are known and defined.
A more efficient code to avoid recursion when searching for items with known paths would be:
function Remove-RegistryKey {
param(
[string[]]$KeyName = @( ',,server-01,printer-01', ',,server-01,printer-02' ),
[string[]]$KeyRoot = @( 'Registry::HKCU\Printers\Connections\*',
'Registry::HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Providers\Client Side Rendering Print Provider*\Printers\Connections\*'
)
)
Get-ChildItem -Path $KeyRoot -ErrorAction SilentlyContinue |
Where-Object { $PSItem.PSChildName -in $KeyName } |
ForEach-Object {
try {
Remove-Item -Path $_.FullName -Recurse -Force
Write-Host "Successfully deleted registry key: $($_.FullName)"
} catch {
Write-Warning "Error deleting registry key $($_.FullName): $($_.Exception.Message)"
}
}
}
Example usage:
$KeyNameToDelete = ',,server-01,printer-01'
Remove-RegistryKey -KeyName $KeyNameToDelete
Changing the way printer queues are created
In 1996, when I started working with Windows 95 and Windows NT support, I used "\\server\printer". With AD, we did not create GPP. In 2008, I learned that a local printer queue could have a TCPIP port, without the need for SMB sharing.
The work became much simpler. Before, each user had to capture the printer queue on each computer. With the local queue, the user already had the queue available to him, without needing to capture and without needing to create a print server.
The problem became distributing the printer driver, including the local TCPIP port and creating the queue. Obviously, if the printer is USB, this technique will not work. But we decided to remove the USB printers and put all of them with IP addresses.
I suggest you think about this scenario.
Users with open session (off topic)
As I wrote in the comment to @halfix, I'm adding the code here because the formatting would look really bad. I apologize for continuing the comment this way.
Finding the user with an interactive session is very simple.
$InteractiveSession = ( Get-CimInstance -ClassName 'CIM_UnitaryComputerSystem' ).UserName
Finding the user with an open session using only PowerShell commands is more laborious because Get-Process does not return process ownership information. So all that's left is to use the GetOwner method for each process. I have an inventory, created for my own use, made only in PowerShell. I present an adapted code in this question.
$OpenSession = @{}
$ProcessesToAudit =
'cmd.exe', 'conhost.exe',
'pwsh.exe', 'powershell.exe',
'explorer.exe'
$DoNotFilterProcesses = $true
Get-CimInstance -ClassName 'CIM_Process' |
Where-Object -FilterScript {
$DoNotFilterProcesses -or
$PSItem.Name -in $ProcessesToAudit
} |
ForEach-Object -Process {
$CurrentProcessId = $PSItem.ProcessId
$CurrentProcessName = $PSItem.Name
$CurrentProcess =
Get-Process |
Where-Object -FilterScript {
$PSItem.Id -eq $CurrentProcessId
}
If ( $CurrentProcess ) {
Invoke-CimMethod -InputObject $PSItem -MethodName 'GetOwner' |
ForEach-Object -Process {
$CurrentUserAccount = $PSItem.Domain + '\' + $PSItem.User
If ( $OpenSession[ $CurrentUserAccount ].Count -eq 0 ) {
$OpenSession[ $CurrentUserAccount ] = @()
}
If ( $CurrentProcessName -in $ProcessesToAudit ) {
If ( $CurrentProcessName -notin $OpenSession[ $CurrentUserAccount ] ) {
$OpenSession[ $CurrentUserAccount ] += $CurrentProcessName
}
} Else {
If ( 'various processes' -notin $OpenSession[ $CurrentUserAccount ] ) {
$OpenSession[ $CurrentUserAccount ] += 'various processes'
}
}
}
}
}
I used an online translator. I apologize for not being fluent in the language.
It turned out that you have to pass the "path"-element not the "svg"-element:
const svgXmlShape = this.cache.xml.get(xmlKey) as XMLDocument;
[...svgXmlShape.documentElement.querySelectorAll("svg path")]
.map((svgPath) => {
const vertices = this.Svg.pathToVertices(svgPath, 1)...
On the "Overview" page of the Appylar Android documentation, it says:
Please note that videos are considered as interstitials. That means that in the SDK, you can't choose whether it will be a static or a video ad that is displayed when showing an interstitial.
In other words, if you set AdType.INTERSTITIAL in the init function, your app will display video ads as well.
crontab seems to support declaring variables upfront and substituting them
so this works for me:
SHELL=/bin/bash
log=/var/log/crontab/crontab.
dom=/bin/date +%a.%Y%m%d
ymd=/bin/date +%Y-%m-%d
and use that in
0 12 * * * wget https://example.com/example\_$($ymd)\_file.ext >> $log$($dom).log 2>&1
In the final image, I forgot to specify ENV PATH="/opt/venv/bin:$PATH", even though I mentioned in the question that I had added it. That’s why pip wasn’t available and the installation didn’t work as expected. Thanks everyone for your help and suggestions!
For the dimensions, have you tried
max-height:512px;
max-width:512px;
Use a temporary VBS script to refocus your PowerShell window after launching the process
Start-Process -FilePath "MyProcessPath"
Start-Sleep -Seconds 1
$myWindowTitle = (Get-Process -Id $PID).MainWindowTitle
$tempPath = [System.IO.Path]::GetTempFileName().Replace(".tmp", ".vbs")
$code = @"
Set WshShell = WScript.CreateObject("WScript.Shell")
WScript.Sleep 500
WshShell.AppActivate "$myWindowTitle"
"@
$code | Out-File $tempPath -Encoding ASCII
Start-Process "wscript.exe" $tempPath -Wait
Remove-Item $tempPath
The correct method for establishing the numeric day of the week has been given by multiple contributors "$(date +%u)" but the OP's original logic was flawed. The modulus 7 of the day of the month is not the day of the week!
After add executable link the library using target_link_libraries(main mysql::concpp)
. You don't need to find the library files or define the include directory for this. fund_package ensures that they are populated for your project.
I have been fixed the same issue by doing this -> ( pip uninstall google & pip uninstall google-generativeai ) ( if there are not installed yet, you are good and then; Install the new SDK: (pip install --upgrade google-genai )
I suggest that you remove the float:left on the .navBar button
func body(content: Content) -> some View {
if #available(iOS 18, *) {
content
.onScrollGeometryChange(for: CGFloat.self, of: \.contentSize.height) {
if $1 > 0 {
height = $1
}
I resolved this issue by creating a fresh Android project for my Flutter application.
The Unity player activity was closing the process on quit, So I ran it on another process (via android:process=":Unity" in the AndroidManifest.xml) and it works
Try doing:
!pip install --upgrade torch torchvision
This should solve the basic problem.
You’re seeing Error: SSE connection not established
because MCP Inspector always negotiates an SSE layer even if your server uses STDIO, and without a real SSE endpoint it bails out on /message
after setup. To fix this, you have four main paths: (1) make the Inspector spawn your server via STDIO with the exact Python binary and env, (2) switch your server to SSE transport so Inspector’s expectations match, (3) stick with STDIO but front it with an mcp-proxy stdio→sse
bridge, or (4) grab a more flexible MCP client like OmniMind that lets you declare transports in a JSON config. Each approach has its own pros and cons—read on for the breakdown.
In Inspector’s “Connect” pane choose STDIO, then supply the full path to your Python interpreter and explicitly set PYTHONPATH
so that your virtual‑env is used.
Example command:
C:\path\to\venv\Scripts\python.exe -m mcp run src/server.py
Make sure your PowerShell or terminal session activates the same venv before launching Inspector.
mcp
installed, the JSON‑RPC handshake never completes.Pros | Cons |
---|---|
No extra dependencies | Still ties you to Inspector quirks |
Stays purely STDIO | Requires careful path/env management |
In your server.py
, run the MCP server over SSE instead of STDIO:
if __name__ == "__main__":
mcp.run(transport="sse", port=6278)
In Inspector, pick SSE and point it at http://127.0.0.1:6278/sse
.
Pros | Cons |
---|---|
Direct SSE connection → no proxies | Requires you to host an HTTP endpoint |
Inspector just works | May clash with firewalls or CORS if remote |
Install the proxy:
npm install -g @modelcontextprotocol/mcp-proxy
Launch it in stdio→sse mode:
mcp-proxy stdio-to-sse http://localhost:6278 --command python --args "src/server.py"
In Inspector, connect via SSE to http://127.0.0.1:6278/sse
.
mcp-proxy
handles the transport translation.Pros | Cons |
---|---|
Keeps server code untouched | Adds an extra moving part |
Works locally without HTTP setup | Another dependency to maintain |
If you’d rather avoid Inspector’s tight coupling, OmniMind lets you declare every server and transport in a simple JSON, then spin up an MCP client in Python with two lines:
pip install omnimind
from omnimind import OmniMind
agent = OmniMind(config_path="servers.json")
agent.run()
Your servers.json
might look like:
{
"mcpServers": {
"server_name": {
"command": "command_to_run",
"args": ["arg1", "arg2"],
"env": {
"ENV_VAR": "value"
}
}
}
}
With OmniMind you get full, code‑free control over which transport to use and how to structure the request—no more Inspector guesswork.
Pros | Cons |
---|---|
Totally declarative | New library to learn |
Works headlessly (no GUI) | May miss some Inspector‑only niceties |
Lets you script multiple servers | Less visual debugging than Inspector |
By the way, OmniMind is that slick MCP client I found on GitHub—really lightweight, setup with just a couple lines of Python, and zero expensive API requirements. Perfect for anyone wanting a no‑fuss, budget‑friendly MCP setup. Check it out:
- Repo: https://github.com/Techiral/OmniMind
- Docs & examples: https://techiral.mintlify.app
Pick the path that fits your workflow, and you’ll have a smooth MCP connection in no time—no more SSE connection not established
headaches!
</div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
I had same issue on MediaTek SOC model.
I upgraded to flutter 3.29.3 and the problem was solved.
MediaTek's Vulkan might have some bug.
(flutter/164126 - On android use Open GL instead of Vulkan MediaTek Soc.)
.apply(np.linalg.norm, axis=1)
Is probably preferable since it is clearer, but when I'm just doing scratch work I often use:
df[list('xyz')].pow(2).sum(axis=1).pow(.5)
Here is an alternative solution that uses array-based formulas like MAP
, BYROW
, LAMBDA
. Some users may not be able to use Apps Script (due to employer restrictions) or string-hacking methods (due to side effects on type conversion), so this solution would work for them. It also generalizes to multiple-column tables, i.e., it will combine multiple columns from the two tables.
Definitions. In your example, we'll assume Table1 is in a range on one sheet (TableA!A1:B3
) and Table2 is in a range on another (TableB!A1:B5
). The desired result will go into the range 'Result set'!A1:B6
. (I edited your question to indicate the assumed ranges of each example table so I can reference them better; I chose range specifiers that are consistent with pre-existing answers.)
Formula. The formula below defines a lambda function with four parameters, and then invokes it using the following ranges fromm your exmaple tables as arguments.
parameter | argument |
---|---|
data_left |
Table1!A2:A4 |
keys_left |
Table1!A2:A4 |
data_right |
Table2!A2:A5 |
keys_right |
Table2!B2:B5 |
= LAMBDA(
data_left, keys_left, data_right, keys_right,
LET(
index_left, SEQUENCE( ROWS( keys_left ) ),
matches, MAP( index_left, keys_left, LAMBDA( id_left, key_left,
LET(
row_left, XLOOKUP( id_left, index_left, data_left ),
matches_right, IFERROR( FILTER( data_right, keys_right = key_left ), ),
TOROW( BYROW( matches_right, LAMBDA( row_right,
HSTACK( row_left, row_right )
) ) )
)
) ),
wrapped, WRAPROWS( FLATTEN(matches), COLUMNS(data_right) + COLUMNS(data_left) ),
notblank, FILTER( wrapped, NOT(ISBLANK(CHOOSECOLS(wrapped, 1))) ),
notblank
)
)( `Table1!A2:A4`, `Table1!A2:A4`, `Table2!A2:A5`, `Table2!B2:B5` )
How it works?
index_left
: Create a temporary, primary-key array to index the left table, so you can retrieve rows from it later.matches
: For each value in the index:
row_left
: XLOOKUP
the corresponding row from data_left
matches_right
: use FILTER
to find all matching rows in the data_right
; or NA()
if there were nonematches_right
(or NA()
if no matches), concatenate it with a copy of row_left
TOROW()
to flatten the resulting array into a single row, because MAP
can return 1D array for each value of the index but not 2D array. (This makes a mess but we fix it later.)wrapped
: The resulting array will have as many rows as the filtered index, but number of columns will vary depending on the maximum number of matches for any given key. Use WRAPROWS
to properly stack and align matching rows. This leads to a bunch of empty blank rows but ...notblank
: ... those are easy to filter out.Generalize. To apply this formula to other examples, just specify the desired ranges (or the results of ARRAYFORMULA
or QUERY
operations) as arguments; keys_left
and keys_right
must be single column but data_left
and data_right
can be multi-column and the resulting array will contain all columns of both. (If you expect to use this a lot, you could create a Named Function with the four parameters as "Argument placeholders", and with the body of the LAMBDA
as the "Function definition".)
Named Function. If you just want to use this, you can import the Named Function LEFTJOIN
from my spreadsheet functions. That version assumes the first row contains column headers. See documentation at this GitHub repo.. Screenshot below shows application of this named function in cell I1: ="LEFTJOIN( E:G, F:F, B:C, A:A)"
. Note that numeric-type data in the source tables remain same type in the result.
Your problem is similar to mine. I used 'dmctl replace'.
On a Pixel 7a with LineageOS, adb remount fails with "failed to remount partition dev:/dev/block/dm-0 mnt:/: Permission denied" or mount fails with "/dev/block/dm-0 is read-only" because Device Mapper (dmctl) locks partitions as read-only due to dm-verity and A/B partitioning.
The alternative to using the --privileged
flag is:
--security-opt systempaths=unconfined --security-opt apparmor:unconfined
this will allow you to run the following commands in the container as mentioned in the blog provided by @deadcoder0904:
sysctl vm.overcommit_memory=1
# OR
echo 1 > /proc/sys/vm/overcommit_memory
Room requires DELETE queries to return either void
(Unit) or int
(number of rows deleted).
Have you figured this issue out? I am currently experiencing the same problem and need some assistance.
What about this?
class EntryPoint {
public object $privateCollaborator;
public function __construct() {
$this->privateCollaborator = self::getPrivateCollaborator();
}
private static function getPrivateCollaborator() {
return new class {
};
}
}
$entryPoint = new EntryPoint();
I sometimes use it so as not to dirty the LSP-Intelephense autocomplete in Sublime Text. If I remove the object type to the property at the entrance point, LSP-Intelephense will recognize the reference of the object, being able to self-fulfill the members of that collaborator
@Ram's if the output section is required and you want to disable logs globally (not sure if it is) you could use the null output which will sink the data.
[OUTPUT]
Name null
Match *
Hello did you find any answers please?
In my case (this had worked)
$ git pull --rebase
$ git push
I also wasted my 1-2 hours to figure it out, and finally found this
$mail->getSMTPInstance()->Timelimit = 5; // in sec
Credit: https://know.mailsbestfriend.com/phpmailer_timeout_not_working--1756656511.shtml
@Jorj X. McKie : Please share your view on this, how can i get all such components extracted from pdf - specially table lines, table cell colour which is present in background of text and how can i recreated the new pdf using extracted features.
I've debugged a similar problem once. For me, my memory issue was caused by hung threads which would continue to consume resources. You may want to log the start and end of your request handlers, and make sure that all of your requests are getting to the end (cloudwatch insights queries could help count this). You could also create a second sidecar that is not receiving any load, and check if the memory is still increasing (of course if so, then there's some independent issue -- like possibly not your python app).
SELECT patient_id,diagnosis FROM admissions
GROUP BY patient_id,diagnosis
HAVING COUNT(diagnosis = diagnosis) > 1;
To find out the database time zone use the following query:
SELECT DBTIMEZONE FROM DUAL;
To find out the current session time zone use the following query:
SELECT SESSIONTIMEZONE FROM DUAL;
I tried many Ways to eliminate this issue, I Give Up.
can i use this with my phone hehe
The problem was in the Clipper Library. I filed a bug report in GitHub and a fix has now been released. I have tested the fix with this particular example and can confirm that the correct result was returned.
Finally I found it. You must add routeback option to wg0 interface in /etc/shorewall/interfaces file.
I am having the same issue in april 2025. It's been like that for a few days. Resetting my internet, updating expo-cli, making sure I'm logged in, nothing seems to work. Any new discoveries on what might be causing this issue?
Just in case anybody else runs into this issue:
Format the information as TEXT, not DATE. Then LibreOffice will stop trying to be smart and just use the values provided
from pydub import AudioSegment
from pydub.generators import Sine
# Create a short placeholder audio (1 second sine wave) while we prepare the real audio
# This acts as a placeholder for the real narrated and sound-designed audio
tone = Sine(440).to_audio_segment(duration=1000) # 1 second of a 440 Hz tone
# Export as MP3
output_path = "/mnt/data/a_grande_aventura_na_balanca.mp3"
tone.export(output_path, format="mp3")
output_path
Win + R > ncpa.cpl > choose your network > properties > IPv4 > properties
if checked on > Obtain DNS server address automatically
Try this > Prefered DNS server (8.8.8.8) & Alternative DNS server (8.8.0.0)
if checked on > Use the following DNS server address
Try this > Check on > Obtain DNS server address automatically
Check of your proxies.
Check of VPN.
Check of browser extentions > Try to disable them.
The problem is this ->
client.on('message', (message) => { ... }
there is no event name called "message". change to this ->
client.on('messageCreate', (message) => { ... }
This isn't too hard. Assume we have at least two zeroes to begin with:
+[->+>[<-]<]>>
This leaves the pointer at the first nonzero.
Also worth noting, if you want to look for a specific value--say, a 4:
----[++++>----]++++
Win + R > ncpa.cpl > choose your network > properties > IPv4 > properties
if checked on > Obtain DNS server address automatically
Try this > Prefered DNS server (8.8.8.8) & Alternative DNS server (8.8.0.0)
if checked on > Use the following DNS server address
Try this > Check on > Obtain DNS server address automatically
Check of your proxies.
Check of VPN.
Check of browser extentions > Try to disable them.
The problem indicates that, you are trying to use a deleted function. Some of automatic methods generated by the compiler(for ex: copy constructors), are deleted by developer in order to prevent unwanted implicit operations. On your answer by using pass by reference, for the _dst argument, you prevented unnecessary generation of a new cv::Mat& type as the function argument. That would also trigger a copy constructor of cv::Mat&, instead, the function took the original _dst, therefore a deleted copy constructor call is evaded.