Skip to content

Instantly share code, notes, and snippets.

View amixpal's full-sized avatar

Amit Pal amixpal

  • RedEye Studio
  • Seattle
View GitHub Profile
[ 98%] Building CXX object Code/JavaWrappers/gmwrapper/CMakeFiles/GraphMolWrap.dir/GraphMolJavaJAVA_wrap.cxx.o
/home/coderwall/Desktop/rdkit/build/Code/JavaWrappers/gmwrapper/GraphMolJavaJAVA_wrap.cxx: In function ‘const std::pair<long int, int>& std_vector_Sl_std_pair_Sl_boost_int64_t_Sc_int_Sg__Sg__get(std::vector<std::pair<long long int, int> >*, int)’:
/home/coderwall/Desktop/rdkit/build/Code/JavaWrappers/gmwrapper/GraphMolJavaJAVA_wrap.cxx:1808:37: warning: returning reference to temporary [-Wreturn-local-addr]
return (*self)[i];
^
/home/coderwall/Desktop/rdkit/build/Code/JavaWrappers/gmwrapper/GraphMolJavaJAVA_wrap.cxx: In function ‘jlong Java_org_RDKit_RDKFuncsJNI_SparseIntVect64_1getNonzero(JNIEnv*, jclass, jlong, jobject)’:
/home/coderwall/Desktop/rdkit/build/Code/JavaWrappers/gmwrapper/GraphMolJavaJAVA_wrap.cxx:45298:110: error: cannot convert ‘const RDKit::SparseIntVect<long int>*’ to ‘const RDKit::SparseIntVect<long long int>*’ for argument
@amixpal
amixpal / getAllProducts()
Created November 4, 2014 11:11
vishal check karo..aise likh rahe hai...
@Test
public void getAllProductsTest()
{
List<Product> productTest = commonDBDAO.getList("select p from Product p", null, false);
List<Product> product = billingDBDAO.getAllProducts();
LOGGER.info("Testing BillingDBDAO.getAllProductsTest()... ");
try{
if(null!=product&&null!=productTest&&(product.size()!=product.size())){
Assert.fail();
}
@Test
public void getDealerUserForUsernameTest() {
DealerDBImpl dealerDB = new DealerDBImpl();
DealerUser dealerUser;
try {
LOGGER.info("Testing DealerDBImpl.getDealerUserForUsername(String userName)....");
DealerUser du = (DealerUser) commonDBDAO.getObject(
"select du from DealerUser du ", false);
Assert.assertNotNull(du);
String userName = du.getUsername();
9:49:27.151 INFO [DealerDBImplTest] Testing DealerDBImpl.getDealerUserForUsername(String userName)....
19:49:29.903 ERROR [DealerDBImplTest]
java.lang.NullPointerException
at biz.kaar.common.database.impl.DealerDBImpl.getDealerUserForUsername(DealerDBImpl.java:446)
at biz.kaar.common.db.DealerDBImplTest.getDealerUserForUsernameTest(DealerDBImplTest.java:290)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
@Test
public void getSchedulerSaForIDTest() throws IllegalArgumentException {
LOGGER.info("Testing ->" + this.getClass()
+ ".getSchedulerSaForID(String)...");
String optionKey = "Appointment.Reservations.UserID";
DealerUser dealerUserTest;
try {
List<DealerSetupOption> dso = (List<DealerSetupOption>) commonDBDAO
.getList(
"select dso from DealerSetupOption dso where dso.optionKey =':"
class SimulationsController < ApplicationController
def index
@simulations = Simulation.all
end
def new
end
def create
<br/>
<style text = "type/css">
tr, td.border_bottom td
{
border-bottom:1pt solid grey !important;
}
th
{
$("#matrix_data").html(" <table class = 'table table-hover'> <% JSON.parse(@simulation.matrix).each do |tuple| %> <tr> <% tuple.each do |value| %> <td><%= value %></td><% end %> </tr><% end %> </table>");
$("#matrix_verdict").html("<%= @simulation.verdict %>")
#Simulation Model class
require 'simulator_utility'
require 'randomize_utility'
class Simulation < ActiveRecord::Base
@@data_with_opinion = %w(:soft :none :hard)
@@data_without_opinion = %w(:none)
belongs_to :user
before_create :fill_matrix
@amixpal
amixpal / Json
Created September 16, 2015 21:36
Single JSON Object for /api/list/search
"ACL": {
"*": {
"read": true
},
"gnA4iBLnzQ": {
"read": true,
"write": true
}
},