javafx : how to programmatically change items of ComboBox in TableCell?
◷
تاریخ انتشار:
1395/1/12
|
ساعت:
14:01
Vote count: 0 as you can see already, i have a TableView which have two columns of ComboBoxTableCell. these are the ancestor values ObservableList<String> ancestors = FXCollections.observableArrayList("1", "2", "3", "4", "5", "6", "7", "8", "9", "10"); ancestorColumn.setCellFactory(ComboBoxTableCell...
Google Map not loading after page submit
◷
تاریخ انتشار:
1395/1/12
|
ساعت:
13:01
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
◷
تاریخ انتشار:
1395/1/12
|
ساعت:
13:01
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
◷
تاریخ انتشار:
1395/1/12
|
ساعت:
13:01
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
◷
تاریخ انتشار:
1395/1/12
|
ساعت:
11:57
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?
◷
تاریخ انتشار:
1395/1/12
|
ساعت:
11:57
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 ...
Accessing ec2 instance via ftp/ssh from user other than ec2-user
◷
تاریخ انتشار:
1395/1/12
|
ساعت:
11:57
Vote count: 0 I've created a key-pair and have access to a linux instance via FTP and SSH using ec2-user. I have also added the desired user to all groups that ec2-user is in. All of this was tested using the .ppk key, generated my puttygen, which allowed ec2-user to the instance. I even changed the...
integer extension method to set an integer to 0
◷
تاریخ انتشار:
1395/1/12
|
ساعت:
10:56
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
◷
تاریخ انتشار:
1395/1/12
|
ساعت:
10:56
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...
Can I define a function which returns a reference to an array with a fixed size?
◷
تاریخ انتشار:
1395/1/12
|
ساعت:
10:56
Vote count: 0 This function accepts an int, and fill an array of 10 ints with that value, and retu s a pointer to that array. How can I do the same thing but retu an reference to an array? int (*g(int n))[10] { int (*ptr)[10] = (int (*)[10])malloc(sizeof(int) * 10); for (int i = 0; i < 10; i++) { (*...
Basic Explanation of little bit of C++
◷
تاریخ انتشار:
1395/1/12
|
ساعت:
9:50
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
◷
تاریخ انتشار:
1395/1/12
|
ساعت:
9:50
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
◷
تاریخ انتشار:
1395/1/12
|
ساعت:
9:50
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
◷
تاریخ انتشار:
1395/1/12
|
ساعت:
8:37
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
◷
تاریخ انتشار:
1395/1/12
|
ساعت:
8:37
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
◷
تاریخ انتشار:
1395/1/12
|
ساعت:
8:37
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
◷
تاریخ انتشار:
1395/1/12
|
ساعت:
7:36
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?
◷
تاریخ انتشار:
1395/1/12
|
ساعت:
7:36
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
◷
تاریخ انتشار:
1395/1/12
|
ساعت:
7:36
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
◷
تاریخ انتشار:
1395/1/12
|
ساعت:
6:26
Vote count: 0 Hi I have the following file +--------------------------+-----------------------+-----------------------+- + | col_name | data_type | comment | +--------------------------+-----------------------+-----------------------+--+ | id | string | | | name | string | | | filename | string | | ...