Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
179 views

MRE: MyType = MyDataCtor [MyType] | MyDataCtor2 MyType MyType | ... other cases (none of which require the map operation) foo :: Type1 -> Type2 -> (Type1, Type2) For example, for the ...
kesarling's user avatar
  • 2,334
-1 votes
1 answer
86 views

I am not able to get rid of it with this warning Warning: Each child in a list should have a unique "key" prop. Here is the complete code: const App = () => { const userList = [ { ...
Amit Yadav's user avatar
  • 35.6k
1 vote
2 answers
83 views

I wrote a hook to calculate sales based on month-to-set data for the chart. It works fine, but I'm not satisfied. is there a different or easy way to avoid repeating and make code clean and extendable?...
FZDEV's user avatar
  • 13
-1 votes
1 answer
103 views

I am trying to use map function in my code, but I am afraid that I am making some silly mistakes. It just does not work! Here is my code. I have 2 buttons captioned "ID" and "Text"....
Pravin Kumar Raja's user avatar
1 vote
0 answers
109 views

Hello I'm trying to develop a blog using django as a backend and react on the frontend. i've written a map function on the frontend to loop through the blog articles, all other field elements appears ...
Arthur Bella's user avatar
0 votes
3 answers
122 views

How can I check in React if a map function is empty or not inside the return section? wanna check If it's empty, if so render an empty array, otherwise wanna render everything by mapping the content. ...
Radhames Leonardo's user avatar
1 vote
1 answer
80 views

I'm fairly new to React and I'm using NextJS. I have an array with role objects. I'm mapping over the array to display role name and description. What I'm trying to do is display the other array ...
liitepiixels's user avatar
0 votes
1 answer
62 views

I have a component in react native that gets data from mongodb const Num = () => { console.log("how many times do you see this message?") const [data, setData] = useState([]) ...
Daniel Sanchez Islas's user avatar
0 votes
3 answers
107 views

I'm new in Next and Typescript and can't solve the issue, I have tried all possible options that found in the internet and thinking maybe the problem is that the answers were old and something have ...
Polina Tea's user avatar
0 votes
1 answer
268 views

I have a list of files that I want to import as tibbles, then mutate a new column onto each tibble based on an ifelse statement for a threshold. I didn't want to use a loop, so I have been trying to ...
gvit's user avatar
  • 3
1 vote
1 answer
112 views

I'm using Axios to retrieve data from the backend. When I log the data to the console, it appears as an object. However, I need the data to be in an array format. When I try to use the map function on ...
usernotavalible's user avatar
0 votes
1 answer
737 views

i am using next js 13.4.19. i have made a GET api and trying to access the data available at mongodb database. but when i try to map the data it shows me error Error: data?.map is not a function. This ...
AR SHAH's user avatar
  • 59
1 vote
1 answer
50 views

Need help I have nested list, I would like to change all the value of the photo become empty list, the list are below : df <- list(messaging = list (telegram = list (registered = 'true', photo = c(...
Reza AM's user avatar
  • 83
0 votes
1 answer
42 views

I want to display data from API on the chart and I know how to do it but I have error while using .map function. I want to separate prices[0]from prices [1] to have access to two of them because my ...
Jakub Polański's user avatar
0 votes
1 answer
131 views

When I input data into my Text input, it goes into this array WorkoutItems([...workoutTextItems, workoutText, setsText]) I want to get my data individually from each item, so for example, workoutText ...
Kyle's user avatar
  • 13
0 votes
1 answer
37 views

I have a key called 'username' that stores the user logic records with a unique user id in couchDB. Now I want to get unique users count and returning users count from those records with the help of ...
Arul's user avatar
  • 1
0 votes
1 answer
74 views

const testFolder = '../assets'; const fs = require('fs'); const array=[] const pattern=/gif/ fs.readdir(testFolder, (err, files) => { files.map(file => { if(file.search(pattern)>0) ...
Lucifer's user avatar
1 vote
3 answers
96 views

I have an Array of answers, sorted by the question they belong to, like this: sortedAnswers= [[Answer1, Answer2, Answer3, Answer4],[AnswerA, AnswerB, AnswerC, AnswerD]...] I'm trying to render a ...
Fabrizio Mastrone's user avatar
0 votes
2 answers
78 views

I'm trying to map the text of a database of given asnwers in a List for my quiz App. The problem is that i have to acces the title in an array of array of objects like this: log of the database in ...
Fabrizio Mastrone's user avatar
0 votes
2 answers
122 views

How do i capitalize the first letter of each sentance in Javascript? (I am creating a tool that would convert first letter of each sentance to upparcase(Sentance Case) on click in reactjs) I want ...
Honey's user avatar
  • 3
5 votes
2 answers
456 views

How can I use the Map function with the pipe base |>? The next x vector can be used inside the Map function x <- c(1,5,1,2) Map(function(n)n*2, x) |> unlist() # [1] 2 10 2 4 This works, ...
juarpasi's user avatar
-4 votes
1 answer
47 views

I am trying to fetch API and show the result in my next react component but if I can set the state in the componetmountfunction it can cause the error: this.state.articles.map is not a function. ...
Rick Kim's user avatar
0 votes
2 answers
170 views

When I run the code below, the global variable 'ticker' is not defined in the compile() function. Goal: How do I pass multiple variables into the multiprocessing pool.map() function to make this code ...
andy_ruler_of_omicronpersei8's user avatar
1 vote
1 answer
50 views

I'm trying to render a specific photo based on the input from a user. I map over the users information and get all the fields right except the img field where I try to add a conditional statement. ...
user avatar
1 vote
2 answers
85 views

I have the following dataset dput(dat2) structure(list(g = c("Women", "Women", "Women", "Women", "Women", "Women", "Women&...
12666727b9's user avatar
  • 1,147
0 votes
1 answer
126 views

I have the following dataset # dput(head(dat, 130)) dat <- structure(list( Gender = c("Women", "Women", "Women", "Women", "Women", "Women&...
12666727b9's user avatar
  • 1,147
0 votes
0 answers
21 views

this is my entire code import { FormButton } from "../../shared/SharedElements/Buttons"; import { Header } from "../../shared/SharedElements/SharedElements"; import \* as l from './...
Aravinda Chathuranga's user avatar
0 votes
1 answer
565 views

this is my first question and I hope someone can help me, I need to convert an excel to json to upload the data to a DB with Angular and exceljs, I've been trying a lot of things but I could not find ...
diegosg's user avatar
  • 11
1 vote
1 answer
222 views

I am needed to use map on a list of lists in Scheme (Racket). What I want specifically is something like (map-lists add1 '((3 1) (2 8))) => '((4 2) (3 9)). I know how to solve this recursively, ...
cfrost6's user avatar
  • 13
1 vote
1 answer
145 views

Question How to write a map function that generates a TensorFlow dataset where each row is a multi column tensor? Problem Here is a dataset. import tensorflow as tf dataset = tf.data.Dataset....
mon's user avatar
  • 23k
1 vote
2 answers
2k views

I loop through an Array of objects in ReactJS where I use map function to loop through each Object. So Can i use tag to separate each objects in next line. I tried to put a tag at the end of the ...
shaijuelayidath's user avatar
0 votes
2 answers
124 views

I'm trying to map through a list that is stored in the state and pass each item in the list as a prop to another component. Here is what it looks like. The video component is supposed to receive each ...
Jellychews's user avatar
0 votes
1 answer
34 views

I've searched other posts but couldn't quite find I was looking for. I am looping through data from a sanity api but I want to limit it to just the first 4 items returned. What would be the best way ...
devo_dev's user avatar
  • 101
0 votes
1 answer
914 views

I have the map function. function test2() { let data = [ ["a","aa","aaa"], ["b","bb","bbb"], ["x&...
Einarr's user avatar
  • 350
0 votes
3 answers
607 views

I have data in below format: and I have function which accepts 2 keyword argument I am unable to come with syntax or example where i can pass specific keys from list of dictionaries to Map function ...
ankush sethi's user avatar
0 votes
2 answers
131 views

Hello I am trying to create a function that is called inside a map function, splits the string that have been passed as input and returns two processed strings. To be more understood here is my code (...
C96's user avatar
  • 529
0 votes
1 answer
353 views

Newbie here, Sorry for the silly question :) How am gonna put the "Key" prop in this function? The code is on the above of ContactShadows. I tried many ways but all the methods I tried are ...
Sayedul Karim's user avatar
0 votes
2 answers
786 views

I want to add genre to my Movie Search app's carousel using map function. I have two json files one of them is an array of movie data as objects having a key as genre_ids eg: genre_ids: 0: 16 1: 28 2:...
Apoorv Tripathi's user avatar
0 votes
1 answer
2k views

I have made a ReactJS application to display the items from a restaurant menu by making use of an API. My API data is in this way: [ { "Name": "Chicken pizza", "...
oneforall1's user avatar
1 vote
2 answers
83 views

I am using a reduce and my code works correctly, however, I was trying out using a map, but not sure how to implement it. Any help would be appreciated. What does the program do? Below I am fetching ...
qqq's user avatar
  • 1,036
0 votes
1 answer
2k views

I'm trying to use the function "scatter_mapbox" from plotly.express and everything I get back are blank maps. I'm having this issue in Jupyter Notebook with Python 3.9.12. I have tried to ...
Marcos Nazario's user avatar
1 vote
0 answers
396 views

I have two DataFrames, one gets daily new inputs via Id number and gives the related value. The other one corresponds to a "catalog" that lists all existing Ids and outputs the name of the ...
jsvcgs's user avatar
  • 11
0 votes
1 answer
112 views

I am looping a number of csv files in a folder using the map function. I want to save the results of the loop using a sliced version of the name of the csv. But I am getting an error when attempting ...
ROGO M's user avatar
  • 3
-2 votes
1 answer
49 views

How could i get the same result with a map? i'm a beginner trying to learn how maps relate to iteration. Is it possible to put this loop into a map? user_list = [int(input("what is the fist ...
qjrob's user avatar
  • 1
1 vote
1 answer
70 views

I already have code which maps to this ['vita', 'oscura', 'smarrita', 'dura', 'forte', 'paura', 'morte', 'trovai', 'scorte', 'v’intrai'] I want this [('vita','oscura',1),('oscura','smarrita',1),('...
jeannetton's user avatar
1 vote
1 answer
1k views

might be a dumb question but why when I try to use map() function on an already existing list: nums = [1,2,3,4,5] result = map(lambda num: num+num , nums) print(result) it returns me: <map object ...
Elina Kim's user avatar
0 votes
1 answer
72 views

The code is related to singly linked list,I am trying to display a value of a singly linked list using map function and state in react js. the function logic() is to update state when display button ...
Om J Patel's user avatar
-1 votes
1 answer
504 views

i am working on a form which has multiple steps so in each step when i click next it validate the current active step page with map function. i want to achieve Use map function to validate each input ...
Saim Akbar's user avatar
-1 votes
3 answers
950 views

I am trying to use an array map for checking if same username and password exist in an object array database.map((obj)=>{ if(values.name === obj.name && values.password===obj.password){ ...
Developer's user avatar
0 votes
1 answer
77 views

I'm in the midst of cleaning up errors for a repo and I've come across this error where someone's trying to to assign a tag value object to a const variable inside of a map function. Here's its ...
AshHimura's user avatar

1
2 3 4 5
17