Can a map be added to a .ics file? - icalendar

When setting the location of an event in Calendar on a Mac it offers suggestions which when clicked embeds a map into the event. Is it possible to embed a map into a .ics file so that the map shows once imported? It seems that simply setting LOCATION when creating the calendar file isn't sufficient.
I've scanned RFC 2445 but can't find anything to help.
My assumption is that to embed a map into the event the user needs to specifically select a location from the suggestions offered when typing and that this can't be done automatically on import. Is my assumption correct?

short-answer: NO you cannot embed a map in the .ics file, but your calendar render could do it by parsing .ics file
long-answer:
RFC2445 was supersed by RFC5545
RFC5545 specifies in section 8.3.4, the following data types of which none allow you to have a map in an .ics file:
+-----------------+---------+--------------------------+
| Value Data Type | Status | Reference |
+-----------------+---------+--------------------------+
| BINARY | Current | RFC 5545, Section 3.3.1 |
| | | |
| BOOLEAN | Current | RFC 5545, Section 3.3.2 |
| | | |
| CAL-ADDRESS | Current | RFC 5545, Section 3.3.3 |
| | | |
| DATE | Current | RFC 5545, Section 3.3.4 |
| | | |
| DATE-TIME | Current | RFC 5545, Section 3.3.5 |
| | | |
| DURATION | Current | RFC 5545, Section 3.3.6 |
| | | |
| FLOAT | Current | RFC 5545, Section 3.3.7 |
| | | |
| INTEGER | Current | RFC 5545, Section 3.3.8 |
| | | |
| PERIOD | Current | RFC 5545, Section 3.3.9 |
| | | |
| RECUR | Current | RFC 5545, Section 3.3.10 |
| | | |
| TEXT | Current | RFC 5545, Section 3.3.11 |
| | | |
| TIME | Current | RFC 5545, Section 3.3.12 |
| | | |
| URI | Current | RFC 5545, Section 3.3.13 |
| | | |
| UTC-OFFSET | Current | RFC 5545, Section 3.3.14 |
+-----------------+---------+--------------------------+
To achieve what you want to do, your calendar renderer needs to parse either the calendar property LOCATION (see 3.8.1.7) which is a string, or better if you have it you could parse the propertyGEO (see 3.8.1.6 ) which is two floats giving longitude and latitude.

Related

How to convert text-based table to image from terminal in the same structure?

I'm trying to convert text-based table to the image, but the structure is broken after convertation.
I have file with the next structure:
+-----------+------+------------+-----------------+
| City name | Area | Population | Annual Rainfall |
+-----------+------+------------+-----------------+
| Adelaide | 1295 | 1158259 | 600.5 |
| Brisbane | 5905 | 1857594 | 1146.4 |
| Darwin | 112 | 120900 | 1714.7 |
| Hobart | 1357 | 205556 | 619.5 |
| Sydney | 2058 | 4336374 | 1214.8 |
| Melbourne | 1566 | 3806092 | 646.9 |
| Perth | 5386 | 1554769 | 869.4 |
+-----------+------+------------+-----------------+%
after a conversation with ImageMagick and command below:
convert label:"$(cat test.txt)" result1.png
I have next image:
As you can see, the structure of the columns is broken.
Do you have an idea of how can such an issue be solved?
Regards,
Ihor
You need to set the TypeFace to something monospace to match the terminal.
convert -font "Liberation-Mono" label:#test.txt result1.png
You can identify which fonts on the system by running
identify -list font | grep Mono

is there a commenter parameter for issues via the GitHub API?

The GitHub page for web-interactive issue filtering describes commenter and an involved filters.
However, the GitHub issues API page lists the following parameters, which don't seem to include commenter:
+-----------+-------------------+
| Name | Type |
+-----------+-------------------+
| milestone | integerĀ orĀ string |
| state | string |
| assignee | string |
| creator | string |
| mentioned | string |
| labels | string |
| sort | string |
| direction | string |
| since | string |
+-----------+-------------------+

Swift & Firebase - Split data for user info?

I currently coding a fitness app that permits to record all the personal records for a user.
I'm really new with Cloud Firestore from Firebase, so I really don't know how I could structure the database.
In my mind, I have two options:
OPTION 1
Users
|
+--UserID
| |
| +--Name
| +--Phone
| +--etc..
|
|
Users-records
|
+--UserID
| |
| +--RecordName
| | |
| | +--recordValue
| | +--recordType
| |
| +--RecordName
| | +--recordValue
| | +--recordType
OPTION 2
Users
|
+--UserID
| |
| +--Name
| +--Phone
| +--etc..
| +--Records
| | |
| | +--RecordName
| | | |
| | | +--recordValue
| | | +--recordType
| | +--RecordName
| | | |
| | | +--recordValue
| | | +--recordType
The questions are: Do I have to split the collection for the user?
Do you think this architecture is well designed for the purpose (ie record personal records from users)?
Thank you very much
Your database structure really depends on how you are going to use it. Keep in mind that whenever you observe a node, you are also observing all of the children nodes.
So I'd probably go with something closer to Option two, maybe like this:
Users
|
+--UserID
| |
| +--UserInfo
| | |
| | +--Name
| | +--Phone
| | +--etc..
| |
| +--Records
| | |
| | +--RecordName
| | | |
| | | +--recordValue
| | | +--recordType
| | +--RecordName
| | | |
| | | +--recordValue
| | | +--recordType
I'd choose this, because I'd image you'd want to get all of the UserInfo at once, So we can observe that "UserInfo" node and get all of the children: name, phone, etc....
Then I'd think you'd also want to get all of the records at once, so we can observe that "Records" node and get all of that data.
Additionally, if you wanted, you could get everything at once by observing the UserID!
However, if you were maybe going to be getting a list of all the users, then you definitely don't want all this data in one spot and this design wouldn't work, because that is a lot of data to observe just to get all the users.
In summary: Choose an option which makes it easiest for you to get what you need, without getting extra data you don't want!

How to list Rackspace servers filtered by metadata using REST API?

I can see that it is possible to add metadata to a Rackspace virtual machine instance.
I want to get a list of running instances, filtered by a particular metatag value.
I can't see how to do so in the documentation however.
is it possible?
You should be able to do so using the openstack client... but it depends on which metatag you're interested in.
You can get a list of all servers:
openstack server list
Will spit something like
+--------------------------------------+------------------+--------+-----------------------------------------------------------------------------------------------------------+
| ID | Name | Status | Networks |
+--------------------------------------+------------------+--------+-----------------------------------------------------------------------------------------------------------+
| 97606ae9-7f18-4a3c-903a-1583d446119b | trysmallwin | ERROR | |
| cb78b8d5-2f03-4a3f-ab26-f389acbd0b76 | Win-try again | ERROR | public=2607:f298:5:101d:f816:3eff:fe9e:5cd4, 208.113.133.90, 2607:f298:5:101d:f816:3eff:fe36:da45, |
| | | | 208.113.133.93, 2607:f298:5:101d:f816:3eff:fe40:57d5, 208.113.133.95 |
| 040751d1-c4c5-47aa-8dec-1d69a468be1c | hnxhdkwskrvwvdwr | ACTIVE | public=2607:f298:5:101d:f816:3eff:fe60:324, 208.113.130.52 |
+--------------------------------------+------------------+--------+-----------------------------------------------------------------------------------------------------------+
note the ID of the server and investigate deeper:
openstack server show 040751d1-c4c5-47aa-8dec-1d69a468be1c
+--------------------------------------+------------------------------------------------------------+
| Field | Value |
+--------------------------------------+------------------------------------------------------------+
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-AZ:availability_zone | iad-2 |
| OS-EXT-STS:power_state | Running |
| OS-EXT-STS:task_state | None |
| OS-EXT-STS:vm_state | active |
| OS-SRV-USG:launched_at | 2016-07-26T17:32:01.000000 |
| OS-SRV-USG:terminated_at | None |
| accessIPv4 | |
| accessIPv6 | |
| addresses | public=2607:f298:5:101d:f816:3eff:fe60:324, 208.113.130.52 |
| config_drive | True |
| created | 2016-07-26T17:31:51Z |
| flavor | gp1.semisonic (50) |
| hostId | e1efd75d1e8f6a7f5bb228a35db13647281996087d39c65af8ce83d9 |
| id | 040751d1-c4c5-47aa-8dec-1d69a468be1c |
| image | Ubuntu-14.04 (03f89ff2-d66e-49f5-ae61-656a006bbbe9) |
| key_name | stef |
| name | hnxhdkwskrvwvdwr |
| os-extended-volumes:volumes_attached | [] |
| progress | 0 |
| project_id | d2fb6996496044158cf977c2129c8660 |
| properties | |
| security_groups | [{u'name': u'default'}] |
| status | ACTIVE |
| updated | 2016-07-26T17:32:01Z |
| user_id | 5b2ca246f39a425f9a833460bf322603 |
+--------------------------------------+------------------------------------------------------------+
openstack --f json will output the same stuff but in json format that you can more easily manipulate programmatically.
HTH

Cannot read (or find?) ResourceBundle

Below is my project structure.
Project
|
|--src
| |
| |--com
| | |
| | |--jasper
| | |
| | |--JasperDemo.java
| |
| |--i18n.properties
|
|
|--Arabic.jrxml
In the properties file there is a key text1.paragraph and it's value may be in any language(most preferable arabic).
In the .jrxml file I have set ResourceBundle="i18n" and in the textfield have used $R{text1.paragraph}
Now the problem is that when I run it from eclipse in the PDF file I get output of the field as $R{text1.paragraph} not it's value