Posts

java - Does jOOQ support linked SQL Servers? -

this seems straight-forward question, can't track down answer without testing it: does jooq support linked sql servers? (sql server 2008 r2). have application running in sql server r2 aws-rds instance , it's running out of space, we're looking @ various options. 1 we're favoring right moving specific set of data onto it's own rds instance (for architectural reasons). we're trying determine impact of doing our application tier. does know if jooq code generator creates objects linked servers? officially, has never been tested explicitly. might work, depending on how sql server exposes linked instances. jooq's code generator runs queries against sql server's information_schema views. i.e. can generate artefacts find in views. note, if jooq cannot generate artefacts linked instance, connect instance directly jooq code generator, , try use codegen-time or runtime schema mapping features , in order generate link prefixes.

Google Calendar API PHP fatal error -

i "connect me" link every time, after clicking , connecting, , refreshing browser. also, error, as suggested in answer below, have made changes, , added them here. has created new error: fatal error: uncaught exception 'google_serviceexception' message 'error calling https://www.googleapis.com/calendar/v3/users/me/calendarlist?key=aizasydxm2epulkfrogluo0dppebknimmvpfkxy : (401) login required' in ####.org/google-api-php-client/src/io/google_rest.php:66 stack trace: #0 ####.org/google-api-php-client/src/io/google_rest.php(36): google_rest::decodehttpresponse(object(google_httprequest)) #1 ####.org/google-api-php-client/src/service/google_serviceresource.php(177): google_rest::execute(object(google_httprequest)) #2 #####/google-api-php-client/src/contrib/google_calendarservice.php(154): google_serviceresource->__call('list', array) #3 ####/avl/index2.php(44): google_calendarlistserviceresource->listcalendarlist() #4 {main} thrown in /#####...

c# - Using DateTime for a duration of time e.g. 45:00 -

i'd know if possible use datetime type durations such 45:00 (45 minutes) or 120:00 (120 minutes). these values need stored local sql server db. if possible, possibly hint how done using datetime, or if not let me know way done using different type. thank in advance, jamie you should use timespan structure timespan interval = new timespan(0, 45, 0); console.writeline(interval.tostring()); for database storing part, store property ticks because specific constructor timespan structure allows instantiate new timespan passing ticks value long ticks = gettimespanvaluefromdb(); timespan interval = new timespan(ticks); i wish add need bigint t-sql datatype field store long net datatype

exception handling - Propagating AccessDeniedException in Spring Security -

in web application using spring security , spring mvc. have secured couple of methods @secured annotation , configured spring security in such way when 1 of methods accessed without proper role, user taken login page. however, not want behaviour when offending request comes ajax, implemented custom @exceptionhandler annotated method determine request's context. this exception handler: @exceptionhandler(accessdeniedexception.class) public void handleaccessdeniedexception(accessdeniedexception ex, httpservletrequest request, httpservletresponse response) throws exception { if (isajax(request)) { response.setstatus(httpservletresponse.sc_unauthorized); } else { throw ex; } } this way can both handle exception myself (for example, log attempt of accessing @secured method) , let spring part , redirect user login page rethrowing accessdeniedexception. also, when request comes ajax set response status sc_unauthorized , handle error on client side...

c++ - Not Detecting Input Properly -

i've started c++ today, , working on advanced text-based calculator. anyways, i'm working on exponents, when start program, , enter string starts exponent mode, doesn't go expponent mode, regular calculator mode. here code: // // main.cpp // c++ calculator // basic calculator application run through command line. // v.0.02 - second version of calculator, basic text, command line interface, loop. // created johnny carveth on 2013-04-17. // copyright (c) 2013 johnny carveth. rights reserved. // #include <math.h> #include <iostream> int int1, int2, answer; bool bvalue(true); std::string oper; std::string cont; using namespace std; std::string typeofmath; double a; double b; int answerexponent; int main(int argc, const char * argv[]) { // taking user input, first number of calculator, operator, , second number. addition, substraction, multiplication, division cout<<"______________________________________________\n"; cout...

java - How large does a graph need to be to trigger the worst-case complexity of a Fibonacci heap? -

i've been trying trigger worst-case complexity of fibonacci heap using dijkstra's algorithm apparently no luck. have second implementation of dijkstra's using vanilla binary heap, , seems win. told conduct tests using larger datasets, have, shown (copy-pasted straight program): running dijkstra's algorithm 3354 nodes , 8870 links... source node: time using binary heap = 2167698339 ns (2167.70 ms) versus... running dijkstra's algorithm 3354 nodes , 8870 links... source node: time using fibonacci heap = 11863138070 ns (11863.14 ms) 2 seconds, against ~12 seconds. quite difference alright. now, have graph whopping 264,000 nodes , 733,000 edges. haven't had chance test yet, enough theoretical advantage of fibonacci heaps shine? i hope don't need on million nodes. mean it's not biggest issue in world nice see difference in action once. first of question's title not correct. size of input not affect worst case complexity. need size...

python - Bug or meant to be: numpy raises "ValueError: too many boolean indices" for repeated boolean indices -

i doing simulations in experimental cosmology, , encountered problem while working numpy arrays. i'm new numpy, not sure if i'm doing wrong or if it's bug. run: enthought python distribution -- www.enthought.com version: 7.3-1 (32-bit) python 2.7.3 |epd 7.3-1 (32-bit)| (default, apr 12 2012, 11:28:34) [gcc 4.0.1 (apple inc. build 5493)] on darwin type "credits", "demo" or "enthought" more information. >>> import numpy np >>> t = np.arange(10) >>> t[t < 8][t < 5] traceback (most recent call last): file "<stdin>", line 1, in <module> valueerror: many boolean indices >>> i expected return: array([0, 1, 2, 3, 4]) since t[t < 8] should presumably treated ndarray? the numpy documentation ( http://docs.scipy.org/doc/numpy/user/basics.indexing.html ) says boolean arrays indices: as index arrays, returned copy of data, not view 1 gets slices. running type(t[t...