git remote add upstream https://the-git-repo-url.com/whoseever/whatever.git
git fetch upstream
| package blah.blah.blah; | |
| import static org.junit.Assert.assertTrue; | |
| import static org.mockito.Matchers.anyInt; | |
| import static org.mockito.Mockito.when; | |
| import org.junit.Before; | |
| import org.junit.Test; | |
| import org.junit.runner.RunWith; | |
| import org.mockito.Matchers; |
| public void getDashboardProfileImage(HttpServletRequest servletRequest, | |
| @RequestParam(value = "username") final String username, HttpServletResponse response) { | |
| try { | |
| String theUsername = URLDecoder.decode(username, "UTF-8"); | |
| ProfileImageDetailsDto profileImageDetailsResponse = new ProfileImageDetailsDto(); | |
| profileImageDetailsResponse = profileImageDetailsService.getProfileImage(theUsername); | |
| // retrieve mime type of the image | |
| String mimeType = FormatUtils.retrieveMimeTypeBytes(profileImageDetailsResponse.getProfileImage()); | |
| IOUtils.write(profileImageDetailsResponse.getProfileImage(), response.getOutputStream()); | |
| response.flushBuffer(); |
| # Built application files | |
| *.apk | |
| *.ap_ | |
| # Files for the Dalvik VM | |
| *.dex | |
| # Java class files | |
| *.class |
git remote add upstream https://the-git-repo-url.com/whoseever/whatever.git
git fetch upstream
Deleting the last commit is the easiest case. Let's say we have a remote origin with branch master that currently points to commit dd61ab32. We want to remove the top commit. Translated to git terminology, we want to force the master branch of the origin remote repository to the parent of dd61ab32:
git push origin +dd61ab32^:master
| -- Declare `@SummaryOfChanges` as variable table, disappear when DB connection session end. | |
| -- Use for storing changes which persisted by transaction. | |
| DECLARE @SummaryOfChanges TABLE(Change VARCHAR(20), id VARCHAR(5), date VARCHAR(8), val INT ); | |
| -- Target table is the initial resource of values comparison and changing target of decision of `ON` clauses. | |
| MERGE dbo.[T_target_table] AS T | |
| -- Source value is the input of ours, e.g. input from `user`, `form`, `service`. | |
| USING (VALUES ('97', '2018-03-01')) AS S (src_id, src_date) | |
| -- Condition to find out the fact of data, result of comparison will use for action decision. | |
| ON T.id = S.src_id AND T.date = S.src_date |
| FROM php:8.4-fpm-bookworm | |
| WORKDIR /application | |
| ENV ACCEPT_EULA=Y | |
| # Fix debconf warnings upon build | |
| ARG DEBIAN_FRONTEND=noninteractive | |
| ARG DEBIAN_VERSION | |
| # LEGACY packages that ever installed when last time research of PHP 7.4, |
| private Map<String, String> getCookies(String cookieHeader) { | |
| return Arrays.stream(cookieHeader.split(";")) | |
| .map(String::trim) | |
| .collect(Collectors.toMap(e -> e.split("=")[0], e -> e.split("=")[1])); | |
| } |