hard mistakes - please write a commentsome mistakesokgoodvery good
Loading ... Loading ...

The REST Web service Architur – an overview with PHP

If you want to build a Web service today, you no longer get around REST. As a quasi standard it meets the needs of a modern interface best, In contrast to the alternatives from the past gray: RPC, DCOM, CORBA, RMI and SOAP.

Why use REST?

1. Loose coupling

REST interfaces can be exchanged in theory.

2. Interoperabilitaet

REST over HTTP is available and very easy to talk to as opposed to the more complex approaches such as SOAP and CORBA in any environment.

3. Performance and scalability

Many requests from the cache can be answered through the State unemployment and successive requests must be answered by the same system (Scalability)

Basic principles of REST more…

hard mistakes - please write a commentsome mistakesokgoodvery good
Loading ... Loading ...

MS Excel: Error when compiling project or library not found

The error message “Error when compiling project or library not found” I had today, She was at one point, to the a variable not previously with Dim were been initialized. There stopped running when my Excel for MAC with the error message:

Fehler beim Kompilieren Projekt oder Bibliothek nicht gefunden

The cause was actually, that a Windows Library was not available, After the reference was removed, everything went back.

Visual Basic Editor-> Extras-> References

There, remove the tick with “DOES NOT EXIST”:

Bildschirmfoto 2017-09-18 um 14.47.13

 

hard mistakes - please write a commentsome mistakesokgoodvery good
Loading ... Loading ...

Project: Elasticsearch for XT commerce shop search

The last project was very exciting, It was an extension of the PHP shop system called XT-commerce or. of the derivative SEO-Commerce to search current standards for Zeedee Berlin.

Elasticsearch was on an own Amatzon MWS EC2 instance hosted with 1 GB RAM and 1 CPU (very inexpensive).

The following functionality can be turned off all over again in a central location, If there are problems with Elasticsearch and the old MySQL search back in force.

1. AutoComplete / Suggest function when filling the search

When typing the keyword already suggestions are given in the millisecond range. This way the customer can save much time and also helped with the spelling. suggest_zeedee

more…

hard mistakes - please write a commentsome mistakesokgoodvery good
Loading ... Loading ...

Raspberry Pi SD card holder broken – 10 seconds fast repair

 

IMG_5496

The problem: the sd card holder stopped working

When your Raspberry Pi 2 is does not hold the integrated sd-card anymore, than your one of many people who face the same problem.

I have found an easy way to repair the sd card holder without fire and iron and explosions:

You can use an elastci strap and you will only loose 2 of your 4 USB-slots with this method.

 

A small and strong elastic strap can hold the sd cartd in the sd card slot and fixes the problem easily and smooth.

IMG_5497

an elstic strap helps to hold the sd card in the slot

 

The Result

Your Raspberry Pi works again without any problems.

IMG_5495

you will loose 2 usb slots but 2 other ones are waiting for you

IMG_5494

works like a charme

Alternative repair

If you want to repair your sd-card slot like a pro, you should watch this youtube video:

Last alternative

Buy a new Raspberry 3 model:

hard mistakes - please write a commentsome mistakesokgoodvery good
Loading ... Loading ...

Elasticsearch 5 Cluster with docker example

With the docker-compose.yml can be quickly built up a container-based environment with docker. The memory values for the Java VM are customizable (512MB) and for the docker image (1GB).

Cluster with 2 Nodes to operate, can see the elasticsearch2 comment out.

version: '2'
services:
  elasticsearch1:
    image: docker.elastic.co/elasticsearch/elasticsearch:5.4.1
    container_name: elasticsearch1
    environment:
      - cluster.name=docker-cluster
      - bootstrap.memory_lock=true
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
    ulimits:
      memlock:
        soft: -1
        hard: -1
    mem_limit: 1g
    volumes:
      - esdata1:/usr/share/elasticsearch/data
    ports:
      - 9200:9200
    networks:
      - esnet
#  elasticsearch2:
#    image: docker.elastic.co/elasticsearch/elasticsearch:5.4.1
#    environment:
#      - cluster.name=docker-cluster
#      - bootstrap.memory_lock=true
#      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
#      - "discovery.zen.ping.unicast.hosts=elasticsearch1"
#    ulimits:
#      memlock:
#        soft: -1
#        hard: -1
#    mem_limit: 1g
#    volumes:
#      - esdata2:/usr/share/elasticsearch/data
#    networks:
#      - esnet

volumes:
  esdata1:
    driver: local
#  esdata2:
#    driver: local

networks:
  esnet:
hard mistakes - please write a commentsome mistakesokgoodvery good
Loading ... Loading ...

Outside of localhost server making it available Elasticsearch

Instance to the outside via HTTP to make available an Elasticsearch, do you do the following:

1. To the outside make the server available, Amazon AWS z.B. through the configure a security group

2. Change the elasticsearch.yml ( /etc/elasticsearch/elasticsearch.yml):

# ---------------------------------- Network -----------------------------------
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#
network.host: 172.44.11.222

3. The Elasticsearch service restart:

sudo service elasticsearch restart

4. Then you can query the status from the outside to look, If everything worked:

curl -XGET '172.44.11.222:9200/_cluster/health?pretty'

Response:

{
  "cluster_name" : "elasticsearch",
  "status" : "green",
  "timed_out" : false,
  "number_of_nodes" : 1,
  "number_of_data_nodes" : 1,
  "active_primary_shards" : 0,
  "active_shards" : 0,
  "relocating_shards" : 0,
  "initializing_shards" : 0,
  "unassigned_shards" : 0,
  "delayed_unassigned_shards" : 0,
  "number_of_pending_tasks" : 0,
  "number_of_in_flight_fetch" : 0,
  "task_max_waiting_in_queue_millis" : 0,
  "active_shards_percent_as_number" : 100.0
}
hard mistakes - please write a commentsome mistakesokgoodvery good
Loading ... Loading ...

Amazon automatic price adjustment tool

I developed a tool just for a customer, with the one the prices of own goods at Amazon can automatically adapt. In the competition to Goth are determined analyzes reliability and therefore a fair price condition of the product and seller for the goods. There are all the data, about the API are available for the determination of price with used, as e.g.. Seller feedback (Reviews of the dealer), whether Amazon itself sent, Shipping time and much more.

The tool compares the rates between the various Amazon optional platforms in Europe (DE, UK, IT, IT, FR) Platforms but also outside Europe, like Japan or America and händelt the different currencies.

The result can be sent directly to Amazon via the API and the prices will be immediately updated.

Amazon Preisanpassung

Screenshot Preisanpassungs Tool

 

The application is in PHP with symfony 3 written and has a front end with Twitter bootstrap 3 and a MySQL database. There's also a vagrant environment for developing with PHP7. 1 and nginx. Be carried out can the whole thing with a simple XAMPP environment or vagrant virtual box at the customer locally on a PC.

If you are also interested in such a tool, allows you to Contact.

hard mistakes - please write a commentsome mistakesokgoodvery good
Loading ... Loading ...

Amazon MWS PHP: Compile Error: Redefinition of parameter $quotaMax

The Amazon MWS library has rightly issues in PHP7. 1 with the file: /MarketplaceWebServiceProducts/model /.ResponseHeaderMetadata.php (line 31)

Previously:

class MarketplaceWebServiceProducts_Model_ResponseHeaderMetadata {

...

  public function __construct($requestId = null, $responseContext = null, $timestamp = null,
                              $quotaMax = null, $quotaMax = null, $quotaResetsAt = null) {
    $this->metadata[self::REQUEST_ID] = $requestId;
    $this->metadata[self::RESPONSE_CONTEXT] = $responseContext;
    $this->metadata[self::TIMESTAMP] = $timestamp;
    $this->metadata[self::QUOTA_MAX] = $quotaMax;
    $this->metadata[self::QUOTA_REMAINING] = $quotaMax;
    $this->metadata[self::QUOTA_RESETS_AT] = $quotaResetsAt;
  }

After the fix:

public function __construct($requestId = null, $responseContext = null, $timestamp = null,
                            $quotaMax = null, $quotaMaxRemain = null, $quotaResetsAt = null) {
  $this->metadata[self::REQUEST_ID] = $requestId;
  $this->metadata[self::RESPONSE_CONTEXT] = $responseContext;
  $this->metadata[self::TIMESTAMP] = $timestamp;
  $this->metadata[self::QUOTA_MAX] = $quotaMax;
  $this->metadata[self::QUOTA_REMAINING] = $quotaMaxRemain;
  $this->metadata[self::QUOTA_RESETS_AT] = $quotaResetsAt;
}

Reason is, dass die Variable $quotaMax doppelt benutzt wird in der Kontrultor Definition.

 

hard mistakes - please write a commentsome mistakesokgoodvery good
Loading ... Loading ...
hard mistakes - please write a commentsome mistakesokgoodvery good
Loading ... Loading ...

Linux compare files within a folder for file changes

With the diffYou can easily find out command in Linux, What differences are there in two seemingly dusts folders.

An example would be z.B. 2 Projects to compare and find out the differences in the code.

#Ausgabe auf der Console stdout
diff -qr \
--exclude="css" \
--exclude="tmp" \
/myMaster/folder /mySlave/folder


#Pipen der Ausgabe in eine Datei oder less:
diff -ur \
--exclude="css" \
--exclude="tmp" \
/myMaster/folder /mySlave/folder | /tmp/diff.txt