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
/* Method called from the UI */ | |
getImage(imageUrl: string) { | |
this.getBase64ImageFromURL(imageUrl).subscribe((base64Data: string) => { | |
this.base64TrimmedURL = base64Data; | |
this.createBlobImageFileAndShow(); | |
}); | |
} | |
/* Method to fetch image from Url */ | |
getBase64ImageFromURL(url: string): Observable<string> { |
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
/**Method that will create Blob and show in new window */ | |
createBlobImageFileAndShow(): void { | |
this.dataURItoBlob(this.base64TrimmedURL).subscribe((blob: Blob) => { | |
const imageBlob: Blob = blob; | |
const imageName: string = this.generateName(); | |
const imageFile: File = new File([imageBlob], imageName, { | |
type: "image/jpeg" | |
}); | |
this.generatedImage = window.URL.createObjectURL(imageFile); | |
window.open(this.generatedImage); |
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
package dehaze.mvp.service.dto.awstranscribe; | |
import java.io.Serializable; | |
import java.util.Objects; | |
public class TranscriptionResponseDTO implements Serializable { | |
private static final long serialVersionUID = 1L; | |
private String jobName; |
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
/***** Step 1 Imports *********/ | |
import com.amazonaws.SdkClientException; | |
import com.amazonaws.auth.AWSStaticCredentialsProvider; | |
import com.amazonaws.auth.BasicAWSCredentials; | |
import com.amazonaws.client.builder.AwsClientBuilder.EndpointConfiguration; | |
import com.amazonaws.services.comprehend.AmazonComprehend; | |
import com.amazonaws.services.comprehend.AmazonComprehendClientBuilder; | |
import com.amazonaws.services.comprehend.model.DetectEntitiesRequest; | |
import com.amazonaws.services.comprehend.model.DetectEntitiesResult; |
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
/********** Step 1 ********************** | |
*********** File Imports ***************/ | |
import com.amazonaws.services.transcribe.AmazonTranscribe; | |
import com.amazonaws.services.transcribe.AmazonTranscribeClientBuilder; | |
import com.amazonaws.services.transcribe.model.DeleteTranscriptionJobRequest; | |
import com.amazonaws.services.transcribe.model.GetTranscriptionJobRequest; | |
import com.amazonaws.services.transcribe.model.GetTranscriptionJobResult; | |
import com.amazonaws.services.transcribe.model.LanguageCode; | |
import com.amazonaws.services.transcribe.model.Media; | |
import com.amazonaws.services.transcribe.model.StartTranscriptionJobRequest; |
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 Map<String, String> getKeyValueRelationShipByBlocks(List<Block> blocks) { | |
Map<String, Map<String, Block>> keyValueBlockMap = getKeyValueBlockMap(blocks); | |
getKeyValueRelationShip(keyValueBlockMap); | |
return null; | |
} | |
Block findValueBlock(Block keyBlock, Map<String, Block> valueMap) { | |
log.debug("Find value Block "); | |
Block valueBlock = null; |
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
//Imports for packages used | |
import com.amazonaws.auth.AWSStaticCredentialsProvider; | |
import com.amazonaws.auth.BasicAWSCredentials; | |
import com.amazonaws.client.builder.AwsClientBuilder.EndpointConfiguration; | |
import com.amazonaws.services.textract.AmazonTextract; | |
import com.amazonaws.services.textract.AmazonTextractClientBuilder; | |
import com.amazonaws.services.textract.model.AnalyzeDocumentRequest; | |
import com.amazonaws.services.textract.model.AnalyzeDocumentResult; | |
import com.amazonaws.services.textract.model.Document; | |
import com.amazonaws.services.textract.model.S3Object; |
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
<div> | |
<h2 id="tracker-page-heading">Real-time user activities</h2> | |
<div class="table-responsive"> | |
<table class="table table-striped"> | |
<thead> | |
<tr> | |
<th>User</th> | |
<th>IP Address</th> | |
<th>Current page</th> | |
<th>Time</th> |
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 { Component, OnInit, OnDestroy } from '@angular/core'; | |
import { JhiTrackerService } from 'app/core'; | |
@Component({ | |
selector: 'jhi-tracker', | |
templateUrl: './tracker.component.html' | |
}) | |
export class JhiTrackerComponent implements OnInit, OnDestroy { |
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
package com.tekraze.kafka.web.websocket.dto; | |
import java.time.Instant; | |
/** | |
* DTO for storing a user's activity. | |
*/ | |
public class ActivityDTO { | |
private String sessionId; |