instruction
stringlengths
0
30k
null
The mistake is here: ```tsql IF (UPDATE(ParentPermissionId)) ``` The documentation for `UPDATE()` clearly says > `UPDATE()` returns `TRUE` regardless of whether an `INSERT` or `UPDATE` attempt is successful. In other words: there doesn't need to be any rows affected. And a trigger is always fired regardless o...
You could just check with the default `import os` if the file exists. import os database_uri = "C:\\" name_of_db = "Random.db" db_exists = os.path.isfile(database_uri + name_of_db)
If you use the `read_csv` from the `readr`package you have the argument `col_select` where you can select the columns to read.
I'm new to Azure and am trying to upload files (in tens of thousands) to Azure blob storage using their Python SDK. All examples that I came across on the web open a file before uploading it. Why is this necessary? I am concerned that if this will slow down the upload. Boto3 for AWS S3 doesn't do this. Can you pleas...
Why do we need to open a file to upload it to Azure Blob storage?
|azure|azure-blob-storage|azure-python-sdk|
We have a somewhat large VectorLayer comprising mostly LineStrings and Points. After refreshing the browser and opening all our features at first, everything seems to move fine and dandy. However, after modifying a few features, a lot of the things we do is suddenly very slow. Most noticeably setting styles and draggin...
Modifying features in an OpenLayers VectorLayer very slow after use
|openlayers|
null
Do we have Databricks cluster pools like option in Synapse spark pool as well? wherein i can have idle nodes to execute the code soon after notebook invocation. [![enter image description here][1]][1] Thanks Ravi [1]: https://i.stack.imgur.com/zMhbR.png
Synapse spark pool : have a pool of idle nodes to execute the code after invocation
|pyspark|azure-synapse|azure-synapse-analytics|
Given the prerequisites of your original problem description incl. the following we consider status-quo not to touch (thanks for being that honest sharing them.) > Since setting up a CI/CD environment is (of course depending on the whole tech-stack) quite a lot of work, someone like a DevOps is needed to be the "Godfa...
css a element selector overriding bottom element selectors
|html|css|css-specificity|
I/A (inactive/active) is not a good description of the data "next-of-kin", you should use something more accurate like "IsBloodRelated" (true/false) Database record Id, Desc, IsBloodRelated Database table entries 1 father, true 2, mother, true 3, brother, true 4, sister, true ...
This might work <!-- begin snippet: js hide: false console: true babel: false --> <!-- language: lang-js --> function orderDialogNodes(nodes) { return [...nodes].sort((a, b) => { if (a.previous_sibling === b.dialog_node) { return 1 } if (b.previous_sibling === a...
I want to create a multidimensional array based on a string. the string has value `$string="1/2/3"` and I want to assign `$array[1][2][3]=something` actually the index of the array are described inside the $string The $string has not same depth. For example may be $string="1/2 OR $string="1/2/3/4/5 OR $...
Convert a slash-delimited string into an associative multidimensional array
null
I'm trying to write tests for endpoints that rely on information being present in the DB at the time the test is run So I try and get one of my "Apps" ```python def get_apps_list(): apps = App.query.limit(1) return apps APPS = get_apps_list() ``` I then use @pytest.mark.parametrize to pass tha...
For a project I am trying to retrieve every commit and for each updated file, I want to store the entire file (without the commit syntax, just the vanilla file) and which lines were updated. I am using the Gitlab API in python. Whilst I can get the updated lines, I struggle retrieving the file's complete contents at th...
I'd use `request` rather than `page.goto`: ```js import {test} from "@playwright/test"; // ^1.41.2 const html = `<!DOCTYPE html><html><body> <a href="https://news.ycombinator.com">yc</a> <a href="https://www.example.com">example</a> <a href="https://www.stackoverflow.com">so</a> <a href="https://www.badurlth...
I have an error with php function chmod https://www.php.net/manual/en/function.chmod.php Any solutions? I'm running Linux Debian 13.05 with root access. Php Warning: chmod(): No such file or directory in file: index.php on line: 8 After I added a empty file, I we get: Php Warning: chmod(): Operation not permitted i...
|c#|entity-framework-core|db-first|
{"Voters":[{"Id":13860,"DisplayName":"Jonathan Hall"},{"Id":2541573,"DisplayName":"jub0bs"},{"Id":32880,"DisplayName":"JimB"}]}
I cannot find a way to add a delay in this topic. The documentation is not useful at all. I tried using [this doc](https://learn.microsoft.com/en-us/microsoft-copilot-studio/authoring-send-event-activities#sending-other-activity-types) and searched many other options, but I'm missing something. It s literally the s...
How to add a delay activity in Microsoft Copilot Studio
|microsoft-copilot|
null
I'll preface this by saying: **this is absolutely the wrong solution for what you are trying to do.** You should use a proper source control and backup system (backups include all object definitions). The other problem with your use of a trigger and a rollback is that anyone doing DDL inside their own outer transact...
I'm trying to show/hide more info about names on click, but don't know how to make it work of a single click. I'm fetching JSON that has game related info and creating a div with JS like so: fetch("thething.json") .then(res => res.json()) .then(data =>{ games = data.map(game => { const new...
I am trying to use the tool lanchain and langserver, and create a api from a template. Steps I took: 1. create server template ``` langchain app new my-app --package rag-conversation ``` 2. copy in the code provided in the cmd after the installation is ready ``` @app.get("/") async def redirect_root_to_d...
My query ``` select custname, case when date < '11/26/2023' then -1 else datepart(wk,date) end 'week#', sum(amount) sales, count(salesid) orders from SalesTable inner join CustomerTable c on salestable.CustID=c.CustID where date < '1/27/2024' and c.CustID = 10285 or c.CustID = -2 group by c.custid,custname, [a...
I am trying to convert a Jsonobj that i fetched using async/await into an array, i have been doing it like this: ``` const apiurl = 'https://api.wheretheiss.at/v1/satellites/25544'; async function getArray(){ var arr= []; const response = await fetch(apiurl); const jsonobject = await response.json(); ...
I' attempting to build QT5 for use in a Beaglebone black in a Ubuntu 22.04 Virtualbox VM. I'm attempting to follow the guide here to simplify this process as much as possible: https://github.com/K3tan/BBB_QT5_guide?tab=readme-ov-file I'm coming up against a brick wall though and don't know how to get around it. I'v...
Langserver could not import module app.server
|python|dependencies|fastapi|langchain|py-langchain|
Bonjour, amis. I'm trying to launch a simple example of AspectJ code inside the Gradle project. build.gradle: \` plugins { id 'java' id "io.freefair.aspectj" version "5.1.1" } group = 'org.example' version = '1.0-SNAPSHOT' repositories { mavenCentral() } sourceSe...
Why AspectJ doesn't catch event?
|java|gradle|testing|aspectj|
null
I have a list of collapsible divs that is populated with data from a geoJson file and updated dynamically when you zoom in and out of a map, to reflect the markers that are within the bounds of the map. When you click on the collapsible div it opens to show details about the feature. I would like to add a link...
This seems wrong: .where('title', // Filter products by title based on searchText isGreaterThanOrEqualTo: widget.searchText.toLowerCase(), isLessThanOrEqualTo: widget.searchText.toLowerCase() + 'z') As far as I know, the correct syntax is: .where('title', isGreaterThanOrEqualTo: widge...
null
After Chrome 123 update, my DevTools font has been changed to 'Monospace'. Is there any way to rollback my DevTools font to any readable font? ![Monospace font in Chrome DevTools](https://i.stack.imgur.com/ClMXo.png) I've tried using [DevTools Font Changer](https://chromewebstore.google.com/detail/devtools-font-c...
Chrome DevTools font has been changed to Monospace after update
null
I have a table called "Contact" where I have ID and Status of the contact , then I have another table called "Product" where I have the contact ID, product status and ProductID. I'm trying to find contacts which doesn't have any active product. How do I do that. I have used a query below , `Select c.ID from Contac...
Query to bring member without any active product
|sql|sql-server|
So I just got into WebGL graphics a few months ago and I wrote a class to add a filter to any render. The only problem with it was, the framebuffer texture always returns black. I don't know why and it seems like there isn't more than a handful of examples using multiple shaders so it would help a lot if y'all know any...
QT5 cross compile for beaglebone black installation error
|ubuntu|qt5|virtual-machine|cross-compiling|beagleboneblack|
I’m attempting to acquire the temperature value from a Claxon-CXP1 connected to a Basler VNIR hyperspectral camera . I’m following these documents and either not opening the board and or getting a null node result when I expect a value. https://www.bitflow.com/PythonHelp/_generate/BFModule.BFGTLUtils.BFGTLDevice.h...
``` import xlwings as xw #opens instance invisible app = xw.App(visible=False) book = xw.apps[app.pid].books.open(filepath) ###do stuff book.save() book.close app.quit() ``` This works for me perfectly. It opens a new excel instance and only uses this instance for the changes by Python. Like this i can op...
I have this Python class and want your opinion on whether this `cls._instance._cache = {}` is thread safe for `tornado`? if not how can I handle this cache to be thread safe? import logging import aiohttp import time # Constants DEFAULT_TIMEOUT = 20 MAX_ERRORS = 3 HTTP_READ_...
|powershell|pdflatex|tab-completion|
I'm stuck on a problem where i have typescript code that validates a submission form. In this form, an upload field was added where the user can upload multiple files. And a type of visual list was also created for the user to add and remove files. When I click to select the files, and select them all at once in the fi...
Upload field overwriting file array
I have two different ranges in excel and I want to save the ranges in one image. I use python. I tried to use union but It throws the exception "<unknown>.Union". Thank you for your help. <!-- begin snippet: js hide: false console: true babel: false --> <!-- language: lang-html --> excel = wi...
null
I am trying to filter a tibble into two tibbles. My data involves a column where the data increases up to a value, and then decreases again. I checked: https://stackoverflow.com/questions/72320734/filter-items-based-on-whether-the-amount-is-increasing-or-decreasing But this doesn't really work for my problem - I wa...
null
Id would go with a `CanActivate` guard. canActivate() { if(isMobile) { return this.router.createUrlTree(['list']); } else { return true } } [1]: https://angular.io/api/router/CanMatchFn
There is a property for this scenario. When combined with the `showTime`, the `hideOnDateTimeSelect` will hide the overlay on a date selection. So, make sure `hideOnDateTimeSelect` is set to true and you will have the wanted behavior without dealing with refs From the docs: https://primereact.org/calendar/#api.Calen...
I need to import a dump-file into an Oracle Database. I set myself up with a test VM and installed the latest Oracle Database 21c Express Edition and used: impdp system/123 directory=C:/dump dumpfile=test.dmp logfile=import.log full=y Which output an error message that it can not find the directory and log...
Export two different excel ranges to one foto in python
|python|excel|
Superset beginner here... So I have a decent size of data (flow measurements) that needs to be interpreted differently depending on the measuring device collecting the data. For most part of the data, it is straightforward. AVG m3/h, to get a daily value I just sum avg*24 to get a sum. But a few measuring devi...
I get this error when running npm run dev: ``` PS C:\Users\19043\node_projects\nortech_retail> npm run dev > nortech_retail@0.1.0 dev > next dev ▲ Next.js 14.1.3 - Local: http://localhost:3000 - Environments: .env.local TypeError [ERR_INVALID_ARG_TYPE]: The "to" argument must be of type ...
The `readr::read_csv()` function has an argument called `col_select` that allows you to specify which columns to read using the same language as `dplyr::select()`. So in practice, this looks like: df1 <- readr::read_csv( file = "sample-data.csv", col_names = header, col_select = c(D, B) ...
Looking at the error message, it seems that you didn't correctly set up Authorized redirect URIs value in Google Cloud console. See [data-login_url](https://developers.google.com/identity/gsi/web/reference/html-reference#data-login_uri) and step 5 on this [page](https://developers.google.com/identity/gsi/web/guides/get...
The [ECS Task Execution IAM role][1] is used by the ECS service itself, for access to things like your ECR repository. This is the role used by ECS to access the other AWS services it needs to actually run your task. The optional [ECS Task IAM role][2] is provided to your running ECS task containers to provide the s...
null
The lifecycle callback order of my three activities is as follows: ThemeSettingActivity::onActivityPaused ThemeSettingActivity::onActivityStopped ThemeSettingActivity::onActivitySaveInstanceState ThemeSettingActivity::onActivityDestroyed ThemeSettingActivity::onActivityCreated ThemeSettingActivity::on...
```r library(dplyr) data %>% arrange(month) %>% mutate(diff = share[pmatch(month + 1, month)] - share, year2 = if_else(month == 1, year - 1, year), .by = year) %>% mutate(diff2 = coalesce(diff, share[pmatch(month - 11, month)] - share), .by = year2) %>% select(-year2) ``` ####...
I keep receiving errors: > The requested operation is not available. If you continue to experience problems, please contact your administrator I was provided following details 1. SF host: https://example.com/learning 2. Client id and secret 3. Api: /example/odatav4/v1/$metadata I want to retrieve data from...
how make a class with async aiohttp tread safe?
|python|tornado|aiohttp|
In this example, they mean the exact same thing. However, there are a few advantages to using the trailing return type form consistently (Phil Nash calls these ["East End Functions"](https://levelofindirection.com/blog/east-end-functions.html), since the return type is on the east end). 1. Using parameters. Obvi...
I've been trying to find out how to copy a specific sheet in an excel file. So far I haven't found the correct method using Pandas. All I can find is how to copy the sheet from one file to another. My goal is to make a copy of "Sheet1" and call it "Sheet2". So the result would be an excel file with sheets "Sheet...
|python|pandas|excel|duplicates|copy|
Using `Set(*<VariableName>*, Blank());` cleared the value of the variable in my case. Use this command before trying to access or check the value of the variable.
I think this question is not made for a pyspark solution as you have not a partitioned folder structure rather it is more a general python question. You are looking for the max in the folders on a databricks filesystem ```dbfs```. As the first answer says you can use the hadoop filesystem api. Another way that I ...
I have two different ranges in excel and I want to save the ranges in one image. I use python. I tried to use union but It throws the exception "unknown.Union". Thank you for your help. <!-- begin snippet: js hide: false console: true babel: false --> <!-- language: lang-html --> excel = win3...
|token|odata|sap-successfactors|
Im trying the minimaxsum hackerank challenge with c# and keep getting error when I run my code. Currently I cant see where my mistake is and would understand why my code in particular has failed. Assistance will be appreciated. Thank you Here is my current code... ``` // Sort the array Array.S...
Mini Max Sum with C#
|c#|
null
import python modules on matlab using pyrunfile?
In .NET 7+, you can use the new [`INumber`][1] etc interfaces. This allows you to cast to/from byte arrays, and to/from other integer or number types. ```cs public class Header<T> where T : struct, IBinaryInteger<T> { public Header(T off, T len) { Offset = off; LenData = len; } ...
Most likely you have bad data in your database; possibly a row where ID equals `new`, if the error message can be trusted. The value can't be converted to an ObjectID and an error is thrown. Search the database and delete or fix invalid ID values.
I have this markup: ``` <div className="wrapper w-full h-full flex flex-col justify-between my-7"> {/*first*/} <div className="w-full h-full min-h-0 outline-dotted outline-green-300 outline-2 p-7 bg-black overflow-y-auto whitespace-break-spaces text-nowrap"> {data.text} </div> {/*se...
this is quite old question however i will answer it as i just faced the same scenario. p-upload allow you to set choose label like `chooseLabel="Choose" ` then you can apply your localization in this way `chooseLabel="{{ 'Choose' | localize }}"` as shown in official documentation https://primeng.org/fileuplo...
You can inspect the `FruitColors` object. Note that if you do ***not*** assign names for the enum values, the generated code will be different and a simple key/value based mapping will lead to wrong results. e.g. export enum FruitColors { "Red", "Yellow", } Object.values(FruitCol...
```markdown 1. [ ] If `TestRestTemplate` can be used with spring-data-rest, please provide examples of using it with response bodies more complex than `String` or `Map<?, ?>`. e.g., a `Person` class. 2. [ ] Please also include a `postForEntity` <s>and/or `putForEntity`</s>(`putForEntity` doesn't exist) example, becau...