Posts

Showing posts from January, 2014

How to retrieve value of base64 string stored in a variable to Jenkins Extended E-mail Notification plugin -

i saving buildtimegraph image (png) file in jenkins. wanted embed image , send via mail using extended e-mail notification plugin. build triggered via ant scripts. when using "certutil" in cmd , converting base64. getting 2 statements says -----begin certificate----- , -----end certificate----- in base64 string. use filterchain > tokenfilter > replacestring ant remove these lines string , save them variable. does know how variable can used in img src tag ? have attempted many combinations but, not worked me. looks like. value of $image1 can seen in jenkins log when echo them using ant. but, when using them in extended e-mail notification plugin. wont print. <img alt="image 1" src="data:image/png;base64, $image1" /> thanks. to reference environment variable in email-ext plugin, need use ${env, var="image1"} keep in mind if environment variable created in ant build step, not exist in post-build actions (unle...

java - SilverLIght objects not identified through Selenium Webdriver. Can you please suggest how to proceed -

webdriver not identify xpath : //object[@id='slplugin2']. getting "nosuch element exception" ***<table class="imgtable phototable" cellspacing="0"> <tbody> <tr> <td colspan="10"> <div id="fileuploadcontrol312" class="fileupload t-toolbar t-grid-toolbar t-grid-top" style="display: block;"> <object id="slplugin2" width="127" height="32" data="data:application/x-silverlight," type="application/x-silverlight"> <param value="white" name="background"/> <param value="/lmm/clientbin/fileupload.xap" name="source"/> <param value="url =https://lmmwipqa.blob.core.windows.net/uploads?se=2014-04-14t06%3a45%3a03z&sr=c&sp=w&sig=tubcb6gkw6d9gjo23wkru5w7j%2bsalbounjuj7n197kg%3d, parent =fileuploadcontrol312, caption =add photo" name="initparams"...

icalendar - ical file shows correct date if it is opened on Mozilla Thunderbird but not in Microsoft outlook -

Image
ical file code: begin:vcalendar version:2.0 prodid://microsoft corporation//outlook 14.0 mimedir//en begin:vevent dtstamp:20131107t000000 uid:758acmrj description: meeting 2013-11-07 00:00:00 categories:meeting class:public created:20131107t000000 summary: meeting dtstart;tzid=ct:20131107t000000 dtend;tzid=ct:20131108t000000 location: home end:vevent end:vcalendar microsoft outlook: mozilla thunderbird: mozilla thunderbird showing correct date. this how outlook displays 1 day day activities. activity starts @ 11/7/2013 12:00 , ends @ 11:17/2013 11:59:999 pm of same day. activity starting on 11/7/2013 , ending on 11/8/2013 2 days (11/7 , 11/8).

ASP.NET MVC how to insert other html element inside @HTML.ActionLink -

normally, write this: <li>@html.actionlink("dashboard", "index", "account")</li> to generate this: <a href="/account">dashboard</a> what want know whether possible generate following html <a href="#"><i class="fa fa-dashboard"></i> dashboard</a> without having create own custom tagbuilder class. thanks help. you can use urlhelper.action generate url: <a href="@url.action("index", "account")"> <i class="fa fa-dashboard"></i> dashboard </a>

licensing - php check license id with postback url -

i'm working on php installer web application / software. the installer need valid license id finish installation (for example: "ads34nsi9sa"). to check if license id valid have php script on main domain check db , return 1 if licenseid exist , active or 0 otherwise. file should called this: https://www.domain.com/check.php?id=ads34nsi9sa so i'm wondering if correct use file_get_contents() check license id via php.. $check = file_get_contents("https://www.domain.com/check.php?id=$license_field"); if( $check == 1 ) {} // finish installation else {} // print error msg is way correct , secure? of course, need url-encode data before injecting url. , it's remote server detect brute force attacks. other that: your check assumes allow_url_fopen enabled , php has ssl support . make sure explain in requisites , ready support enquiries , workaround coding. data sent through ssl should remain private enough. and, well, isn't part...

Angularjs directive isolated scope and impact in the parent scope -

there behaviour isolated scope in directives , = attribute don't understand. i have directive isolated scope , 2 attributes in : scope: { attr1: '=', attr2: '=' } maybe wrong i'm expecting modifications of attr1 , attr2 objects in directive's template transmitted original object. for exemple : <directivename attr1="anobject" attr2="anotherobject" /> i'm expecting modifications on attr1 , attr2 in directive available in 'anobject' , 'anotherobject' doesn't seem case. but have notice if add level anobject , anotherobject <directivename attr1="foo.anobject" attr2="foo.anotherobject" /> then modifications in directive's template of attr1 , attr2 transmitted $scope.foo.anobject , $scope.foo.anotherobject. can explain me why , tell me way force transmission of modifications directive original objects without having force caller of directive add intermed...

q lang - How to apply max function for each row in KDB? -

i want ensure values in column x no smaller 0.5, do: update x:max (x 0.5) mytable but gives error (in studio kdb+ ): an error occurred during execution of query. server sent response: type studio hint: possibly error refers wrong type, e.g `a+1 what's wrong? you can try using | q)update x|0.5 mytable

ctags doesn't use my custom .ctags on Mac OS -

i'm trying use exuberant ctags on mac os. i've installed exuberant ctags homebrew . here version : $ ctags --version exuberant ctags 5.8, copyright (c) 1996-2009 darren hiebert it seems custom $home/.ctags not taken account. here config : $ cat ~/.ctags --verbose=no --recurse=yes --tag-relative=yes --langdef=scala --langmap=scala:.scala --regex-scala=/^\s*class\s*([a-za-z0-9_]+)/\1/c,classes/ … when launch ctags -r , no tags generated .scala files. when test --options $ctags -r --options=/users/yamo/.ctags ctags: cannot open option file "/users/yamo/.ctags" : no such file or directory $ll ~/.ctags lrwxr-xr-x 1 yamo staff 36 apr 13 21:29 /users/yamo/.ctags@ -> /users/yamo/projects/dotfiles/.ctags the issue due bsd regex. i've solved editing ~/.ctags in vim :%s/\\s/[ \\t]/g

c# - <double> RegEx catching IP addresses -

i'm using parser, mistakenly parses ip addresses double values. since know nothing regular expressions, take look: addrule<double>("!!float", @"[-+]?(0|[1-9][0-9_]*)\.[0-9_]*([ee][-+]?[0-9]+)?", m => convert.todouble(m.value.replace("_", "")), null); addrule<double>("!!float", @"[-+]?\._*[0-9][0-9_]*([ee][-+]?[0-9]+)?", m => convert.todouble(m.value.replace("_", "")), null); addrule<double>("!!float", @"[-+]?(0|[1-9][0-9_]*)([ee][-+]?[0-9]+)", m => convert.todouble(m.value.replace("_", "")), null); is there quick way fix that? (the error on first lambda expression) alright, trick. addrule<double>("!!float", @"^[0-9]*(?:\.[0-9]*)?$", m => convert.todouble(m.value.replace("_", "")), null);

php - Read works, add, edit, delete do not in Grocery Crud library Codeigniter -

i have done example , installed everything. the read or display method of table works correctly, whenever try add, delete or edit registry windows appears , say: 404 page not found page requested not found. here controller class welcome extends ci_controller { public function __construct() { parent::__construct(); $this->load->model('grocery_crud_model'); $this->load->database(); $this->load->helper('url'); $this->load->library('grocery_crud'); } public function index() { $crud = new grocery_crud(); $crud->set_theme('datatables'); $crud->set_table('students'); $crud->set_relation('class','class','class'); $crud->display_as('name','name of student'); $crud->set_subject('students'); $crud->columns('name','class',...

java - public visibillity modifier and jpa -

this question has answer here: why “public” not allowed properties in jpa entities? 3 answers why public visibility modifier not allowed entity field access type. because jpa cannot track changes field , transparently persist them database.

ios - Can't set size of UIButton frame with auto layout enabled -

i tried hard solve apparently simple problem myself, couldn't fix yet! so here's deal: i using storyboard auto layout enabled. because of many objects in 1 of views, decided implement the - (void)willanimaterotationtointerfaceorientation:(uiinterfaceorientation)interfaceorientation duration:(nstimeinterval)duration method view controller , set frames views explicit so: self.startstopbtn.frame = cgrectmake(10, 223.5, 300, 30); and works fine long keep size of uibutton object same (as in storyboard) , change origin. change size button gone! finally enough can change frames of labels, views , image views without problems in same method in exact same way. i appreciate help! can guide me in right direction. if using autolayout should not manimulate uiview frame. should modify nslayoutconstaints change in view code.

tfs - Work Item Template: On closing a task validate that the Remaining Field is Zero or Empty -

in tfs (2014) wanting update wit template when change task "active" "closed" check "remaining" field has been changed 0 (or empty) , there value in completed of either 0 or above. is there way have validation giving message such "please update remaining field before saving"? i'm assuming needs changing in section <transition from="active" to="closed"> <reasons> <defaultreason value="completed" /> <reason value="deferred" /> <reason value="obsolete" /> <reason value="cut" /> </reasons> <fields> <field refname="microsoft.vsts.common.activateddate"> <readonly /> </field> <field refname="microsoft.vsts.common.activatedby"> <allowexistingvalue /> <readonly /> </field> <field refname="microsoft.vsts.commo...

php - I'm getting empty object attribute when i use simplexml_load_string -

when i'm trying use simplexml_load_string returns array of "simple xml objects" "empty" object attributes. attributes not empty in real xml output! do have suggestions? $url = "widgets.sportsevents365.com/data/tickets/v2.0/events/?q=cq,0,$sporttype,$numofdays&page=$page&perpage=$perpage"; $ch = curl_init(); curl_setopt($ch, curlopt_returntransfer, 1); curl_setopt($ch, curlopt_httpheader ,array('contect-type:text/xml','application/xml') ); curl_setopt($ch, curlopt_url, $url); curl_setopt($ch, curlopt_userpwd, "*****:*****"); $result = curl_exec($ch); curl_close($ch); $xmldata = simplexml_load_string($result); print_r( $xmldata ); from comment... im getting values inside <![cdata[ , simplexml_load_string removig them, how catch values ? you need use libxml_nocdata flag. $xmldata = simplexml_load_string($result,libxml_noc...

unique - Node-Neo4j How to check if node exists(persistently)? -

i'm using node-neo4j client db. want create unique node, couldn't find how in documentation of node-neo4j. used logic below check if node exists or not: person_param = {'name': namesurname, 'userid': userid }; person_node = db.createnode(person_param); if (!person_node.exists){ person_node.save(function(err, result){ //if(err) , if(!err) stuff }); } but, understand, createnode creates new node scratch, , when use exists on it, checks if newly created node saved database or not. how can check if node supplied properties exists in db or not? thanks in advance. the solution can think of, following: create properties object query neo4j instance properties if result returned use that otherwise save it in code: var person_param = {'name': namesurname, 'userid': userid }; // build cypher query var query = [ 'match (user: {name: {name}, id: {userid}})', 'return user' ].join('\n'...

sitecore7 - Sitecore Personalization - Change Sublayout parameters based on visitor profile -

is there way set different parameters sublayout based on visitor profile. when goto presentation details , click personalize can set different datasource or rendering different conditions. you can create rules under /sitecore/system/marketing center/personalization/rules. understand rules start point http://sdn.sitecore.net/reference/sitecore%206/rules%20engine%20cookbook.aspx diea, create different rules, execute actions when set of conditions satisfied. then, in presentation detail of control, can chose rules apply. in order view personalization section in presentation details need go to: sitecore => control panel => preferences => change application options => view tab => third section "control properties" , check "show personalization section.

internet explorer - OData.read not working in IE (missing headers, no data) - works in Firefox -

i have sap gateway system create odata services consume in jquery html5 page. when doing html page, used firefox run it. want users test application , sap automatically uses ie (i have ie 10 installed). the exact same request, send through odata.read function (datajs library), not give me results in ie in firefox does. reach success callback function there no result. that's anyhow 1 of services. service call simunltaneously give me results firefox does. strange thing in success callback function header (object) in ie empty when debugging ie have response header. the way tested using eclipse , localhost. firefox works, ie doesn't. i have no idea how fix , appreciate help! my request js: var request = { headers: { 'dataserviceversion': '2.0', 'x-csrf-token': 'fetch' // needed update requests }, recognizedates: true, enablejsonpcallback: true, // didn't have firefox, added ie didn't reques...

java - How can we find the sum of the diagonal elements and then store in different array? -

i want sum of 2d matrix , store in array, e.g. if have a[][][] a[0][1] stored in array b[] @ b[1],a[0][1]+a[1][0] , @ b[2] a[0][2]+a[1][1]+a[2][0] ... , on. you can reverse column count sum=0; column_count=b.length-1; for(i=0; i<b.length;i++) { sum+=b[i][i]; sum+=b[i][column_count]; column_count--; } print sum;

jquery - 403 status code when posting form with ajax -

i have form in template file this <form action="#" id="details" class="inline"> {% csrf_token %} {% field in practice_form %} <div class="container"> <div class="row"> <div class="form-group col-md-12"> {{field.label_tag}} {{field}} </div> </div> </div> {% endfor %} <div class="container"> <div class="row"> <input type="submit" id="save-practice" class="btn btn-primary" value="save details"> </div> </div> </form> my js $("#save-practice").on('click', function (event){ event.preventdefault(); var form = $(this).parent(); $.ajax({ url: '/settings/add-practice-data...

c++ - Detecting squares in an image -

i found square detection code online , i'm trying understand it, understand line @ end does? states: "gray = gray0 >= (l+1)*255/n;" mat pyr, timg, gray0(image.size(), cv_8u), gray; // down-scale , upscale image filter out noise pyrdown(image, pyr, size(image.cols/2, image.rows/2)); pyrup(pyr, timg, image.size()); vector<vector<point> > contours; // find squares in every color plane of image for( int c = 0; c < 3; c++ ) { int ch[] = {c, 0}; mixchannels(&timg, 1, &gray0, 1, ch, 1); // try several threshold levels for( int l = 0; l < n; l++ ) { // hack: use canny instead of 0 threshold level. // canny helps catch squares gradient shading if( l == 0 ) { // apply canny. take upper threshold slider // , set lower 0 (which forces edges merging) canny(gray0, gray, 0, thresh, 5); // dilate canny output remove potential // holes betw...

jQuery Datatable not working when trying to popilate table from JavaScript -

i'm trying populate table javascript. problem table being populated "no data available in table" shown, , when try search or data; data disappears. i using code. first have html table <table id="addresstable"> <thead> <tr> <th>id</th> <th>street</th> <th>locality</th> </tr> </thead> <tbody> </tbody> </table> the javascript code appending table: for (var = 0; < features.length; i++) { $("#addresstable tbody").append("<tr><td>" + features[i].attributes["data"] + "</td><td>" + features[i].attributes["data"] + "</td><td>" + features[i].attributes["data"] + "</td></tr>"); } any ideas how solve problem please? thanks ...

java - how to update integer value in sqlite android -

i having problem updation part of below code. insertion working properly. when added update method addition/subtraction of integer stored in database, code no longer working. says app has closed unfortunately. app not opening. please check update method , make sufficient changes. first used code accept name , email. code changed accept number , email. variable name , column name has not been changed. please dont confused these. thank you. mainactivity.java package com.sqltut; import android.os.bundle; import android.app.activity; import android.content.intent; import android.database.cursor; import android.view.menu; import android.view.view; import android.widget.button; import android.widget.edittext; import android.widget.toast; public class mainactivity extends activity { button save,load,updatebtn; edittext name,email,update; datahandler handler; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentv...

Is the Facebook user ID accessible to an app without authorization? -

i'm writing simple survey app facebook (it form asks books people read). don't want information users (except enter in survey), don't want post wall etc., facebook user id, can recognize duplicates. if allow users use app without authorization, can still "see" facebook user id? without authorization?- unfortunately you can't ! the way query current user /me - , requires access token , access token user needs authorize app. if don't want make sure user don't take survey due this- minute chances there happen since each , every app uses authorization. , you're not requesting basic info. so, think should implement if want unique of user! but if don't want implement avoid going through docs , all, ill provide small code need user-id- window.fbasyncinit = function() { fb.init({ appid : '{app-id}', status : true, cookie : true, xfbml : true }); fb.getloginstatus(...

morphological operations in matlab and simulink -

i got issues concerning simulink morphological block erode . i'm using 3x3 neighborhood operation ( strel('square',3) set @ function block parameters ). working fine long found object points aren't located @ image borders. if they're, outcome of block erode still contains border points of image, due erode operation should have been gone. not understanding block or what's basic mistake here? if i'm using matlab function bwmorph() eroding image, gives me desired outcome, i'm expecting. if can't fixed, i'll have implement operation matlab function block in simulink . if so, can tell me runtime increse or decrease, i'm getting? final algorithm compiled rapid prototyping platform via simulink interface. best regards!

android - Geofence transitions service and wakelock -

there an example how receive geofence events enter or exit . example uses ordinary intentservice. far known background services should use wakefulintentservice make sure service can finish job before power off. in test app follow google example , extend service intentservice. , seems work correctly. app writes geofence events sqlite db without problems. therefore i'm curios if (a) luck or (b) when using play services api there no need use wakelocks. i implemented similar service app. wakelock detector shows app has 1500 cpu wakelocks per day 8 geofences. think means, required steps implemented in play services.

python - Second panel does not show up in wxpython application -

i want place 2 panels side side (horizontally) on panel, second panel not show up: import wx szflags = wx.expand | wx.all min_height = 50 height_ratio = 4 pborder = 10 lborder = 5 class chartpanel(wx.panel): def __init__(self, *args, **kwargs): wx.panel.__init__(self, *args, **kwargs) self.setbackgroundcolour(wx.colour(226,226,226)) self.st = wx.statictext(self, label='chart panel') #self.chart = bar_line.canvaspanel(self, "320") sizer = wx.boxsizer(wx.vertical) sizer.add(self.st, 1 , szflags , lborder) #sizer.add(self.chart, 1 , szflags) self.setsizer(sizer) class notebookpage(wx.panel): def __init__(self, *args, **kwargs): fleet = kwargs.pop('fleet_name', none) wx.panel.__init__(self, *args, **kwargs) self.mainpanel = notebookpage_mainpanel(self, name='notebook_page_mainpanel', flee...

android - ShareActionProvider gives error with Theme.Sherlock.Light.DarkActionBar? -

i want actionbar share provider in 1 of activities, , have theme.sherlock.light.darkactionbar basetheme. here how create share option on activity: @override public boolean oncreateoptionsmenu(menu menu) { shareactionprovider provider = new shareactionprovider(getsupportactionbar().getthemedcontext()); provider.setsharehistoryfilename(shareactionprovider.default_share_history_file_name); provider.setshareintent(createshareintent()); menu.add(menu.none, share_action_id, 0, getstring(r.string.action_share)) .seticon(r.drawable.icon_share_white) .setactionprovider(provider) .setshowasaction(menuitem.show_as_action_always); return super.oncreateoptionsmenu(menu); } private intent createshareintent() { intent shareintent = new intent(intent.action_send); shareintent.settype("text/plain"); shareintent.putextra(intent.extra_text, url); return shareintent; } and basetheme: <style name...

jquery - javascript regular expression replace 3digitis from path string -

i have <img> need change 2 digits path. have no idea in how write regular expressions. <img src="/cms/ig/immopix/100/9165c73366c8830058b0f95c0fcacef5_100.jpg" /> ^ ^ | | ------------------------------------ | replace "1" in "6" looks ------------------------------------ | | <img src="/cms/ig/immopix/600/9165c73366c8830058b0f95c0fcacef5_600.jpg" /> the img name md5 value contain "100", cannot replace every "100". how can this? so there few img tags in dom loop this $('.object-overview-wrap').each(function(i){ var img = $(this).child...

ios - Xcode 5.1.1 does not stop the application on simulator -

i updated xcode 5.1.1. today. , after when run application using ios 7.1 simulator. xcode opened simulator , displayed status running app on simulator. took long open application. after hit stop button on xcode kill application. and here problem invoked. xcode never stopped or played application on simulator. kept hitting "play" & "stop" button. nothing happened. so, restarted xcode same happened. then, restarted mac, got same issue. knows why happening. any guidance helpful. i resolved issue. took long time configure problem was. some time ago, had edited etc/hosts file , changed localhost value 128.0.0.1. but found link: https://discussions.apple.com/message/24478004#24478004 which prompt set localhost default value 127.0.0.1 to change value, see given link: https://discussions.apple.com/thread/4488310 doing this, , restart xcode. did trick.

mysql - php show red, amber or green colour div depending on how many days left to go? -

this question has answer here: basic date comparsion expiration checking [closed] 2 answers i have php script tells user when document expire. want amend script , add traffic lighting it, mean if document due expire in 7 days or less show red colour div, otherwise if document due expire in 30 days or less show amber div, or if document not due expire prior 30 days show green colour div. can please show me how can amend script need do, thanks. php: <?php include 'config.php'; $data = mysql_query("select timestampdiff(day, insurance_date, now()) expire_date supplier_stats") or die(mysql_error()); ?> <?php include 'config.php'; $result = mysql_query("select timestampdiff(day, insurance_date, now()) expire_date supplier_stats") or die(mysql_error()); while($row =...

json - Android: put NameValuePair data in JSONObject -

i trying put namevaluepairdata jsonobject. namevaluepairdata has name string , value jsonarray. when tried put namevaluepairdata in jsonobject, jsonobject converts jsonarray value strings. please check below code more details: constructing namevaluepair: list<namevaluepair> namevaluepairs = new arraylist<namevaluepair>(2); namevaluepairs.add(new basicnamevaluepair("id", "1")); jsonarray arr = new jsonarray(); if(arrbean != null && arrbean.size() > 0) { (bean bean : arrbean) { jsonobject idsjsonobject = new jsonobject(); try { idsjsonobject.put("min", bean.getmin()); idsjsonobject.put("m1", bean.getmin()); idsjsonobject.put("sec", bean.getsec()); } catch (jsonexception e) { e.printstacktrace(); } arr.put(idsjsonobject); } } namevaluepairs.a...

Different results between PHP md5() and Ruby Digest::MD5.hexdigest -

i wanted pass md5 hash generated ruby program php program, , found strange. ruby code(result: ad0efdf609e99ec50d9333dc0bd1c11a) digest::md5.hexdigest 'test str1&test str2&test str3&test str4' php code(result: 804160119894a4cc8c376fffbcc21e1c) php online md5 generator you can see results different... if remove "&" in string: ruby code(result: 45fa91e4c89aa6f3bb501531a5de6bf4) digest::md5.hexdigest 'test str1test str2test str3test str4' php code(result: 45fa91e4c89aa6f3bb501531a5de6bf4) php online md5 generator they same. why did happen? md5 algorithm should same in language, shouldn't it? the results of website wrong. here comes example (using php on command line): php -r 'echo md5("test str1&test str2&test str3&test str4");' output: ad0efdf609e99ec50d9333dc0bd1c11a

winapi - Reset Open File Dialog Position in Windows -

i open open file dialog using getopenfilename function. i'm making handler function center dialog window inside owner window. center dialog on cdn_initdone notification. currently, seems windows remembers last dialog position desktop apps , overrides dialog coordinates. how reset last remembered position can check centering work users? i thought running test using different user or virtual machine isn't convenient. unfortunately, searching in registry myexecutable.exe returns nothing. i'm running windows 8. i'm year late, had deal issue. worked me supplying ofnhookproc getopenfilename() , subclassing parent of hwnd passed ofnhookproc . after subclassing, handle wm_windowposchanged , , if coordinates aren't think should be, setwindowpos() , undo subclass , return 0. edit: should other methods, such wm_initdialog in hook proc or cdn_initdone did not work me whatsoever.

sql server - How to select from a table function along with columns from another table -

i have function returns table. takes 1 parameter , returns 1 row. i want select values function along columns table in same select staement. something this: select a.col1, a.col2, b.col1, b.col2 tab1 inner join func1(a.col1) b on a.col1 = b.col1 a.col1 in (123,456,789) this doesn't work, there way can this. so, example, if func 1 returns following each of 3 values in example: col1 col2 123 abc 456 def 789 xyz then expecting following results query: col1 col2 col1 col2 123 xxx 123 abc 456 yyy 456 def 789 zzz 789 xyz i can this, i'd rather not call function multiple times each column want function: select col1, col2, (select col1 func1(a.col1)), (select col2 func1(a.col1)) tab1 a.col1 in (123,456,789) this code true alter function gettable() returns @rtntable table ( sum_cd nvarchar(15) not null, name nvarchar(255) not null ) begin declare @temptable table (sum_cd nvarchar(15), name nvarchar(255)) in...

android - Eclipse - Cannot complete the install because one or more required items could not be found (org.apache.httpcomponents.httpclient) -

i trying install eclipse git team provider , jgit in version of eclipse adt via help > install new software > "egit - http://download.eclipse.org/egit/updates" installation fails error... cannot complete install because 1 or more required items not found. software being installed: java implementation of git - optional http support using apache httpclient 3.3.1.201403241930-r (org.eclipse.jgit.http.apache.feature.group 3.3.1.201403241930-r) missing requirement: apache httpcomponents httpclient osgi bundle 4.1.3.v201209201135 (org.apache.httpcomponents.httpclient 4.1.3.v201209201135) requires 'package org.apache.commons.codec.binary 1.4.0' not found cannot satisfy dependency: from: java implementation of git - optional http support using apache httpclient 3.3.1.201403241930-r (org.eclipse.jgit.http.apache.feature.group 3.3.1.201403241930-r) to: org.apache.httpcomponents.httpclient [4.1.3.v201209201135] it's saying n...

dashboard - Access mysql database to create pentaho dashbord using CTools -

i'm using ctools under pentaho bi server; want generate reports external mysql database. i correctly added data source, , test of connectivity return ok don't know how can access database when creating cde. @+, when click on new cde report find 1 link on above right corner datasourse penel, -> click on datasource penal -> on left side find tab of sql queries ->select option sql on sqljndi , properties tab open, select database want access in jndi column.

c++ - Boost regex expression capture -

my goal capture integer using boost::regex_search. #define boost_regex_match_extra #include <boost\regex.hpp> #include <iostream> int main(int argc, char* argv[]) { std::string tests[4] = { "somestring #222", "somestring #1", "somestring #42", "somestring #-1" }; boost::regex rgx("#(-?[0-9]+)$"); boost::smatch match; for(int i=0;i< 4; ++i) { std::cout << "test " << << std::endl; boost::regex_search(tests[i], match, rgx, boost::match_extra); for(int j=0; j< match.size(); ++j) { std::string match_string; match_string.assign(match[j].first, match[j].second); std::cout << " match " << j << ": " << match_string << std::endl; } } system("pause"); } i notice each regex search results in 2 matches. first being string matched, , second capture in parenth...

flash - Can anyone help me with some basic action script 3.0? -

i art student looking create simple interactive document display in end of year show. have had experience flash, time issue don't have long enough learn basics needed project, if suggest i'd need work that'd fantastic. the document involve multiple movie clip symbols simple coloured dots moving around scene in looped animations. want viewer able toggle visibility of these independent symbols using keys on keyboard. example; release q = toggle visibility of dot 1 on/off release w = toggle visibility of dot 2 on/off etc. the result simple document number of moving coloured dots that, using keyboard, viewer toggle on or off create different colour combinations. i have document set stop (); on frame 1 , have motion of each dot keyed independent timeline on own layer. any massively appreciated in show. thank you really simple as3 work movieclip instance on stage //circle movieclip code gotoandstop(math.ceil(math.random() * this.totalframes)) //choos...

c# - await async write smoothly to ui but still freeze it -

i doing interpreter-ish. ui wpf app. on button click, launch long task has write ui. have done similar things, in past, background worker. realised background worker obsolete , async way go ( less noisy & cleaner etc. ). i've got long task smoothly write text screen while looping, screen still 'frozen' i.e can't click on buttons etc. if add sleep of 30 ms @ end of task.run, ui gets responsive , object events working. sleeps seems make slower 30 ms. private void analyzebutton_click( object sender, routedeventargs e ) { var flowmanager = new interpreterflowmanager(){ ... } flowmanager.initialize(); flowmanager.continueflow(); } .... public class interpreterflowmanager { async public void continueflow() { string linebuffer = ""; string lasttextblockstring = ""; while (...) { lasttextblockstring = ""; bool endloop = false; await task.run(() ...

generics - Why does this Java 8 program not compile? -

this program compiles fine in java 7 (or in java 8 -source 7 ), fails compile java 8: interface iface<t> {} class impl implements iface<impl> {} class acceptor<t extends iface<t>> { public acceptor(t obj) {} } public class main { public static void main(string[] args) { acceptor<?> acceptor = new acceptor<>(new impl()); } } result: main.java:10: error: incompatible types: cannot infer type arguments acceptor<> acceptor<?> acceptor = new acceptor<>(new impl()); ^ reason: inference variable t has incompatible bounds equality constraints: impl upper bounds: iface<cap#1>,iface<t> t type-variable: t extends iface<t> declared in class acceptor cap#1 fresh type-variable: cap#1 extends iface<cap#1> capture of ? 1 error in other words, backwards source incompatibility between java 7 , 8. i've gone thro...

java - Lucene index not updated with Hibernate Search and Spring Data -

i getting started hibernate search/lucene using spring boot , spring data, having issue index not getting updated (checked luke tool). i have 3 classes in domain. datasheet , root entity: @entity @indexed public class datasheet { @id @generatedvalue() private long m_id; @field(name="name") private string m_name; @field(name="description") private string m_description; @indexedembedded(prefix = "documents.") @onetomany(cascade = cascadetype.remove) private set<datasheetdocument> m_documents; } then datasheetdocument : @entity public class datasheetdocument { @id @generatedvalue() private long m_id; private string m_originalfilename; @field(name="componentname") private string m_componentname; @indexedembedded(prefix = "manufacturer.") @manytoone private manufacturer m_manufacturer; } and manufacturer : @entity public class manufactur...

python - How can I get the mean value of an array? -

i trying calculate mean value of last 10 elements. first reading out data file: np.genfromtxt(filename,skip_header=6, names=true) first tried use numpy.mean function getting following error: typeerror: cannot perform reduce flexible type so decided of writing function: def get_mean_values( marray, nr ): """ """ # creating empty array tmp = np.delete( marray[-1:], 0, 0 ) key in marray.dtype.fields: tmp[key] = np.append( tmp[key], np.mean( marray[key][nr:] ) ) print tmp return tmp but tmp array empty. how can calculate , store mean value of last 10 elements. this how data looks array([ (99.9, 9.0), (100.0, 9.0) ....], dtype=[('time', '<f8'), ('horwind', '<f8')]) the mean function works fine long specific enough :) import numpy x = numpy.array([(99.9, 9.0), (100.0, 9.0)], dtype=[('time', '<f8'), ('horw...

Object reference not set to an instance of an object c# opening new form -

this question has answer here: what nullreferenceexception, , how fix it? 29 answers ask user username , password on click button checks database connected username , password, when correct stores it's id number in variable, default variable 0. then run if-statement, if id >= 0, needs open form. if not displays error message. messagebox in first if case displays correct id (1,2,3 whatever) on form3, simple textbox1.text = "hi"; gives me error: object reference not set instance of object c#. , displays textbox line. int idnumber = 0; sqlcommand datacommand = new sqlcommand(" select id leden [username]='" + username_txt.text + "' , [password]='" + password_txt.text + "'", sc); sc.open(); idnumber = convert.toint32(datacommand.executescalar()); sc.close(); ...

c++ - Making a custom class ostream outputable? -

i'm trying print balance checking , savings account. know can't return value using void function, in way can show balances both accounts? #ifndef account_h #define account_h // account.h // 4/8/14 // description class account { private: double balance; double interest_rate; // example, interest_rate = 6 means 6% public: account(); account(double); void deposit(double); bool withdraw(double); // returns true if there enough money, otherwise false double query(); void set_interest_rate(double rate); double get_interest_rate(); void add_interest(); }; #endif // bank.cpp // 4/12/14 // description #include <iostream> #include <string> #include "bank.h" using namespace std; bank::bank(): checking(0), savings(0) { } bank::bank(double checking_amount, double savings_amount): checking(checking_amount), savings(savings_amount){; checking = account(checking_amount); savings = account(savings_amount); } ...

angularjs - Passing a controller function between directives -

i have set of 2 directives call each other recursively render tree structure. i need pass controller function reference directives in turn, need pass each other reference. seems work except parameters. passing reference directive: <item-list items="data" functionreference="controllerfunction(name)"></item-list> passing reference between directives: <item-list items="item.children" functionreference="functionreference(name)"></item-list></li> calling function: $scope.functionreference({name: name}); here's example (jsfiddle) what proper way declare , pass function reference? in itemlist template: template: '<ul><item ng-repeat="item in items" item="item" functionreference="functionreference(name)' you reference function functionreference(name) , can't call (you should calling functionreference({name:name}) instead. so, changing ...

database performance - how to load data faster with talend and sql server -

Image
i use talend load data sql-server database. it appears weakest point of job not dataprocessing, effective load in database, not faster 17 rows/sec. the funny point can launch 5 jobs in same time, , they'll load @ 17rows/sec . what explain slowness , how improve speed? thanks new informations: the transfer speed between desktop , server 1mbyte my job commits every 10 000 i use sql server 2008 r2 and schema use jobs this: database insert or update methods incredibly costly database cannot batch of commits @ once , must them line line (acid transactions force because if attempted insert , failed of other records in commit fail). instead, large bulk operations best predetermine whether record inserted or updated before passing commit database , sending 2 transactions database. a typical job needed functionality assemble data insert or updated , query database table existing primary keys. if primary key exists can send update , otherwise insert . l...

objective c - How to set default value in iOS Mantle model subclass -

@interface entity () @property (assign) int searchtotalpagesall; @property (assign) int searchtotalpagesideas; @end @implementation entity + (nsdictionary *)jsonkeypathsbypropertykey { return @{ @"id": @"entity.id_entity", @"name": @"entity.name", @"coverage" : @"entity.coverage", @"id_city": @"entity.id_city", @"cityname":@"entity.city", @"countryname":@"entity.country", @"statename":@"entity.district", @"countrycode": @"entity.countrycode", @"keyword1": @"entity.key1", ... etc since mantle examples doesn't have init method, should initialize properties (searchtotalpagesall, searchtotalpagesideas) default values ? model has internal methods need , several other properties. whether create mantle m...

.net - How to exclude Dictionary properties such as Comparer when getting properties using Reflection TypeDescriptor.GetProperties? -

i have below line of code properties on object validated dictionary object @ run time. dim properties system.componentmodel.propertydescriptorcollection = _ system.componentmodel.typedescriptor.getproperties(pobject) but including comparer property in properties result. how can exclude property? know workaround? thank help! if know properties want exclude (by name) can exclude them explicitly. propertydescriptorcollection type weird one, ienumerable , it's not ienumerable<propertydescriptor> , , additionally, if via getproperties call it's read-only, cannot remove directly. can do, create new list, move need there, , then, create propertydescriptorcollection new list, this: dim pobject = new dictionary(of string, string) dim properties propertydescriptorcollection = _ typedescriptor.getproperties(pobject) ' create new list dim proplist = new list(of propertydescriptor) ' loop through properties each ...

objective c - Meaning of clearance of generation analysis memory growth on simulator "simulate memory warning" event -

i trying debug memory growth in generation analysis , frustrated (lots of objects result of call tocgglyphbitmapcreate not being released) . then, ran program on simulator , captured many generation snapshots , did simulate memory warning. every generation cleared 0 ( few had few bytes here , there). mean code fine , should not worry it? how can prevent growth wont have wait until simulate memory warning event clear growth? (by way, these growth caused system libraries) if memory getting released upon memory warning, you're ok. os cache sorts of stuff (that free/reuse sees fit) don't have concerned about. still, run code through static analyzer (press shift + command + b in xcode or select "analyze" on xcode "product" menu) safe.

There is a name for this technique of mapping url? -

instead construct url in mode: http://www.mysite.com/user/view?name=michele&age=30 write this: http://www.mysite.com/user/view/name/michele/age/30 or http://www.mysite.com/user/view,name-michele,age-30 and on. i believe looking called rest: representational state transfer (rest) architectural style consisting of coordinated set of architectural constraints applied components, connectors, , data elements, within distributed hypermedia system. rest ignores details of component implementation , protocol syntax in order focus on roles of components, constraints upon interaction other components, , interpretation of significant data elements. web service apis adhere rest constraints called restful. +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------...

Matrix filling for the Smith-Waterman algorithm in CUDA -

Image
i need advice on how optimizing implementation of smith-waterman algorithm in cuda. the part want optimize filling matrix. due data dependence between matrix elements (each next element depends on other ones - left it, it, , left-up it), i'm filling anti-diagonal matrix elements in parallel, illustrated in picture below: my program operates in loop as int diag = 1; for(int x = 0; x < size_b; x++) { block_size = 1024; if(block_size > diag) { block_size = diag; } safe_kernel_call((dev_init_diag<<<(diag - 1)/block_size + 1, block_size>>>(h, size_a, size_b, x, sequence_a, sequence_b, false, x_offset, y_offset, null_ind))); diag++; } as can see, there 1 kernel call each diagonal. since have quite large matrices (with 21000 elements on side), there lot of kernel calls. result, have large overhead cuda kernel calls, wasting half of processing time, can seen screenshot of visual profiler (look @ ...