Quantcast
Channel: User Sergey Ponomarev - Stack Overflow
Browsing all 58 articles
Browse latest View live
↧

Answer by Sergey Ponomarev for How ETags are generated and configured?

Overview of typical algorithms used in webservers.Consider we have a file withSize 1047 i.e. 417 in hex.MTime i.e. last modification on Mon, 06 Jan 2020 12:54:56 GMT whichis 1578315296 seconds in unix...

View Article


Answer by Sergey Ponomarev for Format a float to n decimal places and no...

We must trim those zeros ourselves. We can use TrimRight(priceStr, "0."), but I've written a faster trimmer:func formatPrice(price float32) string { // truncate to 3 digits after point priceStr :=...

View Article


Answer by Sergey Ponomarev for awscli-local error: cannot import name...

In my case in Ubuntu I had installed the awscli with apt. I removed it and installed with pip instead and it worked:sudo apt remove awsclipip install awscli

View Article

Answer by Sergey Ponomarev for Golang: tests and working directory

Here is function to find a root project directory that contains .git folder:import ("os""path/filepath")func FindProjectDir() string { // Test can be started from command line in project folder or in...

View Article

Answer by Sergey Ponomarev for Block access with https ipaddress on nginx

You may try to add a regexp by Host that will drop IPs and require domains:server { listen 80; # skip raw IP as host e.g. require at least one letter (same for Punycode) if ( $http_host !~*...

View Article


Answer by Sergey Ponomarev for There is a similar function json_merge_patch()...

For the JSONB fields you can use the concatenation operation ||.Here is a sample that I made to make an upsert with merging of field:INSERT INTO table_name (id, title, po_document)VALUES ($1, $2,...

View Article

Comment by Sergey Ponomarev on install4j-runtime 10.0.8 dependency is not...

It would be really great if you can upload the jar to Maven Central

View Article

Comment by Sergey Ponomarev on Why rsync uses mkdir without p option

Does anyone created this as a feature request (or even bug)? This is clearly unexpected and bad behavior.

View Article


Answer by Sergey Ponomarev for Format a float to n decimal places without...

We must trim those zeros ourselves. We can use TrimRight(priceStr, "0."), but I've written a faster trimmer:func formatPrice(price float32) string { // truncate to 3 digits after point priceStr :=...

View Article


Answer by Sergey Ponomarev for In my python code I Cant Connect to an...

You need to enable logging of a connection error. With high chances there is required TLS by default but your server (local?) doesn't have the TLS enabled.Check the slixmpp.connect()...

View Article

Answer by Sergey Ponomarev for How to make xmpp request on port 443 or 80?

You need to use BOSH i.e. XMPP over WebSockets

View Article

Comment by Sergey Ponomarev on SSH Tunnel MySQL Connection with...

FYI: You may forward remote UNIX socket to a local port like: ssh -N -L 127.0.0.1:5000:/var/run/mysqld/mysqld.sock sshuser@remotehost Then you connect a mysql client to the local IP 127.0.0.1 and port...

View Article

Answer by Sergey Ponomarev for Adjust width and height of iframe to fit with...

If you can control both IFRAME content and parent window then you need the Iframe-Resizer.This library enables the automatic resizing of the height and width of both same and cross domain iFrames to...

View Article


Answer by Sergey Ponomarev for How to get deb package from Java gradle...

You can use the plain debian folder with debuild command.As a quick start to create the debian folder you can use the debmake that will add all basic files:debmake -u 1.0.0 -nThen edit those files...

View Article

Comment by Sergey Ponomarev on Hiding manifest entries with maven

This must be accepted as an answer. But the option was added in the recent version of the maven-jar-plugin so you may need to upgrade it first

View Article


Answer by Sergey Ponomarev for How to configure http_upload error for prosody

The Prosody now has a new module mod_http_file_share instead of the mod_http_upload.So check it's docs.

View Article

Comment by Sergey Ponomarev on Wrong encoding after activating resource...

FYI: Starting from Maven 4 the sourceEncoding is UTF-8 by default

View Article


Comment by Sergey Ponomarev on Getting Java version at runtime

I have JRE version 23-ea so this parsing fails. Use Runtime.version() instead

View Article
Browsing all 58 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>