ifconfig |grep inet
or
public class MapActivity extends AppCompatActivity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
// Download and set image of profile button. (async) | |
new DownloadButtonImageTask().execute( | |
new DownloadButtonImageTaskParams("https://images.unsplash.com/photo-1555436169-f998ad1259fd?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=634&q=80", |
import android.os.Bundle; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import com.google.android.material.bottomsheet.BottomSheetDialogFragment; | |
public class LocationPermissionBottomSheet extends BottomSheetDialogFragment { | |
@Override | |
public View onCreateView (LayoutInflater inflater, |
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" > | |
<item> | |
<shape> | |
<corners android:radius="10dp" /> | |
<solid android:color="#ffffff" /> | |
<stroke | |
android:dashGap="5dp" | |
android:dashWidth="5dp" | |
android:width="3dp" | |
android:color="#0000FF" /> |
$ sudo apt update | |
$ sudo apt install postgresql postgresql-contrib libpq-dev | |
$ sudo -u postgres createuser --interactive | |
> Enter name of role to add: yunus # Current OS Username | |
> Shall the new role be a superuser? (y/n) y | |
## This should work :) | |
## If any error comes up, the link at the bottom might help |
# Update and Upgrade System | |
sudo apt update | |
sudo apt upgrade | |
sudo apt dist-upgrade | |
# Install Tweaks (To enable dark mode and more) | |
sudo apt install software-properties-common | |
sudo add-apt-repository ppa:philip.scott/elementary-tweaks | |
sudo apt install elementary-tweaks |
public class QrActivity extends AppCompatActivity implements QRCodeReaderView.OnQRCodeReadListener { | |
private QRCodeReaderView qrCodeReaderView; | |
private static final int MY_CAMERA_REQUEST_CODE = 100; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_qr); | |
if (checkSelfPermission(Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) { |
public final class RxBus { | |
// String can be replaced with any kind of Object. | |
private static final BehaviorSubject<String> behaviorSubject | |
= BehaviorSubject.create(); | |
public static Disposable subscribe(@NonNull Consumer<String> action) { | |
return behaviorSubject.subscribe(action); | |
} | |
public static void publish(@NonNull String value) { |
<androidx.appcompat.widget.AppCompatEditText | |
android:background="@null" | |
android:inputType="none" | |
android:textIsSelectable="false" | |
android:cursorVisible="false" | |
android:focusable="false" | |
android:layout_width="200dp" | |
app:layout_constrainedWidth="true" | |
android:scrollHorizontally="true" | |
android:singleLine="true" |
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
package="com.example.example"> | |
<!-- ... --> | |
<application | |
<!-- ... --> > | |
<!-- ... --> |