Posts

Showing posts from February, 2011

sql - Maximum salary of employee in specific department -

empid empname empsalary empdept 1 steve 5000 hr 2 robert 5000 management 3 brad 3000 hr 4 sam 4000 hr 5 dave 2000 management 6 stuvart 4500 management how employee details employee table salary max , belong hr department... query select empid,empname,empsalary,empdept employee empsalary in (select max(empsalary) employee) , empdept='hr' i tried above query, giving me accurate result, due performance issue can not use inner queries. you can use order by clause rownum oracle version < 12c : select empid, empname, empsalary, empdept employee rownum = 1 , empdept = 'hr' order empsalary desc otherwise can use following: select empid, empname, empsalary, empdept employee empdept = 'hr' order empsalary desc fetch first row ties p.s.: with ties option brings opportunity multiple results in case there multiple employees same max salary (...

swing - java MVC application -

i'm creating application @ moment want reuse gui make easy reuse , change elements i've been using mvc design pattern im having few issues first issue how implement actual design pattern different examples implement in different ways. code have in main, ok. mainview theview = new mainview(); mainmodel themodel = new mainmodel(); maincontroller thecontroller = new maincontroller(theview,themodel); theview.setvisible(true); the second problem have example set controller implemented view in using following code: controller: this.theview.addcalculatelistener(new calculatelistener()); view: public void addcalculatelistener(actionlistener listenforcalcbutton){ calculatebutton.addactionlistener(listenforcalcbutton); } this seems work fine have problems implementing listeners in jmenu there added within constructor of view plan create jmenu in external class can put menu items global variables (to clear code) allow me add listeners in manner, ...

CSS | Footer with Logo -

hey started learn html @ work. so, started make website fake company.i made navigation logo , side navigation. footer got problem, cause not in row. html code: <div id="footer"> <ul class="footer"> <li class="fuss"><a href="#">agb</a></li> <li class="fuss"><a href="#">impressum</a></li> <div class="wortmarke"> caf&eacute; villa bernstein <p class="copyright"> &copy; caf&eacute; villa bernstein. rights reserved. </p> </div> <li class="fuss"><a href="#">datenschutz</a></li> <li class="fuss"><a href="#">pressenews</a></li> </ul> </div> css: /* footer */ ul.footer { list-style-type: none; margin: 0; padding: 0; overflow: hidden; background-color: #333; pos...

excel - Conditional Formatting and text: Based on a condition I want to copy the format of another cell -

Image
in excel i trying copy elements , cell format of cell based on condition. g12 = (if c10 = c11, *leave blank, if (c10>c11, *copy elements , format of b10, *copy elements , format of b11)) i've tried function , have had success copying elements, cannot formatting change well. used: =if($c$10=$c$11,"",if($c$10>$c$11,b10,b11)) i learned conditional formatting don't see way copy format of cell based on condtion. color has specified. thanks help! tl:dr march madness example virginia beat unc 76 75 i want copy copy (1) virginia next spot in bracket lime green background. had unc won, want (16) unc , rose color copy next bracket spot go vb-editor (alt + f11), insert new module , paste code: function rangeselectionprompt(txt string) range dim rng range set rng = application.inputbox(txt, "select range", type:=8) set rangeselectionprompt = rng end function sub formatas() dim sh worksheet dim r1 range, r2 ...

android - Passing Google Places Results into ListView -

i developing application displays taxi companies around you. home page map markers showing different cab companies. there way details such name, address , phone number listview on next page? possible pass hashmap details listview , if so, how? can added class below shows map markers? package com.example.chela.taxilocatorapplication; import java.util.hashmap; import android.os.asynctask; import android.util.log; import com.google.android.gms.maps.googlemap; import com.google.android.gms.maps.model.latlng; import com.google.android.gms.maps.model.markeroptions; import org.json.jsonobject; import java.util.list; public class placesdisplaytask extends asynctask<object, integer, list<hashmap<string, string>>> { jsonobject googleplacesjson; googlemap mmap; @override protected list<hashmap<string, string>> doinbackground(object... inputobj) { list<hashmap<string, string>> googleplaceslist = null; com.e...

unity3d - Buttons without background, size, why? -

Image
i want create menu buttons. template button cloned , placed in vertical layout. worked in middle of work there strange effect of rendering text child od button, additionally gameobjects not have width, outside of canvas. on screen , in center template button, goal have 2 columns of buttons on left , right side. using unityengine; using unityengine.ui; public class dividedownui : monobehaviour { void start () { createbtnsrow(transform.find("panelleft")); createbtnsrow(transform.find("panelright")); } void createbtnsrow(transform panel) { for(int = 1; <= 10; i++) { gameobject btn = instantiate(transform.find("btntpl").gameobject); btn.transform.parent = panel; btn.setactive(true); btn.transform.find("text").gameobject.getcomponent<text>().text = "" + i; } } } ` resolved: there problem positioning: after using ...

java - How to get range of rows using spark in Cassandra -

i have table in cassandra structure create table dmp.table ( pid text primary key, day_count map<text, int>, first_seen map<text, timestamp>, last_seen map<text, timestamp>, usage_count map<text, int> } now i'm trying query using spark-cassandra driver , there can chunks of data. in if have 100 rows , should able 0-10 rows 10 -20 , on. cassandrajavardd<cassandrarow> cassandrardd = cassandrajavautil.javafunctions(javasparkcontext).cassandratable(keyspacename, tablename); i'm asking there no column in table can query using in clause range of rows. you can add auto-incrementing id coloumn -- see dataframe-ified zip index solution. can query newly-created id column: select ... id >= 0 , id < 10; etc.

angularjs - How to prevent Angular form from being sent to a php file (method="post") when invalid? -

i guess in such case default of angular add ng-disabled submit button. if so, user warned errors in each input, errors shown instantly. there way show errors (through function in controller or other way), after onclick, without having form submitted , send php if invalid? html <form name="myform"> <input type="text" name="textfield" ng-model="textfield"/> <md-button type="button" class="btn-width-medium md-raised md-primary" ng-click="validateform()"> save </md-button> </form controller : .controller("controller",function($scope){ $scope.validateform = function(){ // validation here // if valid // submit form - post data // else invalid // show message , return }; });

Rendering Javascript to obtain static HTML in Python -

i have big amount of html files want process using beautifulsoup , generate statistics. although, came across problem html files contain scripts may generate more html code not being processed. therefore, need render javascript static html before proceeding. i have seen options such using selenium, doesn't seem fit since don't want launch browser (it should done in background). can please suggest appropriate approach this? thanks in advance! since need javascript engine, using headless browser way go. using selenium web driver phantomjs headless browser best option: driver = webdriver.phantomjs() driver.get("...") bs = beautifulsoup(driver.page_source)

python - How can I transform a dataframe in pandas without losing my index? -

i need winsorize 2 columns in dataframe of 12 columns. say, have columns 'a', 'b', 'c', , 'd', each series of values. given cleaned nan columns, number of columns reduced 100 80, still indexed 100 gaps (e.g. row 5 missing). i want transform columns 'a' , 'b' via winsorize method. this, must convert columns np.array. import scipy.stats df['a','b','c','d'] = #some values per each column ab_df = df['a','b'] x = scipy.stats.mstats.winsorize(ab_df.values, limits=0.01) new_ab_df = pd.dataframe(x, columns = ['a','b']) df = pd.concat([df['c','d'], new_ab_df], axis=1, join='inner', join_axes=[df.index]) when convert np.array, pd.dataframe, it's len() correct @ 80 indexes have been reset 0->80. how can ensure transform 'a' , 'b' columns indexed correctly? don't think can use apply(), preserve index order , swap out values i...

c# - How to Safely and Efficiently Insert/Update Records in Entity Framework 6 for Changed-Only Fields? -

i trying safely insert/update entity using entity framework 6. instead of using addorupdate method not thread-safe , not recommended production, figured first attempt insert entity in db , if fails due primary key collision, update instead. used database first model. entity user primary key = userid , other fields nullable. need update scenario return updated entity post'ed values on corresponding values leaving others in db. for example, user entity has 20 properties. post may update small subset of these properties given userid. need returned user show updated user. for example, first post insert new user userid = x1 this: { "userid": "x1", "firstname": "user first name", "lastname": "user last name", "email": "email@company.com" } my 2nd post update user update email this: { "userid": "x1", "email": "different_email@xyz.com" } ...

ios - Instance variable NSArray not updated correctly in Swift 2 - xCode 7.2 -

my message object has to, , content variable. i'm creating page display tableview unique conversation history. meaning names , profile pictures of people exchanged messages with. made nsarray variable append data in loaddata function display them on table. parse query returns 2 objects, when print resultdata array count prints 0 , reloaddata of course doesn't work. however, adding print statement line after append result object array in loaddata() function, works , prints correctly twice means nsarray not updating. knows why? this code : import foundation import uikit import parse class messagescontroller: uiviewcontroller, uitableviewdatasource, uitableviewdelegate{ @iboutlet weak var loadingindicator: uiactivityindicatorview! @iboutlet var tableview: uitableview! var resultdata:nsmutablearray = nsmutablearray() var users = [string]() func loaddata(){ loadingindicator.hidden = false loadingindicator.startanimating() ...

c# - ItextSharp With multiple signature not locking set fields -

hi guys new m kinda stuck , love insight on matter. able sign pdf form itextsharp. digital signature falls in place fields have set lock in adobe if signature occurs not getting locked.even though works directly i.e. if go put signature in adobe instead of using (itextsharp) fields locked . using code similar lockfields on gitlab difference using existing pdf rules set fields lock when pdf signed.so problem in pdf there many fields lock 1 one using itext sharp i'd rather raise event or in adobe sayin signature has fallen , put rules have set active.

angularjs - Change ng-modal input value with another input in-modal -

i want change value of input has ng-model input ng-model value. not so. ng-model="quantity" in ng-repeat , , ng-model="power" outside of ng-repeat . when change value in power quantity should change accordingly. e.g <input type="text" ng-model="quantity" value="{{quantity * power}}"> <input type="text" ng-model="power" value="{{power}}"> try this. angular.module('myapp', []).controller('mainctrl', function ($scope) { $scope.quantities = [25, 6, 6.5, 80]; $scope.quantitiesnewvalue = [25, 6, 6.5, 80]; $scope.power = 1; $scope.setvalue = function(power){ angular.foreach($scope.quantities, function(quantity,i){ $scope.quantitiesnewvalue[i] = power * quantity; }); } }) <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js...

How to extract the array index value from getelementptr instruction of llvm -

array[5] = 20; equivalent llvm ir %arrayidx = getelementptr inbounds i32, i32* %2, i64 5 store i32 20, i32* %arrayidx, align 4 how extract 5 llvm ir ? if have getelementptrinst* gep , can access indices using gep->getoperand(i) (with operand 0 being pointer, , remaining operands being indices). value 5, can check index constantint , if value, this: if (constantint *ci = dyn_cast<constantint>(gep->getoperand(1)) { uint64_t idx = ci->getzextvalue(); }

In Freemarker, how to translate each string in a list individually, then join the result -

my model contains list of two-letter language codes, eg (pseudo-code): ${info.languages} = [en, jp, mi] i have mark-up in template formats these semicolon-space-separated list: <#if info.languages??> ${info.languages?join("; ", "")} </#if> which gives en; jp; mi i'd show english name each language code in semicolon-separated list instead. know can use locale#getdisplaylanguage lookup in java, i'm not worried actual translation part. my question how tie template while still taking advantage of join built-in. guess ideally i'd want able chain operators so: ${info.languages?displaylanguage?join(", ", "")} but it appears ?xyz syntax reserved core built-ins. tl;dr: there way combine custom function join built-in? or else useful i'm overlooking? or choice have custom function joining translation? ?join pretty exists convenience, address common case. in more generic cases should u...

angularjs - Protractor test not running shows 'weird error 8' -

when tried run protractor test using sudo npm run protractor . show following in terminal > angular-seed@0.0.0 update-webdriver /home/krishna/projects/main/clients/web > webdriver-manager update selenium standalone date. chromedriver date. > angular-seed@0.0.0 protractor /home/krishna/projects/main/clients/web > protractor e2e-tests/protractor.conf.js [launcher] process exited error code 1 /home/krishna/projects/main/clients/web/node_modules/protractor/node_modules/q/q.js:155 throw e; ^ syntaxerror: unexpected token ) @ goog.loadmodulefromsource_ (/home/krishna/projects/main/clients/web/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/base.js:1123:19) @ object.goog.loadmodule (/home/krishna/projects/main/clients/web/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/base.js:1085:46) @ /home/krishna/projects/main/clients/web/node_modules/protractor/node_modules/seleniu...

iphone - How to add a UIImage to an email using MFMailComposerViewController? -

this question has answer here: how add image in email body using mfmailcomposeviewcontroller 4 answers i'm using mfmailcomposerviewcontroller send email ios app. mail works except when trying add image. issue image me getting using i've seen other examples use like: uiimage *emailimage = [uiimage imagenamed:@"myimagename.png"]; add image. image taken database table using [self.photo objectforkey:kphotopicturekey]; // mail // email subject nsstring *emailtitle = @"join. download iphone app"; // email content nsstring *messagebody = @"http://www..com/"; // address nsarray *torecipents = [nsarray arraywithobject:@""]; uiimageview *mailimage = [[uiimageview alloc] init]; mailimage.image = [uiimage imagenamed:@...

go - open _rels/.rels: permission denied golang -

i trying unzip .docx file. first file of name "[content_types].xml" has been extracted. encountered error follows: open frontend/uploads/doc_data/_rels/.rels: permission denied how can set permission this? the unzip function use follows: func unzip(src, dest string) error { r, err := zip.openreader(src) if err != nil { return err } defer r.close() _, f := range r.file { rc, err := f.open() if err != nil { return err } defer rc.close() fpath := filepath.join(dest, f.name) if f.fileinfo().isdir() { os.mkdirall(fpath, f.mode()) } else { var fdir string if lastindex := strings.lastindex(fpath,string(os.pathseparator)); lastindex > -1 { fdir = fpath[:lastindex] } err = os.mkdirall(fdir, f.mode()) if err != nil { log.fatal(err) return err } f, err := os.op...

android - Passing dictionaries or objects in HTTP POST -

is practice pass dictionaries part of http post payload. many python http client libraries support passing dictionaries part of http payload. , server (python server in limited experience) parses request , returns dictionary. however, android client (okhttp) doesn't support passing dictionaries (or objects matter). supports passing "key"->"value", value string. my question: practice pass dictionaries, or should encode (json, since popular) before passing objects?

Array of Structures in C missing data? -

i designing program in c. part of program involves reading table of data relating periodic table , elements file, , putting in structure. so far, it's working rather well. however, reason, when try display array, couple of elements don't show up, instead blanks. show earlier in code, though. main.c main() { struct periodic *tableptr; tableptr = createtable(); printf("%d\t",(tableptr+90)//prints "pa" here expected int i; for(i=0;i<num_elements;i++){ printf("%d\t%s\n",i,(tableptr+90)->sym);//prints i, blank. } } periodic.c (creates table) #include "periodic.h" #include <stdio.h> struct periodic *createtable(){ char format[] ="%d\t%s[3]\t \ %s[20]\t%f\t \ %s[100]\t%f\t \ %d\t%f\t%d\t \ %d\t%d\t%s[20]\t \ %s[7]\t%s[17]\t \ %d...

java - Take camera image and add to slider in android -

i'm new android , i'm trying add images taken camera , add them viewpager . it's supposed image carousel . i've tried far, problem same image being added 5 times. want know can change in getcount() method of customadapter in order different images carousel. my mainactivity public class mainactivity extends appcompatactivity { public final static int capture_image_activity_request_code = 1034; public string photofilename = "photo.jpg"; public final string app_tag = "mycustomapp"; viewpager viewpager; customswipeadapter adapter; imageview iv; protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); button btn = (button) findviewbyid(r.id.button1); viewpager = (viewpager) findviewbyid(r.id.view_pager); btn.setonclicklistener(new view.onclicklistener() { @override public void onclick(view v) {intent intent = new intent(mediastore.actio...

sql server - Can't return varbinary datatype from Stored Procedure -

i call stored procedure this: exec @varbinary = [procedure] @param1='test',@param2='test',@outputparam = @output output which goes procedure: alter procedure [procedure] @param1 varchar(50), @param2 varchar(32), @output varbinary(128) output begin set nocount on; set @param1 += @param2 set @output = convert(varbinary(128),hashbytes('sha2_512',@param1),2) --select @output return end go it returns 0x00000000. if select value directly procedure, works intended. everything fine code - alter procedure usp_proc ( @param1 varchar(50), @param2 varchar(32), @outputparam varbinary(128) output ) begin set nocount on; set @outputparam = convert(varbinary(128), hashbytes('sha2_512', @param1+@param2),2) select @outputparam end go declare @output varbinary(128) exec usp_proc @param1='test', @param2='test', @outputparam = @output output select @output output - ------...

postgresql - How does one service resolve the address of another service using docker compose, link hostname, and ports? -

i have read several questions revolving same question, due insufficient points, cannot comment on existing questions. therefore, must spawn own question thread regarding docker-compose , links. i under impression having following in docker-compose file add 'db' container's hostfile web: links: - db i thinking web code establish db connection along lines of db := sql.open("postgres", "user=foo dbname=baz host=db") where hostname db exists in web container's /etc/hostfile , therefore resolves address reaches db container. my web application not resolve address db running, instead resolves address (172.19.0.3) , cannot figure out has come or how fix. docker exec $web_container_id cat /etc/hosts 127.0.0.1 localhost ::1 localhost ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters 172.19.0.2 6f52f9e78f00 i expecting see entry db. furthermore: docker exec $web_c...

ios - How to Post Data in Amazon Web Services swift? -

i used code post data in "amazon web services" in swift. let usernamedata = string("prnty").datausingencoding(nsasciistringencoding)! let passdata = string("xxx").datausingencoding(nsasciistringencoding)! let tokendata = string("xxxxxx").datausingencoding(nsasciistringencoding)! let devicetypedata = string("ios").datausingencoding(nsasciistringencoding)! alamofire.upload( .post, "https://xxxxx.execute-api.ap-southeast-1.amazonaws.com/dev/webserv", headers:["x-api-key":"xxxxxxxxx"], multipartformdata: { multipartformdata in multipartformdata.appendbodypart(data: usernamedata, name: "username") multipartformdata.appendbodypart(data: passdata, name: "password") multipartformdata.appendbodypart(data...

android - Get the In app subscription trail period pragmatically. -

i working in android application want implement inapp billing subscription. have created subscription id in google play developer console trail period of 7 days. my requirement notify user each time remaining days left subscription when app launches. how can trail period left subscription pragmatically . correct way implement inapp billing subscription trail period, if no please suggest me correct way implement this. yes, in-app billing api version 3 supports trial period! couldn't find whether there api call give kind of details on trial period need in documentation doesn't mean there isn't such class/method. however, relying on remote google service subscription status means user not notified when not connected network. maybe lack of notification when not on network not problem. but, knowing of limitation, record , keep start date locally, well. once have captured results of api call allows user start trial period, can save data locally. there 3 ...

node.js - how to run node without getting stuck in the node command prompt -

i've installed node on ubuntu virtual private server , ssh it. run $nodejs index.js but after running file, i'm stuck in node command prompt , can out pressing ctrl-c. doing stops nodejs server. want run server , go shell , other things. how do this? use pm2. process manager. can whatever after initiate on server. https://github.com/unitech/pm2

java - Different ways to get Servlet Context -

could explain me difference between ways of getting servletcontext of httpservlet ? doget( httpservletrequest request, ... ){ getservletconfig( ).getservletcontext( ); request.getsession( ).getservletcontext( ); getservletcontext( ); } is there difference in performance or in context itself? if so, best way? there other way of retrieving context? there's 1 more. request.getservletcontext(); there's technically no difference in performance, request.getsession() implicitly create http session object if not created yet. if not done yet, grabbing servlet context via session may take few nanoseconds longer if session isn't created yet. there's no difference in returned context. methods convenience , method obtain context depends on context ;) you're sitting in. if you're sitting in method invoked servlet's service() (such doget() , dopost() , etc), use inherited getservletcontext() method. other ways unnecessarily add more...

How to add a Maven project as a Gradle dependency? -

how add maven project gradle dependency? have gradle project working on , multi-module maven project import gradle project code dependency. how it? you can't add maven multi-module project structure dependency directly. can, however, build multi-module project using mvn install install project jars local repository. then, in build.gradle , need following configuration: repositories { mavenlocal() } this add local maven repository list of code repositories gradle through artifacts. can declare dependency on module(s) gradle project requires. dependencies { compile 'my-group:my-artifact:version', 'my-group:my-other-artifact:version' } when multi-module project updates new release version, run mvn install release , update build.gradle needed. unless developer on both projects, better use private repository nexus or artifactory host maven project , configure gradle pull dependencies there well. references: maven loca...

php - Symfony2 using Multiuser Bundle and Alice Bundle -

on webproject i've been using hautelook alice bundle ( https://github.com/hautelook/alicebundle ) create fixtures dev , testing. user management i'm using fos userbundle. data file looked , used work fine: appbundle\entity\staffdetail: staffdetail_{1..5}: prefix: <title()> first_name: <firstname()> last_name: <lastname()> appbundle\entity\staff: staff_1: username: admin@example.com plainpassword: password email: admin@example.com mandant: @mandant_1 enabled: true role: administrator staffdetail: @staffdetail_1 staff_{2..5}: username (unique): <safeemail()> plainpassword: password email: <identity($username)> mandant: @mandant_1 enabled: true role: administrator staffdetail: @staffdetail_<current()> now i'm trying have different login mechanisms different user groups (staff , customers), want use rollerworks multi user bundle ( https://github.com/rollerworks...

url - Best folder structure for assets/images of a social networking web and mobile application -

i wondering rationale behind big social networks folder structures images hold. i'm creating api smaller social app endpoints similar following: https://api.example.com/v1/users/<id> https://api.example.com/v1/users/<id>/posts/<post_id> and users can upload profile images via put call to: https://api.example.com/v1/users/<id>/images now images served through nginx , example can access profile image via: https://cdn.example.com/images/user/<id>/profile/<imagename>.jpg so i'm wondering why facebook, twitter, instagram , guys have structures similar giberish: https://fbcdn-photos-d-a.akamaihd.net/hphotos-ak-xal1/v/t1.0-0/p480x480/10329215_977076969053738_7417509963714441891_n.jpg?oh=64aecaca7a84139c16e8a0f579782034&oe=57880bf0&__gda__=1469390211_f894185cc7e133738a0b9321e28e53c3 i'm aware have insane levels of images serve , across many servers, can't make sense of urls.

c# - ASP.NET MVC launching time -

i have big application develop (asp.net mvc) , wasn't mine , received client. when run via visual studio, takes 2-3 minutes launch . i'm wondering going on after pressing f5 button in vs (except copiling , copying dll's, views, content output folder). if had guess i'd you're compiling cshtml code , can slow in older versions of visual studio. check see if have <mvcbuildviews>true</mvcbuildviews> in .csproj file. see answer mvc application extremely slow build

eclipse - How to add java environment variable to mac os x -

can tell me series of terminal commands enter adding java environment variable mac os x? have tried export (directory) vim .bash_profile , still getting error in eclipse "error: not find or load main class test.testclass" try seeing if helps you echo export "java_home=\$(/usr/libexec/java_home)" >> ~/.bash_profile taken link: mac os x java environment variable i don't think missing class environment issue. file located in eclipse?

Configuring Internet facing deployment (IFD) for CRM 2013 -

what benefits , drawbacks of using ifd? what steps configuring ifd? is possible test configure ifd on virtual machine? if yes, please guide steps? , if not? implement procedure? i have not implemented crm. , got assignment implement ifd. ps: want implement things on own. need right way things. thanks in advance guidance. interactive webs has description adfs/ifd on https://www.interactivewebs.com/blog/index.php/crm-2013/crm-2013-ifd-setup-with-adfs-3-0-on-windows-2012-r2-hosted-setup/ can setup on vm, make sure dns setup , should work. if haven't worked crm @ might bumps getting working imho might take time. the pro of having ifd crm it's reachable everywhere without having use vpn, drawback might no longer behind firewall.

java - Get org.springframework to stop polluting my logs -

i using payara 4.1 , netbeans 8.1. when run application, these 4 lines among first logged: #!## logmanagerservice.postconstruct : rootfolder=/opt/payara41/glassfish #!## logmanagerservice.postconstruct : templatedir=/opt/payara41/glassfish/lib/templates #!## logmanagerservice.postconstruct : src=/opt/payara41/glassfish/lib/templates/logging.properties #!## logmanagerservice.postconstruct : dest=/opt/payara41/glassfish/domains/domain1/config/logging.properties i added line org.springframework=warning @ end of last logging.properties file given above, , restarted server. didn't seem have effect. when open asadmin shell /opt/payara41/bin/asadmin , run list-log-attributes , here get: asadmin> list-log-attributes com.sun.enterprise.server.logging.gffilehandler.excludefields <> com.sun.enterprise.server.logging.gffilehandler.file <${com.sun.aas.instanceroot}/logs/server.log> com.sun.enterprise.server.logging.gffilehandler.flushfrequency <1> c...

php - Adding dynamic amount of subforms to Zend_Form -

i'm creating form using js - have structure of: <form> [other input fields here] // these rows added via js <ul> <li> <input name="field[0][id]"> <input name="field[0][data]"> </li> <li> <input name="field[1][id]"> <input name="field[1][data]"> </li> ... </form> i want validate id fields. such, form, i've constructed subform field i'm adding form, and... i'm stumped, as, within init() i'm not able know how many rows there be. is there way add undetermined amount of subforms (akin declaring multiselect[] multivalued, if makes sense), or, have move creation of subforms isvalid() ? i've went ahead moving functionality isvalid() , results are... suprising. code: foreach($values['field'] $index => $values) { $index_form = new zend_form_subform(); $values_form = new zend_form_subform(); $data = new zend_form_element_t...

vb.net - .exe is not a valid Win32 application on Windows XP -

i'm using visual studio 2012 professional , creating installer using advanced installer (3rd party). when run installed .exe on windows xp, following message: <appname>.exe not valid win32 application. the installed executable works fine on both windows 7 , 8. how can program work on windows xp? from visual studio command prompt, run command: dumpbin.exe /headers c:\where\you\put\it\setup.exe where "setup.exe" setup exe created installer creator. i'll post example of info see matters here: optional header values 10b magic # (pe32) ... 4.00 operating system version 0.00 image version 6.00 subsystem version // <=== here!! 0 win32 version ... the subsystem version number important. vs2012 first version of visual studio started setting value 6.00, version number of vista. previous versions, vs2012 when target .net 4.0 or earlie...

hive - oozie job failing with error JA009: bad conf file -

i new in oozie , struggling run simple hiveql using following oozie job. used following workflow.xml , job.properties. workflow.xml <workflow-app xmlns="uri:oozie:workflow:0.2" name="init"> <start to="step1"/> <action name="step1"> <hive xmlns="uri:oozie:hive-action:0.2"> <job-tracker>abc</job-tracker> <name-node>def:8020</name-node> <job-xml>workflow.xml</job-xml> <configuration> <property> <name>mapred.child.java.opts</name> <value>-xmx1500m</value> </property> <property> <name>io.sort.mb</name> <value>500</value> </property> <property> <name>dfs.block...

javascript - angularjs video upload with thumbnail -

i have tried creating directives is not working please if have please share video upload thumbnail code possible , thank u in advance angular .module('chotamangoadmin') .directive('fileupload', filemodel); filemodel.$inject = [ '$parse' ]; ngthumb.$inject = ['$window']; function filemodel($parse) { return { scope:true, //create new scope link: function(scope, element, attrs) { element.bind('change', function(event){ var files = event.target.files; console.log(files.length); scope.$emit("fileselected", { images: files }); }); } }; } jquery file upload demo angularjs version file upload widget multiple file selection, drag&drop support, progress bars, validation , preview images, audio , video angularjs. supports cross-domain, chunked , resumable file uplo...

jquery - Owl carousel 2 dynamic content JSON -

i have problem displaying dynamic content owl carousel 2 using json/ajax. no error messages in console, cant carousel work. see blank page. able append image url's fetched json file jquery.append, wont shown in carousel way. displays set "block". tips missing? index.html - <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>rengastie</title> <link rel="stylesheet" href="css/app.css"> <link rel="stylesheet" href="css/owl.carousel.min.css"> <link rel="stylesheet" href="css/owl.theme.default.min.css"> <link rel="stylesheet" href="css/style.css"> </head> <body> <div class="row"> <div class="small-12 columns"> <div id="top-carousel...

python tkinter canvas not resizing -

i'm trying subclass tkinter controls make auto scrolling frame use in program, want scroll vertically, , when widgets added need scroll horizontally instead resize parent fit. widgets go in frame not defined @ runtime , created dynamically, must react events. have code partly working, in run it, can use buttons @ bottom add , remove labels on fly, if without manually resizing window first works expected. if manually resize window horizontal resizing stops working: from tkinter import * __all__ = ["verticalscrolledframe"] class verticalscrolledframe(frame): def __init__(self, parent, *args, **kw): frame.__init__(self, parent, *args, **kw) self.grid_columnconfigure(1, weight=1) self.grid_rowconfigure(1, weight=1) # create canvas object , vertical scrollbar scrolling self.vscrollbar = scrollbar(self, orient=vertical) self.vscrollbar.grid(column=2, row=1, sticky="nesw") self.canvas = can...