on-internet

In IBKR API, how can I retrieve stock data after a corporate action causing a contract id change?

To retrieve stock data, I always used: Contract contract = new Contract(); //contract instance contract.Symbol = "LRCX”; //ticker here contract.SecType = "STK"; //contract type stock That will point to the LRCX stock. However, IBKR manages the stock data using its unique contract IDs and it assigned a new contract ID to LRCX after its stock split on Oct 3 2024. So that contract instance will only point to LRCX after Oct 3 2024 and shows no such contract exists prior to the date. The current LRCX Conid is 732440574, but pre-split Conid is unknown. When I pull up the chart on IBKR, it shows LRCX

Join the discussion →

set signing date during git commit

git rebase --committer-date-is-author-date --interactive remote/branch preserves (or adjusts) the CommitDate: value. Both CommitDate: and AuthorDate: could also be adjusted with the GIT_COMMITTER_DATE and GIT_AUTHOR_DATE environment variable during git commit-like operations. Is there a way to achieve the same for already signed or to-be-signed commits? git log --show-signature --pretty=fuller shows the time of the git rebase --gpg-sign --committer-date-is-author-date --interactive remote/branch command is used, instead of the "author date".

Join the discussion →

Returning multiple columns and count of duplicates with GROUP BY clause

I'm searching for duplicate values per column and need a count of them and data from some additional columns. Table sample BillNr Name email 1000 Shakira [email protected] 1001 Shakira [email protected] 1002 Shakira [email protected] 2220 Beyonce [email protected] 2221 Beyonce [email protected] 3330 Rihanna [email protected] 3331 RiRi [email protected] 7000 ImNotDbl [email protected] 7777 MeNeither [email protected] 8000 HumptyDumpty [email protected] 9999 NotDblTrbl [email protected] 9999 WhyAreWeAllNotSingle [email protected] This returns the correct result: SELECT Name, email, COUNT(email) FROM table GROUP BY Name, email HAVING COUNT(emai

Join the discussion →

std::shared_mutex priority inversion

pthread_rwlock_wrlock are used inside real-time threads to cause hang to live, Why would you live? There is a priority inversion bug described here involving pthread_rwlock_wrlock and real time threads. https://sourceware.org/bugzilla/show_bug.cgi?id=31477 This open libc bug describes the issue really well too. Does anyone know if this bug is also present in std::shared_mutex when using real time threads? Not immediately finding any evidence of that out on the internet. Though I'm trying to replace pthread-rwlock with std::shared_mutex to solve this problem, but running into apparently the sam

Join the discussion →

Custom overlay when detecting device recording

I am trying to make a custom overlay for my application that will hide the screen if any screen share or unauthorized recording of my app is running. The problem is, that I am trying to avoid using FLAG_SECURE, because it doesn't allow me to add custom elements to inform the user that the screen is being recorded and show them what is going on. I have tried creating custom logic, and here is what I have achieved so far: I managed to create a custom detection using DisplayManager, to catch whether recording is active. However, I found a bypass that I cannot fix. If you start recording before en

Join the discussion →

Databricks Unity Catalog Model Version Update Event Trigger

I am working on an MLOps pipeline on Databricks and have migrated my models to the Unity Catalog (UC) Model Registry for better governance and cross-workspace sharing. In the legacy Databricks Model Registry, we could use MLflow Webhooks to automatically trigger downstream jobs (like CI/CD pipelines or deployment jobs) on events like MODEL_VERSION_CREATED or MODEL_VERSION_TRANSITIONED_STAGE. However, as of today, Unity Catalog Models do not support MLflow Webhooks. My goal is to find a reliable, low-latency, and scalable way to automatically trigger a Databricks Job or an workflow when the fol

Join the discussion →

Python-docx add_page_break is not visible in the document

I'm trying to write a document using python-docx library. I'm adding some simple text with and then I add page_break after each paragraph. Later on, I save and open the same file again. The page_breaks are not visible using "contains_page_break" property of paragraph. Is this a bug or am I missing something? sample code: from docx import Document from pathlib import Path if __name__ == "__main__": tmp_path = Path("../data") docx_path = tmp_path / "long_docx_with_breaks.docx" document = Document() for i in range(10): document.add_paragraph(f"This is paragraph {i + 1}.\n\n") if i % 2 == 1: # Add

Join the discussion →

Delphi 2010 How to save a TImage with a TPaintbox drawing overlaid?

I have a TImage bitmap on a form, and a TPaintBox with the same dimensions. The user draws some polylines on the paintbox canvas. Using paintbox means they can "erase" a line if needed and the backgound stays visible. What I see on the screen is the background image with the lines drawn on top - good! When the user is happy, I need to store the result (to a file) which includes everything I see on the screen (f.e. background and polylines). So how do I make the composite image to save a file - combining the image canvas and paintbox canvases somehow? Or must I store all the drawing commands an

Join the discussion →

Extracting free space from an occupancy grid map in MATLAB

How can I extract free space from an occupancy grid map in MATLAB? I have the following code, which reports that there are no free cells in the occupancy grid map. clc; clear; close all; rng(1); % read the PCD file as pointcloud ptCloud = pcread("my.pcd"); % rotate pointcloud (optional) rotationAngles = [0.0, 0.0, 0.0]; translation = [0.0, 0.0, 0.0]; tform = rigidtform3d(rotationAngles,translation); ptCloud = pctransform(ptCloud,tform); % create occupancy grid using point cloud map3D = occupancyMap3D(3); map3D.FreeThreshold = 0.5; pose = [0.0 0.0 0.0 1.0 0.0 0.0 0.0]; maxRange = 15; insertPoin

Join the discussion →

How can I get worker level cache

Let's imagine I have 2 Worker instances on different machines and 6 executors of some Bolt. Eventually, I have 3 executors per worker. But I want to add a memory cache in executors. If I create my cache in Bolt's prepare() method, I will have a cache instance per executor. If I have a key to put into the cache, I will do it 6 times instead of 2, since executor, as I understand, is just a thread, but multiple executors can go to 1 place if it's the same worker. So is there a way to do cache on a worker level to go there from all executors of that worker?

Join the discussion →

Data Pipeline for Bringing Data from Oracle Fusion to Azure Databricks

I am trying to bring Oracle Fusion (SCM, HCM, Finance) Data and push to ADLS Gen2. Databricks used for Data Transformation and Powerbi used for Reports Visualization. I have 3 Option. Option 1 : Option2 : Option3 : May someone please help me which is best enterprise cost effective approach and why. Or any Other way to achieve this effectively.

Join the discussion →

Why does PHP on Windows allow a non-existent locale to be set?

If I run var_dump(setlocale(LC_ALL, 'xyz.utf-8')); on Windows I get string(9) "xyz.utf-8" despite the fact that 'xyz' is not advertised in ResourceBundle::getLocales('') and having apparently set the locale to 'xyz' the output of strftime() is still in English (on my system). (I know strftime() is deprecated.) In fact Windows seems to accept any three character string. Only when I try something like 'wxyz.utf-8' does it returnfalse. Why?

Join the discussion →

How to reset an HTML element to its first/initial value in JavaScript?

I am attempting to reset an element, through JavaScript, to the value that was first specified in the HTML/CSS files, while avoiding "hard-coding" the value. The purpose is making a script that toggles a specific style value between 0 and its "initial" value. For example: A div starts out with 20 pixels of padding (defined by its class or manually through setting the style). When pressing a button, that padding is set to 0. When pressing the button again, the padding would go back to 20 pixels of padding. However, I want this function to be generic, so it should work with other elements that h

Join the discussion →

Oauth2 client in spring

I can't get a working example of oauth2 client implementation in spring boot 3.5.7. This is my first time ever implementing this type of authentication and I can't manage to make it work. I'm trying to figure out what to do by looking at the documentation here. I've been provided with 2 apis: https://myapi/.../openid-connect/token (this is the only uri I have, I don't have an issuer-uri) request: grant_type -> client_credentials client_secret -> mysecret scope -> openid client_id -> mycompanyname response: access_token https://anotherapi/mylist request: Bearer Token access_token Here are the s

Join the discussion →

How do I compare a custom type to an object obtained from req.body? [closed]

I'm trying to verify if a parameter of the req.body respects the type constraints that I set on the custom type. How can I compare if the content of req.body.condition corresponds to the properties of the Condition type? Example: type Condition = { limit?: number; offset?: number; order?: string; }; type Domain = // Domain must be a an Array of field,comparisonOperator,value [field: string, comparisonOperator: string, value: any]; function searchModel(req:any): any { const modelName: string = req?.body?.modelName ?? null; const domain: Array<Array<Array<Domain> | Domain> | Domain> = req.body.d

Join the discussion →

How can I customize the delete icon on Naive UI's NUpload component with its list-type as image-card?

Using Naive UI with Vue 3 I'm trying to replace the default "delete" (trash can) icon on the NUpload component with a Font Awesome icon or custom SVG component. My component setup (shows the default delete icon): <template> <div class="upload-avatar"> <NUpload action="https://www.mocky.io/v2/5e4bafc63100007100d8b70f" list-type="image-card" :default-file-list="defaultFileList" :max="1" @change="handleChange" > <NUploadDragger> <div> <i class="fa fa-upload icon"></i> </div> <div class="text-center"> <p>Click or drag to upload</p> </div> </NUploadDragger> </NUpload> </div> </template> <script lan

Join the discussion →

Open telemetry upgrade

I have been using: "@opentelemetry/api": "=1.4.1", " @opentelemetry/exporter-jaeger": "^1.13.0", "@opentelemetry/instrumentation-express": "^0.32.3", "@opentelemetry/instrumentation-http": "^0.39.1", "@opentelemetry/instrumentation-ioredis": "^0.34.2", "@opentelemetry/instrumentation-nestjs-core": "^0.32.4", "@opentelemetry/instrumentation-pg": "^0.35.2", "@opentelemetry/instrumentation-socket.io": "^0.33.3", "@opentelemetry/sdk-node": "=0.39.1", "@opentelemetry/sdk-trace-base": "=1.13.0", "@opentelemetry/sdk-trace-node": "=1.13.0", I'm currently using these packages on the above given version

Join the discussion →

Which language should I learn to make a hybrid or web view app?

I'm interested in mobile app development, either for a hybrid or web view app. I don't want to go for a native app as it requires to learn a different language both for Android and iOS. Which language I should learn for a hybrid or web view app? Which language is simple like procedural code for a hybrid or web view app? Can MySQL be used in a hybrid or web view app or do I need to learn to use another database? What is the best way to learn mobile app development for someone coming from web development?

Join the discussion →

What are 'weights' argument in lme4 glmer() with gamma response doing?

I am using a gamma response in glmer() from lme4. Some rows in my data set represents averages from n_i observations, while most observations just are individual measurements. My idea was to incorporate n_i as weigths in lme4's glmer(). Specifically, I am using a gamma response with logarithmic link function. The question is, what are the weights doing? The glmer documentation only says "an optional vector of ‘prior weights’ to be used in the fitting process. Should be NULL or a numeric vector." Should I interpret that as that they just multiplies in the likelihood, so that it is roughly like

Join the discussion →

Send email as the user who submitted [closed]

I have a form that I created on Google Forms from my own personal Gmail (not a company email), this form has an email field. What I want is that when the user submits I want an automatic email to be sent to another email that I own, but I want that email to originate from the user that submitted his email when he/she submitted this form. I've looked around a little and the 2 solutions that I've been able to find are either add an alias on the Gmail account that I used to create this form which is unrealistic since I don't know which users will submit, or to add a custom script if my form is em

Join the discussion →

"Inheriting" a property from another class assigned to the same element

I want to transition background colour on an element to another colour, and then back to the original regardless of what the original colour is. If I have 2 elements (one background-color red and the other green), mousing over either of them transitions to blue, and once moused out, go back to their original colors. <div class="redSquare changeBG"></div> <div class="greenSquare changeBG"></div> <style> div { width: 200px; height: 200px; } .redSquare { background-color: red; } .greenSquare { background-color: green; } .changeBG { background-color: ???; transition: background-color 0.5s; } .chan

Join the discussion →

Reflection access to static extension methods and extension properties

With the new C# 14 feature of static extension methods and extension properties, how to find and use them via reflection? (From the docs) public static class MyExtensions { extension(string str) { public int WordCount() => str.Split([' ', '.', '?'], StringSplitOptions.RemoveEmptyEntries).Length; } } It is not clear how this "extension" block is accessible here and the msdn doc does not seem to talk about that. I have seen that typeof(MyExtensions) has a method get_WordCount, which kind of works, but here I have nothing but a naming convention that tells me that this really is a property. Is th

Join the discussion →

Applying conditional routing in Spring Integration flow

I'm trying to understand how to properly define routes for Spring's IntegrationFlows. I have a MQTT source, which is implemented as a MqttPahoMessageDrivenChannelAdapter. From there I receive messages from my smarthome devices(sensors, plugs, remote controls). And everything is going through one input channel, having a distinction by payload.header.mac field. My first idea was to use: @Bean public HeaderValueRouter router() { HeaderValueRouter router = new HeaderValueRouter("mqtt_receivedTopic"); router.setChannelMapping("macA", "controlsChannel"); router.setChannelMapping("someOtherHeaderValu

Join the discussion →

Dewesoft channels fail to trigger?

I want to write a Dewesoft C++ script where I send 5V burst through channels at set intervals (25 ms and 50 ms, from the channels DO1 and DO2) however, I cannot, for the life of me, get anything to trigger. Is there a fault in my logic? Here is a step by step list with pictures and code detailing what I have done: I have set an input channel as a time signal. (Dewesoft requires at least one input channel). I have set two output channels for Digital Output 1 and 2 respectively. Then I put an oscilloscope to my digital output pins and wired a 5V source to both the input and output pin that is re

Join the discussion →

Trying to Learn Dewesoft's C++ Module

I am currently trying to learn Dewesoft's C++ script module. Unfortunately, there is no forum for it specifically so I am pressing all the buttons to try to find help. I want to write a code where I send 5V burst through channels at set intervals (25 ms and 50 ms, from the channels DO1 and DO2) however, I cannot, for the life of me, get anything to trigger. I have done the online course (can be found in this link: https://dewesoft.com/academy/online/dewesoft-c-script#page-3) but I unfortunately either cannot understand them for the life of me or there's a fault in my logic. If there is a fault

Join the discussion →

Looking for advice to achieve my website goals

I want to build a personal website inspired by Radiohead’s Public Library and Dead Air Space. I've built basic pages. Where do I start with more complex pages? I want to learn HTML and CSS (maybe JavaScript later), and publish content across a number of pages to advertise my creative portfolio. What should I learn, install, or understand before I can undertake this project? I need real developer guidance.

Join the discussion →
Older stories