Сообщения

SOAP, wildfly

echo server:
cat fifo | netcat -k -l 8082 -v | cat > fifo
watch -n1 cat fifo
./standalone.sh -c standalone-osgi.xml

remote deploy watch: watch -n1 ls -lah standalone/deployments/

сказ о том, как я kafka и Spring поднимал и тестил

kafka:
по мотивам: https://dzone.com/articles/running-apache-kafka-on-windows-os

server.properties:
кто бы мог подумать что ему не все равно - log.dirs=C:/soft/kafka_2.12-0.10.2.0/tmp/logs так работает а так нет log.dirs=C:\soft\kafka_2.12-0.10.2.0\tmp\logs

C:\soft\kafka_2.12-0.10.2.0\bin\windows>kafka-topics.bat --delete --topic s1p.to
pic --zookeeper localhost:2181
Topic s1p.topic is already marked for deletion.

kafka-topics --list --zookeeper localhost:2181
s1p.topic - marked for deletion

но когда это фактически случится никто не знает..... и это настораживает!

тут надо что - а тут надо копать! Иван Федрыч КАПАЙ делает работу)!
src: https://zookeeper.apache.org/doc/trunk/zookeeperStarted.html#sc_ConnectingToZooKeeper


zkCli -server localhost:2181

rmr /brokers/

spring-integration-kafka:
src: https://www.youtube.com/watch?v=wo-aZ3ITLYU&t=2700s
https://github.com/SpringOnePlatform2016/grussell-spring-kafka

zkServer

kafka-server-start ..\..\config\server.properties
src: http://stack…

OOP Java

static and super keyword
          super.static can't because:

          Overriding depends on having an instance of a class. The point of polymorphism is that you can subclass a class and the objects implementing those subclasses will have different behaviors for the same methods defined in the superclass (and overridden in the subclasses). A static method is not associated with any instance of a class so the concept is not applicable.

There were two considerations driving Java's design that impacted this. One was a concern with performance: there had been a lot of criticism of Smalltalk about it being too slow (garbage collection and polymorphic calls being part of that) and Java's creators were determined to avoid that. Another was the decision that the target audience for Java was C++ developers. Making static methods work the way they do had the benefit of familiarity for C++ programmers and was also very fast, because there's no need to wait until runtime to fig…

java singleton implementations

https://habrahabr.ru/post/129494/

для объектным ссылок volatile можно не писать. я прав?
Например, когда мы в многопоточном приложении используем паттерн Синглтон в котором применяем синхронизацию и хотим чтобы синхронизация осуществлялась только один раз при инициализации объекта, а не каждый раз, когда мы вызываем getInstance(), тогда модификатора volatile используем для объектной ссылки:
public class Singleton {
    private static volatile Singleton instance;
    private Singleton(){
    }
    public static Singleton getInstance() {
        if (instance == null) {
            synchronized(Singleton.class) {
                if (instance == null)
                    instance = new Singleton();
            }
        }
        return instance;
    }
}

volatile это сурово

DCL https://web.archive.org/web/20121108114236/http://habrahabr.ru/post/143390/



php stuff

foreach по ссылке:
foreach ($books as &$book) {$captured = ($book->captured_id !== NULL) ? $book->captured : FALSE;$title = $book->title;$book = array(// "url" => $book->url,"image" => ($captured === FALSE) ? '' : $this->getImage($captured->image),"order" => $book->num_order);}return $books;


cmd Windows

clsclear terminal

PHP optimization

src: http://us3.php.net/manual/en/function.include.php
If you're doing a lot of dynamic/computed includes (>100, say), then you may well want to know this performance comparison: if the target file doesn't exist, then an @include() is *ten* *times* *slower* than prefixing it with a file_exists() check. (This will be important if the file will only occasionally exist - e.g. a dev environment has it, but a prod one doesn't.)

---------------------------------------------------