instruction
stringlengths
0
30k
⌀
The [Linkplay A31 Amplifier Control App](https://github.com/hn/linkplay-a31#amplifier-control-app) monitors ALSA pcm/mixer devices for sound activity and volume changes and adjusts the (external) DAC/AMP accordingly. It also (un)mutes the amplifier if there is (no) sound activity for some (adjustable) time period. Y...
I made one that opens a drawer by clicking on it but when it opens, all the contents below such as those checkboxes and butto also move down. I just started working with .net maui and I can't fix this in any way. ``` <VerticalStackLayout> <Button Text="Choose One" Clicked="OpenDrawer" Margin="98,1,98,4"/>...
Move .net maui contents below the drawer when it's opened
chromadb Collection.add(Includes=[""]) giving error
|python|chromadb|
What if we used the extra bit as a flag? If the flag is set (1), it indicates that the character continues into the next byte. If not (0), it’s the end of the character. Where UTF-8 uses | Byte 1 | Byte 2 | Byte 3 | Byte 4 | |----------|----------|----------|----------| | 0xxxxxxx | | ...
I have this error when run junit test in spring mvc project. ```none Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'createWebSocketContainer' defined in net.ebaolife.tpa.websocket.WebSocketConfig: Invocation of init method failed; nested exception is java.lang.Ill...
You can call `add_job()` during runtime as long as the application is running on loop. For example, you are running Flask which should be on loop already. If you are using Flask and expose API application, you can let users queue task on frontend/POST event. Then on Flask just simple collect and run `add_job()` wit...
This can be done using [`pd.wide_to_long`][1]: ``` df = pd.wide_to_long( df, stubnames=['action', 'time'], i='person', j='num', sep='_' ).reset_index() ``` Output: ```none person num action time 0 Tom 1 run 2022-01-26 1 Max 1 stop 2020-11-16 2 Bob 1 ...
## That's not a binary tree Binary is english for 'related to 2'. Hence, a binary tree is a tree such that any node is either A leaf (has no children), or, it has __exactly 2 children__. Essentially, all nodes have either 0 or 2 children. Your picture isn't a binary tree: Node D has 3 children. Node B has only 1....
Faced a similar issue and found this: https://stackoverflow.com/a/75338607/1527469, i.e. just convert the object to array, do the filter, then convert back: db.encounter.aggregate([ { "$set": { "form.fields": { "$objectToArray": "$form.fields" ...
For **Ubuntu/Debian** users, newer versions of `gitlab-runner` on Ubuntu are managed via a `.deb` file, so this should do the trick: `sudo apt remove gitlab-runner`
I have a cisco c1000-48p-4g-L that has the following global config line. ``` no spanning-tree vlan 60,70,99,110,207,221,242,455-461,510,666,700,702,705,900 ``` when attempting the below config command: ```spanning-tree vlan 99``` the cisco accepts the command, but when we look at the config again, it still ...
CISCO refuses to turn off spanning tree for specific vlans
|configuration|cisco|
I started getting build error > MSB3174 Invalid value for 'AssemblyVersion' This started after trying a couple of version updating extensions (Version Changer 2022 & Intentional Solution Version Editor VS2022) in my Visual Studio 2022 environment. I have since uninstalled the extension, but it has not resolved t...
Getting MSB3174 Invalid value for 'AssemblyVersion' in C# .NET 6 Windows Forms app
hi i have code build with ListView.builder for change theme but the code not good i want change to CupertinoSwitch example i want CupertinoSwitch to active dark mode and deactivate dark my code ListView.builder( padding: const EdgeInsets.all(8), itemCount: AppTheme.values...
|flutter|dart|flutter-dependencies|flutter-animation|dart-pub|
{"Voters":[{"Id":77335,"DisplayName":"HansUp","BindingReason":{"GoldTagBadge":"ms-access"}}]}
I got some issues with my solidjs (Vanilla JS) code. I try to build a small three page Website, just to print out some Information. I use vitejs, solidjs and tailwindcss. I was able to build the relevant sections, some reactivity and my desired three sites. All on its own works well. The thing i can't manage is Routin...
|r|ggplot2|
null
One can take advantage of the implied structure of the full binary tree to compress the structure, but it's still `O(n)` space. This is because the there is distinguishing information in the arrangement that is not there for the complete binary tree: there is, purposefully, just one arrangement. For example, I've us...
I'm working in an .iypnb with pyspark and pandas. I'd like to be able to take my dataset (df) and loop through various columns, outputting a freq table of the values within that column. Doing so with .show() is easy enough: ``` columz = ['col1', 'col2', etc] for c in columz: df.groupBy(c).count().or...
You can create a function which can have below 2 queries. Delete * from <FINAL> where ID in ( select distinct ID from <INCREMENTAL>); Insert into <FINAL> (Select Id, Code from <INCREMENTAL>; These are just rough queries bu should give you basic idea
I am trying to join Table A on Table B. The issue is that in Table A the join value can be in column 1,2,3,4,5 or any combination of those fields. The value is a name in the format of LastName, FirstName. What I need is to check each field to see if it contains the value, stop after the first match and move on to the ...
I'm trying to implement a slider with a tooltip showing current value. The idea is to make something like a HTML + JS <input class=range> with a value bubble (https://css-tricks.com/value-bubbles-for-range-inputs/). Both ideas I've come with so far are not ideal. XAML ``` <Slider ...
I got it working this way. Install SSMS 17.9.1 Install SSMS 20.x Install PoorMansTSqlFormatter copy PoorMansTSqlFormatterSSMSPackage.pkgdef to C:\Program Files (x86)\Microsoft SQL Server Management Studio 20\Extensions (located at C:\Program Files (x86)\Microsoft SQL Server Management Studio 17\Extensions o...
Your use of if conditions looks good. But there is a little thing at the line "payment_tier_number" column conversion. I think, instead of float/decimal, it should be float. df[col] = df[col].astype(float)
`PostAsJsonAsync` uses `JsonSerializerDefaults.Web` for serializer options which will result in Camel case property names in the JSON while `JsonSerializer.Serialize(obj)` will use default ones resulting in Pascal case (matching property names). There are multiple ways to handle that. For example changing the settings ...
Issue is that the header in my table scrolls when I want the header row to stick. The Css/Html ``` virtual-scroller { height: 37.7rem; min-width: 800px; thead th { background: white; position: sticky; top: 0; } } <div class="identifier-table-container"> <virtual-scroller #scro...
I'm trying to use libseccomp to catch syscalls and get in trouble. As the title says, supervisor can only catch first getpid(). It seems like the fd is no longer vaild(not sure) after first getpid(). The errno is 22:Invalid argument. ``` #include <iostream> #include <unistd.h> #include <sys/syscall.h> #include <se...
seccomp_unotify can't catch syscall more than once
|linux|system-calls|seccomp|
null
I'm using intermediate certificate to sign the client certificates, while trying to enable client certificate validation on server side using python 3.10 with following code ``` ssl_context = ssl.create_default_context(purpose=ssl.Purpose.CLIENT_AUTH) ssl_context.load_cert_chain(certfile=settings.CERTS_TLS_SER...
Python SSL Error , Server side - Client certificate verify failing with Intermediate cert - self-signed certificate in certificate chain (_ssl.c:1007)
|python-3.x|ssl|openssl|ssl-certificate|
null
If you don't want to have a dependency on NLog in your controller (so you depend on Microsoft abstractions instead) : In your command handler / controller class MyHandler(ILoggerFactory loggerFactory) { public void Handler() { var logger = loggerFactory.GetLogger("myCustomL...
I need help understanding how to 'think' about single sign-on for my multi-tenant application. I've tried ChatGPT for explanation; but I think my fellow humans can do a much better job. Here's what I'm building: A laravel application that allows customers to create `subdomain.example.com` and then run it on thei...
How would single sign-on work for my multi-tenant application?
|laravel|oauth|single-sign-on|multi-tenant|laravel-passport|
[enter image description here](https://i.stack.imgur.com/Khdmb.png) import.sql(((( `` ``` use `[D:\DBSD.CW2.14714.13786.12928\DBSD.CW2.14714.13786.12928\DBSD.CW2.14714.13786.12928\APPDATA\CAMBRIDGE.MDF] --generating sample XML select top 2 EmployeeID "@id", FirstName "@fn", LastName "@ln", Position "@position"...
switch from current encoding to specified encoding is not supported
|xaml|maui|
null
This is my Auction model: class Auction(models.Model): auction_id = models.AutoField(primary_key=True) crop = models.ForeignKey(Crop, on_delete=models.CASCADE) image = models.ImageField(upload_to="crop-image") farmer = models.ForeignKey(User, on_delete=models.CASCADE, limit_ch...
Quite late to the party but since I have wasted most of the day struggling to use svg.js from typescript I want to share the solution: First (of course) you need to install the svg.js via npm. npm install svg.js --save Installed package contains the so called typedef file `svg.js.d.ts`. You will also ne...
Comparing 2 numeric columns for similarity pairwise
|python|statistical-test|
simply downgrade the latest version ( 1.11.2 ) to ( 1.10.3 ) npm i @nestjs-modules/mailer@1.10.3
Assuming that your initial table (your incremental table) is insert only and has an additional column to track the timestamp when a record was inserted. Also assuming that when you say the 'latest' record that you are referring to the IDs that have the greatest insert timestamp. The capturing of deletes can be inser...
There are two numeric columns in the table, how can I compare the values for similarity pairwise using statistical methods in python. I just know that they are not normally distributed, and I don't have an idea, how to check their pairwise similarity.
`putfo` requires a file or file-like object. The error message indicates you're getting raw bytes instead of a file io (raw bytes don't have a `read` method, but file-io objects do). To address that, wrap your returned bytes using `io.BytesIO` ```py from io import BytesIO ftp.putfo(BytesIO(file_obj), remotepath...
|reactjs|axios|google-drive-api|
Redshift/Postgres between function produces seemingly unrelated error when ">" or "<" both work but not together
|postgresql|amazon-redshift|between|digits|
null
{"Voters":[{"Id":-1,"DisplayName":"Community"}]}
{"Voters":[{"Id":6622587,"DisplayName":"eyllanesc"},{"Id":62576,"DisplayName":"Ken White"},{"Id":269970,"DisplayName":"esqew"}]}
{"Voters":[{"Id":6622587,"DisplayName":"eyllanesc"},{"Id":62576,"DisplayName":"Ken White"},{"Id":269970,"DisplayName":"esqew"}],"SiteSpecificCloseReasonIds":[]}
QObject, QML Object, JavaScript Objects aren't the same things. Where possible, Qt does its best efforts to map objects from one format to another in this case it will not work. For instance, Qt will map a QVariant, specifically, QVariantMap to JavaScript for you. So if you can marshall your properties in a QVariant...
|excel|vba|processing-efficiency|excel-tables|listobject|
I'm a novice dev looking at a pre-existing react project using MaterialUI. I've been asked to change the whole thing to use FluentUI. I've never really used either MaterialUI or FluentUI. So I'm wondering if there is a document or a way for me to find the mapping between MaterialUI components and their equivalent Fluen...
Migrating from MaterialUI to FluentUI
|reactjs|material-ui|fluent-ui|
this is another interesting one where KQL like all languages like this isn't great at showing you what isn't there. So you need to give it things that you know from the start, in this case I've assumed a `StartWindow` and `EndWindow`. I have taken your code and question, added some additional variables and some ext...
I have created a website application using nextjs typescript for the frontend and golang echo for the backend with a postgresql database. How do I create the desktop version (.exe)? Is there a way that I can do to create a desktop version of my website application? especially for Windows installers, so users can instal...
How To Convert Nextjs Typescript Golang Postgresql Web App Into Desktop App
My issue was that the name of the header was getting converted to a different naming convention. So, if I provide `redirectDomain`, it would be converted to `redirectdomain`. I've changed it as `Redirect-Domain` and read it as `redirect-domain`. Reading it as `Redirect-Domain` would probably work too.
mvn help:evaluate -Dexpression=project.version -Doutput=>(cat) > /dev/null This works by suppressing the normal output from Maven while making it write to a file that is the stdin of the cat command, making it output to stdout without the ANSI color codes. Tested in bash.
Don't consider `final` locals as a feature. Opposed to read-only fields or constants, that are introduced to optimize compiled code, `final` locals were introduced to overcome a short coming of the Java engine (design mistakes). Java later had issues implementing lambdas (or closures in general). In particular the c...
No, it will not. Large businesses will always strive to automate away workers to gain a financial advantage over their competition, however these solutions usually only make sense at scale. We certainly may see larger businesses doing less hiring/firing at lower-level positions as this automation trend continues, but ...
null
I have the following example class, which has a overloaded method `bar`. class Foo { bar(value: string): string; bar(value: number): number; bar(value: string | number): string | number { return value; } } In my tests I am normally creating an instance of foo and st...
Return value from overloaded method with Sinon
|typescript|sinon|
Old TF versions with Python 2 are no longer supported on Windows via pip. What worked for me was to make the minimal changes to the code needed to run Python 3.6, which supports TF 1.4. A more complicated option that works with Python 2 would be to build TensorFlow from source.
Just joined a company and was asked to fix a tool an old engineer made in VBA. Works fine on every one else's computer except for this one. The folders and all necessary info were copied over. Everything seems to be working correctly in the code, the only part I can't see is when VBA calls shell to run a python scr...
|c#|sql|database|stored-procedures|
null
I am looking for a way in NextJS 13/14 to store global state on the server-side. Here is my use-case: I have a LogReader that must access server-side logfiles and tails them live. It then receives updates and stores them in a global variable. Any and all connected clients should have access to this data. I cannot...
NextJS 13 14, Store server state globally
|next.js|state|next.js13|
I'vre checked my website on semrush and i've got this issue (147 outgoing internal links contain nofollow attribute)- warning So, how to fix it on wordpress? Fixing outgoing internal links contain nofollow attribute to improve SEO
outgoing internal links contain nofollow attribute? how to fix it in wordpress
|wordpress|nofollow|
null
I am trying to force the first letter of a caption ot be uppercase, and the rest lower case. There seems to be a clash between xstring and subfig (that I need) \documentclass{article} \usepackage{subfig} \usepackage{graphicx} \usepackage{xstring} % Redefine \caption command to capitali...
latex float caption first letter capital, rest lower case
|latex|caption|
From my understanding, all four of these methods: `predict`, `predict_on_batch`, `predict_step`, and a direct forward pass through the model (e.g. `model(x, training=False)` or `__call__()`) should all give the same results, some are just more efficient than others in how they handle batches of data versus one sample...
ngx-virtual-scroll #header doesn't work - scrolls header in html table even with #header included in thead element
|virtualscroll|
null
I need a cython wrapper for a tuple consisting of three elements all of the same type. Now I know that this isn't directly supported by cython but that there is a workaround that is "explained" in the answer posted to a question found here: https://stackoverflow.com/questions/71930481/how-to-declare-a-c-tuple-in-cyt...
workaround for wrapping C++ tuples in cython - a more explicit answer please