I need a boolean to be stored with a String (or possibly a Path, not sure which one I want to use yet). I thought about using a Map, so I did some looking around and found out that LinkedHashMaps are the only type of Map that stay in Order when you do something with them. I could use two arrays, but I'm sure theres something better to use. Usually I would just make a helper class that stores the String, or Path, and the boolean and make Objects of this class. I know I could do this, but what's …

Member Avatar
Member Avatar
+0 forum 12

Hi all! I am working on creating an SMS language translator (SMS -> real English), and I am having trouble initializing a map for the SMS -> English codes. My code is below: map<string, string> THE_SMS_CODES{ ".02","Your (or my) two cents worth", "10X", "Thanks", "2MI","Too much information", "2U2" ,"To You Too", "4COL","For Crying Out Loud", "420" ,"let's get high", "<chuckle>","the speaker chuckles", "<frown>","the speaker is frowning", "<g>","Grin", "<grin>","the speaker is grinning", "<smile>","the one writing the message is smiling", "<smirk>","the one writing the message is smirking", "<wink>","the one writing the message is winking", "[$X$]","No spam !!", "JK","Just Kidding", "?","I have a …

Member Avatar
Member Avatar
+0 forum 4

I am using Eclipse helios and Android 4.1.2 i have followed the following documentation https://docs.google.com/document/pub?id=19nQzvKP-CVLd7_VrpwnHfl-AE9fjbJySowONZZtNHzw and done the coding exactly as described in tutorial.when i run my app on emulator it shows "This app wont run unless you update google play services" but on real device which is sony xperia which has google play services updated version it crahses with "App has stopped working".Any help is appreciated. This is my manifest <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.emeterfinalapp" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="11" android:targetSdkVersion="16" /> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_CORSE_LOCATION" /> <uses-feature android:glEsVersion="0x00020000" android:required="true"/> <permission android:name="com.example.emeterfinalapp.permission.MAPS_RECEIVE" android:protectionLevel="signature"/> <uses-permission …

Member Avatar
Member Avatar
+0 forum 10

Hi I have been trying to get a google map on one of my websites. In the past I had no trouble. But now having forgotten what I did I googled the topic and found an explanation that required adding javascript to the head section and a div with map-canvas in it. After checking and correcting some typos. I found it didn't work and read somewhere that the installation requires a key. I went to Google and got a key after setting the API to On. But don't know how to enter it. just pasting it after .../js as .../js?key= …

Member Avatar
Member Avatar
+0 forum 4

Hello, I have an one dimension numpy array with 1 to 5 numbers. I need to map these values to corresponding numbers between 0.76 to 1.24 with 0.12 interval. Then the problem is the find exact values in one array and fill the exact index in the second array. for example: `array([1,2,1,3,4,5])` Should be: `array([0.76,0.88,0.76,1,1.12,1.24])` I did this using if,elif but I though there has to be a elegent way to do this. def ClassConv(classNumVec): relativeMilk = np.empty([size]) for i in range(size): if classNumVec[i] == 1: relative[i] = 0.76 elif classNumVec[i] == 2: relative[i] = 0.88 elif classNumVec[i] == 3: …

Member Avatar
Member Avatar
+0 forum 1

Sup everyone, Does anyone have any recommended tutorials/sites for Hash maps? I'm planning to use it to create and link "locations" in a basic text-based game but i've looked around and there seems to be a lot of description on hashmaps but not much tutorial/examples for them. Any sort of guide will be greatly appreciated. Cheers,

Member Avatar
Member Avatar
+0 forum 4

Hi, am interfacing gps tracker TK106 with our online platform. The data we get from gps device is in this format (06667778889-9BP05000066677788899140815A0533.8206N00009.7045W000.0165936157.6200000000-L0000F51C) Instractions form [this site](http://sourceforge.net/p/opengts/patches/1/) explains the variours data sets in the string above, for example the first 11 digits 06667778889 is the device's programmable ID ,used in placed of the IMEI number.The problem is, i need to find a way to dynamically seperate these digits automatically as they are sent by the gps device, so we can plot location of fleets in real time. Also, 0000F51C is a hex # (odometer reading), this have to be converted from …

Member Avatar
Member Avatar
+0 forum 7

Hi, i found this code [online](http://www.macrostash.com/2011/09/17/demo-use-a-php-mysql-database-to-load-markers-on-a-google-map/#comment-2675). After installing and running code on my website, the screen shows nothing back, though code is firmly in place. <script type='text/javascript' src='jquery-1.6.2.min.js'></script> <script type='text/javascript' src='jquery-ui-1.8.14.custom.min.js'></script> <style> BODY {font-family : Verdana,Arial,Helvetica,sans-serif; color: #000000; font-size : 13px ; } #map_canvas { width:100%; height: 100%; z-index: 0; } </style> <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false" /></script> <script type='text/javascript'> //This javascript will load when the page loads. jQuery(document).ready( function($){ //Initialize the Google Maps var geocoder; var map; var markersArray = []; var infos = []; geocoder = new google.maps.Geocoder(); var myOptions = { zoom: 9, mapTypeId: google.maps.MapTypeId.ROADMAP } //Load the Map …

Member Avatar
Member Avatar
+0 forum 5

Hello funs2code! I have the following problem. I need to count the number of occurrences of a concrete word in a text file. I've tried to count the number of occurrences of each word at first. The following code has no errors but it isn't working! When I type in a command line "project1.exe test.dat cat dog cat dog" the empty string is showed. I've cheked if-statements -> right working. Then I've made a conclusion that problem is in for-statement (with iterators). Can anyone explain me, guys? #include <iostream.h> #include <fstream.h> #include <map.h> #include <string.h> #include <iterator.h> typedef std::map<std::string, int> …

Member Avatar
Member Avatar
+0 forum 5

Hi, I have a java class that is being used by multiple people (from a UI). In the class i have a static HashMap with the userKey as the map key and an arraylist with data pertaining to the user as the value. I am using this kind of like a cache. Because populating the list everytime the user logs in is a very expensive procedure. Whenever a user logs in and modifies the data i am updating the list for that user in the map. Now the issue is that I donot want to keep the entries in the …

Member Avatar
Member Avatar
+0 forum 4

Okay so inside my ArcherArmor.cpp, I'm trying to figure out why the map initializer list isn't working, but for some reason I keep getting "Error C2593: 'operator =' is ambiguous". Here is my code: I also have a class which ArcherArmor is derived from, that has a struct called `Armor`, which I left out for simplicity. The main problem is that error! The only thing I can think of is that im initializing the map wrong. //ArcherArmor.h #include <string> #include <map> class ArcherArmor { private: map <int, Armor> soldier_armor; public: void ArcherArmor_shop(); }; //ArcherArmor.cpp #include "ArcherArmor.h" void ArcherArmor::ArcherArmor_shop(){ soldier_armor = …

Member Avatar
Member Avatar
+0 forum 5

Okay so I have an `inventory` class that accesses a static vector from my base class `MainShop`. I also have a `SwordShop` class which inherits from `MainShop`. (Both Inventory and SwordShop are derived classes). //SwordShop class void SwordShop::Shop { //I have a setter function where it takes an integer and a string and adds its to my hashmap. //Also have a getter function which has a for loop displaying my items in my map this->setWeaponSoldier(1, "1) Meito Ichimonji\n +4 Damage\n 150Gold"); this->setWeaponSoldier(2, "2) Shusui\n +10 Damage\n 230Gold"); this->setWeaponSoldier(3, "3) Elixir\n +16 Damage\n 300Gold"); this->setWeaponSoldier(4, "4) Blade of scars\n +24 Damage\n …

Member Avatar
Member Avatar
+0 forum 8

Hi Team, Im reading collections and there is a topic called Backed Collections. I could not understand the output below . Please throw some light on it. TreeMap<String,String> map = new TreeMap<String,String>(); map.put("a","ant"); map.put("d","dog"); map.put("h","horse"); SortedMap<String,String> submap; submap = map.subMap("b","g"); System.out.println(map + " " + submap); map.put("b", "bat"); submap.put("f","fish"); map.put("r", "raccoon"); // submap.put("p" , "pig"); // out of range System.out.println(map + " " + submap); ** OUTPUT ** {a=ant, d=dog, h=horse} {d=dog} {a=ant, b=bat, d=dog, f=fish, h=horse, r= racoon} { b=bat, d=dog, f=fish} Please explain the output and one comment inside the code which says "out of Range".

Member Avatar
Member Avatar
+0 forum 4

the basic idea is that i have a config file where i need to take entries in different formats(the key is always a string and the value could be any type: int, float, string etc) from and the file has the following style: firstentry 1.5 secondentry 35 thirdentry somestring and i have this code to try to read int values from the entries but it gives me a lot of errors: #include <iostream> #include <fstream> #include <sstream> #include <string> #include <map> #include <Windows.h> using namespace std; map<string, stringstream> entries; int ReadInt(const string& key) { int value; stringstream SS; for(auto i …

Member Avatar
Member Avatar
+0 forum 2

hello , i have facility to connect map drive in windows in my collage . but now when switched to linux(FEDORA) i can not found the option for map network drive ? can yo pls tell me how to connect map drive in linux(fedor and ubantu - specifically).?

Member Avatar
Member Avatar
+0 forum 1

I've been having trouble with just the map area and the calendar piece of my website. But more focused on the map piece. The map does not want to load properly or won't load at all in the second tab of my jquery tabs. I need help, I think I may be missing just a small part of the code but here's the script. Please help me... <script> $(function() { $( "#tabs1, #tabs2" ).tabs( { show: function(event, ui){ // check if is "mappanel" and "map" is empty if (ui.panel.id == 'mappanel' && $('#map').is(':empty')) { // load map var myOptions = …

Member Avatar
Member Avatar
+0 forum 2

my google map works very well except that the language is not English but Chinese, I need it to be default in English, and anoter problem is infobox size isa little big than what I need, pls see the attached shot, when I click the marker, the infobox display is over the map canvas. here is the code, and pls help me improve it if anyone here could. thank you in advance. eta name="viewport" content="initial-scale=1.0, user-scalable=no" /> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> <script type="text/javascript"> function initialize() { var latlng = new google.maps.LatLng(23.203984,113.251772); var settings = { zoom: 15, center: latlng, mapTypeControl: true, …

Member Avatar
Member Avatar
+0 forum 9

I made three image hotspots on an image called Tab1. I want to click on each of them so it shows an UI next to Tab1. I used the jQuery example off their website since it's close to what I want, but what do I do when I want another button to show it's directed UI? Only #button and #effect are working. <script> $(function() { // run the currently selected effect function runEffect() { // run the effect (selectedEffect $( "#effect" ).show( "explode", options, 500); }; function runEffect2() { $("#effect2").show ("explode", options, 500); }; function runEffect3() { $("#effect3").show ("explode", options, …

Member Avatar
Member Avatar
+0 forum 1

I want to show google map of selected theatre. first user have to select city then they have to choose theatre as per selected city. i have used drop down box for both. then, after selecting theatre, when he clicks on show button i want to show google map of that theatre. plz help me i have tried my best but i cant be able to do this. so plz help me

Member Avatar
Member Avatar
+0 forum 6

Dear all, I have a website in which I am using the following htaccess code to hide the file extension RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php I then manually removed the .php extension from the entire website. Now when I am generating a site map for many of my pages are getting generated twice. One with the php extension and one without the php extension. Can someone explain to me what is wrong and how to fix this? Thank you. Your help will be much appreciated. Regards

Member Avatar
Member Avatar
+0 forum 4

As a project after learning about classes, I'm trying to create a type of board game where the program tells you where all of it's pieces are, and then you tell it where you've moved your pieces, and then the AI moves its pieces accordingly. However I'm having a bit of trouble with a few aspects of the program, namely, how do I dynamically update a specific variable stored in a class (in this case, sold1.targx and sold1.targy)? I'm kind of at a loss since this is my first program to use a class. # The enemy foot soldier class. …

Member Avatar
Member Avatar
+0 forum 3

I have this code as shown below. I've modified a bit to update the markers dynamically according to xml file extracting from php mysql database. There's nothing wrong with the script. The only thing I would love to do is to move the marker smoothly instead of the markers flickering waiting for an updates.. I need some help on this one... <html> <head> <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> <button onclick="myFunction()">Try it</button> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> <script type="text/javascript" src="util.js"></script> <script type="text/javascript"> var infowindow; var map; var markersArray = []; function myFunction() { setInterval(function(){marker()},5000); } function initialize() { var …

Member Avatar
Member Avatar
+0 forum 1

Hi Frendz, I have a set of polygon points on google map. I need to find whether the given input point is lying inside of the polygon or not? If anybody found articles related this please guide me. And also i need the same with poly line.

Member Avatar
Member Avatar
+0 forum 8

Hey all I need a bit of help if someone can! im writing(trying to!) a small application for a friend who owns a computer repair shop. Its a 'booking in' application. Someone brings a computer/device in and whover is on the front desk takes some details. Name, Street, Town, Postcode and Phone, these are all seperate JTextFields which get put into a TreeMap with Nameas the key and Street, Town, Postcode and Phone put into a Set and that Set put into the Map as the value. There is also a Notes JTextArea that is for the operator to type …

Member Avatar
Member Avatar
+0 forum 33

This is my first time to try using STL maps. The code looks correct as far as I can tell, but when I try to compile a test file that does nothing but include the header for the class and declare a variable of that class, I am getting compiler errors saying that the map members of my class are not declared in the scope of my function definitions. I am also getting an error that seems to be saying that there is no matching call error for a call to map::insert. Any help with finding my mistakes would be …

Member Avatar
Member Avatar
+0 forum 9

Dear friends, i am a university student competting for my bsc(hons) in IT! i suggested to have my final year project based on android, n for your info, i have never codded in android. im am supposed to give a suggestion by tomorow! and i would be completing my project by august! What the program is to to do, it 1) automatically locate where you are in mauritius 2) you select your destional upon tapping on specific location in maritius 3) it will tel u the route you need to take to got thier...eg by car, the km and the …

Member Avatar
Member Avatar
+0 forum 2

I am having hard time understanding what the problem is with my code here. Basically I have a map that contains Key objects as the key, and Block* as the value. The point of this for loop is to print out the values that the key contains on to the console in the form of a game board. However it is only printing one role, in a infinite loop. the variable r never gets incremented for some reason. if you guys could help that would be great. Thanks in advance! for (int r=0; r<rows; r++){ for (int c =0; c<columns; …

Member Avatar
Member Avatar
+0 forum 2

How to add control for marking area using points,lines and polygons on google map and how to store that area in mysql db? Becoz i need to give alert message when my vehicle cross that area in my vehicle tracking system.

Member Avatar
Member Avatar
+0 forum 1

Hi frendz, In my vehicle tracking project, I need to draw the route (polyline) of my vehicle in google map. When the vehicle is moving away from that route, it should give alert msg. So how to specify the route line on google map?

Member Avatar
Member Avatar
+0 forum 7

how to add circle marker on google map by giving latitude,longitude and radius in KM?

Member Avatar
Member Avatar
+0 forum 2

The End.