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
using System; | |
using AutoMapper; // Install via NuGet | |
namespace AutomapperNested | |
{ | |
// Automapper demo to map simple source object into nested destination object. | |
class Program | |
{ | |
public static void Main(string[] args) |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Hello</title> | |
<!-- inject:css --> | |
<style> | |
body{color:blue} | |
</style> | |
<!-- endinject --> | |
</head> |
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
var gulp = require('gulp'); | |
var replace = require('gulp-replace'); | |
var fs = require('fs'); | |
function getCSSFilename(linkTag) { | |
var hrefValue = /href\=\"([A-Za-z0-9/._]*)\"/g; | |
var cssFilename = linkTag.match(hrefValue); | |
cssFilename = cssFilename[0].replace("href=\"", "").replace("\"", ""); | |
return cssFilename; | |
} |
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
<head> | |
<title>Hello</title> | |
<!-- inject:css --> | |
<link rel="stylesheet" href="/src/css/main.css"> | |
<!-- endinject --> | |
</head> |
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
var gulp = require('gulp'); | |
var inject = require('gulp-inject'); | |
gulp.task('add-styles', function () { | |
var target = gulp.src('./src/index.html'); | |
var sources = gulp.src(['./src/css/*.css'], {}); | |
return target.pipe(inject(sources)) | |
.pipe(gulp.dest('./dist')); | |
}); |
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
<head> | |
<title>Hello</title> | |
<!-- inject:css --> | |
<!-- endinject --> | |
</head> |
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
var gulp = require('gulp'); | |
var sass = require('gulp-sass'); | |
gulp.task('compile-sass', function() { | |
return gulp.src('./src/sass/*.scss') | |
.pipe(sass({outputStyle: 'compressed'})) | |
.pipe(gulp.dest('./src/css')); | |
}); |
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
var [coffeeChoices, setCoffeeChoices] = React.useState([]); | |
React.useEffect(() => { | |
async function fetchData() { | |
var _service = new CoffeeChoicesService(); | |
var x = await _service.getChoices(); | |
console.log(x[0].data); | |
setCoffeeChoices(x[0].data); | |
} | |
fetchData(); |
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
async updateChoice(choiceID, coffeeType) { | |
var latestChoices = null; | |
await getAllChoices.then(res => { | |
console.log("updateChoiceService getlatest", res[0].data); | |
latestChoices = res[0].data; | |
}); | |
console.log("updateChoiceService", choiceID, coffeeType, latestChoices); | |
await updateChoices(choiceID, latestChoices).then(res => { | |
console.log("create ok"); |
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
import { client, q } from '../config/db'; | |
var getAllChoices = client.query( | |
q.Paginate( | |
q.Match( | |
q.Ref('indexes/choices_index'))) | |
) | |
.then(response => { | |
const notesRefs = response.data | |
const getAllProductDataQuery = notesRefs.map((ref) => { |
NewerOlder