Recent Questions - Stack Overflow |
- How to read binary data loaded in numpy?
- Order Select Option by value alphabetically
- R: apply a function to all rows that orders a subset and completes a calculation if a condition is met
- Finding statistics, such as the mean, of all entries in a CSV file using Python
- Avoid 3 for loops with numpy to have more efficient code
- TypeError: _modules_vendor_store_index__WEBPACK_IMPORTED_MODULE_3__.default.dispatch is not a function
- Multiple Foreign keys in DRF
- Securing your Heroku database
- Boto3 is installed but cannot find module RHEL 7
- MySQL case when then function causing error
- Chakra UI Modal component does not work with Array of object
- Firebase PUSH apns-collapse-id not working
- auto_arima(... , seasonal=False) but got SARIMAX
- How to assign specific ID to Kafka Topic Partition
- JS Array Sorting Using Expression
- Why text insome of my Angular Material component appears to be white?
- Invoke a function after the time changes
- Generic bounded argument is incompatible with itself
- Is there a way to keep track of triggered cloud task queues in Google app engine, so I can find out when they are fully executed?
- Return list of weighted objects with semi-randomized ranking
- Calculate time in RStudio (R programming)
- Python Script to run power shell script
- ESP32 compile probem
- How to implement github like markup converter and add html
- Keep audio playing with mobile screen off
- Module not found: Can't resolve '@date-io/date-fns' in React
- Is there any simulator for ESP32-S2 or ESP32 chips?
- Stop javascript increment at a certain value
- C# HttpClient FormUrlEncodedContent Encoding (VS 2012)
- How do I write a procedure that randomly selects a pair from a list?
How to read binary data loaded in numpy? Posted: 11 Oct 2021 08:16 AM PDT I've checked out everything I can on here about numpy and loading binary data. I can't get a grasp on what's going on. |
Order Select Option by value alphabetically Posted: 11 Oct 2021 08:16 AM PDT I have a SelectOption[] populated by a API values, and I need to order by values, not key. The order need to be [0-9-A-Z]. Also, I need to fix a value in the first position, the 'Select Description' value. I tried somethings and not working. Can someone help me please? I'm loosing my mind with this problem. |
Posted: 11 Oct 2021 08:16 AM PDT i want to apply a function to every row, after ordering a subset of that row according dependent on an if/else statement. after which populating a new column in the dataframe with the results. i have over two million rows, so a for loop to do this is very inefficient. given the following dataframe: is there a way to apply the following loop to each row without a for loop as i actually have over 2630800 rows? the names of the columns are required for the if statement below: such that i get this outcome: i'm not sure how to do this with apply, was thinking something like this? although this does not work and i am not sure how to incorporate the if/else conditions: |
Finding statistics, such as the mean, of all entries in a CSV file using Python Posted: 11 Oct 2021 08:16 AM PDT I have a CSV file with 170 rows and 255 columns. It represents different pixels on a screen and each one takes a value. I want to calculate the mean over all the pixels/entries but can only find documentation on each row or column. How can I find the mean of the entire file? |
Avoid 3 for loops with numpy to have more efficient code Posted: 11 Oct 2021 08:16 AM PDT I have developed a code, and I am looking for a more efficient method because it is a lot of slow. Is it possible to modify this code such that it is faster? The code is really complex to explain, sorry in advance if my explanation is not so satisfactory: I am working with this big matrix that contains 7 matrices of dimension 50x1000. The code works in this way:
If something is not clear, please tell me, I'll try to explain! |
Posted: 11 Oct 2021 08:16 AM PDT Im using vuex, i want to execute an action and pass the value of id to the state, i get error(Error in mounted hook: "TypeError: modules_vendor_store_index__WEBPACK_IMPORTED_MODULE_3_.default.dispatch is not a function") and (TypeError: modules_vendor_store_index__WEBPACK_IMPORTED_MODULE_3_.default.dispatch is not a function) file.vue: actions.js: mutations.js: state.js: |
Posted: 11 Oct 2021 08:15 AM PDT I am completely new to django and python kindly help me with below query: I have 3 models , with multiple foreign key relations with given sample data now I need 3 outputs via django ORM or Serializers 1.for a given student id ,display the Student details and marks in each subjects 2.list all the students with their total marks (sum of three subjects in this case) 3.Average marks scored by all the students for each subject for ex as per the given sample marks in English are 65 , 95 and average is 80 { Subject :"English", average : " 80" } sample data |
Posted: 11 Oct 2021 08:15 AM PDT I currently have a back end hosted on Heroku, at the minute the data is open and anyone could access it. Is there a way to add some form of authentication to this? For example, if I use an API I am required to use an API key in order to access the data. I currently have a 'Hobby' database but appreciate i may need to pay a subscription for additional features. |
Boto3 is installed but cannot find module RHEL 7 Posted: 11 Oct 2021 08:15 AM PDT I'm trying to get the AWS-CLI working to start and configure ec2 instances. I've installed boto3 through pip, pip3 and python install but still can't see boto3. I'm running RHEL 7. I've tried several different ways of installing it, The first time I ran I've installed I've googled and googled and can't find any other answers, since it appears to be installed. Any ideas? |
MySQL case when then function causing error Posted: 11 Oct 2021 08:16 AM PDT I am trying to use case when condition then function but it is causing error. for this column, I wrote a query but this is causing an error. I tried it with removing the concat part and just use one substring and it is still causing an error. Can you take a look at the query and see where the issue is? Thank you! |
Chakra UI Modal component does not work with Array of object Posted: 11 Oct 2021 08:15 AM PDT I have an array of object that is mapped through which return chakra's modal component, but it seems that the first child in the array is only returned. it displays the modal corrected but show only the first item in the Array. Codesandbox: https://codesandbox.io/s/objective-wave-woiek |
Firebase PUSH apns-collapse-id not working Posted: 11 Oct 2021 08:15 AM PDT I am trying to follow this blog by using apns-collapse-id. But on my IOS device it doesnt overide the previous push like it does with android tag. Below is my payload in post man. Where am I going wrong? |
auto_arima(... , seasonal=False) but got SARIMAX Posted: 11 Oct 2021 08:16 AM PDT I want to know the orders (p,d,q) for ARIMA model, so I've got to use the problem is where although I set can someone help me to figure out what is the problem? for False Result: SARIMAX result comes from |
How to assign specific ID to Kafka Topic Partition Posted: 11 Oct 2021 08:15 AM PDT I am new to Apache Kafka. I want to assign a our user id as id to the topic partition. Is there a way to assign our own user-id to partition. I did research for couple hours on this, but didn't find any article related to assigning an ID to partition. While publishing a message to Topic I want to use the user-id as key. So that all messages goes into the same partition. And I want to make sure that one partition should contain only one user related messages. Can I use this user-id in consumers while consuming messages from partition? Is there a way to achieve this functionality? |
JS Array Sorting Using Expression Posted: 11 Oct 2021 08:15 AM PDT Is there a way to bring the related object to the first index of the array using Here is what I tried using |
Why text insome of my Angular Material component appears to be white? Posted: 11 Oct 2021 08:16 AM PDT In some of my The image of what's going on: |
Invoke a function after the time changes Posted: 11 Oct 2021 08:16 AM PDT I'm curious if you can invoke a function after the time changes? For example invoking a function after the minute changes maybe something like this: Note: I do not mean waiting for a minute to invoke a function like this there's a difference between
&
|
Generic bounded argument is incompatible with itself Posted: 11 Oct 2021 08:15 AM PDT I'm trying to create a generic method that accepts two typed arguments, one of them bounded by itself, but compiler blames on the If Forcing the Update I want to use it the following way, The proposal of wildcarded argument fails on the usage with, |
Posted: 11 Oct 2021 08:16 AM PDT I have a use case which requires me to keep track if all the taskqueues triggered inside a loop are executed or not. Once ALL of the taskqueues are executed(ALL, not a few), only then I can proceed with the next phase of my task. I want to keep track of this in the code itself, not from the Cloud Tasks page in the console. In this code, I am triggering the taskqueues in this way:- I need to find out if all the taskqueues in loops of listA and listB are completed. Is there a way to keep track of the statuses of all the triggered taskqueues? All taskqueues are push queues. |
Return list of weighted objects with semi-randomized ranking Posted: 11 Oct 2021 08:15 AM PDT Let's say I have a list of objects (in Python) that looks something like this (contains an identifier and a ranking/weighting): I would like to return to the caller this same but would instead rather allow for some non-determinism so that, generally speaking, the returned array looks like the above but could also look like: |
Calculate time in RStudio (R programming) Posted: 11 Oct 2021 08:15 AM PDT Want to start over again. Sorry for confusion. Two cols as follows: $ started_at : POSIXct, format: "2020-10-31 19:39:43" $ ended_at : POSIXct, format: "2020-10-31 19:57:12" So in order to calculate time (19:57:12 - 19:39:43), want to mutate new column to 00:17:29, where ended_at - started_at Need to change column format from POSIXct, correct?? |
Python Script to run power shell script Posted: 11 Oct 2021 08:15 AM PDT My requirement is to run the My Python script: Error: |
Posted: 11 Oct 2021 08:16 AM PDT I am having trouble with my board esp32. It's said that error compiling for esp32 dev module. Please can you help me? I will paste the error message below: Arduino: 1.8.16 (Windows Store 1.8.51.0) (Windows 10), Board: "ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, None" In file included from C:\Users\Win10\Documents\Arduino\libraries\DHTLib\dht.h:18:0, C:\Users\Win10\Documents\Arduino\libraries\DHTLib\dht.cpp: In member function 'int dht::_readSensor(uint8_t, uint8_t)': C:\Users\Win10\Documents\ArduinoData\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Arduino.h:106:91: error: cannot convert 'volatile uint32_t* {aka volatile unsigned int*}' to 'volatile uint8_t* {aka volatile unsigned char*}' in initialization #define portInputRegister(port) ((volatile uint32_t*)((port)?GPIO_IN1_REG:GPIO_IN_REG)) C:\Users\Win10\Documents\Arduino\libraries\DHTLib\dht.cpp:116:29: note: in expansion of macro 'portInputRegister' Multiple libraries were found for "WiFi.h" Used: C:\Users\Win10\Documents\ArduinoData\packages\esp32\hardware\esp32\1.0.6\libraries\WiFi Not used: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.51.0_x86__mdqgnx93n4wtt\libraries\WiFi exit status 1 Error compiling for board ESP32 Dev Module. This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences. |
How to implement github like markup converter and add html Posted: 11 Oct 2021 08:15 AM PDT I am creating the text editor and I want to implement a GitHub mark like syntax ([text|link]) and convert this to text. I am using the below code: So I have implemented this on button click but I need to achieve this in keyDown event for example if the user hit enters I want to get the last line and parse the link and add the anchor tag. Basically i want to implement something like this gif: Can You guys please help me to achieve this functionality as soon as the user types [text|link] and hits enter? |
Keep audio playing with mobile screen off Posted: 11 Oct 2021 08:16 AM PDT I'm building a website with HTML5 audio, including custom audio controls and visualization using JavaScript. When opening the website in my mobile browser (I've only tested Android/Chrome, but I assume similar behavior on other systems), after a few seconds the screen will turn off and soon after the audio will stop playing. Is there an official way in HTML oder JavaScript to tell the browser to keep the audio playing with screen turned off? Side information: there is Screen Wake Lock API preventing the mobile screen from turning off. Since my website provides music, I want the phone to turn off the screen if desired, only keep playing the audio. |
Module not found: Can't resolve '@date-io/date-fns' in React Posted: 11 Oct 2021 08:15 AM PDT I'm using React Material UI and I get this error : Module not found: Can't resolve '@date-io/date-fns'. Here are the dependencies that I have in my package.json file : I tried installing these libraries but it keeps showing errors in command prompt |
Is there any simulator for ESP32-S2 or ESP32 chips? Posted: 11 Oct 2021 08:15 AM PDT I am working on an esp project and compiled my code by using the |
Stop javascript increment at a certain value Posted: 11 Oct 2021 08:15 AM PDT I have coded this small script which increments a given value, in this case 200, by 1 every 3.2 seconds. I'm trying to make the script stop increasing the value once it reaches a certain point (let's say 300 for example). I'm sure it's a simple fix but I can't think up of how to go about this. |
C# HttpClient FormUrlEncodedContent Encoding (VS 2012) Posted: 11 Oct 2021 08:16 AM PDT I'm using the HttpClient. I'm posting with web form parameters. One of the values (not name) is a foreign Swedish character ö , #246; ö ASCII: Latin Small Letter O Umlaut Manually, IE, Firefox and Chrome all convert this character to S%F6k and everything works fine. However VS 2012 C# release converts it (via FormUrlEncodedContent(dict)) to %C3%B6 Is there a way to tell VS 2012 to convert it, to the friendly S%F6k (and still use HttpClient)? I've attached most of the code, which may help others (cookies, proxy, etc...) |
How do I write a procedure that randomly selects a pair from a list? Posted: 11 Oct 2021 08:16 AM PDT I'm creating a checkers game and I need a procedure that randomly selects a pair from a list of pairs. |
You are subscribed to email updates from Recent Questions - Stack Overflow. To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google, 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States |
No comments:
Post a Comment