Posts

Showing posts from September, 2011

android - Null pointer exception when setting values to TextView in Fragments -

i have 2 fragments in mainactivity, first one, user clicks on button , send through listener char second fragment, depends of char textview in second fragment must print text. in metho onactivitycreated textview null. this code: fragmentone public void onactivitycreated(bundle savedinstancestate) { super.onactivitycreated(savedinstancestate); btnchefcito = (button)getview().findviewbyid(r.id.btnchefcito); btnchefcita = (button)getview().findviewbyid(r.id.btnchefcita); btnchefcito.setonclicklistener(new view.onclicklistener() { @override public void onclick(view v) { welcomelistener.elegirsexo(sexo); replacefragment(); } }); btnchefcita.setonclicklistener(new view.onclicklistener() { @override public void onclick(view v) { sexo="f"; welcomelistener.elegirsexo(sexo); replacefragment(); } }); } this second fragment @override public...

angularjs - Angular js - On scroll up load more data -

i have developed chatting system facebook. want load earlier messages. can me functionality when scroll should load earlier messages same facebook. you may want take @ nginfinitescroll . module, easy implement want. here example: <div ng-app='myapp' ng-controller='democontroller'> <div infinite-scroll='loadmore()' infinite-scroll-distance='2'> <img ng-repeat='image in images' ng-src='http://placehold.it/225x250&text={{image}}'> </div> </div> var myapp = angular.module('myapp', ['infinite-scroll']); myapp.controller('democontroller', function($scope) { $scope.images = [1, 2, 3, 4, 5, 6, 7, 8]; $scope.loadmore = function() { var last = $scope.images[$scope.images.length - 1]; for(var = 1; <= 8; i++) { $scope.images.push(last + i); } }; }); if using bower , can install if bower install nginfinitescroll.

java - How to build libprotobuf-lite.so -

i'm trying protobuf lib communicate between java , jni layer in android. source code guided here . added source file in jni>source_sirectory. if perform ndk-build generate .so file prompt following error log: [armeabi] sharedlibrary : libprotobuf-lite.so jni/src/google/protobuf/stubs/common.cc:201: error: undefined reference 'google::protobuf::util::status::tostring() const' jni/src/google/protobuf/stubs/common.cc:207: error: undefined reference 'google::protobuf::operator<<(std::ostream&, google::protobuf::uint128 const&)' jni/src/google/protobuf/arena.h:622: error: undefined reference 'google::protobuf::arena::allocatealigned(std::type_info const*, unsigned int)' jni/src/google/protobuf/arena.h:624: error: undefined reference 'google::protobuf::arena::addlistnode(void*, void (*)(void*))' jni/src/google/protobuf/arena.h:462: error: undefined reference 'google::protobuf::arena::addlistnode(void*, void (*)(void*))' jn...

java - Getting Memory Leak Errors on Server Stop (Eclipse, Hibernate, Spring) -

when undeploy wars (stop server on eclipse), following logs. of them pretty suspicious, more worried new worker #x ones too. using hibernate, spring (guice), c3p0 lib connection pools. ideas? 2015-09-20 23:05:04.442 [localhost-startstop-2] [] error o.a.c.loader.webappclassloader - web application [] registered jdbc driver [com.mysql.jdbc.driver] failed unregister when web application stopped. prevent memory leak, jdbc driver has been forcibly unregistered. 2015-09-20 23:05:04.442 [localhost-startstop-2] [] error o.a.c.loader.webappclassloader - web application [] appears have started thread named [forkjoinpool-2-worker-1] has failed stop it. create memory leak. 2015-09-20 23:05:04.443 [localhost-startstop-2] [] error o.a.c.loader.webappclassloader - web application [] appears have started thread named [abandoned connection cleanup thread] has failed stop it. create memory leak. 2015-09-20 23:05:04.443 [localhost-startstop-2] [] error o.a.c.loader.webappclassloader - web applicati...

spring - provide user defined value to scheduler at run time -

i have create xml file scheduler unable run time customization code. below xml file <beans xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:task="http://www.springframework.org/schema/task" xsi:schemalocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.0.xsd"> <bean id="runmetask" class="com.spring.server.tasks.sharemetask" /> <bean name="runmejob" class="org.springframework.scheduling.quartz.jobdetailbe...

Java - Method executed prior to Default Constructor -

this question has answer here: are fields initialized before constructor code run in java? 4 answers i'm learning java , accidentally came across following code default constructor executed after method. public class chkcons { int var = getval(); chkcons() { system.out.println("i'm default constructor."); } public int getval() { system.out.println("i'm in method."); return 10; } public static void main(string[] args) { chkcons c = new chkcons(); } } output : i'm in method. i'm default constructor. can please explain me why happened? thanks. instance variable initialization expressions such int var = getval(); evaluated prior constructor execution. therefore getval() called before constructor executed.

c++ - Template argument deduction of string literal -

consider simple function template<typename t> void func(const t& x) {std::cout<< typeid(t).name();} now if call function func("ddd") , t deduces to? . if there no const in func 's parameter , t char [4] , whats confusing me addition of const , t deduces ? is : const char [4] . if change parameter t const &x (i.e change order of const ) deduction produces t char const [4] ? can explain argument deduction string literals? string literals arrays of const characters. a reference string literal of 4 chars of type char const (&)[4] . const char [4] , char const [4] same types! char const (&)[n] , const char [n] , char const [n] deduce char const [n] #include <iostream> template<typename t> void func1(t& x) {std::cout<< typeid(t).name()<<std::endl;} template<typename t> void func2(const t& x) {std::cout<< typeid(t).name()<<std::endl;} template<typename t...

javascript - filter the html table data using jquery -

<table class="table table-hover"> <thead> <tr><th> block</th> <th>size</th></tr> </thead> <tbody id="pooltable" class="tbody"> <tr> <td>78</td> <td>18</td> </tr> <tr> <td>52</td> <td>21</td> </tr> <tr> <td>54</td> <td>19</td> </tr> </tbody> </table> hi, want filter html table data using jquery, can try resolve please!! please try bellow javascript content of each td $("#filter").keyup(function(){ var filter = $(this).v...

android - Is it recommend NOT to put images in drawable folder? -

i found link why don't xhdpi mobiles display image located in /res/drawable only? , according answer "you should not put images files in drawable folder". true? there link in answer have official reference on matter. search answer still did't find any. please me understand drawable folder. "you should not put images files in drawable folder". true? it not true, long remember fact drawable shortcut drawable-mdpi , drawable in fact been scaled density-wise.

excel - 10 millisecond data - need to group in 15 minute blocks and apply log average to each block -

i have set of data taken @ 10 millisecond intervals. need group data 15 minute blocks (9,000 milliseconds) , obtain log average 1 column , 10th lowest percentile other (my data in decibels). is there way can split data every 9,000th row , form groups this, , apply formula each group - without having repeat process each group? i.e. way set can drag down results (i have 2 weeks of data.) to calculate average of rows 1-9000 in column a can use following formula: =average(index(a:a,(rows($1:1)-1)*9000+1):index(a:a,(rows($1:1))*9000)) if drag down, next 1 calculate rows 9001-18000 , on.

c# - Class with generic list of the inherited class type -

i have 3 class: some of theme have list called descendents of type. i have generic class in baseheaderfooteritem class. , insery , type of list it. is there option ? #region parentitem public class baseheaderfooteritem { public string title { get; set; } public string entitle { get; set; } public hyperlink link { get; set; } public int level { get; set; } } #endregion #region headerfooter public class headerfooter : baseheaderfooteritem { public list<category> descendants { get; set; } } #endregion #region headerfooter public class category : baseheaderfooteritem { public list<show> descendants { get; set; } } #endregion #region header public class show : headerfooter { public string imagepath { get; set; } public string mobilelink { get; set; } public string mobilelinktarget { get; set; } } #endregion #region tvguid public class tvguid : show { public string date { get; set; } public string time { get; set; } ...

xml - Rss parse error with PHP -

when try fetch , parse indian express rss feed, following error occurred. a php error encountered severity: warning message: illegal string offset 'content' filename: libraries/rssparser.php(114) : eval()'d code line number: 1 a php error encountered severity: warning message: illegal string offset 'encoded' filename: libraries/rssparser.php(114) : eval()'d code line number: 1 a php error encountered severity: warning message: illegal string offset 'content' filename: libraries/rssparser.php(114) : eval()'d code line number: 1 i using rssparser library rssparser.php <?php // original php code chirp internet: www.chirp.com.au // please acknowledge use of code including header. class rssparser { // keeps track of current , preceding elements var $tags = array(); // array containing feed data var $output = array(); // return value display functions var ...

android - RestApi extension/plugin webservices to get/post data from ecommerce site to make moblie app -

i want create mobile application native android/ios take data ecommerce server magento. opencart, joomla, drupal using rest service. services user: user registeration login cart products product categories payment (using native payment sdk ios/android) is there plugin/extension using rest services? , ecommerce platform these tasks? or is there other way make native app ecommerce site? actually not familiar these ecommerce sites/cms because android developer it's research task not find tutorial/link. sorry english skills not good. the rest services can written in of above mentioned languages. problem parsing data. android provides powerful volley libraries handling network related work. follow official link below: https://developer.android.com/training/volley/index.html also once data received can use gson parse data model. there library named retrofit makes work bit easy. http://square.github.io/retrofit/

salesforce - SendGrid Apex attachment functionality only works for text files? -

i using send grid apex package sending out bulk email salesforce. it's possible send text files attachment of send grid api, fails every other type of files (like pdf etc). is there workaround problem? have tried calling web api of sendgrid attachments apex code of callouts. not working pdf , other files. api doc: https://github.com/sendgrid/sendgrid-apex

javascript - Output to multiple divs using getElementsByClassName? -

i want output multiple elements using javascript. following example may show want. <select id="leave" onchange="leavechange()"> <option value="">select</option> <option value="150">ems</option> <option value="350">dhl</option> <option value="200">ups</option> <option value="75">ethiopia postal</option> </select> <script> function leavechange() { if (document.getelementbyid("leave").value == document.getelementbyid("leave").value){ document.getelementsbyclassname("item_shipping")[0].innerhtml = document.getelementbyid("leave").value; } else{ document.getelementbyid("item_shipping").innerhtml = 0; } } </script> <div class="item_shipping"></div> //this getting value <div class="item_shipping"...

virtual machine - Rundeck project and job sync between 2 instances with backend as mysql cluster -

i have set 2 rundecks in 2 vms , mysql cluster rundeck #1 on vm#1 connects mysql db#1 , rundeck #2 on vm#2 connects mysql db#2. the problem have whenever creating project / job in rundeck #1 not able see in rundeck #2. should do? any appreciated i first try switch databases, i.e. rundeck#2 connects mysql db#1 see if jobs visible. if case, have sync issue. if jobs still not visible, assume there identification problems of rundeck instances. just 2 cents.

ios - Writing and reading an audio file with Extended Audio File -

i m using extaudiofilewriteasync write audio file while using device recording, once recording finished try read extaudiofileread function , samples not same samples m writing... know why happen? for writing: self.audiomanager.inputblock = ^(float *data, uint32 numframes, uint32 numchannels) { (int = 0; < numframes*numchannels; i++) { printf("write*%f\n", data[i]); } uint32 numincomingbytes = numframes*numchannels*sizeof(float); uint32 *outputbuffer =(uint32*)malloc(numincomingbytes); memcpy(outputbuffer, recordeddata, numincomingbytes); audiobufferlist outgoingaudio; outgoingaudio.mnumberbuffers = 1; outgoingaudio.mbuffers[0].mnumberchannels = numchannels; outgoingaudio.mbuffers[0].mdatabytesize = numincomingbytes; outgoingaudio.mbuffers[0].mdata = self.outputbuffer; if( 0 == pthread_mutex_trylock( &outputaudiofilelock ) ) { extaudiofilewriteasync(outputfile, numframes, &outgoingaudio); } pthread_mutex_u...

php - Declaration of UsersController::beforeFilter() should be compatible with AppController::beforeFilter(Cake\Event\Event $event) -

i not experienced cakephp ver3.1.3 i followed instructions implement login authentication function; http://book.cakephp.org/3.0/en/tutorials-and-examples/blog-auth-example/auth.html i managed cake bake cakephp v3.1.3 app. i have problem userscontroller.php i have following code copied , pasted http://book.cakephp.org/3.0/en/tutorials-and-examples/blog-auth-example/auth.html ; public function beforefilter(event $event) { parent::beforefilter($event); // allow users register , logout. // should not add "login" action allow list. doing // cause problems normal functioning of authcomponent. $this->auth->allow(['add', 'logout']); } //public function beforefilter(event $event) the presence of code created error below; strict (2048): declaration of app\controller\userscontroller::beforefilter() should compatible app\controller\appcontroller::beforefilter(cake\event\event $event) [app/controller\userscontroller.php,...

java - How do I combine two AudioInputStream? -

the file format "pcm_signed 44100.0 hz, 16 bit, stereo, 4 bytes/frame, little-endian", , want add them while amplifying 1 of 2 files. plan read 2 wav put them 2 audioinputstream instances, store instances 2 byte[] array, manipulate in arrays, , return audioinputstream instance. i have done lot of research have got no results. know class www.jsresources.org mixing 2 audioinputstream, doesn't allow me modify either of 2 streams before mixing while want decrease 1 of streams before mixing them. think should do? to this, can convert streams pcm data, multiply channel volume wish change desired factor, add pcm data results together, convert bytes. to access audiostreams on per-byte basis, check out first extended code fragment @ java tutorials section on using files , format converters . shows how array of sound byte data. there comment reads: // here, useful audio data that's // in audiobytes array... at point, iterate through bytes, converting p...

node.js - npm install errors for errno -2 -

i trying install npm,but shows errors below: npm err! install couldn't read dependencies npm err! darwin 14.5.0 npm err! argv "/users/bunniehsieh/.nvm/versions/node/v4.1.0/bin/node" "/users/bunniehsieh/.nvm/versions/node/v4.1.0/bin/npm" "install" npm err! node v4.1.0 npm err! npm v2.14.3 npm err! path /users/bunniehsieh/package.json npm err! code enopackagejson npm err! errno -2 npm err! syscall open npm err! package.json enoent: no such file or directory, open '/users/bunniehsieh/package.json' npm err! package.json not problem npm itself. npm err! package.json npm can't find package.json file in current directory. npm err! please include following file support request: npm err! /users/bunniehsieh/npm-debug.log and have tried uninstall install again,but didn't work,please give me advice or help,thanks!!!!!! you have nothing install. npm file named package.json in ...

SQL Server - Where condition usage -

i want add condition below select sql code. select rtrim(ltrim(substring(line,1,charindex('|',line) -1))) drivename ,round(cast(rtrim(ltrim(substring(line,charindex('|',line)+1, (charindex('%',line) -1)-charindex('|',line)) )) float)/1024,0) 'capacity(gb)' ,round(cast(rtrim(ltrim(substring(line,charindex('%',line)+1, (charindex('*',line) -1)-charindex('%',line)) )) float) /1024 ,0)as 'freespace(gb)' #output line '[a-z][:]%' order drivename the result ; drivename capacity(gb) freespace(gb) c:\ 120 36 d:\ 100 7 i want add : 'freespace(gb) > 10' how can add condition? multiple ways this.. temp table , cte may seems same try understand difference between them here. by using temporary table select * ##t (select rtrim(ltrim(substring(line,1,charindex('|',line) -1))) drivenam...

html - Scrollable divs without absolute positions -

is there way make this: http://jsfiddle.net/wwr2ny27/ , without absolute positions left , right panel? want make them scrollable, without absolute positions. html: <div id="header">header</div> <div id="left"> <p>left</p> <p>left</p> ... </div> <div id="right"> <p>right</p> <p>right</p> ... </div> css: #header { background-color: silver; height: 30px; } #left, #right { position: absolute; top: 30px; bottom: 0px; overflow: auto; width: 50%; } #left { background-color: yellow; left: 0px; } #right { background-color: orange; right: 0px; } maybe check out fiddle : http://jsfiddle.net/14wnj9x2/ so, have removed position absolute, , have totally based code on height, ensures overflow occurs. html, body { margin: 0px; overflow:hidden; height:100%; } #left, #right { float...

objective c - iOS : Present a notification when the background treatment is finished -

i want display user notification displayed when application ends background treatment. this code use : uilocalnotification* localnotification = [[uilocalnotification alloc]init]; localnotification.alertbody = @"your uploads finished"; [[uiapplication sharedapplication]presentlocalnotificationnow:localnotification]; but not works, when called endbackgroundtask, don't see notification. however, used breakpoints, , code executed. //identify application state through local notification uiapplicationstate state = [[uiapplication sharedapplication] applicationstate]; if (state==uiapplicationstateinactive) { //show notification text voice uilocalnotification *notification = [[uilocalnotification alloc]init]; [notification setalertbody:"title"]; notification.soundname = uilocalnotificationdefaultsoundname; notification.alertaction = @"vie...

sql - PostgreSQL: Window functions using column alias -

i have following table : table "public.activity" column | type | modifiers ------------+-----------------------------+------------------------------------------------------- id | integer | not null default nextval('activity_id_seq'::regclass) scheduleid | integer | name | text | duedate | timestamp without time zone | indexes: "activity_pkey" primary key, btree (id) with following data: id | scheduleid | name | duedate ----+------------+----------+---------------------------- 1 | 1 | act1 | 2015-09-21 13:34:53.738449 2 | 1 | act1 | 2015-09-20 13:35:02.770369 3 | 1 | act1 | 2015-09-19 13:35:07.650204 4 | 1 | act1 | 2015-09-18 13:35:11.930225 5 | 1 | act1.0.0 | 2015-09-1...

sql - Merge column with random values -

i'm trying generate random values, there problems don't know how handle with. sql: select * (select round(dbms_random.value(1000000000,10000000000)) num dual connect rownum < x), (select round(dbms_random.value(1,5)) num1 dual) for output looks: 1241511501 2 1515628080 2 1798442549 4 4061575813 2 5673495016 3 6582052088 5 7672299459 5 9360968960 5 9618384703 4 i looks: 1241511501 5 1515628080 5 1798442549 5 4061575813 5 5673495016 5 6582052088 5 7672299459 5 9360968960 5 9618384703 5 of course number "5" optional, should random number. try this: select * (select round(dbms_random.value(1000000000,10000000000)) num dual connect rownum < 10), (select round(dbms_random.value(1,5)) num1 dual connect rownum = 1)

How to get the files from a specified path in python? -

i copying set of zli files folder folder. need decompress each file in folder. running python using pycharm windows , folders in linux server. how can current folder , decompress each file? from __future__ import with_statement fabric.api import * import configparser, paramiko, shutil, os, glob, zlib def get_connection(): config = configparser.rawconfigparser() config.read('config.cfg') env.user = config.get('uk_cdn','db.user_name' ) env.password = config.get('uk_cdn','db.password' ) host = config.get('uk_cdn','db.ip' ) settings(hide('warnings', 'running', 'stdout', 'stderr'), warn_only=true, host_string=host): paramiko.util.log_to_file('enc_analysis.log') files = run('ls -ltr /home/ndsuser/enc/data/dbschema_1/catalogue_24802') run('rm -rf /usr/rosh/enc_analysis/*') run('cp /home/ndsuser/enc/data/dbschema_1/catalogue_24802/...

R plots with X11 cannot show CJK fonts -

Image
i loaded utf-8 csv file japanese characters in it, str this: > str(purchases) 'data.frame': 168996 obs. of 7 variables: $ item_count : int 1 1 1 1 1 1 2 2 1 1 ... $ i_date : date, format: "2012-03-28" "2011-07-04" ... $ small_area_name: factor w/ 55 levels "キタ","ミナミ他",..: 6 47 26 26 26 26 26 35 35 26 ... $ user_id_hash : factor w/ 22782 levels "0000b53e182165208887ba65c079fc21",..: 19467 7623 7623 7623 7623 7623 7623 7623 7623 7623 ... $ coupon_id_hash : factor w/ 19368 levels "000eba9b783cec10658308b5836349f6",..: 3929 8983 5982 5982 5982 5982 5982 2737 18489 5018 ... $ category : factor w/ 13 levels "beauty","delivery service",..: 2 3 2 2 2 2 2 7 2 3 ... so think there's nothing wrong encoding or locale(en_us.utf-8)? when plot with > barplot(table(purchases$small_area_name)) why japanese characters turn little blocks this? i think have font dis...

provisioning - How to programmatically update an Eclipse feature and ints plugins -

how can programmatically update eclipse feature pointing p2 repository? i can install features using org.eclipse.tycho.p2.facade.internal.p2applicationlauncher class setting application name org.eclipse.equinox.p2.director. however, fails when install newer version of feature exist in eclipse environment. installing sample.student.mgt.feature.group 4.2.1. installation failed. cannot complete install because of conflicting dependency. software being installed: sample.student.mgt.feature 4.2.1 (sample.student.mgt.feature.group 4.2.1) software installed: sample.student.mgt.feature 4.2.0 (sample.student.mgt.feature.group 4.2.0) 1 of following can installed @ once: sample.student.mgt.feature 4.2.1 (sample.student.mgt.feature.jar 4.2.1) sample.student.mgt.feature 4.2.0 (sample.student.mgt.feature.jar 4.2.0) cannot satisfy dependency: from: sample.student.mgt.feature 4.2.0 (sample.student.mgt.feature.group 4.2.0) to: sample.student.mgt.feature.jar [4.2.0] cannot satisfy ...

c++ - How to get multiple parameters from boost::split -

how can split std::string both values of structure object filled. q.qcmd = "command1" q.timevalue = 1.0 this sample code. struct queuecommand { std::vector<std::string>qcmd; std::vector<float>timevalue; }; int _tmain(int argc, _tchar* argv[]) { std::string str = "command1|1.0" std::string str1 = "command2|2.0" queuecommand q; boost::split( q,str,boost::is_any_of("|")); // need fill qcmd , timevalue boost::split( q,str1,boost::is_any_of("|")); return 0; } this not correct usage of boost::split because first parameter has container string , , split not know how fill specific structure. give hints on how solve it. have not tested code, can try yourself: first, have declare vector store parts: std::vector<std::string> parts; then, boost::split can split command string: boost::split( parts, str, boost::is_any_of("|")); reserve enough space in corresponding queuecommand va...

ios - XCode 7 How to pin to superview and not toplayout guide -

Image
i'm using solution post. autolayout: add constraint superview , not top layout guide? but in xcode 7, option no longer available. moved somewhere? or there way pin superview bypassing toplayoutguide? found toplayoutguide behaving differently ios7,8,9. thanks! it appears have removed menu option, there arrow next place put top/bottom/trailing/leading margins still give option. here screenshots top , bottom layout guides. reason, can't top layout guide show up, bottom 1 still there.

excel vba - VBA Filtering Loop in Loop -

i found code, 1 column find unique values, , filter them,copy/paste in filtered values named sheet. but need do, filter 2 columns, , name same principles, modified it. somehow on second value in first loop, doesnt start loop in other loop. why give me blanks in second loop? sub datu_sagrupesana() dim x range, y range, rng range, last long, sht worksheet application.screenupdating = false 'datu vieta set sht = thisworkbook.worksheets("test") 'apgabals last = sht.cells(rows.count, "a").end(xlup).row set rng = sht.range("a1:c" & last) sht.range("a1:a" & last).advancedfilter action:=xlfiltercopy, copytorange:=range("h1"), unique:=true 'produkta filtrs sht.range("c1:c" & last).advancedfilter action:=xlfiltercopy, copytorange:=range("j1"), unique:=true 'valodas filtrs each y in range([j2], cells(rows.count, "j").end(xlup)) each x in range([h2], cells(rows.count, ...

Hotter/Colder Number Game in Python -

i'm working way through code academy python course , have been trying build small side projects reinforce lessons. i'm working on number game. want program select random number between 1 , 10 , user input guess. then program return message saying win or prompt pick higher/lower number. my code listed below. can't reiterate process second user input. i don't want answer, hint. import random random.seed() print "play number game!" x = raw_input("enter whole number between 1 , 10:") y = random.randrange(1, 10, 1) #add loop in here make game repeat until correct guess? if x == y: print "you win." print "your number ", x, " , number ", y elif x > y: x = raw_input("your number high, pick lower one: ") elif x < y: x = raw_input("your number low, pick higher one: ") you need use while loop while x != y: . here more info while loop. , can use import random y...

java - Spring Integration with Hibernate & JPA - one table not created on boot , others are -

i trying add 2 tables existing spring application. 1 being created in db , other not. cant see obvious differences jpa objects, , have updated db properties both. major difference between tables 1 mapped user's table in bi-direcitonal relationship, other one-directional. here code samples: persistence.xml: <persistence-unit name="samplepersistenceunit" transaction-type="resource_local"> <provider>org.hibernate.ejb.hibernatepersistence</provider> <class>com.bpc.services.domain.objects.user</class> <class>com.bpc.services.domain.objects.account</class> <class>com.bpc.services.domain.objects.transaction</class> <class>com.bpc.services.domain.objects.payment</class> <class>com.bpc.services.domain.objects.product</class> <properties> <!-- value="create" build new database on each run; value="update" modify existing dat...

bnd - How to package OSGi subsystems with bndtools -

i evaluating bndtools alternative websphere osgi tooling in eclipse, package liberty profile features. liberty profile uses osgi subsystems packed .esa extensions runtime. appears possible package subsystem using bnd, based on file in bnd git repo. https://github.com/bndtools/bnd/blob/master/biz.aqute.bndlib/src/aqute/bnd/exporter/subsystem/subsystemexporter.java but can't find documentation how setup esa project. can give me pointers?

url - Issue in passing argument to custom protocol through href? -

i have created custom protocol name "myapp" , trying pass arguments via href tag <a href="myapp://e:/file.txt">click here</a> . myapp protocol described below: [hkey_classes_root\myapp] @="\"url:alert protocol\"" "url protocol"="\"\"" [hkey_classes_root\myapp\defaulticon] @="\"c:\\windows\\system32\\notepad.exe,1\"" [hkey_classes_root\myapp\shell] [hkey_classes_root\myapp\shell\open] [hkey_classes_root\myapp\shell\open\command] @="\"c:\\windows\\system32\\notepad.exe\" \"%1\"" on clicking anchor link throws error "the filename, directory name, or volume label syntax incorrect." i guess argument passed through <a href="myapp:e:/file.txt"> tag not getting recognized. i have no idea how escape slashes(/) or special character here. please,help me or let me know if doing wrong. you have parameter also. he...

javascript - Chrome Extension XMLHttpRequest Can't open same-window link -

i making chrome extension scraper im working on control etc.. have login script here: <?php $username = $_get['username']; $password = $_get['password']; $pass = sha1($password); $mysql = new mysqli("*" , "*" , "!!*" , "*"); $data = $mysql->query("select * `staff_section`.`logins` `staff_name` = '$username' && `staff_pass` = '$pass'"); echo $data->num_rows; $mysql->close(); unset($data); ?> and have launch.js file here: chrome.app.runtime.onlaunched.addlistener(function(){ chrome.app.window.create('window.html' , { 'outerbounds': { 'width' : 720, 'height' : 720 } , frame: 'none' }); get("loginform").addeventlistener('submit' , function(){ checklogin(get("username")...

ruby on rails 4 - Dokku app not deploying. Can anyone help me make sense of the logs? -

i've been struggling deploying app on dokku since yesterday. i've been able deploy 2 others on same paas platform reason, 1 seems giving issues. right now, can't make sense of these logs. 11:30:52 rake.1 | started pid 12 11:30:52 console.1 | started pid 14 11:30:52 web.1 | started pid 16 11:30:52 worker.1 | started pid 18 11:31:30 worker.1 | [worker(host:134474ed9b8c pid:18)] starting job worker 11:31:30 worker.1 | 2015-09-21t11:31:30+0000:[worker(host:134474ed9b8c pid:18)] starting job worker 11:31:31 worker.1 | delayed::backend::activerecord::job load (9.8ms) update "delayed_jobs" set locked_at = '2015-09-21 11:31:31.090080', locked_by = 'host:134474ed9b8c pid:18' id in (select "delayed_jobs"."id" "delayed_jobs" ((run_at <= '2015-09-21 11:31:30.694648' , (locked_at null or locked_at < '2015-09-21 07:31:30.694715') or locked_by = 'host:134474ed9b8c pid:18') ...

Data crawling using import.io -

Image
i have crawled data import.io. data in import.io account. have import.io account. want tranfer data of previous account new account. how can it? possible? found no option that thanks in advance do mean port actual data extracted, or api defined? there way port apis, although 1 one: open 2 browser windows , log in old , new accounts, respectively click on api inside old account, , copy url paste url inside new account window: you'll able "duplicate" api in new one. copy of original api definition, , able run , edit new account.

python - ImportError: No module named pyplot -

i'm using ubuntu 14.04 lts. and installed python-matplotlib using apt-get command. when using code in python command-line, #!/bin/python # -*- coding: utf8 -*- # test.py import matplotlib.pyplot plt plt.plot([1, 2, 3, 4]) plt.ylabel('some numbers') plt.show() this works. but when using .py file, error appears. traceback (most recent call last): file "test.py", line 6, in <module> import matplotlib.pyplot plt file "/home/cloud/dropbox/dc/hw02/matplotlib.py", line 6, in <module> importerror: no module named pyplot please help.. as evident traceback, have named file matplotlib.py . thus, python trying local import. rename file other matplotlib.py .

php - binding data from sub query? -

Image
screen shot image 1 so (image 1) "network" preview of data. have data in mysql database , importing php. because of reasons had make 2 sub queries. data on image. main query "data" 2 of sub "devices" , "units". can't call "devices" , "units" ng-repeat unknown reason. tried ng-repeat="x in data.devices" , other ways things don't show in on page. note! data main query "data" things ip, credential , user_id shown. result image 2 should image 3. thanks ! since data array , try ng-repeat="x in data[0].devices"

jquery - How to show vertical scroll bar on select box -

i using angular select box ,i need show scroll bar if data more 5 . <select class="form-control" data-ng-model='projectlistdata.appversion' ng-selected ng-options="v.version v.version v in versionlist | orderby:'-version' " > <option value="" selected="selected" disabled="disabled">choose version</option> </select> i tried size not working . size = '5' please suggest html: <select id="versions" class="form-control" data-ng-model='projectlistdata.appversion' ng-selected ng-options="v.version v.version v in versionlist | orderby:'-version' " > <option value="" selected="selected" disabled="disabled">choose version</option> </select> js: if($scope.versionlist.length > 5){ //vanilla js dropdown defined var dropdown = document.getelementbyid("ver...

css - How can i use hover property with two classes -

i have 2 css classes .circle-btn{ } .circle-btn-medium{ } hhowever both classes having own properties. @ hover property want use same background color both. one solution found use hover property seperatly follows .circle-btn:hover { background-color:#39c11e; } .circle-btn-medium:hover { background-color:#39c11e; } so instead of using hover property separately possible use property different classes @ same time can optimize coding? you can minimize joining 2 class in 1 .. .circle-btn:hover , .circle-btn-medium:hover { background-color: #39c11e; }

angularjs - Angular google map searchbox inside angular bootstrap modal -

im using these 2 cool angular modules, angular google map , angular ui bootstrap . what want achieve put google map search box inside modal , map alone works fine when add search box there conflicts. here have far. <script type="text/ng-template" id="modaltemplate.html"> <div class="modal-header"> <h3 class="modal-title">title</h3> </div> <div class="modal-body"> <div class="row"> <div class="col-xs-12"> <div style="width:100%;"> <ui-gmap-google-map center="map.center" zoom="map.zoom" draggable="true" options="options"> <ui-gmap-search-box template="searchbox.template" events="searchbox.events"></ui-gmap-search-box> </ui-gmap-google-map> </div> </d...

html - Full width image with mask -

Image
i have responsive website imageheader (full-width). on top of image have svg mask, have have painted-like on bottom of header. problem is, image isn't scaling fit width. 100% wide , 700px high (or cover it's parent, normally: background-size: cover). this like: and have achieved far (the image different doesn't matter: this why need brush: the code i'm using: <div class="cover"> <svg width="100%" height="100%" baseprofile="full" version="1.2"> <defs> <mask id="svgmask2" maskunits="objectboundingbox" maskcontentunits="objectboundingbox" transform="scale(1)"> <image width="100%" height="100%" xlink:href="/images/brush-header.png" /> </mask> </defs> <image id="the-mask" mask="url(#svg...