Constant | Code |
---|---|
errSecSuccess | 0 |
errSecUnimplemented | -4 |
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 fetch = require('node-fetch') | |
const cheerio = require('cheerio') | |
const baseUri = 'https://developer.apple.com' | |
const sourceUri = `${baseUri}/documentation/security/1542001-security_framework_result_codes?language=objc` | |
const printRow = (left, right) => { | |
console.info(`| ${left.padEnd(40)} | ${right.padStart(6)} |`) | |
} |
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 Customer getCustomer(@PathParam("id") long id, @Context UriInfo uriInfo) { | |
Optional<Customer> customer = findCustomer(id); | |
if (!customer.isPresent()) { | |
throw new NotFoundException( | |
String.format("No customer with id %d found. RequestUri was %s", | |
id, uriInfo.getRequestUri())); | |
} | |
return customer.get(); | |
} |
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 org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import javax.ws.rs.WebApplicationException; | |
import javax.ws.rs.core.Response; | |
import javax.ws.rs.ext.ExceptionMapper; | |
import javax.ws.rs.ext.Provider; | |
@Provider | |
public class WebApplicationExceptionMapper implements ExceptionMapper<WebApplicationException> { |
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
08:04:35,731 ERROR [org.jboss.resteasy.resteasy_jaxrs.i18n] (default task-1) RESTEASY002010: Failed to execute: javax.ws.rs.WebApplicationException: No customer with id 4711 found | |
at com.foo.bar.CustomerResource.get(CustomerResource.java:48) | |
at com.foo.bar.CustomerResource$Proxy$_$$_WeldClientProxy.get(Unknown Source) | |
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) | |
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) | |
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) | |
at java.lang.reflect.Method.invoke(Method.java:498) | |
at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:139) | |
at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:295) | |
at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:249) |
I hereby claim:
- I am lefloh on github.
- I am lefloh (https://keybase.io/lefloh) on keybase.
- I have a public key whose fingerprint is D227 63CD 4436 14D4 DAAD EC68 8ED9 9EE7 0F85 6738
To claim this, I am signing this object:
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
{ | |
"id": 4711, | |
"name": "iPhone", | |
"brand": { | |
"rel": "brand", | |
"href": "http://foo.bar.com/brands/1174" | |
} | |
} |
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
{ | |
"id": 4711, | |
"name": "iPhone", | |
"brand": { | |
"id": 1174, | |
"name": "Apple" | |
} | |
} |
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 Product { | |
private Long id; | |
private String name; | |
private Brand brand; | |
} | |
public class Brand { | |
private Long id; | |
private String name; | |
} |
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 static org.junit.Assert.assertTrue; | |
import java.io.IOException; | |
import java.net.BindException; | |
import java.net.InetAddress; | |
import org.ice4j.Transport; | |
import org.ice4j.TransportAddress; | |
import org.ice4j.ice.Agent; | |
import org.ice4j.ice.Component; |
NewerOlder