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 ...; | |
export interface ICheckoutProp extends StateProps, DispatchProps {} | |
class CheckoutContainer extends React.Component<ICheckoutProp> { | |
private paymentContainer = React.createRef<HTMLDivElement>(); | |
//... | |
componentDidMount() { | |
this.props.getEntityForCurrentUser(); |
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
implementation group: "com.adyen", name: "adyen-java-api-library", version: "5.0.0" |
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
application { | |
config { | |
baseName store | |
packageName com.adyen.demo.store | |
authenticationType jwt | |
prodDatabaseType mysql | |
buildTool gradle | |
clientFramework react | |
useSass true | |
enableTranslation 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
@PostMapping("/checkout/payment-methods") | |
public ResponseEntity<PaymentMethodsResponse> paymentMethods() throws EntityNotFoundException, IOException, ApiException { | |
PaymentMethodsRequest paymentMethodsRequest = new PaymentMethodsRequest(); | |
paymentMethodsRequest.setMerchantAccount(merchantAccount); | |
paymentMethodsRequest.setCountryCode("NL"); | |
paymentMethodsRequest.setShopperLocale("nl-NL"); | |
paymentMethodsRequest.setChannel(PaymentMethodsRequest.ChannelEnum.WEB); | |
Amount amount = getAmountFromCart(); | |
paymentMethodsRequest.setAmount(amount); |
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 ...; | |
export interface ICartProp extends StateProps, DispatchProps {} | |
export const Cart = (props: ICartProp) => { | |
useEffect(() => { | |
props.getEntityForCurrentUser(); | |
}, []); | |
const remove = 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
/** Product sold by the Online store */ | |
entity Product { | |
name String required | |
description String | |
price BigDecimal required min(0) | |
size Size required | |
image ImageBlob | |
} | |
enum Size { |
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 std::fs::File; | |
use std::io::prelude::*; | |
use std::usize; | |
fn lookup_ptr(addr: usize) -> std::io::Result<Option<String>> { | |
let mut contents = String::new(); | |
File::open("/proc/self/maps")?.read_to_string(&mut contents)?; | |
Ok(contents | |
.split("\n") | |
// Uncomment this if you are only interested in stack and heap |
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
// This function takes ownership of the passed value | |
fn take_ownership(value: Box<i32>) { | |
println!("Destroying box that contains {}", value); // value is destroyed here, and memory gets freed | |
} | |
// This function borrows the value by reference | |
fn borrow(reference: &i32) { | |
println!("This is: {}", reference); | |
} |
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
### JHipster Developers Association Individual Contributor License Agreement | |
Thank you for your interest in contributing to open source software projects (**"Projects"**) | |
made available by [JHipster Developers Association](https://www.jhipster.tech/association/) | |
or its affiliates (the **"Association"**). This Individual Contributor License Agreement (**"CLA"**) sets out the | |
terms governing any source code, object code, bug fixes, configuration changes, tools, specifications, | |
documentation, data, materials, feedback, information or other works of authorship that you submit or | |
have submitted, in any form and in any manner, to the Association in respect of any of the Projects | |
(collectively **“Contributions”**). If you have any questions respecting this Agreement, | |
please contact **info@jhipster.tech** |
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
/* Store gateway application */ | |
application { | |
config { | |
baseName store | |
applicationType gateway | |
packageName com.mycompany.store | |
serviceDiscoveryType no | |
authenticationType jwt | |
prodDatabaseType mysql |