I need to split a large Excel file into multiple small files based on the first five digits of the values in a column. For example, I have values 1396A0001A,1396A0002A to split based on the first five digits, 1396A, into a separate sheet. I have VBA code to do this, but it is taking too much time - 3 hours to split the entire file of 15000 records in a file. Can you suggest any other method to split the file? Sub SplitSheetIntoMultipleWorkbooksBasedOnColumn() Dim objWorksheet As Excel.Worksheet Dim nLastRow As Integer, nRow As Integer, nNextRow As Integer Dim strColumnValue As String Dim objDi
In the below code - there is a huge gap in the output. From 157-280 nothing is printed. I would expect, that at least the integer value is being printed. #include <stdio.h> int main(void) { for (int c = 0; c < 300; c++) { printf(">%c< (%d)\n", c, c); } return 0; } Part of the output: >< (150) >< (151) >< (153) >< (154) > < (156) >< (280) >< (281) >< (282) > (283) I am using Linux and the wezterm terminal emulator.
While wrangling Tkinter to produce and manage real MS Windows HWND windows, I discovered an oddity when testing the "Aero Shake" gesture. "Aero Shake" is where if you shake a window back and forth while dragging it, all other windows minimize; and if you do it again, they all restore. After all windows restore, the HWND you're dragging gets dropped, either back at the place you first picked it up, or at the location you shook it to cause everything to minimize. That's normal operation -- despite how buggy it may feel when you try it. What isn't normal is that Tk is issuing a <Configure> event
I'm trying to use sympy's to expand a simple arithmetic expression involving variable names (one of which is RECIST ) import sympy def _sympy_expand(expr): parsed = sympy.parsing.sympy_parser.parse_expr(expr) return str(sympy.expand(parsed)) tables = "idx + ohio * (idx + sex + recist)" _sympy_expand(tables) # 'idx*ohio + idx + ohio*recist + ohio*sex' Problem is that in my application, order of elements has meaning. That is what I wanted is to avoid lexical ordering and tables to be expanded to # "idx + ohio*idx + ohio*sex + ohio*recist" I've searched the doc but didn't found a solution; any hi
Update for those interested: https://github.com/MariaDB/server/pull/5906 We use a MariaDB database (with stored procedures) and pass params via PHP middleware. A minimal example of the table and view defintion I'm using: CREATE DATABASE cast_demo CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; USE cast_demo; SET NAMES utf8mb4 COLLATE utf8mb4_general_ci; CREATE TABLE example_data ( id INT NOT NULL PRIMARY KEY, x VARCHAR(32) NOT NULL, y VARCHAR(32) NOT NULL, amount INT NOT NULL, KEY ix_xy (x, y) ) ENGINE=InnoDB DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; INSERT INTO example_data
I have the following code where I need to make the 'Pas de Stock' string translatable. I tried changing the line to the following, but it throws a syntax error: return <?php _e('Pas de Stock','veho'); ?> Is there a standard way to return translatable text in this filter? add_filter( 'woocommerce_product_add_to_cart_text', 'bbloomer_archive_custom_cart_button_text' ); function bbloomer_archive_custom_cart_button_text( $text ) { global $product; if ( $product && ! $product->is_in_stock() ) { return 'Pas de Stock'; } return $text; }
I wrote a WIN64 compiled NASM program, but I can't figure out how to wait for a keypress before exiting. My code is: bits 64 global main extern _getch extern exit extern printf section .data msg db "hmmmmmmmmmm", 10, 1 section .text main: sub rsp, 40 lea rcx, [rel msg] call printf add rsp, 40 mov rax, 0 ret call _getch xor rdi, rdi call exit I compiled this with a batch script that executes the following: @echo off nasm -f win64 MyNasm.asm -o MyNasm.obj gcc MyNasm.obj -o MyNasm.exe .\MyNasm.exe Then I execute the program in the VSCode terminal. If the code is wrong, or there is some "library"
I am using PyMilvus 2.6.5 with a standalone Milvus instance running master-20260330-31a01c81-amd64. My collection has a nullable FLOAT field named c12 and a nullable BOOL field named c10. The float values include positive numbers, 0.0, -0.0, and None. I want to return rows where c10 is false, excluding rows where c12 is non-null and less than or equal to -0.0. However, when c12 has an INVERTED index, the query also returns some rows where c12 is 0.0. This reproduces the behavior on a new collection: import time from pymilvus import ( Collection, CollectionSchema, DataType, FieldSchema, connect
Need to reverse each row of an array vector column in reactive state engine metrics, e.g. [1,2,3] → [3,2,1]. Is reverse(H:arrCol) the correct syntax? engine = createReactiveStateEngine( name="reverseEngine", metrics=<[reverse(H:arrCol) as reversed]>, dummyTable=inputStream, outputTable=output, timeColumn=`time, keyColumn=`sym ) What does H: mean? Is this supported in state engines?
According to PEP 8, class names should use the UpperCamelCase (CapWords) convention. However, I have seen classes use lowercase names. For example, in the standard library: class socket(_socket.socket): ... class defaultdict(dict): ... PEP 8 does allow an exception: The naming convention for functions may be used instead in cases where the interface is documented and used primarily as a callable. What does "documented and used as a callable" mean? Aren't all classes callable as they can be instantiated? Putting aside builtin types, when would it be desirable to use a non-CapWords class name?
Every time I've tried to rename a project, it either doesn't rename all the files which then messes up how my files are run. I've tried searching for the button on "Project Files", but none of them work. Even when I've managed to change a file name, it either keep the old directory within the project as well or just doesn't completely change every instance of the project name.
I am using GitHub Copilot in VS Code via the Chat tab. Whenever Copilot requests permission to run a command, it includes an estimated rating of how risky the command is. (Green for safe, red for risky) There is an existing question on how to auto-approve all GitHub Copilot commands, but is there a way I can configure VS Code to only auto-approve GitHub Copilot commands that are determined to be low risk? Safety note: I acknowledge that the risk assessments are AI generated and may not be fully accurate. However, I find it to be a better alternative than blanket approving all commands, or havi
I'm working on a MASM-to-C transpiler that has zero knowledge of function parameter types. The same generated C code must compile without warnings with: GCC C17/C23 using -Wall -Wextra -Wpedantic MSVC using /W4 Among the configurations I tested, the failure occurs with GCC C23: x86-64 GCC 16.2 -std=c23 -Wall -Wextra -Wpedantic https://microsoft.godbolt.org/z/vfc96PTM9 #include <stdint.h> int MyFunA(int a){ return a; } int MyFunB(int a){ return a; } int (*MyCallBacks[])() = { &MyFunA, &MyFunB }; int main(void) { return 0; } As noted here, this works cleanly with GCC C17 because () means that th
Following up to this Chargeback dispute, today the bank forwarded me a reply from the airline saying I'm not entitled to a refund because the ticket is non refundable and can still be used for traveling. In the same email they also send me this information: Therefore, since my flight was cancelled by the airline and there was no alternative later than 1 hour of departure time and within 2 hours of arrival time I'm still eligible for a complete refund. This is where things stand now: the airline informed me the flight was cancelled my ticket was fully refunded by the airline my companion was no
enter image description hereI am solving a binary tree traversal problem on a university eLab programming platform. The problem is: Given the preorder and inorder traversals of a binary tree with n distinct nodes, output its postorder traversal. The constraints are: 1 ≤ n ≤ 10^5 The nodes are numbered from 1 to n. Example Input: 5 5 3 2 1 4 3 5 1 2 4 Expected output: 3 1 4 2 5 Another test case: 6 6 5 3 2 1 4 6 3 5 1 2 4 Expected output: 3 1 4 2 5 6 My implementation uses the standard reconstruction idea, but instead of recursion I use an iterative stack, because n can be as large as 100000. H
For the following loop, int i; for(i= 0, printf("hello\n"); i<10; i++) {printf("%d",i)}; the output is hello 0123456789 Can anyone explain this? My reasoning: In C, the comma operator works by evaluating the first expression, discarding its value, then evaluating the second expression and returning that as the result. For example: x = (exp1, exp2); This executes exp1, ignores its value, then evaluates exp2 and assigns that result to x. However, in a declaration like: int x1, x2, ... , xn; the comma is not the comma operator — it’s a declarator separator. The grammar of C treats commas in decla
I have a simple experiment that seems to suggest - no. But maybe I am missing something. I have a self-contained reproduction that you can run in docker run -it --rm --entrypoint sh alpine/git:v2.54.0 Some git setup to run everything locally git config --global user.email a@b git config --global user.name test git config --global protocol.file.allow always First, we setup two repos - vendor and my_repo_remote . We are making them locally, but let's imagine those are repos somewhere on github # Vendor: initial commit mkdir /vendor; cd /vendor; git init echo A > lib.c; git add lib.c; git commit
I am maintaining an internal Go library, which has a pubsub package. Currently, it doesn't support message ordering, but I would like to enable it. I want to make it as simple as possible by using defaults where it makes sense - convention over configuration type thing. I have a simple Publish function which accepts a topic and a message payload: func (c *Client) Publish(ctx context.Context, topic string, message any) error { data, err := json.Marshal(message) if err != nil { return fmt.Errorf("failed to marshal message: %w", err) } pubSubMsg := &pubsub.Message{ Data: data, PublishTime: time.N
I'm working on a c++ project which has a single step that is computation limited, and I think this would naturally fit within the scope of GPU acceleration. However, the platform I'm working with doesn't have nvcc. Is there a way to write GPU accelerated code using just g++ or clang++? Preferably without pulling in a ton of library dependencies. Edits: Thanks for the responses! Fair enough, to add more details I'm working on a system where I can't install libraries via the system installer. Any library that I need that's not already installed has to go in my home folder. That's okay, although
I am trying to run a Python script using a venv I created with PyCharm. When I run the script using PyCharm, the script runs fine. When I try to run it from the terminal, I get "module not found" (i.e. I'm not in the correct virtual environment). Indeed, when I run -m pip list, the list contains only pip. I copy the file path to Python directly from PyCharm: Then, in my terminal I run: /home/<me>/PycharmProjects/From Windows/GifToMp4/.venv/bin/python3.13" -m pip list I've also tried python3 and python3.13 instead of just python. How do I get my terminal to enter the venv to access the installe
I had created a simple Playwright test with maker/checker, but the maker click a button does not respond to any actions/dialog pop up displayed. This is the source code when I right click "view frame source". I don't know why cannot view page source. I generated the code using: npx playwright codegen --channel=msedge
Estoy intentando crear un gráficoo para uun anális de datos a aprtir una base de datos de ventas. Entonce quisiera saber: ¿De qué manera puedo generar un grafico de datos utilizando C++?
Tenho um JSON com a seguinte estrutura: "PRESENCIAL": { "A DISTÂNCIA": { "ADMINISTRAÇÃO DA PRODUÇÃO": { "SALAMOD": 90801, "MODELO": "lab", "DTUPDATE": "24/08/2026" }, "ADMINISTRAÇÃO DA PRODUÇÃO II": { "SALAMOD": 90801, "MODELO": "lab", "DTUPDATE": "24/08/2026" } } } Usei o código abaixo para realizar as buscas inicialmente, mas sinto que pode existir outra maneira de buscar. Alguém tem alguma recomendação? def buscarDados(dados: dict, disciplina: str) -> list: list = [] if isinstance(dados, dict): for key in dados.keys(): for subKey in dados[key].keys(): for valor in dados[key][subKey].keys():
It would be nice to be able to discard a message (ack it) without processing from inside the MessageConverter, but I have not been able to find a clean way to do it. My current solution is to return Optional.empty() in the MessageConverter and then use @Payload(required = false) in the @RabbitListener and check for a null message, but I find that a bit cumbersome.
I am building a shooting game. The phone is connected to the server through WebSocket. On the client side, when the player hits "shoot", the phone will capture a picture and get the current orientation of the phone. public record PlayerShootTrigger( byte[] imageData, Orientation orientation, @DecimalMin("0.0") @DecimalMax("1.0") double radius ) { public record Orientation( double x, double y, double z ) {} } Since I see there is a mix of binary and text data, how should my WebSocket handler deal with this? I checked the AbstractWebSocketHandler, they provide the handleTextMessage and handleBin