Try using 'ansi-colors'. I'm using it in firebase project on mac and it works fine.
Since Bootstrap 5.x use text-start instead of text-left
Please check your mongodb connection string does contain the database name. Also , you can check your mongodb database as well . If it is using "test" named collection then drop that collection and let it create new one. This resolved issue for me . Thanks
Why Were SYSLIB Warnings Introduced Separately from CS0612/CS0618?
The CS0612 and CS0618 warnings are specifically related to Obsolete attributes. These attributes are tied directly to deprecated APIs or types and are typically used by developers when they are marking their own codebase for future removals.
SYSLIB warnings, on the other hand, are part of .NET’s internal library warnings (System Library). These warnings:
By using SYSLIB codes, Microsoft is able to provide more context and clarity on specific categories of deprecations, distinct from the more general-purpose CS0612/CS0618 warnings.
https://learn.microsoft.com/en-us/dotnet/fundamentals/syslib-diagnostics/obsoletions-overview
I believe this post should help you, as you are just doing the reverse of what he is doing
The current version does not allow implementing the example. I am providing the answer from the official forum.
Sorry that it's an unsupported usage. because both at_test_cmd_test() and AT+HTTPCGET=params are executed in at_process_task(), however, in the current design, command processing is linear, and you cannot execute another command before one command is completed. in you case, you can create another task, and in your task, to execute some command like AT+HTTPCGET=. and at_test_cmd_test() to get the status of your task.
It totally depends upon the use case. For example, you might not need to fetch all the departments and their professors for a single university. I believe you might need the api endpoints as:
But it totally depends upon your usecase. The usecase i presented may differ from what you need.
It seems to be that Google requires billing details before your account can be verified
this is the correct answer: https://stackoverflow.com/a/76659633/8105487
if it does not work, just make sure you invalidate caches and restart
this is the correct answer: https://stackoverflow.com/a/74645969
if it does not work, just make sure you invalidate caches and restart
Thanks for sharing your insights, however, I noticed a potential oversight that could lead to some confusion. Despite it’s been a while, I’d like to build on your answer by sharing some thoughts that may enhance its clarity and usefulness.
If the goal was to compare a non-blocking server implementation against netty, just replying with a constant string to every client’s request is not enough to reproduce any real-world load. In this case the efforts taken to produce a payload are comparable to (or less than) the efforts to sustain communication, so the testing can go either way and its results can be flaky. Moreover, when you make the server close the connection after each response, you end up benchmarking how quickly the OS kernel sets up TCP connections.
Next, let’s take a close look at two solutions provided in the answer. The initial one that contains blocking code uses Java NIO Selector and Selectable channel API. The alternate “highly performant” solution uses Java NIO.2 Asynchronous channel API. That might be confusing and can lead to the incorrect conclusion that the performance is gained by adopting NIO.2 API instead of NIO.
If we look closer at the implementation of both APIs (I arbitrarily choose the JDK 17, but you can pick another modern JDK version), we’ll see that they both use epoll under the hood:
These API introduce different programming models, but there is no strict reason pointing to one should be much more performant than another. Roughly speaking, NIO.2 with its asynchronous channels doesn’t rely on the OS async file IO (like Linux AIO or else). It uses epoll with a thread pool to emulate asynchronous file operations. Nothing stops you from using the same approach. If you introduce a thread pool to the first server implementation that uses Selector API and utilize it for request processing, the results will be comparable or even better than the second “highly performant” implementation.
Hope this helps provide a more comprehensive view.
Do I need to - - skip-ssl to connect to mysql via php log script? I am having problems when I try to run mtsql service, and privileges escalation errors. Should I use php ssl2 connection first to establish contact with the server first?
What you want to do is APPEND the path where MySQL is installed (ex: /opt/mysql/bin) to your PATH variable:
PATH="$PATH:/opt/mysql/bin"
Your config.js add:
config.startupMode = 'source';
The type Map is not generic; it cannot be parameterized with arguments <String, Integer>
This Error Occurs Due To Your Project File Name Check Your File And Change That.
And Import
import java.util.Map;
It Will Work For Me
I noticed the same CSS link in the <head> of pages on a local non-internet facing Apache site at home. Looking further I found it in just about any page I browse with Firefox. Like @dude mentioned, I see it when I have the DuckDuckGo Privacy Essentials extension activated.
I found a reddit post that seems to shed some light https://www.reddit.com/r/duckduckgo/comments/14r3vde/does_duckduckgo_privacy_essentials_firefox_uses/
Downloading an MockitoExtension plugin in my Intellij worked for me. (maybe it would for diff ide too ig)
It was just that I had the server up and running in a terminal. I attempted to run npm run build in a parallel terminal.
Just terminate the npm run dev or whatever gets your server up!
Official documentation, i.e., alive_progress's GitHub repository, mentions that due to PyCharm's default settings, alive_bar is not working properly in PyCharm's console. To change that, please follow the instructions at https://github.com/rsalmei/alive-progress/blob/main/README.md#forcing-animations-on-pycharm-jupyter-etc
You can wrap it inside ButtonTheme like:
ButtonTheme(
alignedDropdown: true,
child: FormBuilderDropdown()
)
You're currently using a static or hardcoded value for scrollPosition. Instead, you should calculate it based on the clicked item's position relative to the carousel and its width. This will ensure the clicked item is centered correctly.
const scrollPosition = itemOffset - (carouselWidth / 2) + (itemWidth / 2);
Please give it a try and let me know if it works
I found a solution which uses DOMDocument but does not add extra tags to your strings; just fixes malformed HTML. See answer here: https://stackoverflow.com/a/79081559/492132
Original github (not mine) here: https://gist.github.com/hubgit/1322324
Tengo problemas con esta versión:
Flutter 2.8 Java 11 SDK Android 33 Gradle 6.7.1 Execution failed for task ':app:checkDebugAarMetadata'.
Could not resolve all files for configuration ':app:debugRuntimeClasspath'. Could not resolve com.github.barteksc:android-pdf-viewer:3.2.0-beta.1. Required by: project :app > project :flutter_pdfview > Could not resolve com.github.barteksc:android-pdf-viewer:3.2.0-beta.1. > Could not get resource 'https://jitpack.io/com/github/barteksc/android-pdf-viewer/3.2.0-beta.1/android-pdf-viewer-3.2.0-beta.1.pom'. > Could not GET 'https://jitpack.io/com/github/barteksc/android-pdf-viewer/3.2.0-beta.1/android-pdf-viewer-3.2.0-beta.1.pom'. Received status code
in styles.css, try replacing height:100vh with height:100% and also add width:100% to it.
I don't know why but for some libraries it is necessary to remove extension from chrome and add it again.
For me the solution by K. A. Buhr didn't work. If I put a module name that doesn't match the file such as the proposed
-- in Client.hs
module Main where
I get the error "File name does not match module name". I also can't call the file Main.hs because there is already another file called Main.hs.
The only way to solve this was to use
-- in Client.hs
module Client where
add the lines other-modules: [] and - -main-is Client to the package.yaml:
executables:
ObjectServer:
main: Main.hs
other-modules: []
source-dirs: app
ghc-options:
- -threaded
- -main-is Main
dependencies:
- ObjectServer
Client:
main: Client.hs
other-modules: []
source-dirs: app
ghc-options:
- -threaded
- -main-is Client
dependencies:
- ObjectServer
Actually, the \Barryvdh\Debugbar\Middleware\InjectDebugbar::class, part needs to be after \App\Http\Middleware\DebugMiddleware::class,.
In your middleware you conditionally enable the Debugbar, and this is InjectDebugbar::class which checks if Debugbar is enabled and injects it into your response.
As pointed by maven at https://mvnrepository.com/artifact/org.codehaus.groovy.modules.http-builder/http-builder/0.7.2 I could solve this issue by adding
buildscript {
repositories {
maven { url 'https://nexus.web.cern.ch/nexus/content/repositories/public/' }
...rest
}
}
allprojects {
repositories {
maven { url 'https://nexus.web.cern.ch/nexus/content/repositories/public/' }
...rest
}
}
The specified class name cannot begin with java . since all classes in the java package can oily be define. By the bostrap class loader
io series has lower latency and less variation in latency which is helpful for workloads that need high throughout with low parallelism.
Percona has a nice article with various benchmarks https://www.percona.com/blog/performance-of-various-ebs-storage-types-in-aws/
Anecdotally, we've seen more stable performance and faster database restores on io2 vs gp3 RDS Postgres instances (with the same amount of IOPs).
Have you ever figured out a solution? I'm encountering the same issue. The web application works fine on the old server, but if running on a new server the "ConvertUrl" function just hangs there forever...
In SQL, implicit conversion from TEXT to BLOB doesn’t work in the way you're thinking. You need to provide binary data for the BLOB column explicitly.
INSERT INTO "non_strict_table" ("name", "data") VALUES ('name_01', CAST('blob_data' AS BLOB));
This converts the string 'blob_data' to a BLOB and stores it.
Thanks ooshp,
I have the answer, i needed to drop the .value and just have item.name, spent hours on this
@grid.GetHtml( tableStyle: "grid", headerStyle: "head", alternatingRowStyle: "alt", columns: grid.Columns( grid.Column(format: @Edit), grid.Column("Title"), grid.Column("Genre"), grid.Column("Year") ) )
Late 2024 and they didnt fixed this shit yet, looks like WOKEISM is the priority over Developement at META
All intermediate operations return a new instance Stream. On any single Stream instance only one terminal operator can be invoked, and it terminates the Stream rendering it unusable.
Intermediate operations: filter(), map(), flatMap(), distinct(), sorted(), peek(), limit(), skip() Terminal operations: anyMatch(), allMatch(), noneMatch(), collect(), count(), findAny(), findFirst(), forEach(), min(), max(), reduce(), toArray()
You can also use AirDroid for free. Works fine, and I have tried many. Needs a plugin of theirs installed on the phone.
As @Barmar mentioned, Multiprocessing locks only work between processes in the same script. File locks can be used between unrelated processes.Suspected the same. I tried using the FileLock library, seemed to resolve the issue.
I found a solution for adding a splash screen. It suddenly occurred to me that having the popup code in my app's __init__() method could be the cause of the problem, because the app might not be finished initializing and therefore not ready to display a popup.
Moving the popup code to my app's build() method also did not work, probably for similar reasons.
So I coded the following:
def __init__(self, **kwargs):
super().__init__()
self._popup = None
def build(self):
# show splash screen immediately after build() completes
Clock.schedule_once(self.ShowSplashScreen, 0)
return self.mainLayout
def ShowSplashScreen(self, *args):
content = LoadSplashScreenDialog(cancel=self.dismiss_popup)
self._popup = Popup(title="Test App", content=content, size_hint=(1.0, 1.0))
self._popup.open()
Clock.schedule_once(self.dismiss_popup, 2)
By scheduling the popup to display in the next frame, it will display immediately after the build() method completes and the app is instantiated.
Yes, the ::after pseudo-element assumes the triangle will start exactly at the right edge of the parent .arrow element. But due to subpixel rounding, the browser may interpret the position as slightly off (e.g., -60.5px instead of exactly -60px). When you use pixel values that don't align perfectly with the display's pixel grid, some browsers might round differently, creating small gaps or seams between elements.
One solution might be css-shape.com/arrow that was posted by @Temani Afif in the comments. One other might be to use calc to have better rounding.Something like: right: calc(-1 * 30px);
no need for rexeg ...
given your inputs
df[df['col1'].apply(lambda x: any(x.startswith(prefix) for prefix in prefixes))]
col1
0 12345
2 54467899
line 3, in import requests ModuleNotFoundError: No module named 'requests'
soln: install the below command: pip install requests
Add a shared network in docker-compose.yml to ensure connectivity:
networks:
app-network:
driver: bridge
services:
server:
networks:
- app-network
mysql:
networks:
- app-network
To my surprise, your advice helped. But what's interesting is that I tried to change the connection types (AI Key and also Microsoft Entra ID) but it didn't work before until I deleted the connection(in AI Studio) - to AI search and added it again (private endpoint was active).
I also left only the API key type enabled in the AI search (settings) - as the only one possible method (there was another recommendation in the Microsoft article)
Thanks for the recommendation!
I feel the issue is with the object lock which is over ridding the object life cycle rule.
You would need a filter on the API side (e.g. 'https://rickandmortyapi.com/api/character?page_size=2'. Unfortunately I don't see one implemented for the rickandmortyapi.
https://rickandmortyapi.com/documentation/
Instead, it uses pagination through the page parameter, which allows you to fetch results in chunks of 20 by default.
I tried this and it helps with disappearing WebView:
webView.setLayerType(View.LAYER_TYPE_HARDWARE, Paint().apply {
xfermode = PorterDuffXfermode(PorterDuff.Mode.SRC_OVER)
})
The discrepancy between allocated memory (PrivateMemorySize64) and the working set (WorkingSet64) is due to Windows' memory management. When you allocate memory using malloc(), Windows reserves virtual memory, but physical memory (RAM) is only allocated when the memory is accessed. The working set represents the memory portion actively in use and kept in RAM, while less-used pages may be trimmed or not allocated until needed. This behavior is as expected and reflects the efficient optimization of memory, even while the page file is disabled.
I DID IT!
So, the working code is below. This answer was made possible by the source code of the NetSurf Browser SVG renderer.
Also, herrstrietzel helped me a lot. The tip to wrap <use> inside <g> was just right.
In my case, text rendering is not needed. But if someone needs to render text in <path>, then this issue is solved with the help of the opentype library. The library is not very well known, but it works magic. In order to apply text transformations, the test must be rendered in <path> before all <path> are processed.
What's next? Either the task needs to be more complicated, or I don't even know. If anyone has a more elegant solution or finds a bug in my code, let me know. You'll probably get a bounty.
// regular expression to parse numbers
const rxNumberStr = '[+-]?(?:(?:[0-9]+\\.[0-9]+)|(?:\\.[0-9]+)|(?:[0-9]+))(?:[eE][+-]?[0-9]+)?';
// regular expression to parse next lemma from d attribute of <path>
const rxDLemmaStr = `[MmLlHhVvCcSsQqTtAaZz]|${rxNumberStr}`;
// D-attribute string parser
// https://www.w3.org/TR/SVG/paths.html#PathData
// https://www.w3.org/TR/SVG/paths.html#PathDataBNF
class D {
// Result of parsing a D-attribute string
// path: [[cmd, new D.P({x,y}), ...], ...]
path = [];
constructor(d) {
let rx = new RegExp(rxDLemmaStr, 'g');
let ps = d.match(rx).map(v => ('MmLlHhVvCcSsQqTtAaZz'.indexOf(v) > -1 ? v : parseFloat(v)));
let cmd, move, ref = D.P.abs(0, 0);
for (let i = 0, len = ps.length; i < len; ) {
if (isNaN(ps[i])) cmd = ps[i++];
this.path.push(({
m: () => (ref = D.P.rel(ps[i++], ps[i++], ref), ps[i - 3] == cmd ? ['M', move = ref] : ['L', ref]),
M: () => (ref = D.P.rel(ps[i++], ps[i++], ref), ps[i - 3] == cmd ? ['M', move = ref] : ['L', ref]),
l: () => ['L', (ref = D.P.rel(ps[i++], ps[i++], ref))],
L: () => ['L', (ref = D.P.abs(ps[i++], ps[i++], ref))],
h: () => ['H', (ref = D.P.rel(ps[i++], 0, ref))],
H: () => ['H', (ref = D.P.abs(ps[i++], ref.y, ref))],
v: () => ['V', (ref = D.P.rel(0, ps[i++], ref))],
V: () => ['V', (ref = D.P.abs(ref.x, ps[i++], ref))],
c: () => ['C', D.P.rel(ps[i++], ps[i++], ref), D.P.rel(ps[i++], ps[i++], ref), (ref = D.P.rel(ps[i++], ps[i++], ref))],
C: () => ['C', D.P.abs(ps[i++], ps[i++], ref), D.P.abs(ps[i++], ps[i++], ref), (ref = D.P.abs(ps[i++], ps[i++], ref))],
s: () => ['S', D.P.rel(ps[i++], ps[i++], ref), (ref = D.P.rel(ps[i++], ps[i++], ref))],
S: () => ['S', D.P.abs(ps[i++], ps[i++], ref), (ref = D.P.abs(ps[i++], ps[i++], ref))],
q: () => ['Q', D.P.rel(ps[i++], ps[i++], ref), (ref = D.P.rel(ps[i++], ps[i++], ref))],
Q: () => ['Q', D.P.abs(ps[i++], ps[i++], ref), (ref = D.P.abs(ps[i++], ps[i++], ref))],
t: () => ['T', (ref = D.P.rel(ps[i++], ps[i++], ref))],
T: () => ['T', (ref = D.P.abs(ps[i++], ps[i++], ref))],
a: () => ['A', ps[i++], ps[i++], ps[i++], ps[i++], ps[i++], (ref = D.P.rel(ps[i++], ps[i++], ref))],
A: () => ['A', ps[i++], ps[i++], ps[i++], ps[i++], ps[i++], (ref = D.P.abs(ps[i++], ps[i++], ref))],
z: () => (ref = move, ['Z']),
Z: () => (ref = move, ['Z']),
})[cmd]());
}
}
// Compile array with absolute coordinates for new <path d="..." />
get abs() {
return this.path.map(s => s.map((v, i) => (!i ? v : { H: v.x, V: v.y }[s[0]] || v.abs))).flat(3);
}
// Compile array with relative coordinates for new <path d="..." />
get rel() {
return this.path.map(s => s.map((v, i) => !i ? v.toLowerCase() : { H: v.x - v.ref.x, V: v.y - v.ref.y }[s[0]] || v.rel)).flat(3);
}
// Compile array with transformed absolute coordinates for new <path d="..." />
transform(matrix) {
return this.path.map(s => s.map((v, i) => (!i ? v.replace(/[HV]/i,'L') : v.transform(matrix)))).flat(3);
}
// Path Point class
static get P() {
return class P {
x;
y;
// Reference point for relative coordinates
ref;
constructor(props) {
Object.assign(this, props);
}
// Absolute coordinates
get abs() {
return [this.x, this.y];
}
// Relative coordinates
get rel() {
return [this.x - this.ref.x, this.y - this.ref.y];
}
// Transform point with matrix
transform([a, b, c, d, e, f]) {
return [this.x * a + this.y * c + e, this.x * b + this.y * d + f];
}
// Create point from absolute coordinates
static abs = (x, y, ref) => new D.P({ x, y, ref });
// Create point from relative coordinates
static rel = (x, y, ref) => new D.P({ x: ref.x + x, y: ref.y + y, ref });
};
}
}
// Matrix multiplication
// https://en.wikipedia.org/wiki/Matrix_multiplication
const multiply = ([a1, b1, c1, d1, e1, f1], [a2, b2, c2, d2, e2, f2]) => [
a1 * a2 + c1 * b2,
b1 * a2 + d1 * b2,
a1 * c2 + c1 * d2,
b1 * c2 + d1 * d2,
a1 * e2 + c1 * f2 + e1,
b1 * e2 + d1 * f2 + f1,
];
// Consolidate matrix chain
const consolidate = matrices => matrices.reduce((acc, m) => multiply(acc,m), [1, 0, 0, 1, 0, 0]);
// Read SVG element attributes
// https://developer.mozilla.org/en-US/docs/Web/API/SVGElement/attributes
// returns object with attributes
const readAttrs = (element) => [...element.attributes].reduce((acc, { name, value }) => ((acc[name] = value), acc), {});
// Write SVG element attributes
const writeAttrs = (element, attrs) => Object.entries(attrs).forEach(([attr, value]) => element.setAttribute(attr, value));
// Process SVG shape element
// Shape elements are replaced with new <path d="..." /> element
// Shape element attributes are copied to new <path d="..." /> element
// Shape element must not have child elements
// List of shape elements <circle>, <ellipse>, <line>, <path>, <polygon>, <polyline>, <rect>
function processShape(shape) {
const shape2path = {
circle: ({ cx, cy, r, ...attrs }) => [
`M ${[cx - r, cy]} A ${r} ${r} 0 1 1 ${[cx + r, cy]} A ${r} ${r} 0 1 1 ${[cx - r, cy]} Z`,
attrs,
],
line: ({ x1, y1, x2, y2, ...attrs }) => [`M ${[x1, y1]} L ${[x2, y2]}`, attrs],
rect: ({ x, y, width, height, rx = 0, ry = 0, ...attrs }) =>
rx == 0 && ry == 0
? [`M ${[x, y]} h ${width} v ${height} h -${width} Z`, attrs]
: [
`M ${[x + rx, y]} h ${width - 2 * rx} a ${rx} ${ry} 0 0 1 ${rx} ${ry}
v ${height - 2 * ry} a ${rx} ${ry} 0 0 1 -${rx} ${ry}
h -${width - 2 * rx} a ${rx} ${ry} 0 0 1 -${rx} -${ry}
v -${height - 2 * ry} a ${rx} ${ry} 0 0 1 ${rx} -${ry} Z`,
attrs,
],
ellipse: ({ cx, cy, rx, ry, ...attrs }) => [
`M ${[cx - rx, cy]} A ${rx} ${ry} 0 1 1 ${[cx + 2 * rx, cy]}
A ${rx} ${ry} 0 1 1 ${[cx + rx, cy - ry]}
A ${rx} ${ry} 0 1 1 ${[cx + rx, cy + ry]}
A ${rx} ${ry} 0 1 1 ${[cx - rx, cy]} Z`,
attrs,
],
polygon: ({ points, ...attrs }) => [`M ${points} Z`, attrs],
polyline: ({ points, ...attrs }) => [`M ${points}`, attrs],
};
// return if shape inside <pattern>, <mask> or <clipPath>
if (shape.closest('pattern') || shape.closest('mask') || shape.closest('clipPath')) {
return;
}
// create d value for new <path>
let [d, attrs] = shape2path[shape.tagName](readAttrs(shape));
// create new <path>
let path = document.createElementNS('http://www.w3.org/2000/svg', 'path');
// write attributes from object to <path>
writeAttrs(path, attrs);
// set attribute "d"
path.setAttribute('d', d);
// replace shape with <path>
shape.replaceWith(path);
return path;
}
// process <path /> element
function processPath(path){
// returns all parent Elements
const getParents = (element)=>{
let parents = [];
while(element !== document.documentElement){
parents.push(element = element.parentNode);
}
return parents;
}
// parse transform matrix
const getMatrix = (transform) => {
let [a, b, c, d, e, f] = transform.match(/^matrix\(([^)]+)\)$/)[1].split(',').map(Number);
return [a, b, c, d, e, f];
}
// parse transform origin
const getOrigin = (transformOrigin) => {
// TODO Parse origin coordinates with units
// from https://source.netsurf-browser.org/libsvgtiny.git/tree/src/svgtiny.c#n1816
let [x, y] = transformOrigin.split(' ').map(value=>value.trim().replace(/[a-z]+$/i,'')).map(Number);
return [x, y];
}
// calc origed matrix from transform and origin
const getOTM = (element) => {
// very useful function for read computed style
let style = getComputedStyle(element);
// no matter how exactly the transform is specified
// (in attributes or in styles or in individual classes),
// the function returns transform always in a matrix form
let transform = style.getPropertyValue('transform');
let transformOrigin = style.getPropertyValue('transform-origin');
// if no transform is acquired
if(!transform || transform == 'none') return [1,0,0,1,0,0];
// parse transform matrix
let matrix = getMatrix(transform);
// parse origin
let origin = getOrigin(transformOrigin);
// return consolidate matrix
return consolidate([
[1,0,0,1,...origin], // + origin
matrix,
[1,0,0,1,...origin.map(v=>-v)] // - origin
]);
}
// return if <path> inside <pattern>, <mask> or <clipPath>
if (path.closest('pattern') || path.closest('mask') || path.closest('clipPath')) {
return;
}
// read element transform matrix
const elementOTM = getOTM(path);
// get all parent elements
const parents = getParents(path);
// clone element transform matrix array
let resultCTM = [1,0,0,1,0,0];
// for each parent
parents.reverse().forEach((parent) => {
// read parent transform matrix
let parentOTM = getOTM(parent);
// calc CTM
resultCTM = consolidate([resultCTM,parentOTM]);
});
consolidate([resultCTM,elementOTM])
// read d attribute, parse it, transform each point and join to single string
let d = new D(path.getAttribute('d')).transform(resultCTM).join(' ');
// this variant returns absolute coordinates without transform
//let d = new D(path.getAttribute('d')).abs.join(' ');
// remove transform attributes
path.removeAttribute('transform');
path.removeAttribute('transform-origin');
// force init transform matrix
//path.style.setProperty('transform','matrix(1,0,0,1,0,0)');
path.style.setProperty('transform-origin', '0 0');
// set d attribute
path.setAttribute('d', d);
// find root element
let svg = path.closest('svg');
if(svg){
// remove element from parent
path.parentNode.removeChild(path);
// add element to root
svg.appendChild(path);
}
return path;
}
// Process <use /> element
function processUse(element) {
// read attributes to object
let attrs = readAttrs(element);
// get href attribute value
let sel = attrs.href;
// find referenced element by href="#id"
let ref = document.querySelector(sel);
// clone referenced element
let clone = ref.cloneNode(true);
// remove id attribute from clone
clone.removeAttribute('id');
// remove href from attribute object
delete attrs.href;
// Create new <g>
let group = document.createElementNS('http://www.w3.org/2000/svg', 'g');
// write attributes from object
writeAttrs(group, attrs);
// add clone to <g>
group.appendChild(clone);
// replace <use> element to <g>
element.replaceWith(group);
return clone;
}
// Create matrix from transform attribute
// This fuction does not used.
// Use of getComputedStyle() completely replaces this implementation
function parseTransform (transform) {
const rxTransformNameStr = '(?:(?:translate|scale|skew)[XY]?)|matrix|rotate';
const rad = a => a / 57.29577951308232;
const { sin, cos, tan } = Math;
const matricies = {
identity: () => [1, 0, 0, 1, 0, 0],
translate: (tx, ty) => [1, 0, 0, 1, tx, ty],
translateX: tx => [1, 0, 0, 1, tx, 0],
translateY: ty => [1, 0, 0, 1, 0, ty],
scale: (sx, sy = sx, cx = 0, cy = 0) => [sx, 0, 0, sy, cx * (1 - sx), cy * (1 - sy)],
scaleX: (sx, cx = 0) => [sx, 0, 0, 1, cx * (1 - sx), 0],
scaleY: (sy, cy = 0) => [1, 0, 0, sy, 0, cy * (1 - sy)],
rotate: (a, cx = 0, cy = 0) => {
let [s, c] = [sin(rad(a)), cos(rad(a))];
return [c, s, -s, c, cx * (1 - c) + cy * s, cy * (1 - c) - cx * s];
},
skew: (ax, ay = ax) => [1, tan(rad(ay)), tan(rad(ax)), 1, 0, 0],
skewX: a => [1, 0, tan(rad(a)), 1, 0, 0],
skewY: a => [1, tan(rad(a)), 0, 1, 0, 0],
matrix: (a, b, c, d, e, f) => [a, b, c, d, e, f],
};
let chain = [...transform.matchAll(new RegExp(`(${rxTransformNameStr})\\(([0-9eE,\\.\\s+-]+)\\)`, 'g'))].map(
([, fn, args]) => [fn, [...args.matchAll(new RegExp(rxNumberStr, 'g'))].map(([num]) => parseFloat(num))]
);
// For example,
// chain = [
// [ 'matrix', [ 1, 0, 0, 1, 0, 0 ] ],
// [ 'translate', [ 100, 100 ] ],
// [ 'rotate', [ 45 ] ],
// [ 'scale', [ 2, 2 ] ],
// ]
chain = chain.map(([fn, args]) => matrices[fn](...args));
// chain = [
// [ 1, 0, 0, 1, 0, 0 ],
// [ 1, 0, 0, 1, 100, 100 ],
// [ 0.7071067811865476, 0.7071067811865475, -0.7071067811865475, 0.7071067811865476, 0, 0 ],
// [ 2, 0, 0, 2, 0, 0 ]
// ]
// returns single matrix
return consolidate(chain);
}
function groupPathList(pathList){
let groupList = [];
const compareStyleEquals = (s1,s2) => Object.entries(s1).every(([k,v])=>'d'==k?true:v==s2[k]);
for(let path of pathList){
let pathStyle = getComputedStyle(path);
let groupFound = false;
for(let group of groupList){
if(compareStyleEquals(group.style,pathStyle)){
group.list.push(path);
groupFound = true;
break;
}
}
if(!groupFound){
groupList.push({
style: pathStyle,
list: [path],
});
}
}
return groupList;
}
function ungroupPathList(groupList){
let pathList = [];
for(let group of groupList){
let newPath = document.createElementNS('http://www.w3.org/2000/svg','path');
Object.entries(getComputedStyle(group.list[0])).forEach(([k,v])=>{if(k!=='d')newPath.style.setProperty(k,v)});
let d = group.list.map(path=>(path.parentNode.removeChild(path),path.getAttribute('d'))).join(' ');
d = d.replace(/[0-9]+\.[0-9]+/g, num => parseFloat(num).toFixed(1));
newPath.setAttribute('d', d);
// this varian to run outside <svg>
document.querySelector('svg').appendChild(newPath);
// this variant to run inside <svg>
//document.documentElement.appendChild(newPath);
pathList.push(newPath);
}
return pathList;
}
setTimeout(()=>{
// TODO: Parse <svg width="" height="" viewBox=""> to common CTM
// Replace all <use /> elements to clone elements referenced by the <use>
document.querySelectorAll('use').forEach(processUse);
// Replace all shape elements to <path />
document.querySelectorAll('line, rect, circle, ellipse, polygon, polyline').forEach(processShape);
// Process all <path /> elements
let pathList = [...document.querySelectorAll('path')].map(processPath).filter(Boolean);
// Group all <path> into groups by style values
let groupList = groupPathList(pathList);
// Convert each group into single <path>
pathList = ungroupPathList(groupList);
// Output new values
console.log(JSON.stringify(pathList.map(path=>new D(path.getAttribute('d')).rel.join(' ')),null,2));
},1000);
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000">
<g transform="translate(-100,-100)">
<g id="hexagon" transform="translate(250,220) scale(1,.5)">
<line id="line" x1="200" x2="500" y1="100" y2="100" stroke="#000" stroke-width="5" />
<g transform="rotate(-120)" transform-origin="500 100">
<use href="#line" />
<g transform="rotate(-120)" transform-origin="200 100">
<use href="#line" />
<g transform="rotate(-120)" transform-origin="500 100">
<use href="#line" />
<g transform="rotate(-120)" transform-origin="200 100">
<use href="#line" />
<g transform="rotate(-120)" transform-origin="500 100">
<use href="#line" />
</g>
</g>
</g>
</g>
</g>
</g>
<g id="hexagon2" transform="translate(250,720) scale(1,.5)">
<line id="line2" x1="200" x2="500" y1="100" y2="100" stroke="#000" stroke-width="5" />
<g transform="rotate(60) translate(-300,0)" transform-origin="200 100">
<use href="#line2" />
<g transform="rotate(60) translate(-300,0)" transform-origin="200 100">
<use href="#line2" />
<g transform="rotate(60) translate(-300,0)" transform-origin="200 100">
<use href="#line2" />
<g transform="rotate(60) translate(-300,0)" transform-origin="200 100">
<use href="#line2" />
<g transform="rotate(60) translate(-300,0)" transform-origin="200 100">
<use href="#line2" />
</g>
</g>
</g>
</g>
</g>
</g>
<use href="#hexagon" transform="scale(1,-1) translate(0,-1200)" />
<rect x="500" y="500" width="200" height="400" fill="#0008" stroke="#000" stroke-width="5" />
<g transform="translate(-100,-100) skewY(-45)" transform-origin="500 500">
<rect x="500" y="500" width="100" height="400" fill="#0004" stroke="#000" stroke-width="5" />
</g>
<g transform="translate(-100,-100) skewY(45)" transform-origin="500 500">
<rect x="500" y="500" width="100" height="400" fill="#0008" stroke="#000" stroke-width="5" />
</g>
<g transform="translate(200,-200) skewY(45)" transform-origin="500 500">
<rect x="500" y="500" width="100" height="400" fill="#0004" stroke="#000" stroke-width="5" />
</g>
<g transform="translate(200,0) skewY(-45)" transform-origin="500 500">
<rect x="500" y="500" width="100" height="400" fill="#0008" stroke="#000" stroke-width="5" />
</g>
<rect x="500" y="300" width="200" height="400" fill="#0004" stroke="#000" stroke-width="5" />
</g>
</svg>
This is a problem with triangulation.
Three.js uses a fork of earcut. Looking at the open issues, there are a few similar problems. In particular, earcut does not seem to like when a contour crosses itself and forms a hole next to the edge:
Based on this information, I hypothesized that my arcs might be overlapping slightly and crossing each other at intersection. This way, holes/loops would form, completed by the lines automatically added by Three.js. To test this theory, I shortened each arc by 0.001 radians and the glitch disappeared.
In my experience, the easiest way is to use a database;
You must consider two scenarios:
that the application is completely closed and the Firebase system starts your operations for a few seconds, at which time it would save information in the database.
That the application is in the background but the system still keeps it alive, in that case I would use the WidgetsBindingObserver to synchronize the information that is in the database with what you need.
My recommendation is that you use Hive, it is simple and for a synchronization task like this I have used it and it has worked well for me.
Keep in mind that in the Background an isolate cannot modify UI components.
The error message ERROR: The process "3196" not found. occurs because the process with PID 3196 is no longer running, even though it was listed as listening on port 8000 when you checked with netstat. This could happen if the process terminated on its own between the netstat command and your attempt to kill it.
Here are a few things you can try:
Re-run netstat -ano to see if the process is still using port 8000.
If the PID has changed, use the new PID to kill the process. If no process is listening on port 8000, the process may have already terminated. Verify the task:
Run tasklist to see if PID 3196 is listed in the running processes. Restart your terminal:
If you are using a service like a local web server (e.g., a Node.js server), it might have crashed and released the port but left some residual references. Restarting your terminal might help clear any inconsistencies. Clear the port manually:
If the port 8000 is still occupied but no process is visible, restarting your machine or using netsh to free the port might help. If the process is critical, check the source (e.g., a web server, etc.) and restart it manually if needed.
I work for a railway contractor. Every time they ask me to go to a different station. I have all the postcodes of the stations. Now I wanted to create a URL (for Excel sheet) which tells me the distance of my workplace from my house.
So, here's my solution.
=HYPERLINK("https://www.google.com/maps/dir/" & home_location & "/" & Ref of Destination post code , Ref of the name)
for any additional stop, add &"/"&Ref of Next stop before the ','.
You have to add the 'jsx-runtime' to your ESLint config file – for the new flat structure, your eslint.config.js file should be configured as follows:
// Other imports
pluginReact from "eslint-plugin-react";
export default [
// (...)
pluginReact.configs.flat['jsx-runtime'],
// (...)
];
Too bad no one answered. I join the question.
I was unable to create my own compression / decompression functions. However, I was able to get it to work using a third party package. https://github.com/alta/swift-opus
It seems that prelineui uses external libraries that allow the correct functioning of some components of its plugins, the only bad thing is that they don't report that, try placing the loadash and dropzone libraries in your index.html (go in and copy the respective version):
The issue lies in the url, you have an extra closing Curly brace } in url. This extra curly brace at the end of ${name}} will break the URL and make the request fail.
To fix this, simply remove the extra curly brace:
const url = http://localhost:8080/cartproducts/${username}/${name};
I've written a zero-dependency ESLint Preprocessor that allows you to lint .js.erb files here. Browse through the source code here. With this, you can configure ESLint such that it will also lint your .js.erb files, see the Readme.
It’s definitely possible to extract a list of Dogs from a list of Animals without a cast, but it depends on how your data structures and class hierarchy are set up. If you're using an inheritance model where Dog is a subclass of Animal, you can filter the list based on the instance type. For example, using instanceof in Java or is in Python allows you to identify the Dog objects in the list.
By the way, when working with specific objects like dogs, using a dog lap day calculator could be handy to track how active your pets are and plan their exercise routines! It’s fascinating how technology can tie into real-world applications like keeping our dogs healthy while programming efficient solutions.
* {
margin: 0;
padding: 0;
}
Will reset predefined styles of all elements.
Anyone found a way to do this for Visual Studio 2022?
So, for example, for #pragma region TEXT, I want to change the colour of TEXT.
I set Preprocessor Text to green (link to screenshot) but it's not changing (another screenshot) TEXT. Is there a different item that I need to select?
Preprocessor Keyword changes the #pragma region bit but not TEXT either (even after restarting Visual Studio).
In my case, in development environment the 'unknown' option mentioned above didn't work. I should explicitly define the environment in the Runner.entitlements and in app delegate to solve the issue

The communication between the terminal and your program (running on the host) is bidirectional. Bytes are sent from the terminal to the host (in response to your read() call) and strings are sent from the host to the terminal (by printf()).
As @Barmar said, your terminal isn't sending the ^V character to the host, and your program never receives it.
Just for clarification: the terminal driver is OS code that runs on your host (in this case, inside the Linux VM), and by disabling some control characters you're just telling the driver (not the terminal itself) that it must not do any special processing of these characters before (or instead of) sending them to your process (ie. to your code).
By the way, something is missing in your example (the orig_termios variable?).
To use ggplot2 to draw dendrogram, another option would be ggalign
knitr::opts_knit$set(upload.fun = identity)
tmp <- structure(list(
merge = structure(c(
-2L, -17L, -4L, -8L, -9L,
-18L, -6L, -1L, -13L, 3L, -22L, 2L, 8L, -5L, -21L, -11L, 12L,
-14L, 16L, 11L, 15L, 19L, 21L, -3L, -20L, -12L, 1L, -10L, -19L,
4L, -7L, -16L, 5L, -23L, 7L, 10L, -15L, -24L, 6L, 13L, 9L, 17L,
14L, 18L, 20L, 22L
), dim = c(23L, 2L)), height = c(
45023.2309258232,
51012.7856326235, 58268.2644327081, 60190.454758209, 61767.4324786129,
66285.293896912, 73795.8493548248, 73915.5720738195, 90644.0966914007,
96920.4596202474, 102068.443095797, 107134.968399678, 115773.032503256,
117042.164244344, 121274.611506284, 127869.304201595, 131043.636743644,
158158.916403724, 203042.0850021, 204028.358261787, 267728.385874565,
289081.126533712, 575641.131737474
), order = c(
21L, 24L, 14L,
13L, 16L, 11L, 18L, 19L, 17L, 20L, 6L, 8L, 2L, 3L, 1L, 7L, 4L,
12L, 9L, 10L, 22L, 23L, 5L, 15L
), labels = c(
"D10PBS_1", "D10PBS_2",
"D10PBS_3", "D10PBS_4", "D10Myo_1", "D10Myo_2", "D10Myo_3", "D10Myo_4",
"D15PBS_1", "D15PBS_2", "D15PBS_3", "D15PBS_4", "D15Myo_1", "D15Myo_2",
"D15Myo_3", "D15Myo_4", "D21PBS_1", "D21PBS_2", "D21PBS_3", "D21PBS_4",
"D21Myo_1", "D21Myo_2", "D21Myo_3", "D21Myo_4"
), method = "complete",
call = quote(hclust(d = dist(t(count.data[gene.masks$Genes, ])))),
dist.method = "euclidean"
), class = "hclust")
library(ggalign)
#> Loading required package: ggplot2
ggstack(NULL, "v") +
align_dendro(method = as.dendrogram(tmp)) +
theme(axis.text.x = element_text(angle = 90))
Created on 2024-10-12 with reprex v2.1.0
import sys !{sys.executable} -m pip install --upgrade pip
!{sys.executable} -m pip install scikit-learn
@ImranBinAzhar, @JoelCampos thank you guys it worked!!! I appreciate you spending your time on this question. Thx.
Lab Task
Question 1
Use your knowledge of stacks to evaluate the given post fix expression:
6 2 3 + - 3 8 2/+*2^3+
you are almost there. try the following
(date && ifconfig | awk 'NR == 4' && ifconfig | awk 'NR == 6') | tee -a ./net.log
in the setting.py file, remove 'polls.apps.PollsConfig' or 'polls', and then add 'django_polls.apps.PollsConfig', It will work.
The GSlice implementation was removed in 2.76, citing improved performance of normal memory allocators. Now g_slice_new() and g_slice_free() will just call g_malloc() and g_free().
Therefore, there's no difference between the two on newer versions.
Reference: https://docs.gtk.org/glib/memory-slices.html
For partial page reload(show data without reloading), you may use Django HTMX.
Installation guide for django HTMX:- https://django-htmx.readthedocs.io/en/latest/installation.html Docs for Django HTMX:- https://htmx.org/docs/
Removing the space in the file name fixed the error for me. I went from 'Topic Chunking' to 'Chunking'. Streamlit was able to run the file after its change.
There's a crate to do that: windows-env
Thank you for your answer. I followed your instructions but in permissions tab, after clicking on edit principle, when I click to assign roles, "Organization Policy Administrator" is not an option. "Organization Policy Viewer" is an option. "Organization Administrator" is an option. But "Organization Policy Administrator" is not an option. I'm going to throw my computer at a wall and see if that works.
Its already reporting your python version...
You have Python 3.12.2
Compiled for AMD64
And what i can see here, you are trying to launch C:\Users\Administrator\OneDrive\Desktop\Python 3.12 (64-bit).lnk
So you will need to exit() first, and then run it again..
this is the dumbest question i ever seen on stackoverflow
like, seriously, are u blind?
Any news? Same problem here...
Here's a workaround for the issue as it relates to font properties. It avoids ::part and thus !important, which @Danny'365CSI'Engelman deemed a "red flag".
Setting all of the shadow DOM <input> (the ::part element)'s CSS font properties to inherit allows me to set those properties for the custom element itself, not the ::part. If you have multiple shadow DOM elements with different font settings then this is not possible, but how often does that happen?
<template id="my-template">
<style>
input {
font:inherit;
font-kerning:inherit;
font-size-adjust:inherit;
font-synthesis:inherit;
font-optical-sizing:inherit;
font-palette:inherit;
}
...
AFAICT that's all the CSS font properties that are not "experimental" or quasi-deprecated (like font-feature-settings). No more ::part or !important for fonts.
This solution might work for other non-layout properties. For example, it doesn't work for padding because it doubles the amount of padding by applying it to both the DOM and shadow DOM elements. In my case it does help auto-adjust the <input>.nextElementSibling's margin because I set that in em units which I inherit from the custom DOM element. But that's a special case with a negative margin to offset an SVG image.
This library may help you and you can add it to your project:
This is surprising to me because I manually added prefetch in the link, and now the pages open instantly. Before, it took a few milliseconds to load the pages.
I don't understand why, as I found the true default in production, but it works differently for me.
The only thing that seems to be working for me is - https://github.com/iMerica/dj-rest-auth/issues/503#issuecomment-1937769215
1.download Python from the official Python website.
2.During installation, Make sure "Add Python to PATH." is selected.
Mostly it works in this step. Now Check python version , it displays
Check if you can download the font directly in browser. If not your url to font is wrong.
I experienced the same issue today. If you encounter a similar error, check to make sure that the path to your font file is correct.
The issue you're encountering is due to the fact that auto-linking in React Native only works with dependencies installed directly in the project, not with peerDependencies.
Explanation: peerDependencies are meant to indicate the versions of libraries that your library is compatible with, but they are not installed automatically when your library is installed. React Native's auto-linking system works with packages that are listed under dependencies in the project’s package.json. If your libraries like react-native-sqlite-2 are listed as peerDependencies, they won’t be installed automatically, and React Native won't auto-link them.
Still did not worked for me. In android I am able load image but ios throws error
> Could not resolve all files for configuration ':composeApp:iosSimulatorArm64CompileKlibraries'.
> Could not resolve io.coil-kt.coil3:coil-network-okhttp:3.0.0-rc01.
I am using compose multiplatform
here is my gradle
sourceSets {
androidMain.dependencies {
implementation(compose.preview)
implementation(libs.androidx.activity.compose)
//material3
implementation(libs.androidx.compose.material3)
//ktor
implementation(libs.ktor.client.android)
//coil
implementation("io.ktor:ktor-client-okhttp:3.0.0")
}
iosMain.dependencies {
//ktor
implementation(libs.ktor.client.darwin)
//coil
implementation("io.ktor:ktor-client-darwin:3.0.0")
}
commonMain.dependencies {
implementation(compose.runtime)
implementation(compose.foundation)
implementation(compose.ui)
implementation(compose.components.resources)
implementation(compose.components.uiToolingPreview)
implementation(libs.androidx.lifecycle.viewmodel)
implementation(libs.androidx.lifecycle.runtime.compose)
// material
implementation(compose.material)
implementation(compose.material3)
// coil
implementation("io.coil-kt.coil3:coil-compose:3.0.0-rc01")
implementation("io.coil-kt.coil3:coil-network-okhttp:3.0.0-rc01")
//ktor
implementation(libs.bundles.ktor)
//coroutine
implementation(libs.kotlinx.coroutines.core)
}
}
Can any one tell what is wring here.
You need to set KONG_ADMIN_GUI_URL correctly.
KONG_ADMIN_GUI_URL=http://YourServerURL:Port
such as:- KONG_ADMIN_GUI_URL=http://66.107.66.145:8002
Following this issue here for more details.
Your problem is that you've got KONG_ADMIN_GUI_URL incorrectly set, causing Kong Manager's Admin API requests to be rejected due to CORS protection.
It specifies that the repository is a bare Git repository hosted on a remote server (in this case, GitHub)
A bare repository is one that does not have a working directory.
Simply, it is just a convention.
The solution, is in your answer: Have an extra Master which everyone connects to, so all 4 screens/clients are identical.
llm.invoke() does not actually call a Langchain Tool. It only generates a ToolCall as part of the response's .tool_calls property. This ToolCall then needs to be manually invoked on a Tool.
See here:
https://python.langchain.com/docs/how_to/tool_results_pass_to_model/ https://python.langchain.com/docs/how_to/tool_calling/#defining-tool-schemas
i am facing the same problem here , in CodeBlocks you can just add the file to the project from (project->addFiles)
You can use this script to change the "Proxied" status https://github.com/Thibs/cloudflare_update_proxied_status_dns/
L'historique législatif des mutations foncières en Tunisie est un sujet complexe qui reflète l'évolution du pays depuis l'époque coloniale jusqu'à nos jours. Voici un aperçu des principales étapes et lois qui ont marqué cette évolution :
As a work around I could temporary lower the free disk threshold, then I could bring the node online and it would update amount of free disk space. Then I could revert to the settings we want.
Very simple 2-element sliding window can be implemented as follows
for i, curr in enumerate(arr[1:]):
prev = arr[i]
...
Talking from Redis usage perspective, less grasp on the others:
What is the gain with using many connections to the same server?
You can have some pool depends on the implementation of the client you use, but creating a connection per request is useless.
You should understand the limitations, use the maximum amount of connection Redis server can efficiently handle, and re-use the same connections.
You should also understand the architecture of the client you use, if it is a multiplexer for example, even more than one connection is useless.
Having more and more connections sending more requests of what Redis (or MYSQL for that matter) can serve is just misusing of resources, its using a private car for each request and sitting in traffic instead of all moving to public transportation, its not faster, and you need much much more resources.
If you need more TPS you should scale up Redis, move to cluster mode and add more replications so you can read from more endpoints and the traffic has "load balancing" between shards, the amount of connections should be almost constant compare to the amount of nodes the cluster has.
With the proper usage Redis will be much faster than the requests getting in (Valkey, the OSS fork of Redis, just announced Valkey 8 with 1million TPS, that's more than most apps need, and its not require connection per request).
I guess the same is even more true for MySQL, the amount of connection should be determined by the ability of the DB to serve requests and a small margin, there's no logic holding more.
Same lol I’m trying to make a code that gives a player a gold nugget with a name but I get the same output
Your problem is that you've got KONG_ADMIN_GUI_URL incorrectly set, causing Kong Manager's Admin API requests to be rejected due to CORS protection.
You need to set KONG_ADMIN_GUI_URL correctly.
KONG_ADMIN_GUI_URL=http://YourServerURL:Port
such as:- KONG_ADMIN_GUI_URL=http://66.107.66.145:8002
OR
As this answer here allow called from any domain by set
KONG_ADMIN_GUI_URL=*
Note: Be sure to put the asterisk in double-quotes when defining it with a yaml file, or with a docker compose file.
KONG_ADMIN_GUI_URL: "*"
derivedAsync from ngxtension solves this also in a clean way:
readonly roles = derivedAsync(() => getRoles(this.userId()), { initialValue: [] });
https://ngxtension.netlify.app/utilities/signals/derived-async/
Thanks this really helped!! :)