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 AdventureWorks2012; | |
GO | |
ALTER TABLE Purchasing.PurchaseOrderHeader | |
NOCHECK CONSTRAINT FK_PurchaseOrderHeader_Employee_EmployeeID; | |
GO |
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
/** here is the model sync service is expecting to receive.**/ | |
package com.datorama.core.dto.admin.gdo; | |
import java.util.Collection; | |
import com.datorama.core.dto.admin.UserDto; | |
public class GdoUser { | |
private final Integer id; | |
private final String email; | |
private final String firstName; | |
private final String lastName; | |
private final Integer language; |
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
interface Response { | |
requestId: string; | |
// status could be for instance: Request Approved, or Request Failed to approve because it does not exist anymore. | |
// status is either a success message or an error message that explains why the operation (deny/ approve / revoke) failed. | |
status: string; | |
email: string; | |
} | |
/** |
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
const myColDefs = [{ | |
headerName: 'Header Name', | |
sortable: true, | |
cellRenderer: 'propName', | |
comparator: (valueA: any, valueB: any, nodeA: RowNode, nodeB: RowNode, isInverted: boolean) => | |
sortColumnAlphabetically<User>('status', nodeA, nodeB) | |
}] | |
export function sortColumnAlphabetically<T>(key: keyof T, nodeA: any, nodeB: any): number { | |
const [valueA, valueB] = [nodeA.data[key], nodeB.data[key]]; |
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
const siteHeaderElement = .nativeElement; | |
const customClasses = localStorage.getItem('custom'); | |
.brand-name{color: blue} | |
// regex to get array of classname | |
const classNames = ['NP1', 'NP2', 'LC']; | |
function getElement(className): ElementRef { |
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
const keepListening$ = new BehaviorSubject<boolean>(true); | |
// do whatever with your operator | |
myOperator$.pipe(takeUntil(keepListening$)).subscribe(gotResponse => { | |
// do whatever | |
if (gotResponse) { | |
keepListening$.next(false); | |
} | |
}) |
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
const event = fromEvent(window, 'storage || onStorage') | |
.pipe(filter((values: any[]) => // get right key, filter); | |
// returns the value of amplitude in local storage | |
event.pipe(pairwise(), take(1)).subscribe(([prev, curr]) => { | |
if (prev && !curr) { | |
// amplitude just sent all the events | |
sendEventsFromSession() | |
} | |
}) |
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
export class CachedAccount { | |
id: string; | |
config: string; | |
enableWhiteLabelUi: boolean; | |
isSsoEnabled: boolean; | |
ssoLogoutRedirectURL: string; | |
constructor({id, config, enableWhiteLabelUi, isSsoEnabled, ssoLogoutRedirectURL}: Account) { | |
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
// in your component or wherever your grid options are defined | |
// reference to the grid element | |
@ViewChild(DatoGridControllerComponent, { static: true }) gridController: DatoGridControllerComponent; | |
gridOptions: DatoGridOptions = { | |
…gridOptions, | |
onSelectionChanged: () => this.onSelectionChange(), | |
onRowDoubleClicked: ({ data }: RowDoubleClickedEvent) => this.editUser(data), | |
exportGrid: () => this.exportGrid(), // ==> callback for the export |
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
"Server Error. 4158811\norg.hibernate.exception.SQLGrammarException: could not extract ResultSet\n\tat org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:123)\n\tat org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49)\n\tat org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:126)\n\tat org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:112)\n\tat org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:91)\n\tat org.hibernate.loader.Loader.getResultSet(Loader.java:2066)\n\tat org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1863)\n\tat org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1839)\n\tat org.hibernate.loader.Loader.doQuery(Loader.java:910)\n\tat org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:355)\n\tat org.hibernate.loader.Loader.doList(Loader.java:255 |
NewerOlder