Posts

indexing - To get details or to retrieve deleted notes documents -

what doing : from java code retrieving notes database , indexing documents of database using full text indexing using solrj client , saving indexed data of particular documents on full text server. suppose when same database comes again indexing, considered 1 of documents database deleted indexed on full text server, but document deleted notes database don't want keep (means want delete) indexed data on full text server of deleted document. so how know document deleted what thinking is , store document's id , db name while indexing, have record of indexed documents, can identify documents deleted particular database. any other efficient way? thank reading question. the document universal id of document unique identifier @ least complete database. you can document.getuniversalid() in java by design every unique id unique worldwide, designer can go around (unids writable) , replicas of course have documents same unique id. combine unid fil...

There is no parameter $1 ...Sending SQL statement to Rails for Postgresql, what am I doing wrong? -

activerecord::base.connection.execute( "with numberofdays (select percent_change asset_histories date < $1 , asset_symbol = $2 order date desc limit $3) select stddev_samp(percent_change) stdev numberofdays", [day,symbol,daystolimit]) where day, symbol , daystolimit variables assigned before above code. assigned such: day = '2013-03-25' symbol = 'aapl' daystolimit = 20 i don't want use #{variable} because of potential malicious intent. referenced in title, statement returning pgerror error: there no parameter $1 line 1 ... date <$1 and... using postgresql 9.2 , rails 3.2 edit adding alternative solution found here: in addition mu short uses connection.method(:quote), couldn't find documentation on came across post quoting done such: a = activerecord::base.connection a.execute(%q{select * table id = #{a.quote(variable)}...}) from fine (...

unable to find compatible version of spree with rails 4.2.5.1 -

i have installed spree 3.0.0 rails 4.2.5.1..can suggest version of spree should install?spree not working although gives bundle updated there no files in stylesheets , images etc when run rails g spree:site gives me following error folder.c:\rubyy\rails\myshoppingmall>rails g spree:site not find generator 'spree:site'. maybe meant 'spree:dummy', 'spree:install' or 'resource' run rails generate --help more options.

java - What Exception is thrown when an implementation breaks its interface's contract? -

through amount of debugging (i not wish repeat) i've found circumstance can arrived @ if 1 of objects given comparator breaks interface's contract (namely comparator compare(a, a) returns non-zero value). what kind of exception should throw? i thought take inspiration treemap, takes comparator, acts bizarrely (not throwing exception) if give nonsense comparator. the common way use java.lang.illegalargumentexception : throw new illegalargumentexception("one of objects given breaks comparators interface contract "); you can take @ documentation : thrown indicate method has been passed illegal or inappropriate argument.

Better Confluence Page Index Macro? -

i'm using confluence page index macro index sub-pages specific area. issue is, can't customize results generated macro. i have specific pages dedicated tag result. the question is: exist better page index macro? want have same output less content. regards!

Ruby on Rails redirect_to relative URL -

i have rails 4 app hosted behind cloudflare, flexible ssl option turned on, no ssl between cloudflare , app servers sit behind load balancer. so happens that, instance when user signs using https , redirect welcome page... redirect_to :action => :welcome ... or .... redirect_to "/users/welcome" ... rails throws http header "location: http://www.example.com/users/welcome ". breaks session , turns off ssl. i have tried config.force_ssl browser goes infinite redirect loop. i cannot switch app ssl because parts of have use http, , there's nothing sensitive on wire justify switching, , have or 60 different websites built on app, buying certificates of them cost small fortune. want cloudflare's ssl because users think "little green lock" means site safe , trustworthy :) so, there way make rails redirect using relative urls? opposed adding http://www.example.com ... in front of each url redirects to? tia i've found ea...

javascript - jQuery disable scroll doesn't work in Firefox -

i use code in other projects , works fine. don't know wrong in code. works fine in chrome not in firefox. this code: $('body').on({ 'mousewheel': function(e) { e.preventdefault(); e.stoppropagation(); } }); body { height: 5000px; } <script src="//code.jquery.com/jquery-1.11.3.min.js"></script> example jsfiddle . the jquery version in project 1.11.3. some browsers have there default "scroll-overflow" not on body. instand on html or document. try $('html') or $(document) example. help