This file contains hidden or 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
{ | |
"msg": "Hi Bob, I will be able to attend the party." | |
} |
This file contains hidden or 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
{ | |
"alg": "HS256", | |
"typ": "JWT" | |
} |
This file contains hidden or 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
val updateSecretRequest = | |
new UpdateSecretRequest(). | |
withSecretId(secretId). | |
withKmsKeyId(newKmsKeyId). | |
withSecretString(newSecretString) | |
awsSecretsManager.updateSecret(updateSecretRequest) |
This file contains hidden or 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
0.0 <= H <= 50.0 and 0.23 <= S <= 0.68 | |
and R > 95 and G > 40 and B > 20 and R > G | |
and R > B and | R - G | > 15 and A > 15 |
This file contains hidden or 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
#include <stdio.h> | |
#include <sys/types.h> | |
int main() { | |
// Infinite Loop | |
while(1){ | |
// Fork will create another CLONE process. | |
// Being a clone of the parent, child process | |
// will also CLONE a copy of itself. |
This file contains hidden or 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 void entityIsPersistent(PersistEvent event, Map createCache) { | |
LOG.trace( "Ignoring persistent instance" ); | |
final EventSource source = event.getSession(); | |
//TODO: check that entry.getIdentifier().equals(requestedId) | |
final Object entity = source.getPersistenceContext().unproxy( event.getObject() ); | |
final EntityPersister persister = source.getEntityPersister( event.getEntityName(), entity ); | |
if ( createCache.put( entity, entity ) == null ) { |
This file contains hidden or 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
private void persistTransientBeanWithId() { | |
// Get a non managed (Transient) product object - Having id set | |
Product transientProductWithId = ProductMother.getBasicProduct(); | |
dao.update(transientProductWithId, "New Brand Name"); | |
} | |
private void persistTransientBeanWithoutId() { | |
// Get a non managed (Transient) product object - And reset ID to null | |
// This will result in creation of product | |
Product transientProductWithoutId = ProductMother.getBasicProduct(); |
This file contains hidden or 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
@Component | |
public class ProductDaoImpl implements ProductDao { | |
@PersistenceContext(type = PersistenceContextType.EXTENDED) | |
private EntityManager entityManager; | |
public Product findById(Long id) { | |
return entityManager.find(Product.class, id); | |
} |
This file contains hidden or 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
<bean id="customConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> | |
<property name="location" value="file:${catalina.base}/conf/config2.properties"/> | |
<property name="ignoreUnresolvablePlaceholders" value="true"/> | |
<property name="order" value="-2147483648"/> | |
</bean? |
This file contains hidden or 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
<bean id=“configurer1" class=“org.springframework.beans.factory.config.PropertyPlaceholderConfigurer”> | |
<property name="location" value="file:${catalina.base}/conf/config1.properties"/> | |
<property name="ignoreUnresolvablePlaceholders" value="true"/> | |
</bean> | |
<bean id="customConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> | |
<property name="location" value="file:${catalina.base}/conf/config2.properties"/> | |
<property name="ignoreUnresolvablePlaceholders" value="true"/> | |
<property name="valueSeparator" value="-defVal-"/> | |
</bean> |