Posts

Showing posts from September, 2014

java - Unknown Mapping Entity at session.bynatural ID in Hibernate 4.3 +Spring 4 + Teneo 2.1 -

i have upgraded hibernate (3 4.3.8) , spring (3.0.6 4.0.6) , teneo (1.2 2.1) in application. every thing related db working fine apart below api session.bynaturalid(cl).using( constants.object_id, objectid).getreference(); it throws hibernate mapping exception : unknown mapping entity [classname] but @ same time, in same environment below apis working fine. 1) criteria criteria = session.createcriteria(cl).add(restrictions.eq(constants.object_id, objectid)); criteria.setcacheable(true); list<t> list = criteria.list(); if(list != null && !list.isempty()) obj = list.get(0); 2) obj = (t) session.get(classname, id); i don't understand why it's behaving this. thanks in advance!..

c# - Custom editor resets list every frame -

i trying make reorderable list in unity storing list of custom classes: using system; using unityengine; [serializable] public struct onboardingitemdata { [tooltip("the hint gameobject")] public gameobject prefab; [tooltip("the object hint highlighting")] public gameobject target; } this class in list: using system; using system.collections.generic; using unityengine; public class onboardingitemlist : monobehaviour { public list<onboardingitemdata> list = new list<onboardingitemdata>(); private void update() { debug.log("list count: " + list.count); } public void refresh() { (int i=0; < list.count; i++) { if (list[i].prefab != null) { list[i].prefab.getcomponent<onboardingitemclickhandler>().id = i; } } } public virtual void show(int id) { debug.lo...

javascript - Vue.js Axios get value from local storage (localforage) returns promise object instead of value -

i trying value localforage axios call, not working. axios.get('https://api.example.org/api/?uname=' + this.$getitem('lsuname'), { withcredentials: true, headers: {'authorization': 'bearer ' + this.$getitem('lsmytoken')} }) i'm getting 403 error in console: xhr failed loading: " https://api.example.org/api/?uname=[object%20promise] ". i have tried this.$getitem('lsuname').then(value => { return value }) , this.$getitem('lsuname').then(function (value) { return value }) same exact 403 , bad url promise @ end i able correctly return value without issue elsewhere in vue so: this.$getitem('lsuname').then(value => { console.log('uname:' + value) }) looks this.$getitem asynchronous call return promise . means have wait call finish before calling code depends on returned values of async calls. in case, use promise.all() wait of async calls return before making ...

Neo4J Rebuild C# instance from node with childs -

i'm trying find best solution "deserialize" results neo4j have nodes defines complex structure childs (no circles) structure->structureitem->structure | structureitem->structure | structure first load path node it's childs var result = _client.cypher .match("(structure:structure{id:123})") .optionalmatch($"p=(structure)-[:structureitem|structure*]->(structurechild)") .return<ienumerable<string>>("nodes(p)") .results; and each node in path i'm adding child's instance if it's not exists var structuredict = new dictionary<string, structure>(); var structureitemsdict = new dictionary<string, structureitem>(); structure result = null; foreach (var nodes in result) { structure existsstructure = null; st...

excel formula - Sumproduct with Three Criteria and -

i trying figure out how search left character in cell, 1 or 2, , search short string, ‘flow’ inside of longer string, ‘system flow’ or ‘flow control’, , if 2 criteria met, take average of numbers in corresponding rows, in column m. so, third criteria. came function below, returns 0, not correct. =sumproduct((left(k38:k44,1)=c38)*(isnumber(find(d38,l38:l44))))*m38:m44 any thoughts on wrong here? thanks! use averageifs(): =averageifs(m38:m44,k38:k44,c38 & "*",l38:l44,"*" & d38 & "*") edit, deal change of numbers , strings need adjust formula bit: =sumproduct((left(k38:k44,1)=text(c38,"@"))*(isnumber(search(d38,l38:l44)))*m38:m44)/sumproduct((left(k38:k44,1)=text(c38,"@"))*(isnumber(search(d38,l38:l44))))

javascript - jQuery detect when content is loaded -

i building ajax filter, replacing container on page. after content appended dom need foreach each block of newly appended content , height of , set each of them max height. here tricky part.when content appended images not loaded, cannot calculate accurately height of whole block. here code. $.ajax({ ... success: function(html) { $('#product-pagination-container').html(html); adjustboxheights(); //sroll products /* $('html,body').animate({ scrolltop: $('#product-pagination-container').offset().top}, 'slow'); */ }, error: function(err) { console.log(err.responsetext); } }); function adjustboxheights() { var maxheight = 0; $('.product-grid > div, .content-top .product-layout > div, .content-bottom .product-layout > div').each(function(){ $(this).height('auto'); if (maxheight < $(this).height()) {maxheight = $(this).height()} }); $('.product-gri...

osx - Setting AFP volume as working directory in R on Ubuntu 16.04 -

i have data on shared network (mac osx) folder follows: '/run/user/1000/gvfs/afp-volume:host=mac.local,user=mico%20zico,volume=shared/server/gz' r doesn't read folder @ all. there way redefine in r understandable path? gvfs-mount below m@workstation-w60:~$ gvfs-mount -l drive(0): samsung ssd 850 evo 1tb type: gproxydrive (gproxyvolumemonitorudisks2) volume(0): system type: gproxyvolume (gproxyvolumemonitorudisks2) volume(1): system-reserviert type: gproxyvolume (gproxyvolumemonitorudisks2) mount(0): system-reserviert -> file:///media/m/system-reserviert type: gproxymount (gproxyvolumemonitorudisks2) drive(1): hl-dt-st bd-re bh16ns40 type: gproxydrive (gproxyvolumemonitorudisks2) drive(2): toshiba external usb 3.0 type: gproxydrive (gproxyvolumemonitorudisks2) volume(0): external type: gproxyvolume (gproxyvolumemonitorudisks2) mount(0): external -> file:///media/m/ type: gproxymount (gproxyvolumemonitorudisks2) mount(0): shared mico zico on mac -> a...

How to restrict mongodb aggregation for a given set -

Image
the following query compute sum of gdp per country. query through each country. lets want modify algo: find gdp given subset of countries {br, cn , uk} only how can done in mongodb ? this picture credited youtube video here: https://www.youtube.com/watch?v=8xia4i4eepe if want filter country and sum(gdp) add match stage before grouping. example: db.world_gdp.aggregate([ // focus on br, cn , uk countries ... subsequent stages in // pipeline docs these countries { $match: { country: { $in: ['br', 'cn', 'uk'] } } }, // group country , sum gdp { $group: { _id: "$country", gdp: { $sum: "$gdp"} } }, // restrict countries having sum(gdp) >= 2500 { $match: { gdp: { $gte: 2500 } } }, // sort sum(gdp) { $sort: { gdp: -1 } } ]) or, if interested in filtering country instead of filtering sum(gdp) try this: db.world_gdp.aggregate([ // focus on br, cn , uk countries ... subsequent stages in // pi...

wix - Major upgrade on a multi-instance installer -

i'm reluctant ask question @ time, repeat wix - doing major upgrade on multi instance install ... yet hope question answered :) i have installer multiple instances: <product id="{guid}" upgradecode="{guid}" version="!(wix.version)" name="myproduct" manufacturer="mycompany"> <majorupgrade schedule="afterinstallexecute" downgradeerrormessage="a newer version of [productname] installed." /> <property id="instanceid" value="default" /> <instancetransforms property="instanceid"> <instance id="i01" productname="myproduct_i01" productcode="{guid}" upgradecode="{guid}" /> <instance id="i02" productname="myproduct_i02" productcode="{guid}" upgradecode="{guid}" /> . . . <instance id="i49" productname="myproduct_i49" p...

javascript - How to dynamically display different components type based on runtime constraints in Angular2+? -

i have grid component , dynamically determined second component. there splitter component contains grid in top part. secondary component displayed in bottom part of splitter. type of secondary component depend on selected row type in grid. select row 1 , secondary component might line chart select row 2 , secondary component might grid... user changes selected row, component , data displayed need updating. any ideas on how set up? you can dynamically load second component [ngswitch] directive. if want dynamically load them, build code similar this <div [ngswitch]="variable"> <app-first *ngswitchcase="1"></app-first> <app-second *ngswitchcase="2"></app-second> </div> it's how determine component should loaded. can example change value of variable jquery of plain javascript render specific component. component automatically updated if change row. if want automatically update content ...

excel vba - Access Saving a Macro-Enabled Spreadsheet, ERROR -

Image
i trying access open macro-enabled file macro-enabled template, fill in data save it. i keep getting following errors: 1- excel template hidden using application.visible = false in thisworkbook section 2- if click yes make macro-free workbook following run-time error 3- if click no run-time error this code using: workorder = me.txtworkorder & "_" & me.txtactorder set xlapp = new excel.application xlapp.visible = false excel.application.enableevents = false set wb = xlapp.workbooks.open("h:\template , testers\template\tablettemplate.xltm") set ws = xlapp.worksheets("profile") ws.activate if me.txtworkocheck = 1 'workorder ws .range("b1") = me.txtworkorder .range("b2") = me.txtuserid .range("b3") = me.txtjobsiteid .range("b4") = me.cboplant.value .range("b5") = me.cboarea.value .range(...

from codeigniter query to javascript log -

i need pass query codeigniter javascript console log in-order view data in javascript have model public function getchartdata() { $this->db->select('month,completion_percentage'); $this->db->from('monthlyreport'); $this->db->order_by('project_no', 'asc'); $query = $this->db->get(); $result = $query->result(); $data_list = array(); foreach ($result $row) { $data_list[] = $row->month; $data_list[] = $row->completion_percentage; } return $data_list; } my controller: public function monthlyreport() { $this->load->view('monthlyreport'); } and internal script: <script type="text/javascript"> $(document).ready(function){ $.ajax({ method: 'get', url: '<?php echo site_url('main/chart_api')?>', success: function (data) { console.log(data); },...

tsql - SQL Server to count how many times a value appears between multiple date ranges -

i have table 2 columns in question. column - timestamp column b - empid what i'm trying compare weeks see how many times empid has repeated. example: week1 base (starting date range e.g. between '2017-07-22' , '2017-07-29 23:59:59.993'). want compare week2 against week1. if empid repeats in week2 see count of 2 , if appears first time in week2 count of 1. moving on week3. if empid appears in week1, week2 , week3 want see count of 3, if appears in week2 , week3 count of 2 , if appears in week3 count of 1. and week4. if empid appears in week1, week2, week3 , week4 want see count of 4. if empid appears in week2, week3 , week4 count of 3, if appears in week3 , week4 count of 2 , if appears first time in week4 count of 1. any appreciated. added i've tried far not getting desired results. select t.emp_id, (select count(emp_id) [vacation audit care 2017] ((upload_date between '2017-07-22' , '2017-07-29 23:59:59.993') or(uploa...

How to get exact number from text field in sql server table -

Image
i have 1 table including customer_contact_no, name, income. want customer net income value income column. final output should below. there 100000+ rows in table. af-4838 - mr.gayan doctor , salary- rs.95000/-. has coconut land , monthly income rs.150000/-. expenses – rs.55000 , net income – rs.190000/- av-7392 - monthly net income 55000/- af-3746 - wife’s salary –rs 25000, shop owner , monthly income shop = rs 100000/- , net income month rs. 80000/- after expenses of rs.45000 af-6453 - total monthly net income 60000/ declare @test table ( val varchar(300) ) insert @test select 'blah blah blah net income blah blah 86000' insert @test select 'blah blah blah net income blah blah 4000, expenses 0' insert @test select 'blah blah blah net income blah blah 80,000 g' insert @test select 'blah expenses 60 blah blah net income blah blah 6000 blah ' insert @test select 'blah net income whatever 6000. blah blah net income bl...

Need some explanations about bracket's live preview -

have downloaded brackets , must say, feels kind of nice. noticed when hit live preview button, brackets opens browser url of file (file:///....), , opens url of ip address of localhost (127.0.0.1....). seems random- 1 thing, , when reopen brackets, other. read bit live preview , without backend, , if understood correctly, should simpley click live preview button , brackets supposed open live preview without backend, said, opens live preview backend. don't know if bug, or on computer or lack of understanding me. can :d? in advance.

php - Unable to return 'attribute' data in Woocomerce -

pa_i trying dog products' attribute data in order compare attribute between items in cart. however, cannot access data. following code returns following on var_dump command: c:\wamp\www\wizstaginglocal\wp-content\plugins\code-snippets\php\snippet-ops.php(426) : eval()'d code:17:boolean false in other words nothing code: add_action('woocommerce_before_cart', 'wiz_scale_woocommerce_before_cart'); function wiz_scale_woocommerce_before_cart() { foreach(wc() -> cart -> get_cart() $cart_item_key => $cart_item) { // here wc_product object $product = $cart_item['data']; echo "my product id {$cart_item['product_id']} \n"; $attributes = $product -> get_attributes(); foreach($attributes $taxonomy => $value) { // wp_term object $term_obj = get_term_by('pa_1_scale', $value, $taxonomy); $term_name = $term_obj -> name; } ...

Creating a Correlation Matrix between Types in a Column based on Date Column in SAS -

i have table looks this: product_type sales date 470 1/1/2017 233 1/2/2017 312 1/3/2017 139 1/4/2017 343 1/5/2017 234 1/6/2017 b 441 1/1/2017 b 175 1/2/2017 b 293 1/3/2017 b 109 1/4/2017 b 314 1/5/2017 b 55 1/6/2017 c 292 1/1/2017 c 212 1/2/2017 c 372 1/3/2017 c 452 1/4/2017 c 362 1/5/2017 c 6 1/6/2017 i'm trying create correlation matrix gives me correlation product_type based on dates. need output this: b c 1.0 0.8 0.1 b 0.2 1.0 0.2 c 0.6 0.2 1.0 the way know how creating new table breaking out each product_type column based on date this: proc sql; create table test select date ,sum(case when product_type = 'a...

Is there a cleaner way to write null propagation in the earlier version of C#? -

i have class. class property { public int? propertyid { get; set; } } i have following statement wrote in c# 6.0 property p = null; var id = p?.propertyid.getvalueordefault() ?? 0; turns out null propagation doesn't work in c# 5.0. rewrote as: int id = 0; if (propertybyaddress != null && propertybyaddress.propertyid != null) { id = p.propertyid.value; } it seems unnecessarily wordy. there cleaner way in c# 5.0? you can still use getvalueordefault in c# 5.0, yes null check necessary. int id = 0; property p = null; if (p != null) id = p.propertyid.getvalueordefault(); you make extension method pointed out camilo, if feel that's "cleaner". propertyextensions.cs public static int getpropertyidvalueordefault(this property p) { if (p != null) return p.propertyid.getvalueordefault(); return 0; } usage: property p = null; var id = p.getpropertyidvalueordefault();

android - sendEmail method in dynamically created button? -

i dynamically created buttons , want send email clicking on these buttons, goes wrong. nothing happens. :( please me, beginner. adapterlistingorders: public class adapterlistingorders extends appcompatactivity { private button btnaccrejorders; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.adapter_listing_orders); toolbar toolbar = (toolbar) findviewbyid(r.id.toolbar); setsupportactionbar(toolbar); btnaccrejorders = (button) findviewbyid(r.id.order_acc_rej); btnaccrejorders.setonclicklistener(new view.onclicklistener() { @override public void onclick(view v) { log.i("send email", ""); string[] = {""}; string[] cc = {""}; intent emailintent = new intent(intent.action_send); emailintent.setdata(uri.parse("mailto:")); emailintent.settype(...

Python unit testing Class properties -

i trying figure out if there's way (unit test) verify property , setter called set name attribute. class dummyname: def __init__(self): self.name = '' @property def name(self): return self.name @name.setter def name(self, name): if not isinstance(name, basestring): raise exception('name must string.') self.name = name trying this... @mock.patch.object(dummyname, 'name', new_callable=propertymock) def testnameproperty(self, mock_name): mockname = mock() mock_name.return_value = mockname dummyname = dummyname() dummyname.name = 'test_name' # assert setter called set name # assert name called name # assert name 'test_name' seems name() , setter never accessed. has better idea? thanks! by using mocks you've overwritten code you're trying test. mocks calls external code under test. an appropriate test code assert exception r...

Php - Chmod Not Working -

using chmod want change chmod values of files user. not work. code is; $chmod = "0777"; chmod($filename, $chmod); i entering chmod 777. chmod value of file 1411. tried chmod 0777, 777, 00777. result same. the problem has data conversion. $chmod = "0777"; chmod($filename, octdec($chmod)); by passing in $chmod string converted 777 witch not giving want. octdec("0777") output 511 decimal give chmod value want.

java - PCF - Kafka Deployment -

i using pivotal cloud foundry deploying microservices. building eventservice uses kafka messaging. kafka available in pcf marketplace or possible run kafka on pcf or should hosted externally? the options amit's response here still valid. major difference cf persistence proposal linked has been completed , feature called volume services . using volume services, can have persistent store mounted application container. would, in turn, allow deploy kafka application on pcf , not lose data. that said, still need service broker if want integrate kafka marketplace. optional though, create user provided services instead, , doesn't require broker. hope helps!

c - A fscanf is making a error in a if condition -

i have problem in 1 function. in there open .txt (wich opens right, , start save variables until if. enter in condition doesn't sfanf. program can build , run until passes function. says problem in coments above fscanf error is. previous code workking should. ppac le_pacientes(char *nomefich){ ppac lipac=null,novo,aux=lipac; pac pacientes; file *f; f=fopen(nomefich,"rt"); if(!f){ printf("erro ao abrir ficheiro\n"); return null; } pacientes.prox=null; while(fscanf(f,"%100[^\n]",pacientes.nome)==1){ fscanf(f,"%d-%d-%d",&pacientes.dn,&pacientes.mn,&pacientes.an); pacientes.idade = verifica_idade(lipac); fscanf(f,"%d consultas",&pacientes.nconsult); if(pacientes.nconsult>=2) { /// !!!!problem!!!! /// fscanf(f,"%s",pacientes.tipoc1);printf("hello\n\n"); //fscanf(f,"%d/%d/%d -",&pacientes.dc1, // &p...

linux - Eclipse installation error with java? JVM terminated -

Image
i getting error whenever trying install eclipse on linux. new linux user, before asking here tried lot of methods other problems mentioned on stack overflow. my java version: mukul@mco0l ~ $ java -version java version "1.8.0_144" java(tm) se runtime environment (build 1.8.0_144-b01) java hotspot(tm) 64-bit server vm (build 25.144-b01, mixed mode) mukul@mco0l ~ $ i can't understand problem.

sql - EMS Bridge JMS Selector: How to filter messages based on their size -

i have topic on ems server central error-log topic distribute messages appropriate destinations. created queue called auto.log want store error messages. created bridge between topic , queue. having issues jms selector. current jms selector based on jmscorrelationid . 2 messages placed onto queue given error scenario test because have same correlationid, , 1 of them don't need. message seek about 4.6kb every time while other around 1kb . how can filter messages central topic , place messages on auto.log queue more 4kb in size? i tried jmsmessagesize , don't know how formulate proper jms selector statement, when creating bridge. tried different variations don't know if going in right direction. here have tried filtering based on message size: jmsmessagesize >= 1000 jmsmessagesize '4%' any suggestions, comments, references appreciated. thanks!

node.js - How to use multiple subdomains and angular apps with nodejs -

i want able use multiple, dynamic subdomains, account holders, while having api subdomain. below: https://example.com --> angular 4 public landing page app https://api.example.com --> nodejs api https://otbs.example.com --> angular 4 saas application https://test-account.example.com --> angular 4 saas application the public landing page app angular 4 app public facing application, whereas saas application actual application itself, when users logged in, , mapped subdomain per linked account. i using nodejs, express 4, angular 4, , angular cli. intention use s3 serving client angular applications, while having nodejs api run in elasticbeanstalk. is configuration possible? have looked in virtual hosting on aws, isn't i'm looking need ability register new subdomain every time new account created. we have done using aws cloudfront wildcard dns mapping through route53. approach map *.example.com cloudfront distribution , use override record set api.e...

maven - Primefaces Tag <p:organigram> doesn't work -

Image
the error: http status 500 - /organigram.xhtml @12,15 <p:organigram> tag library supports namespace: http://primefaces.org/ui, no tag defined name: organigram the scenario is: i'm using primefaces 6.1 version, component needs @ least v6.0.8 version. i'm using ultima theme too. follows primefaces dependency. <dependencies> <dependency> <groupid>org.primefaces</groupid> <artifactid>primefaces</artifactid> <version>6.1</version> </dependency> </dependencies> <repositories> <!-- 3.5 , older --> <repository> <id>prime-repo</id> <name>primefaces maven repository</name> <url>http://repository.primefaces.org</url> <layout>default</layout> </repository> </repositories> organigram.xhtml <ui:composition xmlns="http://www.w3.org/1999/xhtml" ...

jquery code with [id*=btnSubmit] -

protected void page_load(object sender, eventargs e) { if(!ispostback) { string script = "$(document).ready(function () { $('[id*=btnsubmit]').click(); });"; clientscript.registerstartupscript(this.gettype(), "load", script, true); } // more stuff... } can please explain jquery code doing. confused part : string script = "$(document).ready(function () { $('[id*=btnsubmit]').click(); });"; when page loaded $(document).ready(function () apply click event buttons id contains string btnsubmit $('[id*=btnsubmit]').click();

python - Pandas: Convert List Comprehension to Use Apply -

i have pandas dataframe beautiful_soup column (it contains beautifulsoup object). want add column several html tags (e.g. number of img tags). for instance, old code using list comprehension: df['text_img_count'] = [len(x.find_all('img')) x in df['beautiful_soup']] but using apply should faster, wanted convert code. i thinking of writing small function pass apply , like: def get_imgs_count(): and i'd call this: df['text_img_count'] = df['beautiful_soup'].apply(get_imgs_count) since i'm going doing bunch of html tags, don't want write ton of super similar functions. prefer writing like: def get_tag_count(df, tag) and call this: get_tag_count(df, 'img') but don't think can pass function arguments apply ... how might go converting list comprehension using apply ? thanks! i use functools ' partial application from functools import partial def get_tag_count(bs, tag): retu...

java - Change a list to map in Kotlin while customize this convert -

var listofnums = listof(1,9,8,25,5,44,7,95,9,10) var mapofnums = listofnums.map { it+1 }.tomap() println(mapofnums) result {1=2, 9=10, 8=9, 25=26, 5=6, 44=45, 7=8, 95=96, 10=11} while need result, adds contents of next element current element while need map current element next element my goal result {1=9, 8=25, 5=44, 7=59, 9=10} for kotlin 1.1: first, use zip create list adjacent pairs. drop every other pair, before converting map . this: val list = listof(1,9,8,25,5,44,7,95,9,10) val mapofnums = list.zip(list.drop(1)) .filterindexed { index, pair -> index % 2 == 0 } .tomap()) for kotlin 1.2: kotlin 1.2 brings chunked function make bit easier. function divides list in sublists of given length. can this: val list = listof(1,9,8,25,5,44,7,95,9,10) val mapofnums = list.chunked(2).associate { (a, b) -> b }

python - Roc curve multiclass cross validated data set -

i try compute multiclass roc curve on cross validated data set. have no train , test set. now, line fpr[i], tpr[i], _ = roc_curve(y[:, i], y_pred[:, i]) gives me following error: indexerror: many indices array . tried fpr[i], tpr[i], _ = roc_curve(y, y_pred) . error: valueerror: data not binary , pos_label not specified . can see problem? vec = dictvectorizer() x = vec.fit_transform(instances) scaler = standardscaler(with_mean=false) x_scaled = scaler.fit_transform(x) enc = labelencoder() y = enc.fit_transform(labels) n_classes = 3 feat_sel = selectkbest(mutual_info_classif, k=200) x_fs = feat_sel.fit_transform(x_scaled, y) clf = onevsrestclassifier(logisticregression(solver='newton-cg', multi_class='multinomial')) clf.fit(x_fs,y) clf.label_binarizer_ y_pred = model_selection.cross_val_predict(clf, x_fs, y, cv=10) fpr = dict() tpr = dict() roc_auc = dict() in range(n_classes): fpr[i], tpr[i], _ = roc_curve(y[:, i], y_pred[:, i]) roc_auc[i] = ...

java - App crashes when calling startActivityForResult -

i'm working on first android app, in case me cook better. have 2 activities i'm struggling with, mainactivity.java , whatcanimake.java. when start whatcanimake mainactivity using startactivity(intent) , i'm able pass objects using parcelables , use whatcanimake. issue want able pass list of i've changed in whatcanimake activity. example: pass in list of ingredients have, , whatcanimake removes ingredients recipe uses. i'd pass updated list of remaining ingredients. the problem i'm having startactivityforresult() . able use startactivity() , pass intent parcelables, , bob's uncle. when changed on startactivityforresult() , new activity fails launch, app crashes before hitting oncreate() . points implementation of startactivityforresult() , i've read every stack overflow question related startactivityforresult() , i'm here! my code starting whatcanimake below, onactivityresult() , corresponding code inside whatcanimake. it's odd me can ...

Flyway using Jenkins -

hello new flyway, exploring db migration , version tracking using jenkins. have oracle db in project, here error getting when try run baseline using jenkins job. $ /var/lib/jenkins/flyway-4.2.0/flyway -user=oracle ******** -url=jdbc:oracle:thin:@//10.202.98.95:1521/orcl -locations=/var/lib/jenkins/flyway-4.2.0/sql info baseline flyway 4.2.0 boxfuse error: unable instantiate jdbc driver oracle.jdbc.oracledriver : oracle.jdbc.oracledriver error: build step 'invoke flyway' failed due errors. it helpful if 1 let me know causing error, in advance it need "install" oracle jdbc driver flyway. find oracle driver (often called ojdbc6.jar ) , copy flyway/drivers per documentation .

.htaccess - redirect missing pages - why isn't this working? -

i have in .htaccess file. think should redirect http://bashof.org/hall_of_fame_1980.html - -> http://bashof.org/category/inductees/1980/ anyone know why isn't working? # begin wordpress <ifmodule mod_rewrite.c> rewriteengine on rewritebase / rewriterule ^index\.php$ - [l] rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule . /index.php [l] </ifmodule> # end wordpress rewriteengine on rewriterule ^hall_of_fame_1980\.html category/inductees/1980/ [r=301,nc]

java - Getting incompatible types on the server but local for maven build -

i trying maven build spring , hibernate based project. when build using eclipse, build success. , when pushed code on server, getting compilaiton error. have done same thing did on local eclipse based environment , still getting error. [error] compilation error : [info] ------------------------------------------------------------- [error] /home/myusername/webappws/src/main/java/abc/efg/webapp/controller/mycontroller.java:[122,54] incompatible types: abc.efg.webapp.orm.metadata cannot converted abc.efg.webapp.orm.myterm [info] 1 error [info] ------------------------------------------------------------- [info] ------------------------------------------------------------------------ [info] build failure how can troubleshoot considering fact same thing works in local eclipse setup , not on server? thanks

oracle - Disable compression on partitioned index? -

i'm trying disable compression in database, , i've been able except partitioned indexes @ index level. i've run these queries: alter table <table_name> move nocompress; alter index <index_name> rebuild nocompress; alter index <index_name> rebuild partition <partition_name> nocompress; alter index <index_name> modify partition <partition_name> nocompress; alter index <index_name> rebuild subpartition <subpartition_name>; to ensure no compression being used partition level downward, query select * dba_indexes compression = 'enabled'; still returns results, , can't use alter index ... rebuild here, because of "ora-14086: partitioned index may not rebuilt whole." hoping use 'alter index ... modify default attributes nocompress' , doesn't seem work. is there way disable compression @ index level without manually rebuilding each index? "is there way disable compr...

Java use Apache common compress to unzip file -

Image
i have zip file directory below: is there anyway can apache common compress decompress entire zip file, whenever directory tar file or tgz file, decompressed directory. or have decompress each directory 1 one? ideas or suggestions?

javascript - How do I show the message of the input box after submitting my form? -

i building form. , wish keep input value visible after submitting form. followed instructions online use showmessage() function, however, it's not working me. <form id = "form1" action="." method="post">{% csrf_token %} <div class=".col1" style="float:left;vertical-align: middle;"> {{ form.region }} {{ form.operator }} </div> <div id = "form1_value" class="col-xs-2 style="vertical-align: middle;"> {{ form.value }} </div> </form> <div> <input type="button" class = "btn" value="run" onclick="submitform1(), showmessage()"/> </div> your onclick function should read submitform1() , should make ajax request, greatly simplified using jquery: $.ajax({ method: "post", url: ".", // action attribute of <form> data: { ke...

java - Dynamic pointcut in spring-aop logging? -

is there way can logging using dynamic pointcut in spring aop scanning beans in package , intercepting methods? here example of aspect intercept public methods of classes in particular package. can use starting point. @aspect public class loggingaspect{ @around("execution(public com.test.model..*.*(..))") public void loginvocation(proceedingjoinpoint joinpoint) throws throwable { system.out.println("doing logging before"); joinpoint.proceed(); // execute target method system.out.println("doing logging after"); } }

arcgis - Layers not loading on Web AppBuilder -

the layers map i'm trying add aren't loading. keep getting error message says this: the layer, layer_foo, layer_bar, layer_x, cannot added map. i followed instructions esri's getting started guide. https://developers.arcgis.com/web-appbuilder/guide/getstarted.htm whenever try add layers organizations gallery wont load , give me error stated above. does have data source? i've set local address [https://computer:3344] , i've set redirect uri's same place. please advise, headaches strong 1 , can't seem find other documentation on subject. typically when error means layers in webmap not accessible computer you're on. can open urls layers directly in separate tab double-check.

javascript - Change CSS Dynamically in Vue -

is there way change css properties asynchronously? i have full access node , vue , , it's sit in chrome browser, , text need update css various pages long, browser slows crawl while css applying. fontsize (newsize) { document.getelementbyid('text').style.fontsize = `${newsize}px` } i need modify update page better, , i'm not sure how go it. looking @ async module, it's awfully dense , i'm not 100% sure offers need.

xslt - How to extract part of an attribute value from xml in C# -

i need extract part between ':' , '/' in attribute "pointname". following sample xml: <?xml version="1.0" encoding="utf-8"?> <trend xmlns="data"> <tblpoint pointname="abc:xyz123/aaa.ddd-111.mmm.mv-3.pv" uom="0"> <tblvalue utcdatetime="2017-07-18t05:07:47" val="3" /> <tblvalue utcdatetime="2017-07-18t05:08:27" val="0" /> </tblpoint> <tblpoint pointname="bcd:xyz234/aaa.ddd-222.mmm.mv-3.pv" uom="0"> <tblvalue utcdatetime="2017-07-18t06:01:12" val="0" /> <tblvalue utcdatetime="2017-07-18t06:01:13" val="0" /> </tblpoint> </trend> i'm using following code: var xdoc = xdocument.load(xmlfilepath); // xmlfilepath - above xml file located. var ns = xnamespace.get("data"); var pointnames = ...

Excel VBA: Dynamic Data Validation Input Message with Index Match -

with data validation input message, each cell in named range ("myrange"), i'd match against table1[column1] , index in value table1[column2]. i need loop, since doesn't, active cell remains constant, , entire range has same input message. i'm not committed formula index match, needs perform function. sub tester() dim mycell string mycell = activecell range("myrange").validation .delete .add type:=xlvalidatelist, alertstyle:=xlvalidalertinformation, _ operator:=xlbetween, formula1:="=indirect(test1&test2)" .ignoreblank = true .incelldropdown = true .inputtitle = "" .errortitle = "" .inputmessage = application.worksheetfunction.index(range("table1[column2]"), _ application.worksheetfunction.match(mycell, range("table1[column1]"), 0)) .errormessage = "" .showinput = true .show...

Buildfire - Using regex in search -

i have been looking @ documentation can't seem figure out how correctly create filter object buildfire.datastore.search query. i have address property on object , want able type in partial amount of address , have return. below filter objects have tried pass search query: search = {filter: {"$json.address": {"$regex": `/${this.state.search}/`}}}; search = {filter: {'$regex': {'$json.address': this.state.search}}}; neither have worked. end goal is: buildfire.datastore.search(search, 'location', cb); edit: i tried hardcode regex in docs: "$or" : [ {"description": {"$regex":"/new /"}} ] and didn't work (i replaced 'new' string knew show). i inserted following on control side: for(let = 0 ; < 50 ; i++) { buildfire.datastore.insert({ name: "address" + ,address: + " " + (i % 2 ? "main ":"4th ") ...

rebol utf-8 library : map has no value -

i downloaded http://www.rebol.org/view-script.r?script=utf-8.r when executing it, error: "map has no value". i can't find rebol map libary anywhere. that utf-8.r script has dependency declared in header: needs: [%hof.r] you can find script here . contains map function definition among many others.

c++ - Convert X Coordinate from one Resolution to another -

usually convert 1 resolution another: int newx = (x / oldresolutionx) * newresolutionx; but time can't use , can't head around math (never @ math, forgive me please). anyways, resolution 1280x720 , want convert point (720/360) this: picture of new resolution the width 854, height 720, don't have conversion y coordinate. here's (for me) tricky part: 0 not actual 0. x starts @ -107 , ends @ 747. guys explain me how can convert (720/360) 1280x720 resolution? in advance , sorry being bad @ math... so, need linear mapping [0...1280] [-107...747], leaving y untouched. int newx = (int)((x / 1280.0) * 854.0) -107 so, whats happening here? x vary between 0 , 1280. if x == 0: (0/1280) * 854 0 , result equals -107. if x == 1280: (1280/1280) * 854 = 854: result 747 some remarks: the .0 used force floating-point type. the (int) cast integer

html - jquery .submit() inside dropzone success event -

hi i've been looking around , didn't find ideas how implementing jquery .submit() inside dropzone success event or complete event can me. ? this jquery code this.on("success", function(){ $(".form").submit(); i'm not using whole form dropzone area because member should insert aditional data. want sending aditional data manually instead using ajax should perform submitting. based on threads https://stackoverflow.com/a/22069194 decided send image first after user clicking submit button, , after send aditional data. have idea ?

Parse textfile without fixed structure using python dictionary and Pandas -

i have .txt file without specific separators , parse it, need count character character know starts , ends column. so, constructed python dictionary keys column names , values number of characters takes each column: headers = {first_col: 3, second_col: 5, third_col: 2, ... nth_col: n_chars} having in mind, know 3 first columns of following line in .txt file abc123-3yn0000000001203abc123*testingline first_col: abc second_col: 123-3 third_col: yn i want know if there pandas function helps me parse .txt taking account particular condition , (if possible) using headers dictionary. using dictionary dangerous because order not guaranteed. meaning, if picked third_col first, you've thrown of entire scheme. can fix using lists. there, can use pd.read_fwf read fixed formatted text file. solution names = ['first_col', 'second_col', 'third_col'] widths = [3, 5, 2] pd.read_fwf( 'myfile.txt', widths=widths, names=na...

Calculate sum based on different dates -

i'm new stackoverflow , need problem. have table (sql 2014 , use vb.net) this: id codfisc dal al 1 xxxxxxx 2017/08/08 2017/08/14 i have developed code: dim date = date.parse(textbox2.text) dim b date = date.parse(textbox3.text) dim source2 string = webconfigurationmanager.connectionstrings("connectionstring").connectionstring dim sql2 string = "select sum(datediff(day, dal, al)+1) total tab1 codfisc = @codfisc , dal >=@dal , al <=@al" dim conn2 new sqlconnection(source2) conn2.open() dim cmd2 new sqlcommand(sql2, conn2) cmd2.parameters.addwithvalue("@codfisc", me.gridview1.selectedrow.cells(8).text) cmd2.parameters.addwithvalue("@dal", a) cmd2.parameters.addwithvalue("@al", b) dim dr2 sqldatareader dr2 = cmd2.executereader() while dr2.read() textbox4.text = dr2("total").tostring() if isdbnull(dr2("total")) ...

wordpress - WP CLI Not Displaying All Tables -

i trying simple queries figure out how plugin saving information. getting annoying error, , figured out custom template content missing on local. every other setting/content transferred on database export live site. however, reason wp db tables showing few of tables. checked wp-config, , checked database through sql gui. did wp db check , listed tables. however, wp db tables giving wrong information, , wp db search not searching tables reason not display. missing something? (for basic reasons, replaced name of local directory , database name placeholder clientsite). clientsite % wp db check clientsite.wp_commentmeta ok clientsite.wp_comments ok clientsite.wp_duplicator_packages ok clientsite.wp_email ok clientsite.wp_links ok clientsite.wp_my_calendar ok clientsite.wp_my_calendar_categories ok clientsite.wp_m...

Downloading Blob via http using AngularJS and Angular-FileSaver.js -

this question exact duplicate of: how download zip file in angularjs / filesaverjs [duplicate] 2 answers i'm having really hard time solving problem. i've tried many different solutions i'm not sure need fix now. i'm attempting retrieve blob via http , download file user using filesaver.js reason, every time attempt open image "damaged, corrupted, or large" message. i've attempted playing 'responsetype' (changing 'blob'), adding 'accept' header. nothing seems work me!! can maybe point me in right direction? service download: function(blobid, token) { var req = { method: 'get', cache: false, url: 'api/blob/downloadblob/' + blobid, headers: { 'responsetype': 'arraybuffer', 'authorization': token } }; return $http(req) .then(funct...

python - Celery chain results from task to map to another -

i have celery application @task def step_one(items): items.sort() in range(len(items), 100): yield items[i:i + 100] @task def step_two(batch): item in batch: print(item) if __name__ == '__main__': celery.chain(step_one.s([i in range 100000]), step_two.map().s()).delay() this not work because step_two expecting iterator, want take results previous step, correct way go this? nice if tasks start @ yield rather after whole list sorted , chunked. i have seen question best way map generated list task in celery feel should not necessary create intermediate step map results task. additionally, calling step_two.map.s() gives me error function object has no attribute s

mysql - erro #1064 - You have an error in your SQL syntax -

i can't create table. this code: drop table if exists `monitoreos`; create table `monitoreos` ( `id` integer not null auto_increment default null, `fecha` varchar null default null, `id_cliente` integer null default null, `id_vehiculo` integer null default null, `posicion` integer null default null, `numero_serie` integer null default null, `numero_alterno` integer null default null, `profundidad_inicial` varchar null default null, `horometro_actual` varchar null default null, `profundidad_actual_exterior` varchar null default null, `profundidad_actual_interior` varchar null default null, primary key (`id`) ); and error: 1064 - have error in sql syntax; check manual corresponds mariadb server version right syntax use near 'null default null, `id_cliente` integer null default null, `id_vehiculo` i' @ line 3 nullable , default null defaults, can remove them. more importantly, need...