Posts

Showing posts from May, 2011

Webview unable to render frameset -

i trying load webpage inside web view - https://netbanking.hdfcbank.com/netbanking/ . can see dom rendered height of frame 0. <html><head> <title>welcome hdfc bank netbanking</title> <script language="javascript"> var daemon = 'netbanking'; var p_remoteaddress = ''; var rsaauthreq = ''; var l_path = window.location.pathname; if(l_path == undefined || l_path == '' || l_path.indexof("/netbanking") < 0){ window.location.href = window.location.protocol + "//" + window.location.host +"/netbanking"; } </script> </head> <frameset border="false" frameborder="o" framespacing="0" rows="*" cols="*"> <frameset border="false" frameborder="o" framespacing="0" rows="*,30" cols="*"> <frame margin

excel - VBA Check duplicates (column) and copy cells from one row to another that is duplicate -

Image
excel 2007 [vb] in macro filter color find duplicated values (on column "j" have highlight cells rules - duplicates). duplicated records in column "j" named in column "k" "copy" or "original".i find "copy" each "original" record under (but not 1 more rows) , copy cells value column n:r of "copy" row row "original". i hope wrote if not screenshot under. table begining of macro: sub copy_original() dim lastrow long dim wb2 excel.workbook application.displayalerts = false application.alertbeforeoverwriting = false application.screenupdating = true set wb2 = thisworkbook wb2.sheets("sheet1").autofiltermode = false wb2.sheets("sheet1").range("a4:u4").autofilter field:=10, criteria1:=rgb(255, 204, 0), operator:=xlfiltercellcolor lastrow = wb2.sheets("sheet1").cells(rows.count, "c").end(xlup).row x = lastrow 5 step -1 if... ... wb2.shee

excel - VBA realtime filter Listbox through Cell Value -

Image
i have listbox in worksheet , activating clicking specified cells. filter listbox writing on cell. example, if write "asd" on cell, listbox should return lines start "asd" in realtime. private sub worksheet_change(byval target range) on error resume next if target.value <> "" listbox1 = .listcount - 1 0 step -1 if instr(1, lcase(.list(i, 0)), lcase(target.value)) = 0 , _ instr(1, lcase(.list(i, 1)), lcase(target.value)) = 0 , _ instr(1, lcase(.list(i, 2)), lcase(target.value)) = 0 , _ instr(1, lcase(.list(i, 3)), lcase(target.value)) = 0 .removeitem end if next end end if end sub i have not working. can try method - when specific cell changed remove items listbox , populate matching items source range : option explicit private sub worksheet_change(byval target range) dim strfilter string dim rngdata range

c# - The application I developed with vs2010 works very slowly in vs2015 -

i developed application (too many modules included) in visual studio 2010 ultimate. bought new pc , installed visual studio 2015 enterprise on it. first problem after when open project in vs2015; forms' size changing 1924; 1034 or similar sizes. old pc 15.6" laptop , new 1 14". why forms' size changing? second , biggest problem i using datagridviews in project. when write on new line freezing during 1 second working. know working fast. , check database connection there isn't problem. i don't know problem ? thinking change product vs2010. if have chance resolve have make.

java - JComboBox<BeanObject> not displaying edited values -

i have jtable, first column uses jcombobox editor. combobox model contains data objects fetched sql database. if manually enter value inside combobox , leave editor, entered value lost. doens't happen if value selected popup, or if jcombobox's model instantiated simple strings instead of bean objects. note need add row dinamically, seems irrelevant since issue appears both in default row , in added rows. this working netbeans sample project reproduces issue: https://drive.google.com/open?id=0b89fss48-yy4v09yrvozrzjgmkk here relevant code: public newjframe() { initcomponents(); //bean objects used populate combobox: item item1 = new item("one", 1); item item2 = new item("two", 2); item item3 = new item("three", 3); jcombobox<item> combobox = new jcombobox<>(new item[]{item1, item2, item3}); combobox.seteditable(true); defaultcelleditor defaultcelleditor = new defaultcelleditor(combobox); defa

sql - Cassandra: Update multiple rows with different values -

hi have similar table in cassandra: create table testtable( id text, group text, date text, user text, dept text, orderby int, files list<text>, users list<text>, family_memebrs list<frozen <member>>, primary key ((id)));' create index on testtable (user); create index on testtable (dept); create index on testtable (group); create index on testtable (date); id | orderby :---- | :---- 101 | 1 102 | 2 105 | 3 i want change existing order following ids 105,102,103 in same order. i.e., (105, 1) (102, 2) (103, 3). i'm new cassandra, please me. think possible in sql byusing rownum , join. i'm new cassandra i can tell. first clue, order of results. id sole primary key (making partition key) results never come sorted that. this how should sorted: aploetz@cqlsh:stackoverflow> select id,orderby,token(id) testtable ; id | orderby |

Deleting a cookie on asp.net web api -

i'm trying delete session-id cookie , doesn't work. any guidance completing task using normal controller? httpresponse ( not httpresponsemessage ) below code public class logoutcontroller : apicontroller { [acceptverbs("get")] [system.web.http.route("logout/removecookie")] [system.web.http.httpget] public httpresponsemessage removecookie() { httpresponsemessage response = request.createresponse(httpstatuscode.ok); cookieheadervalue currentcookie = request.headers.getcookies("session-id").firstordefault(); if (currentcookie != null) { cookieheadervalue cookie = new cookieheadervalue("session-id", "") { expires = datetimeoffset.now.adddays(-1), domain = currentcookie.domain, path = currentcookie.path };

node.js - npm install whatever --save is not saving into my package.json? -

i have been installing packages , noticed not many of packages in package.json? --save when install. in fact installed 10 dependencies , none saved. has run before? try --save-dev when installing npm package. save devdependencies used in development. --save save dependencies. may there no dependencies dependent on project.

Using jQuery $.ajax to post json encoded data to a php script: success event is doing nothing -

i making ajax call using jquery post data json php file, nothing happening on success . code below : ajax section $.ajax({ url:"mydata.php", datatype: 'json', method:"post", data:'country', success:function(j){ var $country = $("#country"); $.each(j, function () { $country.append($('<option></option>').attr("value", this.country_id).text(this.country_name)); }); } }); php section if(isset($_request['country'])){ $conn=new mysqli("localhost","root","","newdb"); $myquery="select * country"; $result=$conn->query($myquery); while($country=$result->fetch_assoc()){ echo json_encode($country); } } html section <label >country:</label> <select class="form-control" id="country" > <

CSS only menu, click to disappear -

i have menu structured this: <div class="nav"> <div class="drnav"> <ul class="ulmenu"> <li> <div class="menuheader">my home</div> <div class="menu-content"> <ul> <li><a href="">item1</a></li> <li><a href="">item3</a></li> </ul> </div> </li> <li> <div class="menuheader">my stuff</div> <div class="menu-content"> <ul> <li><a href="">item4</a></li> <li><a href="">item6</a></li> </ul>

audio - iOS Xode : AVAudioPlayer is not playing WAV file correctly -

i have wav file tones @ around 18khz. audio 16-bit pcm mono. i using following function play file: func playsound(name: string) { let documents = nssearchpathfordirectoriesindomains(.documentdirectory, .userdomainmask, true)[0] let path = documents.appending("/").appending(name) let url = nsurl.fileurl(withpath: path) { player = try avaudioplayer(contentsof: url) guard let player = player else { return } player.preparetoplay() player.play() } catch let error { print(error.localizeddescription) } } when play on ios 10.2 device hear series of tones between 1000hz 10000hz. i've analyzed rendered audio capturing , frequency plot shows original content @ 18khz there, there tones present between 1000hz 10000hz. when play same wav file vlc or other desktop audio player, don't hear tones (which expected since they're located around 18khz). suspect c

sql - How to sum all columns value of a table and display the total in new row by using Postgresql -

Image
i using normal select query display rows select type, debit, credit, (debit-credit) balance bank_cash_registers its displayed below image now need display total additional row of postgresql query below image. how can achieve this? and there option separate total based on type below.. another way using grouping sets . advantage can extended. furthermore think created purpose. this should more efficient union solution data passed through once. the following query returns want: select coalesce(type, 'total: '), sum(debit), sum(credit), sum(debit - credit) balance bank_cash_registers group grouping sets ((type, debit, credit), ()); the following query groups values having same type (notice thing changed grouping sets clause): select coalesce(type, 'total: '), sum(debit), sum(credit), sum(debit - credit) balance bank_cash_registers group grouping sets ((type), ()); result: bank 0 1500 -1500 cash 0 700

php - Woocommerce not displaying reviews -

i've been making wordpress site woocommerce users may able buy items. my problem comments/reviews aren't showing individual items. shows if turn on template debug mode. otherwise, i've been making sure wordpress has comments turned on, i've copied woocommerce plugin templates on theme override, , each item has comments turned on well, no avail. appreciated!!!

javascript - How can I bind image url's to Framework7 list-item "media" attribute with Vue.js? -

i using framework7's vue plugin display list of tweets. tweets stored within array in data(): data () { return { tweets : [] } } the markup (jade) looks this: f7-list(media-list='', v-for='tweet in tweets') f7-list-item(:title='tweet.text') this works , print me list of tweets in array gui. f7-list component framework7 allows add image this: f7-list-item(media="<img src='image.jpg'>") each image stored in tweets array this: tweet.user.profile_image_url normally, add image: f7-list-item(media="<img src='{{tweet.user.profile_image_url}}'>") unfortunately, not seem possible anymore since error message vue in console: template syntax error media="<img src="{{tweet.user.profile_image_url}}">": interpolation inside attributes has been removed. use v-bind or colon shorthand instead. example, instead of <div id="{{ val }}">, use

Interactive Android Animation -

Image
i trying implement interaction-animation in android user can change size of object , rotate interaction. this not trying implement, similar. i want allow user change angle line 'p' , angle 'a' should change. moving 'p' w.r.t center should allow size of shape change. i have tried, animation , animator classes don't serve purposes. i not asking code, need pointer on ho can implement that. as far can tell, want line, circle, , 'a' labelled arc change respect 'p', user touches. the line this part relatively simple, presuming aware of how acquire x , y coordinates user clicks. firstly, you'll need override ondraw method, provide canvas element can draw on. then, when user touches screen, can draw line center of screen respective x , y coordinates. the circle this part relatively simple, canvas has drawcircle function draw circle around given x , y coordinate specified radius. draw circle corresponding user

python - Need to have a string contain code -

so i'm trying make simple text based game scratch, , i'm running problem right away. i'm trying create class events happen in-game make writing code easier. here's mean: class event(object): def __init__(self, text, trigger1, trigger2, outcome1, outcome2): print(text) time.sleep(1) choice= input("what do?") if choice == trigger1: (somehow execute outcome 1) if choice == trigger2: (somehow execute outcome 2) but don't know how make outcomes contain code write later, appreciated! the pythonic way use dictionary function objects: def outcome1(): print("outcome 1") def outcome2(): print("outcome 2") def event(text, triggers): print(text) time.sleep(1) choice= input("what do?") triggers[choice]() event("you can got west or east.", { "go west": outcome1, "go east": outcome2, })

jsp - What does the following entry in web.xml refer to? -

one under root webapps/root/jsp/error.jsp , other under webapps/documents/jsp/errorpage.jsp , web.xml entry follows <servlet> <servlet-name>errorpage</servlet-name> <servlet-class>org.apache.jsp.jsp.error_jsp</servlet-class> </servlet> <servlet-mapping> <servlet-name>errorpage</servlet-name> <url-pattern>/jsp/errorpage.jsp</url-pattern> </servlet-mapping> in general web.xml contains servlet , servlet-mapping entry. servlet-mapping entry contains url , servlet entry contains servlet path upto understanding. i couldn't understand above entry in web.xml. please me know it. from servlet specification: the servlet-class element contains qualified class name of servlet. you specify container (tomcat) that: org.apache.jsp.jsp.error_jsp qualified class name of servlet called errorpage. from servlet specification: the servlet-mappingtype defines mapping between servlet , url

Dynamically loading client C++ dll using ACE_DLL giving error as Unhandled exception -

i want dynamically load client dll in c++ windows application. using ace_dll. want create object of class in client dll in application . have written wrapper class. 1 of member function creates object of ace_dll. using object loading client dll. next calling symbol function through ace_dll object , passing mangled name of constructor of class in client dll. next calling function pointer (_entry ) contains address of constructor time getting error "unhandled exception (access violation)" please let me know if approach correct. below calling sequence in application. ace_dll* _pdll; typedef test* (*testfp)(); testfp _entry; _pdll = new ace_dll(); _pdll->open("dllname_to_be_opend"); std::string ssymbol = "test"; // mangled name of test class constructor in client dll _entry = (testfp) _pdll->symbol(ssymbol.c_str()); test *obj = _entry(); // unhandled exception @ 0x00362b2f in testdll.exe: 0xc0000005: access violation writing lo

ios - Swift SearchBar Filtering & Updating Multiple Arrays -

i need implement searchbar searches & filters tableview 2 labels. label data coming 2 different arrays. when filter through array 1/label 1 filters label 2 remains same results mixed. both arrays created after sql query results 2 columns of data. mean arr1[0] , arr2[0] same row different columns. i'm stuck after many tries. here's latest code: var arr1 = [string]() var arr2 = [string]() var filtered:[string] = [] override func numberofsections(in tableview: uitableview) -> int { return 1 } override func tableview(_ tableview: uitableview, numberofrowsinsection section: int) -> int { if(searchactive) { return filtered.count } else { return arr1.count } } override func tableview(_ tableview: uitableview, cellforrowat indexpath: indexpath) -> xxtableviewcell { let cell = tableview.dequeuereusablecell(withidentifier: "xxcell", for: indexpath) as! xxtableviewcell if(searchactive){ cell.label1.text =

Android FragmentPagerAdapter can't change tag of fragment -

i developing simple web beowser dynamic tabs allow user add/remove them. use fragmentpageradapter , viewpager , tablayout this. if create 2 tabs (add 2 fragments list) , remove second one, work , can add fragment list. if add 2 , remove firs 1 , try add new fragment list, recieve exception: java.lang.illegalstateexception: can't change tag of fragment page{162e3786 #1 id=0x7f0d007d android:switcher:2131558525:1}: android:switcher:2131558525:1 android:switcher:2131558525:0 i think thats because each fragment has unique id inside fragmentpageradapter . 2 fragments have id's 0 , 1. if remove first item(id 0) , add new one(id 1). item id 1 exists! there way change id's programmatically or set id's when creating fragments? in advance! my fragmentpageradapter : public class pageradapter extends fragmentpageradapter { private list<page> fragments; public pageradapter(fragmentmanager fm, list<page> pages) { super(fm); this.fra

git move directory to another repository while keeping the history -

first - apologies asking question. there lot of topics already. i'm not having luck them. lack of familiarity git not help. i'm moving folder 1 git repo (which exists). e.g. repo-1 ---- dir1 ---- dir2 ---- dir3 ---- dir-to-move ---- dir5 repo-2 ---- dir1 ---- dir2 ---- dir3 in end want repos like repo-1 ---- dir1 ---- dir2 ---- dir3 ---- dir-to-move ---- dir5 repo-2 ---- dir1 ---- dir2 ---- dir3 ---- dir-to-move i.e. time dir-to-move exist in both repos. i'll migrate latest changes repo-2 , remove dir-to-move repo-1 . my initial research made me believe needed use filter-branch . e.g. how move files 1 git repo preserving history using `git format-patch`and `git am` i've since learnt subtree superseded approach. it's not doing expected. thought i'd able like in repo-1 workspace git subtree split -p dir-to-move -b split to filter split branch down dir-to-move , it's history. in repo-2 workspace git remote add repo-1 repo-1

csv - Generate a table and append it to a pdf using c#? -

i have 2 parts c# project company , company wants me generate pdf file csv. i need populate fields of pdf need add table below populated section on blank area of page (and table needs able rollover next page). i able these things separately (populate pdf , create table). cannot merge them. have tried doing doc.add(table) result in table being on next page of pdf, don't want. i need able specify table starts on page (so wouldn't overlap existing content) , stamp table onto existing pdf. my other option if doesn't work trying add fields original pdf filled table contents (so instead field-based table). any suggestions? edit: i'm new itext , have not used columntext before, i'm trying test out in following code table not being displayed. looked @ other columntext examples , have not seen columntext added pdf. //create filled form pdf pdfreader reader = new pdfreader(sourcepath); pdfstamper pdfstamper = new pdfstamper(reader, new fileoutpu

foreach - XSLT Group by using 2 different elements -

i'm new xslt. i'm trying group 2 different elements. first worker, pay code. please see amounts sum because of group paycode. below before sample xsl, sample after xsl output. before: <?xml version='1.0' encoding='utf-8'?> <file xmlns:is="java:com.workday.esb.intsys.xpath.parsedintegrationsystemfunctions" xmlns:tv="java:com.workday.esb.intsys.typedvalue"> <worker> <detail> <employeeid>0008765</employeeid> <firstname>robert</firstname> <paycode>rsvest</paycode> <amount>5572.800000</amount> </detail> <detail> <employeeid>0008765</employeeid> <firstname>robert</firstname> <paycode>fica</paycode> <amount>40.000000</amount> </detail> </worker> <worker&

office365 - Office - Export mailbox audit logs via API -

i'd extract mailbox audit logs, manual seems a procedure via powershell exists as i'm running automating via server running on linux, becomes issue. is there rest api procedure?

elixir - How to get keys (pids) of registered via Register children -

i want use registry module register dynamically created children processes. added registry supervisor tree: def init([]) children = [ supervisor(registry, [:unique, :my_registry]), supervisor(mymanager, []), # ... ] opts = [strategy: :one_for_one, name: mysupervisor] supervise(children, opts) end registration of children happens this: def start_link(%{id: id}) genserver.start_link(__module__, [], name: {:via, registry, {:my_registry, id}}) end so, questions – how keys (children pids) in registry. tried use registry.keys\2 , without success. def get_registry_pid supervisor.which_children(mysupervisor) |> enum.filter(fn {id, _, _, _} -> id == registry end) |> list.first |> elem(1) # regisry pid tuple {id, pid, type, modules} end registry.keys(:my_registry, get_registry_pid()) # returns [] # registry.lookup(:my_registry, id) # returns pid expected thanks in advance help!

Listing all constraints in Eclipse CLP in a readable form -

i have eclipse script goal encode problem set of arithmetic constraints. in repl, list of delayed goals looks follows: -(_2941{4 .. 7}) + _2900{1 .. 4} #=< 0 _2941{4 .. 7} - _2900{1 .. 4} #= 3 -(_3393{7 .. 21}) + _3352{4 .. 18} #=< 0 _3393{7 .. 21} - _3352{4 .. 18} #= 3 _3845{14 .. 17} - _3804{4 .. 7} #= 10 _4297{18 .. 21} - _4256{14 .. 17} #= 4 -(_4749{19 .. 22}) + _4708{18 .. 21} #=< 0 _4749{19 .. 22} - _4708{18 .. 21} #= 1 ... is there predicate give me similar readable list of constraints in constraint store? delayed_goals gives library-specific constraints (like prop_ic_con(ic_con(... <some special characters> etc )) rather clean output in above listing. need output file shell script, not interactive loop hides delayed goals default. the translation internal goal readable 1 performed goal- portray -transformation. output predicates printf , write_term can optionally invoke translation, e.g. ?- 3*x+6*y #> 9, delayed_g

sql - How to group this data so I can pull out specific rows from each group -

i have dataset shown below. this, want select first row each group personid s status has changed different status previous one. for example, dataset, want rows 1, 4, 7 , 11. on this? if groupby , lumps new , pending in 2 groups. personid status whenchanged 101 new 27/01/2017 15:27 101 new 27/01/2017 16:40 101 new 27/01/2017 16:40 101 pending 27/01/2017 16:40 101 pending 27/01/2017 16:40 101 pending 27/01/2017 16:40 101 new 31/01/2017 09:14 101 new 31/01/2017 10:02 101 new 31/01/2017 10:03 101 new 31/01/2017 10:05 101 pending 03/02/2017 14:29 101 pending 03/02/2017 14:29 here's go @ it...using cte. ordering off because date used in varchar format or displayed such. can convert same , work fine. declare @table table (personid int, status varchar(16), whenchanged varchar(64)) insert @table values (101,'new','27/01/2017 15:27&#

angular - Calling function 'InMemoryWebApiModule', function calls are not supported in angular2 -

Image
i making angular2 tutorial cli. when made http service(tutorial step 7), discovered 1 issue. after try ng serve: calling function 'inmomorywebapimodule', function calls not supported. webpack: failed compile. main.ts: import { platformbrowserdynamic } '@angular/platform-browser-dynamic'; import { enableprodmode } '@angular/core'; import { environment } './environments/environment'; import { appmodule } './app/app.module'; import{inmemorybackendservice, seed_data } 'angular2-in-memory-web-api' if (environment.production) { enableprodmode(); } platformbrowserdynamic().bootstrapmodule(appmodule); app.module.ts: import { ngmodule } '@angular/core'; import { browsermodule } '@angular/platform-browser'; import { formsmodule } '@angular/forms'; import { httpmodule } '@angular/http'; import { approutingmodule }

angularjs - Why float-right, float-left don't working properly? -

this snippet code. <div class="row col-xs-12"> <a *ngfor="let rec of recipe "href="#" class="list-group-item clearfix"> <div class="float-left"> <h4 class="list-group-item-heading">{{rec.name}}</h4> <p class="list-group-item-text">{{rec.description}}</p> </div> <span class="float-right"> <img [src]="rec.imagepath" alt="{{rec.name}}" class="img-responsive" style="max-height: 50px;"> </span> </a> <app-recipe-item></app-recipe-item> i wonder why float-right don't align image right side. if use insetead pull-right it's working.i have read bootstrap 4 should float rather pull. i deleted list-group-item, list-group-item-heading , list-group-item-text , worked. <a href="#" class="clearfix" *ngfor="

c# - PayPal PaymentsException: The remote server returned an error: (400) Bad Request -

i'm going sale subscribe service's users , i've trying setup paypal in asp.net webform website c# i'm getting error unknown me. wonder if code i'm wrote ok or not. code: var apicontext = configuration.getapicontext(); string payerid = userid.tostring(); if (!string.isnullorempty(payerid)) { var itemlist = new itemlist() { items = new list<item>() { new item() { name = "weekly subscribe", currency = "usd", price = "15", quantity = "1", sku = "sku" } } }; var payer = new payer() { payment_method = "paypal" }; var baseuri = "http://localhost:1067/pages/general/backfrompaypal.aspx?"; var guid = convert.tostring((new random()).next(100000)); var redirecturl = baseuri + "id=" + item.paidhistoryid; var redirurls

R - Adstock by group -

i trying create adstock effect variable (adstock defined value of previous observation + value of previous observation*adstock rate). have table abc has 2 columns: geog (a, b ,c) , grps (1 6) total of 18 observations. create variable b taking first obs of first geog , adstocking .5. when first obs of second geog, reinitialize it=to grps , again. created code works 1 geography. cannot figure out how geography. coming different statistical language, still wrapping head around way r works. can help? in advance. here code works 1 goeg: rate1=.5 rate2=0 (i in 1:nrow(abc)) { if (i ==1) abc[i,3] <- abc[i,2] else if (i == 2) #effect = impression + last week effect * decay rate abc[i,3] <- abc[i,2] + (abc[i-1,3] * rate1) else #effect = impression + last week effect * decay rate abc[i,3] <- abc[i,2] + (abc[i-1,3] * rate1) + (abc[i-2,3]*rate2) } output: geog b 1 1 2 2.5 3 4.25 4 6.125 5 8.0625 6 10.03125 b

Load C++ shared library into Matlab -

i tried load c++ shared library called g+smo matlab 2016b on linux. after compiling of g+smo got shared object file "gismo.so". i tried load library matlab command: "loadlibrary". not successful because command supports functions written in c. in order load c++ library, have write c wrapper around code or create mex -interface it. both work , not trivial. is there simple way load g+smo project matlab?

node.js - RxJS: Working on groupBy and Observable.fromEvents in NodeJS -

i'm impressed rxjs , start working on that. however, following nodejs code not work expected @ least me. let events = new eventemitter(); let source = rx.observable.fromevent( events, 'data' ); source .groupby( event => event.type ) .flatmap( group => group.reduce( ( acc, cur ) => _.merge( acc, cur ), [] ) ) .subscribe( ( data ) => { console.log( data ); } ); events.emit( 'data', { 'type': 1, msg: 'test 1' } ); events.emit( 'data', { 'type': 1, msg: 'test 2' } ); events.emit( 'data', { 'type': 2, msg: 'test 3' } ); i expect subscribe produces output as suggested others observable never completes operator requires preceding observable complete never emit anything: the groupby() operator emits instance of groupedobservable each group can subscribe it. know produces different result you'd expected maybe can work it: const rx = require('

c# - LinkedIN API call returns only half the profile values -

Image
trying add register/login linkedin feature web app. here externallogincallback method call api. public async task<actionresult> externallogincallback(string returnurl) { var logininfo = await authenticationmanager.getexternallogininfoasync(); if (logininfo == null) { return redirecttoaction("login"); } // sign in user external login provider if user has login var result = await signinmanager.externalsigninasync(logininfo, ispersistent: false); switch (result) { case signinstatus.success: return redirecttolocal(returnurl); case signinstatus.lockedout: return view("lockout"); case signinstatus.requiresverification: return redirecttoaction("sendcode", new { returnurl = returnurl, rememberme = false }); cas

eclipse - Maven proxy configuration not working -

i know there many questions on subject somehow can't work out how use maven 3.0.5 behind proxy. the settings.xml file inside .m2/ folder looks this <settings xmlns="http://maven.apache.org/settings/1.0.0" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://maven.apache.org/settings/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> <proxies> <proxy> <id>http-proxy</id> <active>true</active> <protocol>http</protocol> <host>proxyname</host> <port>8080</port> <username>domain\user</username> <password>password</password> <nonproxyhosts>127.0.0.1</nonproxyhosts> </proxy> </proxies> </settings> i added wagon-http-lighteweight-2.2.jar maven_home/lib/ext. i'm using maven inside eclipse, it's show

php - Vagrant provision command failing with bad interpret -

i new in vagrant. trying setup development environment using vagrant on windows pc. while run following command on terminal: vagrant --provision it's stuck following error : /tmp/vagrant-shell: /tmp/populate_db: /usr/bin/php^m: bad interpret please let me know feedback why getting above error. thanks in advance help. your file has carriage return encoded windows different in linux world. your solutions: run file through dos2unix script ( http://dos2unix.sourceforge.net ) most advanced editors on windows (ultraedit, notepad++) allows save format of file linux (for example ultraedit has file/convert option convert linux)

c - VB Unable to retrieve string after 3DES encryption -

initial conditions: private thekey() byte = {1, 2, 3, 4, 5, 6, 7, 8} private vector() byte = {&h7c, &h22, &h2f, &hb2, &h92, &h7d, &h82, &h8a} i proceed encrypt string: "asd" (without quotations) using: cryptostream(ms, des.createencryptor(thekey, vector), cryptostreammode.write) input: asd output: 82804ad2b295e9e3 when try encrypt same string same key/vector on http://tripledes.online-domain-tools.com/ shown below (can't post image due reputation): online 3des encryption i different result. my ultimate goal have output decrypted in c application. 2 3des encryptors giving 2 different results show stopper.. thoughts causing ? thanks in advance! a idea test crypto against other "oracle". 2 issues apparent use of online tool: the key should given hex not text (the vb code has byte array). presumably 0102030405060708 3des algorithm, vb code uses classic des - there's separate tripledescryptoserv

php - SilverStripe remove ModelAdmin search -

is there way remove search functionality modeladmin pages? for i'm using css, there should better solution. #filters-button { display: none; } we talked on irc, record let me put out here: there has been possibility overwrite public function searchform() { return false; } , therefore remove form. not effect #filters-button (3.4) or sidebar (3.0-3.3). @ time, have use css. i have created pull request implement $showsearchform work same way $showimportform . https://github.com/silverstripe/silverstripe-framework/pull/6237 https://github.com/silverstripe/silverstripe-framework/pull/6309 (re-raised pull request) this merged 3.4.2 3.5.0, once in can do: class foobaradmin extends modeladmin { private static $url_segment = 'foobar'; private static $managed_models = ['foo', 'bar']; public $showimportform = false; public $showseachform = false; # or if want disable seach foo not bar: #public $showseachf

javascript - Safari 10 on Mac not uploading file in XHR -

i'm using xhr upload image external server has cors enabled. everything works fine in chrome, firefox , ie. but using safari, server response mime type error. saying file type 'application/octet-stream' while should 'image/*'. after disabled mime type checking, safari can upload file 0b empty file. anyone knows why? var xhr = new xmlhttprequest(); xhr.open('post', 'http://up-z1.qiniu.com/', true); var formdata; formdata = new formdata(); formdata.append('key', file.name); formdata.append('token', acesstoken); formdata.append('file', file); xhr.onreadystatechange = function (response) { if (xhr.readystate == 4 && xhr.status == 200 && xhr.responsetext != "") { callback(true,null); } else if (xhr.status != 200 && xhr.responsetext) { callback(false,null); } }; xhr.send(formdata); so accor

php - Selenium Safari webdriver timeouts when trying to find an element -

i made script automate front-end testing selenium , worked great chrome webdriver. try test suites cases on other browsers , particularly in safari webdriver , timeouts while trying find , element. here testing config : "browser" => "safari", "browser_version" => "10.0", "os" => "os x", "os_version" => "sierra", "resolution" => "1024x768", the command timeouts : $this->driver->wait(15, 300)>until( webdriverexpectedcondition::visibilityofelementlocated( webdriverby::id("newdivonthepagenewpage") )); it gives me following error message: an element not located on page using given search parameters. (warning: server did not provide stacktrace information) command duration or timeout: 4.97 seconds also, url asked in get command not loaded , browser popping empty page , nothing in url bar. can guys me ? thanks in advance !

c++ - What's the difference between camShift and cvCamShift? -

the camshift function of opencv c++ interface don't have output parameter cvconnectedcomp* comp , cvbox2d* box=null. can these information if use c++ interface camshift ? can please tell me how ? thanks. c++: rotatedrect camshift(inputarray probimage, rect& window, termcriteria criteria); c: int cvcamshift(const cvarr* prob_image, cvrect window, cvtermcriteria criteria, cvconnectedcomp* comp, cvbox2d* box=null ); i don't think can retrieve connected component information; however, returns information need rotatedrect. according opencv documentation : the function implements camshift object tracking algorithm [bradski98]. first, finds object center using meanshift() , adjusts window size , finds optimal rotation. function returns rotated rectangle structure includes object position, size, , orientation. next position of search window can obtained rotatedrect::boundingrect(). rotatedrect object has following structure: class rotatedrect { public: //

mysql query going for full table scan -

update apa_pended_demand apd inner join apa_generic_demand_details agd on agd.demandid = apd.demandid set apd.genericdemandid = agd.genericdemandid apd.ispend = 1 , agd.genericdemandid != '' , agd.genericdemandid not null , apd.reactivatedate > utc_timestamp() , agd.status < 300 , apd.id between 280001 , 290000 ; the above query going full table scan.so can please me in sorting query

locking - managing lock on masssage in rabbit mq -

i'm trying use rabbitmq in more unconventional way (though @ point can pick other message queue implementation if needed) my application working , have 1 queue (i can have more if needed) mant customers fetching n messages asynchronous. after work send results client db. i have 2 problems: first dont want work on same message, second want grantee wont lose messages in case customer close browser or stop working. i looked @ documentation , saw ttl perfect me if alter message got timeout isn't going deleted move queue. can't find way alter this. moreover looked @ confirmation option in first glance looked wanted,that mechanism working this: when consumer gets message send confirmation queue, thought can delay confirm , send when work done on client side. problem can't program queue if message didnt confirm return queue (or another). i find how scheduled message didn't either because don't want message inserted queue in 5 min,i want when customer rece

c - Can't take input in a string -

in program, i'm not able input in string c[] (in add_diary() ) using fgets() or gets(), program skips input process, please tell me doing wrong. can't started. in diary important thing write , thing 'you can't write, cuz fgets() isn't working'. #include <stdio.h> #include <stdlib.h> void access(); void diary_main(char user[],char pass[]); void diary_login(); void add_diary(unsigned dd, unsigned mm, unsigned yy); void add_entry(unsigned choice); void del_entry(unsigned dd, unsigned mm, unsigned yy); void update_entry(unsigned dd, unsigned mm, unsigned yy); void logout(); void main() { access(); } void access() { char password[10],username[20], ch; int i; printf("enter user name: "); gets(username); printf("enter password (8 characters):"); for(i=0;i<8;i++) { ch = getch(); password[i] = ch; ch = '*' ; printf("%c", ch);

javascript - ng-show/ng-hide value is not changing after getting the data from firebase? -

when receiving data firebase changing scope of ng-show/ng-hide value false.but not affecting thing in view. scope value changing when clicked again have update value dynamically . please me sought out problem. thanks in advance here code <script> var app = angular.module("myapp", []); app.controller("redeemctrl", function($scope) { $scope.showdiv = true; $scope.redeemsubmit = function() { firebase.database().ref().once('value', function(snapshot) { $scope.user = snapshot.val() console.log('getting data fire base' + json.stringify($scope.user)); $scope.showdiv = false; }); } }); </script> view <div ng-controller="redeemctrl"> <div ng-show="showdiv"> <form> <div> <input ng-model="coupon" type="text"> <

VBA Excel Sheet Method doesn't work after Office updates -

i have script takes datas csv file , after generates graphic. after many office updates script has finished work. isn't possible come office version. this code: dim sheet each sheet in activeworkbook.sheets select case sheet.name case "archive": sheets(sheet.name).delete case "trend": sheets(sheet.name).delete case "pivottable": sheets(sheet.name).delete end select next i receive follow error: "application defined or object defined error". error arrives on select case, because object "sheet" hasn't method "name". i have tryed declare "sheet" worksheet dim sheet worksheet each sheet in activeworkbook.sheets select case sheet.name case "archive": sheets(sheet.name).delete case "trend": sheets(sheet.name).delete case "pivottable": sheets(sheet.name).delete

OpenGL over SSH (GLX) -

i run x server on windows 7 machine opengl 4.4. there ssh -y remote machine start opengl application. (for matters, network connection fast, have turned off compression , use arcfour,blowfish-cbc ciphers speed) glxgears runs, not smoothly. reports doing 6000+ fps though. however, matlab fails use hardware opengl rendering. read docs , mention requires opengl version 2.1. when run glxinfo in ssh terminal, tells me: glx version: 1.4 opengl version string: 1.4 (4.4.0 - build 10.18.15.4279) i don't know technical details of glx, mean opengl version supported on ssh limited 1.4? understand latest version of glx quite old, compared progress of opengl. i run x server on windows 7 machine opengl 4.4 the first problem start this. x11 server on windows program running there , going turn x11 commands win32 gdi calls. x11 not "know" opengl, that's why there's glx extension. , glx interesting beast , x11 servers windows implement basic

javascript - Data Binding with Angular2 & Inline SVG -

i have svg image, parts of change dynamically depending on responses api call. 1 aspect change colour of different elements within svg, can handle cleanly via applying different css classes. there text elements change. i have working inlining full svg image component template , picking out parts wish bind model. however, means time want edit raw svg image need copy/paste svg markup template , reapply these bindings. ideally keep svg external file, inline svg part of build process can avoid sandboxing (something can do), want dynamically apply data bindings via selector (e.g. id/class associated each svg sub-element) after svg inlined. 2 solutions i've come create directive dom manipulation associate relative elements values want set, or modify svg tags in build process post-inline add angular binding syntax here. neither option seems great me. is there way i'm missing?

iOS App is reviewed "Optimized Sharing to Messenger", but not show in Messenger app list -

our application "hellowe" has been audited "optimized sharing messenger" in facebook messenger. follow messenger development document achieve "featured" discovered in messenger's requirement, did not find application list in messenger application. why? there details did not notice? please us. thank you.

vb.net - Breakpoint won't hit on remote debug iis dll project -

Image
i have tried can think of... when attaching w3wp.exe, in modules window of vs 2015. breakpoints go red process wont stop @ points. in search solution tried put following code in dll , when not attached site waits me attach. when attaching site ignores breakpoints #if (debug) while not debugger.isattached debugger.break() end while #end if my module looks in module window. edit: changed debug code to: #if (debug) while not debugger.isattached debugger.break() end while debugger.log(1, "test", "start av invoice queue event") debugger.break() #end if and surly debugger attached... in output window "start av invoice queue event" no break in debugger please try send me in right direction. best regards lars skogshus

.net - selecting listview object in c# web browser -

i writing c# code open page , select item list view. this code: webbrowser.document.getelementbyid("x:446594328.7:mkr:list:nw:1").setattribute("selectedindex", "2"; but is not selecting items list. list like <ul id="x:446594328.7:mkr:list:nw:1" class="igdd_dropdownlist " nw="1" mkr="list"> <li class="igdd_listitem " id="x:446594328.8:adr:0" adr="0"> <a href="javascript:void(0)"></a> </li> <li class="igdd_listitem " id="x:446594328.9:adr:1" adr="1"> <a href="javascript:void(0)">xyz</a> </li> <li class="igdd_listitem " id="x:446594328.10:adr:2" adr="2"> <a href="javascript:void(0)">pqr</a> </li> </ul> in browser shows list when click down arror btn when select 1 item