Posts

Showing posts from January, 2015

python - It is possible to run a transmogrifier section after all other have completely run? -

i'm importing content plone using transmogrifier pipeline and, in order fix various aspects images, links , related content, need run section after content has been created , indexed. i need because want use catalog tool in order search content path , use uuid referrer it. is possible using transmogrifier or it's better using other of technologies available, simple upgrade step? i thinking on using pattern similar source section: from collective.transmogrifier.interfaces import isection collective.transmogrifier.interfaces import isectionblueprint class dosomethingattheveryendsection(object): classprovides(isectionblueprint) implements(isection) def __init__(self, transmogrifier, name, options, previous): self.previous = previous def __iter__(self): item in self.previous: yield item item in self.previous: do_something() is idea? yes, idea make postprocess section, problem self.previous ...

linux - "configure: error: mcs Not found" during configure mono-addins on CentOS -

i'm trying install monodevelop 4 on centos 7 described in post: install mono , monodevelop on centos 5.x/6.x , when i'm trying execute ./autogen.sh --prefix=/usr in mono-addins src directory, error: running autoconf ... running ./configure --prefix=/usr ... checking bsd-compatible install... /usr/bin/install -c checking whether build environment sane... yes checking thread-safe mkdir -p... /usr/bin/mkdir -p checking gawk... gawk checking whether make sets $(make)... yes checking whether make supports nested variables... yes checking whether uid '0' supported ustar format... yes checking whether gid '0' supported ustar format... yes checking how create ustar tar archive... gnutar checking whether enable maintainer-specific portions of makefiles... yes checking pkg-config... /usr/bin/pkg-config checking pkg-config @ least version 0.16... yes checking gmcs... no configure: error: mcs not found mcs compiler installed successfully, , if execute mcs --vers...

ruby - Can not install gem 'pg' to deploy rails app to heroku -

i trying deploy rails app heroku , have replaced gem 'sqlite3' gem 'pg'. have done because getting error trying push git heroku saying sqlite3 not supported. whenever try run bundle install error. gem::ext::builderror: error: failed build gem native extension. /users/ipbyrne/.rvm/rubies/ruby-2.2.1/bin/ruby -r ./siteconf20150722-14766-1b3cg9.rb extconf.rb checking pg_config... no no pg_config... trying anyway. if building fails, please try again --with-pg-config=/path/to/pg_config checking libpq-fe.h... no can't find 'libpq-fe.h header *** extconf.rb failed *** not create makefile due reason, lack of necessary libraries and/or headers. check mkmf.log file more details. may need configuration options. provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcd...

symfony remove entity mapping doctrine -

when used " php app/console doctrine:schema:update --dump-sql "; have error: ->[doctrine\dbal\schema\schemaexception] table name 'bissap_forum.category' exists. when used "php app/console doctrine:mapping:info"; have : found 7 mapped entities: [ok] bissap\platformbundle\entity\category [ok] bissap\platformbundle\entity\skill [ok] bissap\platformbundle\entity\advert [ok] bissap\platformbundle\entity\image [ok] bissap\platformbundle\entity\application [ok] bissap\platformbundle\entity\advertskill [ok] bissap\bodyconceptbundle\entity\category so have 2 entities same name ( category ), maybe why, have error, when use " php app/console doctrine:schema:update --dump-sql "?! how can purged entities mapping? have tried set different table name 1 of category entities ? /** * my\category * * @orm\table(name="my_category_table") * @orm\entity */ class category { ... } this way, won...

foreach - What is the proper way in PHP multiple post values as input for MySQL query? -

i make code data post, post contains checkbox selections (multiple selections), , feed these data mysql select. my basic code is: echo "<form action='handler.php' method='post'>"; echo '<input type="checkbox" name="cbtest" value="10">href="details.php?id=10">data 1</a>'; echo '<input type="checkbox" name="cbtest" value="11">href="details.php?id=11">data 2</a>'; echo '<input type="checkbox" name="cbtest" value="12">href="details.php?id=12">data 3</a>'; echo "<input type='submit' name='button' value='some action'>"; echo '</form>'; handler.php contains: $temp = $_post['cbtest']; if(isset($_post['cbtest'])) { foreach ($temp $cbtest){ echo $cbtest."<br>"; } it clear $cb...

c# - GridObjectDataSource DataTable Sorting with parameters -

my trouble not know howto pass events sort datatable. have listed .aspx page, , flow of behind .cs file bindthrottles function. looking simple solution uses datatable. saw other code looked simple used events posted @ end, not sure howto form use. my .aspx page configured as.. <asp:objectdatasource id="gridobjectdatasource" runat="server" selectmethod="bindthrottles" typename="websitenamespace.throttleinterval" sortparametername="sortby"> <selectparameters> <asp:controlparameter controlid="gvthrottles" name="sortdirection" propertyname="sortdirection" /> </selectparameters> </asp:objectdatasource> <asp:gridview id="gvthrottles" allowsorting="true" runat="server" datakeynames="userid" datasourceid="gridobjectdatasource...

schema.org - JSON-LD Create Single Review for Person -

how go creating review person? instance if user, submitted review provided both rating , associated bit of information person's/service provider's quality of service... how should coded using json-ld? think code below how correctly accomplish i'm not certain. if have suggestions, please include code input provide maximum clarity. please keep in mind code below not page lists of ratings rather single page displays rating. person/service single review: <script type="application/ld+json"> { "@context": "http://schema.org/", "@type": "review", "itemreviewed": { "@type": "person", "name": "john smith", // person being reviewd }, "reviewrating": { "@type": "rating", "bestrating": "5", "ratingvalue": "3", "worstrating": "1" } "name...

linux - How to find the "exit" of a C program -

the test on 32-bit x86 linux. so trying log information of executed basic blocks insert instrumentation instructions in assembly code. my strategy this: write index of executed basic block in globl array, , flush array memory disk when array full (16m). here problem. need flush array disk when execution of instrumented binary over, if not reach 16m boundary. however, don't know find exit of assembly program. i tried this: grep exit target assembly program, , flush memory right before call exit instruction. according debugging experience, target c program, say, md5sum binary, not call exit when finishes execution. flush memory @ end of main function. however, in assembly code, don't know exact end of main function. can conservative approach, say, looking ret instruction, seems me not main function ends ret instruction. so here question, how identify exact execution end of assembly code , , insert instrumentation instructions there? hooking library...

scala - Splitting Spark stream by delimiter -

i trying split spark stream based on delimiter , save each of these chunks new file. each of rdds appear partitioned according delimiter. i having difficulty in configuring 1 delimiter message per rdd, or, being able save each partition individually new part-000... file . any appreciated. val sparkconf = new sparkconf().setappname("datasink").setmaster("local[8]").set("spark.files.overwrite","false") val ssc = new streamingcontext(sparkconf, seconds(2)) class routeconsumer extends actor actorhelper consumer { def endpointuri = "rabbitmq://server:5672/myexc?declare=false&queue=in_hl7_q" def receive = { case msg: camelmessage => val m = msg.withbodyas[string] store(m.body) } } val dstream = ssc.actorstream[string](props(new routeconsumer()), "sparkreceiveractor") val splitstream = dstream.flatmap(_.split("msh|^~\\&")) splitstream.foreachrdd( rd...

website - total number of facebook likes for the entire domain -

my website http://mismo.rs (as mismo.rs) have been shared 3 times. but children pages http://mismo.rs/7-zena-koje-menjaju-predstavu-o-lepoti/ have been shared 326 times example, another page http://mismo.rs/13-pravila-uspesnih-ljudi/ have been shared 12 times. what need total number of shares on facebook. ps: know can fql joining several domains, huge long request, if join urls on website. find other option each page/unique canonical url treated facebook it's own object, , have aggregate figures yourself. maybe can similar insights satisfy needs using facebook domain insights

c# - Is there a property in gridview to show record numbers on the left side? -

<asp:gridview id="gv_list_recs" width="100%" borderstyle="none" gridlines="horizontal" autogeneratecolumns ="false" pagersettings-mode="numeric" allowpaging="true" pagesize="20" onpageindexchanging="gv_list_recs_pageindexchanging" datakeynames = "si_form_id" rowstyle-horizontalalign="center" cellpadding="2" alternatingrowstyle-backcolor="#e2e2e2" headerstyle-cssclass="grid_header" horizontalalign="center" runat="server"> <pagersettings mode="numericfirstlast" pagebuttoncount="5" firstpagetext="first" lastpagetext="last" position="topandbottom" /> <emptydatarowstyle height="150px" horizontalalign="left" font-size="large" forecolor="#031d40" fo...

amazon web services - How to set ACL to public-read on AWS-SDK-PHP v3.2 using transfer manager -

ok, first question, nice. i having problems finding answer question. yes ive tried options transfer constructor don't mention acl options. searches on google come either blank or version 2.x code $options[] = [ 'debug' => true, ]; // files transferred $dest = 's3://newbucket/'.$uuid; // create transfer object. $manager = new \aws\s3\transfer($s3, $path, $dest, $options ); // perform transfer synchronously. $manager->transfer(); $promise = $manager->promise(); $promise->then(function () { echo 'done!'; }); everything uploads ok files not public-read where/how set public-read on files uploaded in version 3.2 you can add 'before' closure array of options you're passing transfer manager handle assigning permissions. try replacing manager instantiation code this: $manager = new \aws\s3\transfer($s3, $path, $dest, [ 'before' => function (\aws\commandinterface $command) { if (in_array($comman...

c++ - Using Gtest how return different values in ON_CALL? -

is possible return different values using on_call willbydefault? example class foomock { mock_method0(foo, int()); } void bar() { foomock mock; int f = 0; on_call(mock, foo()).willbydefault(return(f)); expect_true(f==mock.foo()); // correct f++; expect_true(f==mock.foo()); // failed, because on_call returns f=0 } does exists way return new value of variable? yes there way, change code to: on_call(mock, foo()) .willbydefault(returnpointee(&f)); read more returnpointee in link (in returning live values mock methods section)

ggplot2 - argument "env" is missing, with no default qplot or ggplot R -

i have dataset 3 columns i'm trying plot pdf column id. here's part of data looks like. day id count 8754 48112050 1 8975 48112050 3 8327 61010046 2 8346 61010046 3997 8506 61010046 1 8605 61010046 1 i use qplot : qplot(count, colour=factor(id), data=df, geom="density") or ggplot: ggplot(df, aes(x=count, colour= id))+geom_density() but not plot pdf ids. when dig in, realize ids have no more 2 occurrences in data missing in plot produced qplot or ggplot. in example, id:48112050. i plot density id only, , works. day id count 8754 48112050 1 8975 48112050 3 however, when limit df include id, or id 2 occurrences, qplot or ggplot gives me following error: error in exists(name, envir = env, mode = mode) : argument "env" missing, no default does mean qplot/ggplot needs @ least...

Create new value in C++ macro "int val = rand()" -

i'm trying create c++ macro can while condition under "if" checking. my macro works in cases, have problem when under if created temporary value. of course can move creating of new value before "if", bothersome have in many places in code. it possible work "if(int val = rand())"? this code have no sense, shows problem. #include <iostream> #include <cstdlib> #include <ctime> bool printif(int line, bool val) { std::cout << "line: " << line << std::endl; return val; } #define if(x) if( (x) ? printif(__line__, true) : printif(__line__, false) ) int main() { srand(time(null)); //int val; //if (val = rand()) if(int val = rand()) { std::cout << "val = " << val << std::endl; } } errors while compilation: $ g++ main.cpp && ./a.out main.cpp: in function ‘int main()’: main.cpp:18:6: error: expected primary-expression before ‘int’ if(int val ...

jquery - Get iFrame container size in javascript -

i'm trying modify fitvid.js script. i'm working on fragment: $allvideos.each(function(count){ var $this = $(this); if($this.parents(ignorelist).length > 0) { return; // disable fitvids on video. } if (this.tagname.tolowercase() === 'embed' && $this.parent('object').length || $this.parent('.fluid-width-video-wrapper').length) { return; } if ((!$this.css('height') && !$this.css('width')) && (isnan($this.attr('height')) || isnan($this.attr('width')))) { $this.attr('height', 9); $this.attr('width', 16); } var height = ( this.tagname.tolowercase() === 'object' || ($this.attr('height') && !isnan(parseint($this.attr('height'), 10))) ) ? parseint($this.attr('height'), 10) : $this.height(); var width = !isnan(parseint($this.attr('width...

php - Silex dynamic routing call Class\Controller dynamically like Yii -

i'm not able find way use dynamic routing silex in way yii does. for example yii in config.php has following routing definitions: '<controller:\w+>/<id:\d+>'=>'<controller>/view', '<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>', '<controller:\w+>/<action:\w+>'=>'<controller>/<action>', so dynamically call controller based on url path. how it's possible in silex? i'm trying doesn't work: $app->match('/{controller}/{action}', function($controller,$action) { $controller = ucwords($controller); $name = "def\controller\{$controller}controller::{$action}action"; return new $name; })->method('get'); it looks $name variable has problem because using single backslashes, escape character. also, avoid using {%variable} syntax. better concatenate string's elements (.) dot...

winforms - transparent background in Windows Forms? -

Image
i transparent red color form background of vb6 program i use code transparent background of from option explicit private const gwl_exstyle long = (-20) private const lwa_colorkey long = &h1 private const lwa_defaut long = &h2 private const ws_ex_layered long = &h80000 private declare function getwindowlong lib "user32" alias _ "getwindowlonga" (byval hwnd long, byval nindex long) long private declare function setwindowlong lib "user32" alias _ "setwindowlonga" (byval hwnd long, byval nindex long, _ byval dwnewlong long) long private declare function setlayeredwindowattributes lib "user32" _ (byval hwnd long, byval crkey long, byval bdefaut byte, _ byval dwflags long) long ___________________________________________________________________________ private sub form_load() me.backcolor = rgb(254,0,0) transparency me.hwnd, me.backcolor, 255 end sub _________________________________________________...

Python and encoding, again -

i have next code snippet in python (2.7.8) on windows: text1 = 'áéíóú' text2 = text1.encode("utf-8") and have next error exception: unicodedecodeerror: 'ascii' codec can't decode byte 0xa0 in position 0: ordinal not in range(128) any ideas? you forgot specify dealing unicode string: text1 = u'áéíóú' #prefix string "u" text2 = text1.encode("utf-8") in python 3 behavior has changed, , string unicode, don't need specify it.

.htaccess - htaccess and Mod_rewrite in subdomains -

in htaccess have set rewrite url's query string doesn't show (pretty url's) seems if site placed in subdomain, brings blank page vice going correct page. subdomains affect way works or issue? rewriteengine on rewriterule ^documents/([^/]+)/?$ documents.php?p=$1 rewritecond %{request_filename} !-f rewritecond %{request_filename}.php -f rewriterule ^(.*)$ $1.php [nc,l] converting folder/documents.php?p=value www.mywebsite.com/folder/documents/variable (removing .php?p=value) subdomain equivalent: subdomain.mywebsite.com/folder/documents/variable try turning multiviews option off using code: options -multiviews rewriteengine on rewriterule ^documents/([^/]+)/?$ documents.php?p=$1 [l,qsa,nc] rewritecond %{request_filename} !-f rewritecond %{request_filename}.php -f rewriterule ^(.*)$ $1.php [l] option multiviews used apache's content negotiation module runs before mod_rewrite , makes apache server match extensions of files. /file can in url s...

angularjs - Multilingual top level tab in Ionic based App -

i want multilingual set of tabs, ones defined in: // setup abstract state tabs directive .state('tab', { url: "/tab", abstract: true, templateurl: "templates/en/tabs.html" }) this i've tried, far: <ion-tab title="{{trans.marketplace}}" icon-off="ion-ios-gear-outline" icon-on="ion-ios-gear" href="#/tab/market"> <ion-nav-view name="tab-market"></ion-nav-view> </ion-tab> i've tried ng-model well, incidentally. and [toy working, have debug alerts in it!] languages factory: var en = { 'marketplace' : 'marketplace', }; var fr = { 'marketplace' : 'marche', }; if (lang == 'en') { trans = en ; } else if (lang == 'fr') { trans = fr ; } var stuff = json.stringify(trans) ; alert('in translate ' + stuff + ' ' + lang) ; return trans ; the languages do load , permanent storage before main d...

C++ with git and CMake: How to build submodules with specific parameters? -

consider c++ project, organized in git repository. assume git repository has submodule library built on (super)project depends. if (super)project depends not on library on library built specific (cmake) parameters, how can ensured submodule built these parameters when (super)project built? the build options (like mylib_with_sqlite ) must added interface of library, is, mylib_definitions variable in case of old-school config-module, or interface_compile_definitions property, if library creates config-module install(export ...) command: add_library(mylib ...) if(mylib_with_sqlite) target_compile_definitions(mylib public mylib_with_sqlite) endif() ... install(targets mylib export mylib-targets ...) install(export mylib-targets ...) and in consuming library or executable can write simple compile-time checks: #ifndef mylib_with_sqlite #error mylib must built sqlite #endif

asp.net mvc - How to test PayPal Form payment ? (CSC required) -

Image
i integrated paypal payment using html form ( https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/formbasics/ ) now want try purchase something, created new paypal personal account , after created sandbox test account. (doesn't display csc number). when try buy on site, send me on paypal complete purchase, if try login sandbox test account, paypal says credentials aren't valid, instead if used standard credentials credit card have use test ? tried http://www.getcreditcardnumbers.com/ ccv 123 don't work. any ideas? it because used live url on form post method, correct 1 use test is: <form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">

Xcode/Git: Can't see old version in source control -

Image
i've followed basic tutorial on how use git in xcode. i've made new project git initialised when created it. made changes , after hitting commit, instead of getting old , new files side side i'm seeing nothing on right hand side, says 'file unversioned'. have git turned on - got modified tag example made changes couple of files. ideas why so?

jna - How to get list of List all child controls (Handles) of a given window by using java -

i want child handles of parent window. can done in autoit script but, want in java , command unavailable in autoitx4java.jar. started create it, , took example of calculator: public static hwnd getwindow( windef.hwnd hwnd, windef.dword ucmd) { user32 user32 = (user32) native.loadlibrary("user32", user32.class); return user32.getwindow(hwnd, ucmd); } public static void main(string[] args) { windef.hwnd hwnd = user32.instance.findwindow("calcframe", "calculator"); windef.dword = new windef.dword(5); // child 5 system.out.println("parent : " + hwnd); windef.hwnd hwnd3 = getwindow ( hwnd , ); system.out.println("child " + hwnd3); windef.dword b = new windef.dword(2); // next 2 windef.hwnd hwnd2= getwindow ( hwnd3 , b ); system.out.println(hwnd2); int x = 0; while (hwnd2 != null ) { x++; system.out.println(hwnd2); hwnd2= getwindow ( hwnd , b ); if (x...

AngularJS how to get actual factory's data in controller? -

i have factory, when socket messages. how can returned factory's actual data in controller ? please. app.factory('socket',['$rootscope', function($rootscope) { connection.open(); var connection = new autobahn.connection({ url: 'wss://site.com:6555/', realm: 'realm' }); var collection = { 'topic1': [], 'topic2': [] }; function onevent(args) { console.log("event:", args[0]); collection.topic1.push(args[0]); } connection.onopen = function(session) { session.subscribe(userid, onevent); } return { collection: collection } }]); the factory cannot push data controller, controller can pull factory. so, inject factory controller: app.controller('yourcontroller', ['$scope', 'socket', function($scope, socket) { ... $scope.yourcontrollercollection = socket.c...

oracle - case statement with in case statement -

i not sure kind of statement need in order need do. add case statement after case statement have. bellow case statement. case when locoff.ext_srv_polygon in ('bof', 'cda', 'col', 'dac', 'gos', 'kel', 'klf', 'lag', 'lec', 'med', 'pum', 'rit', 'ros', 'san', 'spo') 'gas' when locoff.ext_srv_polygon in ('cdc', 'coc', 'dav', 'dpc', 'grc', 'kec', 'lcc', 'otc', 'pac', 'sac', 'spc') 'electric' else 'missing' end type, i if ext_distworktype gc or gt , type electric, give me type says wrong polygon or if ext_distworktype ec, es, or et , type gas give me type wrong polygon. here full query: select wo.wonum "work order", wo.location "location", wo.status "status", wo.description, wo.actfin...

Constructing and sending a Soap XML Request in PHP -

i use elois web service webservice interface: to request pricing (see xml request): for authentication: the broker reference the broker code the broker password encrypted the product code wish pricing action (new, update, quote, ...) for pricing: the information of insured the product-specific information the reference quote if needed syntax call : to use web service via soap, parameters use : url: http://wsdev.elois.fr/elois_call.php soapaction: gettarifs example of xml request : <auth> <reference_courtier>elois</reference_courtier> <code_courtier>001234567</code_courtier> <mot_de_passe_courtier>5d7a98bddsfg465qdfs0cb1ab4887eae8 </mot_de_passe_courtier> <action>devispdf</action> <code_produit>acceoplus</code_produit> </auth> <datas> <reference_devis>123321</reference_devis> <civilite1>madame</civilite1> <n...

python - Reproducing default plot behaviour of pandas.DataFrame.plot -

Image
as frequent user of pandas, want plot data. using df.plot() convenient, , layout gives me. i have problem when show generated graph else, it, want tiny changes. this digresses me trying recreate exact graph in matplotlib , turns couple of hundred rows of code , still not work quite same way df.plot() is there way settings default plotting behaviour pandas , ad plot? example: df = pd.dataframe([1,2,3,6],index=[15,16,17,18], columns=['values']) df.plot(kind='bar') this little piece of code makes pretty graph: trying recreate matplotlib turns few hours of digging through documentation , still not comming quite right solution. not mention how many lines of configuration code is. import matplotlib.pyplot plt import matplotlib.ticker plticker import matplotlib.patches mpatches fig, ax1 = plt.subplots() ax1.bar(df.index, df['values'], 0.4, align='center') loc = plticker.multiplelocator(base=1.0) ax1.xaxis.set_major_locator(loc...

javascript - Play song at specific time position from a playlist -

i using jplayer plugin. in example there 13 songs in playlist. want set start time (currenttime) each song : 1st song starts 2 sec, 2nd song start 3 sec , 5th song start 4 sec. here example jsfiddle . in example added var tag = $('.audio-tag audio')[0]; find current playing song globally out of jplayer plugin. how current audio tag & number set currenttime each song of jplayer playlist? solution var $jp = $('#jquery_jplayer_1'); $jp.on($.jplayer.event.setmedia, function(e){ console.log("current track", e.jplayer.status.media); console.log("currentr track index", myplayer.current); // first track (0) - 2 sec, second track (1) - 3 sec, etc. var time = myplayer.current + 2; // jump desired time settimeout(function(){ $jp.jplayer( "play", time); }, 100); }); notes call settimeoout needed because according manual if issued after setmedia command, time parameter, , when...

freepascal - Fetching cyrillic characters from TMemo -

i developing application using lazarus , have characters of text user has entered in tmemo component. using following code fetch characters 1 one (here mmtext name of tmemo component): var i, j: integer; line: string; symbol: char; begin := 0 mmtext.lines.count-1 begin line := mmtext.lines[i]; j := 1 length(line) begin symbol := line[j]; showmessage(symbol); //this line debugging purposes ... when latin characters entered in tmemo component, popup messages each letter appear when cycle reaches cyrillic character there nothing in popup message box. could give me advice should achieve desired result? for interested, answer here: http://forum.lazarus.freepascal.org/index.php?topic=29146.msg183536#msg183536

ios - Getting Photos From Facebook -

i use functions user's photos: func getfacebookphotos() { var request = fbsdkgraphrequest(graphpath:"/me/photos?fields=from,tags,images", parameters: nil); println("started request") request.startwithcompletionhandler(self.handler) } func handler(connection : fbsdkgraphrequestconnection!, result : anyobject!, error : nserror!) { if error == nil { println(result) if (result["paging"]! != nil) { var after = result["paging"]!["cursors"]!["after"]! as! string var path = "/me/photos?fields=from,tags,images&after=" + after var request = fbsdkgraphrequest(graphpath: path, parameters: nil); println("started request") request.startwithcompletionhandler(self.handler) } } else { println(error) } } the problem 30 photos when know user has more photos that. how can of photos? ...

Mule 3.6 : Log4j2: How to read java vm arguments -

is there way read java vm arguments in log4j2.xml ? ${jvmrunargs:argname} not work. arguments in mule's wrapper.conf have read in log 4j log pattern. according log4j2 documentation jvmrunargs can a jvm input argument accessed through jmx, not main argument is case?

mysql - SQL query: Update single attribute (column) value to k different values -

i want replace attribute value k different values (which getting list, hence k can change depending on size of list). also, k different values need updated in equal proportion. e.g. there attribute education value university . now, want update table university should replaced bachelors , masters or doctorate . if there 100 tuples education = university then: 33 should updated bachelors , 33 masters , 34 doctorate . note: in given example k = 3. require query workable different values of k . since, integrating query in mysql python, may write variable represent k , list indices. edit: naive approach first store count of tuples education = university . dividing count k (where k length of list) , running update query repeatedly in loop until values list exhausted. in update query, limit number of rows affected setting limit = count / k . there more efficient way achieve same? there huge number of different solutions in different way different envir...

Failure [INSTALL_FAILED_OLDER_SDK] after updating to Android 1.3 RC 3 -

i updated android studio android 1.3 rc 3 , i'm having kind of error when i'm trying run project. don't have error on codes application , i'm using lg g2 test of application. this gradle apply plugin: 'com.android.application' android { compilesdkversion 22 buildtoolsversion "22.0.1" defaultconfig { applicationid "com.example.windows81.nowv2" minsdkversion 'l' targetsdkversion 21 versioncode 1 versionname "1.0" } buildtypes { release { minifyenabled false proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile filetree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:22.2.0' compile 'com.android.support:design:22.2.0' compile 'de.hdodenhof:circleimageview:1.3.0...

grails - Spring Secuirty CAS SLO not working -

we use jasig cas-server authentication. single-sign-on works fine single-logout not working how expected it. this steps do: goto http://foo.bar login on http://cas.bar go http://baaar.bar logout on foo.baar via cas.bar go http://baar.bar still logged in so if log out on http://foo.bar works , if call again need login, http://baar.bar i'm still logged in. here application config: // define authentication providers grails.plugin.springsecurity.providernames = ["casauthenticationprovider"] // define cas configuration grails.plugin.springsecurity.cas.loginuri = "/login" grails.plugin.springsecurity.cas.serviceurl = "http://cas.bar/${appname}/j_spring_cas_security_check" grails.plugin.springsecurity.cas.serverurlprefix ="https://cas.bar/cas" grails.plugin.springsecurity.logout.afterlogouturl = "https://cas.bar/cas/logout?url=http://localhost:8080/${appname}" grails.plugin...

java - How to remove empty header from SOAP message? -

i using spring-ws consuming webservice compains if soap envelop has empty header element. figured out default soapmessage implementation adds one. how can remove it? thanks in advance http://docs.oracle.com/javaee/5/tutorial/doc/bnbhr.html : the next line empty soap header. remove calling header.detachnode after getsoapheader call. so here solution in plain saaj: messagefactory messagefactory = messagefactory.newinstance("soap 1.2 protocol"); soapmessage message = messagefactory.createmessage(); message.getsoapheader().detachnode(); // suppress empty header and here solution using spring-ws webservicemessagecallback based on this thread : public void marshalwithsoapactionheader(myobject o) { webservicetemplate.marshalsendandreceive(o, new webservicemessagecallback() { public void dowithmessage(webservicemessage message) { saajsoapmessage saajsoapmessage = (saajsoapmessage) message; ...

ios - Add whitespace after character in the TextField -

i creating sdk in user needs enter 4 digit pin , there should space after each character , textfield should securetextentry enabled .i writing following code - (bool)textfield:(uitextfield *)textfield shouldchangecharactersinrange:(nsrange)range replacementstring:(nsstring *)string { nsuinteger newlength = [textfield.text length] + [string length] - range.length; nsstring *text = [textfield.text stringbyreplacingcharactersinrange:range withstring: string]; if (text.length < 13) { textfield.text = [nsstring stringwithformat: @"%@ ", text]; return no; } return newlength <= 12; } but problem adding space between character space shown dot . solution works fine in non sdk code . trying hard find easy solution thanks in advance - (bool)textfield:(uitextfield *)textfield shouldchangecharactersinrange:(nsrange)range replacementstring:(nsstring ...

bootstrap carousel problems when two slide in the same page -

when use multiple or 2 bootstrap carousel in same page, cause problem. first prev , next button control 2 bootstrap carousel slides , 1 prev , next not work. how solve?? or need change 1 use option?? <div class="container"> <div class="row"> <div class="inner-box relative"> <h2 class="title-2">your interested items <a id="nextitem" class="link pull-right carousel-nav"> <i class="icon-right-open-big"></i></a> <a id="previtem" class="link pull-right carousel-nav"> <i class="icon-left-open-big"></i> </a> </h2> <div class="row"> <div class="col-lg-12"> <div class="no-margin item-carousel owl-carousel owl-theme"> <div ...

html - Javascript working in google, firefox but not in IE9 -

this simple lottery random generator, works in google chrome, firefox. not work in internet explorer 9. when use debugging feature in ie9 says myfunction() in html null or undefined . new coding programs work ie, kind of appreciated. <!doctype htlm> <html> <title>lottery</title> <head> <script> function myfunction() { var myelement = document.getelementbyid("pwbx"); myelement.value = math.floor(math.random() * 11); var myelement = document.getelementbyid("pwbx1"); myelement.value = math.floor(math.random() * 11); var myelement = document.getelementbyid("pwbx2"); myelement.value = math.floor(math.random() * 11); var myelement = document.getelementbyid("pwbx3"); myelement.value = math.floor(math.random() * 11); var myelement = document.getelementbyid("pwbx4"); myelement.value = math.floor...

javascript - D3 Chart: Adding a line to a date chart, without a date value -

i want add goal line across chart, goal not have date value, should range 1st date last. http://jsfiddle.net/90fu4dsj/ - uncomment goal function. var data = [ {date: "2-may-15", close: 50}, {date: "1-may-15", close: 50}, {date: "30-apr-15", close: 50}, {date: "27-apr-15", close: 60}, {date: "26-apr-15", close: 40}, {date: "25-apr-15", close: 35}, {date: "24-apr-15", close: 40}, {date: "23-apr-15", close: 30}, {date: "20-apr-15", close: 20}, {date: "19-apr-15", close: 15}, {date: "15-apr-15", close: 10} ], // add line across chart goal = [ {close: 53}, ], margin = {top: 20, right: 50, bottom: 30, left: 50}, width = 500 - margin.left - margin.right, height = 350 - margin.top - margin.bottom, parsedate = d3.time.format("%d-%b-%y"...

javascript - How to filter a local hasMany record set in Ember.js -

Image
i having issues making dom update when filtering ul of hasmany objects. here i'm trying accomplish: when user clicks on 1 of links should filter down div containing respective elements. here current code: route import ember 'ember'; import authenticatedroutemixin 'simple-auth/mixins/authenticated-route-mixin'; export default ember.route.extend(authenticatedroutemixin,{ model: function (params) { return this.store.find('recipient', params.recipient_id); }, setupcontroller: function (controller, model) { this._super(controller, model); var categories = model.get('offers').map(function(offer){ var category = ember.object.create(); category.name = offer.get('company_industry'); category.count = model.get('offers').filterby('company_industry', offer.get('company_industry')).get('length'); return category; }); controller.set('categories', cat...

I want "continue..." text when sub report will overflow to new page -

i think, should feature, when subreport detail band overflow next page, "...continued" or should came, can't able solve issue , have tried find out, if there solution, nothing works.. can 1 have better idea, how solution? the "normal" way is: in subreport put text in detail band (if not there already), if text without datasource (just pass new net.sf.jasperreports.engine.jremptydatasource(1) subreport detail band displayed one. having text in detail band allows use pagefooter band, note title band , summary band overflows on new page without pagefooter . can use summary band need set attribute issummarywithpageheaderandfooter="true" on jasperreport tag. in subreport add pagefooterband text es. <pagefooter> <band height="50"> <statictext> <reportelement x="446" y="18" width="100" height="20" uuid="efa2e741-c54...

Testing for the definedness of a variable in Scheme -

besides regular definitions (define variable value) scheme allows uninitialized definitions (define variable) , when variable bound value later on aid of set! . are there procedures allowing test whether symbol defined (not initialized) variable? (defined? 'variable) should return #t if variable defined , #f otherwise? the form (define var) non-standard extension. according r5rs define has 1 of following forms: (define <variable> <expression>) (define (<variable> <formals>) <body>) (define (<variable> . <formal>) <body>) as far can tell same goes r6rs , r7rs. most (define foo) expands (define foo the-undefined-value) in implementation. means can use (if (eq? foo the-undefined-value) ...) test whether foo` has been initialized or not. http://www.schemers.org/documents/standards/r5rs/html/r5rs-z-h-8.html#%_idx_190 update: i checked r6rs , says: (define <variable> <unspecified>) <uns...

debugging - Reference - What does this error mean in PHP? -

what this? this number of answers warnings, errors , notices might encounter while programming php , have no clue how fix. community wiki, invited participate in adding , maintaining list. why this? questions "headers sent" or "calling member of non-object" pop on stack overflow. root cause of questions same. answers questions typically repeat them , show op line change in his/her particular case. these answers not add value site because apply op's particular code. other users having same error can not read solution out of because localized. sad, because once understood root cause, fixing error trivial. hence, list tries explain solution in general way apply. what should here? if question has been marked duplicate of this, please find error message below , apply fix code. answers contain further links investigate in case shouldn't clear general answer alone. if want contribute, please add "favorite" error message, warning or notic...