Twitter: @aigalou
Facebook: https://www.facebook.com/aigalou
public class MainActivity extends Activity { | |
protected static final String TAG = "MainActivity" ; | |
// Define protected instances of the needed UI elements | |
protected ProgressBar busyIndicator = null ; | |
protected TextView weatherData = null ; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { |
@Entity(name="com.hps.mdm.legacy.domain.person") | |
@Table(name = "PERSON") | |
@SqlResultSetMapping(name="myMapping", entities={Person.class, Agent.class, Contact.class}) | |
@NamedNativeQuery(name="PersonPLSQL", query="CALL STORED PROCEDURE", resultSetMapping="myMapping") | |
public @Data class Person implements Serializable { | |
private static final long serialVersionUID = 1L; | |
// @Max(value=?) @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation | |
@Id | |
@Basic(optional = false) |
Twitter: @aigalou
Facebook: https://www.facebook.com/aigalou
package dew.demo.gists; | |
import java.util.Arrays; | |
import net.java.html.json.*; | |
@Model(className="UI", properties={ | |
@Property(name="user",type=String.class), | |
@Property(name="current",type=String.class), | |
@Property(name="names", type=String.class, array = true), | |
@Property(name="gists",type=Gist.class, array = true) |
@PUT | |
@Path("/{id}") | |
@Produces(value = {"application/json", "application/xml"}) | |
@ApiOperation(value = "Update/Modify ToDo entity specified by 'id'", produces = "application/json, application/xml", | |
response = ToDo.class, consumes = "application/xml, application/json") | |
@ApiResponses({ | |
@ApiResponse(code = SC_INTERNAL_SERVER_ERROR, message = "SERVER ERROR"), | |
@ApiResponse(code = SC_BAD_REQUEST, message = "Invalid ID value") | |
}) | |
public ToDo updateToDo(@ApiParam( value = "The unique ID of the ToDo entity", name = "id", required = true) @PathParam("id") Long id, |
package com.zanclus.socialshell; | |
import com.zanclus.socialshell.utils.AbstractLoggingVerticle; | |
import static io.vertx.ext.auth.shiro.LDAPAuthRealmConstants.*; | |
import io.vertx.core.AsyncResult; | |
import io.vertx.core.Future; | |
import io.vertx.core.Verticle; | |
import io.vertx.core.http.HttpServerOptions; | |
import io.vertx.core.json.JsonObject; |
package com.mycompany.vertx.demo; | |
import io.vertx.core.AbstractVerticle; | |
import io.vertx.ext.web.Router; | |
public class WebServer extends AbstractVerticle { | |
@Override | |
public void start() throws Exception { | |
Router router = Router.router(vertx); |
package com.mycompany.vertx.demo; | |
import io.vertx.core.AbstractVerticle; | |
/** | |
* | |
*/ | |
public class Main extends AbstractVerticle { | |
@Override |
@SpringBootApplication | |
@EnableJpaRepositories | |
@EnableTransactionManagement | |
@Slf4j | |
public class Application { | |
public static void main(String[] args) { | |
ApplicationContext ctx = SpringApplication.run(Application.class, args); | |
System.out.println("Let's inspect the beans provided by Spring Boot:"); |
import struct | |
from socket import SOL_SOCKET, socket | |
import grp | |
import pwd | |
from klein.app import Klein | |
class MyApp(object): | |
""" | |
An example Klein application to test unix domain socket peer credential checking |