Posts

Showing posts from September, 2014

Problems with defining paths for multiple bundles via webpack-dev-server -

i'm trying create multiple (but similiar) react apps 1 webpack config. let's directory structure: ├── src │ ├── app01 │ │ └── app01.js │ ├── app02 │ │ └── app02.js │ └── shared-components │ ├── logo │ │ ├── logo.js │ ├── nav │ │ ├── nav.js ├── dist │ ├── app01 │ │ ├── app01.html │ ├── app02 │ │ └── app02.html in webpack.config.js have this: var config = { //cut brevity }, devserver: { contentbase: './dist/', colors: true, inline: true } } var app1 = object.assign({}, config, { name: 'app1', entry: './src/app1/app1', output: { path: './dist/app1', publicpath: '/app1/', filename: 'bundle1.js' } }) var app2 = object.assign({}, config, { name: 'app2', entry: './src/app2/app2', output: { path: './dist/app2', publicpath: '/app2/', filename: 'bundle2.js' } }) if (process.env.n...

vba - Display number of hours -

this question exact duplicate of: vba substract or sum of hours i've been trying find way show on listbox number of hours between time , time b, if thats hundred of hours. note: tiempoa taken "now" too, before time b. dim tiempoa date dim tiempob date dim tiempoc date tiempoa = .offset(, -18).value tiempob = tiempoc = format(tiempoa - tiempob, "hh:mm") data(i, 5) = tiempoc this whats displayed, showld around 80 hours. i've figured out. tiempoa = .offset(, -18).value tiempob = tiempoc = datediff("h", tiempoa, tiempob) data(i, 5) = tiempoc

c# - Getting error in LINQ Expression or converting service to client simple mapping -

getting error "system.linq.enumerable+whereselectenumerableiterator`2[person.models.iprofession,system.string]" code below: trying have collection of result. service returns me collection think , need iterate through , store list have collection. please me public class professionresult { public string name { get; set; } public string id{ get; set; } } public list<professionresult> professionresults { { var professionresults = new list<professionresult>(); professionresults.add(new professionresult() { name = people?.where(p => p.isselected) .select(c => c.professionresults.select(n => n.name)) .tostring() ?? null, id = people?.where(p => p.isselected) .select(c => c.professionresults.select(i => i.id)) .tostring() ?? null }); return professionresults; } } a basic google search on...

integration testing - How to run tests in random order with robotframework maven plugin? -

i trying run robotframework testcases eclipse robotframework-maven plugin. can tell me configuration of pom.xml run testcases according given order instead of alphabetical order? example, have following tags in corresponding test suites: testsuit1---> testcase1.robot -- >mytestcase1 [tags] testcase2.robot --- >mytestcase2 [tags] b testcase3.robot -- - > mytestcase3 [tags] c i want executes above test cases random order. if write in pom.xml <includes_cli>b,a,c</includes_cli> it executes tests according alphabetical order instead of given order. can have solution that? br, dew you can use --randomize option execute test cases in random order below: case 1: robot --randomize tests <testcase1.robot> tests: test cases inside each test suite executed in random order case 2: robot --randomize suites <path/to/testsuite> suites: test suites executed in random order, test c...

themes - Problems theming Drupal 8 + SwiftMailer contact email -

i'm trying use swiftmailer theme contact email in drupal 8 site, having difficulties.i'm trying use default theme file swiftmailer renders body. how can access each field individually? what want this: {# /** * @file * default template file e-mails. * * available variables: * - subject: subject. * - body: message content. * - message: $message array created , used in mail building * procedure. content varies between cases, typically contains @ * least following elements: * - id: message identifier. * - module: module handles building of message. * - key: key of message. * - to: recipient email address. * - from: email address of sender. * - langcode: langcode use compose e-mail. * - params: message parameters. * * template may overriden module and/or mail key, using of * following template names: * - swiftmailer.html.twig: global, used default. * - swiftmailer--mymodule.html.twig: emails sent module "mymodule". * - swiftm...

java - JTextFields and DocumentListeners -

i want 2 textfields (from , b) sharing same content user inputs on of them. can make 1 mirror other (b mirrors a) or opposite (a mirrors b). when keep both documentlisteners execution starts throw exceptions. according oracle's docs can't use documentlistener mutate content of document within listener itself. find weird since did in first case (b mirrors a) or opposite case. anyway code still "works" exception thrown every 2 events triggered. keylisteners not reliable particular case , refuse use buttons because real-time documentlistener gives. any suggestions? here's code: import java.awt.gridbagconstraints; import java.awt.gridbaglayout; import javax.swing.jframe; import javax.swing.jlabel; import javax.swing.jpanel; import javax.swing.jtextfield; import javax.swing.event.documentevent; import javax.swing.event.documentlistener; public class mirror { private jtextfield oritext; private jtextfield mirrortext; private static int debugco...

java - Is Exception Enrichment a viable pattern? -

i came across article jakob jenkov enrichable exceptions. idea! i've been java developer 4 years, , still annoyed trying figure out sqlexcepions, ioexceptions, , random exceptions thrown third-party libraries. end putting thought when appropriate tho rethrow exception, or wrap 1 custom exception, if write custom exception, put it? in same package class i'm writing, or in central "exceptions" package? i've toyed declaring custom exceptions inner classes since seem pretty one-off. anyways, jenkov's idea outlined here: http://tutorials.jenkov.com/java-exception-handling/exception-enrichment.html using single enrichable exception outlines seems attractive me seems pretty handily side-step of frustrations. don't think i've ever seen used in of libraries i've used. there reason that? there major flaw approach i'm missing? simple summary: public class appexception extends exception{ public appexception(string errcode, string context...

webpack - How to append custom code to the generated service worker file -

i'm using webpack , swprecache. swprecache generates service-worker.js file me , want append custom code generated file. i created webpack plugin appends babel transformed code service-worker.js file, so: swprecache.write(filepath, options, (function(err) { // if want append additional file. if (options.appendfile) { var sync = fs.readfile(options.appendfile, (error, code) => { if (error) { throw error; } let transformed = babel.transform(code, options.babelconfig || {}); fs.appendfile(filepath, transformed.code); }); } callback(err); })); this not include code make require()  work in file i'm appending. believe need use webpack generate service-worker.js file i'm unsure how that, possibly via custom entry point? to include custom script generated serviceworker, recommended way use importscripts option in sw-precache config.you can find more details here .

c# - How do I customise the tooltip on the thumbs of the WPF extended-toolkit RangeSlider? -

the rangeslider widget in wpf extended-toolkit rangeslider uses doubles values of each of 2 thumbs on slider. i using slider specify lower datetime , upper datetime. have bind property represents datetime doubles (essentialy datetime.ticks cast double). when hovering on thumbs of rangeslider, tooltip shown double value, want instead show human-readable date. can conversion enough, but: how rangeslider show custom text in thumb tooltips? a less appealing (but sufficient) alternative disable thumb tooltips entirely. solution alternative proving elusive. for it's worth, i've tried inspecting code rangeslider.cs using jetbrains decompiler, hasn't yielded promising leads untrained eye. the tooltip see autotooltip of slider used in rangeslider's template. slider exposes autotooltipplacement , autotooltipprecision, not expose property change text displayed in tooltip. however, found article demonstrates workaround allow achieve looking for: https:/...

Combining elements in a Scala list -

how combine elements in list, e.g. list(('h', 1), ('i', 1), ('h', 1), ('i', 1), ('l', 2)) such following result: list(('h', 2), ('i', 2), ('l', 2)) basically, want sum numbers associated each letter, , letter should appear in list once. val mylist = list(('h', 1), ('i', 3), ('h', 5), ('i', 7), ('l', 2)) mylist.groupby(_._1).mapvalues(_.foldleft(0)(_ + _._2)).tolist res0: list[(char, int)] = list((h,6), (i,10), (l,2))

android - Capture bluetooth upon paired state -

i have listview which display list of paired bluetooth devices. wanna capture state inorder update paired listview whenever new request pair device gets accepted. so far have tried listening bluetoothdevice.action_acl_connected no avail. protected void oncreate(bundle savedinstancestate) { ... intentfilter filter1 = new intentfilter(bluetoothdevice.action_acl_connected); this.registerreceiver(mreceiver, filter1); } //the broadcastreceiver listens bluetooth broadcasts private final broadcastreceiver mreceiver = new broadcastreceiver() { @override public void onreceive(context context, intent intent) { string action = intent.getaction(); bluetoothdevice device = intent.getparcelableextra(bluetoothdevice.extra_device); if (bluetoothdevice.action_acl_connected.equals(action)) { getpaireddevices(); // paired devices , update listview } } first, scan pair ,...

java - black activity giving error android studio -

just downloaded android studio 2.1.3 .every time gives error: cannot resolve symbol appcompatactivity,oncreate.further shows message "error:a problem occurred configuring project ':app'. could not download junit.jar (junit:junit:4.12) not resource ' https://jcenter.bintray.com/junit/junit/4.12/junit-4.12.jar '. java.lang.nullpointerexception (no error message)" apply plugin: 'com.android.application' android { compilesdkversion 24 buildtoolsversion "24.0.2" defaultconfig { applicationid "com.example.prateek.myapplication" minsdkversion 23 targetsdkversion 24 versioncode 1 versionname "1.0" } buildtypes { release { minifyenabled false proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile filetree(dir: 'libs',...

Changing background color of the layout on a button click in Android -

i newbie in android. please spare me if asking stupid question. my application contains 1 button in linear layout. requirement is, have change background color of linear layout of app on button click. default white , when press on button should change random color , when press button again, should change default color (white) again. button.setbackgroundcolor(color.blue) (on onclick() method), changes background color blue , how default color? i hope code you! take boolean variable when button clicked. public class mainactivity extends activity { boolean iscolor = true; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); button btn = (button) findviewbyid(r.id.btn); final linearlayout layout = (linearlayout) findviewbyid(r.id.linearlayout1); btn.setonclicklistener(new onclicklistener() { @override public void onclick(view view) { if(...

html - why !important doesn't work in css? -

i want zoom in font-size 200% in web, here test code in fiddle , if px issue, why here code working if add style in "<-h2>" ? <div > <h2 class="test" style="font-size:300% !important"> hello </h2> <h2 class="test2"> hello </h2> <h2 class="test3"> hello </h2> or, there question how can enlarge font-size on same rate? use em , rem. you can use http://pxtoem.com/ html <div style="font-size:2rem !important" > <h2 class="test"> hello </h2> <h2 class="test2"> hello </h2> <h2 class="test3"> hello </h2> </div> css .test{ font-size:1em; } .test2{ font-size:2em; } .test3{ font-size:3em; } working fiddle: https://jsfiddle.net/eom40w0l/8/

Why does this C pointer's deferenced value become its memory address -

wondering why when function below runs, *p , p printed out having same value. understanding when *p++ runs, causes address of p increment one, why cause *p become memory address. i tried running code without *(just p++) , output still same, significance of * in demo code lecture. the output i'm getting is: 1606416248 1606416248 int main() { int *p; int = 4; p = &a; *p++; printf("%d %u\n", *p, p); } first of all, %u improper format specifier printing address. should use %p printing address, , cast argument (void *) . alone sufficient invoke undefined behavior . then coming to but why cause *p become memory address. undefined behavior . when *p++; , you're running out of bound, p points single variable, not array. so, next dereference of pointer *p , invalid memory access, causing ub. output, thereafter cannot justified in way.

how to transmit ibeacon and scan ibeacon at the same time using altbeacon library? -

i want enable mobile phone transmit ibeacon , scan ibeancon @ same time using altbeacon api. suitable value advertisemode, foregroundbetweenscanperiod , foregroundscanperiod. besides these 3 parameters, there other issue need take account? in advance! the default values these parameters work fine (foreground scan period of 1100ms, between scan period of 0, , advertisemode low_latency.) it important note android device transmits not able scab own transmissions. must have second device this.

linux - Failed to start php5-fpm.service: Unit php5-fpm.service is masked Laravel Forge -

what i'm trying update update web directory using server management tool called forge update web directory (often used deploy laravel platforms nginx, php 7.0, mysql, postgres, redis, & more.). reason error. failed start php5-fpm.service: unit php5-fpm.service masked. anyone know how fix it?

c# - Entity Framework 0:1 relationship isn't being mapped -

i have model of job i'm trying add optional job survey to: public class job { [key] public int jobid { get; set; } // leaving out other fields... public virtual jobsurvey jobsurvey { get; set; } } the job survey model looks this: public class jobsurvey { [key] public int jobsurveyid { get; set; } public string customeremail { get; set; } [index] [column(typename = "date")] public datetime? sentdate { get; set; } [column(typename = "date")] public datetime? returneddate { get; set; } public int? ratingvalue { get; set; } public virtual job job { get; set; } } in context i've added following: modelbuilder.entity<job>() .hasoptional(s => s.jobsurvey) .withrequired(j => j.job); when ran add-migration, script created following: createtable( "dbo.jobsurveys", c => new { jobsurveyid = c.int(nullable: false),...

javascript - Don't hide the tooltip when cursor is inside it in Highcharts chart -

i'm trying make tooltip stay visible when hovering inside it, move towards new series point show tooltip point instead. i can't seem find way this, if create custom tooltip using new highcharts.tooltip() (which haven't done in example). there easy way achieve this? here's current tooltip: highcharts.config.tooltip = { enabled: true, usehtml: true, hidedelay: 0, formatter: function (e) { ... lots of html ... return html; } };

html - jquery loader not appearing second time -

i calling loader till response comes server side.the problem after first run of uploading file, when uploading second time loader not coming . new jquery please me out. code snippet <form id="myform" action="upload.php" method="post" enctype="multipart/form-data"> <input id="doc" class="file" type="file" name="xls" data-min-file-count="1"> <br> <button type="submit" class="btn btn-primary">submit</button> <button type="reset" id="asd" class="btn btn-default">reset</button> </form> <hr> <div class="panel panel-default"> <div class="panel-heading">the suggestions appear here</div> <div class="panel-body" id="output1"> <img id="loader" src="30.gif" /> </div> </div> <sc...

javascript - Any alternative to window.history.back() as it repeats the visited page every time I go back -

in angularjs, have 3 pages, page1.html, page2.html, page3.html , have function goback() is $scope.goback = function() { $window.history.back(); } when visit page1, page2, page3 , again page1,2,3 , again page1,2,3 , @ last if go everyage repeats. means page3 page 2 page 1 , again page3, 2, 1 , again page3, 2, 1. i don't want repeat these pages, if press on goback(), should go page3, 2, 1 , home. any appreciated. see if using $window.history.back(); go through history. if dont want go use data-ui-sref="" , return on desire page. , if want go on basis of condition add conditions if page 1 go state of page1 , on.

java - Only one onClick listener responds on intial startup android studio -

i'm new android studio. have 3 buttons , i'm working in mapsactivity. first button responds, second, chronologically. i've stored markers in these buttons want them respond independently when click on of them here .java file import android.support.v4.app.fragmentactivity; import android.os.bundle; import android.view.view; import android.widget.button; import com.google.android.gms.maps.cameraupdatefactory; import com.google.android.gms.maps.googlemap; import com.google.android.gms.maps.onmapreadycallback; import com.google.android.gms.maps.supportmapfragment; import com.google.android.gms.maps.model.bitmapdescriptorfactory; import com.google.android.gms.maps.model.latlng; import com.google.android.gms.maps.model.markeroptions; public class mapsactivity extends fragmentactivity implements onmapreadycallback { private googlemap mmap; final button button1 = (button) findviewbyid(r.id.buttonmaps); final button button2 = (button)findviewbyid(r.id.buttonm...

c# - An assignment generates a System.NullReferenceException -

iobjectvmfactory objectvmfactory = this.container.resolve<iobjectvmfactory>(); this throws nullreferenceexception. if not assign result of this.container.resolve variable, not throw: this.container.resolve<iobjectvmfactory>().anymethod(...) this has no sense me ... can give me explanation? extra information: this.container not null sure. triple checked. , if null second line fail. the class implementing iobjectvmfactory has no defined constructor exception not happening inside iobjectvmfactory implementation. the exception has no inner exceptions , points directly first line. executing line directly on inmediate window generates ('' null) message. thanks! my project's configuration in release, not debug. in release mode, throws exception @ assignment. in debug, throws on step after assignment: foo member { get; } public bar(foo foo) { // crashes here on release member = foo; // crashes here in debug (foo.colle...

regex - Notepad++ function list PHP not working if the function name begins with reserverd words -

Image
the function list plugin notepad++ working fine, except function name starts "for / while / if". for example have functions in form-class. start "form" (e.g. form_information). function name won't show in function list, because functionname starts 'for'. has same issue, or maybe solution in regex this? this regex , xml of php function list. <parser id="php_function" displayname="php" commentexpr="((/\*.*?\*)/|(//.*?$))"> <classrange mainexpr="^[\s]*(class|abstract[\s]+class|final[\s]+class)[\t ]+[a-za-z_\x7f-\xff][a-za-z0-9_\x7f-\xff]*([\s]*|[\s]*(extends|implements|(extends[\s]+(\\|[a-za-z_\x7f-\xff][a-za-z0-9_\x7f-\xff]*)+[\s]+implements))[\s]+(\,[\s]*|(\\|[a-za-z_\x7f-\xff][a-za-z0-9_\x7f-\xff]*))+[\s]*)?\{" opensymbole = "\{" closesymbole = "\}" displaymode="node"> <classname> <nameexpr expr="(class|abstract[\s]+cla...

java - How to call Json Post request with queryparam on client side? -

i wrote both service , client part of application. tested service " postman " application , working fine url = http://192.168.2.50:8084/facebusinessservice/webresources/service/login?phone=123456789&password=1234 however when try call on android application not working. while debuging on service side see phone , password parameters null. here service side : @path("login") @post @produces("application/json") public string postjson(@queryparam("phone")string phone, @queryparam("password") string password) { string info = null; try { userinfo userinfo = null; usermodel usermodel = new usermodel(); userinfo = usermodel.ispersonregistered(phone, password); gson gson = new gson(); system.out.println(gson.tojson(userinfo)); info = gson.tojson(userinfo); } catch (exception e) { ...

yaml - Saving/updating ansible.log in SVN after every execution -

i have find solution, save/update ansible log file in svn after completion of script execution. it should like, yml script completes execution, whether fails or passes, file ansible.log (which saves log locally) should saved svn automatically. it should saved if on defined svn path no log file present, if log file present, should delete old log , replace new log file. i tried googling it, couldn't find solution. links/pointer/way solve problem, in direction appreciated. thank you i use delegation run svn commands locally: - name: commit logs command: /usr/local/bin/commit_ansible_logs.sh delegate_to: 127.0.0.1 this trigger commit_ansible_logs.sh bash script need write commit log. see delegation in manual. you can "detatch" command ansible if want put delay or loop watches ansible run finish. the second half of article explains how "fire , and forget" task in ansible play. fire , forget using async article

javascript - angularjs checkboxes show / hide box -

i have issues manage checkboxes , "boxes" containers. idea have list of checkboxes pre-checked. each checkboxes controls "box" container, , when check / uncheck checkbox, shows / hides containers. here codes <div class="col-lg-2"> <div class="btn-group" uib-dropdown> <button type="button" class="btn btn-primary" uib-dropdown-toggle>preferences <span class="caret"></span> </button> <ul role="menu" uib-dropdown-menu=""> <li ng-repeat="product in main.products"> <input class="mycheck" type="checkbox" id="'{{product.id}}'" checked="'{{product.ischeck}}'"> {{product.name}}</li> </ul> </div> </div> and here code container boxes <div class="col-sm-3 connectpanels...

jquery - DataTable not loading - Uncaught TypeError: Cannot read property 'length' of undefined -

trying load the datatable ajax request, var url = '/my/url'; var table = $('#m_datatable').datatable( { 'ajax': { type: 'get', 'url': url, 'data': function (d) { return json.stringify( d ); } } } ); html: <table id="m_datatable" class="display" width="100%"> <thead> <tr> <th>id</th> <th>value1</th> <th>value2</th> </tr> </thead> </table> ajax request returns following json: [ { id: 1801, value1: 1224589451, value2: 1665229451 }, { id: 1802, value1: 1224589451, value2: 1665229451 }, { . . . } ] datatable showing empty , throwing following error in console: uncaught typeerror: cannot read property 'length' of...

azure - Migrating from Virtual Machine Endpoints to Network Security Groups NSG -

i'm in process of migrating existing azure classic vm newer resource manager based vm , appreciated advice. the new architecture have load balancer bound public ip 1 virtual network 1 network security group 1 subnet 1 nic 1 vm what best way migrate old endpoints , associated acl's new structure? add endpoints , acls individual inbound security rules new network security group? thanks. is add endpoints , acls individual inbound security rules new network security group? in brief, yes. the "endpoint acls" not supported migration. may remove before migration add network security group later. here article unsupported features , configurations during migration. also, here references might helpful.

javascript - How to remove additional image from the end with ng-repeat-start and ng-repeat-end? -

Image
i displaying data ng repeat , seperating each data 1 image.now have different sections(i.e td) data rendering , image displaying . now problem image displaying @ last dont want. current behaviour: code: <table border="0" cellpadding="0" cellspacing="0" align="left"> <tr> <td align="center" ng-repeat-start="item in data"> <div>{{ item.name }}</div> </td> <td align="center" valign="middle" ng-repeat-end> <img src="~/images/lineseperator.png"> </td> </tr> </table> how this?? you use $last : ng-if="!$last"

c++ - Basic Value Swap function -

i'm trying design piece of code works this. user enters 3 digit number, let's chose 653, input numbers in integer wish swap around. example: enter number , values wish swap: "653 2 3" this returns following value: 635 new number. i trying in function called digit_swap. im not sure how approach i'm new coding , newer coding. think have seperate integer units, tens , hundred components , did following: third = (number % 10); second = ((number % 100)/10); first = ((number % 1000)/100); the thing is, use bunch of if statements determine swapping of numbers or loop. have no idea how go this. code have following. #include <iostream> using std::cin; using std::cout; using std::endl; int digit_swap(int number, int inputone, int inputtwo) { int first, second, third; if (number < 100) { cout << "please enter 3 digit integer\n"; exit(0); } else if (number >= 1000) { cout << "ple...

scala - How to query data stored in Hive table using SparkSession of Spark2? -

i trying query data stored in hive table spark2. environment: 1.cloudera-quickstart-vm-5.7.0-0-vmware 2. eclipse scala2.11.8 plugin 3. spark2 , maven under i did not change spark default configuration. need configure in spark or hive? code import org.apache.spark._ import org.apache.spark.sql.sparksession object hivetest { def main (args: array[string]){ val sparksession = sparksession.builder. master("local") .appname("hivesql") .enablehivesupport() .getorcreate() val data= sparksession2.sql("select * test.mark") } } getting error 16/08/29 00:18:10 info sparksqlparser: parsing command: select * test.mark exception in thread "main" java.lang.exceptionininitializererror @ org.apache.spark.sql.hive.hivesharedstate.metadatahive$lzycompute(hivesharedstate.scala:48) @ org.apache.spark.sql.hive.hivesharedstate.metadatahive(hivesharedstate.scala:47) @ org.apache.spark.sql.hive.hivesharedstate....

postgresql - Insert forms from a query in postgis -

i try insert polygon in table geofield query. table geofield defined this: create table geofield(id serial primary key, field geometry); insert geofield(field) values (myfield) select 'polygon(('||cast((select lat coordinates id=1)as varchar)||' '|| cast((select lon coordinates id=1)as varchar)||','|| cast((select lat coordinates id=2)as varchar)||' '|| cast((select lon coordinates id=2)as varchar)||','|| cast((select lat coordinates id=3)as varchar)||' '|| cast((select lon coordinates id=3)as varchar)||','|| cast((select lat coordinates id=4)as varchar)||' '|| cast((select lon coordinates id=4)as varchar)||','|| cast((select lat coordinates id=1)as varchar)||' '|| cast((select lon coordinates id=1)as varchar)||'))') myfield; the select alone returns me: polygon((46.744628268759314 6.569952920654968,46.74441692818192 6.5704871073...

sql server - call connectionstring in sqldatasource -

how can call connection string in sqldatasource class instead of writing directly ? <asp:sqldatasource id="sqldatasource" runat="server" connectionstring="..." selectcommand="sp" selectcommandtype="storedprocedure"> </asp:sqldatasource> public class cxxx { public string connectionstring() { return "data source=.\sqlexpress;initial catalog=db;integrated security=true;multipleactiveresultsets=true;pooling=false;"; } } declare object protected cxxx _myobject; then, in page_load: protected void page_load(object sender, eventargs e) { _myobject = new cxxx(); } then, in default.aspx, can do: <asp:sqldatasource id="sqldatasource" runat="server" connectionstring="<%= cxxx .connectionstring() %>" selectcommand="sp" selectcommandtype="storedprocedure"> </asp:sqldatasource> ...

user interface - Jquery UI Datepicker: Highlight first -

i want add class first 3 selectable days if var express true. the following code works if select date classes being removed $datepicker.datepicker({ daynamesmin: ["s", "m", "d", "m", "d", "f", "s"], beforeshowday:$.datepicker.noweekends, firstday: 1, mindate: d, dateformat: "dd.mm.yy", onselect: function (datetext, inst) { $('.delivery-date').text(datetext); var printreleasedateparts =datetext.split('.'); var printreleasedate = new date(printreleasedateparts[2],printreleasedateparts[1]-1,printreleasedateparts[0]); printreleasedate.setdate(printreleasedate.getdate() - printrelease); $('.print-release-date').text($.datepicker.formatdate('dd.mm.yy', printreleasedate)); $datepicker.removeclass('express'); if (express) { ...

Architecture Resources in Azure Resource Manager -

we developing applications in .net , deploying them azure app services. have multi-tier environment (qa/stg/prod). in order replicate same environments using slots. however, issue slots developers has access qa slot able view/modify stg / prod slot settings. want segregate authorization where-in users should able publish apps on qa. should still use slots or go separate web apps? as suggested in 1 of comments can use rbac (role based access control) control user permissions on web app/slots. azure rbac has 3 basic roles apply resource types: owner has full access resources including right delegate access others. contributor can create , manage types of azure resources can’t grant access others. reader can view existing azure resources. so, add developers reader webapp , contributor 1 of slots. prevent web app changes further, can customize rbac suit requirements. can create role custom refer article: https://azure.microsoft.com/en-us/documentation/artic...

javascript - How to make selection highlight transparent in fabricjs IText? -

i'm using jscolor-colorpicker fabricjs-itext in way gives me live preview of color on mouse-move. thing not cool semitransparent selection highlighting messing colorpreview in text-edit mode. ideas on how remove selection highlighting or make selection totally transparent? i can't find properties in jsdoc relating selection color!? http://fabricjs.com/docs/fabric.itext.html <input value="ffcc00" id="fill" class="jscolor {onfinechange:'itext_setcolor(this)',hash:true}"> window.itext_setcolor = function(val) { obj = canvas.getactiveobject(); if (obj) { if (obj.isediting) { setstyle(obj, 'fill', '#' +val); } else { obj.setfill('#' + val); } canvas.renderall(); } }; edit 1 thank's @sthayden giving me right answer. here's final working code reappearance of highlighting when ...

c# - Can I set text-wrapping mode for a long-text mesage to transfer the text to the next line in Prism 6.2. modal dialog? -

Image
sometimes text of notification message modal dialog long can see on figure below. this not custom modal dialog simple notification modal dialog has long text mesage. exception error-message produced modbus protocol library use in application. sql server exceptions can have such long text messages errors. default, prism 6.2 modal notification dialod displays none-wrapped text. result of it, modal dialog long , not of text of error-message placed , displayed in dialog. below xaml markup modal dialog: <prism:interactionrequesttrigger sourceobject="{binding notificationrequest, mode=oneway}"> <prism:popupwindowaction ismodal="true" centeroverassociatedobject="true"/> </prism:interactionrequesttrigger> and below view model c#-code dialog: public interactionrequest<inotification> notificationrequest { get; private set; } public string notificationstatus { { return this._notificationstatus; } set { setproperty(ref th...

c# - How to set web config - machine config settings? -

how set web config - machine config settings: <processmodel autoconfig="false" maxworkerthreads="100" maxiothreads="100" minworkerthreads="20" miniothreads="20" /> <servicethrottling maxconcurrentcalls="384" maxconcurrentinstances="2784" maxconcurrentsessions="2400" /> what meaning of these settings? maxworkerthreads = ? maxiothreads = ? minworkerthreads = ? miniothreads = ? maxconcurrentcalls = ? maxconcurrentinstances = ? maxconcurrentsessions = ?

javascript - Clear Form dropdowns and ckeditor control in asp.net -

i have asp.net web page containing 5 6 dropdownlist , few texboxes along ckeditor .net control in it. i have reset button , trying clear dropdownlist, textbox , ckeditor text on clicking it. below javascript clear form data function resetform(){ this.form.reset(); //document.getelementbyid("frmnew").reset(); } this code clear ckeditor text function resetckeditor() { var myinstances = []; (var in ckeditor.instances) { ckeditor.instances[i].name; alert(ckeditor.instances[i].name); ckeditor.instances[i].updateelement(); ckeditor.instances[i].setdata(''); } } i tried merge 2 codes in single function 1 working. either resetting form or clearing ckeditor. not able things reset default. is there way this? highly appreciated.

android - Activity enter and exit Animation or Transition? -

the title might appeal general question issue more specific. as luck have it, working on project supports lollipop , next. there bunch of api related material design never used before , today facing 1 of them: the new transition system shared elements . but problem way simpler. need start activity must appear bottom, not (50%p) fading animation along . coming pre-lollipop experience, intended use overridependingtransition method following xml in res/anim : <?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android" android:fillafter="true"> <alpha android:fromalpha="0" android:toalpha="1" android:interpolator="@android:anim/accelerate_interpolator" android:duration="1500"/> <translate android:duration="1500" android:fromydelta="50%p" android:toydelta="0%p...

python - How to set result of future\add to queue from another thread in Cython? -

i have c++ dll works multiple threads. wrapped library cython , created special receiver callback-function, must adds results asyncio.queue. cdef void __cdecl newmessage(char* message) nogil: i marked nogil, callback calls thread. in callback use: with gil: print("hello") # instead adding queue. print("hello") more simple operation demostrate problem and got deadlock here. how resolve it? c++ callback declaration (header): typedef void (*receiver_t)(char*); void setreceiver(receiver_t new_rec); cpp: static receiver_t receiver = nullptr; void setreceiver(receiver_t new_rec) { printf("setted%i\n", (int)new_rec); = 123; if (new_rec != nullptr) receiver = new_rec; } cython code: cdef extern "teamspeak3.h": ctypedef void (*receiver_t) (char*) nogil cdef void __cdecl setreceiver(receiver_t new_rec) nogil cdef void __cdecl newmessage(char* message) nogil: gil: print("hello"...

javascript - Best way to handle changes of <select> -

on main page (index.html) have list of objects have category field example. , on top of page have element selecting category. so, best way handle this: when changes selected category in - change list of objects (view objects selected category). can make using java+spring+thymeleaf or have use javascrypt or other tool also? update: code <div class="grid-30"> <select id="selectcategory" th:field="${selected.id}"> <option th:each="category : ${allcategories}" th:value="${category.id}" th:text="${category.name}">all categories</option> </select> </div> so when element changes want toggles move url "/category/"+${selected.id}

java - get() vs intValue() methods in AtomicInteger -

atomicinteger class has 2 methods, get() , intvalue() following definitions. intvalue() definition : /** * returns value of {@code atomicinteger} {@code int}. */ public int intvalue() { return get(); } get() definition: /** * gets current value. * * @return current value */ public final int get() { return value; } is there advantage of having non final method intvalue()? practical purposes, can use method if not wrong. please explain if there advantage such practice. the method intvalue() exists because atomicinteger extends number , abstract.

php - Twig do not set the locale in Symfony 3 -

i created eventlistener set locale based on user preferences, set langage in listener: $request->setlocale($user->getlanguage()); $request->getsession()->set('_locale',$user->getlanguage()); i tried both.. i register listener in service.yml : app.event_listener.locale: class: 'appbundle\eventlistener\localelistener' arguments: - '@security.token_storage' tags: - {name: 'kernel.event_listener', event: 'kernel.request', method: 'onkernelrequest'} i tried add priority: 17 service not change anything... the listener seems works, can locale in controller $request->getlocale() (or session). but twig still in default language defined in config.yml : parameters: locale: fr i'm pretty lost now, tips ? i tried lot of stuff (change priority, check if locale passed front etc...) forced translator in eventlistener: public function onkernelrequ...