Posts

Showing posts from February, 2015

machine learning - generating vector from text data for KMeans using spark -

i new spark , machine learning. trying cluster using kmeans data like 1::hi how 2::i fine, how in data, separator :: , actual text cluster second column has text data. after reading on spark official page , numerous articles have written following code not able generate vector provide input kmeans.train step. import org.apache.spark.sparkconf import org.apache.spark.sparkcontext import org.apache.spark.mllib.clustering.{kmeans, kmeansmodel} import org.apache.spark.mllib.linalg.vectors val sc = new sparkcontext("local", "test") val sqlcontext= new org.apache.spark.sql.sqlcontext(sc) import sqlcontext.implicits._ import org.apache.spark.ml.feature.{hashingtf, idf, tokenizer} val rawdata = sc.textfile("data/mllib/km.txt").map(line => line.split("::")(1)) val sentencedata = rawdata.todf("sentence") val tokenizer = new tokenizer().setinputcol("sentence").setoutputcol("words") val wordsdata = tokenizer

c++ - Integrating google protocol buffers in ns3 -

i'm using google protocol buffers in ns3 , seem getting errors: ./libns3-dev-internet-debug.so: undefined reference google::protobuf::message::checktypeandmergefrom(google::protobuf::messagelite const&)' ./libns3-dev-internet-debug.so: undefined reference to vtable google::protobuf::message' ./libns3-dev-internet-debug.so: undefined reference google::protobuf::internal::logmessage::logmessage(google::protobuf::loglevel, char const*, int)' ./libns3-dev-internet-debug.so: undefined reference to google::protobuf::message::gettypenameabi:cxx11 const' ./libns3-dev-internet-debug.so: undefined reference google::protobuf::message::initializationerrorstring[abi:cxx11]() const' ./libns3-dev-internet-debug.so: undefined reference to google::protobuf::unknownfieldset::clearfallback()' ./libns3-dev-internet-debug.so: undefined reference google::protobuf::message::spaceused() const' ./libns3-dev-internet-debug.so: undefined reference to google::protobuf::in

c# - Enable multiple BLE Characteristic notifications in UWP -

i have tried enable 2 notification in uwp application, every time first characteristic notify user. accessconfigurationcharacteristic(); configurationselectedcharacteristic = selectedcharacteristic; characteristicnotifyenableforconfig(); await task.delay(5000); accessdiagnosticcharacteristic(); diagnosticselectedcharacteristic = selectedcharacteristic; characteristicnotifyenable(); private async void characteristicnotifyenable() { try { // bt_code: must write cccd in order server send notifications. // receive them in valuechanged event handler. // note sample configures either indicate or notify, not both. var result = await diagnosticselectedcharacteristic.writeclientcharacteristicconfigurationdescriptorasync( gattclientcharacter

c++ - Implicitly deleted default constructor works in C++14 -

i doing tests code did not compile, , discovered code: struct { a(int) {}; virtual void foo() = 0; }; struct b : public virtual { virtual void bar() = 0; }; struct c : public b { c() : a(1) {} virtual void foo() override {} virtual void bar() override {} }; int main() { c c; return 0; } in c++11 fails compile (on g++ 7.0.1) ‘b::b()’ implicitly deleted because default definition ill-formed , while in c++14 compiles successfully. i've tried find out new feature of c++14 allowed work, no avail. description in cppreference not mention of sort seems. why can code compile in c++14 not in c++11? definitively it's bug in gcc 7 because when have checked out code in online compiler gcc 7+, has worked without kind of problem. so here give ide online can set favorite compiler , try tests, if want. https://godbolt.org/ sorry can't better couldn't reproduce error.

android - The json from ibm watson for conversation api does not triggering the negatives -

i trying watson conversation api on android phone. had made model on watson , completed app. works fine when giving irrelevant inputs gives 1 of intent instead of giving negative response. had created separate conversation triggering on else. when try conversation on watson works perfect, out put json phone doesn't contains 'anything else' responses every flow, watson tries recognize intent, can see level confidence every input user in 1 payload window inside project ibm developers here . or can did debugging data return in app. one idea create 1 flow conditions confidence, entities, regex, context variable or true condition. true condition flow did watson talk user if 1 intent less confidence inside condition, or according flow, return want if use conditions entities or regex. simon did 1 example conditions entities , context variables , regex , check link: simon example . and can did conditions confidence level make sure if user type correctly intents

c# - How to update selected rows in ListView -

i have listview in asp.net web form . want select rows , update selected after button click. want use checkbox/checkboxlist . don't understand how send information row or column in selected row checkbox/checkboxlist item . how can select rows, , update them , using checkbox/checkboxlist ? use asp.net linq entity framework. code <asp:button id="buttontest" runat ="server" onclick="buttontest_click" /> <asp:listview id="listview2" itemtype="doccat.models.reqinf" selectmethod="getreqf" onitemdatabound="listview2_itemdatabound" datakeynames="requestn" enableviewstate="true" runat="server" updatemethod="listview2_updateitem" deletemethod="listview2_deleteitem" insertmethod="listview2_insertitem"> <layouttemplate> <div class="outercontainer" style="overflow: scro

swift3 - Can't push from programmatically created UINavigationController -

in swift 3 project using xcode 8.3 , ios 10.3, navigation controller push. app runs navigation controller until try use push. works until last line cause app crash, fatal error: unexpectedly found nil while unwrapping optional value . don't want use storyboard, point of question how accomplish task without storyboard. app delegate code class appdelegate: uiresponder, uiapplicationdelegate { var window: uiwindow? func application(_ application: uiapplication, didfinishlaunchingwithoptions launchoptions: [uiapplicationlaunchoptionskey: any]?) -> bool { window = uiwindow(frame: uiscreen.main.bounds) window?.makekeyandvisible() window?.rootviewcontroller = uinavigationcontroller(rootviewcontroller: mainviewcontroller()) } view controller: import uikit class mainviewcontroller: uiviewcontroller { override func viewdidload() { super.viewdidload() view.backgroundcolor = .white let navcontroller = navigationco

Is it possible to read a users group membership in Microsoft Graph API? -

i using microsoft graph api log users webapp using domain email. i able read users basic profile using $token = $_session['access_token']; $graph = new graph(); $graph->setaccesstoken($token); $response = $graph->createrequest("get", "/me")->setreturntype(model\user::class)->execute(); var_dump($response); is there way can read groups? or way can instruct domain admin pass information app? you can using memberof method: https://graph.microsoft.com/v1.0/me/memberof . note you'll need 1 of following permission scopes added initial token request. directory.read.all directory.readwrite.all directory.accessasuser.all regardless of of these scopes choose, require administrative consent before regular user can authorize them. this, you'll first need have them go through “admin consent” workflow. workflow requires administrator once complete users of application have “admin consent” restricted scope. for example,

c++ - How do I clear list of pair -

i want clear adj list main function each test case. class graph { long long int v; // no. of vertices list< pair<long long int,long long int> > *adj; public: graph(long long int v); // constructor //clear previous values void clearlist(); }; void graph::clearlist() { //what should write here } well, since it's pointer list, should check existence first. , need decide if want keep object it's pointing after clear it, clear it: void graph::clearlist() { if ( adj ) { adj->clear(); } } edit : couple of side notes depending on you're doing... if number of vertices member variable v what's in list, use adj->size() that. should consider not using pointer list , using list directly avoid manual lifetime management of adj in graph. finally, constructor implies you're declaring number of vertices front, maybe container more suitable, vector?

dynamic - c# initialize expandoobject from list<T> -

i want initialize expandoobject list. internal class carkeyvalue { public carkey carkey { get; set; } public string value1 { get; set; } public string value2 { get; set; } } public enum carkey { brand = 1, model = 2, year = 3, factorylocation = 4, //more 400 key here... } var car = new list<carkeyvalue>{ new carkeyvalue {carkey = carkey.brand, value1 = "ford"}, new carkeyvalue {carkey = carkey.model, value1 = "focus",value2 = "titanium"}, new carkeyvalue {carkey = carkey.year, value1 = "1995"}, new carkeyvalue {carkey = carkey.factorylocation, value1 = "turkey",value2="bursa"}, }; dynamic expando = new expandoobject(); foreach(var item in car){ expando.[item.carkey].value1 = item.value1; //incorrect primary expression. expando.[item.carkey].value2 = item.value2; } how that? need use expando object. try use idictionary<string,dynamic> thrown

Admob Native Ad CSS Google Info Button Background Color -

Image
how can change background color of google ads info button css. have customized ad cannot change background color of google ad info button. have seen native ads have changed color, thoug delete add every part of code doesn't go anywhere how can change background color of it? have added css code , picture /* note: 1px = 1dp in css */ /* == colors == */ body { background-color: #ffffff; } .title-link { color: #000000; } .button { background-color: #9d0000; } .button-text, .button-link { color: #ffffff; } .price, .reviews { color: rgba(0,0,0,0.5); } .reviews svg { fill: rgba(0,0,0,0.7); } .url-link { color: rgba(0,0,0,0.3); } .body { color: rgba(0,0,0,0.7); } /* == fonts == */ body { font-family: "lobster"; font-weight: normal; font-size: 10px; } @media (min-height: 300px) { body { font-size: 11px; } } @media (min-width: 360px) , (min-height: 300px) { body { font-size: 12px; } } @media (min-width: 700px) , (min-height: 300px)

web scraping - Can't pull the splash image from docker -

i tried download image of splash using docker command shown below, failing error "tag latest not found in repository scrapinghub/splash" sudo docker pull scrapinghub/splash i tried pull image getting latest tag name docker website " https://hub.docker.com/r/scrapinghub/splash/tags/ " below, ended same error. sudo docker pull scrapinghub/splash:2.3.2 can please me resolve issue. using ubuntu 14.04 version. on other hand can download image " https://hub.docker.com/r/scrapinghub/splash/ " there url's in repository details page these same image trying pull?

binding - exception Dl.DL_error : undefined symbol: SDL_GetError -

so, wanted use tsdl , here's did : i couldn't find sdl 2.0.5 apt-get downloaded it, ./configure && make && sudo make install opam install tsdl then created file main.ml (given example on tsdl website ) : open tsdl open result let main () = match sdl.init sdl.init.video | error (`msg e) -> sdl.log "init error: %s" e; exit 1 | ok () -> match sdl.create_window ~w:640 ~h:480 "sdl opengl" sdl.window.opengl | error (`msg e) -> sdl.log "create window error: %s" e; exit 1 | ok w -> sdl.delay 3000l; sdl.destroy_window w; sdl.quit (); exit 0 let () = main () ocamlfind ocamlopt -package tsdl -linkpkg -o main.native main.ml it works , comes problem : ./main.native fatal error: exception dl.dl_error("./main.native: undefined symbol: sdl_geterror") did wrong or need tell explicitly sdl2 lib or else ? update : > ocamlobjinfo $(opam config var tsdl

javascript - Why my java web is like flickered every time it loads a page? -

www.mypersonalprojects.net, username: tempuser, password: tempuser above java web app address , it's username & password. question is, why flicker every time loads page? below code of login page. other pages same, bit different on main body content only. there wrong code? or css? or because of java web hoster i'm using(mochahost)?to java/spring/html/web masters out there, please tell me problem? <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <!doctype html> <html> <head> <title>login page</title> <link href='//fonts.googleapis.com/css?family=advent pro' rel='stylesheet'> <link href='//fonts.googleapis.com/css?family=orbitron' rel='stylesheet'> <link rel="stylesheet" href="${pagecontext.request.contextpath}/static/css/main.css"> </head> <body onload='document.f.username.focus();'>

Endless do while loop in C++ code? -

this question has answer here: using scanf() function 4 answers char input[256]; do{ cout<<"..."; //prompt scanf("%s",&input5); //user inputs string if(strcmp(input5,"block")==0) {} //if user types block, finishes loop , goes cout @ bottom else if(strcmp(input5,"attack")==0) { cout<<"..."<<endl; } else if(strcmp(input5,"look")==0) { cout<<"..." } else { cout<<"..."<<endl; } }while(strcmp(input5,"block")!=0); //loop ends when block typed cout<<"..."; i having issues while loop. doing project school involves text adventure kind of game. user prompting how respond attack. desired command "block", move user on

Angularjs addmore directive and scope management -

i trying create directive has addmore button. in controller have tickets obj empty. trying add new tickets (multiple) obj while clicking "add tickets". what need each ticket should increment 1. the ticket price should updated in tickets array when price updated in input box (two way binding). should able update quantity controller or directive should update in quantity input (one way binding). i have created plunker , appreciated, have spend lot of time in this. fancy solution components i forked plunker here component version. when can, recommand use of components on directives. i splitted in 2 components, that's way easier separate functionnalities. 1 components list, , other 1 item representation. tickets component it handles ng-repeat on components, add button , sum functions. app.component('tickets', { template: '<div ng-repeat="ticket in $ctrl.tickets">#{{ticket.id}}<ticket ng-change=&q

Xamarin Android: Convert PendingResult parameter to SubmitScoreResult -

i'm trying score submitted google play services games: var pendingresult=gamesclass.leaderboards.submitscoreimmediate (mgoogleapiclient,leaderboardid,score); pendingresult.setresultcallback (this); the operation succeeds , callback called: public void onresult(java.lang.object arg) { var result=arg android.gms.games.leaderboard.ileaderboardssubmitscoreresult; } however result null, "arg" contains seems valid object. how can convert arg leaderboards.submitscoreresult, object should appear here according play services games documentation? since using submitscoreimmediate , can convert use c#-style async version submitscoreimmediateasync , avoid callback/listener: var result = await gamesclass.leaderboards.submitscoreimmediateasync(mgoogleapiclient, "stackoverflow", 22747); var statuses = result.status; var scoresubmissiondata = result.scoredata;

oop - Object Oriented programming in python -

i'm trying hands @ exercises, came 1 : create class called shoppingcart. create constructor takes no arguments , sets total attribute zero, , initializes empty dict attribute named items. create method add_item requires item_name, quantity , price arguments. method should add cost of added items current value of total. should add entry items dict such key item_name , value quantity of item. create method remove_item requires similar arguments add_item. should remove items have been added shopping cart , not required. method should deduct cost of removed items current total , update items dict accordingly. if quantity of item removed exceeds current quantity of item in cart, assume entries of item removed. create method checkout takes in cash_paid , returns value of balance payment. if cash_paid not enough cover total, return "cash paid not enough". create class called shop has constructor takes no arguments , initializes attribute called quantity @ 100.

excel - Q: VBA - Format Multiple Chart Data Labels At Once? -

i wondering if can me create macro edit data labels of multiple charts @ same time. i have 9 charts on single sheet need have data labels set format "inside end". every time change data set need click on each individual chart , manually press format inside end. seeing there 200+ data sets, becomes cumbersome. there macro can this? i'm not sure 'inside end' means, should able turn on macro records, click through usual steps, , stop recorder. have code need make changes described. now, iterate through each chart object , make necessary changes. sub loopthroughcharts() 'purpose: loop through every graph in active workbook 'source: www.thespreadsheetguru.com/the-code-vault dim sht worksheet dim currentsheet worksheet dim cht chartobject application.screenupdating = false application.enableevents = false set currentsheet = activesheet each sht in activeworkbook.worksheets each cht in sht.chartobjects cht.activate 'do chart.

Why HBase Java Client is slow compared to REST/Thrift -

i running performance tests on hbase java client / thrift / rest interface. have table called “airline” has 500k rows. fetching 500k rows table through 4 different java programs. (using java client, thrift, thrift2 , rest) following performance numbers various fetch sizes. these batch size set 100000 [table shows performance numbers. times in ms][1] perf numbers i see that, there performance improvement increase fetch size in case of rest, thrift, , thrift2. but java api, seeing consistent performance, irrespective of fetch size. why fetch size not impacting in java client? here snippet of java program table table = conn.gettable(tablename.valueof("airline")); scan scan = new scan(); resultscanner scanner = table.getscanner(scan); (result[] result = scanner.next(fetchsize); result.length != 0; result = scanner.next(fetchsize)) { - process rows } can me in this. using wrong methods/classes data fetching through java client.

gradle - Android Dex Optimization and Method Count -

i have android project many library projects added module. and number of methods in project exceeds limit of android (65k). use multidex solution. didn't solve problem. and build.gradle file. android { compilesdkversion 23 buildtoolsversion "23.0.1" aaptoptions { cruncherenabled = false } defaultconfig { minsdkversion 14 targetsdkversion 23 multidexenabled = true }} first, tried add multidex.install() oncreate method in applicationcontext file. , didn't work. , applicationcontextnormal.java file here; public class applicationcontextnormal extends applicationcontext { @override public void oncreate() { multidex.install(this); super.oncreate(); } } then, tried add multidex.install() attachbasecontext method. public class applicationcontextnormal extends applicationcontext { ... @override protected void attachbasecontext(context base) { super.attachbasecontext(base); multidex.install(base); } ... an

angularjs - Firebase Functions cors -

i using firebase functions , worked intended when using ionic native http plugin ( https://ionicframework.com/docs/native/http/ ). today, decided move towards angular-http implementation, since can test code in browser too. the issue facing is, since moved away native approach , using angular way deal http, error related cors: no 'access-control-allow-origin' header present on requested resource. origin ' http://localhost:8100 ' therefore not allowed access. response had http status code 500. on serverside followed https://github.com/firebase/functions-samples/tree/master/authorized-https-endpoint , worked fine, until using angular http. my code on server looks follows: const admin = require('firebase-admin'); const cors = require('cors')({origin: true}); admin.initializeapp(functions.config().firebase); const router = new express.router(); router.use(cors); router.use(validatefirebaseidtoken); router.post('/', (req, res) =>

ionic framework - Angular 2: No provider for ConnectionBackend! How to solve? -

i following tutorial here https://tableless.com.br/criando-uma-aplicacao-movel-com-ionic-2-e-angular-2-em-dez-passos/ things dind't go expectend , got stuck in "no provider for..." error. (the tutorial in portuguese, think you'll looking @ code examples.) the code this: import { component } '@angular/core'; import { navcontroller } 'ionic-angular'; import { http } '@angular/http'; import 'rxjs/add/operator/map'; @component({ selector: 'page-home', templateurl: 'home.html' }) export class homepage { public feeds: array<string>; private url: string = "https://www.reddit.com/new.json"; constructor(public navctrl: navcontroller, public http: http) { this.http.get(this.url).map(res => res.json()) .subscribe(data => { this.feeds = data.data.children; }); } } first, error "http". (think i) solved this: @component({ selector: 'page-home

python - Faster way to print all starting indices of a substring in a string, including overlapping occurences -

i'm trying answer homework question: find occurrences of pattern in string. different occurrences of substring can overlap each other. sample 1. input: tacg gt output: explanation: pattern longer text , hence has no occurrences in text. sample 2. input: ata atata output: 0 2 explanation: pattern appears @ positions 1 , 3 (and these 2 occurrences overlap each other). sample 3. atat gatatatgcatatactt output: 1 3 9 explanation: pattern appears @ positions 1, 3, , 9 in text. the answer i'm submitting one: def all_indices(text, pattern): = text.find(pattern) while >= 0: print(i, end=' ') = text.find(pattern, + 1) if __name__ == '__main__': text = input() pattern = input() all_indices(text, pattern) however, code failing final test cases: failed case #63/64: time limit exceeded (time used: 7.98/4.00,

How can you search for files in Azure with Visual Studio Cloud Explorer? -

Image
i have azure website published, , want examine files. using vs2015's cloud explorer, have navigate find file: myazureresourcegroup app services myazurewebsite files file1 file2 .... this real pain in neck. once down "files" part, keep having hit "load more" if file doesn't appear. so given above structure, , know there file named file2 there quick way of finding in cloud explorer and/or opening it? you can use kudu navigate around azure web apps file structure. can download, edit there apart great deal more things. can go kudu 2 ways. method 01 use azure portal , navigate azure web app , in development tools section click on advanced tools , on go link. @ screenshot below, method 02 you can add scm middle of web app url , navigate kudu. example, if web site url https://mywebsite.azurewebsites.net you can change https://mywebsite . scm .az

sql server - Crystal Report ask database parameter Login C# -

Image
hello have question c# program, have make prints crystal reports in c # software problem when make printing crystal reports asks database login parameters, how can disable this? thank you below put picture of code , error code , error: errore 2 method: use setdatabaselogon function myreport.setdatabaselogon("username", "password", "server", "dbname", false); if setdatabaselogon function not working ...manually assign connection details each table in reports connectioninfo conninfo = new connectioninfo(); conninfo.servername = "driver={adaptive server enterprise};server=x.x.x.x;port=x;"; conninfo.userid = "username"; conninfo.password = "password"; tablelogoninfo tablelogoninfo = new tablelogoninfo(); tablelogoninfo.connectioninfo = conninfo; foreach(table table in reportdoc.database.tables) { table.applylogoninfo(tablelogoninfo); table.logoninfo.connectioninfo.servername =

python - How can I convert a series of integers into dates? -

i have pandas series of integers such as 151215 i want convert these integers in dates 2015-12-15 that means 15th december 2015. quick search on pandas websites suggests me use to_datetime() method. unfortunately realised if the pandas data string st = '151215' pd.to_datetime(st) then works correctly (except fact don't need time) timestamp('2015-12-15 00:00:00') but when pandas data integers st = 151215 pd.to_datetime(st) the result is timestamp('1970-01-01 00:00:00.000151215') could suggest me efficient way convert list of integers dates you can use pandas.to_datetime no need convert string first (at least in pandas 0.19): dates = pd.series([151215]*8) dates = pd.to_datetime(dates, format="%y%m%d") print(dates) 0 2015-12-15 1 2015-12-15 2 2015-12-15 3 2015-12-15 4 2015-12-15 5 2015-12-15 6 2015-12-15 7 2015-12-15 dtype: datetime64[ns] converting single value in example result in timestamp(&

Saving record in RavenDb with F# adding extra Id column -

when save new f# record, i'm getting column called id@ in ravendb document, , shows when load or view object in code; it's being converted json through f# api. here f# record type: type campaign = { mutable id : string; name : string; description : string } i'm not doing exciting save it: let save c : campaign = use session = store.opensession() session.store(c) session.savechanges() c saving new instance of record creates document id of campaigns/289 . here full value of document in ravendb: { "id@": "campaigns/289", "name": "recreating id bug", "description": "hello stackoverflow!" } now, when used same database (and document) in c#, didn't id@ value. record looks when saved in c#: { "description": "hello stackoverflow!", "name": "look worked fine", } (aside - "name" vs "name" means have 2 n

scala - SBT transitive dependency resolution conflict -

i have problem in sbt resolving transitive dependencies. the error is: java.lang.nosuchmethoderror: com.vividsolutions.jts.index.strtree.strtree.queryboundary()ljava/util/list geospark using jts2geojson https://github.com/bjornharrtell/jts2geojson/blob/master/pom.xml references jts in version 1.14 , excluded , use custom artifact replacement. called jtsplus still lives in com.vividsolutions namespace , provides additional methods, i.e. 1 missing above. the latest geotools 17 using jts in version 1.13 https://github.com/geotools/geotools/blob/master/pom.xml#l752-l754 i need replace com.vividsolution.jts geotools org.datasyslab.jtsplus offers additional required functionality how can achieve this? in maven: <dependency> <groupid>org. geotools </groupid> <artifactid> geotools </artifactid> <version>yourversion</version> <exclusions> <exclusion>

eclipse - How to run this java program that is using spark? -

first off let me start saying have no experience spark, need add logic program , test locally. believe functioning , set program in production environment. may leave out details code wise if contains confidential information. what think i've figured out need run program passing command line arguments, start program i'm @ loss. when command --verbose result: using properties file: null error: must specify primary resource (jar or python or r file) run --help usage or --verbose debug output the properties file located in src/main/resources, primary resource (assuming jar) not sure. if point step through highly appreciated, don't have time learn/study bunch on spark apologize i'm assuming rather trivial question. thank in advance help. just incase ever stumbles across thread. had run file held main class java application , give 2 params in run configurations program designed take @ start up.

python - How to pass the values from the template as an argument to the function in views? -

i want input entered user in template pass arguments function imported views.py ..this part of template. <form action="#" method="post"> {% csrf_token %} ratings: <input type="number" name="rate" step="0.1" min="1" max="5"><br> <input type="submit" value="submit" name="mybtn"> </form> this function have used import function , pass values arguments. def request_page(request): users_id = request.user.id + 671 if (request.post.get('mybtn')): updater.rate_movie(672, 6251, float(request.post['rate'])) according comments above should work: <form method="post">{% csrf_token %} ratings: <input type="number" name="rate" step="0.1" min="1" max="5"><br> <input type="submit" value="submit" name="mybtn"&

Running JMeter in Command mode is not creating any log for anything under while loop in .jmx file -

i have .jmx file 2 thread groups. first thread group data comparison (db vs api) , has jdbc request plugin sql script , saves tab delimited file. have while loop under have http request. second thread group negative scenarios validation. below structure of .jmx file -- thread group name - fx-rates -- jdbc request name - fx-sql -- while loop -- http request - fx rates - api -- thread group name - negative testing -- error codes i running jmeter in non gui mode using below command. jmeter -n -t "f:\my documents\psm\psm_automation\bin\non_gui_fx_rates_validation.jmx" -l "f:\my documents\psm\psm_automation\log\non_gui_fx_rates_validation.jtl" i see creating log each individual sampler i.e; sql , negative scenarios but not under while loop . below log created. logfile: timestamp,elapsed,label,responsecode,responsemessage,threadname,datatype,success,failuremessage,bytes,sentbytes,grpthreads,allthreads,latency,idletime,connect

Night Light option disabled in Windows 10 -

i having issues recent feature night light settings in windows 10. i not able turn on or off. windows 10 version - 1703 os build - 15063.13 go time , date settings. change timezone daylight in world. (i had 10pm in ist set timezone pst time around 11am) night shift disabled automatically. turn on , off. not turn on ever !!! problem had - shutdown laptop while night light on yesterday , when turned laptop on, nightlight on/off option faded(cant on/off, not clickable) please try solution , let me know if helps . peace guys !! version - 1703 #15063.13

javascript - Add class to link slug based off array of slugs -

i creating recipe tool takes user's input via selected checkboxes. see here: zelda.wptoolkit.us part one: have script create array of slugs based off of selected input values. when user clicks checkbox, associated slug added array called checkedattr. <script> var checkedattr = []; $('#wp-advanced-search :checkbox').change(function() { checkedattr = []; $('#wp-advanced-search :checkbox').each(function(i, item){ if($(item).is(':checked')) { checkedattr.push($(item).val()); } }); console.log("checkedattr:", checkedattr); }); </script> part two: trying use code below .addclass links contain slug found in array part one. the link structure: http://zelda.wptoolkit.us/tag/any-crab/ the code: <script type="text/javascript"> jquery(function() { jquery('#wpas-results-inner > div > div > p > a[href^="/tag/' + location.pathname.split("/") this.checkedattr[0

python - Apply multiple functions at one time to Pandas groupby object -

variations of question have been asked (see this question ) haven't found solution seem common use-case of groupby in pandas. say have dataframe lasts , group user : lasts = pd.dataframe({'user':['a','s','d','d'], 'elapsed_time':[40000,50000,60000,90000], 'running_time':[30000,20000,30000,15000], 'num_cores':[7,8,9,4]}) and have these functions want apply groupby_obj (what functions isn't important , made them up, know require multiple columns dataframe): def custom_func(group): return group.running_time.median() - group.num_cores.mean() def custom_func2(group): return max(group.elapsed_time) -min(group.running_time) i apply each of these functions separately dataframe , merge resulting dataframes, seems inefficient, inelegant, , imagine there has one-line solution. i haven't found one, although blog post (search "creat

Matlab/Parameter Dependent System/Gain scheduling H infinity Controller/Smult and Sdiag Command -

i have 2 systems , want them interconnected in series s=zpk('s') sys1=(2*s)/(s^2+2*s+1) sys2=(2*s)/(s^2+3*s+2 i want use sdiag , smult command because system parameter dependent. following error, error using inputoutputmodel/subsref (line 43) use 2 or more subscripts select or delete elements, in "sys(:,:)" command. error in islsys (line 10) sys=sys(:); error in sxtrct (line 13) if ~islsys(p), error in smult (line 65) [a,b,c,d,e]=sxtrct(s1); i dont have idea error, is can me please? best mostafa

nservicebus - How to interpret number of messages in Distributor's Storage and Control queues? -

this article tells control queues nsb master node uses control message load, though me it's still not clear how interpret disproportions in number of messages in queues: https://docs.particular.net/nservicebus/msmq/distributor/ i'm observing slowness in nsb service have never experienced slowness before. reason less parallel threads created per every master node comparing past time, , there have been no change in workers or master nodes configuration, max amount of threads allocate. i'm trying figure out if it's master node not want feed workers, or workers not want take more job. i see amount of messages in control queue jumps 15 40, while storage has 5-8. should interpret workers ready work, while distributor can't send them more messages? thanks the numbers in control , storage queue jump , down long distributor handing out messages. message coming control queue popped off queue , onto storage queue . message coming primary queue of distributo

C: unix socket -> broken pipe -

i'm trying socket working in c code instead of calling command line find. the child 3'sort' function piped child2 function 'cut' work fine, , program gets stuck in parent process waitpid() when 3 child functions included when executed. i've tried isolate childs participate on socket , when ran executable on gdb message "find: 'standard output': broken pipe" , "find: write error" here's example of 2 child functions interacting socket: child 1: void child1() { int sock; struct sockaddr_un remote; sock = socket(af_unix, sock_stream, 0) memset(&remote, 0, sizeof(struct sockaddr_un)); remote.sun_family = af_unix; strncpy(remote.sun_path, "socket", sizeof(remote.sun_path) - 1); while((connect(sock, (struct sockaddr *)&remote, (socklen_t)sizeof(remote))) == -1) { if(errno != enoent && errno != econnrefused) erro("child 2 failed connect soc

java - The path to the driver executable must be set by the webdriver.gecko.driver system property; -

i using selenium 3.3.1 , i'm testing code below. after running following error displayed: exception in thread "main" java.lang.illegalstateexception: path driver executable must set webdriver.gecko.driver system property; more information, see https://github.com/mozilla/geckodriver . latest version can downloaded https://github.com/mozilla/geckodriver/releases @ com.google.common.base.preconditions.checkstate(preconditions.java:738) @ org.openqa.selenium.remote.service.driverservice.findexecutable(driverservice.java:111) @ org.openqa.selenium.firefox.geckodriverservice.access$100(geckodriverservice.java:38) @ org.openqa.selenium.firefox.geckodriverservice$builder.finddefaultexecutable(geckodriverservice.java:112) @ org.openqa.selenium.remote.service.driverservice$builder.build(driverservice.java:302) @ org.openqa.selenium.firefox.firefoxdriver.toexecutor(firefoxdriver.java:233) @ org.openqa.selenium.firefox.fire

javascript - Filtering markers with leaflet/mapbox js -

i trying filter markers multiple dropdown menues using mapbox js , javascript. whenever select option dropdown menu of markers dissappear. filters dependent on each other. when select option dropdown should display markers in geojson matching dropdown input. data in geojson file. appreciated! js: var map = l.mapbox.map('map').setview([45.2858536, -83.8419731], 6) l.esri.basemaplayer("oceans").addto(map); l.esri.basemaplayer("oceanslabels").addto(map); // load shipwreck data external file var shipwrecks = l.mapbox.featurelayer() .loadurl('data/shipwrecks.geojson') .addto(map); $('#category_type_filter, #category_loss_filter').change(function() { var cattype = $('#category_type_filter').val(); var catloss = $('#category_loss_filter').val(); shipwrecks.setfilter(function(f) { return (cattype === 'all' || f.properties.name == cattype) && (catloss