Skip to content

Instantly share code, notes, and snippets.

'use strict';
describe('Date Utils', function () {
var DateUtils;
beforeEach(module('providersApp'));
beforeEach(inject(function (_DateUtils_) {
DateUtils = _DateUtils_;
describe('Something', function () {
var $controller, $scope;
beforeEach(module('providersApp'));
beforeEach(inject(function (_$controller_, _$filter_) {
// Znajdz link z klasą tag-link-77
// w czystym javascriptcie
var links = document.getElementsByTagName('a');
for(var i in links){
if(links[i] && links[i].classList && links[i].classList.contains('tag-link-77'))
console.log(links[i]);
// FORMATOWANIE
function something(x, y, z){
return (x-20 + 2*y)%2*z;
}
// czytelniejsza wersja
function something(x, y, z)
{
// BEM
.list{
// properties
}
.list__item{
// properties
}
<!-- BEM -->
<ul class="list">
<li class="list__item"></li>
<li class="list__item"></li>
<li class="list__item"></li>
</ul>
<!-- own
wady:
@Entity
@Table(name = "TestAspect")
@JsonIgnoreProperties(ignoreUnknown = true)
public class TestAspectEntity {
@Id
@Column(name = "id")
@GeneratedValue
private Long id;
TestAspectEntity
@OneToOne(mappedBy="testAspect", cascade = CascadeType.ALL)
private TestKnowledgeEntity knowledge = new TestKnowledgeEntity();
TestKnowledgeEntity
@OneToOne
...
@ManyToMany(cascade = {CascadeType.ALL}, fetch = FetchType.LAZY)
@JoinTable(name="TestAndTestAspect",
joinColumns={@JoinColumn(name="testId")},
inverseJoinColumns={@JoinColumn(name="testAspectId")})
private Set<TestAspectEntity> testAspects = new HashSet<TestAspectEntity>();
public Set<TestAspectEntity> getTestAspects() {
return testAspects;
@szmeku
szmeku / event.js
Last active August 29, 2015 14:00
'use strict';
angular.module('govipAdminApp')
.factory('Event', ['Model', 'Table', 'Form',
function Events(Model, Table, Form) {
var table = new Table({
name: null,