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
sap.ui.define([ | |
"sap/ui/core/mvc/Controller", | |
"sap/ui/model/json/JSONModel", | |
], function (Controller, JSONModel) { | |
"use strict"; | |
return Controller.extend("simple-app.controller.View1", { | |
onAfterRendering: function () { | |
var colorPickerId = this.byId("colorPicker").sId; |
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
$(function (window) { | |
window.onFilterMenuInit = function (e) { | |
// Create custom filtering for the "url" columns only. | |
if (e.field === "url") { | |
initUrlFilter(e, this); | |
} | |
}; |
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
<?php //functions.php | |
add_filter('metaslider_flex_slider_parameters', 'metaslider_flex_params', 10, 3); | |
function metaslider_flex_params($options, $slider_id, $settings) | |
{ | |
$options['after'][] = "onHomePageSlideChanged(slider);"; | |
return $options; | |
} |
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
<div id="example"> | |
<div> | |
<h4>Choose products</h4> | |
<select id="products" style="width: 100%;"></select> | |
</div> | |
<script> | |
$(document).ready(function () { |
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
'use strict'; | |
module.exports = function(grunt) { | |
grunt.initConfig({ | |
connect: { | |
options: { | |
port: 8080, | |
hostname: '*' |
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
public class BankAccount | |
{ | |
public string Id { get; } | |
public Money Balance { get; private set; } | |
public BankAccount(string id, Money balance) | |
{ | |
if(string.IsNullOrEmpty(id)) | |
{ |
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
public class BankAccount | |
{ | |
public string Id { get; set; } | |
public decimal Balance { get; set } | |
public string Currency { get; set; } | |
} |
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 (var context = new CompanyContext()) | |
{ | |
var company = new Company(Guid.NewGuid(), "My Company"); | |
company.AssignAddress(new CompanyAddress("Sofia", "Mladost 4")); | |
company.AssignAddress(new CompanyAddress("Plovdiv", "blvd. Bulgaria 105")); | |
context.Companies.Add(company); | |
context.SaveChanges(); | |
} |
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
protected override void OnModelCreating(ModelBuilder modelBuilder) | |
{ | |
modelBuilder.Entity<Company>().OwnsMany<CompanyAddress>("Addresses", a => | |
{ | |
a.HasForeignKey("CompanyId"); | |
a.Property(ca => ca.City); | |
a.Property(ca => ca.AddressLine1); | |
a.HasKey("CompanyId", "City", "AddressLine1"); | |
}); | |
} |
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
public class Company | |
{ | |
private List<CompanyAddress> addresses = new List<CompanyAddress>(); | |
public Company(Guid id, string name) | |
{ | |
Assertions.AssertNotNullAndNotEmpty(name, "Must provide name"); | |
this.Id = id; | |
this.Name = name; | |
} |
NewerOlder