Posts

Showing posts from June, 2010

android - Optimizing icon usage? -

i got new requirement present image instead of error text if there no items show , image have 440 kb (png) in size given ui/ux designer. don't think it's fair use straightforward. it's transparent background image it's not possible reduce size converting jpg format. got 4 resolutions of image placing in different resolution resource folder. if keep of them in apk, take near 1 mb, had taken 1 image drawable-xhdpi folder , kept in drawable-nodpi . okay, queries follows 1) how can efficiently use image ? 2) worries if use jpg icons substitute of png ? 3) keeping images these in drawable-nodpi , setting size in different dimension file ? 1) convert png webp if need support api level 13+, otherwise use zopflipng optimize png. 2) jpg not support alpha channel , it's lossy. 3) put in drawable-xhdpi , let android scale image you. put images in drawable-nodpi if don't want image scaled.

WildFly + java Preferences cannot find custom preferences class in classpath -

i deploying ear below structure wildfly 9.0.2 my.ear |-my.sar (it sar archive) |-lib |-mypreferencesimpl.jar i able load classes in lib/mypreferencesimpl.jar my.sar (like class.forname(com.my.preferencesfactory) directly. however, java.util.prefs.preferences.factory not able load com.my.preferencesfactory. passing djava.util.prefs.preferencesfactory=com.my.preferencesfactory command line parameter during wildfly startup. below exception thrown. caused by: java.lang.classnotfoundexception: com.my.preferencesfactory [module "org.jboss.as.jmx:main" local module loader @76a3e297 (finder: local module finder @4d3167f4 (roots: /csa_wildfly/wildfly/modules,/csa_wildfly/wildfly/modules/system/layers/base))] @ org.jboss.modules.moduleclassloader.findclass(moduleclassloader.java:205) @ org.jboss.modules.concurrentclassloader.performloadclassunchecked(concurrentclassloader.java:455) @ org.jboss.modules.concurrentclassloader.performloadclasschec

sql - PostgreSQL : CAST column only if exists -

os linux debian 5.3.1 if helps. i have bunch of csv files managed import tables in postgresql. have same general layout (i.e. globally same columns), of them vary (i.e. of them may miss columns). clearer, general layout supposed columns a, b, c, d, e, table have colums a, b, d, e, other columns b, c, d, e... i'd make general sql query changing type of columns (using cast) , import them in 1 single global table (t_import) columns a, b, c, d, e. insert t_import (a, b, c, d, e) select ( (cast integer) a, (cast b character varying(14)) b, (cast c integer) c, (cast d character varying) d, (cast e character varying) e t_csv; however tables miss columns, should creating query each table want import, tiresome number of tables have. is there way check if column exists in table want import, if exists, cast it, else use default value ? way allow me use same query different tables without getting errors. globally i'd : check if colum

video - html5 player does not show in IE 11 when src is base 64 string -

the page referred here: http://www.rtbaileyphd.com/src/testjunk/html5videoproblem.out.html there should 2 html5 video players showing there. both play same video, first 1 src file has been base 64 encoded , embedded html. source specified src="data:video/mp4;base64,aaa...". approach mandatory application. in 2nd video standard approach of using src="http://..." used. if view page in chrome, firefox, or opera both players show. however, ie 11 1st video player not show unless hover mouse on supposed be. can video play if that. problem resolved if autoplay option added, not want videos automatically play. there way put image of player underneath actual, invisible player? tried poster attribute, poster image not show either. after posting, answer came me. since video show if autoplay turned on, add autoplay video tag, , since have javascript page initialization function anyway, add javascript pause videos after page first shown. see pause multi

swift - Alamofire number of requests one after another -

i have number of requests witch call 1 after without having nested spaghetti code. i tried serial dispatch queue let queue = dispatch_queue_create("label", dispatch_queue_serial) alamofire.request(router.countries).responsestring { (response:response<string, nserror>) in print(1) } alamofire.request(router.countries).responsestring { (response:response<string, nserror>) in print(2) } alamofire.request(router.countries).responsestring { (response:response<string, nserror>) in print(3) } but unfortunately not work. output of can 1,3,2 or 3,1,2 or other combination. what best approach output 1,2,3 1 after other. ok ended writing own implementation. i created class requestchain wich takes alamofire.request parameter class requestchain { typealias completionhandler = (success:bool, errorresult:errorresult?) -> void struct errorresult { let request:request

devops - Multiple applications in one IIS website with MS Release Management -

Image
i using iis web app deployment using winrm extension ms release management vnext template (tfs 2015 update 2). can deploy simple website think permissions , must set-up properly. my issue have multiple web applications hosted in single website , deploy automatically. the winrm - iis web app management task not seem have option doing this. how can it? i have tried adding / website name gives me exception: exception calling "setright" "2" argument(s): "could not obtain user information.". i found issue on github.com/microsoft/vsts-rm-extensions says should following: add manage iis task creates website add deploy iis task deploys website\app , set override parameters name="iis web application name", value="$(webappname)" webappname=website\app. it lot better if deploy task had option add website application or something.

angular material - Adding $watchGroup for selectboxes using angularjs -

i have problem $watchgroup multiple selectboxes. have 2 select boxes want add $watchers. i tried in following way not working watchers select boxes, controller.js $scope.authorization = ''; $scope.authentication = ''; $scope.authorizationmodel = ''; $scope.authenticationmodel = ''; $scope.authenticationobj = [ {id: 1, authtype: 'authentication' }, {id: 2, authtype: 'e-kyc' } ]; $scope.authorizationobj = [ {id: 1, authtype: 'best finger detection' }, {id: 2, authtype: 'one time password' } ]; $scope.$watchgroup(['authorizationmodel', 'authenticationmodel'], function(newvalues, oldvalues, scope) { console.log(newvalues[0]+'--'+newvalues[1]); if(newvalues[0].id !== undefined && new

java - Parsing xml with StAX: not getting a large content tag -

i using stax parse xml file, problem when tag content large, stax not able give me whole content. here part of xml doc, content of payload tag more larger, can't print in sof: <payload>{\"id\": \"entity24\",\"attr1\": {\"type\": \"sensor\",\"type\": \"type1\",\"value\": \"val1\",\"metadata\": {}}}</payload> here part of code parsing it: if(startelement.getname().getlocalpart().equals("payload")){ xmlevent = xmleventreader.nextevent(); if(xmlevent.ischaracters()){ setpayload(xmlevent.ascharacters().getdata()); } } any idea why stax not able give whole tag content? , best regards. you should either concatenate ischaracters events between other events or set is_coalescing property. just sax, stax may offer 1 single run of characters multiple events.

python - How can i remove overlap in list? -

i made example python list. list_1 = [1,3,2,2,3,4,5,1] print(list_1) [1, 3, 2, 2, 3, 4, 5, 1] to remove overlap, tried use set(). print(set(list_1)) {1, 2, 3, 4, 5} but want make [1,3,2,4,5] i want remove overlap in list, want order not changed. how can that? you can use list-comprehension filter (initialize empty list first, ignore resulting list) list_u = [] [list_u.append(v) v in list_1 if v not in list_u]

gcc - How to enable Aarch32 instruction set on ARMv8-a? -

raspberry pi 3 uses broadcom soc , armv8 a53 core . uses 32-bit os based on debian jessie. according arm's arm neon programming quick reference , section 3.2, instruction set : the armv8-a aarch32 instruction set consists of a32 (arm instruction set, 32-bit fixed length instruction set) , t32 (thumb instruction set, 16-bit fixed length instruction set; thumb2 instruction set, 16 or 32-bit length instruction set). superset of armv7-a instruction set, retains backwards compatibility necessary run existing software. there additions a32 , t32 maintain alignment a64 instruction set, including neon division, , cryptographic extension instructions. neon double precision floating point (ieee compliance) supported. i kind of asked similar question while on gcc mailing list @ how test aarch32 execution environment on aarch64? did not quite understand answer: once you're compiling arm toolchain crc extension can enabled through -march=armv8-a+crc or selecting -mcpu opt

sql server - Date formatting in MS SQL -

i have change 1 date mon/yyyy format. how can achieve in sql server? using replace, right, , convert can results want: select replace(right(convert(char(11), getdate(), 106), 8), ' ', '/') results: jul/2016

c# - How to use Composite command in mvvm -

intro i'm working wpf mvvm-light application goal i have invoke 2 commands same event, possible using mvvm.? xaml this <i:interaction.triggers> <i:eventtrigger eventname="loaded"> <command:eventtocommand command="{binding command1}" passeventargstocommand="false" /> <command:eventtocommand command="{binding command2}" passeventargstocommand="false" /> </i:eventtrigger> </i:interaction.triggers> problem when hooking 2 commands 1 of them invoked while triggering event. q1 how invoke 2 commands in event? i have heard composite commands in prism for example, compositecommand class used in stock trader reference implementation (stock trader ri) in order implement submitallorders command represented submit button in buy/sell view. when user clicks submit button, each submitcommand defined individual buy/sell transactions executed. . q2 the

import - Python extract variables from an imported file -

i've 3 files. 1 defining variables , other 2 contain required modules. variable.py my_var = "" test.py import variable def trial(): variable.my_var = "hello" main.py (not working) from variable import * test import trial if __name__ == "__main__": trial() print my_var and when run main.py , gives nothing. however, if change main.py this, main.py (working) import variable test import trial if __name__ == "__main__": trial() print variable.my_var and gives me expected output i.e. hello . that variable.py , in case, contains more variables , don't want use variable.<variable name> while accessing them. while modifying them, using variable.<variable name> not problem i'm gonna modify once depending on user's input , access them across multiple files multiple times rest of time. now question is, there way extract variables in main.py after modified test.py , use them

html - Anchor tag disable using ng-class and a condition -

i've table displayed has count coulmn & count has <a> tag href page. want show link count > 0 , disable count=0 . i've tried angularjs - ng-disabled not working anchor tag , came know using ng-disabled of no use. using ng-class gonna help, i'm not able specify condition in ng-class . p.s. want cursor:not-allowed written in ng-class itself. can't change css here's html code <tr ng-repeat="service in services"> <td>{{$index+1}}</td> <td>{{service.servicename}}</td> <td><a href="#/info/{{service.id}}">{{service.numberofscenarios}}</a></td> </tr> numberofscenarios displays count . if want show basic information, use ng-show . if want apply classes use ng-class . cursor:not-allowed css, if have on class apply ng-class="{'yourclassname':angular-condition}" you use this: <td> <a ng-href="#/in

where to find bodyfat dataset in R? -

i'm trying tutorial r , data mining: examples , case studies yanchang zhao, april 26, 2013. tried access bodyfat dataset mboost package i'm getting following error: data("bodyfat", package = "mboost") warning message: in data("bodyfat", package = "mboost") : data set ‘bodyfat’ not found the tutorial https://cran.r-project.org/web/packages/mboost/vignettes/mboost_tutorial.pdf suggests here: data("bodyfat", package = "th.data")

javascript - jQuery AJAX return limited results from REST end point -

using jquery ajax trying return limited results call restful end point. without having post server return limited results restful api. i have following code: $.ajax({ datatype: "json", url: '/showroom-event-gallery-api', success: function(data) { console.log(data); } }); is there anyway can add method return 10 objects json retrieved restful api? @ moment end point has on 200 results returned. thanks try this: $.ajax({ datatype: "json", url: '/showroom-event-gallery-api', success: function(data) { console.log(data.slice(0,10)); } });

opencv - OCR: Exponent detection, super/subscripts(C++) -

i have been able recognize characters, such 1 , 2 , 3 , ..., n . i have been having trouble thinking of way detect number exponent of another. for example, after running program this picture should return (5/6)^2 , can't figure way or idea number exponent. any suggestions? using opencv in c++. when detecting characters, have respective bounding boxes. there assumptions made, knowing approximate scale of characters, let's call s - infer size of detected bounding boxes. based on try following: for each detected bounding box (d_bbox), define search range centre of bounding box ± 2 * s in search area, other bounding box centres (o_bbox), other detected characters for each centre found in search region, compute ratio between d_bbox , o_bbox. exponent character size should smaller number => d_bbox/o_bbox > 1. i'd should around 1.5 depends on font etc. play values , see get. some other heuristics might help: d_bbox_centre_x < o_bbox_ce

In Ansible Expect Module, how to ignore warning text showing before responding to prompts? -

thanks reply provided question , learned expect module. in ansible playbook, use execute command , respond prompts. issue command returns stdout warning text before prompting username, email , password. expect task fails, guess because not line of text. my playbook.yml - expect: command: geonode createsuperuser responses: username: 'test' email: 'test@whatever.com' password: 'test' the failure report: task [expect] ****************************************************************** fatal: [node1]: failed! => {"changed": true, "cmd": "geonode createsuperuser", "delta": "0:00:30.129827", "end": "2016-07-28 09:39:57.806523", "failed": true, "rc": null, "start": "2016-07-28 09:39:27.676696", "stdout": "not enabling bingmaps base layer bing_api_key not defined in local_settings.py

c# - How do I call a method from another controller? -

i have couple of reusable methods getchartdata() , getpeopledata(). stored in controller called centraldata.cs i able call 1 of these methods different controller i'm not sure how that. know how call method located in controller? if method in same class simple as: mymethod() { getchartdata(); } so if method in different controller , sucha different class, how call it? you can create object of controller , call function simple class. not think problems approach. after all, controller class. e.g., mycontroller obj = new mycontroller(); obj.myfunction();

rtf - BI Publisher - Display Data Horizontally -

i have following data model: <sale_list> <sale> <year>2010</year> <item>100001</item> <amount>1,199.00</amount> </sale> <sale> <year>2010</year> <item>100002</item> <amount>1,200.00</amount> </sale> <sale> <year>2012</year> <item>100001</item> <amount>1,899.00</amount> </sale> <sale> <year>2012</year> <item>100003</item> <amount>1,649.00</amount> </sale> <sale> <year>2013</year> <item>100004</item> <amount>2,199.00</amount> </sale> <sale> <year>2013</year> <item>100005</item> <amount>3,199.00</amount> </sa

css - Charts rendered using highcharts in angular2 do not take the height of the parent -

i trying render charts using angular2-highcharts. however, chart not inherit height of parent div. how can rectify this? here plunker link : https://plnkr.co/edit/tk0ar3ncdktco3ipvpsf?p=preview any appreciated! @component({ selector: 'my-app', directives: [chart_directives], styles: [` chart { display: block; } .c{ height:200px; } `] template: `<div class="c"><chart [options]="options"></chart></div>` }) class appcomponent { constructor() { this.options = { title : { text : 'simple chart' }, series: [{ data: [29.9, 71.5, 106.4, 129.2], }] }; } options: object; } highcharts not automatically assume height of containing element. have tell how big needs drawn, through css or inline styles. i suggest try of following. 1) set height of chart auto : styles: [` chart { display: block; height: auto; // tell chart fill 100% of heigh

sql - can we keep same password for mysql and for some specific databse? -

we use different password specific database , mysql.for instance, root user password 'root' , have database password 'root', possible use same password? if have same user (same username , password) databases compromised if 1 application compromised since applications able query data databases. reason not using root when connecting applications not have less privileges, not having alter table right, application

exception - Why do I get JSF (primefaces) Unable to create new Collection instance for type java.util.Arrays$ArrayList -

this question has answer here: com.sun.faces.renderkit.html_basic.menurenderer createcollection: unable create new collection instance type java.util.arrays$arraylist 1 answer maybe can me this: i've got datatable , it's populated arraylist<> , when try update datatable after causing changes in i've got exception severe [http-apr-8080-exec-1] com.sun.faces.renderkit.html_basic.menurenderer.createcollection unable create new collection instance type java.util.arrays$arraylist java.lang.instantiationexception: java.util.arrays$arraylist caused by: java.lang.nosuchmethodexception: java.util.arrays$arraylist.() i saw similar questions on sof but, unfortunatly, it's no use me. (my arraylist doesn't instantiated arrays.aslist). app works fine, need remove exception. this part of .xhtml datatable define: <p:datatable id="co

swift - IOS Custom View or Navigation Bar Controller -

i new ios swift development. have navigation bar design includes, increasing height (thus increased text size custom colors), custom uibutton closing (instead of usual button) , title @ left side (instead of center) basically lot of customization do. question is, okay custom uiview act navigation bar or should push through navigationcontroller , customize via code? thank you. first of navigation bar offer push navigation through different view controllers in smarter way, stacking view controllers pushed , offers useful features; example pushing view controller storyboard don't have need set button , can come main controller in simple way. you can set custom image left/right button, set custom fonts , change height without big problems; suggest keep navigation bar , evaluate, should discover in short time if nav bar enough needs.

bitbucket - Git deleted my files. Can they be recovered? -

i created git repository on bitbucket keep track of scripts. have limited experience git. use combination of linux , windows have been adding files repository using git bash shell on windows has drive mapped linux share. i have been adding files on last few days, on 1 of commits entered wrong comment. wanted fix , googled solution. suggestion found use rebase. tried wasn't successful decided live wrong comment. after created 2 more scripts wanted add repository 'git add'. when tried commit these got message "you editing commit while rebasing branch 'master' on '3ac74cb'". after message list of files , line suggestions do. unfortunately has moved out of terminal buffer can't track message were, followed messages. one of messages suggested pull - due fact made changes text file edited in bitbucket. did pull. i have done pull, commit again , push. none of these seem have worked did more googling rid of rebase message. based on answer

javascript - Facebook API: How to group and track down App Insights data using specified criteria? -

in customer's app i'm using fb api track down app insights analytics data. in app have kind of items each 1 represents particular app event. showing total app insights data each event. want break data down data chunks relates corresponding events , want show particular insights data on particular events. so, i'm wondering there way group fb app insights data retrieve analytics data specified event? maybe can collect data filtering posts out specified hashtags or something. ideas?

c# - Find also in inactive gameobject -

this question has answer here: how find inactive objects using gameobject.find(“ ”) in unity3d? 4 answers i using gameobject.find("name"); but search in active gameobject there option avaiable search inactive object also. i want search object name not tag name. it not possible search inactive game objects name using gameobject.find . need find alternative solution. here few simple ways find game object. assuming game object has parent , have reference can use transform.find return parentgameobject.transform.find("name").gameobject; gameobject.findobjectoftype<t>(); this method slow , should never called in update you can find component type on game object use small scaffold component enable find object use serializedfield create editor reference eg [serializedfield] private gameobject myobject if need us

sql - How To add composite unique key to user defined table Type -

how add composite unique key user defined table type : create type [dbo].[jobdata] table( [emp_num] [smallint] null, [job_date] [date] null, [year] [smallint] null, [job_code] [smallint] null, [order_year] [smallint] null, [order_ser] [decimal](5, 0) null, ) go i want emp_num,job_date composite unique key . you can't alter userdefined table types ,you need drop , recreate again changes.. from msdn .. user-defined types cannot modified after created, because changes invalidate data in tables or indexes. modify type, must either drop type , re-create it, or issue alter assembly statement using unchecked data clause. below way create unique constraint on userdefined table type create type test table ( col1 varchar(50) , col2 int , unique (col1,col2) ); note :we can't name constraints,so creating constraints normal way not valid.. example below create type test table ( col1 varchar(50) , col2 int , constr

java - Method Based Authorization at Spring Boot -

i have methods published rest services. want apply basic authorization security on 1 method lest " gpnfeedback ". not want apply authorization on sendgpn how can configure securityconfig.java? have used following configration still having authorzation error when callling http://localhost:7071/gpns/rest/sendgpn controller @controller @requestmapping("/gpns/rest/") public class gpnsrestcontroller { @crossorigin @requestmapping(value = "/sendgpn", method = requestmethod.post, produces = mediatype.application_json_value, consumes = { mediatype.multipart_form_data_value, mediatype.application_json_value }) public @responsebody gpnsresponse sendgpn(@valid @requestpart(value = "data", required = true) sendgpnmessagemsisdnlistreq sendgpnmessagemsisdnlistreq, @valid @modelattribute(value = "photo") multipartfile photo, @valid @modelattribute(value = "video") multipartfile video, @valid @modelattribut

c# - Link Tables with Properties in EF6 Code First -

i have situation code first ef6 need create many-to-many mapping (easy enough) generated relationship table needs contain properties of own. here's simplified example of have: public class journey : entity { public string name { get; set; } public datetime start { get; set; } public virtual icollection<point> points { get; set; } } public class point : entity { public dbgeography geolocation { get; set; } public string name { get; set; } public virtual icollection<journey> journeys { get; set; } } the "entity" class contains primary key. this of course create relationship table foreign keys "point" , "journey" table primary keys. great, if want add properties link table? such datetime property called arrivaldate holds time of arrival @ point. you argue can add property "point" class but want table hold list of physical points used in application, without duplicates (a single point used in

java - Stop Eclipse Console from blocking UI thread -

a test program of mine made eclipse mars-2 hang forever. after testing (which wasn't easy having find line kills eclipse binary search), found out applying system.out.println 350000 character string caused problem. is there way handle accidentally long outputs console more gracefully, i.e. not blocking whole of eclipse forever? system.out.println causes such problems, because it's slow output lot's of data this. that's why loggers used. however, if isn't code, so, yes, there way limit output console: right click empty space inside console view -> preferences... -> in console submenu check "limit console output" , set "console buffer size" value

java.lang.NoClassDefFoundError: Could not initialize class javax.media.jai.JAI -

Image
i started first program geotools in using jai- java advanced imaging 1_1_2_01 jdk 1_7. it worked fine until added geotiff jars . found following error exception in thread "main" java.lang.noclassdeffounderror: not initialize class javax.media.jai.jai @ org.geotools.gce.geotiff.geotiffreader.read(geotiffreader.java:607) @ com.rgb.pixelextractor.extract(pixelextractor.java:55) @ com.rgb.rgbspliter.main(rgbspliter.java:136) the code below public void extract(file f, string name, string date) throws exception { parametervalue<overviewpolicy> policy = abstractgridformat.overview_policy .createvalue(); policy.setvalue(overviewpolicy.ignore); // read 4 tiles worth of data @ once disk... parametervalue<string> gridsize = abstractgridformat.suggested_tile_size.createvalue(); //gridsize.setvalue(512 * 4 + "," + 512); // setting read type: use jai imageread (true) or imagereaders read methods (false) parametervalue&

javascript - Change angularjs code to work for jquery pop-up -

hi don't know angularjs yet have task in that. there dashboard designed in angularjs . now, in there link open pop-up. have given task change link pop-up pop-up in jquery . so, me quite difficult understand how change this. i have xml file label in html defined. label link coming. <subcolumn type="a" ngclick="decisioncomp();" stylename="proccheader labe1padding" text="complete : " uniqueid="data31" /> now, in controller file of same there function defined. // complete link click $scope.decisioncomp = function () { if ($scope.data31 != "") { modalservice.showmodal({ templateurl: "chartpagepopup/complete.html", controller: "complete" }).then(function (modal) { modal.close.then(function (result) { $scope.customresult = "all good!"; }); });

c++ - Chromium-browser build fatal errors in module_list.cc: Check Failed -

Image
i've been trying build chromium on windows 10, getting weird errors on runtime, appear caused pattern: void checkfreelibrary(hmodule module) { bool result = ::freelibrary(module); dcheck(result); } the first errors displayed after few seconds after chromium started. here's says: [5904:9192:0726/025753:fatal:module_list.cc(18)] check failed: result. backtrace: base:debug:stacktrace:stacktrace [0x0000....] (e:\projects\clones\chromium\src\base\debug\stack_trace.cc) ... since couldn't copy paste whole stack, join screenshot of feels like: i successful in building last revision, or @ least, appears successful since no errors showing when compiling toolchain recommended in building instructions . luckily, first errors aren't modal , possible browse little bit afterwards. then, if put application heavy loading (such facebook newsfeed), suddently stop responding in silent way. mouse hovering effects not show anymore , reloading page result in infinite l

Key bindings don't work, Java SE, Swing -

i'm trying add shortcut jbutton. i've read how use key bindings tutorial , have read page how use key bindings instead of key listeners , loooooooooooooot of other questions key bindings, haven't found answer me what i've tried: public class example extends jframe { public static void main(string args[]) { example example = new example(); } example(){ action action = new action() { @override public object getvalue(string key) { return null; } @override public void putvalue(string key, object value) { } @override public void setenabled(boolean b) { } @override public boolean isenabled() { return false; } @override public void addpropertychangelistener(propertychangelistener listener) { } @override

kentico youtube webpart used within slick.js -

i have repeater out puts panels slide show plugin, slick.js. far, things working planned. the user, when creating custom page, enters in copy, either , image, video media library, or link tube. what i'm trying write js function fire when user clicks play on youtube video. the webpart injects youtube video via iframe method. here's transformation: <section class="slide"> <div class="copy"> <%# eval("slidecontent") %> </div> <asp:placeholder runat='server' id='slideimage' visible='<%# ifempty( eval("slideimage"), false, true ) %>'> <div class="img"> <img class="img-responsive" src="<%# eval(" slideimage ") %>" alt="<%# eval(" slidecontent ") %>"> </div> </asp:placeholder> <asp:placeholder runat='se

c# - Select all keys except some key -

i know 1 key dictionary , want select other key present. i don't want remove keyvalue pair know want select rest. for example, have: key:health value: 123 key:vision value: 345 key:dental value:567 and know health there. want select other keyvalue pairs except key:health could 1 suggest c# code implement ? var allkeyvaluesbuthealth = dict.where(kv => kv.key != "health"); since deferred executed linq query it's idea materialize tolist , toarray or todictionary if want use multiple times.

vba - Displaying account operations by dates -

i need verify operations done in account @ particular period of time asking user enter account number , date range, each time run have error "type mismatch" here code: private sub cmdsearch_click() call search end sub sub search() dim strcriteria, strcount, task string me.refresh if isnull(me.compte_hist) or isnull(me.date_deb) or isnull(me.date_fin) msgbox "s'il vous plaît assurez-vous que tous les champs sont remplis", vbinformation, "date range required" me.compte_hist.setfocus else strcriteria = "([date_operation]>= #" & me.date_deb & "# , [date_operation] <= #" & me.date_fin & "#)" strcount = "[compte]=#" & me.compte_hist & "#" task = "select * operations operations (" & strcriteria & ")" , " (" & strcount & ") order [date_operation]"

One way sync SQL Server Data based on value of specific column -

i need sync/push data 1 sql server (owned our crm) our own sql server (on aws rds) reporting , analysis. there 3 tables , believe there column owner/id determines if data in row belongs us. (they have data multiple different companies in same tables) i can use ssis import initial data set when manually dump our data there way setup limited remote connection(only allows access rows owner) can automatically pull in new data our reporting server each night?

Find and replace in elasticsearch all documents -

i wanted replace single username in elasticsearch index documents. there api query ? i tried searching multiple couldn't find. 1 has idea? my scenario: curl -xpost 'http://localhost:9200/test/movies/' -d '{"user":"mad", "role":"tester"}' curl -xpost 'http://localhost:9200/test/movies/' -d '{"user":"bob", "role":"engineer"}' curl -xpost 'http://localhost:9200/test/movies/' -d '{"user":"cat", "role":"engineer"}' curl -xpost 'http://localhost:9200/test/movies/' -d '{"user":"bob", "role":"doctor"}' i have above data in index called "test" , type "movies". here wanted replace "bob" name "alice". thanks update-by-query way go. post /test/movies/_update_by_query { "script": {

c# - Style background of Cell in EditMode in RadGridView -

i want style cell in radgridview whenever cell turns edit mode backgroundcolor e.g. yellow. <telerik:radgridview x:name="name" selectionunit="cell"> <telerik:radgridview.resources> <style targettype="telerik:gridviewcell"> <style.triggers> <trigger property="isineditmode" value="true"> <setter property="background" value="yellow"/> </trigger> </style.triggers> </style> </telerik:radgridview.resources> </telerik:radgridview> this doesn't anything. as mentioned in comments, gridviewcell , when editable, displays textbox consumes entire space gridviewcell has available; setting background of gridviewcell nothing, because can't see background of gridviewcell . solution change background of control displayed while g

php - Can't install composer on my shared hosting using ssh -

Image
trying different methods install composer on shared host using putty. every time getting error. timed out error: i googled , tried lot of solutions, nothing worked. how can find exact problem , solution? run each or these commands in order: php -r "copy(' https://getcomposer.org/installer ', 'composer-setup.php');" php -r "if (hash_file('sha384', 'composer-setup.php') === 'e115a8dc7871f15d853148a7fbac7da27d6c0030b848d9b3dc09e2a0388afed865e6a3d6b3c0fad45c48e2b5fc1196ae') { echo 'installer verified'; } else { echo 'installer corrupt'; unlink('composer-setup.php'); } echo php_eol;" php composer-setup.php --install-dir=bin --filename=composer rm composer-setup.php

xml - Change size of Custom Excel Ribbon dropdown -

Image
i have dropdown in ribbon containing visible sheets in workbook. users can select sheet in there jump it. it's important because there ton of sheets in workbook. unfortunately when name of sheet long, doesn't show completely. i'd make wider. i used customui editor microsoft office create using not-very-fluent xml skills. here part of code: <customui xmlns="http://schemas.microsoft.com/office/2006/01/customui" onload="inits3ribbon"> <ribbon> <tabs> <tab id="s3tab" label="s3 menu"> <group id="grgeneral" label="general"> <dropdown id="navigation" label="navigation" getitemcount="getnavigateitemcount" getitemlabel="getnavigatelabel" onaction="menunavigate" getselecteditemindex="setnavigateindex" showlabel="true" /> <butto

c# - Swap two object when they are on two different list -

Image
in example got 8 objects. assume first element of bluelist refered element1 , first element of redlist1 refered element1 now want swap object1 object3, when make this: pseudo code: object temp = bluelist1[0]; bluelist1[0] = bluelist[1]; bluelist1[1] = temp; the result is: because switched list refferences. how safety swap 2 addresses of object, in picture below? can see element1 switched element3. it easly done in c++. posible in c#? i think need make wrapper class. class element<t> { public t object { get; set; } public void swapwith(element<t> other) { // warning: not thread-safe t tmp = other.object; other.object = this.object; this.object = tmp; } } then can make change like bluelist1[0].swapwith(bluelist[1]);

java - Input in array Thymeleaf -

i need choose values 1 array , assign other array. using spring thymeleaf. no idea how retrieve these choosed values. classes: @entity public class collaborator { @id @generatedvalue(strategy = generationtype.identity) private long id; @notnull @size (min=3, max=32) private string name; @notnull @manytoone (cascade = cascadetype.all) private role role; public collaborator() {}... @entity public class role { @id @generatedvalue(strategy = generationtype.identity) private long id; @notnull @size(min = 3, max = 99) private string name; public role() {}.... my controllers: @requestmapping("/project_collaborators/{projectid}") public string projectcollaborators(@pathvariable long projectid, model model) { project project = mprojectservice.findbyid(projectid); list<collaborator> allcollaborators = mcollaboratorservice.findall(); list<collaborator> assignments = new arraylist<>();

asp.net - No value given for one or more required parameters. vb -

well, i've rooted around asked questions, changed code 3 or 4 times , still unable form i'm working on insert data table. looking helpful suggestions. form code: <div> <table align="center" width="200px" cellpadding="5px"> <tr><td width="50px">season:</td><td width="150px"> <asp:dropdownlist name="season" id="ddlseason" runat="server" autopostback="true" datasourceid="sqldatasource1" datatextfield="season" datavaluefield="season"> </asp:dropdownlist> <asp:sqldatasource id="sqldatasource1" runat="server" connectionstring="<%$ connectionstrings:seasonconnectionstring %>" providername="<%$ connectionstrings:seasonconnectionstring.providername %>" selectcommand="select * [t_season] order [season]"