instruction
stringlengths
0
30k
I want to deploy my portfolio on Vercel, but I'm getting this error: Running build in Washington, D.C., USA (East) – iad1 Skipping build cache, deployment was triggered without cache. Cloning completed: 909.067ms Running "vercel build" Vercel CLI 33.6.2 Error: Unable to find any supported Python version...
Unable to find any supported Python versions
|python|flask|vercel|portfolio|
null
Please check your route file to ensure that you have correctly created a new route. Verify their location and validation code. ```php Route::middleware('auth')->group(function () { Route::get('/profile', [ProfileController::class, 'edit'])->name('profile.edit'); Route::patch('/profile', [ProfileController...
Can I use a transparent version of the MUI AppBar with the original color from theme?
The `Promise` is literally a promise: a promise to provide some value later, once some work is done. So to get a value you should either await it, or provide a callback by using `then` / `catch` methods. Basically, when you have that `test` const: ```javascript const test = new Promise((resolve, reject) => { ...
I am trying to put together a basic script to generate a 2D FEA stress analysis for a thin plate with various configurations of holes(by different diameters, locations, and # of holes) so I can narrow down the configurations before going to a full 3D FEM in Abaqus or something that allows for more advanced analyses. I ...
Fixing FEA Model loading with correct units and stress results
|matlab|pde|
You are a big fan of television and don't like to watch just one channel at a time. You are constantly switching between different channels, zapping. Your dog tried to eat the remote control and unfortunately partially destroyed it. Now you only have two buttons to change channels: one for the next channel and one for ...
You do not need python for simple cases just use the systems own tools. The Unix Philosophy (DOS was too, but Windows CMD.exe is better). Is to write reusable blocks of commands to adapt to a specific case. Thus all we need is HTML "get and edit" which can be Write Once Re-Use Many (WORM). Here I have paused a...
AppScript For Google Form
|google-apps-script|
null
How do I make it so all arrays are the same length?
I figured it out. I had to change the folder that this component was in. I had it in the same folder as the page. The `/src/app` folder had both `page.tsx` and `icon.tsx` I moved the `icon.tsx` to `/src/app/_components` and that resolved it. I feel silly for not realizing that but this page of the Next.js docs helped...
{"Voters":[{"Id":1394729,"DisplayName":"tink"},{"Id":522444,"DisplayName":"Hovercraft Full Of Eels"},{"Id":546871,"DisplayName":"AdrianHHH"}]}
{"Voters":[{"Id":7070613,"DisplayName":"Adrian Klaver"},{"Id":2650437,"DisplayName":"Marth"},{"Id":7623856,"DisplayName":"Belayer"}],"SiteSpecificCloseReasonIds":[18]}
Yes, in this other question you can find more information: https://stackoverflow.com/q/6094575/12508080 You could do something like this: Class<?> clazz = String.class; Object object = clazz.getConstructor().newInstance();
After enabling Xcode concurrency check (@JoakimDanielson), I received warnings that the SwiftData model was not "Sendable". As @loremipsum noted, I re-wrote the func as async and removed the floating Task. Working func is: /// Query DNS for MX record retrun an array of MX Strings /// - Parameter domainName:...
PHP has the escapeshellcmd() function which escapes dangerous commands from input fed into the the exec() system() etcetera functions discussed. This will enable you to have the functionality you're looking for without introducing major security vulnerabilities. More about that here: https://www.php.net/manual/en/funct...
First let me say that I am very new to Rust, but I have been a developer for many years. I am trying to build an application that reads RSS feeds using the Tokio & hyper crates. I am using the RustRover 2023.3 EAP IDE, and rustc 1.77.1 (7cf61ebde 2024-03-27). I started with the example code from here -> [text]...
I found a 3-year-old tutorial on youtube and it contains the following code snippet: ``` import { createStore, applyMiddleware } from 'redux'; import { composeWithDevTools } from '@redux-devtools/extension'; import thunk from 'redux-thunk'; import rootReducer from './reducers'; const initialState = {}; con...
If you want a strict type check for the screen and params keys based on the corresponding keys in the `RootTabParamList`, you can achieve this by following modification in `DefaultParams` interface: ``` type ScreenParams<T> = T extends { [key: string]: any } ? DefaultParams<{ screen: keyof T; params?: T[keyof T]...
When i add a <img> element and reference what is supposed to be inside of it trough CSS a stupid white outline appears. Heres the code: ``` <div class="button"><img src="your-image-url.jpg"></div> <style> body { background-color: red; margin: 100px; } .button { padding: 0; /* Add this to re...
White line around <img> element in HTML
|html|css|
null
For this scenario it's OK, because maximum you are going to get the same validation added twice, which is not a problem. You are simply using the HTML attribute for limiting negative values and not for doing extra validations that could simply be done with reactive form validations. So your code change is fine, in m...
Write a custom class that is derived from [`std::streambuf`](https://en.cppreference.com/w/cpp/io/basic_streambuf) and overrides its `virtual` methods to simulate the conditions you want (ie, to return a read error after N characters have been read). Then, create an instance of [`std::istream`](https://en.cppreferen...
I'm learning about selenium, write the code below on Jupyter Lab, I'm finding it difficult to download files without the download manager window appearing. I've tried everything, but I couldn't solve the problem, I'm using the latest version of Anaconda and the latest geckdriver, my firefox is also the most current. ...
|c++|c++11|
I recently encountered an issue while initializing a new project using Composer. Upon running Composer, I received an error indicating a PHP version mismatch between the required version by my dependencies and the version installed on my system. The error message from Composer reads: ``` Composer detected issues...
Updating PHP Version in XAMPP on Windows 10 Without Losing Database: Seeking Optimal Solutions
|php|xampp|composer-php|version|
null
I have a fairly simple web assembly blazor app that I have created and released as open source to help coaches of high school track runners. You can run multiple timers and take splits for multiple kids at the same time demo found at [track.tek-flow.com][1] . If the browser is kept in the foreground and you don't le...
Failure running Apple MLX lora.py on 13B llms
|large-language-model|
I'm making a web app with Flask using SQLALCHEMY to management the databases. I need to store in more then one database. For example: "user_databse.sb" and "teacher_database.db". I read the documentation to do this, but when I try to use in my code I getting this error: > ModuleNotFoundError: No module named 'M...
I know ASP.NET Core Identity uses `UserValidator` to ensure the username is unique: ```c# private async Task<List<IdentityError>?> ValidateUserName(UserManager<TUser> manager, TUser user) { List<IdentityError>? errors = null; var userName = await manager.GetUserNameAsync(user).ConfigureAwait(false); ...
How does ASP.NET Core Identity ensure username is unique under concurrent conditions?
> However, when testing with second images of black women, the mouth is > not detected in certain instances, as shown in second image. The problem can be fixed. - Reduced index from 7 to 1. Noted, you will have to change depending on lightning condition or make-up face. Snippet: mouth = mouth_cascade....
In my case, the issue actually stemmed from the number I was passing to the setPositionAsync method. Here's how you can achieve forward and backward functionalities using the Expo Audio-AV plugin: const [isPlaying, setPlaying] = useState(false); const [soundObject, setSoundObject] = useState(null); ...
{"Voters":[{"Id":721855,"DisplayName":"aled"},{"Id":131433,"DisplayName":"bmargulies"},{"Id":18157,"DisplayName":"Jim Garrison"}]}
So I have a scientific data Excel file validation form in django that works well. It works iteratively. Users can upload files as they accumulate new data that they add to their study. The `DataValidationView` inspects the files each time and presents the user with an error report that lists issues in their data tha...
Stopwatch loosing time in a browser using blazor and web assembly when browser put in background
|c#|blazor|progressive-web-apps|blazor-webassembly|
The issue actually lies with knex's connection pool handler - tarn. There is a known bug with tarn where it doesn't properly handle the connections you're trying to keep alive (the minimum amount). They don't get recycled correctly. I don't know the full technical details off the top of my head, however I ran into the ...
You are using the endpoint `/api/v2/tickets`, which is intendend for agents and admins. See: [Tickets vs Requests][1] For creating a custom HTML I would recommend that you use the endpoint `/api/v2/requests`, which is intended to be used by end-users. See: [Create Request][2] As a final recommendation, what I usu...
I notice when i add this part to the font-awesome/5.15.4/ library doesn't load. ``` integrity="sha512-Vw3RTv7vrqtzj7Umk17DszsotZa6PXj5dnTEszUbnvmVq7Jpj27GPvmXzQkMV6mPvhj1g+YY4fb7DrlLBwTVlw==" crossorigin="anonymous" referrerpolicy="no-referrer" ``` But when i do something like this instead all the icons seem to loa...
The Tox 4.12.2 documentation on [External Package builder](https://tox.wiki/en/4.14.2/config.html#external-package-builder) tells that it is possible to define an `external` package option (thanks for the comment @JürgenGmach). The external [package](https://tox.wiki/en/4.14.2/config.html#package) option means that you...
How to restrict user access on mounted NSFv4 share with all_squash option?
I have _layout through expo-router Stack and i want to disable back button on some screens. When I log out, a back button appears on the login screen, which takes me back to the app's home page. I want to hide this button from the header. This is my code ``` export default function Layout() { return ( <Sta...
### Yes, this is now possible in vanilla CSS ```css background-color: color-mix(in srgb, red 30%, transparent); // Same as above background-color: color-mix(in srgb, red, transparent 70%); // 50% is the default background-color: color-mix(in srgb, red, transparent); // You can also mix standard colors b...
That's because `ref` is a preserved prop from react and you cannot specify it directly as props. But you can use `forwardRef` function to do so: ```jsx import {type PropsWithChildren, forwardRef} from "react"; const MyChild = forwardRef<View, PropsWithChildren>((props, ref) => { return <View ref={ref} /> }...
I have a dataset with repeated measurements among participants (Subjects). Each subject is tied to a Site (Iowa, Kansas, Tennessee, ....). A subject can only be in one Site and does not appear in two different sites. { *A participant is only in one State. Cannot appear in two states at the same time.*} My goa...
r specifying random effects
|r|lme4|mixed-models|
You make no mention of the **size** of this source or what **kind** of data it is… both of which are very important in making an informed decision. Anyway, assuming the size is less than 2.5MB and the data is plain text with nothing special in there, I guess you can... In *Index.html* <body onload="ses...
let varL1 = ['a'; 'b'; '&'; 'c'] let rec ConvertToString list = match list with | head :: tail -> string head :: ConvertToString tail | [] -> [] let varL2 = ConvertToString varL1 Try this.
This question was inspired by [a question](https://stackoverflow.com/questions/33182491/why-bcd-instructions-were-removed-in-amd64) I recently came across on Stackoverflow. It reminded me that early in the development of the x86-64 ISA I had written 32-bit x86 code for BCD addition without using the BCD support instru...
Not sure what docs you're reading, but typically the return value of `NextAuth` is what you would expose as `GET` and `POST` handlers. Try exposing the entire return value, instead of handlers.GET and handlers.POST
|swift|swiftui|drag-and-drop|copy-paste|
Probably a bit late but this is worth a mention: Environment.GetCommandLineArgs()[0]; Or more correctly to get just the directory path: System.IO.Path.GetDirectoryName(Environment.GetCommandLineArgs()[0]); **Edit:** Quite a few people have pointed out that `GetCommandLineArgs` is not guaranteed t...
How to start a download and render a response without hitting disk?
|django|django-templates|stream|
I have a page where I need to display posts, but I want to group these posts into chunks of 5 items each. For example, every 5 posts should be wrapped in a new <div> container. So every 5 posts I should have the following: **Blog.vue** ``` <script setup> import MainLayout from "@/Layouts/MainLayout.vue"...
*state* is echoed back in the query string sent to the redirect_uri. It has two purposes: 1. The original use, as per its name is to transmit state information from the initiating webpage to the redirect_uri. For example, I have a process that sends users a link that allows them to link their account to some other...
I have implemented a pixel mask class used for checking for perfect collision. I am using SFML so the implementation is fairly straight forward: Loop through each pixel of the image and decide whether its true or false based on its transparency value. Here is the code I have used: // Create an Image from the ...
I am running into an issue where I have tested my Apple Watch app on many simulators in Xcode and on my personal devices, but when I submitted to Apple for review, they are telling me that it will not run and to check my plist folder. I cannot find my plist folder as I accidentally removed it, which led me to the setti...
|ios|xcode|settings|watchos|
This issue was resolved after I changed the pattern of retrieving `order->id`. Instead of calling `order->id` in the form action, I used it in a jQuery function. This approach worked. Here is the code that I used. **Form** <form action="javascript:void(0)" method="post" id="order_form" enctype="multipart/for...
For example, you are launching your dev server at: http://localhost:3000 Thus the `publicKey.rp.id` should be `localhost`, with its portocal, port and url parameters excluded.
I am trying to automate sample data. In an Excel sheet, there is the name of the shop and shop location. First, the shop_location is entered and then the shops in the locality are shown. My code is supposed to click on the shop name specified in the Excel sheet. The code succeeds in searching the location but then af...
|godot|gdscript|
mongoose.connect is an asynchronous function, therefore await is required in your case. Request you may please go through the content quoted below from Mongoose documentation. Please also refer to the url enclosed wherein the same kind of incident has been resolved. > Mongoose lets you start using your models ...
There's no standard way to deal with file system paths because not all platforms have the same rules regarding the representation and validity of paths. On Unix-based systems (Linux, Mac OS X, etc.), paths are a sequence of bytes (`u8`) that cannot contain null bytes. The `std::os::unix` module is available on those...
I am using Apache 2.4.58 with Windows server 2019 essentials. I have only 1 server and 1 public IP address with 2 network cards: 192.168.3.100 and 192.168.3.200. I created 2 proxy directives in httpd-ssl.conf <VirtualHost _default_:443> <Proxy "http://192.168.3.100:20300/"> Require expr "(%{H...
{"Voters":[{"Id":472495,"DisplayName":"halfer"},{"Id":466862,"DisplayName":"Mark Rotteveel"},{"Id":1940850,"DisplayName":"karel"}],"SiteSpecificCloseReasonIds":[18]}
```ts import { A } from "https://example.com/type.d.ts"; type B = A | A ``` [Playground](https://www.typescriptlang.org/play?#code/JYWwDg9gTgLgBAbzgQTgXzgMyhEcBEAFjDGAM4BcA9FQKYAeAhuADa0B0AxrlTAJ5gOAE3Ywy+ANwAofoLgAhOAF4UcAD4ogA) I understand that `A` may not be cached already, but shouldn't `B` have type `A` i...
I found that the following solution worked: - Create a subclass of `java.text.Format` to encapsulate the formatting / parsing code - Create a custom subclass of `BasicComboBoxEditor` to use the formatter with a `JFormattedTextField` - Set the editor on the `JComboBox` sublass to use the above Code for those inter...
1ST CODE VARIANT: ``` let getLastDayOfMonth = function(year, month) { let date = new Date(); date.setFullYear(year, month, 28); while (date.getMonth() === month){ date.setDate(date.getDate() + 1); } date.setDate(date.getDate() - 1); return date.ge...
For me, it turned out to be some permission issues, see [answers here][1] Try to write in your VS Code terminal or Windows PowerShell: Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned or Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted [1]: https://...
I am currently trying to write a simple outline shader in glsl (using SFML). I am new to shader programing so forgive me if the question is obvious. Anyway, the shader works fine for detecting edges within the texture but fails to detect the borders at the edge of a texture. Picture of the working outlineShader<br/...
Here's the problem. The dropdown list in my view in an application I'm working on is showing SQLServer2005SQLBrowserUser$DONSERVER instead of the actual Active Directory group name. I'm posting here for the first time. Personally I have never ran into this issue. I'm hoping someone with experience with this can help ou...
My thoughts: Don't use Unity. If you're starting out and you can't code: Don't use Unreal. If you can code "Hello World" and know how to do all "trivial" (know most C++ features) tasks in C++: Use Unreal. If you want to do blueprints, that's easier to grasp, but know some C++ beforehand. You'll be thankful when you ...
null
I am trying to solve a problem of ensembling different models (xgboost, glm, random forest and so on) made with `caret` library with same `traincontrol` on same data. Better to say: When I predict my binary outcome with different models from above they give different probabilities (and sometimes one gives <0.5 "no", a...
How to ensamble models in R with caretEnsemble library (or other way)?
|r|r-caret|ensemble-learning|
{"Voters":[{"Id":472495,"DisplayName":"halfer"},{"Id":466862,"DisplayName":"Mark Rotteveel"},{"Id":1940850,"DisplayName":"karel"}],"SiteSpecificCloseReasonIds":[18]}
You can use a context to propagate the data through your client components : ``` import { createContext } from "react"; export const SettingsContext = createContext<SettingsType>(DEFAULT_VALUE); ``` declare the provider in your layout ``` /* SettingService.index should return Promise<SettingsType> ...
I am newbie in Go. I try to write server in Go. I write auth part in GRPC. But main functionality I want to build with REST. I write code for GRPC and REST. But when I launch my server, only REST works. My GRPC just not responding. grpc.go application ``` Go type App struct { log *slog.Logger gRPCServe...
How to run GRPC and REST server on same port in Go?
|go|server|
null
{"Voters":[{"Id":3518383,"DisplayName":"Juraj"},{"Id":522444,"DisplayName":"Hovercraft Full Of Eels"},{"Id":1940850,"DisplayName":"karel"}],"SiteSpecificCloseReasonIds":[19]}