facing same issues, what combination of recent packages work? any idea?
I suggest using this plugin developed by me, vim-simple-guifont
: https://github.com/awvalenti/vim-simple-guifont
Then you can simply do:
silent! call simple_guifont#Set(['Monaco New'], 'monospace', 11)
For more details, please check the plugin page on GitHub.
I've written the occasional extension method in situations where it seemed to make sense, and I absolutely love what you can do with Linq, but I think there's one major drawback to the overuse of extension methods that no one else here has mentioned.
They can be a nightmare for Unit Testing, as they can severely complicate the process of Mocking public interfaces.
Numerous times now, I've approached writing a unit test that seems like it will be pretty straight forward. The method I'm testing has a dependency on an external service (ISomeService) and is calling the .Foo() method on that service.
So I create a mock ISomeService object using Moq or any other mocking framework, and go ahead and attempt to mock the Foo() call, only to discover that Foo() is an extension method. So now I have to dig into third party extension method code to try and figure out what actual member of the ISomeService interface is being ultimately being called by the Foo() extension method. And maybe Foo() calls Foo(int, string) which is also an extension method and that calls Foo(int, string, SomeEnumType, object[]), and on and on it goes until eventually I find where its actually calling a method that's actually a member of an the ISomeService interface.
And that's if I'm lucky enough to find that my original Foo() call ultimately maps to just one invocation on the actual interface. If I'm unlucky, I may dig through a tangled web of third party extension method code to ultimately find calls to ISomeService.Bar(), ISomeService.Blam(string, bool), ISomeService.Fizzle(object[]), and ISomeService.Whomp(IEumerable<Task<bool>>). And now I need to figure out how to mock all those invocations just to adequately mock my one simple call to the Foo() extension method.
And that's not even the worst case scenario. Sometimes that tangled web of extension methods ends up referencing and passing around instances of types that are internal to those third party libraries, so I don't even have access to directly reference the types in my mocks. And all this time I'm screaming in my head, "Did you REALLY need to put all this stuff in extension methods??? Just make Foo() part of the interface!"
So, I would say if you're working on library code that's meant to be consumed by third parties, have mercy on those of us who just want to write good, well-tested code and use extension methods sparingly.
You are right. As of now, this feature is not yet supported by the WhatsApp Business API.
Exactly what I've been searching for forever. Thanks so much.
The error message you’ve encountered might be due to your bot not getting the response in time. Take note that the chat app must send a response within 30 seconds of receiving the event.
Another reason could be that the received response was not formatted correctly. Make sure that your bot follows the JSON format or else it will reject it and return that error message. You can refer to the documentation about responding to interaction events for more information.
This project's configure file will build shared libraries by default. If you run the configure script with the --disable-shared
flag, then it will build the static (*.a) version instead.
Of course, we can come up with a solution where we will use 'c4'
, but I see the solution this way.
We can bring to the form you need with the help of an auxiliary column 'group'
. It will help us to index the values for future transformation.
Now we will write a function that will create a pd.Series
. We take the values and place them into one array using flatten()
.
def grouping(g):
return pd.Series(g[['c1', 'c2', 'c3']].values.flatten(),
index=[f'c{i+1}' for i in range(9)])
We apply the function to the grouped DataFrame
by the auxiliary column 'group'
.
Full code:
import pandas as pd
data = {
'c1': [1, 10, 100, 1, 10, 100],
'c2': [2, 20, 200, 2, 20, 200],
'c3': [3, 30, 300, 3, 30, 300],
'c4': [0, 1, 2, 0, 1, 2]
}
df = pd.DataFrame(data)
df['group'] = df.index // 3
def grouping(g):
return pd.Series(g[['c1', 'c2', 'c3']].values.flatten(),
index=[f'c{i+1}' for i in range(9)])
transformed_df = df.groupby('group').apply(grouping).reset_index(drop=True)
I have updated the sub posted by @xiaoyaosoft using the CompactDatabase method as suggested by @June7. Tested for all combinations of setting changing, or removing a password, and also encrypting or decrypting the database. I didn't look at the database files at a low level after any of these changes to see what effect the encryption process has - I merely verified that it could be opened and read in Access after each change.
' Procedure : Set_DBPassword
' Author : Daniel Pineault, CARDA Consultants Inc.
' Website : http://www.cardaconsultants.com
' Purpose : Change the password of any given database
' Copyright : The following may be altered and reused as you wish so long as the
' copyright notice is left unchanged (including Author, Website and
' Copyright). It may not be sold/resold or reposted on other sites (links
' back to this site are allowed).
'
' Input Variables:
' ~~~~~~~~~~~~~~~~
' sDBName : Full path and file name with extension of the database to modify the pwd of
' sOldPwd : Existing database pwd - use "" if db is unprotected
' sNewPwd : New pwd to assign - Optional, leave out if you wish to remove the
' existing pwd
' bEncrypt : Encrypt the database if adding a new password, or decrypt it if removing
' (has no effect if only changing an existing password)
'
' Usage:
' ~~~~~~
' Set a pwd on a db which never had one
' Set_DBPassword "C:\Users\Daniel\Desktop\db1.accdb", "", "test"
'
' Clear the password on a db which previous had one
' Set_DBPassword "C:\Users\Daniel\Desktop\db1.accdb", "test", "" 'Clear the password
'
' Change the pwd of a pwd protected db
' Set_DBPassword "C:\Users\Daniel\Desktop\db1.accdb", "test", "test2"
'
' Revision History:
' Rev Date(yyyy/mm/dd) Description
' **************************************************************************************
' 2 2025-Aug-20 Made work for to or from blank password (by MEM)
' 1 2012-Sep-10 Initial Release
'---------------------------------------------------------------------------------------
Private Sub Set_DBPassword(sDBName As String, sOldPwd As String, Optional sNewPwd As String = "", Optional bEncrypt As Boolean = False)
On Error GoTo Error_Handler
Dim db As DAO.Database
'Password can be a maximum of 20 characters long
If Len(sNewPwd) > 20 Then
MsgBox "Your password is too long and must be 20 characters or less." & _
" Please try again with a new password", vbCritical + vbOKOnly
GoTo Error_Handler_Exit
End If
'Could verify pwd strength
'Could verify ascii characters
If sOldPwd = vbNullString And sNewPwd <> vbNullString Then ' use temporary file
If bEncrypt Then
DBEngine.CompactDatabase sDBName, sDBName & ".$$$", dbLangGeneral & ";pwd=" & sNewPwd, dbEncrypt
Else
DBEngine.CompactDatabase sDBName, sDBName & ".$$$", dbLangGeneral & ";pwd=" & sNewPwd
End If
Kill sDBName
Name sDBName & ".$$$" As sDBName
ElseIf sOldPwd <> vbNullString And sNewPwd = vbNullString Then ' use temporary file database
If bEncrypt Then
DBEngine.CompactDatabase sDBName, sDBName & ".$$$", dbLangGeneral & ";pwd=" & sNewPwd, dbDecrypt, ";pwd=" & sOldPwd
Else
DBEngine.CompactDatabase sDBName, sDBName & ".$$$", dbLangGeneral & ";pwd=" & sNewPwd, , ";pwd=" & sOldPwd
End If
Kill sDBName
Name sDBName & ".$$$" As sDBName
Else
Set db = OpenDatabase(sDBName, True, False, ";PWD=" & sOldPwd) 'open the database in exclusive mode
db.NewPassword sOldPwd, sNewPwd 'change the password
End If
Error_Handler_Exit:
On Error Resume Next
kill sDBName & ".$$$"
db.Close 'close the database
Set db = Nothing
Exit Sub
Error_Handler:
'err 3704 - not able to open exclusively at this time, someone using the db
'err 3031 - sOldPwd supplied was incorrect
'err 3024 - couldn't locate the database file
MsgBox "The following error has occurred." & vbCrLf & vbCrLf & _
"Error Number: " & Err.Number & vbCrLf & _
"Error Source: Set_DBPassword" & vbCrLf & _
"Error Description: " & Err.Description, _
vbCritical, "An Error has Occurred!"
Resume Error_Handler_Exit
End Sub
'from :https://www.devhut.net/ms-access-vba-change-database-password/
Use the Oauth instead don't use the PAT it's not recommended/not secure
here are the steps
https://docs.databricks.com/aws/en/admin/users-groups/manage-service-principals
Not all of the mapbox examples include all the elements in a form, but in the documentation, it's states "Eligible inputs must be a descendant of a element,".
I had missed the form requirement the first time and got inconsistent performance. Once I wrapped those fields in a form, it all worked well.
This might be an Xcode issue. I found an open GitHub thread that seems related to your issue, and it includes a list of workarounds from other developers that might help you gain insights into the issue you're encountering.
I have the same problem. Since Anaconda managed my Python environment, I generated a requirement.txt file using pip, and created a virtual environment as indicated by PzKpfwlVB including auto_py_to_exe. As a result, I was able to generate the executable file including pyside6.
I was able to correctly convert diacritic characters to their lowercase counterparts by creating the following auxiliary table with two columns and inserting pairs of diacritic characters in lower and upper case.
CREATE TABLE Latin1Accents (
UCASE STRING,
LCASE STRING
);
INSERT INTO Latin1Accents (UCASE, LCASE) VALUES
('À', 'à'),
('Á', 'á'),
('Â', 'â'),
('Ã', 'ã'),
('Ä', 'ä'),
('Å', 'å'),
('Ç', 'ç'),
('È', 'è'),
('É', 'é'),
('Ê', 'ê'),
('Ë', 'ë'),
('Ì', 'ì'),
('Í', 'í'),
('Î', 'î'),
('Ï', 'ï'),
('Ñ', 'ñ'),
('Ò', 'ò'),
('Ó', 'ó'),
('Ô', 'ô'),
('Õ', 'õ'),
('Ö', 'ö'),
('Ù', 'ù'),
('Ú', 'ú'),
('Û', 'û'),
('Ü', 'ü'),
('Ý', 'ý');
A CASE is used to verify if the UNICODE representation of the first character in the string is above 127, in order to find out if the character could be a diacritic one. If not, the lower function is used to convert the character. However, if the UNICODE value is above 127, a subquery is used to look for the lowercase representation of that character in the Latin1Accents auxiliary table. If the lowercase character could not be found in that table, the original character is returned.
SELECT Customer_Name,
SUBSTR (Customer_Name,1,1) as "First Letter", UNICODE (SUBSTR (Customer_Name,1,1)) ,
CASE
WHEN UNICODE (SUBSTR (Customer_Name,1,1)) > 127 THEN
(SELECT CASE WHEN LCASE IS NULL THEN SUBSTR (Customer_Name,1,1) ELSE LCASE END
FROM Latin1Accents
WHERE UCASE = SUBSTR (Customer_Name,1,1) )
ELSE
LOWER (SUBSTR (Customer_Name,1,1))
END as "First Letter in Lowercase"
FROM Customer
2-Install the package:
pip install supervision
# or
pip3 install supervision
In https://deepai.org/machine-learning-glossary-and-terms/affine-layer I have found the following:
"Mathematically, the output of an affine layer can be described by the equation:
output = W * input + b
where:
W is the weight matrix.
input is the input vector or matrix.
b is the bias vector.
This equation is the reason why the layer is called "affine" – it consists of a linear transformation (the matrix multiplication) and a translation (the bias addition)."
Solution does not work for forge 1.21.8
cannot find symbol
symbol: method getModEventBus()
location: variable context of type FMLJavaModLoadingContext
Maybe it's the new version of API Platform (4.1 now), but the config parameter worked for me as charm. Just where you'd written.
The main point for me was to find all ManyToMany relations )
When you are using Bramus Router in PHP, and defining routes that point to a static method , that static method must be declared with public
visibility.
Example:
$router->get(
pattern: '/hr/users',
fn: [UserController::class, 'index']
);
When installing Git and Visual Studio Code, please refer to their official documentation to install it. I would recommend doing these rather than installing Ubuntu's snap packages as they tend to be slower in performance.
And of course, you are using Ubuntu which is Debian-based so installing a debian package should be great and smooth for you.
For Git:
https://git-scm.com/downloads/linux
#For the latest stable version for your release of Debian/Ubuntu
apt-get install git
# For Ubuntu, this PPA provides the latest stable upstream Git version
add-apt-repository ppa:git-core/ppa
apt update; apt install git
For Visual Studio Code:
Download the .deb (Debian, Ubuntu) under Linux category.
https://code.visualstudio.com/download
# After downloading it, install it using the following command
sudo apt install ./code-latest.deb
After doing all of these, it should be working out of the box now. Enjoy coding!
JEP-488 released with Java 24, adds support for primitive types in instanceof
operators. This means you can now simply write:
b instanceof byte
To upload a Next app to IIS, you can follow these steps:
1- Install the following modules
IIS NODE
https://github.com/Azure/iisnode/releases/tag/v0.2.26
URL REWRITE
https://www.iis.net/downloads/microsoft/url-rewrite
Application Request Routing
https://www.iis.net/downloads/microsoft/application-request-routing
2- Create a folder on your C disk and pass the following:
The .next folder you get when you do npm run build.
The public folder
The node_modules
3- Create a server.js file in your folder with the following information.
const { createServer } = require("http");
const { parse } = require("url");
const next = require("next");
const dev = process.env.NODE_ENV !== "production";
const port = process.env.PORT ;
const hostname = "localhost";
const app = next({ dev, hostname, port });
const handle = app.getRequestHandler();
app.prepare().then(() => {
createServer(async (req, res) => {
try {
const parsedUrl = parse(req.url, true);
const { pathname, query } = parsedUrl;
if (pathname === "/a") {
await app.render(req, res, "/a", query);
} else if (pathname === "/b") {
await app.render(req, res, "/b", query);
} else {
await handle(req, res, parsedUrl);
}
} catch (err) {
console.error("Error occurred handling", req.url, err);
res.statusCode = 500;
res.end("internal server error");
}
})
.once("error", (err) => {
console.error(err);
process.exit(1);
})
.listen(port, async () => {
console.log(`> Ready on http://localhost:${port}`);
});
});
4- Configuration in the IIS
We check if we have our modules installed; we do this by clicking on our IIS server.
Then we click on modules to see the IIS NODE.
After that, we select feature delegation.
and verify that the controller mappings are read and write.
then we create our website in the IIS and reference the folder we created, click on the website and enter controller assignments
Once inside we click on add module assignments, in Request Path we put the name of the js file in this case "server.js", in module we select iisnode and in name we place iisnode.
We give him accept; This will create a configuration file in our folder called "Web". Open it and place this:
<!-- First we consider whether the incoming URL matches a physical file in the /public folder -->
<rule name="StaticContent">
<action type="Rewrite" url="public{REQUEST_URI}"/>
</rule>
<!-- All other URLs are mapped to the node.js site entry point -->
<rule name="DynamicContent">
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="True"/>
</conditions>
<action type="Rewrite" url="server.js"/>
</rule>
</rules>
</rewrite>
<!-- 'bin' directory has no special meaning in node.js and apps can be placed in it -->
<security>
<requestFiltering>
<hiddenSegments>
<add segment="node_modules"/>
</hiddenSegments>
</requestFiltering>
</security>
<!-- Make sure error responses are left untouched -->
<httpErrors existingResponse="PassThrough" />
<iisnode node_env="production"/>
<!--
You can control how Node is hosted within IIS using the following options:
* watchedFiles: semi-colon separated list of files that will be watched for changes to restart the server
* node_env: will be propagated to node as NODE_ENV environment variable
* debuggingEnabled - controls whether the built-in debugger is enabled
See https://github.com/tjanczuk/iisnode/blob/master/src/samples/configuration/web.config for a full list of options
-->
<!--<iisnode watchedFiles="web.config;*.js"/>-->
</system.webServer>
We stop our site in the IIS, update and upload the site.
Not necessarily. You can override the certificate check with a change to the sys_properties... helps with troubleshooting connections when certs are an issue...
com.glide.communications.httpclient.verify_hostname = false
You need an _eq_ in Point. Otherwise, Python is comparing two objects by their addresses, and always coming up False.
class Point:
def __init__(self, x, y):
self.x = x
self.y = y
def __eq__(self, other):
if not isinstance(other, Point):
return False
return self.x == other.x and self.y == other.y
$sql = "SELECT SUBSTRING(SUBSTRING_INDEX(`COLUMN_TYPE`,'\')',1),6) as set_str FROM `information_schema`.`COLUMNS` WHERE `TABLE_SCHEMA` = 'db' AND `TABLE_NAME` = 'tbl' AND `COLUMN_NAME` = 'col'";
$set_h = mysqli_query($c,$sql);
if (!$set_h){
echo "ERROR: ".$sql;
return;
}
if (mysqli_num_rows($set_h)!=0){
$set_str = mysql_result($set_h,0,'set_str');
echo $set_str.'<br>';
$type_a = explode("','",$set_str);
print_r($type_a);
}
return;
same issue im also facing pls someone help
Getting below error with WebDriverIO v9.19.1.
By default the credentials are being set with my company’s user profile. How to fix this?
Please remove "incognito" from "goog:chromeOptions" args* as it is not supported running Chrome with WebDriver.
WebDriver sessions are always incognito mode and do not persist across browser sessions.
JEP-488 released with Java 24, adds support for primitive types in instanceof
operators. This means you can now simply write:
b instanceof byte
Figured it out eventually. The company uses a complicated system of profiles, and the profile used for tests contains a (well-hidden) spring.main.web-application-type: none
. Which earlier did not prevent MockMVC from autowiring somehow. But now this property is parsed correctly, and the application is not considered a web application, so no WebApplicationContext, so no MockMVCs. The solution is to set type to servlet.
This is what worked for me. Put the entry.Text inside the Dispatcher.
https://github.com/dotnet/maui/issues/25728
Dispatcher.DispatchAsync(() =>
{
if (sender is Entry entry)
{
entry.Text = texto.Insert(texto.Length - 2, ",");
entry.CursorPosition = entry.Text.Length;
}
});
I'm also facing the same issue in a Next.js project.
❌ Problem
When trying to use node-llama-cpp
with the following code:
import { getLlama, LlamaChatSession } from "node-llama-cpp";
const llama = await getLlama();
I got this error:
⨯ Error: require() of ES Module ...node_modules\node-llama-cpp\dist\index.js from ...\.next\server\app\api\aa\route.js not supported. Instead change the require of index.js to a dynamic import() which is available in all CommonJS modules.
✅ Solution
Since node-llama-cpp
is an ES module, it cannot be loaded using require()
in a CommonJS context. If you're working in a Next.js API route (which uses CommonJS under the hood), you need to use a dynamic import workaround:
const nlc: typeof import("node-llama-cpp") = await Function(
'return import("node-llama-cpp")',
)();
const { getLlama, LlamaChatSession } = nlc
This approach uses the Function
constructor to dynamically import the ES module, bypassing the CommonJS limitation.
📚 Reference
You can find more details in the official node-llama-cpp troubleshooting guide.
https://github.com/thierryH91200/WelcomeTo and also
https://github.com/thierryH91200/PegaseUIData
I wrote this application in Xcode style.
look at class ProjectCreationManager
maybe this can help you
I do not know what buildozer version do you have instaled but distutils is been used in buildozer/targets/android.py https://github.com/kivy/buildozer/blob/7178c9e980419beb9150694f6239b2e38ade80f5/buildozer/targets/android.py#L40C1-L40C43
The link I share is from the latest version of that package so I think you should or ignore the warning or look for an alternative for that package.
I hope it helps
I have seen this when working with java classes. If I try to set the breakpoint on the member variable declaration then it adds a watchpoint instead of a breakpoint. It doesn't seem to matter if I am both declaring and initializing the member variable or just declaring it ... it will only add watchpoints at that location.
If inside one of my member methods I try to add a breakpoint to a local variable declaration it will not add anything at all. Inside the member method if I try to add a breakpoint on just about any other line of code, such as assigning a value to the local or member variable, then it does set a breakpoint.
After trying using even WinDbg, I got it working by recreating my Release profile and building it as Release. I don't know why Debug was not working, if it was a debug define
that Visual Studio set, or one of the many different flags used between both profiles. An exact copy from the Debug profile didn't work, so I had to make an actual Release, including optimization flags, etc. Both the Dll and the Console App started working after compiling as Release.
This is why you should never transfer binary numbers between different systems. You can also run into codepage issues, Always convert the numbers to character format.
In your example, it will not stop executing on the first reply. Meaning that your code will continue through the rest of the function which @dave-newton mentioned in their comment. The docs they show it is not necessary, so I think the correct way to structure it is like this:
if (!transaction) {
return rep.code(204).send({ message: 'No previously used bank found' })
}
rep.code(200).send(transaction) // don't send if equals !transaction
I believe this is specific to using an emulator API level less than 36 with more recent versions of firebase.
I think "NetworkCapability 37 out of range" is referencing Android's NetworkCapabilities.NET_CAPABILITY_NOT_BANDWIDTH_CONSTRAINED (constant: 37) which was added in API 36.
I got the same error when using an API 35 emulator and it went away when using API 36.
Thank you @Glad1atoR and @j.f. for pointing out it was an emulator specific error.
That means airflow was not able to pull the data, probably you havent placed the xcom data in the right place. also note that you would not find anything in the xcom side car logs, The objective of the xcom side car is to keep the pod alive while the airflow pulls xcom values. check the watcher pod-logs. Probably it will tell you why.
In the first case, the pattern works 2 times: for 30 x 4
and for 0 x 9
00
In the second case, only once for 3 x 4
and then for x 90
there is no longer a match.
And in general, isn't it easier to replace spaces with the necessary characters?
local s = "3 x 4 x 90"
s = s:gsub('%s+', '\u{2009}')
print (s)
Result:
3u{2009}xu{2009}4u{2009}xu{2009}90
This is an ugly one-liner that I use to calculate the maximum number of parallel jobs I can build flash-attn on a given nvidia/cuda machine. I've had to build on machines that were RAM-constrained and others that were CPU-constrained (ranging from Orin AGX 32GB to 128vCPU AMD with 1.5TB RAM and 8xH100).
Each job maxes out around 15GB of RAM, and each job will also max out around 4 threads. The build will likely crash if we go over RAM, but will just be slower if we go over threads. So I calculate the lesser of the two for max parallelization in the build.
YMMV, but this is the closest I've come to making this systematic as opposed to experiential.
export MAX_JOBS=$(expr $(free --giga | grep Mem: | awk '{print $2}') / 15); proc_jobs=$(expr $(nproc) / 4); echo $(($proc_jobs < $mem_jobs ? $proc_jobs : $mem_jobs)))
Thanks @John Polo for spotting an issue. Eventually, I realized there were other two important problems in the loop I was creating:
The subset() call was not triggering any warning so it could not work properly anyway. In order to trigger it, I had to call values() but to avoid printing the results I embedded it into invisible(). I could have called other functions too to trigger the warning, but I opted for values() believing it to be pretty fast.
You cannot assign a matrix to a SpatRaster layer. So what I did was just to subset the original SpatRaster to that specific layer and fill it with NAs.
Here it is the solution to my problem in the form of a function. Hopefully others might find it helpful, even though I am sure some spatial analysis experts could come up with a way more efficient version.
# Function to repair a possibly corrupted SpatRaster
fixspatrast <- function(exporig) {
# Create a new SpatRaster with same structure, all NA
expfix <- rast(exporig, vals = NA)
for (lyr in 1:nlyr(expfix)) {
tryCatch({
lyrdata <- subset(exporig, lyr)
invisible(values(lyrdata)) # force read (triggers warning/error if unreadable)
expfix[[lyr]] <- lyrdata
}, warning = function(w) {
message("Warning in layer ", lyr, ": ", w$message)
nalyr <- subset(exporig, lyr)
nalyr[] <- NA
names(nalyr) <- names(exporig)[lyr] # keep name
expfix[[lyr]] <- nalyr
})
}
return(expfix)
}
One way around to avoid this error is the following:
crs_28992 <- CRS(SRS_string = "EPSG:28992")
slot(d, "proj4string") <- crs_28992
*You need packge 'sp'
** Applied with OS Windows 11
When you connect with the GUI, you select "Keep the VM alive for profiling" in the session startup dialog:
Just in case it can help everyone in this thread, I created a package based on the @AntonioHerraizS and @Ben answers to easily print any request or response easily with rich support.
If anyone is interested, you can find it here: github.com/YisusChrist/requests-pprint. The project currently supports requests and aiohttp libraries (with their respective cache-versions as well).
I hope you will find it helpful.
There is an issue related to this which is already raised in the repo : https://github.com/Azure/azure-cli/issues/26910
If you are looking for an alt option you can look into this documentation : https://docs.azure.cn/en-us/event-grid/enable-identity-system-topics
Which does it through the interface.
This solved the issue for me:
Go to your extensions
Search for GitHub Copilot
Click disable
Restart the extension
You can help out type inference by tweaking makeInvalidatorRecord
to be type-parameterized over the invalidators' argument types. This is easier to explain in code than prose.
Instead of this:
type invalidatorObj<T extends Record<string, unknown>> = {
[K in keyof T]: T[K] extends invalidator<infer U> ? invalidator<U> : never;
};
You could use a type like this:
type invalidatorObjFromArgs<T extends Record<string, unknown[]>> = {
[K in keyof T]: invalidator<T[K]>
};
And then have the type parameter of makeInvalidatorObj
be a Record
whose property values are argument tuples rather than entire invalidators.
Here's a complete example:
type invalidator<TArgs extends unknown[]> = {
fn: (...args: TArgs) => any;
genSetKey: (...args: TArgs) => string;
};
type invalidatorObjFromArgs<T extends Record<string, unknown[]>> = {
[K in keyof T]: invalidator<T[K]>
};
const makeInvalidatorObj = <T extends Record<string, unknown[]>>(
invalidatorObj: invalidatorObjFromArgs<T>,
) => invalidatorObj;
const inferredExample = makeInvalidatorObj({
updateName: {
fn: (name: string) => {},
genSetKey: (name) => `name:${name}`,
// ^? - (parameter) name: string
},
updateAge: {
fn: (age: number) => {},
genSetKey: (age) => `age:${age}`,
// ^? - (parameter) age: number
},
});
I think it has to do with gcc
version, cuda 12.x is supported on gcc-12
and debian 13 provides gcc-14
as default.
An alternative is to use the robocopy command.
robocopy ".\Unity Editors" "C:\Program Files\Unity Editors" /e
This will create the Unity Editors folder if it does not exist, but will not alter it, if it does not.
The only downside is you need to have the directory structure to copy, as it will not let you create directories from nothing. The '/e' means it only does/copies directories but ignores any files.
i.e. I want to create directory d, at the end of C:>a\b\c so I create the d folder, but I do not want to disturb any folders or files, nor create an error if it already exists.
.\md d
.\robocopy ".\d" "C:\a\b\c" /e
.\rm d
What I like about robocopy is it plays nice with batching things on SCCM and such. Its also quite powerful.
Maybe it will be useful for someone, I used postgresql with jdbc, and I had error messages not in English. The VM options -Duser.language=en -Duser.country=US
helped me
Yo utilizo el siguiente y me ha funcionado bien para Android es una forma mucho mas amigable al momento de programarlo como tambien se pueda configurar mucho mas amigable entre la app y la impresora https://pub.dev/packages/bx_btprinter
I'm having the same problem, but with framework nextjs. It is not copying a crucial directory called _next with my embedded website exported.
I don't know why, but I tried many options on build.gradle inside android block, like aaptOptions, androidResource, both inside defaultConfig, inside buildTypes.release, any of it worked.
I found a solution for this reading the AAPT source code (here) it defines the ignore assets pattern like this:
const char * const gDefaultIgnoreAssets =
"!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~";
Also in this source code, it reads the env var ANDROID_AAPT_IGNORE, and using this env var works!
So, you can set this ENV before, or export it in your .bashrc or .zshrc, or use it inline when calling the gradle assembleRelease like this:
ANDROID_AAPT_IGNORE='!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~' ./gradlew assembleRelease
`layout` parameter of `plt.figure` can be used for this purpose.
for instance, following example dynamically adjusts the layout to stay tight after window is resized.
import matplotlib.pyplot as plt
x = range(10)
y1 = [i ** 2 for i in x]
y2 = [1.0 / (i + 1) for i in x]
fig = plt.figure(tight_layout=True)
ax1 = plt.subplot(1, 2, 1)
ax1.plot(x, y1)
ax2 = plt.subplot(1, 2, 2)
ax2.plot(x, y2)
plt.show()
Just in case: do not forget to choose the correct types of logs to be shown. There is a dropdown menu "Custom" in the console. By default, I had only "errors", but for displaying outputs from the console.log(), "log" should be checked
A little late but hopefully useful some. In order to avoid the message, you need to set the version of yarn for the project for example
yarn set version 3.8.7
Don't know if anyone is still looking at this thread but I also have an issue trying to find a working timelapse app for my newly acquired NEX 5R, the archive above I've looked at but none of them work, thought I had bricked my camera at times trying some of the apps.
I couldn't get the script provided by Atanas to work for me.
here's a variation...create a file with the project names with a line break after each project....
i.e. 'cat p.list' would show:
poject1
poject2
poject3
poject4
then, run:
for i in `cat p.lst`; do echo --$i-- && rd executions list -p $i; done
What am I doing wrong?
You're expecting the if (isQuery(item.value))
check to narrow item
, but that's not something that happens.
The only situation where item
could be narrowed by checking item.value
is if item
were typed as a discriminated union and value
was a discriminant property. That's not the case in your code.
Your problem is that you use the so-called 'runtime declaration' for props, when you should use the 'type-based' one. Here's the article from docs regarding this matter.
https://vuejs.org/guide/typescript/composition-api.html#typing-component-props
So to fix your issue you should refactor your component to:
<script setup lang="ts" generic="T extends ChildEntryModel">
// ...imports
const props = defineProps<{
modelValue: T[]
}>()
</script>
In my case, my field name was valid, but my administrative user didn't have permission to use it. In Salesforce, permissions can be assigned at the field level.
Remember to set 'Targets > [your project] > General > Minimum Deployments' to the latest compatible version of the simulator you want to run, otherwise it wont show up either!
3D hero game Ek aadami Ko road per bhag raha hai aur ek gadiyon se Bach raha hai gadi Se takrate Hi out ho jaaye aur ek restart ka option Diya
After the latest next update, I faced the same issue. I added the file
next-env.d.ts
to eslint.config.mjs ignore, but as it did not worked, I had to add this:
{
files: ["next-env.d.ts"], // 👈 override
rules: {
"@typescript-eslint/triple-slash-reference": "off",
},
}
I just stumbled upon the same question, as my recipe did not show up under the Configuration -> Recipes section as well.
Just found out how to make it work, assuming you have a (custom) Theme or Module within your VS solution.
Under your Theme [OR] Module project, create directory 'Recipes' in the root and place the recipe json file in that directory. Then, make sure that the value for field `issetuprecipe` is set to value 'false'. The recipe should now show up under Configuration -> Recipes.
# stage deps
FROM node:18.17.0 AS deps
WORKDIR /usr/src/app
COPY package*.json yarn.lock ./
RUN yarn install # Install both production and development dependencies
# stage builder
FROM node:18.17.0 AS builder
COPY --from=deps ./
COPY . .
RUN yarn build
RUN yarn install --production
# Production image
FROM node:18.17.0-alpine
WORKDIR /usr/src/app
COPY --from=builder /usr/src/app/dist ./dist
COPY --from=builder /usr/src/app/node_modules ./dist/node_modules
# Prune development dependencies
CMD ["node", "dist/main"]
You can use breakpoints on all kinds of Events, XHR or Event Breakpoints. This should help.
After some UX refreshes for the ADO portal, you can no longer view Commits in the way that @wade-zhou mentioned. But we can still get this information.
From any given release, click 'View Changes'
Then you can view the list of commits
@EventHandler
public void onPlayerJoin(PlayerJoinEvent event) {
if(!event.getPlayer().hasPlayedBefore()) {
event.getPlayer().sendMessage("Hi!");
}
}
After a bit of digging I found the file at
~/Library/Developer/Xcode/UserData/Debugger/CustomDataFormatters
You're already on a solid path—using Python to fetch and visualize PLC data with Tkinter, Excel, and Matplotlib is a great start. To level up the user experience and make your app more interactive and robust, here are some human-friendly insights:
PyQt6 or PySide6
Enterprise-grade GUI frameworks with rich widgets, polished look and feel, and great cross-platform support. Excellent if you're building a more complex or commercial-grade application.
wxPython
Offers native-looking interfaces and integrates smoothly with Matplotlib or Seaborn. It’s beginner-friendly and widely supported.
Kivy
Modern interface design, perfect for touch-friendly or cross-platform setups (including desktop and mobile). Great if you need a more graphical or customizable UI.
Plotly (with Dash for dashboards)
Plotly shines for fully interactive, web-ready charts. Pairing it with Dash lets you turn those charts into responsive dashboard apps—no HTML/CSS/JS needed.
Bokeh
Another strong contender for interactive visuals, especially useful for real-time updates. Has good documentation and flexibility.
Streamlit
Extremely easy to use—ideal for quick prototypes or functional dashboards. Especially loved in the dev community for its simplicity.
“If you're looking to plot graphs I strongly recommend using Plotly and Dash… it was by far the easiest way to get a GUI with multiple complex graphs.”
“For something simple that will get you 90% of the way there, Streamlit is 100% the way to go.”
GoalRecommended ToolsRich, desktop-style appPyQt6/PySide6 + PlotlyRapid, interactive dashboardsStreamlit or DashNative GUI with embedded chartswxPython + MatplotlibTouch-enabled/multi-platform UIKivy + Plotly/Bokeh
Ease & speed? Go with Streamlit or Dash.
Full-featured desktop UI? Opt for PyQt/PySide6 or wxPython.
Touch-friendly or cross-platform interfaces? Try Kivy.
Interactive charting built-in? Use Plotly or Bokeh.
Let me know what direction you're leaning toward—I’d be glad to share starter templates or help with your next steps!
Relative distance from -180
to +180
(a
and b
can be millions of degrees apart, i.e. have winding):
(b - a) % 360
Absolute distance from 0
to +180
(a
and b
can be millions of degrees apart, i.e. have winding):
Math.abs((b - a) % 360)
Don't overcomplicate what doesn't need to be complicated.
import axios from "axios";
const token = localStorage.getItem("token");
await axios.delete(`http://localhost:8000/api/comments/${id}`, {
headers: {
Authorization: `Bearer ${token}`,
},
});
finaly i found another postgres module that works when converted to .exe : pg8000
for the moment everything works in .exe as in .py.
In C++20 you may simply use
template<auto f> auto wrapper(auto ... x)
{
return f(x...);
};
I did have the same issue with my app and used the approach mentionned in the following blog.
https://blog.debertol.com/posts/riverpod-refresh/
It works until now. Hope it will help someone :)
Google news api is deprecated and there is no such publicly published quota regarding its rate limit. So developers need to switch to the best alternatives of google news API one of them is Newsdata.io which offers global coverage, real-time updates, advanced filtering, and free development access—ideal for news analytics and apps.
And in terms of its rate limit :
Free Plan: 30 credits every 15 minutes.
Paid plans: 1800 credits every 15 minutes.
# Write your MySQL query statement below
SELECT MAX(num) as num FROM (
SELECT num
FROM MyNumbers
GROUP BY num HAVING COUNT(*) = 1
) AS singls;
this is the correct way to find the answer..
You can sort the results of your query and achieve the same result as an "ORDER BY" SQL statement. Use the ´Column options´ and select the relevant columns in the ´Sorting´ tab.
Alternatively, could you could create an Analytic view and then work on the grouping / aggregating your results in Power BI with much more flexibility than directly in Azure DevOps.
There are news api's that limit results to a specific publisher. But some news APIs enable you to include more than one source in a single query. Like Newsdata.io supports this by its domain parameter, where you can add upto 5 domains separated by commas in a single query and Other providers, like NewsAPI.org, also offer a similar feature with their sources parameter.
Given that you already have an algorithm working, tested, and fast enough in python, I would use this to convert the data to a matlab .mat file. Then load this into matlab and continue to work in matlab from that point onwards.
python script:
from scipy.io import savemat
dat = unpack_s12p_to_f32(data)
savemat("matlab_matrix.mat", {"data": dat, "label": "data imported and converted to matlab using python"})
then in matlab:
load('matlab_matrix.mat')
plot(data)
Later to streamline the workflow, this could be done by a simple python script called from the command line when you get new data.
Is there a reason you want to import this directly to matlab with no interpretation step?
Use Softaken WIndows Data Recovery Software, this tool help you to restore damaged and corrupted files of your drive.
Sorry this is kinda incomplete answer and for python, nor R, but still. Scatter overlay with grouped barplot should be possible, see second example on this showcase page: https://plotly.com/python/graphing-multiple-chart-types/
Duplicates can't be removed fully, but there are news api's that provide fields that make deduplication easier on the client side. Like Newsdata.io,
it provides each article with a unique article_id, article link, source_id, source_url, source_icon, enabling developers to filter repeat on their end. It also provides a "removeduplicate" parameter which allows users to filter out duplicate articles.
Additionally, It allows filtering by category, language, country, Region etc, which can help narrow results and minimize duplicate headlines at the API level before you process them.
I was also unable to access external libraries on VS Code. What I did was first to install pylint extension.
Although it still doesn't show the way PyCharm does but now, when I start typing out the name of a module it brings out a pop-up list of all the modules starting with that letter and if i import a specifiied module, highlight it and click Go to, F12, it takes me to the source code in the python library (e.g import Random) then I highlight Random click F12 I'm taken to the source code for the Random module in the Lib package.
I think even if your text color changes to white in dark mode, its good for you as it increases readability and will increases the apps accessibility
Q: Can We use SOAP (back-channel) binding instead of POST/Redirect in Spring SAML?
A: No. Spring Security SAML, both legacy and current SAML2, only supports HTTP-Redirect and HTTP-POST bindings. SOAP binding is not supported (yet).
Archived docs by Vladimír Schäfer: SOAP not available.
Current logout docs by Vladimír Schäfer: SOAP not available.
docs.spring.io/spring-security-saml
"I read in the documentation about back-channel SOAP calls, and that sounds like exactly what I want, but I can't find anything on it."
You're right in thinking that there should be documentation on it, there're many, example. Just none for spring saml. Have a nice one.
Cheers to the Mods 🍺
if you are still looking for an answer, in my company we work with https://github.com/seznam/halson, https://www.npmjs.com/package/halson
it is well documented and works perfectly fine with nest
Easy with defaultScrollAnchor()
modifier.
ScrollView {
// ...
}
.defaultScrollAnchor(.bottom)
you can Go to
Dashboard → Settings → Permalinks like this : /%category%/%postname%/ and select a custom structure (whatever you want).but it is only use in category and post slug. and you can use custom code also. in function.php
Following the initial tutorial, I saw that the command py
is accepted in the environment on windows. Example:
py -m pip install -r .\requirements.txt
Since v3.1.73 this can also happen if you compile without -sFETCH_SUPPORT_INDEXEDDB=0
see the explanation here
https://github.com/emscripten-core/emscripten/issues/23124
This is a late reply but for anyone else that stumbles across this you also have to apply the .Sql scripts in the "Migrations" folders for the various Orleans components (Reminders, Clustering etc) as well as the "Main" sql scripts. This fixed the issue for me.
I did something similar to @Rono using table variable, where I inserted and sorted my data by date.
I am supposed to ensure date continuity (no gaps, gap exactly 1 day)
maybe it will inspire someone
declare @sorted table (num int identity, id int, dfrom date, dto date)
insert into @sorted(id, dfrom, dto)
values
(1230, '2024-01-01','2024-01-15'),
(4567, '2024-01-16','2024-10-30'),
(9000, '2024-10-31','2024-12-31'),
(9001, '2025-01-01','2025-01-15'),
(9015, '2025-01-16','2025-06-30'),
(9592, '2025-07-01','3000-01-01')
select s.id
from @sorted s
left join
(
select id, dfrom, dto, num from @sorted
) sub
on sub.num = s.num + 1
where
datediff(day, s.dto, sub.dfrom) <> 1
As @0stone0 pointed out in the comments, it looks like the action is refreshing the page before calling the function.
Also, it might be necessary to add event.preventDefault()
to your calculate()
method so it executes and not refreshes the page.
Something like:
function calculate(event){
event.preventDefault();
...
}
I know its old, but i just want to say that this still works.
The answer was posted earlier here -> https://stackoverflow.com/a/3092273/7069338
Your line:
<requestedExecutionLevel level="asInvoker" uiAccess="true" />
Should be:
<requestedExecutionLevel level="requireAdministrator" uiAccess="true" />
I've testet it and it works for me.
-
In my opinion you shouldn't run VS as admin, unless absolutely necessary.
"Really enjoyed this post! TypeRacer is such a fun way to improve typing speed while competing with others."
"We conduct Abacus competition and Vedic maths competition to enhance speed, accuracy, and mental calculation skills in students. With regular Abacus competition practice test and online abacus test options, participants can prepare effectively and gain confidence before the main event."
<a href=" https://www.abacustrainer.com/competionconductor">visit abacustrainer</a>
Are you still having this issue?
I am running VSCode 1.103.1
and Jupyter extension v2025.7.0
and have no problem viewing both Input, Metadata, and Output changes:
Note: VSCode by default collapses sections that have no changes.
*"In .NET, a Web Service is a software component that allows applications to communicate over the internet using standard protocols like HTTP and XML/JSON. The key benefit is that it provides platform-independent communication, so applications built in different languages (C#, Java, PHP, Python, etc.) can easily share data through web services.
On the other hand, Triple DES (3DES) is a symmetric encryption algorithm used to protect sensitive data. It works by applying the DES (Data Encryption Standard) three times, making it much stronger than simple DES. In .NET applications, developers often use Triple DES to encrypt information such as passwords, financial details, or authentication tokens before sending them through a web service.
👉 For example:
The client encrypts the data using Triple DES before sending it.
The web service receives the encrypted data and decrypts it using the same secret key.
This ensures that even if someone intercepts the communication, the data cannot be understood without the key.
This combination of Web Services + Triple DES is still used in many secure systems, especially in financial or enterprise-level applications.
I’ve also shared helpful guides and resources about website development & security here: https://softzen.info"*
from PIL import Image, ImageDraw, ImageFont
# Palabras y pistas personalizadas
words = [
("Enero", "El mes en que nuestras vidas se cruzaron ❄️"),
("Higueruela", "Nuestro primer hogar compartido 🏡"),
("Merida", "Nuestro primer viaje inolvidable ✈️"),
("Bestialburger", "Donde comenzó nuestra historia con papas 🍔"),
("Instagram", "La red social que nos conectó por primera vez 📲"),
("Cucharita", "Nuestra forma favorita de dormir abrazados 🛌"),
("Mirada", "Lo que aún me pone nerviosa de ti 👀"),
("Destino", "Lo que nos juntó, aunque no lo planeamos ✨"),
("Fotos", "Tenemos muchas, pero siempre queremos más 📸"),
("Desayuno", "Lo que me haces con amor cada mañana 🥞"),
("2304", "El día que todo comenzó 💫"),
("Amor", "Lo que crece cada día entre nosotros ❤️")
]
# Crear cuadrícula base
grid_size = 20
grid = [['' for _ in range(grid_size)] for _ in range(grid_size)]
positions = list(range(1, len(words)*2, 2)) # Filas espaciadas
# Insertar palabras horizontalmente
for i, (word, _) in enumerate(words):
row = positions[i]
col = 1
for j, letter in enumerate(word.upper()):
grid[row][col + j] = letter
# Configurar imagen
cell_size = 40
img_size = grid_size * cell_size
img = Image.new("RGB", (img_size, img_size + 300), "white")
draw = ImageDraw.Draw(img)
# Fuente
try:
font = ImageFont.truetype("arial.ttf", 20)
except IOError:
font = ImageFont.load_default()
# Dibujar celdas y letras
for i in range(grid_size):
for j in range(grid_size):
x = j * cell_size
y = i * cell_size
draw.rectangle([x, y, x + cell_size, y + cell_size], outline="black", width=1)
if grid[i][j] != '':
letter = grid[i][j]
# Calcular tamaño del texto
bbox = draw.textbbox((0, 0), letter, font=font)
w = bbox[2] - bbox[0]
h = bbox[3] - bbox[1]
draw.text(
(x + (cell_size - w) / 2, y + (cell_size - h) / 2),
letter,
fill="black",
font=font
)
# Escribir las pistas debajo de la cuadrícula
y_offset = img_size + 20
for i, (word, clue) in enumerate(words, start=1):
draw.text((10, y_offset), f"{i}. {clue}", fill="black", font=font)
y_offset += 25
# Guardar imagen final
img.save("sopa_de_letras.png")
img.show()