Skip to content

Instantly share code, notes, and snippets.

Venkata Sudharsan Reddy sudharsan203

Block or report user

Report or block sudharsan203

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
@sudharsan203
sudharsan203 / gist:07d17ec05aeeee8544a19610486f2c6f
Created Mar 29, 2019 — forked from niteshpsit1/gist:c90b3336ee639c89ae13b98825c9d9ca
Sorting an array order by frequency of occurence in javascript
View gist:07d17ec05aeeee8544a19610486f2c6f
/**
* Sorting an array order by frequency of occurence in javascript
* @param {array} array An array to sort
* @returns {array} array of item order by frequency
**/
function sortByFrequency(array) {
var frequency = {};
var sortAble = [];
var newArr = [];
@sudharsan203
sudharsan203 / email_dreamcode.js
Created Jul 18, 2019 — forked from gr2m/email_dreamcode.js
Imagine you could send emails with JavaScript, multipart, and with attachments?! How would the code look like? This is what I came up with. Forks & comments much appreciated! #nobackend #dreamcode
View email_dreamcode.js
// send text email
sendEmail({
subject: "Hello, World!",
text: "This mail has been sent from the frontend",
to: "joe@exam.pl"
})
// send multipart text / html email
sendEmail({
subject: "Hello, World!",
View angular-material-autocomplete-async-part2-component.html
<mat-autocomplete #auto="matAutocomplete" [displayWith]="displayFn">
<mat-option *ngIf="isLoading" class="is-loading"><mat-spinner diameter="50"></mat-spinner></mat-option>
<ng-container *ngIf="!isLoading">
<mat-option *ngFor="let user of filteredUsers" [value]="user">
<span>{{ user.name }}</span>
<small> | ID: {{user.id}}</small>
</mat-option>
</ng-container>
</mat-autocomplete>
You can’t perform that action at this time.