instruction
stringlengths
0
30k
βŒ€
Why the code shows only the header and footer of xml file?
|python|google-maps|wireshark|kml|pcap|
null
I have the following code that works perfectly, but I would like to replace the array of columns with a variable. I have created in php the string: $datos = "[{data: 'id'},{data: 'nombre'},{data: 'telefono'},{data: 'email'},{data: 'status'}]"; and in Javascript I try to associate it with the DataTable: ...
How to convert a string to an array for the columns of a DataTable?
|javascript|json|datatables|
I'm trying to implement a saving system from my game and I decided to do this by filling an array in the base class then return the whole array to an array from child class. But I keep getting an error: Cannot implicitly convert type 'PlayerBodyPart[]' to 'PlayerBodyPart'. Can it be because child's array type is a stru...
|android-bluetooth|bluetooth-device-discovery|
you can remove the space between the cells in your ApexCharts heatmap by apply this CSS code, that's what I used <!-- begin snippet: js hide: false console: true babel: false --> <!-- language: lang-css --> .apexcharts-series.apexcharts-heatmap-series rect { stroke: none; stroke-width: 0;...
If I created a project using extenral library, `raylib`, for instance. I installed this library so `raylib.h` file is in ..\msys64\mingw64\include\ and I can run my program. But is there any ways to compile my main file and link it the way I'll be able to run it on other pc, where `raylib` library is not installed? Or ...
C++. Ability to run executable file with external libraries on another pc
|c++|linker|external|lib|
null
I am trying to speed up repeatedly rarefying a data frame and the subsequent addition of generated matrices. Some background information: The data set I want to repeatedly rarefy is very large (about 200 rows and >> 100 000 columns). So far, I have tried the following: i) Repeated rarefaction and storing rarefied d...
I have a video that I'm currently playing on ReactPlayer. I am also able to show different captions and select different captions. I am trying to see if I can select the audio for the video just like I can select the required caption from video controls ``` const [audioTracks, setAudioTracks] = useState([]);...
I am importing DatabaseLibrary in the Robot Framework in Pycharm but it's showing Unresolved Module. I have tried all possible reasons from my side but unable to resolve this problem. (Unresolved library: DatabaseLibrary. Error generating libspec: Importing library 'DatabaseLibrary' failed: ModuleNotFoundError: No modu...
Error while importing Database Library in robot framework in Pycharm
|python|pycharm|robotframework|automation-testing|
null
{"Voters":[{"Id":4541695,"DisplayName":"DVT"},{"Id":10952503,"DisplayName":"Elikill58"},{"Id":1974224,"DisplayName":"Cristik"}]}
There are different ways to achieve this. 1. Load the base mesh which is common to all variations in a separate mesh node. Other variation can be in individual mesh obis and when the user selects a variation, you can load the mesh dynamically and add it to the scene as separate node. 2. You can create a Obj that...
I am reading a csv file and need to normalize the column names as part of a larger function chaining operation. I want to do everything with function chaining. When using the recommended `name.map` function for replacing chars in columns like: import polars as pl df = pl.DataFrame( {"A (%)...
I want to develop an application that displays Open Street Map offline. I save an Open Street map tile in the following way: ```swift class HomeViewController: UIViewController, GMSMapViewDelegate, CLLocationManagerDelegate, DistanceCalculationDelegate{ func startMonitoringNetwork() { if let currentLa...
|ios|swift|chat|openstreetmap|
Your models do not have primary keys. But they are being created automatically by django. You need to choose the type of auto-created primary keys: https://docs.djangoproject.com/en/3.2/releases/3.2/#customizing-type-of-auto-created-primary-keys (new in Django 3.2) Either add this to `settings.py`: `DEFAU...
I'm currently writing a thesis in LateX and I'm still learning how to properly used it. My problem is that I have something like this ![not aligned paragraph](https://i.stack.imgur.com/14YXK.jpg) and I want something like this ![aligned paragraph](https://i.stack.imgur.com/l68lr.jpg) EDIT: Here a mi...
I have points on a map in d3, and when I hover the points, I want it to show the 'date' associated with each point. Here's my code. //Declare "Date" variable var date // Build new Date constructor d3.selectAll(".events").each(function(d) { var options = { weekday: 'long', year: 'nu...
|ibm-cloud|ibm-watson|watson-discovery|
As a rule of thumb, avoid queries that cause a full table scan. Instead, you can speculate a very-fast and very-optimized SQL query selecting all the places with coordinates inside a simple square of side ```$radius```, instead of selecting suddenly a perfect circle with that radius. Then, ```PHP``` or whatever can ...
Your output: ```lang-none this is thread 1 this is thread 2 main exists thread 2 exists thread 1 exists thread 1 exists ``` Before I see that *"it prints "thread 1 exists" twice."*, I see that it prints after "main exists": This behavior can lead to unpredictable results. -- First, you should array y...
How do I return an array to child class?
|c#|unity-game-engine|
null
I am developing a project "Expense Tracker" .This is my second project, Im Stuck with this error. HTTP Status 500 – Internal Server Error Type Exception Report Message Unable to compile class for JSP: Description The server encountered an unexpected condition that prevented it from fulfilling the request. ...
null
|mysql|eclipse|hibernate|jsp|tomcat|
An idea could be to store a list of apps to add to the `INSTALLED_APPS` to the `CUSTOMER` environment variable: <pre><code># settings.py import ast # &hellip; customer = os.getenv('CUSTOMER', '[]') <b>INSTALLED_APPS += ast.literal_eval(customer)</b></code></pre> then we thus store `['custom_customer1'...
{"Voters":[{"Id":1145388,"DisplayName":"Stephen Ostermiller"}],"SiteSpecificCloseReasonIds":[18]}
You can do it just like this, you can replace `-` with `\` and test it. I just split the given date into three parts `Y-D-M` then store them into `tm` struct, in order to convert it to [Unix Time][1]. Here is the `tm` struct content: ``` struct tm { int tm_sec; /* seconds, range 0 to 59 ...
How to use custom class created by ObjectARX
I have written a code that opens a specific folder and what I need it to do is check the owner of each file stored within the folder and check to see if the owner is myself (currentUser) or not. I have written all the logic up until getting the variable 'owner' without automatically declaring the variable myself which ...
Problem1: If you declare a string, it has a ```'\0'``` at the end, so you need increase array length, like ```c[2]```. So it will be ``` [0] [1] + '\0' ``` Problem 2: When input ```2 3 +```, ```c``` will get a space after ```3```, so you need to type ```2 3+``` to get ```+```.
i trying to create a screen where the user can put a custom location using plugin flutter_map open street map free I tried several solution but it seems to be outdated every time i try could you help with it ? my imports ``` import 'package:flutter_map/flutter_map.dart'; import 'package:latlong2/latlong...
I have two components with the App.vue in my little project. The first is a form who add or update data and the second list all data in the database in a table. And in the table i have 2 actions **delete **and **update** . The delete, add and get work but if i want to edit a record i have a problem to fill the form due...
Add or Edit a form with VueJS, Pinia and the Composition API
|javascript|vue.js|vue-composition-api|state-management|pinia|
null
If I created a project using extenral library, `raylib`, for instance. I installed this library so `raylib.h` file is in ..\msys64\mingw64\include\ and I can run my program. But is there any ways to compile my main file and link it the way I'll be able to run it on other pc, where `raylib` library is not installed? Or ...
You should import the asset so vite could manage it and build it for production, instead of: <div className="onah"> <img src="src/assets/Deal-2.webp" you should do: import deal from "src/assets/Deal-2.webp"; <div className="onah"> <img src={deal} ... />
I am working on setting and configuring jest test in my React code. If very simplified historically I have a folder structure like this: ``` node_modules jest.config.js common commonFunc.js abc someFuncA.js someFuncA.test.js xyz someFuncB.js someFuncB.test.js ``` So the webpack is configure...
Resolve paths dynamically based on directory where test (or tested files) is located in Jest
|reactjs|unit-testing|jestjs|configuration|
null
I'm using Termux to work with the shell on my Android smartphone. I installed openssh in termux, so I can log into my raspberry from there. Whether I work locally or remotely, termux reacts to any swipe-up or swipe-down gesture by scrolling through the screen-content as expected. However, when I use the "screen" co...
Using the code from https://stackoverflow.com/questions/78215422/get-the-customers-total-spend-for-a-period-of-1-year-in-woocommerce. ``` // Utility function: Get customer orders total amount from specific status on a period function get_orders_sum_amount_for( $user_id, $period = '1 year', $status = 'completed' ) { ...
How to exclude partial returns manually from total spend in WooCommerce
|php|wordpress|woocommerce|shortcode|orders|
This is a continuation of [this issue](https://stackoverflow.com/questions/78082507/how-do-i-solve-error-introducing-foreign-key-constraint-may-cause-cycles-or-mu/78107385#78107385). To troubleshoot I am trying to remove one of my tables, Images. I have removed the migrations and have removed the database in SSMS. When...
EF Core is creating a table not in the migration
|.net|sql-server|entity-framework-core|
null
SOLVED - Create react app not working, file already exists with EEXIST error
I am trying to figure out how to have easy autoformat for my R code in VS Code. Seems like a lot of the other languages can use extensions like Prettier and ESlint to solve the common formatting issues but I cannot find something comparable for R. When I get a lintr warning the only quick fixes I have are to disable th...
Replace chars in existing column names without creating new columns
|python|dataframe|replace|python-polars|chaining|
<!-- begin snippet: js hide: false console: true babel: false --> <!-- language: lang-js --> let arrayName = new Array<string>(); let count = await page.locator('tr').count(); for (let i = 0; i < count; i++){ let name : string; name = await page.locator('tr').nth(i).locator('td')....
Is there any way to force new tabs to open at the end of the tab bar (or second position on the right, skipping one tab with excel), not by modifying web browser preferences? I always have opened excel in the tab on the right and new tabs go in between which drives me crazy. The line that now opens new tabs looks l...
|azure|azure-cosmosdb|azure-cosmosdb-sqlapi|
After hours of trying, this seems to work pushActivation(element: ElementDTO): void { patchState(store, { elements: [...store.elements() as ElementDTO[], element] }); } The strange thing is that IntelliJ still shows an error on this line. However, the app compile...
I'm using in-memory H2 for my Java Spring backend application's tests. I utilize Liquibase for database change managment and Hibernate as ORM framework. My versions are: `liquibase-core - 4.26.0 ` `h2 - 2.1.214 ` `spring boot - 3.1.4 ` `openJDK - 17` Recently, I've added the following changeSet: ``` ...
set custom location on tap on screen using flutter_map
|flutter|dictionary|openstreetmap|
null
The following method is a refactoring placed in test_helper.rb ``` def test_access(user, action) sign_in user get action assert_response :success end ``` in order to compact controller test statements ``` test "should get index" do @actions.each do |action| @internal_us...
controller test_methods generating two errors intermittently
|ruby-on-rails|
I found the solution, please find below code for it. As i am using AutoLayout & Storyboard for my view controller I took IBOutlets and as of now I have only 2 sections so I declared as static, but you can make this dynamic by creating views if you have more sections. // define in your .h file and take layout f...
{"Voters":[{"Id":2530121,"DisplayName":"L Tyrone"},{"Id":22180364,"DisplayName":"Jan"},{"Id":6574038,"DisplayName":"jay.sf"}],"SiteSpecificCloseReasonIds":[13]}
The following matches a sequence of two digits that's neither preceded nor followed by digits. ```regex (?<!\d)\d{1,2}(?!\d) ```
Pass a query to request the info. In this case `'.domain.server[] | .name'` will get server names # multiple servers yq -o 'y' '.domain.server[] | .name' config.xml # single server yq -o 'y' '.domain.server | .name' config.xml For some version around v4.35.x of `yq` below command would throw a ...
I've tried everything to get a comboBox to retrieve a value from my database upon load and the update it. If there's a value in the column, comboBox should be filled with the selection. If it's null then pick from a list (Ey/Manual or Accepted/Rejected) and update the value when update command is called. Could someone ...
This is a vanilla way to do it. Just an exists to check for records where there is a different value on column2 for the same column1. Fiddle: https://dbfiddle.uk/Zf9vTS9K CREATE TABLE t ( column1 INTEGER, column2 INTEGER ); INSERT INTO t (column1, column2) VALUES ...
Playing around this on my computer gives the following results. ```text test tests::v_0_bench ... bench: 28 ns/iter (+/- 2) test tests::v_1_bench ... bench: 13 ns/iter (+/- 0) test tests::v_2_bench ... bench: 30 ns/iter (+/- 2) test tests::v_3_bench ... bench: 6 ns/iter (+/- 0)...
VSCode not autoformating R lintr suggestions
|r|visual-studio-code|format|vscode-extensions|lintr|
null
Try adding this: **data-bs-toggle="dropdown"** <ul class="top-header-contact-info secondary-menu"> <li class="nav-item dropdown-toggle" data-bs-toggle="dropdown"> <a href="novosti">News</a> <ul class="dropdown-menu"> <li class="nav-item"> ...
I have a button called EXPORT and now I need to create a shortcut to export file to excel. The short cut is Ctrl+Alt+E. When I press the shortcut it have to call the function "onCommandExecution" which will check the ID condition and execute the function "onExportToExcel". I have been made debugging an I the ID was not...
I am using google cloud tasks to sync some files from my storage. They have proven to be very unreliable they sometimes queue and don't start executing for few minutes or more. When they do they are not shown in cloud tasks console. I am using this code to queue tasks ```js const taskRequest: ICreateTaskReques...
I am using Grafana Loki to monitor system logs, and I need to determine when each system last sent a log entry. My goal is to identify systems that are offline. The following query identifies such systems by checking for logs in mrs_system_info and not in mrs_error_list within a certain time frame: ``` count by(sys...
I'm trying to implement a saving system from my game and I decided to do this by filling an array in the base class then return the whole array to an array from child class. But I keep getting an error: Cannot implicitly convert type 'PlayerBodyPart[]' to 'PlayerBodyPart'. Can it be because child's array type is a stru...
How can I serialize the below data? This is `AppConfig` and the value of **value** could be any type and I can't use Any for serialization. [ { "key": "PROFILE_PHOTO", "value": "url" }, { "key": "RELATIONSHIP", "value": 0.6 }, { "key"...
How to serialize Any with Kotlin serialization?
|kotlin|serialization|kotlinx.serialization|
Although @oguz-ismail's answer would work with the sample output provided, it seems that actual `equery` output becomes garbled when it is fed into a pipe. This convoluted commandline seems to work around the problems: ``` </dev/null script -B/dev/null -f -q -c ' eix-installed -a | xargs equery depends ' |...
I have an application that loads an Image and when the user clicks it, a text area appears for this Image (using `jquery`), where user can write some text on the Image. Which should be added on Image. After doing some research on it, I figured that `PIL` (Python Imaging Library ) can help me do this. So I tried cou...
when trying to visualize big datasets in python, the plot and date becomes unreadible. How to make sure the data always keeps readible? All solutions are welcome including making use of other packages. My code: ``` import json import matplotlib.pyplot as plt # Load the JSON data from the file with op...
The function can not be called in sapui5. Shortcut is not executable
|sapui5|sap|
You can't use *parenthesis* to initialize a class member directly in its declaration, the syntax rules don't allow it. But, you can use *curly braces* instead, eg: ``` class clsPerson { ... clsAddress Address {"", "", "", ""}; ... }; ``` Otherwise, use the *member initialization list* of the ...