Posts

Showing posts from January, 2015

c# - Add Binding To IIS Without Recycling Application -

we have application allows associate multiple urls , want allow our customers add new urls themselves, have following code adds bindings: using (servermanager servermanager = new servermanager()) { var site = servermanager.sites["sitename"]; var binding = site.bindings.singleordefault(x => x.host == hostname); if (binding == null) { binding = site.bindings.createelement("binding"); binding["protocol"] = "http"; string ip = "*"; string port = "80"; binding["bindinginformation"] = string.format(@"{0}:{1}:{2}", ip, port, hostname); site.bindings.add(binding); servermanager.commitchanges(); } } the issue have causes application recycle, have tested on our solution using local iis , appliation_start hit again. have manually added binding iis causes recycle. while suspect answer no solution adding binding programatically without cau

android - Java iterator nested List -

i have simple class structure : public class messageslist { private int id; private int msg_id; } for , set data database,o'm using code : list<messageslist> item = g.dbhelper.getrawrow("select * messageslist group msg_id"); to query database, result is: item = {arraylist@830033903920} size = 2 0 = {string[14]@830033903944} 0 = {string@830033904024} "1" 1 = {string@830033904080} "1" 1 = {string[14]@830033905064} 0 = {string@830033905144} "2" 1 = {string@830033905200} "2" now i'm trying iterator nested list : (int i=0;i<item.size();i++) { log.e("",item.get(i).getid()+""); } i error , app dont work, how iterator nested list? thanks error: java.lang.classcastexception: java.lang.string[] cannot cast ir.tsms.eitaapro.helper.database.models.messageslist the problem here list<messageslist> item =

Android Media Player Url specific issue -

i working in 1 of android project in playing sound media player. when use this url playing song ioexception follow song playing fine in mediaplayer. should problem? public void startmediaplayer(string url) { log.e("urltoplay==>",url); // start new song play if(mediaplayer==null){ mediaplayer=new mediaplayer(); }else{ mediaplayer.reset(); } uri myuri1 = uri.parse(url); mediaplayer.setaudiostreamtype(audiomanager.stream_music); try { mediaplayer.setdatasource(getactivity(), myuri1); mediaplayer.prepareasync(); mediaplayer.setonpreparedlistener(new onpreparedlistener() { @override public void onprepared(mediaplayer player) { playpause=true; player.start(); mediafilelengthinmilliseconds = player.getduration(); // gets song length in milliseconds url } }); mediaplayer.setoncompletionlistener(n

asp.net - How to make a flattening function for linq object (Linq To Entities for mysql)? -

i upgrading old program , using linq basic select, can learn linq in process. have repetitive task of showing data various join grid view, below sample protected void page_load(object sender, eventargs e) { using ( vavestockmodel.vavestockentities db = new vavestockmodel.vavestockentities()) { var prod = (from p in db.products select p); var prodd = (from p in db.productdetails select p); var prode = (from p in db.product_extra_data select p); var join1 = (from p in prod join pd in prodd on p.prstyle equals pd.stylecode select new {pr=p,prd=pd }).tolist(); var join2 = (from p in prod join pd in prodd on p.prstyle equals pd.stylecode select new { p.prshow,p.prprice,pd.i_ean_51,pd.i_ean_50 }).tolist(); var join3 = (from p in prod

java - Stanford Parser (Typed Dependencee) Exception -

i want see dependence output format in stanford parser nlp. downloaded jar file link. http://nlp.stanford.edu/software/lex-parser.shtml then import in eclipse , wrote following code. package hammad.nlp; import java.io.stringreader; import java.util.collection; import java.util.list; import com.chaoticity.dependensee.main; import edu.stanford.nlp.ling.corelabel; import edu.stanford.nlp.parser.lexparser.lexicalizedparser; import edu.stanford.nlp.process.corelabeltokenfactory; import edu.stanford.nlp.process.ptbtokenizer; import edu.stanford.nlp.process.tokenizerfactory; import edu.stanford.nlp.trees.grammaticalstructure; import edu.stanford.nlp.trees.grammaticalstructurefactory; import edu.stanford.nlp.trees.penntreebanklanguagepack; import edu.stanford.nlp.trees.tree; import edu.stanford.nlp.trees.treebanklanguagepack; import edu.stanford.nlp.trees.typeddependency; public class test { /** * @param args */ public static void main(string[] args) { // todo auto-generated

android - Adding a footer view in RECYCLER VIEW? -

i want add footer layout @ base of recycler view.below adapter view inflates header layout other items well.help appreciated! public class splitmembersadapter extends recyclerviewadapter<splitmember, splitmemberviewholder> { private final arraylist<splitmember> msplitmemberslist; private final imageloader mimageloader; private static final int type_header = 0; private static final int type_item = 1; private int splitamount; private boolean isamountsplitted; public splitmembersadapter(arraylist<splitmember> members,imageloader imageloader) { msplitmemberslist = members; mimageloader = imageloader; } @override public int getitemcount() { return msplitmemberslist.size(); } @override public int getitemviewtype(int position) { if (ispositionheader(position)) { return type_header; }

c# - Entity Framework 4 Loading Reference Exception -

i'm having troubles loading reference parent object in entity framework 4. due lazy loading reference parent object (condition) not loaded on child object (discountlevel), try load with: if(!this.conditionreference.isloaded) this.conditionreference.load(); but throws following exception: the entity reference not loaded because not attached objectcontext so if try attach existing child object (discountlevel) object context (and load parent reference afterwards): context.attachto("tbldiscountlevel", this); i following exception: an object same key exists in objectstatemanager. existing object in detached state. object can added objectstatemanager again if in added state. i feel i'm doing wrong in first place, can't figure out what. every on topic appreciated. let me know if need additional information! i stumbled upon problem , didn't have code above: there few calculations in various overwritten onchange-methods in discountl

java - File not found exception while reading the from jar in spring? -

i working on spring ,i want read file name jar file,but getting filenotfoundexception . 1 me, please check code below. classpathresource classpathresource = new classpathresource("test.txt"); system.out.println(classpathresource.getpath()); system.out.println(classpathresource.geturi()); system.out.println(classpathresource.geturl().getpath()); system.out.println(classpathresource.geturi().getpath()); but when wrote below system.out.println(classpathresource.getfile().getcanonicalpath()); system.out.println(classpathresource.getfile().getpath()); the above 2 lines throwing exception, when working normal java program, working great.

python - What is the solution/workflow to make use of my functions with Numpy and Matplotlib on the example of cash amount calculations on perpetuity? -

i make matplotlib plot of the amount of cash agglomerated perpetuity against time. use numpy the generation of x axis data. problem: there seems problem when using functions defined below numpy arrays. suspect has fact functions not vectorized, , there difference between iterative , recursive function definitions. unfortunatly, numpy.vectorize not solve issue. questions: how bring example work? , best workflow deal such plotting objectives? whey recursive , iterative functions give different errors? why numpy.vectorize not here? my code looks this: agglomerated interest: def a(a,r,t,n): """calculates combined interest initial amount a, interest rate r, times of compounding per year n , time t.""" return * pow((1 + r/n),(n*t)) perpetuity, recursive: def p_rec(a,r,t,n): """returns total amount has accumulated perpetuity initial amount a, interest rate r , time t.""" result = 0 if t == 0:

regex - Javascript get query string values using non-capturing group -

given query string: ?cgan=1&product_cats=mens-jeans,shirts&product_tags=fall,classic-style&attr_color=charcoal,brown&attr_size=large,x-small&cnep=0 how can extract values these param types 'product_cat, product_tag, attr_color, attr_size' returning 'mens-jeans,shirts,fall,classic-style,charcoal,brown,large,x-small ? i tried using non-capturing group param types , capturing group values, returning both. (?:product_cats=|product_tags=|attr\w+=)(\w|,|-)+ you can collect tha values using (?:product_cats|product_tags|attr\w+)=([\w,-]+) mind character class ( [\w,-]+ ) more efficient list of alternatives ( (\w|,|-)* ), , avoid issue of capturing last single character. here code sample: var re = /(?:product_cats|product_tags|attr\w+)=([\w,-]+)/g; var str = '?cgan=1&product_cats=mens-jeans,shirts&product_tags=fall,classic-style&attr_color=charcoal,brown&attr_size=large,x-small&cnep=0'; var res = []

jflex - Regex to match string literal with newline and carriage return -

i'm having difficulty matching string literal both newline(\n) , carriage return(\r) characters. example: "132 holt court, cashtown, rhode island, 7680 \n\r" what tried \"([^\\\"]|\\.)*\" but regex can match string above without \r . can me one? thank you. you can remove them first before check . for example: string s = "132 holt court, cashtown, rhode island, 7680 \n\r" s=s.replace("\\n\\r","\\n");

database - Why does Oracle not find oci.dll? -

i use toad 10.2.1.3 under windows7 , following error: cannot find oci dll: c:\oracle\product\11.2.0\oci.dll that strange because exact in same path can find oci.dll . 64 bit system, might not problem! idea? thankful every hint! if using toad, need download 32-bit version of oracle client tools. since client tools different on per-processor architecture basis, need install versions.

asp.net mvc - 'object' does not contain a definition for... Creating anonymous model object in view -

i'm trying create anonymous type in view file pass partial view, i'm getting following error: 'object' not contain definition 'resultset' i'm trying pass anonymous object model view so: @html.partial("~/views/shared/components/pagination.cshtml", new { resultset = model.userplaces }); i've had bit of search around, , answers have mentioned cannot create anonymous types in controller , pass view ( https://stackoverflow.com/a/7652765/495328 ) i'm not creating anonymous type in controller in example. also, other questions seem indicate issue appears because of error in view, , not related anonymous type @ all. don't believe issue in case, working fine when model passed view model.userplaces not new { resultset = model.userplaces } my pagination.cshtml view file looks like: @if (model.resultset.totalresults > model.resultset.limit) { <nav> <ul class="pagination" data-base-url="@

xpages - "Unknown property" error in Designer when using Object Data Source -

i have build issue custom controls have property object data source: after build on error on xpage using property: unknown property xx. not defined on tag xc:customcontrolname if in designer trace log (help > support > view trace) see message saying: could not resolve property-class property xx. ignoring property. property-class specified com.ibm.xsp.extlib.model.objectdatasource. the extlib installed in designer on server. anyone seen , knows how solve it?

php - special characters send with url -

how special characters form submit. example: form got name="customer[firstname]". the url customer%5bfirstname%5d=test. i've tried: $firstname = $_get['customer[firstname]']; also same urldecode, rawurldecode. using [...] in name attributes creating array can access on server as: $firstname = $_get['customer']['firstname']; and if omit value in brackets, numerical array: name="customer[]" would become on server: // example, should loop on `$_get['customer']` instead... $firstname = $_get['customer'][0];

c# - Is it possible to have a Textbox show calendar dropdown? -

without place textbox on calendar control , hiding/showing controls , synchronizing values between controls, possible have textbox , button next it, when clicked, shows calendar dropdown? i use datetimepicker control, want set value null without having show & use checkbox. i want control empty without default date grayed out. implementing custom control based on this answer trivial, wondering if calendar dropdown can shown without need have hidden datetimepicker . this pretty definition of datetimepicker ...

.net - Read only web content of given URL and strip HTML and javaScript tag out of it - C# regex expression -

i have 2 class 1 build response stream , string of web content of given url , class strip html tags using regex expression not stripping contents down. want content web page want ignore javascript code, html , other tag. 2nd part; want introduce class read url web content public void processurl() { // used build entire input stringbuilder sb = new stringbuilder(); // used on each read operation byte[] buf = new byte[8192]; httpwebrequest request = (httpwebrequest) webrequest.create("http://www.uwl.ac.uk/why-uwl"); httpwebresponse response = (httpwebresponse) request.getresponse(); // read data via response stream stream resstream = response.getresponsestream(); string tempstring = null; int count = 0; { count = resstream.read(buf, 0, buf.length); if (count != 0) { tempstring = encoding.ascii.getstring(buf, 0, count);

python 2.7 - HiveAccessControlException Permission denied. [On pyhs2] -

i trying access data through pyhs2 writing select query. import pyhs2 pyhs2.connect(host='localhost', port=10000, authmechanism="plain", user='hue', password='', database='default') conn: conn.cursor() cur: print cur.getdatabases() cur.execute("select * orders") print cur.getschema() in cur.fetch(): print this gives me error: pyhs2.error.pyhs2exception: 'error while compiling statement: failed: hiveaccesscontrolexception permission denied. principal [name=hue, type=user] not have following privileges on object [type=table_or_view, name=default.orders] : [select]' few available answers suggested using: grant select on table orders user hue this again gives me error: yhs2.error.pyhs2exception: 'error while processing statement: failed: execution error, return code 1 org.apache.hadoop.hive.ql.exec.d

angularjs - ng-click not calling to type Script function -

i trying implement angular js code type script ng click not working. it's controller code:- module customersearch.controllers { export class customerctrl { static $inject = ['$scope', '$http', '$templatecache']; constructor(protected $scope: icustomerscope, protected $http: ng.ihttpservice, protected $templatecache: ng.itemplatecacheservice) { $scope.search = this.search; } public search = (search: any) => { debugger; var search = { accountid: search.accountid, checkactiveonly: search.checkactiveonly, checkparentsonly: search.checkparentsonly, listcustomertype: search.listcustomertype }; this.$scope.customer = []; this.$scope.ticket = []; this.$scope.services = []; var url = "someurl"; // '<%=resolveurl("a

json response comparison between two files -

my boss told me compare json response , automate it. eg: store json response coming server , store them in 1 file make second file call first file , compare each json response. if response right automatically check mark saying "all response correct" , vice versa. don't know how it. can guide me ?

python - How to monitor the Internet connectivity on two PCs simultaneously? -

i have 2 pcs , want monitor internet connectivity in both of them , make available in page whether they're online , running. how can that? i'm thinking of cron job gets executed every minute sends post file located in server, in turn write connectivity status "online" file. in page statuses displayed, read both status files , display whether they're online or not. feels sloppy idea. alternative suggestion have? (the answer doesn't have code; i'm not looking copy-paste solutions. want idea, nudge in right directio,) i suggest request (you need ping indicate pc on) sent periodically maybe django server , if query page on django server, shows webpage indicating status of each. in django server have loop time each received indicated, if time between last , current time large, set flag false. that flag later visible when url queried, via views. i don't think end sloppy, trivial solution don't have dig deep make work.

ios - How to save MPMediaItemCollection to database? -

i'm making application allows user make playlist , edit playlist , using mpmusicplayercontroller . able make playlist , retrieve can played. don't know how can store playlist(mpmediaitemcollection) core data or database, user have many playlist. i've tried play ipod playlist retrieved saved persistentid list , realize it's can save 1 playlist. cmiiw so how can save many playlist in core data or nsuserdefaults ? create mutable array add playlist in array via addobject nsuserdefaults.standarduserdefaults().setobject(playlistarray, forkey: "playlists") nsuserdefaults.standarduserdefaults().synchronize() don't forget fetch data in array nsuserdefaults before next playlist creation.

javascript - jQuery datepicker on dynamically generated rows -

i dynamically generating table rows using following javascript codes: $('#addnew').on('click', function() { var clone = $('table.table-responsive tr.cloneme:first').clone(); console.log(clone); clone.append("<td><button class='deleteadded btn btn-danger'>remove</button></td>") $('table.table-responsive').append(clone); calculatesum(); }); and script appending jquery calendar date inputs $(function() { $('input').filter('.datepicker').datepicker({ dateformat: 'yy-mm-dd', changemonth: true, changeyear: true, }); }); now problem facing jquery calendar pops in first row. doesn't work on rows generated. this in html <td> <input type="text" class="form-control datepicker" name="invoicedate[]" readonly="readonly" /> </td> please tell me how make jquery calendar w

Efficient way of removing keys of certain prefix from python dictionary -

i have python dictionary looks this; {'prefix_1':'12', 'prefix_2':'11', 'prefix_3':'14', '1':'241', '2':'312', '3':'421' } i want remove key-value pairs of keys start 'prefix'. result should dictionary this; {'1':'241', '2':'312', '3':'421' } my current way of doing remove each pair 1 one using del dictionary['prefix_x'] . more efficient ways of doing so? i using python 2.7 since other answers use dict comprehension create new dict , leave original dict untouched, i'll give 1 change dict in place: for k in d.keys(): if k.startswith('prefix'): d.pop(k) is there better way? let's there n keys in dictionary, find keys given prefix, you'll have iterate on keys, , of o(n) time complexity. then you'll need delete them 1 one, in worst case of them given prefix, of o(n)

java - Writing excel row data to sql server table, same row is getting inserted every time -

Image
i have , excel sheet, wherein have few rows have written sql server table. here code.. i perform few conversions before insertion, like, converting dates, etc. every time, same row getting inserted. if check output row number in loop, correct result, same row inserted every time. don't know going wrong. after insert, want remove row , write file. but, not able write file. file size increasing, no rows copied file. public void runit() throws exception { boolean success; success = false; try { file folder = new file("c:\\dcin_log\\dcp_dcl_mfg_order_status\\sql data base dcp_2015\\sql database dcp.xls"); if(!(folder.exists())) joptionpane.showmessagedialog(null, "input file not found"); else { statement stat = con.createstatement(); fileinputstream fs = new fileinputstream(folder); hssfworkbook wb = new hssfworkbook(fs); hssfsheet

asp.net mvc - Change the querystring pattern of web api -

if put variable (say myvariable ) in action method such as [routeprefix("api/myservice")] public class myapicontroller : apicontroller { [route("")] [httpget] public httpresponsemessage getvar([fromuri] string myvariable = "") { var response = request.createresponse(httpstatuscode.ok, ""); return response; } } , api's url like: api/myservice?myvariable={ myvariable } but want see like: api/myservice?myvariable={ var } var or else rather myvariable . how can without changing route table?

uisearchbar - Set inputview for Searchbar - Swift -

class testviewcontroller: uiviewcontroller, uisearchbardelegate { @iboutlet weak var mysearchbar: uisearchbar! var myowninputview = uiview(frame: cgrectmake(100,100,50,50)) overide func viewdidload() { mysearchbar.delegate = self mysearchbar.inputview = myowninputview // errors - "cannot assign result of expression } } i'm trying assign custom input view search bar, based on apple documentation (-sorry not find link anymore), uisearchbar seems read-only value. looking @ this post , appears uisearchbar has multiple subviews , need uitextfield part in order change inputview. however, i'm not sufficiently familiar obj-c , attempts convert code swift have not been successful. found out textfield subview of subview of uisearchbar . code textfield in swift: var fakeview: uiview = uiview(frame: cgrectmake(100, 100, 50, 50)) @iboutlet weak var searchbar: uisearchbar! override func viewdidload() { fakeview.backgroundcolor = uicolor.redcol

python - RaspberryPi - MySQLdb -

hello stackoverflow users, for student project need use python , mysql, when try use i've kind of error traceback (most recent call last): file "myrfidserv.py", line 2, in import mysqldb importerror: no module named mysqldb i 've try fix installation of python-mysqldb have error ... package python-mysqldb not available, referred package. may mean package missing, has been obsoleted, or available source e: package 'python-mysqldb' has no installation candidate mysql-server install ! i've try sudo pip install mysql-python have kind of error collecting mysql-python using cached mysql-python-1.2.5.zip complete output command python setup.py egg_info: sh: 1: mysql_config: not found traceback (most recent call last): file "<string>", line 20, in <module> file "/tmp/pip-build-lbb0fd/mysql-python/setup.py", line 17, in <module> metadata, options = get_config() file "s

css - Bootstraps responsive-utilities.less as single Less file? -

i want use visible / hide system bootstrap without including full framework... try include responsive-utilities.less errors lessphp... anyone know maybe site can visible system seperate stand alone less file? you should import variables , mixins well: @import "less/variables"; @import "less/mixins"; @import "less/responsive-utilities"; you should wonder if lessphp can compile latest version of bootstrap in first place. see issues https://github.com/leafo/lessphp/issues/598 finally bootstrap requires autoprefix postprocessor. when compiling les code php can not run postprocessor (without installing node first).

IBM MobileFirst 7.0 Server : No runtime environment deployed in this server -

Image
successfully installed ibm mobilefirst 7.0 server on following environment, , also, runtime environment created step step , deployed successfully in server (with gui of mobilefirst platform configurion tool shows deployed ): centos 6.4 mobilefirst server 7.0 jdk-7u79 mysql 5.6.24 apache tomcat 7.0.62 but got no runtime environment deployed in server worklightconsole. i can't find logs show error messages. also,the wl related tables created automatically in mysql databases , worklight related folder generated in tomcat path, too. the gui of mobilefirst platform configurion tool shows deployed : the cause failure may due ssoexpiredlogincontextscleanuptask error can cause server not load: caused by: org.apache.openjpa.lib.jdbc.reportingsqlexception: cannot execute statement: impossible write binary log since binlog_format = statement , @ least 1 table uses storage engine limited row-based logging. innodb limited row-logging when transac

java - Is it possible and meaningful to make the superclass abstract? -

i told that: class can extend concrete superclass , override implemented method make abstract. if method becomes abstract, corresponding superclass should become abstract too. is correct? if so, meaningful make superclass or method in superclass become abstract? to contain abstract methods class must declared abstract. abstract methods can used behaviour specific each subclassing object. although can achieved through interfaces, may prefer use abstract class can contain implemented methods, or may wish declare fields not static , final . beware when class becomes abstract can no longer instantiated. read more abstract classes here .

c++ - Test class destructor for pointer being allocated? -

so having problem code. want pass value array of pointers function original object not 'disturbed' (my code works fine if pass reference; just trying different way learning exercise). after implementation returns, error: "error object 0x100105790: pointer being freed not allocated *** set breakpoint in malloc_error_break debug". i know because value goes out of scope upon function's return, destructor called object destructor assumes pointer allocated, error. curious if there way test if genome allocated or not. if not else destructor? problem worth bothering since have working passing in reference? function not destructive; have desire tricks. don't taking easy way out. //class destructor int genome[] organism::~organism() { //cout << "deleting this: " << << endl; if (this->genome != null) { delete [] this->genome; } } //declare genome pointer int *genome; /** * default constructor class */ o

python - Simple pandas pivot table issue -

i have dataframe below: +-------+--------+----------+---------------+ | | ios_id | video_id | feed_position | +-------+--------+----------+---------------+ | 11995 | user1 | 199 | 7 | | 11996 | user2 | 164 | 18 | | 11997 | user3 | 209 | 1 | | 11998 | user3 | 85 | 4 | | 11999 | user3 | 45 | 6 | | 12000 | user3 | 150 | 10 | | 12001 | user3 | 207 | 12 | | 12002 | user3 | 203 | 26 | | 12003 | user4 | 209 | 1 | | 12004 | user4 | 202 | 1 | | 12005 | user4 | 204 | 1 | | 12006 | user4 | 126 | 2 | | 12007 | user4 | 72 | 5 | | 12008 | user4 | 108 | 10 | | 12009 | user4 | 85 | 11 | what create pivot table counts instances of each ios_id each video_id , feed_position. this: +------------+---+---+---+---+---+---+----+-

c# - Nop Commerce 3.4 Address validation fails if the country has no state -

Image
i working in project uses nopcommerce 3.40. facing problem validating address country has no state. example - what require - for countries states , au state should required. for other countries state should optional. is possible in nopcommerce? or missing something? possible without tweaking code? thanks. there way without touching code. need considerable time fix. in admin, go configuration ==> countries then click edit. now select "state , province" tab. add state name similar "n/a" or "" blank. do step 1 4 countries except us, aus or applicable. if can update code, can done easily. other hand if don't want use state @ all, can disabled admin too.

dataframe - Data importing Delimiter issue in R -

Image
i trying import text file r, , put data frame, along other data. my delimiter "|" , sample of data here : |painless check-in. 2 legs of 3 on ac: ac105, yyz-yvr. roomy , clean a321 fantastic crew. ac33: yvr-syd, light load , had 3 seats myself. enthusiastic , friendly crew usual on transpacific route take several times year. arrived 20 min ahead of schedule. expected high level of service our flag carrier, air canada. altitude elite member. |we returned dublin toronto, on winnipeg. other cutting close due limited staffing in toronto our flight excellent. due rush in toronto 1 of our carry ones placed go in cargo hold. when arrived in winnipeg stayed in toronto, helpful , kind @ winnipeg airport, , received 3 phone calls following day in regards misplaced bag , delivered our home. thankful , more appreciative of service received great end wonderful holiday. |flew toronto heathrow. worse flight on way out. paid hefty fee exit seats had no storage whatsoever, , not ro

javascript - image preview before upload not working with + image+_row -

when select image should preview image. when add var image_row onchnage not work. i trying make work onclick function function add_popup_image() codepen example here working single id $("#fileupload_extra_image").change(function(){ if (this.files && this.files[0]) { var reader = new filereader(); reader.onload = function (e) { $('#input-popup-image').attr('src', e.target.result); } reader.readasdataurl(this.files[0]); } }); not working $('#fileupload_extra_image' + image_row).change(function(){ if (this.files && this.files[0]) { var reader = new filereader(); reader.onload = function (e) { $('#input-popup-image' + image_row).attr('src', e.target.result); } reader.readasdataurl(this.files[0]); } }); question: how can make + image_row work image preview script the below problem: image_row used return +1 i.e. if there existed input-popup-im

Strange intermittent SignalR failures when using Azure Servicebus Backplane -

we seeing strange behavior in our development , production environments when using signalr 2.2.0 , using microsoft asp.net signalr service bus messaging backplane with azure service bus instances . service buses seem corrupt , become clogged, , see problems described below. first, here owin startup code: public void configuration(iappbuilder app) { string connectionstring = system.configuration.configurationmanager.appsettings["microsoft.servicebus.connectionstring"]; globalhost.dependencyresolver.useservicebus(connectionstring, "myapplicationname"); // branch pipeline here requests start "/signalr" app.map("/signalr", map => { map.usecors(corsoptions.allowall); var hubconfiguration = new hubconfiguration { //enablejsonp = true, enabledetailederrors = true }; map.runsignalr(hubconfiguration); }); } the symptoms of our problem intermittent failure

javascript - How to dynamically create input range element (and its event handler) inside ajaxStop -

i new js development , ajax. i'm trying writing webpage requests data server using ajax , uses data draw sets of geojson features on map leaflet (these feature sets must toggleable draw/undraw i'm using leaflet's built-in functionality this). because don't want run problems loading, have had put of dynamic creation code in 'ajaxstop' callback (ie code run after ajax calls have finished). part of need add variable number of slider bars (this depends on whether or not particular feature set has time component). have naively put code , code attach onchange event handler in ajaxstop callback. slider bar created, event listener not exist (nothing happens when move slider bar around when added debug statements event handler). how should work: slider goes 1 time period (corresponding minimum , maximum time in time based feature set). when slider bar moved, feature set should change ones times less slider bar value in array of ilayers feature set (basically con

angularjs - Angular, input radio doesn't work with ng-repeat -

hi have problem ng-radio , nested ng-repeat. plunker here view: <div class="modal-header"> <h3 ng-if="inquiery.name" class="modal-title">{{inquiery.name}}</h3> <h3 ng-if="!inquiery.name" class="modal-title">add new inquiery</h3> </div> <div class="modal-body"> <div class="row"> <div class="col-sm-12"> <div class="panel panel-default"> <div class="panel-heading font-bold">inquiery questions</div> <div class="panel-body"> <table class="table table-bordered table-hover table-condensed bg-white-only"> <tbody> <tr style="font-weight: bold"> <th style="width:90%">name </th> <th style="