Access with a spinner to a list created in Realm in Android Studio (Java)

I tell you: I have a form with realm through which I can register items. Well, now I would like to be able to access this list of registered items for me to show them in a spinner, but I have no idea how I could do it. Let's see if you can help me out.


I have managed to access the list with the following code:

                package com.isaac.appet;

import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.Spinner;

import com.isaac.appet.HomeFragment.HomeFragment;
import com.isaac.appet.HomeFragment.Pets;

import java.util.List;

import io.realm.Realm;
import io.realm.RealmList;
import io.realm.RealmResults;

public class AlarmsFormActivity extends AppCompatActivity {

    Spinner spPetLst;

    protected void onCreate (Bundle savedInstanceState) {
        super.onCreate (savedInstanceState);
        setContentView (R.layout.activity_alarms_form);

        spPetLst = findViewById (;

        Realm realm = Realm.getDefaultInstance ();
        RealmResults realmResults = realm.where (Pets.class) .findAll ();
        List documents = realm.copyFromRealm (realmResults);
        ArrayAdapter adapter = new ArrayAdapter <> (this, android.R.layout.simple_list_item_1, documents);
        spPetLst.setAdapter (adapter);


But it shows me the name of the package, with number and such, and I want you to show me only the name of the element that I assigned in that field. How can I do this?

Thank you.

A greeting.

web development: How to use a git repository to control the version of a complete website, including the databases that are created with phpmyadmin?

In the past I did not use git and I simply created my local web projects on my computer using XAMPP. That's why I was able to create databases through phpmyadmin and simply save my other files from the website in the htdocs folder (F: xampp htdocs). After that I just saw the result in my browser using localhost.

Now I want to control the version of my new web project using git (I have already learned the basics). But there was the problem that I do not know how to control the version of the entire website, including my databases, which are stored in a completely different folder (F: xampp mysql data).

Do I have to control the version of the entire xampp folder? Or is it even possible to control the databases?

How to find the process ID for the instance of the application created by the "open" command

When I become a programmer open -F -W -n -g -a /Applications/, I went back the process open and his pid 93930.

But that is not the process (93931) of the newly created Safari instance.

huocp 93931 0.0 1.9 6047904 160240 ?? S 11:55 am 0: 04.39 /Applications/
huocp 93930 0.0 0.1 4340272 12212 s004 S + 11:55 am 0: 00.07 open -F -W -n -g -a /Applications/

Now I have no way to programmatically close the Safari process. I can close the open programmer process killing 93930, but leaves 93931 running.

So, the question is: is there a way to get the pid of the application instance created by open I send?

93931 (safari) is not even a secondary process of 93930 (open), I tried it with the pstree command.

encryption: I would like to decipher a very mysterious code, but I have no idea what algorithm it is or who created it

enter the description of the image here
Here is the text message that my friend received, which is encrypted in some way.
Here is a transcript:


≡5≡% aQ7oH £ ivMÆ7iÖæØ $

¤Φ: b £ fÆìèæ4e¡L # ΨLÆ: ÜΘ ¥ BÅZ2fUkV-Θ9 DΩ ¥ ΦøæΔA¤

Sb) Σ: oZéìDX <ph) ¥ and X6 BQ ¥ BÅZ2Xé #

Do any of you know what code is this or how can I solve it? Thanks for the help.

SharePoint 2010 workflow on the SharePoint Online site created by computers: server error: access denied

Can anyone save or post a platform type: SharePoint 2010 workflow (with SharePoint designer 2013) in a SharePoint online site created as part of a Microsoft team?

When I try to save or publish, I get an error. Server error: Access denied

I can create 2013 workflows on the same site through the SharePoint designer. I can create 2010 workflows in at least one created site, not through teams, but also in the same Office 365 tenant.

I am a site collection administrator because I am in the owner group (which Teams automatically configure as site collection administrators) and I also tried to change it to site collection manager directly to my user account. I also added my account directly to the permissions of the site with full control, just in case.

I can not find any documentation on disapproval of SharePoint 2010 workflows on sites created through computers, but honestly, there is not much information about these at all.

Any other troubleshooting or fixes I found?

[WTS] The best host of is! High uptime and totally redundant network.

Legion box is a leading provider of VPS and dedicated server, which was created and has worked successfully for those who constantly need high performance, reliability, stability and server security.

Linux virtual private servers

With Legion box We provide the virtual server, RAM, storage and capacity without any overload.

Each VPS comes with:

– Bandwidth not measured;
– Instantaneous installation (without downtime);
– Free panel ISPmanagerLite 4;
– 7 day refund guarantee.
– Payment options: Paypal, Bitcoin, WebMoney and the main credit cards;
– High security (Tier III security level).

Xen VPS (most popular plans)

Choose one of the options: CentOS, Ubuntu, Debian, Fedora or CentOS in cPanel.
Available locations: United States, Los Angeles, Switzerland, Zurich, Germany, Nuremberg, Russia, Moscow

CPU: 1hE5-2680
RAM: 0.5 GB
Disk space: 15 GB
$ 7 / month

CPU: 2хE5-2680
Disk space: 25 GB
$ 11.99 / month

CPU: 2хE5-2680
Disk space: 50 GB
$ 23.99 / month

Do you need another configuration for XEN VPS? See more options here:

SSD VPS (most popular plans)

Choose one of the options: CentOS, Ubuntu, Debian, Fedora or Windows.
Available locations: USA, Los Angeles, Switzerland, Zurich, Germany, Nuremberg.

CPU: 1hE5-2680
Disk space: 20 GB
$ 9.95 / month

CPU: 2хE5-2680
Disk space: 30 GB
$ 19.95 / month

Do you need another configuration for SSD VPS? See more options here:

In Legionbox you can also get Windows VPS starting at $ 11.99 / month >>>>

CPU: 2хE5-2680
Disk space: 25 GB
$ 11.99 / month

CPU: 2хE5-2680
Disk space: 80 GB
$ 44.99 / month

Check here for more Windows VPS

Do you need dedicated server? Check the best and fastest dedicated Windows and Linux servers here!

I have a question?
Feel free to open a ticket


8 – Check if a user has created a node and redirects it to a page

Drupal8: I try to redirect a user to a page if he has already created a node in mytheme.theme, to prevent a user from creating a node twice:

function mytheme_node_prepare ($ node) {
if ($ node-> bundle () == "my_node") {
if (! isset ($ node-> nid)) {
$ existing_nid = db_query ("SELECT nid FROM {node} WHERE (type =: type1) AND uid =: uid", array ("type1" => "my_node", "uid" => $ node-> uid)) - > fetchField ();
if ($ existing_nid! = FALSE) {
return new TrustedRedirectResponse (& # 39; / mypage & # 39;);

this does not work,

thanks for your help

How to attach a multimedia element created during the migration to the multimedia field in node 7 -> 8

I'm migrating content from Drupal 7 to Drupal 8.
There is an audio field that I am currently moving to the media through a custom process during the migration.

When I get the ID of the new media created, it seems that I can not attach them to my new media reference field in the newly created node as well.

Can anyone tell me what is wrong with the import then?

plugin: sub_process
Source: field_audio_fileinfo
plugin: migration_lookup
method: process
source: fid
migration: upgrade_d7_file
plugin: my_custom_process
Destination: field_media_audio

In my custom process, I can save the media and get its ID through:

$ media_id = $ audio_media-> id ();
$ arr[] = array (
& # 39; target_id & # 39; => $ media_id,
& # 39; display & # 39; => NULL,
& # 39; description & # 39; => NULL
returns $ arr;

But it does not seem to fill the destination field.

This is also the case if I simply return the ID directly from the process.