This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| August 15th 2022, 12:34:42.046 time="2022-08-15T12:34:42.046421428Z" level=warning msg="grpc: addrConn.createTransport failed to connect to {unix:///var/run/docker/containerd/containerd.sock <nil> 0 <nil>}. Err :connection error: desc = \"transport: Error while dialing dial unix:///var/run/docker/containerd/containerd.sock: timeout\". Reconnecting..." module=grpc docker | |
| August 15th 2022, 12:34:41.045 time="2022-08-15T12:34:41.045317266Z" level=info msg="stopping event stream following graceful shutdown" error="<nil>" module=libcontainerd namespace=moby docker | |
| August 15th 2022, 12:34:41.045 time="2022-08-15T12:34:41.045546124Z" level=info msg="stopping healthcheck following graceful shutdown" module=libcontainerd docker | |
| August 15th 2022, 12:34:41.045 time="2022-08-15T12:34:41.045529653Z" level=info msg="Daemon shutdown complete" docker | |
| August 15th 2022, 12:34:41.045 time="2022-08-15T12:34:41.045561321Z" level=info msg="stopping event stream following graceful shutdown" error="context canceled" module=libconta |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.io.BufferedReader; | |
| import java.io.InputStreamReader; | |
| import java.net.HttpURLConnection; | |
| import java.net.URL; | |
| import java.net.URLEncoder; | |
| import org.json.JSONArray; | |
| /** | |
| * @author Bruno Ferreira |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public void deleteOrUpdateActive() { | |
| Session session = getSessionFactory().openSession(); | |
| Transaction t = session.beginTransaction(); | |
| Store s = (Store) session.get(Store.class, 1); | |
| try { | |
| session.delete(s); | |
| t.commit(); | |
| } catch (ConstraintViolationException cException) { | |
| t.rollback(); | |
| t = session.beginTransaction(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Dijkstra | |
| # Each pair "A-B" represents a two way connection between the node A and the node B. | |
| # Example: | |
| # d = Dijkstra.new(["A-B","B-C","C-D","D-E","E-B"]) | |
| # d.getShortestPath("A","D") | |
| def initialize(connections) | |
| @graph = Hash.new | |
| for conn in connections |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #a bi-dimensional array as seen on http://stackoverflow.com/questions/9144822/how-to-declare-a-two-dimensional-array-in-ruby | |
| class SparseArray | |
| attr_reader :hash | |
| def initialize | |
| @hash = {} | |
| end | |
| def [](key) | |
| hash[key] ||= {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| begin | |
| for r in ( select table_name, constraint_name | |
| from user_constraints | |
| where constraint_type = 'R' ) | |
| loop | |
| execute immediate 'alter table '||r.table_name | |
| ||' drop constraint '||r.constraint_name; | |
| end loop; | |
| end loop; |