Oct 062016
 

En este caso haremos una variante, del suquet de peix, es decir, se cocina de la misma forma, a diferencia de la llandeta.

Ingredientes:
Ajo, aceite, sal, tomate, perejil, cebolla, pimentón dulce de la Vera, pan.

Pescado blanco: maira, brótula

Cortamos cebolla (en este caso roja), ajo y perejil, por otro lado rallamos tomate, y cortamos una rodaja de pan (duro a ser posible), batimos todo en la batidora.suquet de peix 2

 

 

y lo sofreimos en la sartén con aceite caliente.

suquet de peix 2

Una vez sofrito, se añade un vaso de agua y se mete el pescado.

suquet de peix 2

 Posted by at 3:52 pm
Oct 062016
 

lager at Bornitzstr 102Today at around 16h I received a call. Someone had notified Lager Mobilisation Group, that 122 people living in the Lager (a camp) at Bornitzstr 102 (Lichtenberg – Berlin) were going to be evicted from this Lager and transfer to another Lager at Köpenicker Allee 164. No reasons were argued, they would be just thrown out.

The day was Grey, rainy, unpleasant, cold. I live close by and I had a couple of hours, I prepared my phone, took an extra-charger, checked my Internet speed connection and then went to check what was going on.

As I was arriving at the lager, I saw a couple of police vans and a bus with the doors open, as waiting for people to get in.

police at lagerpolice at lager

The contact was a Syrian refugee, once I was at the door I called him. He came with a couple of friends, almost without introducing ourselves, they started telling me what was happening. There was unrest in their words, they talked almost non-stop, their faces were worried. It took me some minutes to react and try to put some order in my thoughts of what to do. My only thought, what can I do, I’m not a lawyer, I’m not in any making-decision position, so I can only try one thing to make the situation visible. So I took my note book, a pencil and my phone.

Everything started yesterday (05.10.2016) , 122 people were told to pack their things, since they would be transfered to a much better lager. They assured them that if they didn’t like it they could come back. The information given was almost none, the reasons of the transfer, unknown. On one side they were told that they could close part of the building and that then they were starting moving part of them. This contradicts the fact that today, 3 new families arrived to the Lager. The refugees asked for a paper that explained, that proof that it was an official decision and not an arbitrary decision made by the company running the lager, PeWoBe. An aside before continuing, PeWoBe had several times appeared in the press because of the denigrating behaviour they had towards refugees in the lagers. This coincides with what our friend also was telling us, about how the social workers that were good people and cared for them and helped them were fired, 2 had been fired in the last months, and there are rumors that the one left has been also fired, although he could not confirm it.

They continued telling me, that a couple of them had gone to check this new, fantastic new lager, where they were going to be transfered, to check if really it was that nice. The visit was terrifying, the lager at Köpenicker Allee 164, was crowded, more than 800 people are already living there, the toilets are outside the building, which means to freeze in winter, literally they told me, “It was shit!”. So once this small group returned, they decided that they would resist and they would not leave on the buses. Among the 122 people are mainly single men and women, although a couple of families will also be evicted and a pregnant woman with her child. All nationalities are mixed, they are from Syria, Iran, Albania, Afghanistan, Pakistan and some Africans. “We are numbers, for them we are just numbers”, that’s how they described the situation, since nobody clarified anything.

We were outside, but I asked them if I could go inside with them and see the situation. “No problem, just follow me”. Once we entered the building, there were several policemen.

policemen insideI’m not sure what were they doing there, we didn’t stop, just went in. Later they told me, that they had been talking with the policemen to explain, that the thing was that they didn’t know why were they moving them, that the other Lager was much worse and that they would not move. This friend said that the police was shocked with this, since they had also been told that it was to go to a better place, but that in any case, they were just doing their job ( — side comment — I guess that one’s mind and sense of justice doesn’t work on working hours).

Once inside,  everything is heartbreaking, aseptic walls, corridors, in one floor you could already see, rubbish bags full with personal belonging all over the place mixed with strollers and children’s toys.

They took me, what I guess is normally the dining room. It was full of people, maybe 50-60 people. “This peoplgroup of people at lagere are part of the people that have been thrown out, but we will resist, we won’t go“. “Can we start a protest right now?” they asked me, followed by “Can they evict us by force, can they use the force, is it legal?“. I tried to explain that what is legal is not necessarily what they do, we are seeing daily how the authorities skip legality with total impunity. People in this room where coming and going. “Today they didn’t give us food. We didn’t have anything to eat”, that is part of the threats that the management have been menacing them, what other things could they do, we don’t know, but one thing is clear people working at this Lager have threaten refugees, if they don’t leave the lager without complain.

The friend I was talking with said, he had been living there for 1 year and 2 months, most of them had been staying there long, there had not been conflicts, at most some small discussions. Five months ago, the management of the Lager said, they would do some renovations in floors 4th and 5th, to improve their living conditions, for this reason they were squashed in floors 2nd and 3rd. In every room there are between 6-8 people. They accepted this situation since they thought it would be temporary, now they realised it was a lie.  Many of them have already the status of refugee, but they are still in lagers under control of private companies, even if they are already under Job Center.

 

 

I had to go, so I left them, exchanging numbers to keep in touch and saying that I would explain what was going on, with the hope, that we, as people, can help each other and prevent their transfer to another lager.

Tomorrow Friday 07.10.2016, early in the morning police is expected to take them to the other lager, but maybe we can do something about it, right?

 

 

 

 

 Posted by at 3:50 pm
Oct 052016
 

Siguiendo con las recetas marineras de la Barceloneta, ahora diremos cómo hacer la Llandeta, otro guiso de pescado.

Recordamos los ingredientes, que en la receta anterior dijimos que serían genéricos.

Ingredientes:
Ajo, aceite, sal, tomate, perejil, pimentón dulce de la Vera

Pescado blanco: salmonetes

La principal diferencia entre el Suquet y la Llandeta, es la forma de cocinar el pescado.

En la Llandeta, el pescado, en este caso los salmonetes, se ponen directamente en la sartén con aceite caliente. Lo suyo es que los salmonetes sean pequeños y que todos estén bien apretaditos en la sartén.

llandeta

Recordamos que no se les dan la vuelta. Y la clave está en que encima se pondrá ell tomate (rallado previamente), el pimentón, el ajo (crudo) y el perejil.

llandeta

Una vez se parten verticalemente, sabremos que están hechos y listos para comer.

20160929_204413

 Posted by at 3:38 pm
Mar 312016
 

Well, time passes and that implies a technical update, so now starting the way to do some AngularJS 2.

I wanted to start easy and from a well known source, so I decided to check the resources on angular2 and since I said, easy, after checking getting the quick test with 5 min quickstart if angular.io, I’ve started with the case study and of course, there are some setting up problems.

events.js:141
[1] throw er; // Unhandled 'error' event
[1] ^
[1]
[1] Error: watch node_modules/lite-server/node_modules/browser-sync/node_modules/micromatch/node_modules/braces/node_modules/preserve/test.js ENOSPC
[1] at exports._errnoException (util.js:870:11)
[1] at FSWatcher.start (fs.js:1234:19)
[1] at Object.fs.watch (fs.js:1262:11)
[1] at createFsWatchInstance (/home/lala/repos/angular2-quickstart/node_modules/lite-server/node_modules/browser-sync/node_modules/chokidar/lib/nodefs-handler.js:37:15)
[1] at setFsWatchListener (/home/lala/repos/angular2-quickstart/node_modules/lite-server/node_modules/browser-sync/node_modules/chokidar/lib/nodefs-handler.js:80:15)
[1] at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/lala/repos/angular2-quickstart/node_modules/lite-server/node_modules/browser-sync/node_modules/chokidar/lib/nodefs-handler.js:228:14)
[1] at FSWatcher.NodeFsHandler._handleFile (/home/lala/repos/angular2-quickstart/node_modules/lite-server/node_modules/browser-sync/node_modules/chokidar/lib/nodefs-handler.js:255:21)
[1] at FSWatcher. (/home/lala/repos/angular2-quickstart/node_modules/lite-server/node_modules/browser-sync/node_modules/chokidar/lib/nodefs-handler.js:473:21)
[1] at FSReqWrap.oncomplete (fs.js:82:15)
[1]
[1] npm

I came across this thread, where it gives a solution for Ubuntu users, that at least works for me

echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

I cannot say that I understand it too much, except for something else that I read, that the system has a limit to how many files can be watched by a user, and seems that you run out of watches if Grunt is running with other programs, I’m not sure if is my case, but some sense makes.

May 162014
 

Some days ago, I wrote a post about how to export a Topicmap in Deepamehta. This functionality is part of the final goal of doing an Import/Export plugin.

In this post, I will explain how have I done the import Topicmap method, that I will probably change in the next days, but in any case, I’ll tell what have I done until now 🙂

Let’s see what do we need to actually import a Topicmap.

  1. Have a Topicmap file to import, obvious 😉
  2. Create a new Topicmap where we will place the topics and associations of our exported Topicmap
  3. Add the topics of our exported Topicmap to our new Topicmap
  4. Add the associations of our exported Topicmap to our new Topicmap

So let’s proceed

First, read the file where the exported Topicmap is. For the moment, and to do things step by step, I’ve hard coded the file that I want to import.

As I said in the previous post, I exported the Topicmap into a JSON file placed in runner directory, that is at the root of your DM instance. We are going to read the same file that was exported there.

File file = new File("topicmap-11216.json");
String json = JavaUtils.readTextFile(file);

Now we will define a JSON Object from the read file

JSONObject topicmap = new JSONObject(json);

So the exported file with the Topicmap we have it accessable in JSON format in the variable topicmap.

The next task was to have a new Topicmap, where we will add the topics and the associations from the exported Topicmap.

Topic importedTopicmap = topicmapsService.createTopicmap("Imported Topicmap","dm4.webclient.default_topicmap_renderer", null);

To create a new map we need topicmapService, so you need to import it, that means add it to the rest of the import at the top of the file.

import de.deepamehta.plugins.topicmaps.service.TopicmapsService;

Fine, let’s continue. Which one was our third task? To add the topics of our exported Topicmap to our new Topicmap.

We will first create an array with the topics by extracting the information from the JSON that we already have.

We will first take a look at our JSON file, to parse it and visualize it you can check jsonparser.org.

abriraqui_jsonparser

So you can see that we have 3 parent objects: assocs, info and topics.

We are focusing in the topics, so we can see that there are 4 topics that need to be imported, we will access to the topics by getting the array associated to the key “topics”.

JSONArray topicsArray = topicmap.getJSONArray("topics");

When importing topics, there is one important thing to have in mind.
The way to retrieve the associations between topics, is because we establish an association between 2 topics through the topicIc, something like, association1 relates topicId=12 with topicId 23. So we have to map the new topicIds with the exported topicIds

We know that we are adding new topics to a recently created Topicmap. The id of the new topic will be automatically generated and set, so we don’t have the option of setting the id of the new topic to be the same as the id of the topic exported. That means that we have to keep track of which new topicId corresponds to the exported topicId by creating a Hash.

We define the Hash to map topic Ids.

Map<Long, Long> mapTopicIds = new HashMap();

In order to get the topics we have to iterate through the topicsArray by doing (for example)

 for (int i = 0, size = topicsArray.length(); i < size; i++)
                {
}

By iterating we are going to get individual topics. If we take another look at the jsonparser, we can see that a topic is determined by an id, type_uri, uri, value, composite and view_props.


In each iteration we are going to get the content of all of these attributes.

 for (int i = 0, size = topicsArray.length(); i < size; i++)
                {
                    JSONObject topic =  topicsArray.getJSONObject(i);
                    TopicModel model = new TopicModel(topic);
                    CompositeValueModel viewProps =new CompositeValueModel(topic.getJSONObject("view_props"));

                    Topic newTopic =  dms.createTopic(model, null);

                    long topicId = newTopic.getId();
                    long origTopicId = topic.getLong("id");
                    mapTopicIds.put(origTopicId, topicId);
                    topicmapsService.addTopicToTopicmap(topicmapId, topicId, viewProps);

                }

To understand the loop, we’ll go line by line. By invoking getJSONObject(i) we will extract topic i.
On the other side we know that the createTopic method is provided by Deepamehta Servide (dms), where you need to pass a model and clientState. The clientState will be null.
The model we will be created by

TopicModel model = new TopicModel(topic);

so with a model and clientState we create the new Topic

Topic newTopic =  dms.createTopic(model, null);

We said that we have to keep the relation between new Topics id(newTopic.getId()) and exported Topics id(topic.getLong(“id”)), so we do that

long topicId = newTopic.getId();
long origTopicId = topic.getLong("id");
mapTopicIds.put(origTopicId, topicId);

In order to be able to add the new Topic to the new Topicmap, the topicmapService provides us with a couple of methods, the one we will choose is

addTopicToTopicmap(long topicmapId, long topicId, CompositeValueModel viewProps);

so before being able to add a Topic to a Topicmap, we need to get the CompositeValueModel, viewProps from the exported Topic.

 CompositeValueModel viewProps =new CompositeValueModel(topic.getJSONObject("view_props"));

Finally we can add the Topic with the info coming from the exportation to the new Topicmap

topicmapsService.addTopicToTopicmap(topicmapId, topicId, viewProps);

Wowww…now if you go to the webClient and click on import Topicmap, you will see how the topics appear in a new Topicmap :-))

And our last step was a”Add the associations of our exported Topicmap to our new Topicmap”

As with the topics we are going to extract the associations of the JSON file into an Array

JSONArray assocsArray = topicmap.getJSONArray("assocs");

We will iterate through the Array

 for (int i=0, size = assocsArray.length(); i< size; i++)
		{
}

Take a moment, to check in the jsonparser, that the elements that form an association are id, role1, role2, type_uri, uri, value and composite. Inside role1 and role2 is stored the reference to the topicId to the "two sides" of the association.

abriraqui_jsonparser_assocs

As with Topics, DeepaMehta Service provides us with a createAssociation method

Association newAssociation = dms.createAssociation(assocModel, null);

We can create a new Association Model by

AssociationModel assocModel = new AssociationModel(assocsArray.getJSONObject(i));

but the important thing is to actually associate the two topics "coming" from our export file. To track this association we have already built a Hash that maps the topicId from the exported file with the new topicId, now we are going to use that mapping. So we have to change the values created automatically when creating an AssociationModel and set them with the values of the exported Topicmap.

RoleModel role1 = assocModel.getRoleModel1();
role1.setPlayerId(mapTopicIds.get(role1.getPlayerId()));
                    
RoleModel role2 = assocModel.getRoleModel2();
role2.setPlayerId(mapTopicIds.get(role2.getPlayerId()));

So first, we get the RoleModel of the new association and we set the topicId(playerId is a general term that can be refered to a topicId or an associationId) to the value that was stored on our hash called mapTopicIds.

We are almost done 🙂 .. just one step missing, to add an Association to a Topicmap, the need the id of the new association, with that we are able to use the method provided by topicmapsService, AddAssociationToTopicmap to add our associations to our imported Topicmap 🙂

long assocId = newAssociation.getId()              topicmapsService.addAssociationToTopicmap(topicmapId, assocId);

So, if you go to the webClient and chose to Import a Topicmap, you'll see it directly on the screen, as an example the one that I have 🙂

abriraqui_imported_topicmap

 Posted by at 4:41 pm