Skip to content

Instantly share code, notes, and snippets.

View musti2304's full-sized avatar

Mustafa Yousef musti2304

  • innovas GmbH
  • Bonn
View GitHub Profile
@Entity
public class Parent implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
@OneToMany(mappedBy = "parent", cascade = CascadeType.ALL, orphanRemoval = true)
private Set<Child> children = new HashSet<>();
...
@emil2k
emil2k / Connectivity.java
Last active December 22, 2023 06:03
Android utility class for checking device's network connectivity and speed.
/*
* Copyright (c) 2017 Emil Davtyan
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions: