Posts

Showing posts from August, 2010

javascript - Enable autocomplete for only password forms in Google Chrome -

Image
let's have login form this: <form> <input type="email"> <input type="password"> </form> google chrome (and other browsers) able offer saving email , password without problems. chrome autofills kind of form on page load without problems. i need develop feature, "remembers" last user via localstorage , shows fancy ui includes name , email , only asks password time: <div>welcome our old customer umut (remembered@email.com)</div> <form> <input type="hidden" value="remembered@email.com"> <input type="password"> </form> this time, chrome doesn't autofill password on pageload when user focus field, choice of users first: i wonder, if there way tell browser that, have email selected, , want password that email autofilled on page load . cross browser if possible. ps. if don't use hidden type on email, instead make invi...

tsql - How to create this Hierarchy -

i have 3 tables: structures, account range , accountvalueusd. hierarchy of parent , child id in table structure, want create hierarchy : level 1...level 2...level 3...level 4....account...valueusd 111 112 113 114 100 1000 111 112 113 114 101 2000 the table structure links table account range key: financialitem the table acountrange links table account value key: accountfrom , accountto accountnumber can please me how it? create table [dbo].[structure]( [financialitem] [nvarchar](3) null, [id] [int] null, [parentid] [int] null, [childid] [int] null, [nextid] [int] null, [level] [int] null ) on [primary] insert [dbo].[structure] values (111,1,null,2,null,1), (112,2,1,3,null,2), (113,3,2,4,null,3), (114,4,3,null,null,4), (221,5,2,6,null,3), (222,6,5,null,7,4), (223,7,5,null,null,4) create table [dbo].[accountrange]( [financialitem] [nvarchar](3) null, [accountfrom] [int] null, [accountto] [i...

dictionary - parsing JSON to display in CollectionViewCell Swift 2 -

i starting creation of job app complement jobs website having trouble parsing indeed api use fill space in place don't have jobs. can content coming through can't seem stored dictionary , utilised create cells of collection view. code view controller below , advice appreciated after umpteen tutorials , web searches... think broke : import uikit class viewcontroller: uiviewcontroller, uicollectionviewdatasource, uicollectionviewdelegate { @iboutlet weak var mycollectionview: uicollectionview! var jobtitle = [[string: string]]() override func viewdidload() { super.viewdidload() // additional setup after loading view, typically nib. loadjobs() } override func didreceivememorywarning() { super.didreceivememorywarning() // dispose of resources can recreated. } func collectionview(collectionview: uicollectionview, numberofitemsinsection section: int) -> int { print(jobtitle.count) return jobtitle.count } // cell returned must r...

c# - Working with attribute routing in mvc -

on login page have dropdownlist change culture of application doing ajax call set culture. default have set 'en_us'. my issue when login directly without changing culture able login successfully, when change culture , tries login, not able that. happening because of ajax call made, makes custom attribute not registered ? also, login method has custom attribute defined. below code. ajax call $('#ddllanguages').change(function () { var val = $('#ddllanguages').val() createcookie('culturecookie', val, 7); $.ajax({ type: "post", url: '/account/getculturenew', data: { culturename: val }, success: function (result) { $("#logo-group").html(''); $(document.body).html(''); $(document.body).html(result); }, error: function (data) { //alert('er...

php - Set the default value for a module field in SugarCRM -

i have module named cases in sugarcrm environment has several fields name , id , account_name , date_created , description , on, , 1 custom field named custom_account_number . i want set value 1 of account_name field, how can using custom php script in custom folder? if using sugar 7.2 , simple, 1 . go admin->studio->modulename->fields->select custom fiel d. 2 . check calculated value click on edit formula . 3 . fields select name field. 4 . deploy it. now go module , save name appear on custom field also. i did not work on community edition can give idea , have write logic hook after save , in hook can write logic copy name custom field. for more info logic hook click here ...

oracle - PLS-00225: subprogram or cursor 'CHR' reference is out of scope -

Image
i make procedure in plsql return error know post code , error snap shot here create or replace procedure chr.att_insert_test cursor att select emp.employee_id employee_id, io.checktype checktype, io.machine_num machine_num, io.att_id att_id, io.swipe_date swipe_date, io.swipe_time swipe_time inout_live_machine_test io, chr_emgt_employee emp emp.employee_code = io.employee_code , io.att_id not in (select att_id_ref chr_ta_emp_swipe_in_out io.att_id = att_id_ref); begin in att loop insert chr_ta_emp_swipe_in_out (employee_id, swipe_date, swipe_time, swipe_id, swipe_type, created_by, ...

debugging - Is there a mode of python that traces each line executed, similar to 'bash -x'? -

i running python script in crontab works fine command line appears not running @ when runs in cron. if bash script, add 'bash -x' crontab , pipe stout , stderr log file. there similar mode of python capture execution of each individual line of code within script? the trace module this. python -m trace --trace yourscript.py

python - How to provide values for wtforms.BooleanField and how to add required validator? -

i using python-flask , putting small web-app. i have boolean field below: from wtforms import form, booleanfield, stringfield, passwordfield, validators, validationerror import json base.model import db_session, user class productform(form): name = .... price = .... **hasstone = booleanfield('hasstone', [validators.datarequired(message="please enter product frameshape")])** in flask side smth below: @app.route('/newproduct', methods=['post']) def newproduct(): """creates/edits proudct.""" updatesession() retjson = {'errmsg':[], 'data':{}} try: form = productform( request.form ); form.trimoffproductimageurl(); if request.method == 'post': if form.validate(): <<<<<<< stops here. the form cannot validated reason don't know. complains datarequired validator cannot satisfied. besides if take out va...

Call a method before any method invocation of that class in Java -

is there way can have method in class executed every time when method of class invoked. i'll give brief of scenario here: class util{ private isconnected(){ if(!xxxapi.connected()) throw new myexception(....) } public createfile(){....} public removefile(){....} } so, anytime call new util.createfile() want isconnected() invoked before createfile() starts. obviously can call isconnected() everytime in starting of each method, wondering if can have solution. is there other suggestion/solution such scenario. you should write invocationhandler ( http://docs.oracle.com/javase/7/docs/api/java/lang/reflect/invocationhandler.html ) intercept calls objects, , reflectively (using reflection api) invoke first isconnected() method followed method call made. sample: util interface: public interface util { void isconnected(); void createfile(); void removefile(); } util invocation handler: public class utilinvocatio...

java - JavaFx Stageshow 3 different stage -

i have on 3 class , 3 stage , want this: want show stage . 1 time show 1st stage 10 sec, next show 2nd stage 10 sec , next show 3rd stage 10 sec , next show 1st .... important 3 stage have work time . in swing use cardlayout here don't know how this. code 1 class: public class simpleslideshowtest extends application{ class simpleslideshow { stackpane root = new stackpane(); imageview[] slides; public simpleslideshow() { this.slides = new imageview[4]; file file1 = new file("c:/users/022/workspace22/ekranlcd/res/images/belka.png"); image image1 = new image(file1.touri().tostring()); file file = new file("c:/users/022/workspace22/ekranlcd/res/images/kropka.png"); image image2 = new image(file.touri().tostring()); image image3 = new image(file1.touri().tostring()); image image4 = new image(file1.touri().tostring()); slides[0] = new imageview(image1); slides[1] = new imageview(image2...

Set Select Option Using Jquery -

i have 3 select boxes of country, state, city <select name="property_country" id="country" > <option value="">country</option> </select> <select name="property_state" id="state" > <option value="">state</option> </select> <select name="property_city" id="city"> <option value="">city</option> </select> php filling country, ajax filling state , city fields, no problems there. have 2 countries in database - india , usa. if select india, ajax gives state correctly. if reselect option label "country" state , city fields go blank. need jquery code fill default labels , values given above "state" , "city" if no country selected (meaning "country") selected. this can done via database filling in state , city entries , attaching them country , onload (body or javascript) up...

Sending email with python -

i have following code import smtplib sender = 'sender@sender.com' receivers = ['receiver@receiver.com'] message = """from: person <sender@sender.com> to: person <receiver@receiver.com> subject: blending baby ! test e-mail message. """ try: smtpobj = smtplib.smtp('localhost') smtpobj.sendmail(sender, receivers, message) print "successfully sent email" except smtpexception: print "error: unable send email" its copy/paste somewhere , works fine. however . . . once included overall program, email receive not have sender or receiver available ??? its blank.... same code. import paramiko import time import smtplib def disable_paging(remote_conn): '''disable paging on cisco router''' remote_conn.send("terminal length 0\n") time.sleep(1) # clear buffer on screen output = remote_conn.recv(1000) return output def m...

android - OpenGL ES 1.0 - Incorrect rendering -

Image
i loading .obj file , render in android emulator. although 3rd-party .obj viewers show model correctly (open3mod), when launch on android emulator looks strange. please explain why in enulator model reders incorrectly? import android.content.context; import android.opengl.glsurfaceview; import android.opengl.glu; import java.util.hashtable; import java.util.arraylist; import java.io.inputstreamreader; import java.io.bufferedreader; import java.nio.floatbuffer; import java.nio.bytebuffer; import java.nio.byteorder; import javax.microedition.khronos.egl.eglconfig; import javax.microedition.khronos.opengles.gl10; public class myglsurfaceview extends glsurfaceview implements glsurfaceview.renderer { private context context; private hashtable<string, arraylist<float>> obj; public myglsurfaceview(context context) { super(context); setrenderer(this); this.context = context; } public void onsurfacecreated(gl10 gl, eglconfig c...

c# - Deleting principal and dependents for independent association (one-to-many) -

using entity framework 6 designer , our entities have independent association . no foreign keys defined in our model's properties. having following entities one-to-many relationship: public class parent { public guid id { get; set; } public virtual icollection<child> children { get; set; } } public class child { public guid id { get; set; } public virtual parent parent { get; set; } } mapping following sql tables: create table parent ( id uniqueidentifier not null, constraint pk_parent primary key clustered (id) ) create table child ( id uniqueidentifier not null, fkparent uniqueidentifier not null, constraint pk_child primary key clustered (id) ) alter table child check add constraint fk_child_parent foreign key(fkparent) references parent ([id]) alter table child check constraint fk_child_parent as can see not using cascade on delete , because team against usage of it. so question is, what's correct way delete pare...

Create SAS macro to create a macro variable -

i have created sas macro, macro a, takes in variable name , returns transformed versions of name i.e. if run %a(asdf) out asdf_log asdf_exp asdf_10 . want write macro, macro b, takes output first macro , appends new macro variable. %macro b(varlist, outputname); %let &outputname = %a(var1); %a(var2); ; %mend is want do, except doesn't compile. not sure if possible in sas. further complication, input macro b list of variable want run macro , append 1 long list of variable names. why? because have macro runs on list of variables , want run on transformed variable list. example: have %let varlist = x y; , want output x_log x_exp x_10 y_log y_exp y_10 . want 2 macros one, macro a, returns transformed variables names: %macro a(var); &var._log &var._exp &var._10 %mend i can't second macro (b written above) work properly. so if inner macro returning characters, doesn't generate non macro statements...

R RMySQL cannot read myconfig.cnf -

i'm trying read file myconfig.sys mysql r rmysql without success. objective save user , password file. i did file in mysql mysql_config_editor: shell> mysql_config_editor set –login-path=test_db –host=localhost –user=root --password to simplify placed myconfig.cnf in root directory c:/ . in r rmysql did follow: a <- "c:/mylogin.cnf" con <- dbconnect(mysql(), default.file=a, group='test_db', user=null, password=null) when r run, session aborted, making extremely difficult know happened. my system: win 7 prof – 64 b r 3.2.0 rmysql 0.10.9 rstudio 0.99.441 mysql 57 mysql workbench community (gpl) windows version 6.3.6 ce build 511 (64 bit)

scala - SBT - Multi project merge strategy and build sbt structure when using assembly -

i have project consists of multiple smaller projects, dependencies upon each other, example, there utility project depends upon commons project. other projects may or may not depend upon utilities or commons or neither of them. in build.sbt have assembly merge strategy @ end of file, along tests in assembly being {}. my question is: correct, should each project have own merge strategy , if so, others depend on inherit strategy them? having merge strategy contained within of project definitions seems clunky , mean lot of repeated code. this question applied tests well, should each project have line whether tests should carried out or not, or inherited? thanks in advance. if knows of link sensible (relatively complex) example that'd great. in day job work on large multi-project. unfortunately closed source can't share specifics, can share guidance. create rootsettings used root/container project, since isn't part of assembly or publish step. conta...

SQL Server dynamic pivot with multiple columns -

here's scenario in. have data in following format. my source data issuedon country sales transactions ------------------------------------------ 29-aug-16 india 40 8 29-aug-16 australia 15 3 29-aug-16 canada 15 3 30-aug-16 india 50 10 30-aug-16 australia 25 5 30-aug-16 canada 10 2 31-aug-16 india 100 25 31-aug-16 australia 30 10 31-aug-16 canada 55 12 this output looking for expected output issueddate australia canada india totalsales transactionscount --------------------------------------------------------------------- 29-aug-16 15 15 40 70 14 30-aug-16 25 10 50 85 17 31-aug-16 30 55 100 185 47 i have been able pivot data on country , "total sales" column. however, not able "total transactions" column right. here's code generate source data table. if c...

RethinkDB + Horizon with Windows Authentication (Active Directory SSO) -

is there way secure horizon app (with rethinkdb ) using windows authentication (sso) internal active directory? able restrict access based on windows/domain user , load ad profile info somehow in single page web app? the catch: needs run on premise. no cloud or external providers. local company active directory , windows environment. cheers there's no built-in way right now, embed horizon node app , handle authentication yourself.

css - Bootstrap - Grid Layout of List Items -

i have web page in i'm using bootstrap 3. in page, want have list of 4 panels place in 2x2 grid. want grid looks this: +-----+-----+ | 1 | 2 | | | b | +-----+-----+ | 3 | 4 | | c | d | +-----+-----+ i want grid styled list-group though. styled, mean have border stylings , internal padding list-group item. not want single column of items. while i've been able close shown in bootply , it's not quite there. there still blank line between first , second rows in grid. but, if rid of blank line, borders between rows don't correct. in addition, i'm not sure if should use width:50% i'm using. my code in question looks this: <div class="container"> <div class="list-group list-group-horizontal block" style="width:100%;"> <div class="list-group-item" style="width:50%;"> <h4>portion 1</h4> <h4><small>this description</small></h...

mysql - LOAD DATA LOCAL INFILE is producing null where hour is 00 -

load data local infile producing null hour 00. last 2 lines importing correctly can please me query: load data local infile 'test.csv' table stats.counters_activeue fields terminated "," optionally enclosed '"' lines terminated "\n" ignore 1 lines (@vartimest,nominal,cell_id,iplatedl_ms_qci_9,pdcpsdudelay_msec_qci_9,ueactiveul_count_qci_9, ueactivedl_count_qci_9) set day = str_to_date(@vartimest,'%m/%d/%y %h:%i'); data: day,nominal,cell_id,iplatedl_ms_qci_9,pdcpsdudelay_msec_qci_9,ueactiveul_count_qci_9,ueactivedl_count_qci_9 "09/05/2016 00:00",ce0001,cnum6,5.17,58.285,0.5725,0.9275 "09/05/2016 00:00",ce0001,cnum7,4.9025,40.385,0.17,0.235 "09/05/2016 01:00",ce0001,cnum8,1.8075,23.58,0.2175,0.8925 "08/30/2016 01:00",ce0001,cnum1,5.295,16.34,0.0875,0.17 %h format code hour in 12-hour time. hour in format must in range 1-12; cannot 0. since times appear in 24-hour format, ...

mysql - sql error (1241): operand should contain 1 column(s) - order by dates -

i'm trying find last deployment associated serial number, , without getting latest date, multiple lines particular serial number. i'm getting error 1241 when enter following: select deployment, device_serial_number action_archive (.....) group device_serial_number order 'date' one method uses subquery. looks this: select aa.* rom action_archive aa (.....) , `date` = (select max(aa2.date) action_archive aa2 . . . , aa2.device_serial_number = aa.device_serial_number );

amazon web services - Shorthand syntax for message-attributes in the send-message command in aws-cli for sqs -

when trying send message using aws cli sqs, cannot shorthand syntax --message-attributes parameter work. specifying json file works fine, , reference doesn't show example shorthand option. here reference command specifies shorthand i'm trying use can't work: http://docs.aws.amazon.com/cli/latest/reference/sqs/send-message.html here's command i've tried: aws sqs send-message --queue-url https://sqs.us-east-1.amazonaws.com/0000000000/aa_queue_name --message-body "message body goes here" --message-attributes firstattribute={datatype=string,stringvalue="hello world"},secondattribute={datatype=string,stringvalue="goodbye world"} i keep getting error messages: parameter validation failed: invalid type parameter messageattributes.contenttype, value: stringvalue=snapshot, type: , valid types: anyone ever managed sending attributes message using shorthand? currently, documentation of short-hand syntax --mes...

python - Implement rms without numpy -

i have implement function calculate rms without using numpy, using data in txt. have following: import numpy np import matplotlib.pyplot plt import math def main(): # cargando los datos avrgpress = [] press = [] open("c:\users\saulo\downloads\prvspy.txt","r") a: x in a: columnas = x.split('\t') avrgpress.append(float(columnas[0])) press.append(float(columnas[1])) def error(avrgpress, press): lista3 = [0]*len(lista) x in xrange(len(lista)): lista3[x] = lista3[x] * sum(sqrt(float(1.0/1064) * (avrgpress - press)**2)) return lista3 if __name__ == '__main__': main() when building, not out rms. suggestions or solution? is want, rms( avrgpress ) ? from __future__ import division # necessary import math def rms( alist ): """ rms( [1, 2, 3] ) = sqrt( average( 1**2 + 2**2 + 3**2 )) = 2.16 """ sum_squares = sum([...

php - Symfony form CollectionType Field -

Image
hi i'm quite new in symfony 2. i'm dealing problem several hours now, i'm forced ask comunity. i have 2 entities user --> language (onetomany) user entity /** * * @orm\onetomany(targetentity="user_language", mappedby="user") */ private $languages; public function __construct() { $this->languages = new arraycollection(); } user_language entity /** @orm\column(type="string", length=50) */ private $language; /** * @orm\manytoone(targetentity="user", inversedby="languages") */ private $user; user_languagetyp public function buildform(formbuilderinterface $builder, array $options) { $builder ->add( 'language' ); } i'm trying build form user can add/edit/delete speaking languages user_language in database when getting data database (in controller) - $user->getlanguages() got persistantcollection, querybuilder() got array is there way, how pass createfo...

Kafka: configuration by partition or by topic? -

Image
i created topic in kafka cluster following command. /opt/kafka/bin/kafka-topics.sh --zookeeper kaf1:2181,kaf2:2181,kaf3:2181 --create --topic mytopic --partitions 10 --replication-factor 2 --config retention.bytes=1074000000 --config delete.retention.ms=6000 --config segment.bytes=105000000 so, if understand correctly documentation, have topic 10 partitions replicate 2 times beetween 3 kafka hosts. next, each kafka host must retain 1go of data. each segment has size of 100mo , old logs delete after 1 minute. now, when du -h on logs directory on kafka hosts, have this: 1,2g ./mytopic-2 1,1g ./mytopic-8 1,2g ./mytopic-9 1,1g ./mytopic-6 1,1g ./mytopic-3 1,1g ./mytopic-0 1,2g ./mytopic-4 7,6g . i thought 1go directory entirely , not each partition. so question simple, topic configuration each partition or topic ? thanks. please, see picture below (distribution of partitions cluster nodes might different):

c - Swap using Pointers -

in code below in order swap between px , py need pointer point address of py , px swap them effectively. my question int temp when value of px put how give correct value because there no pointer pointing able give right value , how address of int temp not clone give wrong value? void swap(int px, int py) { int temp; temp = px; px = py; py = temp; } //pointer version void swap(int *px, int *py) { int temp; temp = *px; *px = *py; *py = temp; } both functions swap int values. swap affect calling code's int s? with second swap() , effect of swap seen in original a,b function works addresses of original a,b . int = 1; int b = 2; swap_version2(&a, &b); printf("%d %d\n", a, b); // prints 2 1 with first swap() , effect of swapped not seen in original c,d . swap() function swapping copies of c,d . net effect: first swap function wastes time. not swap c,d . int c = 3; int d = 4; swap_version1(c, d);...

Default value to a optional class variable parameter function call in vb.net -

i trying pass class variable optional parameter function. requires default value. set default value optional class variable. private function savefruit(optional byval tempbanana bananaclass = ?) reference types' default value nothing (the null reference). private function savefruit(optional byval tempbanana bananaclass = nothing) if tempbanana nothing tempbanana = otherdefaultbanana ..... end function as shown in example above have check if it's nothing is -operator before can use it, otherwise nullreferenceexception . can either assign instance exists or 1 initialize now.

ruby - puppet stdlib 'member" function not working -

trying use member function of puppet stdlib module: effectively: $myvariable = 'foo' then when using member function: member(['foo','bar'], $myvariable) i keep getting error message: error: not retrieve catalog remote server: error 400 on server: function 'member' must value of statement @ /etc/puppet/modules/mymodule/manifests/init.pp:### looking @ stdlib documentation member, see member rvalue. means in context need have output assigned. error message of must value of statement hinting at. note helpful wikipedia article on l-values , r-values https://en.wikipedia.org/wiki/value_(computer_science)#lrvalue . your code work, example, if assign output of member(['foo','bar'], $myvariable) variable or resource attribute. for example: $myvariable = 'foo' $variable = member(['foo','bar'], $myvariable) notify { $variable: } will result in notify 'true' during compilation. ...

Octave: plot rectangle with dashed lines -

i trying plot rectangle dashed lines in octave, if add property ":" "linestyle" before it,the plot lines remain solid. doing wrong? there several ways plot rectangle. please tell me 1 works, that's need. thanks clear ; close all; clc; figure('position',[0,0,600,600]); rectangle("position", [1,1,3,3], "linestyle", "--") zoom(0.5)

VB.net JSON DeserializeObject error BC30203 -

i'm using newtonsoft.dll create settings.json file. have class represents settings, serialize upon saving , deserialize when loading application. working great , fast except 1 thing. the settings class contains .net object called speechsynthesizer . when settings deserialized bc30203: identifier expected @ voice child object of speechsynthesizer . causes deserialized returning default `voice' (anna) settings instead of saved one's (serializing setting object work should) settings of object before child object deserialized. the json: { ...... "speech": { "state": 0, "rate": -3, "volume": 67, "voice": { "gender": 1, "age": 30, "name": "ivona 2 ruben", "culture": "nl-nl", "id": "ivona 2 voice ruben22", "description": "ivona 2 ruben - dutch male voice [22khz]...

unit testing - Issues using DataTestMethod and DataRow attributes in MS Test -

i have installed ms test v2 in vs 2015 instance using nuget , have added datatestmethod , datarow attributes unit tests , compile, when build, tests don't show in test explorer. example: [datatestmethod] [datarow("yahoo", "google")] public void testchecksite(string site) { ... stuff here ... } what missing? there test explorer upgrade? install mstest framework: https://www.nuget.org/packages/mstest.testframework/ if building .net core, install adapter: https://www.nuget.org/packages/dotnet-test-mstest/ however, if building desktop .net/uwp, install adapter instead: https://www.nuget.org/packages/mstest.testadapter/ now write tests , build solution. tests ought show in test explorer. please let me know if still not see tests showing up.

angularjs - Filtering multiple variables from a repeater using evaluate -

i need filter repeater multiple variables (type, name) or other combination of ngrepeat. one variable i have done using 1 variable this: element.all(by.repeater("org in orgs")).filter(function (elm) { return elm.evaluate("org.type").then(function (orgtype) { if (orgtype === "org_type_foo") { return orgtype; } }); }).then(function (elms) { //... }); attempt 1 i've tried evaluate() doesn't seem 2 parameters. orgname returns undefined element.all(by.repeater("org in orgs")).filter(function (elm) { return elm.evaluate("org.type", "org.name").then(function (orgtype, orgname) { if (orgtype === "org_type_foo" && orgname === "name1") { console.log(orgtype + " ------ " + orgname); return orgtype; } }); }).then(function (elms) { //... }); attempt 2 i thinking filter elms again aft...

html - Have a flexbox next to another flexbox? -

i have 2 flex boxes child elements. wish each of these flex boxes take 50% of page. <div class="flexbox"> .... </div> <div class="flexbox"> .... </div> i have tried: .flexbox{ display:flex; width: 50%; .... with no luck. have thought wrapping both divs in container, , displaying flex on container basis of 50%. wondering if there way without container? to result need to: use display: inline-flex on .flexbox elements remove white-space html use box-sizing: border-box paddings , borders * { box-sizing: border-box; } body, html { padding: 0; margin: 0; } .flexbox { border: 1px solid black; display: inline-flex; width: 50%; } <div class="flexbox"> .... </div><div class="flexbox"> .... </div>

notepad++ - Regex to replace what's inside the bracket except the another brackets inside of it -

how replace what's inside bracket except brackets inside of it. replace zzzzz . { "0000" "1111" 1111 { 222 } { 333 } } will be: { zzzzz { 222 } { 333 } } ({\n\s*)(?:[^}{]*)(\n\s*{) first, within capturing group, () , match { , newline \n , amount of space. ({\n\s*) next, within non-capturing group, match not }{ , number of times. (?:[^}{]*) finally, closing how started: capture newline, amount of whitespace, , next opening { . (\n\s*{) this won't match ones without internal brackets, nor work if internal brackets nested 3 layers. if provide examples of input, can improve match (like using behind skip internal matches) see demo @ regex101.com

vb.net - Check for empty text boxes when using lists -

i have following code: private sub editartoolstripmenuitem_click(sender object, e eventargs) handles editartoolstripmenuitem.click dim ctleditable = {txtcodigo, txtdeudor, txtoportunidad, drpbanca, txtejecutivo, drpgarantia, txtciiu, dtefecha, txtanalista, drpestatus, drpconcepto, dteultact, txtingresos, drpcumplimiento, txtroa2, txtie2, txtant, txtact, txtcovenants, drpfaltas, txtoportunidades, txtcostos, txtpmaa}.tolist() dim ctltext = {txtcodigo, txtdeudor, txtoportunidad, drpbanca, txtejecutivo, drpgarantia, txtciiu, dtefecha, txtanalista, drpestatus, drpconcepto, dteultact, txtingresos, drpcumplimiento, txtroa2, txtie2, txtant, txtact, txtcovenants, drpfaltas, txtoportunidades, txtcostos, txtpmaa}.tolist() dim ctlperma = {txtras, txtactividad, txttipo, txtmultapot, txtpotencial}.tolist() dim control control each control in me.controls if typeof (control) textbox dim txtbox textbox = control i...

javascript - does a directive need to list the service? -

i know there few ways format but, if new service injected controller: analyticscontroller.$inject = ['$scope', 'analyticsservice', 'nvd3', 'gridster']; does service still need in directive in angular 1.5? import { analyticscontroller } './analytics.controller'; export class analyticscomponent { constructor(){ this.bindings = { chartdata: '<' }; this.controller = analyticscontroller; this.controlleras = 'vm'; this.templateurl = 'analytics/analytics.html'; //maybe service? } } after injecting service use constructor expose class service. analyticscomponent.$inject = ['$scope', 'analyticsservice', 'nvd3', 'gridster']; export class analyticscomponent { constructor($scope, analyticsservice, nvd3, gridster) { this.bindings = { chartdata: '<' }; this.controller = analyticscontroller; ...

powershell - Jenkins Plugin for AWS CodeDeploy not deploying all files in workspace -

Image
i have freestyle project (mostly javascript , html/css files) in jenkins uses windows powershell build using npm commands. creates build folder , builds project expected files. in workspace on jenkins pulling bitbucket repo have number folders , files. in other projects use jenkins plugin aws codedeploy post build action files in workspace deployed. reason when project deployed ec2 instance first 4 folders in workspace being deployed , 2 important folders need other build folder, src , service, not. have tried messing "include files" parameter in plugin setup nothing has been successful. below screenshot of plugin setup: please appreciated has been issue days now, thank you.

angularjs - Date formatting not working with cellFilter -

in response receive date '2016-09-07 20:00:23.234 ist' , trying format date '07/sep/2016 20:00:23.234' of ui-grid cellfilter. like { "name": "creationtimestamp", "type": "date", "cellfilter": "date:'mm/dd/yyyy hh:mm:ss.sss'" } but it's not working it. still getting result like'2016-09-07 20:00:23.234 ist'. can please me? we can use custom filter, if want handle timezone { "name": "creationtimestamp", "type": "date", "cellfilter": "dateconversion" } app.filter('dateconversion', function(){ return function(date,timezone){ return (timezone ? moment.tz(date) :moment.utc(date)).format('dd/mmm/yyyy hh:mm:ss.sss'); }; })

java - Android, apk installation INSTALL_FAILED_POLICY_REJECTED_PERMISSION -

i'm trying install application using android studio, manage install other apps except app, when try install few errors within logcat following install_failed_policy_rejected_permission alert, i'm not sure error relates main problem(not able install app) here are: 2 times following error: com.example.appname has no certificates @ entry androidmanifest.xml; ignoring! after there 2 times: getauthtoken called non existant account: myoldemail@gmail.com failed auth token: no such account android.accounts.authenticatorexception: no such account and alert install_failed_policy_rejected_permission . to precise(there app same name long ago might make sense, anyway clicking ok fail install apk): installation failed message install_failed_policy_rejected_permission. possible issue resolved uninstalling existing version of apk if present, , re-installing. warning: uninstalling remove application data! want uninstall existing application? edit: i factory reset devic...

matplotlib - Looking to add multiple xtick labels for two parallel bar charts -

Image
i have dataset looks this: i want following: make sure bars not overlap. treat each bar separate dataset, i.e. labels on x axis should separate, 1 yellow series, 1 red series. these labels should words (i want have 2 series of xtick labels in chart) 1 words_2 , , 1 words_1 .. current code: import matplotlib.pyplot plt import numpy np import copy import random random import randint random.seed(11) word_freq_1 = [('test', 510), ('hey', 362), ("please", 753), ('take', 446), ('herbert', 325), ('live', 222), ('hate', 210), ('white', 191), ('simple', 175), ('harry', 172), ('woman', 170), ('basil', 153), ('things', 129), ('think', 126), ('bye', 124), ('thing', 120), ('love', 107), ('quite', 107), ('face', 107), ('eyes', 107), ('time', 106), ('himself', 105), ('want', 105), ('good', 1...