Skip to content

Instantly share code, notes, and snippets.

ImHimanShoe

Block or report user

Report or block ImHimanShoe

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ImHimanShoe
ImHimanShoe / time-left.pipe.ts
Created May 24, 2019
this pipe calculate the time left or time after expire in terms of second, day month etc like 2hour 20 minute ago
View time-left.pipe.ts
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'timeDiff'
})
export class TimeDiffPipe implements PipeTransform {
transform(value: any, args?: any): any {
if (value) {
View app.component.ts
import { forkJoin, Observable } from 'rxjs';
import {subjectServices} from './subjectServices.ts'
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
constructor(private SubjectServices : subjectServices){
}
View subjectServices.ts
import { Observable, of, Subject} from 'rxjs';
import { first } from 'rxjs/operators';
export class subjectServices : : Observable<any>{
observableOne() : Observable<any>{
let subjectone = new Subject<any>();
let subjectOneObserver = subjectOne.asObservable();
return subjectOneObserver.pipe(first());
}
View VocabBuilder_.idea_VocabBuilder.iml
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="TestRunnerService">
<option name="PROJECT_TEST_RUNNER" value="Unittests" />
</component>
View VocabBuilder_.idea_VocabBuilder.iml
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="TestRunnerService">
<option name="PROJECT_TEST_RUNNER" value="Unittests" />
</component>
View first project_.idea_first project.iml
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
You can’t perform that action at this time.