- Distributed Version Control System.
- Working Directory.
- Staging Area.
- Local Repository.
- Remote Repository.
- Origin.
- Upstream.
This file contains 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
#!/usr/bin/env bash | |
## Author: Abidán Brito | |
## This script builds GNU Emacs 29.1 with support for native elisp compilation, | |
## tree-sitter, libjansson (C JSON library), pure GTK and mailutils. | |
# Exit on error and print out commands before executing them. | |
set -euxo pipefail | |
# Let's set the number of jobs to something reasonable; keep 2 cores |
This file contains 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
# Install minimal prerequisites (Ubuntu 18.04 as reference) | |
sudo apt update && sudo apt install -y cmake g++ wget unzip | |
# Download and unpack sources | |
wget -O opencv.zip https://github.com/opencv/opencv/archive/4.x.zip | |
unzip opencv.zip | |
# Create build directory | |
mkdir -p build && cd build |
This file contains 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
StringBuilder jsonData = new StringBuilder(); | |
jsonData.Append("["); | |
for (int i = 0; i < dt.Rows.Count; ++i) | |
{ | |
jsonData.Append("{"); | |
jsonData.Append("\"" + "DNI" + "\":" + "\"" + dt.Rows[i][0] + "\"" + "," + "\"" + "Name" + "\":" + "\"" + dt.Rows[i][1] + "\"" + ","); | |
jsonData.Append("\"" + "Telephone" + "\":" + "\"" + dt.Rows[i][2] + "\"" + "," + "\"" + "Observations" + "\":" + "\"" + dt.Rows[i][3] + "\""); | |
if (i == dt.Rows.Count - 1) { jsonData.Append("}"); } | |
else { jsonData.Append("},"); } |
This file contains 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
///////////////////////////////////// | |
// APPROACH #1 | |
///////////////////////////////////// | |
// In the Fragment | |
val textView: TextView = activity!!.findViewById(R.id.custom_toolbar_title) as TextView | |
viewModel.fragmentName.observe(viewLifecycleOwner, { | |
textView.text = it | |
}) | |
///////////////////////////////////// |
I sometimes run into issues when setting up a local repo because of the new main
default branch name on GitHub. Let's rename the local branch and set its upstream
properly.
git branch -m master main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a
NOTE: git remote set-head origin -a
fetches and sets origin/HEAD, so that the local repository has a local reference
of what the remote repository considers to be the default branch
.