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
class Event < ActiveRecord::Base | |
attr_accessible :locality, :country, :date, :title, :tags | |
has_and_belongs_to_many :tags | |
def self.in_country(country) | |
if country.present? | |
where('country = ?', country) | |
else | |
scoped |
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
package org.ossandme; | |
import javax.ws.rs.*; | |
@Path("/{userid}/comments/{title}/feed") | |
public interface CommentResource { | |
@GET | |
public String retrieveComment(@PathParam("userid") String userID, @PathParam("title") String title); |
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
... | |
@Controller | |
public class ApplicationController { | |
@RequestMapping(value = "/create-client", method = RequestMethod.GET) | |
public String getCreateClientForm() { | |
return "NewClientForm"; | |
} | |
@RequestMapping(headers = "Content-Type=application/json", value = "submit-create-client", method = RequestMethod.POST) |
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
package org.ossandme.client; | |
import javax.jws.WebParam; | |
import javax.jws.WebService; | |
import javax.xml.ws.RequestWrapper; | |
@WebService | |
public class Callback { | |
@RequestWrapper(localName = "sayHiResponse", targetNamespace = "http://apache.org/hello_world_soap_zmq/types") |
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
package org.ossandme.client; | |
import org.apache.hello_world_soap_zmq.Greeter; | |
import org.apache.hello_world_soap_zmq.SOAPService; | |
public final class Client { | |
public static void doOperation() throws Exception { | |
// Create client |
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
package org.opensourcesoftwareandme; | |
import javax.ws.rs.core.Application; | |
import java.util.Collections; | |
import java.util.HashSet; | |
import java.util.Set; | |
public class HelloWorldApp extends Application { | |
public Set<Class<?>> getClasses() { |
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
package org.opensourcesoftwareandme; | |
public class HelloWorldImpl{ | |
public String sayHi(String text) { | |
return "Hello " + text; | |
} | |
} |
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
... | |
@Test | |
public void testMapping() throws Exception { | |
// Hibernate configuration | |
Map<String, String> hibernateProperties = new HashMap<String, String>(); | |
hibernateProperties.put("hibernate.dialect", "org.hibernate.dialect.DerbyTenSevenDialect"); | |
hibernateProperties.put("hibernate.connection.driver_class", "org.apache.derby.jdbc.EmbeddedDriver"); | |
hibernateProperties.put("hibernate.connection.url", "jdbc:derby:target/test-database/database;create=true"); | |
hibernateProperties.put("hibernate.hbm2ddl.auto", "create"); |
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
... | |
public class CalculatorServiceTestCase { | |
@Test | |
public void testCalculatorService() throws Exception { | |
SoapUITestCaseRunner testCaseRunner = new SoapUITestCaseRunner(); | |
SoapUIMockServiceRunner mockServiceRunner = new SoapUIMockServiceRunner(); | |
testCaseRunner.setProjectFile("src/test/resources/calculator-soapui-project.xml"); |
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
ctx.cpp:26:15: fatal error: new: No such file or directory | |
compilation terminated. | |
make[3]: *** [libzmq_la-ctx.lo] Error 1 | |
make[2]: *** [all] Error 2 | |
make[1]: *** [all-recursive] Error 1 | |
make: *** [/opt/android-jzmq/output-arm/lib/libzmq.a] Error 2 |