Posts

Showing posts from August, 2015

selenium - how to verify view is scrollable in mobile application (Automation) -

anyone knows automation script verify view (homepage/browse) scrollable or not. can use scrollto(id) @ bottom of page. not correct method do, test case passes if element present in 1st page basically cannot. try cast view scrollview class custom view can implement scroll.

Python - TypeError: float() argument must be a string or a number, not 'list -

python newbie here. trying operate on lists contain floating point numbers. avg list parameter returned different method. however, when tried doing following, throws me error float() should have string or number , not list. avg1 should contain copy of lists float-type numbers instead of lists right? tried few edits read on other posts similar titles, couldn't solve this. starting out kindly tell me going wrong. def movingavg(ema,avg): ema=[] avg1 = [float(i) in avg] ema[:3] = avg1[:3] i,j in zip(ema[2:],avg1[3:]): =float(i)*0.67 + float(j)*0.33 ema.append(a) return ema the error follows : avg1 = [float(i) in avg] typeerror: float() argument must string or number, not 'list' using python 3.4 please check return type of avg think it's return type list's of list.

I want to find maximum number in sql server i have values with string part and integer part -

i have values sp-1 , sp-2 , sp-3 ..... sp-10 , sp-11 . i have maximum number here in sql server select max(substring(supplementid,4,10)) max_num supreg when execute code maximum number 9. try: select max(cast(substring(supplementid,4,10) int)) max_num supreg or select max(cast(replace(supplementid,'sp-','') int)) max_num supreg

jquery - Bootstrap select with values and option to create new value -

i want select field predefined options database , allow user either select predefined options or create new value if suitable value not in list. i'm using bootstrap 3 and creating select field using ajax like /* * select product attributes on change of product type */ $("#producttypes").on('change',function() { var id = $(this).val(); $("#product_attributes").html(''); if (id) { var datastring = 'id='+ id; $.ajax({ datatype:'json', type: "post", url: '/products/ajax-get-product-attribute-types' , data: datastring, cache: false, success: function(data) { var = 0; $.each(data, function(key, value) { var message = '<div class="form-group">' + '<label>'+value['title']+'</label>

reactjs - updated nested Immutable in immutable.js -

how can update nested immutable map item without mutatiling whole tree ? example : var tree = map({ branch1:map([]), branch2:map({ 1: map({id:1,value:'hello'}) }), }); how can update tree.branch2.1.value ? will cause branch1 new copy ? i'm using in reactjs redux app. since i'm using selectors, want change value of branch2 without changin branch1 also, selectors wonnt recalculate again changing values in immutable.js object always return new object instead of mutating it. that's whole point of library. if worried unnecessary re-renders based on other aspects of state changing, should use shouldcomponentupdate lifecycle method ensure components update when value of part of app state changes, , not when new object. for case, make sense use setin method immutable maps. tree.setin(['branch2', 1, 'value'], 'newvalue');

Count of objects in JSON (UWP C#) -

i writing app windows 10. i have using woocommerce.net plugin download data worspress site. i download this. restapi rest = new restapi("http://simplegames.com.ua/wp-json/wc/v1/", "ck_9d64c027d2c5f81b8bed3342eeccc6d337be813d", "cs_60697b1e6cbdeb8d62d19e0765e339f8e3334754"); wcobject wc = new wcobject(rest); //get products var orders = await wc.getorders(); var products = orders[0].line_items; { "id": 1897, "parent_id": 0, "status": "processing", "order_key": "wc_order_57cec87491975", "currency": "uah", "version": "2.6.4", "prices_include_tax": false, "date_created": "2016-09-06t13:45:24", "date_modified": "2016-09-06t13:45:24", "customer_id": 0, "discount_total": 0.00, "discount_tax": 0.00, "shipping_total&q

sql server - substring in sqlserver with casual format -

i have these rows 14-l-100-10008-g03s-n 1-dr-100-20057-g48-n 2-cl-100-12133-b12-p 2-fg-100-12202-b01-n 2-g-100-15520-b48-n 2-gm-100-10024-b01-n 2-hc-100-10022-g03s-n 2-hc-100-10023-g03s-n 2-hc-100-20023-g03s-n 32-g-100-15518-f03p2-n 32-g-100-15518-f03p2-n i need these parts .how can these parts using sql server code : result:g03s,g48,b12,b01,b48,b12 , ... you can below: ;with cte ( select '14-l-100-10008-g03s-n' val union select '1-dr-100-20057-g48-n' val union select '2-cl-100-12133-b12-p' val union select '2-fg-100-12202-b01-n' val union select '2-g-100-15520-b48-n' val union select '2-gm-100-10024-b01-n' val union select '2-hc-100-10022-g03s-n' val union select '2-hc-100-10023-g03s-n' val union select '2-hc-100-20023-g03s-n' val union select '32-g-100-15518-f03p2-n' val union select '32-g-100-15518-f03p2-n' ) select reverse(substring(reverse(val), charindex('-', rev

c# - Error Cannot register assembly ClassA.Dll -

i have 2 class libraries classa , classb. classb referenced on classa. built cliassa take dll bin register on gac using gacutil.exe , runs fine. have changes classa make changes try built classa again compiler error. error cannot register assembly classa.dll. not load file or assembly 'classb, version=1.0.0.0, culture=neutral, publickeytoken="" or 1 of dependencies. system cannot find file specified. both class libraries stronglynamed different .snk both lib have com visible true both on .net 4.5 c# things tried , didn't work: unregister classa gac using gacutil.exe /u unload both libraries reload , re built. restart vs, run under admin. restart system. the thing tht works create new class library classc, copy on code classa classc , remove classa. can built 1 time ..if try rebuilt again same error. i can continue doing copy paste every single line of code change. i tried tht conceptually wrong wat doing unable figure out. surely version issu

datatables - csrf token missing in django ajax post request working using get request -

i working metronic datatables in have file ajax function works. problem when use type in ajax function "get" works in post not work , gives csrf token missing error in console, in case of not give error, using django framework site , ajax function :- "ajax": { // define ajax settings "url": document.url, // ajax url "type": "post", // request type "timeout": 20000, "data": function(data) { // add request parameters before submit $.each(ajaxparams, function(key, value) { data[key] = value; }); metronic.blockui({ message: tableoptions.loadingmessage, target: tablecontainer, overlaycolor: 'none', cenrery: true, boxed: true }); }, } urls.py file : from django.conf.urls import url . import views urlpatterns = [ url(r'^$', views.index, name='index'), url(r

android - How to get all edittext data from listview -

my listview have 19 rows , need edittext data listview , store arraylist. btn.setonclicklistener(new view.onclicklistener() { @override public void onclick(view view) { int itemcount = mlistview.getcount(); log.d("count", ""+itemcount); final arraylist<string> collection = new arraylist<>(); for(int i=0; i<itemcount; i++){ view1 = mlistview.getchildat(i); log.d("position: ", ""+view1); edittext tt = (edittext)view1.findviewbyid(r.id.etqty); value = tt.gettext().tostring(); collection.add(value); } //int position = contractstoreadapter.getitem(); log.d("number", string.valueof(collection)); } }); here error. 09-07 08:09:05.526 8669-8669/com.example.chintatt.cbi e/androidruntime: fatal exception: main

c# - How to get Geometry points using Geo API (Sharpmap) -

i have epsg:4326 wgs 84 shapefile , i've converted sql spatial data i'm able render map using sharpmap 1.1(previously using sharpmap 0.9). what i'm trying achieve when click on generated polygon, clicked polygon must filled color (for identification purpose) i'm able point click how use point , query point inside polygon can color point might result in coloring polygon. the problem don't know how in sharpmap version 1.1. previously when using sharpmap 0.9 used below line points color whole of polygon. pointarray.collection.add(sharpmap.geometries.linearring.geomfromwkb((byte[])row["the_geom"])); my data sql spatial db hence row["the_geom"]. so far i've done this.(which highlights point , need add points geo api collection) collection<geoapi.geometries.igeometry> geomcoll = new collection<geoapi.geometries.igeometry>(); geoapi.geometryserviceprovider.instance = new nettopologysuite.ntsgeometryservice

checkout - How I can enable "PayPal Pro" in my account? -

i have business account of paypal. store have implemented "paypal pro" option payment. so same need enable "paypal pro" in account , need below mentioned details : api username api password api signature i have tested paypal sandbox account there option enable pro in front of each account. but want change mode live , want use main account "pro" credentials in website users can make payment through "paypal pro". so please suggest same. in advance. there certificate issues. have asked paypal support , generated new certificate. , started working.

Sending Push notification using Pushetta in Java results in 403 Forbidden -

i'm referring java example http://api.pushetta.com/pushetta-docs/ i pass correct channel , token (api key), i'm getting response code : 403 response message : forbidden can please advise? thanks. this code i'm using: public class pushnotification { // settings public static string channel = "recognition"; public static string token = "e9897f1ce470f302bdfc8c8167ff489fb0c0fc19"; public static void sendnotification(string message) { string url = "http://api.pushetta.com/api/pushes/" + channel + "/"; try { url obj = new url(url); httpurlconnection con = (httpurlconnection) obj.openconnection(); // set reuqest header con.setrequestmethod("post"); con.setrequestproperty("host", "api.pushetta.com"); con.setrequestproperty("user-agent", "chrome"); con.setrequestproperty("authorization", token);

wordpress move to localhost missing css -

i'm trying move wordpress/buddypress web site local pc. i created virtual host exact same host name, copy code , db. it works every time change c:\windows\system32\drivers\etc\hosts file see live original site, chrome miss-behave , stuck. so tried change site domain on local pc - search&replace code & db export site domain local domain (e.g. mydomain.com -> mydomainlocal.com), , reinstall db. the site running seems missing stuff - design stuff, e.g. css different, , logo display site name instead of logo. it seems new domain name triggers different configuration of site, or different theme. can please explain how move wordpress site localy local domain name? i read posts issue , seems doing right, don't understand why site looks different if changed reference both in code , db. i'd suggest problem lies fact you've performed search , replace on database. wordpress serializes data , running search , replace on you'll have change

elasticsearch - Filtering Elaticsearch query on existence of a nested field -

i'm trying write elasticsearch query return elements have nested field. however, i'm apparently having deal of difficulty it. mapping field looks follows: { "mytype": { "properties": { "hello": { "type": "nested", "properties": { "foo": {"type": "string", "index": "not_analyzed"}, "bar": {"type": "string", "index": "not_analyzed"}, } } } } } my query follows: { "query": { "filtered": { "filter": { "exists": { "field": "hello.foo" } } } } } this query returns 0 matching documents though know there matching documents. i

Redis for Windows script debugger gets stuck -

performing simple test debug lua script, redis-cli gets stuck , not accept input. way of ending session doing ctrl+c c:>cd "\program files\redis" c:\program files\redis>echo return argv[1] + argv[2] > test.lua c:\program files\redis>redis-cli --ldb --eval test.lua , 2 3 lua debugging session started, please use: quit -- end session. restart -- restart script in debug mode again. -- show lua script debugging commands. from point application not accept input. i using latest release (3.2.100) https://github.com/msopentech . do need special make debugging work in redis windows? not sure if problem debugging because redis-server.exe or redis-cli.exe , since not have linux machine @ hand. update i can confirm can debug script using redis-cli.exe in windows, connecting redis instance in linux. problem seems redis-server.exe .

python - efficient loop over numpy array -

versions of question have been asked have not found satisfactory answer. problem : given large numpy vector, find indices of vector elements duplicated (a variation of comparison tolerance). so problem ~o(n^2) , memory bound (at least current algorithm point of view). wonder why whatever tried python 100x or more slower equivalent c code. import numpy np n = 10000 vect = np.arange(float(n)) vect[n/2] = 1 vect[n/4] = 1 dupl = [] print("init done") counter = 0 in range(n): j in range(i+1, n): if vect[i] == vect[j]: dupl.append(j) counter += 1 print("counter =", counter) print(dupl) # simplicity, code ignores repeated indices # can trimmed later. ref output # counter = 3 # [2500, 5000, 5000] i tried using numpy iterators worse (~ x4-5) http://docs.scipy.org/doc/numpy/reference/arrays.nditer.html using n=10,000 i'm getting 0.1 sec in c, 12 sec in python (code above), 40 sec in python using np.nditer, 50 sec in pyth

algorithm - How can I efficiently compare a list of objects' fields and display in JSF -

i have list of quite detailed objects compare: list<myobject> objectstocompare; in objects there many fields object, string, int, list, etc. i need present user table representation of these objects , fields using jsf this: field object1 object2 object3... equal name fred john george... no age 26 26 26... yes here's have planned far jsf page: <p:panelgrid > <f:facet name="header"> <p:row> <p:column>field</p:column> <ui:repeat var="loopobject" value="#{compareobjectsbean.objectsforcomparison}"> <p:column><h:outputtext value="#{loopobject.id}" /></p:column> </ui:repeat> <p:column>all objects equal</p:column> </p:row> </f:facet> <p:row>

jersey - Exception in thread "main" java.lang.IncompatibleClassChangeError: Implementing class in Zeppelin -

i getting following error when starting zeepelin server.i using phoenix-core:4.4 hbase 1.1.2. zeppelin using jersey 1.13 version. i took care of dependency conflicts. exception in thread "main" java.lang.incompatibleclasschangeerror: implementing class @ java.lang.classloader.defineclass1(native method) @ java.lang.classloader.defineclass(classloader.java:763) @ java.security.secureclassloader.defineclass(secureclassloader.java:142) @ java.net.urlclassloader.defineclass(urlclassloader.java:467) @ java.net.urlclassloader.access$100(urlclassloader.java:73) @ java.net.urlclassloader$1.run(urlclassloader.java:368) @ java.net.urlclassloader$1.run(urlclassloader.java:362) @ java.security.accesscontroller.doprivileged(native method) @ java.net.urlclassloader.findclass(urlclassloader.java:361) @ java.lang.classloader.loadclass(classloader.java:424) @ sun.misc.launcher$appclassloader.loadclass(launcher.java:331) @ java.lang.class

sql - Regex pattern inside REPLACE function -

select replace('abctemplate1', 'template\d+', ''); select replace('abc_xyztemplate21', 'template\d+', ''); i trying remove part template followed n digits string. result should be abc abc_xyz however replace not able read regex. using sqlserver 2008. doing wrong here? suggestions? select substring('abctemplate1', 1, charindex('template','abctemplate1')-1) or select substring('abc_xyztemplate21',1,patindex('%template[0-9]%','abc_xyztemplate21')-1) more generally, select substring(column_name,1,patindex('%template[0-9]%',column_name)-1) sometable patindex('%template[0-9]%',column_name) > 0 you can use substring charindex or patindex if pattern being looked fixed.

c# - Search a string in visual studio including ressource files and showing usages of localized strings containing the searched element -

Image
i want know if way exists (or extension) searching string in visual studio return places localized string containing searched pattern used. for instance, have 2 messages in ressource file (.resx) <data name="msg_001" xml:space="preserve"> <value>please enter person's name</value> </data> <data name="msg_002" xml:space="preserve"> <value>please indicate company's name</value> </data> and somewhere in c# code var name = "georges"; i able search word "name" , have in results line above (as usual) every usages of msg_001 , msg_002 since replacing string containing word "name" ctrl + shift + f search in every place within solution for instance, dialog see: there can specify parameters might use find stuff in files. can use regular expressions if want. results going shown in new result console screen there cool (paid) ext

ruby on rails - Why can't the post method in my Rspec test find the create action/route for my PostsController? -

hi have rspec test: require "rails_helper" describe postscontroller let(:user){create(:user)} describe "post #create" "creates post" expect {post :create, post: attributes_for(:post)}.to change(post, :count).by 1 end end end that throwing following error: actioncontroller::urlgenerationerror: no route matches {:action=>"create", :controller=>"posts", :post=>{:content=>"this post content!"}} which means can't find route right? instead of passing :create first argument post have tried, passing route helper user_posts_path(user) <--- (this route posts create action), pretty same error. here attempt: "creates post" expect {post user_posts_path(user), post: attributes_for(:post)}.to change(post, :count).by 1 end which throws error: actioncontroller::urlgenerationerror: no route matches {:action=>"/users/1/posts&q

hadoop - Hive 'limit' in subquery executes after full query -

i’m testing rather taxing rlike function in hive query. figured i’d test against subset first before applying tb+ of data. full query is: create table proxy_parsed_clean select a.*, case when domainname rlike '.*:443$' 1 else 0 end used_https proxy_parsed a; since there's data, wrote query (ostensibly) operate against subset: select case when a.domainname rlike '.*:443$' 1 else 0 end used_https (select domainname proxy_parsed limit 10) a; however, seems take just long first query. rather applying outer query subset, seems apply case statement entire dataset , then limit. running explain confirmed suspicions ( notice limit clause moved end of query ): > explain select case when a.domainname rlike '.*:443$' 1 else 0 end (select domainname proxy_parsed limit 10) a; +---------------------------------------------------------------------------------------------------------------------+--+ |

javascript - Ember.js: how can I find all bindings for a component without knowing the model and properties -

how can find bindings given component @ runtime. in example below, attribute name ('value') , bound model property ('model.firstname') either route or controller. example: html <script type="text/x-handlebars" data-template-name="index"> <x-input label="name" value={{model.firstname}}></x-input> </script> js var app = ember.application.create({}); app.person = ember.object.extend({ firstname: null, lastname: null, fullname: ember.computed('firstname', 'lastname', function() { return (this.get('firstname') + ' ' + this.get('lastname')).trim(); }) }); app.indexroute = ember.route.extend({ person: null, model: function () { if(!this.person) { this.person = app.person.create({ firstname: '', lastname: '' }) } return this.person; }, actions: {} }); i trying use webcomponents , not ember compo

Javascript Google Maps Api, multiple markers with links, only geoceder -

i've got problems put links on multiple markers, can show markers on map, when try tu put link on them, have same link on markers, last. here provide sample code: <div id="map" style="height: 400px; width:100%;"></div> <script> var markers = [{"name":"vasto","url":"http://www.google.com"},{"name":"chieti","url":"http://www.wikipedia.com"}]; var geocoder; var map; var latlng; var url; console.log(markers); function initmap() { latlng = {lat: 42.2872297, lng: 13.3403448}; map = new google.maps.map(document.getelementbyid('map'), {zoom: 8, center: latlng}); geocoder = new google.maps.geocoder(); setmarkers(); } function setmarkers() { var marker, i, url; for( = 0; < markers.length; i++ ) { url = markers[i].url; geocoder.geocode({'addres

clang++ - Clangs SanitizerCoverage with shared libraries -

i having trouble in using sancov tool of clang shared libraries. while works documented simple binary not able work shared libraries. whenever use shared library program *.sancov file when try report sancov receive following error message: ignoring libmylib.so , coverage because __sanitizer_cov* functions not found. it seems problem stems fact the sanitizer functions unresolved in shared library. not sure though. nm libmylib.so | grep saniti u __sanitizer_cov u __sanitizer_cov_module_init u __sanitizer_cov_with_check can give me hint doing wrong?

css - Center content in responsive bootstrap navbar -

i'm having trouble centering content in bootstrap navbar. i'm using bootstrap 3. i've read many posts, css or methods used not work code! i'm frustrated, last option. appreciated! <!doctype html> <html> <head> <title>navigation</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- bootstrap --> <link href="css/bootstrap.min.css" rel="stylesheet" media="screen"> <link href="css/style.css" rel="stylesheet" media="screen"> </head> <body> <div class="container"> <nav class="navbar navbar-default" role="navigation"> <!-- brand , toggle grouped better mobile display --> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggl

tin can api - How can an LMS add context to a Tin Can Statement? -

i looking @ using tin-can (xapi) on our lms. want know, how can add information known platform tin-can statements. e.g. want add course / class information in context area of statement. cannot directly in content, same piece of content maybe used in different courses / classes. how done? from purely xapi standpoint wouldn't because statement producer should doing it. caveats: unless consider lms statement producer in case use proxy requests lrs , manipulate statement in route. note invalidate signed statements, not doing yet. , require proxy resources, , pay particular attention statement writing requests. if control authoring of content have make requests lms directly retrieve additional information content should consider including in statements. naturally option outside scope of xapi directly, , non-standard. this particular notion has been taken cmi5 group , part of specification considered production ready. in cmi5 lms provides document in state api re

c# - Sending Ajax request to controller implicitly in Asp.Net -

i have form lot of inputs: <input type="text" id="somename1" name="somename1" /> <input type="text" id="somename2" name="somename2" /> etc... all these inputs part of viewmodel: public class myviewmodel { public string somename1 { get; set; } public string somename2 { get; set; } //etc... } i need refresh inputs without refreshing whole page, need use ajax request. problem need explicitly define viewmodel in javascript , send via jquery.ajax , this: var viewmodel = { somename1: $("#somename1").val(), //etc... } var request = $.ajax({ url: '@url.action("updateaction", "somecontroller")', type: "post", cache: false, data: viewmodel, datatype: "json" }) request.done(function (data) { $("#somename1").val(data.somename1); //etc... }) so, there lot of copy

python - Craft raw wifi packet -

i'd craft single wifi packets, getting raw binary data before converted waveform , transmitted. understand it, should @ data link layer, , include headers (sync bits, crc, etc) , data itself. there way (preferably python)? i've looked scapy, wireshark, etc can't tell if or how can me need. you can dump packet via monitor mode. example, code sniffing data packets mon0 interface: from scapy.all import * def handler(pkt): if pkt.haslayer(dot11): if pkt.type == 2: pkt.show() sniff(iface="mon0", prn=handler)

how to say "If the formula in this named range returns an error, then the value is one, else zero" in Excel -

Image
hi guys ask simple question,how "if formula in named range returns error, value one, else zero" in excel? thinking "if (a1:a200 returns error, 1, 0). i attach screenshot guys see trying do, cells in red ones contains error. thanks guys, appreciated. you can use sumproduct , iserr (or iserror , see note below on difference between these) functions. count number of errors in range: =sumproduct(--iserr(a1:a200)) then, wrap in if , like: =if(sumproduct(--iserr(a1:a200))>0,1,0) here explanation of how functions work. note : iserr counts errors except #n/a . if want count #n/a , use iserror function instead of iserr .

MySQL year 2038 Pr‌o‌b‌l‌e‌m -

i trying install mysql on linux machine fails install , throws following error 'this mysql server doesn't support dates later 2038' what can possibly solve problem or should wait oracle patch problem? nasty. depends on column used for. you store date/times in iso standard string format yyyy-mm-ddthh:mm:ss.ssssssssz, convert comparison purposes in code using 64 bit long long. hopefully year 9999 enough? :-) storing datestamps canonical strings supports comparison, indexing, have own validation.

javascript - multiple rows, different heights - equalize each row (JS) -

i have different rows 4 divs in it. have @ following snippet: <div class="w-row"> <div class="w-col w-col-3"> <!-- lets assume image has height of 30px --> <img src="myimage.png"> </div> <div class="w-col w-col-3"> <!-- lets assume image has height of 40px --> <img src="myimage.png"> </div> <div class="w-col w-col-3"> <!-- lets assume image has height of 20px --> <img src="myimage.png"> </div> <div class="w-col w-col-3"> <!-- lets assume image has height of 60px --> <img src="myimage.png"> </div> </div> <div class="w-row"> <div class="w-col w-col-3"> <!-- lets assume image has height of 20px --> <img src="myimage.png">

Asp.net C# Many-to-Many Relations EF ApplicationUser -

i admittedly on deep water , although have been looking looking through numerous 'similar' posts, cant seem figure 1 out. i trying establish connection "company model" , applicationuser. company holds many au , au's can hold many companies. although when create company , select different users selectlist (which checked, pass au-id. warning: i'm rookie , had troubles figuring out following guides , not - there might obvious mistakes. model company: public company() { this.users = new list<applicationuser>(); } public int id { get; set; } public string name { get; set; } public string address { get; set; } public string zip { get; set; } public string city { get; set; } public string cvr { get; set; } public string telephone { get; set; } public string email { get; set; } public string website { get; set; } public string billingemail { get; set; } [foreignkey("userid")]

javascript - Send data from child component to parent component in react js -

i have dropdown menu using semantic-ui css framework . want select item on drowdown menu , know item selected. can know selected , set state in child component cannot send parent component. sent using callback function happened loop , exceed memory while setting parent's state. followed this way that. my parent component "sorguview" , child component "dropdownitem" thanks helps. sorgu class: export class sorgu { _id:string; username:string; anasorgu:string; aciklama:string; sname:string; constructor(id:string, username:string, anasorgu:string, aciklama:string, sname:string) { this._id = id; this.username = username; this.anasorgu = anasorgu; this.aciklama = aciklama; this.sname=sname; } } interface sorguprops: export interface sorguprops { sorgu:sorgu; } interface sorguprops: export interface sorgustates { sorgulist:array<sorgu>; selectedname:string; } d

c# - How to reference System.DirectoryServices assemblies using Visual Studio Code? -

i reference system.directoryservices in asp.net web application. follow tutorial on active directories ( https://msdn.microsoft.com/en-us/library/ms180890(v=vs.90).aspx ) having issue adding reference system.directoryservices.dll. think should adding project.json various issues adding dependency appropriate location. project.json follows. { "usersecretsid": "aspnet-formsauthad-b19f2b08-0c89-4f46-af20-dc7b20b2226d", "dependencies": { "microsoft.netcore.app": { "version": "1.0.0", "type": "platform" }, "microsoft.aspnetcore.authentication.cookies": "1.0.0", "microsoft.aspnetcore.diagnostics": "1.0.0", "microsoft.aspnetcore.diagnostics.entityframeworkcore": "1.0.0", "microsoft.aspnetcore.identity.entityframeworkcore": "1.0.0", "microsoft.aspnetcore.mvc": "1.0.0"

python - Delete spaces from items in a list -

this question has answer here: delete space values in list 3 answers i have list: input_list = ["1.2.3.4", " 2.3.4.5", " 3.4.5.6"] and i'd remove space in second e third words... how can do? i tried with: for x in input_list: x.strip(" ") and with: for x in input_list: x.replace(" ","") your_list = [element.strip() element in your_list]

hadoop - Hive results differs from MySql result. Join query on Hive returns unexpected result or OK results -

i have join query (that joins 4 table) on mysql returns 2 rows while on hive returns ok results. checked table individually on hive , mysql side. records on each table on both side matches results join query differs. not case other join query. i have checked directory tables fine. the ok results comes specially when there no records on either of table or no directory available table. not case. is ok results on hive issue. below part of result: stage-stage-6: map: 2 reduce: 1 cumulative cpu: 22.22 sec maprfs read: 0 maprfs write: 0 success stage-stage-7: map: 2 reduce: 1 cumulative cpu: 24.94 sec maprfs read: 0 maprfs write: 0 success stage-stage-8: map: 2 reduce: 1 cumulative cpu: 22.25 sec maprfs read: 0 maprfs write: 0 success total mapreduce cpu time spent: 2 minutes 36 seconds 110 msec ok time taken: 411.225 seconds hive> yes. based on reported behavior, can deduce there difference between what's implemented on mysql, , what's i