Friday, 5 November 2021

How to display openweathermap weather icon

How to display openweathermap weather icon


 var iconurl = "http://openweathermap.org/img/w/" + iconcode + ".png";


http://openweathermap.org/img/w/10d.png

https://github.com/erikflowers/weather-icons

https://gist.github.com/tbranyen/62d974681dea8ee0caa1

Thursday, 4 November 2021

Arduino IDE can't find ESP8266 board

Arduino IDE can't find ESP8266 board


 When programming the NODEMCU card with the Arduino IDE, you need to customize it and you must have selected the correct card.

Open Arduino IDE and go to files and click on the preference in the Arduino IDE.

Add the following link to the Additional Manager URLS section: "http://arduino.esp8266.com/stable/package_esp8266com_index.json" and press the OK button.

Then click Tools> Board Manager. Type "ESP8266" in the text box to search and install the ESP8266 software for Arduino IDE.

You will be successful when you try to program again by selecting the NodeMCU card after these operations. I hope I could help.

Wednesday, 15 September 2021

Monday, 13 September 2021

Simulate the pressing of the "Command" key on a Mac

Simulate the pressing of the "Command" key on a Mac

n the Robot class, the name for Command(⌘) is KeyEvent.VK_META. Your code should look like this:

Robot r = new Robot();
r.keyPress(KeyEvent.VK_META); //press command
r.keyPress(KeyEvent.VK_L); //press l
r.keyRelease(KeyEvent.VK_META); //release command
r.keyRelease(KeyEvent.VK_L); //release l

This presses the Command key, presses the L key, then releases them both. I have tested this, and it works as it should.

NOTE: Using Robot throws AWTException, so it requires you to either surround with try-catch block, or throw AWTException in your method header