Posts

Showing posts from July, 2011

c++ - Speeding up OpenCV's input response -

i writing first opencv program , playing around image manipulation using camera on macbook. code below shows camera , allows me press 0 normal view, 1 , 2 , or 3 change grb , 4 change black , white. unfortunately, have hold down key respond. causes delay , how can code more responsive input? #include "opencv2/core/core.hpp" #include "opencv2/flann/miniflann.hpp" #include "opencv2/imgproc/imgproc.hpp" #include "opencv2/photo/photo.hpp" #include "opencv2/video/video.hpp" #include "opencv2/features2d/features2d.hpp" #include "opencv2/objdetect/objdetect.hpp" #include "opencv2/calib3d/calib3d.hpp" #include "opencv2/ml/ml.hpp" #include "opencv2/highgui/highgui.hpp" #include "opencv2/core/core_c.h" #include "opencv2/highgui/highgui_c.h" #include "opencv2/imgproc/imgproc_c.h" using namespace cv; using namespace std; mat channel(mat a, int ich) { m

php - Trouble loading SimpleXML object for use in foreach loop : Warning: Invalid argument supplied for foreach() -

i'm trying load simple xml object file using simplexml_load_file(); i've been scraping around internet trying handle on error with subsequent foreach loop. i'm getting invalid foreach argument error: warning: invalid argument supplied foreach() in c:hosting\bnb\assets\reviews.php on line 2 if try different php logic handling xml object, can different errors, foreach argument has never shown positive, though var_dump has no trouble loading till end of file. some other errors have been : parse error: syntax error, unexpected t_foreach in server_path on line 646 or : warning: invalid argument supplied foreach() in server_path on line 648 parse error: syntax error, unexpected '}' in c:hosting\bnb\index.php on line 658 php : <?php $xml = simplexml_load_file('reviews.xml'); ?> <?php foreach ($xml->bnb->review $n_review): ?> <ul> <li> <d

html - Gap between top header and Navigation bar -

i in process of building custom template in wordpress have big gap between top , bottom (nav) part of header should 1px. any on how can fix this? thanks dee http://serenityhouse3.ayomo.com add margin-top: 0px ul#mainnav this: ul#mainnav {margin-top: 0px} and margin: 0 0 1px 0; #header this: #header{margin: 0 0 1px 0;}

javascript - Making a hover over pop up display in angularjs -

<img class="line" src="line_draft.png" height="5px" width="50px"> <div ng-mouseover="infoisvisible = true" ng-mouseleave="infoisvisible = false" ng-init="infoisvisible = false" onmousemove="getcoords(event)"> <img class="icon" ng-src="{{ info.icon }}" height="20px" width="20px"> </div> <div class="info"> <p ng-show="infoisvisible">{{ info.description }}</p> </div> <style> .line { margin-bottom: 7px; box-shadow: 0 0 0 2px rgba(0,0,0,.05); } div { display: inline; } .info p { background-color: red; position: fixed; z-index: 100; } </style> <script type = "text/javascript"> function getcoords(event) { var x = event.clientx + "px"; var y = event.clien

c# - Secure XOR encryption attempt -

this first post , sorry if made errors format. i trying write program encrypt kinds of file via xor in secure way. know xor isn't secure encryption method wanted give try. please have on methode , tell me if complete bullshit or not :) password string, chosen user. in beginning xored file password, leading easy decryption if parts of password guessed correctly. here procedure: tmpfile = file xor (hash of password combined pw.length.tostring) //to make sure password elements in right order tmpfile = tmpfile xor (xor byte composed each byte of password)//ensure password decode has right chars. tmpfile= tmpfile xor initial_password could encrypted text decrypted self-xor-shifting technique? thanks advice! :) edit: here code: using system; using system.collections.generic; using system.linq; using system.text; using system.threading.tasks; using system.security; using system.io; using system.windows; namespace encodeeverything { class program { s

variables - Add suffix after specific after some characters and after number of characters Notepad++ -

id add .pdf text after these characters: =pd , after 6 characters behind characters above in notepad++ for example: for text: =pd374069 =pd422552 add suffix: =pd374069.pdf =pd422552.pdf press ctrl+h or go find/replace window. select replace tab , choose regular expression option. in find text box enter (=pd\d{6}(?!\d)) in replace window enter \1\.pdf it transform spec sheet=pd374053;manual=pd374069;spec sheet=pd422552 into spec sheet=pd374053.pdf;manual=pd374069.pdf;spec sheet=pd422552.pdf

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

Image
i created own android project , cut , pasted code exercise: http://androidexample.com/show_phone_contacts_in_autocomplete_suggestions_-_android_example%20/index.php?view=article_discription&aid=106&aaid=128# when build project no errors or warnings. when run project window error: annoyingly, can't make window smaller, can't click of buttons. cick 'x' @ top, close it. here's project structure: where getting 'autocompletemain' from? (note small c) class named autocompletemain. help. and have activity included in android manifest, in case you're wondering: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.androidexample.autocompleteedittext" android:versioncode="1" android:versionname="1.0" > <uses-permission android:name="android.permission.read_phone_state"

MySQL - Select while sum is less than x -

i've got list of cached files referenced in database , want purge out oldest outside of size limit of 20,000,000. table simplistically looks this: [ hash | filesize | timestamp ] at moment running following command, select `hash`, `filesize` `cachetable` order `timestamp` desc; then processing results externally. there way list of results outside of 20,000,000 limit? i'd use offset select `hash`, `filesize` `cachetable` order `timestamp` desc limit <your_limit_here> offset 20000000; be sure replace your_limit_here own acceptable number.

websocket - Rails 5 actioncable undefined method `fetch' for nil:NilClass -

i using rails 5 actioncable , getting this error when trying send throws actioncable should do? i'm trying push project heroku. nomethoderror in messagescontroller#create undefined method `fetch' nil:nilclass extracted source (around line #37): #35 # makes sure proper dependencies required. #36 def pubsub_adapter *37 adapter = (cable.fetch('adapter') { 'redis' }) #38 path_to_adapter = "action_cable/subscription_adapter/#{adapter}" #39 begin #40 require path_to_adapter extracted source (around line #50): #48 # adapter used streams/broadcasting. #49 def pubsub *50 @pubsub ||= config.pubsub_adapter.new(self) #51 end #52 #53 # identifiers applied connection class associated server. extracted source (around line #42): #40 def broadcast(message) #41 server.logger.info "[actioncable] broadcasting #{broadcasting}: #{message}" *42

c - Getting wrong glibc function address on ARM -

i want address of function. using function names gets correct addresses on x86, both local functions , glibc functions. but on arm, local function addresses correct, while glibc function addresses wrong. here's simple program: #include <stdio.h> int sum(int a, int b) { return + b; } int main(int argc, char *argv[]) { char buffer[32] = { '\0' }; sprintf(buffer, "cat /proc/%d/maps", getpid()); printf("sum = %p\n", sum); printf("fopen = %p\n", fopen); system(buffer); return 0; } # x-compile arm executable: $ arm-linux-gnueabihf-4.9.1-gcc -g -o misc misc.c # debug on arm /home # ./gdb ./misc gnu gdb (gdb) 7.5.1 copyright (c) 2012 free software foundation, inc. license gplv3+: gnu gpl version 3 or later <http://gnu.org/licenses/gpl.html> free software: free change , redistribute it. there no warranty, extent permitted law. type "show copying" , "show warranty" details. gdb conf

osx - How to repaint window after hide or show control -

i have nstextfield control on bottom of window. need show them or hide according condition. in initial state control hidden. window shows blank space on control's position. when in runtime control should become visible mptxtctrl.hidden = no; it not happen. the tasks: 1 display/hide control. 2 resize main window according control's state. i can't find tutorials how manage layouts in cocoa. grateful help! when in runtime control should become visible mptxtctrl.hidden = no; it not happen. make sure connected mptxtctrl outlet text field in nib. having forgotten connect outlet leading cause of nothing happening. i can't find tutorials how manage layouts in cocoa. switch file inspector while editing nib , turn “use auto layout” on. xcode create constraints whenever place views along aqua guides (the blue lines appear when place , size views correctly), , cocoa enforce these constraints sizes of views , window change. more in

mysql - Date difference using months -

i have month names in database, eg. tomonth , frommonth . data stored 'jan', 'feb' etc. what have difference between tomonth , frommonth ? try below query select (tomonth-frommonth) monthdiff ( select case when `frommonth` = 'jan' 1 when frommonth = 'feb' 2 when frommonth = 'mar' 3 when frommonth = 'apr' 4 when frommonth = 'may' 5 when frommonth = 'jun' 6 when frommonth = 'jul' 7 when frommonth = 'aug' 8 when frommonth = 'sep' 9 when frommonth = 'oct' 10 when frommonth = 'nov' 11 when frommonth = 'dec' 12 end frommonth, ( case when tomonth = 'jan' 1 when tomonth = 'feb' 2 when tomonth = 'mar' 3 when tomonth = 'apr' 4 when tomonth = 'may' 5 when tomonth = 'jun' 6 when tomonth = 'jul' 7 when tomonth = 'aug'

c# - Concurrency in .net for a function -

i have following code being run in multi-threading business logic: using system; using system.threading.tasks; namespace test { class program { static void main(string[] args) { var biz1 = new biz { = 1, value = "a" }; var biz2 = new biz { = 2, value = "b" }; var foo = new foo(); //thread 1 new task(() => foo.run(biz1)).start(); //thread 2 new task(() => foo.run(biz2)).start(); //more threads here other biz objects.... console.read(); } } public class biz { public int { get; set; } public string value { get; set; } } public class foo { public void run(biz biz) { //base on biz object task here } } } the biz object not being changed @ anytime during threading questions: is foo.run thread safe? is better instantiate individua

php - foreach array insert to database -

Image
i have 3 tables. category,ingredient , category_ingredient. want id's of category , ingredient inserted category_ingredient. error this: this code: view:add_ingredients.php <?php echo form_open('dashboard/uploadingredients', 'class="form-horizontal" enctype="multipart/form-data"'); ?> <div class="form-group"> <div class="col-sm-10"> <select class="form-control" name="ingredient_category"> <option selected disabled>select ingredient category</option> <option value="all">all</option> <?php foreach($this->products_model->getcategory() $row): ?> <option value="<?php echo $row->category_id ?>"><?php echo $row->name; ?></option> <?php endforeach; ?> </select> </div>

android studio - Plugin is too old, please update to a more recent version -

plugin old, please update more recent version, or set android_daily_override environment variable "aed79d567e57792ed352e708d2b7ca891ff897c6" can me? how update one apply plugin: 'com.android.application' android { compilesdkversion 23 buildtoolsversion '23.0.2' defaultconfig { applicationid "xxxxxx.xxxx.xxx" minsdkversion 16 targetsdkversion 23 versioncode 1 versionname "1.0" } buildtypes { release { minifyenabled false proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.pro' } }} dependencies { compile filetree(include: ['*.jar'], dir: 'libs') testcompile 'junit:junit:4.12' compile files('libs/parse-1.10.2.jar') compile 'com.android.support:appcompat-v7:23.1.1' compile 'com.android.support:design:23.1.1' compile 'com.parse.bolts:bolts-android:1.+' compile 'com.android.support:support-v4:

exchangewebservices - Read email content and move items between folders with Exchange 2010 and c# -

i’m working on application must read email content , move emails 1 folder another, these 2 features must support. mail server exchange 2010 , have enough privileges access mailbox. i’ve been seeing posts ews managed code i’m lost in information. can shed light on , advise best approach accomplish it? ps. using vs 2015 , .net framework 4.5 update: find below quick test using ews manage api exchangeservice service = new exchangeservice(exchangeversion.exchange2013); //this accept certificates, regardless of why invalid servicepointmanager.servercertificatevalidationcallback = (sender, certificate, chain, sslpolicyerrors) => true; service.credentials = new webcredentials("administrator", "mypassword", "myexchangeserver.com"); service.url = new uri("https://myexchangeserver.com/ews/exchange.asmx"); emailmessage email = new emailmessage(service); email.torecipients.add("userid@myexchangeserver.com"); email.subject = string.fo

swift - Method parameters in nested closure -

i trying understand how parameters passed method available nested closures. i'm nervous wrote won't have original parameters available. (these drastically simplified examples) i have method wrote specifies closure parameter: func savenameandagetoserver(serverparams: [string:string], completionhandler: (age: nsnumber) -> ()) { // connect server // post name , dob serverparams // receives current age in completion: completionhandler(age: 22) } now somewhere else create method, specifies closure, takes 2 parameters , calls first function: func awesomefunc(name: string, dob: nsdate, completionhandler: (isovertwentyone: bool) -> ()) { let formatteddob = nsdateformatter().stringfromdate(dob) savenameandagetoserver([name:formatteddob]) { (age) -> () in if (age int) >= 21 { print("\(name) can have beer.") completionhandler(isovertwentyone: true) } else { print("\

nginx - PHP fpdf issue when my site is on HTTPS -

i having problem fpdf v1.6 everything work fine when reach website on http when reach https pdf never finish load receive part of it. i'm on nginx server running php 5.4 cloudflare doing https. 1 have hint look?

c++ - bad alloc in QuickSort -

i'm doing quicksort i'm getting bad_alloc() error.sometimes code run time i'm getting error.the program run , sort right when it's run s out of 4 times it's give me bad _alloc error. what's problem??????? #include <iostream> using namespace std; void quicksort(int *a,int,int); int main() { int i,j,*a; = new int[j]; cout<<"enter total element:"; cin>>j; for(i=0;i<j;i++){ cout<<"enter element:";cin>>a[i]; } quicksort(a,0,j-1); cout<<"after sorting."<<endl; for(i=0;i<j;i++){ cout<<a[i]<<endl; } return 0; } void quicksort(int *a,int u,int d){ int key = a[u]; int upper = u; int lower = d; while(key>a[u] && u<lower){ u++; } while(key<a[d] && d>upper){ d--; } if(u<d){ swap(a[u],a[d]); quicksort(a,upper,lower); } if(u>=d){ swap(key,a[d]); if(upper!=d)

java - package javapns.back and javapns.data does not exist -

i try added maven dependency project got error , got error symbol cannot found . [error] /c:/abc/src/com/util/applepushmanager.java:[11,20] package javapns.back not exist [error] /c:/abc/src/com/ibn/util/applepushmanager.java:[12,20] package javapns.data not exist /c:/abc/src/com/ibn/util/applepushmanager.java:[57,93] cannot find symbol symbol: variable sslconnectionhelper /c:/users/abc/src/com/ibn/util/applepushmanager.java:[27,43] cannot find symbol symbol: variable pushnotificationmanager i added javapns-jdk16 , javapns_2.2 dependency push notification still got error. know have done wrong? if knows answer please me. appreciated.

python - django activity stream, am I approaching it wrong? -

i'm using django-activity-stream following/unfollowing , displaying followed/unfollowed contents. noobie, documentation seems vague. if can figure out did wrong, appreciated. here's documentation; https://django-activity-stream.readthedocs.org/en/latest/actions.html here's steps took. pip install django-activity-stream then added actstream in setting/and set url actstream. url included, url(r'^unfollow/(?p<category_name_url>\w+)/', 'main.views.unfollow_user', name='unfollow'), url(r'^follow/(?p<category_name_url>\w+)/', 'main.views.follow_user', name='follow'), then created apps.py inside main app folder. from django.apps import appconfig actstream import registry from django.contrib.auth import get_user_model class myappconfig(appconfig): name = 'subs' def ready(self): registry.register(get_user_model()) registry.register(self.get_model('category'))

Android TabLayout tabPaddingTop and tabPaddingBottom not being removed -

Image
here tab layout xml <android.support.design.widget.tablayout android:id="@+id/tabs" android:layout_width="match_parent" android:layout_height="@dimen/custom_tab_layout_height" android:background="@color/tab_background_primary" app:tabgravity="fill" app:tabindicatorcolor="@color/primary_white" app:tabindicatorheight="3dp" app:tabminwidth="120dp" app:tabmode="scrollable" app:tabpaddingstart="-1dp" app:tabpaddingend="-1dp" app:tabpaddingtop="1dp" app:tabpaddingbottom="1dp" /> it removing horizontal padding in between tabs not tabpaddingtop , tabpaddingbottom. how remove top , bottom padding make each tab match tablayout height? custom view each tab <?xml version="1.0

c# - Visual Studio 2015: Enabling the MSTest logging -

i generate test log file , found post on web shown how enable mstest logging seems not working: here steps should perform enable mstest logs. go mstest installation directory via administrator command prompt. (typically installation directory c:\program files\microsoft visual studio 11.0\common7\ide). open mstest configuration file (mstest.exe.config) , add snippet similar 1 shown below under configuration node. make sure path have specified exists , have appropriate permissions it. ** <system.diagnostics> <trace autoflush="true" indentsize="4"> <listeners> <add name="mylistener" type="system.diagnostics.textwritertracelistener" initializedata="c:\temp\mstest.log" /> </listeners> </trace> <switches> <!-- must use integral values "value". use 0 off, 1 error, 2 warn, 3 info, , 4 verbose. --> &

ios - 2 or more UIViewcontroller with the same class crash -

i have multiple view controller in storyboard same class called "viewcontroller.swift " , crash if assign operate classes don't crash how fix this? simple answer can not use single viewcontroller.swift multiple view controllers in storyboard. create new class every new view controller in storyboard.

c - ArgumentError: string contains null byte when use StringValueCStr -

here test file here full code (github.com/roroco/ro_article/tree/string-contains-null-byte) i "argumenterror: string contains null byte" when run following code: in ruby side: get_article(file.read("test_file")) in c side: value get_article(value self, value html) { str html2 = stringvaluecstr(html); the test file large, how find null byte in file? , how make stringvaluecstr work string contains "null byte" when use following code: body = file.read("test_file") result = body.inspect i have "result" contains "\u0000"(my encoding utf8), solution is body.gsub(%r{\u0000}, "") do in ruby side or c side

jquery - Clearing a textbox field when a radio button is selected in Javascript -

i have web form allows users donate money using predefined radio buttons value assigned them (all different numbers). have choose own amount textfield can write in custom amount wish donate. want clear custom textfield if user selects predefined choice. so far have created this: html: <input type="radio" name="am_payment" value="3" checked="checked"> <strong>64</strong> <input type="radio" name="am_payment" value="11" checked="checked"> <strong>100</strong> <input type="radio" name="am_payment" value="32" checked="checked"> <strong>250</strong> <input type="radio" value="" name="am_payment"><label>other</label> <input type="text" name="cp_otheramount" value="" id="theamount" disabled="disabled"/> java

javascript - Uncaught TypeError: $.fn.dataTable.ColReorder is not a function -

i'm using data table plugin implementation.as reorder columns in data table using col-reorder plugin. var colreorder = new $.fn.datatable.colreorder( table ); var order=colreorder.fnorder(neworder); am using data table plugin version(1.9.4) , col reorder version(1.0.8) $.fn.datatable.colreorder introduced in colreorder 1.1.0 ! 1.1.0 major release included : colreorder available under $.fn.datatable.colreorder amd module , bower support (datatables-colreorder) the ability set defaults using $.fn.datatable.colreorder.defaults camelcase notation support match datatables 1.10 so upgrade 1.0.8 1.1.0! working demo, datatables 1.9.4 , colreorder 1.1.0 → http://jsfiddle.net/gs1toxty/ if reason not able upgrade colreorder 1.1.0, or insists on using 1.0.8, add r flag ( r colreorder) sdom string : var table = $('#example').datatable({ sdom: 'rlfrtip' }); demo → http://jsfiddle.net/l6nogwll / exact same 1.1.0's new

php - Cron Jobs Managment for large amount of users -

i have service backupify . downloads data different social media platforms, have 2500 active users, each user script runs gets data facebook , stores them on amazon s3, server ec2 instance on aws. i have entries in table 900 entries facebook users, there php script runs , gets user database table , backups data facebook , picks next user facebook. everything fine when having less 1000 users, have more 2500 users problem php script halts, or runs first 100 users , halts, time out etc. running php script fro php -q myscript.php command. the other problem single user scripts takes 65 seconds reach last user database table may take days, whats best way run parrallel on databse table etc. please suggest me best way backup large amount of data large amount of users, , should able monitor cron, somehting mangaer. if right, you've got single cron task users, running @ frequency, trying process data of every user in single shot. did try issuing set_time_limit(0); @

regex - C# replace part of the message -

string message = "your purchase of $ 100.00 awaiting confirmation. please use pin 8967 complete transaction. reference number :1237689"; string output = regex.replace(message, @"[\d-]", "*"); console.writeline("message : " + message); console.writeline("output : " + output); console.readline(); i want replace pin of message. above message replace numeric values * characters. string message = "your purchase of $ 100.00 awaiting confirmation. please use pin 8967 complete transaction. reference number :1237689"; string output = regex.replace(message, @"(?<=pin\s*\d*)\d", "*"); or string message = "your purchase of $ 100.00 awaiting confirmation. please use pin 8967 complete transaction. reference number :1237689"; string output = regex.replace(message, @"(?<=pin\s*)\d+", m => new string('*', m.length));

r - latest version of ggplot2 creating issue with aes argument -

Image
i had created custom function plot regression diagnostics these version of ggplot2 & gridextra under: ggplot2 * 1.0.1 2015-03-17 cran (r 3.2.1) gridextra * 2.0.0 2015-07-14 cran (r 3.2.1) head(dadhospital) sl. body.weight total.cost.to.hospital ## 1 1 49 660293 ## 2 2 41 809130 ## 3 3 47 362231 ## 4 4 80 629990 ## 5 5 58 444876 ## 6 6 45 372357 fit1<-lm(total.cost.to.hospital~body.weight,data=dadhospital) #custom function of plotting model diagnostics using ggplot2 library(ggplot2) diagplot<-function(model){ p1<-ggplot(model, aes(.fitted, .resid))+geom_point() p1<-p1+stat_smooth(method="loess")+geom_hline(yintercept=0, col="red", linetype="dashed") p1<-p1+xlab("fitted values")+ylab("residuals") p1<-

ios - No visible @interface for ____ declares the selector -

i have set method in separate class (called externalclass) needs take 2 arguments. -(void) openimage:(nsdictionary *)payload inapp:(uiapplication *)app; in appdelegate.m, call method this: - (void)application:(uiapplication *)application didreceiveremotenotification:(nsdictionary *)payload fetchcompletionhandler (void (^)(uibackgroundfetchresult))completionhandler { [[externalclass sharedinstance] openimage:payload inapp:application]; } i getting "no visible @interface externalclass declares selector 'openimage:inapp' any idea why? i think forgot declare method in header(.h) file. declare method in externalclass.h file. -(void) openimage:(nsdictionary *)payload inapp:(uiapplication *)app; and import externalclass.h , want use method.

sql - RECURSIVE query in MySQL similar to PostgreSQL -

i have table want rows recurrsively based on id , upline_id (parent id) fields. has been done in postgresql this: with recursive downlines(id, number, upline_id, first_name, last_name, level) ( select id, number, upline_id, first_name, last_name, 1 mytable id = 2061 union select a.id, a.number, a.upline_id, a.first_name, a.last_name, d.level + 1 mytable a, downlines d a.upline_id = d.id ) select * downlines however new mysql , cannot figure out how convert above query mysql version. found mysql: select * (select * agents order id) products_sorted, (select @pv := '2061') initialisation find_in_set(upline_id, @pv) > 0 , @pv := concat(@pv, ',', id) however results not match, in mysql version many rows missing. can tell how convert above postgresql query mysql recursive/hierarchical (n/unknown depth) data? mysql not supports with recursive . round problem can instead use session variable(starting @) hold values i

remove extra space on Brightcove video player -

Image
i have media on broghtcove doesn't have head , tail black space. on video player automatically adds up. here video black space on top , bottom. doesn't show on full screen model here video setting available brightcove, don't see option fix there. how can fix this? with version of brightcove's player default player size defined in "template" player based on. template name displayed under player name in publishing module. alternatively set player size in embed code : <param name="width" value="480" /> <param name="height" value="270" />

wso2 bps how to fix bug in ode-dao-jpa-1.3.5-wso2v12.jar -

i make code change in ode-dao-jpa-1.3.5-wso2v12.jar, create new folder under patches, , put ode-dao-jpa-1.3.5-wso2v12.jar new folder patches\patch0006. in patches.log, found applied. in runtime, found changes doesn't take effect. there other places should do? [2016-01-21 15:12:23,829] info {org.wso2.carbon.server.util.patchutils} - applying - patch0006 [2016-01-21 15:12:23,844] info {org.wso2.carbon.server.util.patchutils} - patched ode-dao-jpa-1.3.5-wso2v12.jar(md5:59f72bd01ea57109c8f97235027291b3) steps took patch ode-dao-jpa library wrong. in wso2 bps, create single ode osgi bundle combining ode's sub projects. https://github.com/wso2/wso2-ode/blob/master/orbit/pom.xml this osgi bundle need put in patch folder. 1) check /repository/components/plugins/ode_1.3.5_wso2vx.jar for bps 3.5.0 should 1.3.5-wso2v15. 2) checkout correct version following locations. https://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/dependencies/ode/ or

javascript - build a script to grab data from HTML Form and place it on -

i have short script pulls information site called rpr. wondering if can build page contains html form input field called "address" , when form submitted fills out "query" line automatically on next page? <script type="text/javascript"> var rpravmwidgetoptions = { token : "0596733f-54fc-4c23-89c8-8b021a6e486c", query : "278 s 23rd st, philadelphia, pa 19103", cobrandcode : "btsusspaces", showrprlinks : true } </script> <script type="text/javascript" src="//www.narrpr.com/widgets/avm-widget/widget.ashx/script"></script> when submit form, address sent via post or get. you can add hidden input : <input type="hidden" id="my_address_post" value="<?php echo $_post['address']; ?>"> then in javascript value of input in variable , write variable name in "query" :) var my_address = document.geteleme

linuxmint - How to restart Postgresql -

i have postgresql 9.3 , 9.4 installed on linux mint machine. how can restart postgresql 9.4? method restart both versions fine. try root (maybe can use sudo or su ): /etc/init.d/postgresql restart without argument script gives hint on how restart specific version [uqbar@feynman ~] /etc/init.d/postgresql usage: /etc/init.d/postgresql {start|stop|restart|reload|force-reload|status} [version ..] similarly, in case using systemd can use service tool: [uqbar@feynman ~] service postgresql usage: /etc/init.d/postgresql {start|stop|restart|reload|force reload|status} [version ..]

node.js - How to check if there is an existing MongoDB connection using mongoose? -

i have express app connects mongodb via mongoose, , have init script connect mongodb. is there way detect if there existing connection db, not need connect again in script anytime want run it, there consequences connecting db multiple times via mongoose. you can check using mongoose.connection.readystate , ex. var mongoose = require('mongoose'); console.log(mongoose.connection.readystate); the state return 1 if connected.

mysql - Size of perticular rows of table which satisfy condition -

select (data_length)'size' information_schema.tables table_name='abc' this giving me total data size of table "abc". want data size of particular rows satisfy condition in clause. say, select (data_length)'size' information_schema.tables table_name='abc' , abc.id=1 so,i want data_length of rows satisfies condition,but above not working. i guess understand query.

c# - Infragistics Windows Form error - "Object of type 'Infragistics.Win.Appearance' cannot be converted to type 'Infragistics.Win.AppearanceBase'." -

after dragged , dropped ultra panel in form. showing: object of type 'infragistics.win.appearance' cannot converted type 'infragistics.win.appearancebase'. need how resolve? it sounds though there multiple versions of infragistics assemblies referenced project. if case, solution make sure of infragistics references same version of toolset. done removing references version has less references.

angularjs - Calling parent directive method from child directive through attrs -

this scenario : <export-team> <ul> <li> <button buy-ticket="{{data}}" buy-callback="onbuyticket()">buy</button> </li> <li> <button buy-ticket="{{data}}" buy-callback="onbuyticket()">buy</button> </li> </ul> </export-team> the buyticket directive (function() { 'use strict'; angular .module('myapp') .directive('buyticket', buyticket); /** @nginject */ function buyticket($parse, ngdialog, authservice, appconfig, $rootscope, sharetoken, contestsfactory, sharecurrentticket, shareidsession, sharesessionaams, $location) { var vm = this; var directive = { restrict: 'a', link : function(scope, element, attributes) { var buycompatible = attributes['buycompatible']; function addzero(i) { if (i < 10) { = "0" + i;