Google Map not loading after page submit
Vote count: 0 I know there are lot of question regarding the same title, but unfortunately I didn't find a working solution yet, thus I'm posting another. I'm trying to load simplest google map view and it is not loading at all when page loading or after form submission. however when I refresh the p...
Iterate over array of object to build a div structure
Vote count: 0 I am trying to create a structure like the image bellow with angular ng-repeat these data inside Reports array. I know I must use some kind of iteration to achieve it but I am very lost. $scope.Reports = [ { Id: 1, Name: 'Report One', Year: 2016, Month: 05 }, { Id: 2, Name: 'Report Cor...
Best practice to modify object
Vote count: 0 I have a foreach loop to format an object like this : foreach ($data as $index => $item) { $temp = array_merge($columns['columns'], $temp); $data->$index = (object)$temp; } basically I am modifying the object and I also can do it in this way foreach ($data as &$item) { $temp = array_me...
Codeigniter Message: Cookie names must not be empty
Vote count: 0 A PHP ERROR was encountered in the mean time of the logout process. Login & logout process it still working fine! But it shows an error when i logout the system! Severity: Wa ing Message: Cookie names must not be empty Filename: core/Input.php Line Number: 286 Here is the code of my In...
How to find a key using a value in a python 3 dictionary?
Vote count: 0 I am writing a cypher and I've assigned numerical values to every letter in the alphabet, alphabet_dictionary = {'a': 0, 'b': 1, 'c': 2,... etc.}. I first convert the letter in message to numbers and do some arithmetic on them and store those numbers in a variable named code, but then ...
integer extension method to set an integer to 0
Vote count: 0 My code is littered with someInt=0; I keep constantly "resetting" my integers. Would it be possible to implement an extension method that will set the integer to 0? Something like this: public static void Reset(this int num) =>num=0; And the intended usage would be: someInt.Reset; Howe...
Replace single quotes
Vote count: 0 I am using Google Forms to get data and them importing it into Google Fusion Tables. The problem is if someone type an '. The script I am using is here. Could I edit it to replace or remove all apostrophes before syncing? If it is possible I would prefer to do it inside of the Google S...
Basic Explanation of little bit of C++
Vote count: 0 Can Some lovly soul help me out with this one :) Could you please explain each piece of this line of code Like what each Individual piece does Thank you in advance. istream & operator >>( istream & input, Registration & R ) ostream & operator <<( ostream & os, const Registration & R ) ...
Spotify API: Save playlist endpoint return error 500
Vote count: 0 Seems that the endpoint to create a playlist is failing since the new API release. I tried with a lot of third-party implementations and all are broken. The API retu s error 500. Is somebody experiencing something like this? I wrote to Spotify Eng twitter but without success :/ asked 4...
PHP and MySQL - display form based on date and time
Vote count: 0 I need help understanding how to display content/forms based on the server's current date/time. I have 10 questions stored in a table. The questions are called up and displayed using PHP, with a form next to each question (to gather the answer). Each question has a "due date" associate...
How to convert a Flat list merge to a hierarchy string
Vote count: 0 I have a map from string to string, for example, the map have 4 entries, the keys are: a.b.c, a.b.d, a.b, a.e and the values are 1, 2, 3, 4 respectively. std::map<string, string> myMap; myMap["a.b.c"] = "1"; myMap["a.b.d"] = "2"; myMap["a.b"] = "3"; myMap["a.e"] = "4"; Now I would like...
Writing out a callout from a database using JS
Vote count: 0 I have a problem that I just ca ot figure out on my own. This is the issue. I'm making a website that is using javascript to make the website write out things as you type on your keyboard using JS. As you're 'writing' this text I would like your location to be shown, making the illusio...
php redirect to a different page trouble
Vote count: 0 I am having difficulty with header redirecting me to index.html from my login page. I'm not sure header is even the way to go but it is all that I could find on page redirection. This code is just a simple login page which checks the use ame and password against a MySQL database. The p...
Not printing correctly, but still running
Vote count: 0 import java.util.Sca er; import java.util.Random; public class ResponseTimeProject { public static void main(String[] args) { Sca er in = new Sca er(System.in); Random rand = new Random(); System.out.print("Please enter your full name: "); String name = in.nextLine(); System.out.printl...
How to debug smartystreets api call?
Vote count: 0 I want to use smartystreets via python. here is the script I am using: # ss.py import requests import pdb authid = 'jaf110af-b6ae-3ea2-829a-035dcb246392' token = 'kAyGAA0rD0lNykcktJpg' payload2 = {'auth-id':authid, 'auth-token':token} add_s = '1600+Amphitheatre+Parkway,+Mountain+View,+...
How to count number of strings in a arraylist
Vote count: -2 I am using a HashMap, its key is a string and values are list of strings. The output of the map is 68 [BREAKFAST_ENTREE, 15, 1, 33, 1, 3755, 1, 80014000, 1, 83058000, 1] or 38 [BREAKFAST_DRINK, 80606002, 1, 3988, 1, 40000042, 1]. where 68 is string key and rest are list of strings. Ho...
reformat file contents in a specific way
Vote count: 0 Hi I have the following file +--------------------------+-----------------------+-----------------------+- + | col_name | data_type | comment | +--------------------------+-----------------------+-----------------------+--+ | id | string | | | name | string | | | filename | string | | ...