instruction
stringlengths
0
30k
I'm trying to write a SQL query that reads our Jobs table and produces a schedule for each day of a given week. I want the results to show all 5 starting slots, regardless if there are jobs actually assigned to those slots. Example: Week of 03-24 thru 03-30 Mon - 03/25 - 01 - Job# 123456 Mon - 03/25 - 02...
Before the update, we were using `@middleware(checks: ["permission:admin"])`, which was working fine. We are planning to upgrade Laravel and Lighthouse. The documentation suggests using `@guard`, but it is not working. How do I apply the `permission:admin` middleware in Lighthouse v5 and above? extend type Query...
Laravel Lighthouse @middleware above v5
|php|laravel|laravel-lighthouse|
{"Voters":[{"Id":-1,"DisplayName":"Community"}]}
{"Voters":[{"Id":2372064,"DisplayName":"MrFlick"},{"Id":2530121,"DisplayName":"L Tyrone"},{"Id":8245406,"DisplayName":"Rui Barradas"}]}
{"Voters":[{"Id":2372064,"DisplayName":"MrFlick"},{"Id":2530121,"DisplayName":"L Tyrone"},{"Id":8245406,"DisplayName":"Rui Barradas"}],"SiteSpecificCloseReasonIds":[]}
`caches: composer` doesn't mean composer itself is shared, it means composer's cache is shared. Each step is run in its own standalone container, so if you're going to use composer in each, then you have to install composer in each. In your example, your first step does nothing -- it just starts a container, installs c...
The easiest way is to use the index of the rows you need: ids=which(df$Hospital %in% c('Other', 'Missing', 'Total') #which rows should be at the bottom of a dataframe df2=df[ids,] # create temporaty dataframe with this rows only; df=df[-c(ids),] #remove them from your dataframe df=rbind(df,df2) # append th...
You're probably not using the `-backend-config` properly, see [Partial configuration](https://developer.hashicorp.com/terraform/language/settings/backends/configuration#partial-configuration) for more details. You should use with with this format: ```bash terraform init -backend-config="KEY=VALUE" ``` Where...
You could do it much easier like this: command1 && (command2 || command1) || true
First some background, I have a requirement where I need to have a config that needs to be updated(by fetching from a Database or an API call) every 10 mins(for example a session token which expires every 10 mins) and it needs to be available to my web server app. The solution I came up for this is to create a sepa...
How can I create a thread in Haskell that will restart if it gets killed due to any reason?
I am trying to help my niece with her Mercedes Sprinter W903 2000 model. The car is facing a well known "Start Error" fault, which is caused by a fault in the immobilizer unit. I have found a immobilizer emulator which works with the CR2 ECU in the car, but in order to get this to work, I need to overwrite some dat...
{"Voters":[{"Id":6600207,"DisplayName":"J.Memisevic"}]}
I guess you have not set wordpress development enviroment. make sure latest version of npm, nodeJs and run following command. npx -g install @wordpress/env
I'm trying to install Matlab (R2022b) on Alpine Linux + i3wm, but I can't run the installer. When I run the ```install.sh``` into the matlab unzipped folder, I get the following error: ``` ./install: exec: line 292: /root/Downloads/matlab_R2022b_glnxa64/bin/glnxa64/MathWorksProductInstaller: not found ``` ...
ash: ./MathWorksProductInstaller: not found, but file exists
|matlab|alpine-linux|i3|
null
I'm trying to run some code locally in a Windows machine using `WSL/Ubuntu` with `openjdk version "21.0.2"`. The code reads a `.jpg` image, but fails specifically at this step: ImageIO.getImageReadersByFormatName("jpg"); This line throws an Error: java.lang.UnsatisfiedLinkError: /home/user/.sdkman/cand...
Few thing here need changes - you can resolve your dependencies form `HttpContext.RequestServices` with in the `AuthorizationFilterContext`, so no need to inject `IHttpContextAccessor` since you already have `HttpContext`. You can pass parameters to your attribute like this : public class OktaAuthorizeFilte...
null
This is now possible after https://github.com/moby/buildkit/pull/3001 was merged back in January. Currently you need to add the following to the top of your `Dockerfile`: ```Dockerfile # syntax=docker/dockerfile-upstream:master-labs ``` And then you can do this: ```Dockerfile COPY --parents pom.xml **/pom.x...
[![The increasing interval for this time series is located between 2000 and 3000][1]][1] [1]: https://i.stack.imgur.com/9RIR9.png Is there an algorithm to identify the increasing interval of a time series? For example, to detect that the increasing interval of this time series is located between the time step...
Is there an algorithm to identify the increasing Period/Interval of a time series?
|time-series|trend|
I have string as "abc xyz pqr pyz" i want to make it like "abc xyz pqr pyz abcxyzpqrpyz". so basically take same string and duplicate it without spaces. I have to achieve this in solr "solr.PatternReplaceCharFilterFactory". One workout is to introduce intermediate field and use copy field. but i don't want to use int...
regex to produce duplicate string with modification
|regex|solr|
This is a sample code. I want to build a heat map with values limited from 0.5 to 0.6, but with a linear color scale ranging `[(0, 'yellow'), (0.25, 'orange'), (1, 'darkred')]`. However, since there are not values near 0 and 1, it compresses the color scale to be from 0.5 to 0.6 (shown below in the images). ``` imp...
Input is automatically stored in the variable where it is called, such as "first_name", which you can read whenever you use it: #Read a value from a user and store the value in first_name first_name = input('Enter a name: ') whole_number = input('Enter an integer: ') plural_noun = input('Enter a n...
StackOverflow community! I've been enjoying the convenience of the Black Formatter extension in Visual Studio Code, especially its "Format on Save" feature for Python files. Being able to automatically format my code upon saving with Ctrl+S has significantly streamlined my workflow. However, I've encountered a li...
|multithreading|haskell|servant|
Hello i have a same issue in my html website. <iframe id="orderFrame" name="orderFrame" src="#" style="visibility:hidden;width:0px;height:0px;"></iframe> i found like this iframe code and deleted. Problem solved for me check the iframes
The site I parse after clicking the button (I do this by executing a method from onclick) the site shows a page with the text "loading tasks". Selenium receives only the page with the loading message, after the full page is loaded Selenium does not receive it. ``` ... driver.execute_script("filterQuestions();") ...
Selenium get page after "loading" page
|python|parsing|selenium-webdriver|
null
I don't mind resetting the TrafficStats value before launching the application. For this I use TrafficStats.clearThreadStatsTag(), but TrafficStats does not clear. I know that TrafficStats is being reset. happens when the phone is rebooted It is possible to reset TrafficStats. via code I use Kotlin I use TrafficS...
Why doesn't TrafficStats.clearThreadStatsTag() work in Kotlin?
|kotlin|android-studio|mobile|
null
Well I just noticed something very peculiar about ig, I don't know if it already existed or not, well I have this directory ``` directorio |-- .Module | |-- Resources | |-- css | |-- js | |-- images | |-- Views | |-- Controllers | |-- .conf.conf ``` It is a .Modulo directory (h...
GIT SKIP EMPTY DIRECTORIES
|linux|git|ssh|vps|
null
You have to put in the Vercel environment variables: ``` NEXTAUTH_URL="yourdomainevercel" ``` And above all, you have to redeploy your app so that it takes the variable into account. It's not dynamic. You must also have `Automatically expose System Environment Variables` checked in the Vercel settings Once d...
You can try to analyze the table by running ANALYZE aTable; to ensure that the table stats are up to date
Processing inputs and report success or error
|java|algorithm|
It's because you're using the `v1` version of their JS and right now full screen is only supported in `v0`. This is their [full screen example][1]: // Import the Botpress WebChat JavaScript file <script src="https://cdn.botpress.cloud/webchat/v0/inject.js"></script> // Initialize the Botpress We...
[![pareto distribution prediction][1]][1] I am trying to create a pareto distribution prediction function: ```js const paretoDistributionPrediction = (numberOfPeople, personAtIndex) => { let prediction = '?' if (numberOfPeople === 2) { prediction = personAtIndex === 1 ? 80 : 20; } return p...
How to automating Code Formatting in VSCode for Jupyter Notebooks with Black Formatter?
|python|visual-studio-code|jupyter-notebook|code-formatting|
null
Hard to say without an example, but the answer is typically to use named lists. Let’s say you have a list of countries ListePays=c("US","JP","DE","FR","UK","IT","CA","ZE","NL","NO","ES","SE","CH") And you want to store the result of CF_Brut_pdftools(country_name) somewhere where you can easily recover it. ...
The boxplot R gives me does not have the 3 groups on the X-axis labeled as "Urban", "Suburban", and "Rural" and I am not familiar enough with boxplots in R to do that. Can anyone help? All code is attached below for anyone to copy n paste. For the "Rurality" vector the number 1 indicates its and Urban county, 2 indicat...
How to change x-axis group labels of my boxplot in R
|ggplot2|colors|rstudio|boxplot|axis-labels|
You can find keyboard shortcuts from > File > Preferences > Keyboard Shortcuts Default Keyboard Shortcuts are, *Copy Lines Down Action* : <kbd>shift</kbd>+<kbd>alt</kbd>+<kbd>down</kbd> *Copy Lines Up Action* : <kbd>shift</kbd>+<kbd>alt</kbd>+<kbd>up</kbd> *Move Lines Up Action* : <kbd>alt</kbd>...
File "C:\Users\lenovo\Downloads\yolov8parkingspace-main\yolov8parkingspace-main\testcount.py", line 62, in <module> a=results[0].box.box File "C:\Users\lenovo\AppData\Local\Programs\Thonny\lib\site-packages\ultralytics\utils\__init__.py", line 156, in __getattr__ raise AttributeError(f"'{name}' object has ...
AttributeError: 'Results' object has no attribute 'box'. can anyone explain this?
|python|opencv|detection|yolov8|
null
I need to generate the final array for the Bootstrap Tree View in the specified format. Currently, my code only supports nesting applications for a single level. It fails to handle multiple levels, and it also includes empty nodes unnecessarily. I want to exclude the empty nodes array when it's empty. Additionally, it'...
You could try to simulate characters for your SVG using pure CSS (the `::first-letter` pseudo-element can be an option). But I think you won't achieve the exact behavior of a standard character. Tanishq's response works, but for example, if the parenthesis were before the image as it was in your initial example, ...
It seems that you can only create one Lucene index for one table in Cassandra. And if you want to add a new field to the index, you need to drop that old Lucene index and reindex. But reindex for data on one node is time consuming. Am I right? I have searched for quite a while. But still not sure about it. ...
What if I want to add a new field to my Cassandra Lucene index for one table?
|cassandra|lucene|cassandra-lucene-index|
I relied on row locking in mysql to prevent simultaneous running of one php script when working on one userid. I used following ```mysql UPDATE users SET rowlock = 1 WHERE id = ? AND rowlock = 0 ``` and then in php ``` if($stmt->affected_rows == 0) ``` Ideally, if one instance of php script updates the rowl...
{"Voters":[{"Id":4294399,"DisplayName":"General Grievance"},{"Id":2756409,"DisplayName":"TylerH"},{"Id":466862,"DisplayName":"Mark Rotteveel"}],"SiteSpecificCloseReasonIds":[16]}
The Rails workflow for the new Stripe Checkout is: - Create a Stripe Checkout Session and retrieve the session.id (.rb) - Pass the session.id to a js initializer to redirect to Stripe Checkout **STRIPE CHECKOUT SESSION** This is a sample [client/server Stripe Checkout implementation][1] that I'm using for a...
{"Voters":[{"Id":3440745,"DisplayName":"Tsyvarev"},{"Id":2756409,"DisplayName":"TylerH"},{"Id":466862,"DisplayName":"Mark Rotteveel"}]}
This is a common problem and here is the solution, After Completion of that object usage we have to nullify the object issue and this worked for me
Turns out my guesses were not too bad. These lines were contained in /etc/screerc ( ommented out there). So I created this ~/.screenrc which did it: `# following termcapinfo line which tells xterm to use the normal s# following termcapinfo line which tells xterm to use the normal screen buffer termcapinfo xt...
{"Voters":[{"Id":7758804,"DisplayName":"Trenton McKinney"},{"Id":2756409,"DisplayName":"TylerH"},{"Id":466862,"DisplayName":"Mark Rotteveel"}]}
How do I capturing global keyboard and mouse events in a desktop application in Kotlin Multi Platform native compilation? It is for Linux, Windows and MacOS. I tried in Kotlin using Java libraries but it’s just too heavy and slow to start.
I am using Java Spring Boot for my project and I have the following controller: @AllArgsConstructor @RestController @RequestMapping("/api/subject") public class SubjectController { private SubjectService subjectService; @PostMapping public void createSubject(@Reque...
I wonder about devops web development? Can anyone tell me about this please? What is devops? What language should I learn? I want to know what language to learn in order to complete. If it is same as backend developer? Or what else?
1. List item If I understand correctly you are looking for [this][1] where all module unit test and instrumented test report are in single location. UPDATE: There is a reported issue already in Google Issue Tracker [here][2]. The workaround is to add the below line before the apply plugin. `subprojects.forEa...
For what it's worth, I believe the problem is in the `Caddyfile`. You should use `handle` instead of `handle_path` to not strip the prefix from the url. From the Caddy documentation for `handle_path`: > Works the same as the `handle` directive, but implicitly uses `uri strip_prefix` to strip the matched path pref...
I got the following error when I try to create a database by the terminal : ``` `PS D:\gestion\gestionprojet> php bin/console doctrine:database:create Could not create database `gestionprojet` for connection named default An exception occurred in the driver: could not find driver` ``` I changed my .env....
Create a database in Symfony
|php|database|symfony|doctrine|
null
null
I have a simple SSIS package creating flat file from SQL view. The data in the view is two digits like 391.61 but when SSIS creates the flat file it is converted to 391.61000000000001. Is there something I missed?
SSIS flat file destination generating more digits than in the database
I'm using terra to import an hdf file from the MODIS instrument. I filter for the NDVI variable and I want to export as a tif. I'm getting errors when I do this. You can download a raster yourself with this sample URL: https://data.lpdaac.earthdatacloud.nasa.gov/lp-prod-protected/MOD13Q1.061/MOD13Q1.A2017049.h12v04...
can't export hd5 file to a tif using terra
|r|raster|terra|hdf|
> In my understanding uImage is got by running mkimage on the Image Your understanding is only partly correct. A **uImage** can contain any type of file, and is not restricted to the Linux **Image** file. In fact it not likely to be the (uncompressed) **Image** file (since that is not a conventional **make** op...
It appears as though this code is used to get the call stack. If you research the [exc_info function][1] from you'll find that the function returns a tuple of 3 values where the third is a Traceback object. This object contains the call stack information which is then displayed. [1]: https://web.archive.org/we...
You have not specified whether you are using the TIBCO EBX version 5.x or 6.x .But assuming you are using the version 6.x , it can be caused due to a number of reasons : 1. The setup(webserver (commonly Tomcat),database setup) is not done properly. 2. There can be indexing issues (This will not be present if you ar...
I was trying to run the Word Count mapreduce using eclipse, i created a java project and export it to jar then run it with hadoop. This is the code: ``` import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; import java.net.URI; import java.util.ArrayList; import java.util.Has...
I am currently using a slightly modified version of [this code](https://stackoverflow.com/a/68591204) to open a free-form window of the currently open foreground app ```kotlin private fun goToSplitMode() { val manager = packageManager val i = manager.getLaunchIntentForPackage("com.google.android.apps.maps...
Is there a way to programatically exit split-screen or free-form window mode in Android?
|android|kotlin|foreground-service|split-screen|freeform|
null