
The post 50 appeared first on Strictly Confidential.
source https://www.ways4.eu/blog/2021/04/02/50/?utm_source=rss&utm_medium=rss&utm_campaign=50
Music & More
The post 50 appeared first on Strictly Confidential.
source https://www.ways4.eu/blog/2021/04/02/50/?utm_source=rss&utm_medium=rss&utm_campaign=50
Oh,
Digital Paint created with ArtRage
The post Oh, appeared first on Strictly Confidential.
source https://www.ways4.eu/blog/2020/07/16/oh/?utm_source=rss&utm_medium=rss&utm_campaign=oh
Sketch of Vinyl record-player
Digital Paint created with ArtRage
The post Vinyl Heaven appeared first on Strictly Confidential.
sketch/study of Biker woman in Action.
Created digitally with ArtRage software
The post Sketch of Biker Woman appeared first on Strictly Confidential.
Sorry, this entry is only available in German.
The post (Deutsch) HowTo: Erstellen von kollaborativen Echtzeit-Aufgabenlisten in React appeared first on Strictly Confidential.
Sorry, this entry is only available in German.
The post (Deutsch) Mounting von React Lifecycle-Methoden appeared first on Strictly Confidential.
Sorry, this entry is only available in German.
The post (Deutsch) React Hooks besser anwenden appeared first on Strictly Confidential.
Ein React-Pattern, das im Coding von React Frontends Berücksichtigung finden sollte, ist das Container-Komponenten-Pattern.
Ein Container ruft Daten ab und rendert dann die entsprechende Unterkomponente. So simpel.
“Entsprechend” bedeutet eine Komponente mit demselben Namensbestandteil:
GuineaPigsContainer => GuineaPigs
AnimalsContainer => Animals
EventListContainer => EventList
Konzept verstanden ?
Angenommen, du hast eine Komponente, die Kommentare anzeigt. Da du noch nichts vom Container-Komponenten-Pattern gehört hast, platzierst du deinen Code so, dass alles an einem Ort ist:
class CommentList extends React.Component { this.state = { comments: [] }; componentDidMount() { fetchSomeComments(comments => this.setState({ comments: comments })); } render() { return ( <ul> {this.state.comments.map(c => ( <li>{c.body}—{c.author}</li> ))} </ul> ); } }
Deine Komponente ist sowohl für das Abrufen als auch für das Präsentieren von Daten verantwortlich. Daran ist nichts „Falsches“, aber einige Vorteile von React werden damit nicht nutzbar, zB:
CommentList kann nur unter genau den gleichen Umständen wiederverwendet werden.
Die Markup-Komponenten sollten die Erwartungen an die benötigten Daten angeben. PropTypes sind dafür optimal.
Unsere Komponente hat eine Erwartung an die Datenstruktur, kann diese jedoch nicht ausdrücken. Wenn sich der json-Endpunkt ändert, wird der Datenfluß zur Komponente unterbrochen (silent).
Lass uns zunächst den Datenabruf in eine Containerkomponente verlagern:
class CommentListContainer extends React.Component { state = { comments: [] }; componentDidMount() { fetchSomeComments(comments => this.setState({ comments: comments })); } render() { return <CommentList comments={this.state.comments} />; } }
Lass uns nun CommentList überarbeiten, um comments als prop zu verwenden:
const CommentList = props =>
<ul>
{props.comments.map(c => (
<li>{c.body}—{c.author}</li>
))}
</ul>
Tatsächlich eine ganze Menge….
Containerkomponenten können die Struktur und Lesbarkeit von React-Code erheblich verbessern und sie erleichtern das Lesen des Komponenten-Codes.
Probiere es aus !
The post Container Komponenten in React appeared first on Strictly Confidential.
Troubleshoot MQTT problem with the Raspberry PI:
MQTT server mosquitto on Raspberry Smarthome server does not start
The post New post on Raspberry, MQTT troubleshooting appeared first on Strictly Confidential.
source https://www.ways4.eu/blog/2019/12/16/new-post-on-raspberry-mqtt-troubleshooting/
After a few days of absence, I was unfortunately faced with some problems on my Raspberry smart home server.
Among other things, the Mosquitto MQTT server, which is supposed to receive and process messages from the various iot devices, was not available.
After analyzing the process overview with
ps -A | grep mosq
unfortunately no output was shown, i.e. the process had obviously not started.
The manual start with
sudo mosquitto
then led to success. The MQTT server was running and also receiving or processing all messages. Only the service to the Mosquitto caused problems.
After completing the manually started process, another attempt was made with
sudo systemctl start mosquitto.service
then start the service. The subsequent query with
sudo systemctl status mosquitto.service
initially provided a promising answer that the service had started successfully.
Unfortunately not quite successful, there is still no entry for mosquitto in the process overview, and the MQTT message processing did not work either.
After some troubleshooting, the problem was solved. The cause was an apparently corrupt mosquitto.db that is used by the mosquitto service to cache messages.
This problem can be easily solved by deleting the corresponding file in the directory / var / lib / mosquitto using:
sudo rm mosquitto.db
If then restarted with
sudo systemctl restart mosquitto.service
mosquitto works fine. The service is automatically restarted even after a reboot.
The post MQTT server mosquitto on Raspberry Smarthome server does not start appeared first on Strictly Confidential.
On Tripadvisor, the garden arbor of a reporter for the Vice magazine became London’s best restaurant. Oobah Butler, the name of the reporter, had planned it for a long time ago. The ingredients: a website, a logo, and exclusivity (no address, tables by appointment only). Butler uploaded softly drawn photos of his dishes, which he called “contemplation,” “desire,” and “love.” In fact, these consisted of shaving cream, colored toilet blocks and rinsing sponges. Ordered 5-star reviews from his friends made “The Shed at Dulwich” go up in the TripAdvisor rankings. After a few weeks, Butler’s gazebo was among the best 10,000 restaurants in the city, after three months at number 156. After six months, the arbor of the last (18 149) had climbed to first place – although a restaurant had never existed before and never had served a dish. “If I can turn my garden into London’s best restaurant, then almost anything is possible,” said Butler.
Davide Cerretini, the owner of the Italian restaurant “Botto Bistro” in Richmond, California, took the opposite route. He wanted to be the restaurant with the worst rating on Yelp. Cerretini spent about $ 250 a month advertising on the portal until he realized it did not do much. When he booked no more ads, 5-star ratings had disappeared, 1-star ratings would have increased, he recalled later. He felt bullied and wondered: What happens if I just reverse the power of the portal? He gave every guest who valued his restaurant a single star up to 50% off a pizza. More than 3000 1-star ratings came together like this. The idea arose: The Bistro became the worst restaurant on Yelp – and a viral hit. Cerretini said, “It takes great chefs, great talent, and a great experience to get a Michelin star, but getting a 1-star rating on Yelp requires a lot more.“
The post How rating platforms can be tricked 🙂 appeared first on Strictly Confidential.
source https://www.ways4.eu/blog/2019/10/31/howto-trick-rating-platforms/
Researchers have once again researched, and found out interesting things about the speed of speech in different languages. The report can be found here. (sorry, only german language available).
The post Why (among others) Italians talk so fast … appeared first on Strictly Confidential.
source https://www.ways4.eu/blog/2019/09/10/why-among-others-italians-talk-so-fast/