Posts

AngularJS 1.5 scope in directive ng-include -

here's code http://jsfiddle.net/miuosh/n6yppypj/ uploadfile directive. problem use this <input type="file" file-model="myfile" /> <button ng-click="uploadfile()">upload me</button> in ng-include="'views/uploadfileform.html'". in directive add "myfile" scope. turns out angular create new scope myfile. add "myfile" "rootscope" need use modelsetter(scope.$parent.$parent.$parent[..],element[0].files[0]) which inconvenient because need know how many parent scope have. i have faced similar problem dealing file input angular. can create directive listen file change , call controller function file. here jsfiddle it. var app = angular.module('app', []); app.controller('yourctrl', function() { $scope.image; $scope.imagechanged= function (files) { $scope.image = files; }; }); app.directive('customonchange', function() { ...

asp.net mvc - How to make FedAuth cookies unique for each application in on solution? -

i using system.identitymodel , claim based authentication authenticating mvc app. in login page after checking username , password uses approach create fedauth cookie(s) : var token = new sessionsecuritytoken(mycustomclaimsprincipal.getinstance(username, roles,claims) ); token.ispersistent=rememberme; var sam = federatedauthentication.sessionauthenticationmodule; sam.isreferencemode = true; sam.writesessiontokentocookie(token); everything works fine problem when use same approach in 2 other applications in same solution going published on different domains; in localhost fedauth cookies conflict each other. when log in 1 app, cookies not valid in other apps , should login again. in fact can work 1 app @ same time. think on localhost , there no problem on different domains after publish. prefere make fedauth cookie unique each application in 1 solution. possible? , how? maybe possible context or contextid in constructor of sessionsequritytoken....

go - Combining net/http and fasthttp -

i looking fast framework go , stumbled upon fasthttp https://github.com/valyala/fasthttp according developer , benchmark 10x faster golang net/http package. i'm familiar gorilla toolkit , other net/http based frameworks gin-gonic, goji, , gocraft. my question is: possible mix net/http framework / toolkits fasthttp example use gorilla packages echo / iris (fasthttp frameworks)? i checking iris framework , saw in documentation https://kataras.gitbooks.io/iris/content/using-native-httphandler.html it's possible use net/http framework. framework using https://github.com/valyala/fasthttp/fasthttpadaptor convert native net/http handler fasthttp handler.

jquery - is there any way to find the row number where I am selecting in dropdown in Kendo grid? -

Image
in kendo grid want find row number making selection in dropdown. cauld change datepicker editable , focused. attaching pic reference. this code kendo field { field: "md_of_iss", title: "mode of issue", template: "#= modename(md_of_iss) #", editor: function (container) { var input = $('<input id="md_of_iss" name="md_of_iss">'); input.appendto(container); input.kendodropdownlist({ datatextfield: "rsrc_description", datavaluefield: "md_of_iss", datasource: array, change: function (e) { } }).append...

android - Display Progress bar while delay? -

in app want have delay of 5 seconds , in 5 seconds user should see progress dialog tried progressdialog.show(); try { thread.sleep(5000); } catch (interruptedexception e) { e.printstacktrace(); } progressdialog.dismiss(); but while thread sleeping progessdialog wont show . new countdowntimer(6000, 1000) { public void onfinish() { mprogressdialog.dismiss(); // whole code } public void ontick(long millisuntilfinished) { mprogressdialog.show(); } }.start(); this works fine

visual studio 2010 - How do I get Python controls into the toolbox in VisualStudio -

i want create winforms ironpython app. i have installed ironpython, toolbox empty. how add python controls it? the toolbox available if create ironpython wpf application. unfortunately there no designer support ironpython windows form applications. windows form has written in python. source: https://github.com/microsoft/ptvs/wiki/projects#project-types . (read "ironpython windows forms application" section)

vbscript - How to verify that all required included files exist on startup -

does still work classic asp vbscript , know if possible verify on startup included files exist? large project , requires refactoring before moving files subfolders i'd have test in place ensures includes still pointing correct files. not i've ever tried , here's why in classic asp can have 2 types of #include ssi directives; relative path includes, path current directory. <!-- #include file = "subfolder/file.asp" --> virtual path includes, take path root of containing web application. <!-- #include virtual = "/toplevelfolder/subfolder/file.asp" --> if have enable parent paths set in web application can use ../ traverse parent folders when using #include file . with in mind, think have minute. first need identify #include directives using loop iterate through web application , find .asp files example , use regular expression pull out path. there complications. you have distinguish both file , virtual ty...