Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
map
- Page 1
Re: How to Find Best Keywords to increase the Website traffic?
Digital Media
Digital Marketing
Search Engine Strategies
4 Days Ago
by clickwithsree
… – Use SEMrush/ Ahrefs to see what’s working for others.
Map
to Content – Align keywords with blog posts, service pages, and…
Re: Need Coding Help With A Project
Programming
Software Development
1 Month Ago
by Enzo_3
… numbers from a text file using higher-order functions like
map
() and reduce(). I was really stuck on how to incorporate…') as file: content = file.read() number_strings = content.split() numbers = list(
map
(int, number_strings)) total = reduce(lambda x, y: x + y, numbers…
Re: Need Coding Help With A Project
Programming
Software Development
1 Month Ago
by Reverend Jim
… should make use of two higher-order functions (i.e.,
map
and reduce, or something else) to simplify the design. is… self-contradictory as using `
map
` and `reduce` instead of `sum` does not simplify the design…
Re: Need Coding Help With A Project
Programming
Software Development
1 Month Ago
by Reverend Jim
>Why put them down? Please explain to me how anything I said was a put down. If someone told me their methof of counting cows was "count the number of legs and divide by four", I would point out that it would be simpler just to count the number of cows. If I said "That's stupid, just count the cows", then that would be a …
Re: Need Coding Help With A Project
Programming
Software Development
1 Month Ago
by Dani
First of all, let me be blunt. I believe that Enzo only resurrected a 12 year old thread with the intent of spamming. You and I know that because, as moderators, we see in his profile his spamming attempts and his infractions. However, no one else coming across this thread sees that or knows that, so the other 2000 people reading this thread may …
Re: Map..Please help
Programming
Software Development
13 Years Ago
by zolymo
…Texts, that contains str1= "tree", str2="
map
", str3 = "sorted"... is necessary that…[]){ Texts tx = new Texts("tree", "
map
", "sorted"); TreeMap<Integer,Texts>…(1, tx); System.out.println("Keys of tree
map
: " + tMap.keySet()); System.out.println("…
Map and while()
Programming
Software Development
14 Years Ago
by sadsdw
…; int father; int mother; } ; // ... std::
map
<int, STreeGenSimple> IndivAuxIDSortedMap; myfileReadAuxIdSorted.open("auxIdSorted…current_indivSortedAuxID.father = fatherV; current_indivSortedAuxID.mother = motherV; }; std::
map
<int, STreeGenSimple>::const_iterator it4; for (it4 = …
Re: Map and while()
Programming
Software Development
14 Years Ago
by sadsdw
…, Thanks for replied me. I need read my
map
the first time and update the auxId (I didn…this in my code). But, just reading my
map
one time is no possible to update my variable.…or in other words I need to read my
MAP
until my variable AuxId in all lines become …zero. I don't know how to read a
map
many times controlled by while and auxiId. Could …
Re: Map..Please help
Programming
Software Development
13 Years Ago
by javausers
Here the output I got: Keys of tree
map
: [1] Values of tree
map
: [[Ljava.lang.object;@3e25a5] I want the output as: Keys of tree
map
: [1] Values of tree
map
: tree
map
sorted
Map..Please help
Programming
Software Development
13 Years Ago
by javausers
Hi, I m writing code to
map
single key(Integer) with array of values. But, its not…<Integer, Object[]>(); Object[] vals = {"tree", "
map
", "sorted"}; tMap.put(1, vals); System.out….println("Keys of tree
map
: " + tMap.keySet()); System.out.println("Values of …
Re: Map and while()
Programming
Software Development
14 Years Ago
by NathanOliver
… to make sure that auxID for every object in the
map
is not zero then you can do something like [code…=c++] std::
map
<int, STreeGenSimple>::iterator it = IndivAuxIDSortedMap.begin(), end = IndivAuxIDSortedMap…
Re: Map and while()
Programming
Software Development
14 Years Ago
by NathanOliver
… any zeros are left bool ZerosRemaning(std::
map
<int, STreeGenSimple> IndivAuxIDSortedMap) std::
map
<int, STreeGenSimple>::iterator it = IndivAuxIDSortedMap…
Re: Map and while()
Programming
Software Development
14 Years Ago
by sadsdw
Hi Nathan, Can you check my code, please? Is it in your mind? [CODE]bool ZerosRemaning(std::
map
<int, STreeGenSimple> IndivAuxIDSortedMap) { std::
map
<int, STreeGenSimple>::const_iterator it5; for (it5 = IndivAuxIDSortedMap.begin(); it5 != IndivAuxIDSortedMap.end(); ++it5) { if(it5->second.auxID == 0) return 1; } }[/CODE]
Re: Map and while()
Programming
Software Development
14 Years Ago
by NathanOliver
… should add `return false;` bool ZerosRemaning(std::
map
<int, STreeGenSimple> IndivAuxIDSortedMap) { std::
map
<int, STreeGenSimple>::const_iterator it5; for…
Re: Map..Please help
Programming
Software Development
13 Years Ago
by NormR1
The
Map
contains an array. Get the array out of the
Map
Write a loop to go thru the array. Get each element from the array and cast it to a String
Re: Map..Please help
Programming
Software Development
13 Years Ago
by JamesCherrill
Although that approach can work, at least for a fixed size list of values, it's a pretty heavy way to overcome the OP's problem which was how to print an array of Strings. A better answer would be to use the Arrays.toString method, as in [CODE]System.out.println("Values of tree
map
: " + Arrays.toString(tMap.values()));[/CODE]
Re: Map..Please help
Programming
Software Development
13 Years Ago
by NormR1
… java.util.Arrays System.out.println("Values of tree
map
: " + Arrays.toString(tMap.values())); ^ [/CODE…
Re: Map..Please help
Programming
Software Development
13 Years Ago
by JamesCherrill
Well now, don't I feel really stupid! I focussed on the array of Objects, but forgot that they were embedded in a Collection. This code I [I]have [/I]tested, although I can't help feeling there is a better way... [CODE]System.out.println("Values of tree
map
: " + Arrays.deepToString(tMap.values().toArray()));[/CODE]
Re: map
Programming
Software Development
13 Years Ago
by L7Sqr
[QUOTE=namratag;1694856]How to get value from key in
map
?[/QUOTE] A
map
can be indexed by the key to retrieve a value. So, given the key [icode]key[/icode] and the
map
[icode]table[/icode], you could get the value for key by way of [icode]table[key][/icode].
Map help!
Programming
Software Development
13 Years Ago
by GlenRogers
… put into a Set and that Set put into the
Map
as the value. There is also a Notes JTextArea that… on the repair problem. For each cusomer name in the
Map
I want to store the notes as well as the…
Re: Map help!
Programming
Software Development
13 Years Ago
by GlenRogers
"Name:" was a string I put into the
map
with the name string, like this private void processSave() { String … it out now as later I need to search the
map
baseed on name keys, the String "Name:" gets…
Re: Map help!
Programming
Software Development
13 Years Ago
by GlenRogers
Thanks for the reply James! I have a DeskApp class to process all the GUI stuff, am I right in saying that it will hold a
Map
with Customer objects as keys and List or Set of Repair objects as values?
Re: Map help!
Programming
Software Development
13 Years Ago
by JamesCherrill
You could do that. I would just have a List of Customers (or maybe a
Map
with customer.name as the key, and the whole Customer object as the value, so it's easy to find the right customer), and in each customer I would have it's own list of Repairs as an field.
Re: Map help!
Programming
Software Development
13 Years Ago
by GlenRogers
… the value. Then it is supposed to print out the
map
. private void processSave() { cust.setName(nameText.getText()); cust.setStreet(streetText…
Re: Map help!
Programming
Software Development
13 Years Ago
by GlenRogers
Glen is the name which is th key in the
map
. The toString() method is in th same class as the processSave() method I posted. Should it be in the Customer class?
Re: Map help!
Programming
Software Development
13 Years Ago
by GlenRogers
Hi again, I havent done much of this since I was last here. Can anyone help me in printing a
map
so that each key/vlue pair is on a seperate line? Thanks Glen..
Re: Map help!
Programming
Software Development
13 Years Ago
by JamesCherrill
There's a method that returns all the keys in a
map
. Use it to loop through all the keys, printing each key and its corresponding value.
Re: Map help!
Programming
Software Development
13 Years Ago
by GlenRogers
That was the problem. I had one Customer variable and it kept having its values replaced so alway printed out the last set of values. Simple fix, I made my method thad adds Customers to the
map
create a new Customer object each time it was called (a button press) Onward and upwards now! Thank you
map
Programming
Software Development
13 Years Ago
by namratag
How to get value from key in
map
?
Re: map
Programming
Software Development
13 Years Ago
by Dman01
Look at [url]http://www.cplusplus.com/reference/stl/
map
/begin/[/url] the 'first' member does give you access to the key member
1
2
3
17
Next
Last
Search
Search
Forums
Forum Index
Hardware/Software
Recommended Topics
Programming
Recommended Topics
Digital Media
Recommended Topics
Community Center
Recommended Topics
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
Backlink Auditor
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2025 DaniWeb® LLC