I am trying to define a set of actions for a user based on salesforce picklists. I have a main field called fHCM2__Reason__c that is a picklist containing multiple absence reason types - Sickness, Annual Leave etc I then have a related field called Annual_Leave_includes_a_trip_abroad__c that is a picklist with two possible options - Yes or No I want to define that if a user selects "Annual Leave" from the fHCM2__Reason__c picklist they cannot leave the field Annual_Leave_includes_a_trip_abroad__c blank and have to choose Yes or No. Currently I have the below: ISPICKVAL(fHCM2__Reason__c, "Annua
I'm trying to delete transients from the db each day using a cron. I currently have this in a file in the root of my site: <?php include_once("wp-load.php"); global $wpdb; $wpdb->show_errors(); $wpdb->query("DELETE FROM `".$wpdb->prefix."options` WHERE `option_name` LIKE ('_transient_%')"); $wpdb->print_error(); ?> It does nothing and prints out this: WordPress database error: [] DELETE FROM 123_options WHERE option_name LIKE ('transient%') Any pointers?
Is it possible to ensure type safety with components that are composed of others? For example, if I want to build a special kind of input with certain validation, etc that should extend my base input. BaseInput.svelte <script lang="ts"> export let value = ''; // + a lot more props </script> <input bind:value ... /> AgeInput.svelte - this extends BaseInput <script lang="ts"> import BaseInput from './BaseInput.svelte' export let {...inputProps}: /* Can we spread and infer BaseInput props? */; </script> <BaseInput {...inputProps} type="number" /> Can we infer the BaseInput props?
I'm trying reporting into the following plot some multiple pairwise comparison. In order to this I have just scripted down the following code p <- ggboxplot(data, x = "TREATMENT", y = "Feature1", color = "SESSION", palette = "npg", facet.by = "SESSION", short.panel.labs = FALSE) # Use only p.format as label. Remove method name. p + stat_compare_means( aes(label = paste0("p = ", ..p.format..)) )+ stat_compare_means(method = "t.test", label.y = 40)+ # Add global p-value stat_compare_means(aes(label = ..p.signif..), method = "t.test", ref.group = "TRT-A") Just by using the showing horizontal bars
I am trying to push an image to a gitlab registry with two factor authentication. It gives me this error message: unauthorized: HTTP Basic: Access denied\nYou must use a personal access token with 'api' scope for Git over HTTP I tried to use this command to login but it still says access denied: docker login https://registry.gitlab.com/my_registry -u my_user_name -p my_public_key What am I doing wrong? How can I push and pull images with the public key?
I'm starting a new VueJS project in WebStorm. I've created a new VueJS project, upgraded NPM, added Vuetify and after starting the server, it raises this error: ERROR Failed to compile with 1 errors 11:34:19 AM Module build failed (from ./node_modules/@vue/cli-plugin-eslint/node_modules/eslint-loader/index.js): TypeError: eslint.CLIEngine is not a constructor at Object.module.exports (/home/milano/WebstormProjects/xxx/node_modules/@vue/cli-plugin-eslint/node_modules/eslint-loader/index.js:223:27) How can I fix this? Should I downgrade eslint?
using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.Azure.WebJobs; using Microsoft.Azure.WebJobs.Extensions.Http; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Logging; using System.Net; using System.IO; namespace FunctionRestApi { public static class Function1 { [FunctionName("Function1")] public static IActionResult Run( [HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req, ILogger log) { var httpWebRequest = (HttpWebRequest)WebRequest.Create("URL_with_client_id_authorization_token"); httpWebRequest.ContentType = "ap
I have installed the raylib migw from the official source. The installation directory is C:\raylib\raylib. I have written the sample program from the website as follows. #include "raylib.h" int main(void){ const int screenWidth = 800; const int screenHeight = 600; InitWindow(screenWidth, screenHeight, "raylib basic window test"); SetTargetFPS(60); while(!WindowShouldClose()){ BeginDrawing(); ClearBackground(RAYWHITE); DrawText("Congrats! You created your first window!", 190, 200, 20, LIGHTGRAY); EndDrawing(); } CloseWindow(); return 0; } I have compiled it using gcc main.c -I C:\raylib\raylib\
I'm writing code for a bigger program but I'm stuck on the following issue: The input for my program is a string such as s="cycling;time:1,49;distance:2". I want the program to only return the numbers in the provided string. I have tried doing it like this: def getDigits(s): answer = [] for char in s: if char.isdigit(): answer.append(char) return ''.join(answer) print(getDigits(s="cycling;time:1,49;distance:2")) The output prints out 1492, but I want the numbers to be printed separately. I want my program to print out 1,49 separately from 2 because 1,49 is the cycling time while 2 is the dista
Here's a fix for the following vulnerability: Critical Prototype Pollution in immer Package immer Patched in >=9.0.6 Dependency of react-scripts Path react-scripts > react-dev-utils > immer More info https://github.com/advisories/GHSA-33f9-j839-rf8h Fix: Install the patched version of immer, in this case 9.0.6, using the following command: npm install --save [email protected] Update the package.json file with npm update. IMPORTANT NOTE: if at this point the vulnerability is still present, you can do the following ONLY if you know this will not break your code or mess up dependencies for previous ver
I am practicing with PHP arrays and forms. When running my code, I get the following warning: Warning: Undefined array key 3 in php Even though the output still prints, I would like to understand why this warning occurs. Here is the HTML form (Q4.php): <!DOCTYPE html> <html> <head><title>Number of Students</title></head> <body> <form action="Q4.php"> <table> <tr> <td>Number of Students:</td> <td><input type="text" name="num" size="5"></td> <td><input type="submit" value="Submit"></td> </tr> </table> </form> </body> </html> Here is the second PHP form (Q4index.php): <!DOCTYPE html> <html> <head
I am trying to develop a springboot/react app and have installed react and created the react project. However when I try to execute: npm run I get the following error: Lifecycle scripts included in project: test echo "Error: no test specified" && exit 1 I also installed jest I believe and when I go to package.json: I have changed the test: to "jest" "scripts": { "start": "react-scripts start", "build": "react-scripts build", "test": "jest", "eject": "react-scripts eject" } I also tried when it was just "react-scripts test" and that gave me the same error. Any help would be greatly appreciated,
Take an umbrella chart, umbrella_chart, with one subchart, sub_chart: umbrella_chart has dependencies defined as follows in it's Chart.yaml: apiVersion: v2 name: umbrella_chart description: A Helm chart for Kubernetes type: application version: 0.1.0 appVersion: 0.1.0 dependencies: - name: sub_chart version: "~0.1.0" repository: "@local-development" And sub_chart has a Chart.yaml like: apiVersion: v2 name: sub_chart description: A Helm chart for Kubernetes type: application version: 0.1.0 maintainers: - name: Me appVersion: 0.1.0 As part of my CI/CD pipeline, I want to append the Jenkins build
I'm using Xamarin on Visual Studio 2019 for a project. But, recently I'm facing issue as - No Android SDK instance matching the 'C:\Program Files (x86)\Android\android-sdk' path Android component "tools" is obsolete, please install "cmdline-tools" Trying to fallback to "tools"... File 'C:\Program Files (x86)\Android\android-sdk\cmdline-tools\android.bat' not found for 'Android SDK Core' File 'C:\Program Files (x86)\Android\android-sdk\cmdline-tools\mksdcard.exe' not found for 'Android SDK Core' File 'C:\Program Files (x86)\Android\android-sdk\cmdline-tools\emulator.exe' not found for 'Android
I have a problem where I can't seem to make Laravel pick up the system wide APP_TIMEZONE env variable, I am not sure if using php-fpm affects that. When I add it to the .env the DateTime are correctly set using the timezone When I remove it, DateTime now uses UTC from Laravel app.php default ('timezone' => env('APP_TIMEZONE', 'UTC')) When I remove it, add APP_TIMEZONE to /etc/environment, reboot, printenv returns the right variable so does Tinker (but I think it's using the CLI and not the FPM process) and instantiating a date in Tinker shows the correct timezone, however running my app show d
was working on a featurebranch (spun off from main) for some while, commited it and want to merge it back to main. Unlike expected I get: error: Merging is not possible because you have unmerged files. hint: Fix them up in the work tree, and then use 'git add/rm <file>' hint: as appropriate to mark resolution and make a commit. fatal: Exiting because of an unresolved conflict. git status shows quite a lot of uncomitted files (which comes as a suprise to me to some extend) the entire message is here: user@hostname:~/path/to/repo> git merge feature_branch-2 error: Merging is not possible because
I'm trying to run a prediction using a sagemaker endpoint. The input format is comma separated features and | separated observations. However when I try to iterate over the input data and invoke the end point on every iteration like this : ENDPOINT_NAME = "my_endpoint" runtime= boto3.client('runtime.sagemaker') results = [] for r in request_body.split('|'): response = runtime.invoke_endpoint(EndpointName=ENDPOINT_NAME, ContentType='text/csv', Body=r) result = json.loads(response['Body'].read().decode()) results.append(result) I get the following error: ValidationError: an error occurred (Valid
When I do python -m pip install 'uwsgi==2.0.*' I'm getting: /usr/bin/python: No module named pip which pip gives: /home/snowcrash/.local/bin/pip If I do pip I get: pip Traceback (most recent call last): File "/home/snowcrash/.local/bin/pip", line 5, in <module> from pip._internal.cli.main import main ImportError: No module named pip._internal.cli.main This does not seem to help /usr/local/bin/python: No module named pip
I am looking to enable download and installation of an android application package (APK) from my own server through a browser download. This appears to be blocked in the latest versions of android with the cryptic "There was a problem parsing the package" message. In the past (I forget which version of android) this worked just fine. Need help making it work in Android 11. Here is the header content used to serve the file: header('Content-Description: File Transfer'); header('Content-Type: application/vnd.android.package-archive'); header("Content-Disposition: attachment; filename=\"".$filenam
How do you patch a variable with mock or pytest-mock. Assume the variable is defined in another python script and is used by many other scripts. I would like to mock it within pytest_cmdline_main so that all the scripts using that variable will be mocked accordingly. A quick example will be in env.py VAR = "something" in conftest.py import os import sys from unittest.mock import patch TEST_DIR = os.path.dirname(os.path.realpath(__file__)) class MockThings(): def __init__(self): self.setup() def setup(self): mock_var = patch('env.VAR').start() mock_var.return_value = "updated" def pytest_cmdlin
I would like to export tables for the following result for a repeated measure anova: Here the function which ANOVA test has been implemented fAddANOVA = function(data) data %>% ezANOVA(dv = .(value), wid = .(ID), within = .(COND)) %>% as_tibble() aov_stats <- df_join %>% dplyr::group_by(signals) %>% dplyr::mutate(anova_output = purrr::map(readings, ~fAddANOVA(.x))) %>% dplyr::select(-readings) %>% tidyr::unnest(anova_output) And here the commands to explore ANOVA statistics print(aov_stats) # A tibble: 12 × 4 # Groups: signals [12] signals ANOVA$Effect $DFn $DFd $F $p $`p<.05` $ges `Mauchly's
Using chakra UI, I have a two column layout. I want all the items to be aligned at the top. For some reason they are aligning in the center... I'm using this markup: <HStack verticalAlign='top' height='100%' position='relative' className='debug-blue'> <VStack spacing={2} width={marginSize} height={marginHeight} className='sidebar debug-red'> {listWallets()} </VStack> <VStack align='flex-start' alignItems='flex-start' verticalAlign='top' > {/* {showPieces()} */} {dummyBlocks()} </VStack> </HStack> this is the problem line: <VStack align='flex-start' alignItems='flex-start' verticalAlign='top' >
I am running Docker on a Windows Server 2022. I need to start a Windows Container - must be a windows container because I am porting a Net Framework App that cannot run on Linux. My Windows Container needs to write uploaded files to a network share. I have read lots of discussion, but I could only find example on Linux containers. Currently I am trying using a Docker Compose file. This is the compose file: version: "3.9" services: web: image: misterpanel ports: - "80:80" volumes: - misterpanel_images:/inetpub/wwwroot/Img volumes: misterpanel_images: driver: local driver_opts: type: cifs o: use
I'm unable to run any tests or run the app or debugger because of this error: `Unable to find method void org.jetbrains.kotlin.gradle.dsl.KotlinJvmOptions.setUseIR(boolean)` I've tried all of the provided solutions and hit the File > Invalidate Caches/Restart... option. This is an Android Studio project in Kotlin and Java with Jetpack Compose, Retrofit2, OkHttp3. Update: Here are my build.gradle files build.gradle Project: buildscript { ext.kotlin_version = '1.6.0-RC' ext { compose_version = '1.0.1' fragment_version = "1.3.6" } repositories { google() mavenCentral() maven { url = uri("https://
This is my config file, I have tried with html-loader it works fine for .html files but i’m now trying to learn and use handlebarsjs its not working the same. I've also tried using the preprocessor option for html-loader whereby i created a function to read .hbs files but I keep getting errors. const path = require('path'); const HtmlWebpackPlugin = require('html-webpack-plugin'); module.exports = { entry: './src/index.js', plugins: [ new HtmlWebpackPlugin({ title: 'Output Management', template: './src/index.hbs' }), ], devtool: 'inline-source-map', devServer: { static: './dist', hot: true, },
I am trying to create a predicate that finds all possible combinations without repeating same numbers. I tried using permutation predicate, but it found duplicated lists. For example: permutation([0,1,1], L). L = [0,1,1]; L = [0,1,1]; L = [1,0,1]; L = [1,1,0]; L = [1,0,1]; L = [1,1,0]; What I need: newPermutation([0,1,1], L). L = [0,1,1]; L = [1,0,1]; L = [1,1,0]; Can someone please help me with that? Thanks a lot...
I have a JavaScript file that is being run with eval() by a VSCode extension. When the script is evaluated, its context already includes the global variable vscode (the VSCode API) which I am using from my script. All of that works fine. Is there a way to use JSDoc annotations / TypeScript type definition files to tell VSCode that the vscode variable exists in the context? I have tried this (I'm not sure if it makes any sense) and it didn't help: // @ts-check /// <reference path="node_modules/@types/vscode/index.d.ts" /> What does work is if I write: const vscode = require('vscode') But I'd ra