Posts

Showing posts from January, 2010

javascript - ADAL JS - Acquire token: Token Renewal Operation failed due to timeout -

i'm working in order leverage usage of ad authentication , authorization of several applications, , i'm studying how implement said process. this web-browser web-application flow. i create authenticationcontext instance , use sign in, , functions normally. (code organization simplified demo purposes) this.adal = new authenticationcontext({ tenant: this.tenantid, clientid: this.clientid, redirecturi: this.redirecturi, callback: this.logincallback, popup: true }); this.adal.login(); it when try acquire token behaviour becomes fishy. relevant application's registry in ad has permission "sign in , read user profile" on microsoft graph api. this.adal.acquiretoken("https://graph.microsoft.com", function(error, token) { console.log(error); console.log(token); }); the error written console follows: "token renewal operation failed due timeout"; whilest token written null object. brief @ "network" t

Understanding c# class markup like SQLite -

using sqlite library, can create class like namespace myapp { [table("mydatatable")] public class mydata { [primarykey, autoincrement, column("_id")] public int id { get; set; } [unique, notnull] public guid guid { get; set; } [maxlength(256), notnull] public string name { get; set; } [notnull] public datetime created { get; set; } public int mynumber { get; set; } } } then can create database class like namespace myapp { public class sqlitedatabase { protected sqliteconnection conn; public sqlitedatabase() { } public void attach(string dbname) { conn = new sqliteconnection(dbname); } public void createtable<t>() { conn.createtable<t>(); } public int insert(object t) { return conn.insert(t); } } } t

kubernetes - Zookeeper refuses Kafka connection from an old client -

i have cluster configuration using kubernetes on gce, have pod zookeeper , other kafka; working until zookeeper crashed , restarted, , start refusing connections kafka pod: refusing session request client /10.4.4.58:52260 has seen zxid 0x1962630 the complete refusal log here: 2017-08-21 20:05:32,013 [myid:] - info [nioservercxn.factory:0.0.0.0/0.0.0.0:2181:nioservercnxnfactory@192] - accepted socket connection /10.4.4.58:52260 2017-08-21 20:05:32,013 [myid:] - warn [nioservercxn.factory:0.0.0.0/0.0.0.0:2181:zookeeperserver@882] - connection request old client /10.4.4.58:52260; dropped if server in r-o mode 2017-08-21 20:05:32,013 [myid:] - info [nioservercxn.factory:0.0.0.0/0.0.0.0:2181:zookeeperserver@901] - refusing session request client /10.4.4.58:52260 has seen zxid 0x1962630 our last zxid 0xab client must try server 2017-08-21 20:05:32,013 [myid:] - info [nioservercxn.factory:0.0.0.0/0.0.0.0:2181:nioservercnxn@1008] - closed socket connection client /10.4.4.5

oauth 2.0 - Structure of an oauth2 app -

i'd create oauth2 secured app. provide own oauth2 server called "login.mydomain.com". app accessible through "dashboard.mydomain.com". users visit dashboard.mydomain.com, redirected login.mydomain.com, give credentials , redirected dashboard.mydomain.com. on dashboard.mydomain.com user able use features provided apis. apis in plural because in specs have minimum 3 apis because services provide these apis 3 different servers different services. how can provide access_token form login.mydomain.com through dashboard.mydomain.com 1 of api check if user allowed executed requested feature? api able proof authorization access_token given or client_id , according client_secret needed in api part proof against login.mydomain.com, oauth2 service? what normal way hold user information? - first need user entity in login able proof given password user. - second need user entity in dashboard able connect data within dashboard app user. - third need user entity in a

got exception when do a loop input to database Python -

so, want input data in multiple times auto increment primary key , return primary key input result. there's code: connectdb.py import pymysql class auth: db = pymysql.connect("localhost","root","","rfid") cursor = db.cursor() def inputdata(nama): sql = "insert auth (nama) values ('%s');" % (nama) try: auth.cursor.execute(sql) auth.db.commit() result = auth.cursor.lastrowid auth.db.close() return result except: err = "error: unable fetch data" auth.db.rollback() auth.db.close() return err test.py import re import pymysql connectdb import auth while true: inputs2 = input("masukan nama: ") hasil = auth.inputdata(inputs2) print(hasil) so, when input in first time success when itry input again got error exception: traceback (most recent c

dds - OpenDDS - xorg or compiz runs out of memory on Ubuntu 16.04.1 when running 50+ publisher and subscriber -

i'm exercising opendds understand behavior. have vmware workstation ubuntu 16.04.1 (8gb ram , 30gb hard disk). run opendds examples opendds-3.11/examples/dcps/introductiontoopendds described in aaa_readme.txt , many instances of publisher , subscriber . so have created simple script publisher , subscriber start process every few seconds below, pub.sh for value in {1..250} ; ./publisher -dcpsconfigfile dds_tcp_conf.ini & sleep 30 done sub.sh for value in {1..150} ; ./subscriber -dcpsconfigfile dds_tcp_conf.ini & sleep 30 done here publisher publishes 2 topics. first started dcpsinforepo followed sub.sh , pub.sh respectively. observed xorg or compiz runs out of memory after 50th instances of either publisher or subscriber started. i tried rtps observed same. can me understand why it's eating lot of memory while running many instances? wiki

vba - Assigning new values to an unbound box in my report -

i have designed report query. it important me written out names of babies appear in specific unbounded box in report, i.e. names start "eta*" please write out "etanerella", example. when run code don't got warning, nothing being written in unbounded box. option compare database option explicit sub testing() ' defining rename baby names dim newbio string dim sqlana string dim sqlada string dim sqlcan string dim sqleta string sqlana = "alice" sqlaba = "about" sqlcan = "canibal" sqleta = "etanerella" 'newbio = left(me![tbl_patientjadas_b1.therapie1], 3) if left(reports![tbl_patientjadas_b1.therapie1], 3) "*eta*" 'me!bionew.optionvalue = sqleta elseif reports![tbl_patientjadas_b1.therapie1] "*ada*" 'me!bionew.optionvalue = sqlada elseif reports![tbl_patientjadas_b1.therapie1] "*ana*" 'me!bionew.optio

oop - Accessing a private element through an inline created object in java -

i new java , trying accessing methods , encountered not understand. code below working fine, prints 9 , not giving compilation errors. think code should give compilation error , number should inaccessible test method, since new human() instance of totally different class. can explain me happening here ? public class test{ public static void main(string[] args) { int number = 9; test("holla",new human(){ @override void test() { // todo auto-generated method stub system.out.println(number); // think line should not compile } }); } private static void test(string ,human h){ h.test(); } } human class public abstract class human { abstract void test(); } this valid (for java8 - prior that, need thje final keyword when declaring number ): you create anonymous inner class

javascript - Need some assistance with Victory Charts -

Image
i working react victory charts , need assistance styling. i new victory charts , highly accepted. i need with: padding between axis, bars , text. some text being cut off. the bar sizes. this have: <victorychart width={600} domainpadding={{ y: 50 }}> <victoryaxis // tickvalues specifies both number of ticks , // placed on axis dependentaxis style={{ ticklabels: {fontsize: 15, padding: 15 , width: 60} }} tickvalues={[1, 2, 3, 4]} tickformat={["yes", "no", "probably", "never"]} /> <victorybar horizontal offsety={20} padding={{ top: 20, bottom: 60 }} style={{ data: { fill: "rgb(23, 52, 76)" }, parent: { border: "1px solid #ccc"}, }} labels={(d) => ("| " + d.y + " (22%)")} data={data} x="quarter" y="earnings" /> </vic

Beginner Inheritance Issue C# -

this question has answer here: property not exist in current context 4 answers i'm learning c# , arrived @ inheritance part. first wrote following base class class soldier { public int _health = 0; public int id = 0; public int level = 0; public string name = "soldier"; public void identify(int h, int id, int lvl, string n) { console.writeline("health: " + h + "\nid: " + id + "\nlevel: " + lvl + "\nname: " + n); } } after of course wanted create simple subclass test out: class knight : soldier { level = 2; public void ride(string name) { console.writeline(name + " can ride mount"); } } but when run program gives me error "the name 'level' not exist in current context". i know i'm doing wrong searched up, found ca

java - notifyall() - On threads that use static synch method -

i have following code trying print threads according id 0,1,2 : reason notifyall() not working me, prints first thread , seems other keeps waiting. public class workthread extends thread { private int[] vec; private int id; private int res; static integer printnowid = 0; public workthread(int[] vec, int id) { this.vec = vec; this.id = id; } public synchronized void checkturn(int id){ while (id != printnowid){ try { wait(); } catch (interruptedexception e) { // todo auto-generated catch block e.printstacktrace(); } } } public synchronized void done(){ printnowid = printnowid + 1 ; notifyall(); } public static synchronized int p(int[] vec, int id){ int res = 0; for(int i=0;i<vec.length;i++){ vec[i] = vec[i] + 1; res = res +vec[i]; } return r

python - Import javascript files with jinja from static folder -

i need have access jinja template in javascript files (due i18n tags). way found load js file include, jinja method. {% include "file.js" %} however method files in templates folder. js files must in static folder. question is, how can change way how jinja looks files? instead of search in templates folder, in case, search in static folder. {% block javascript %} <script type="text/javascript"> {% include "myscript.js" %} </script> {% endblock %} given example directory structure looks this app/static/css/bootstrap.min.css app/static/js/bootstrap.min.js app/templates/test_page.html app/views run_server you can set flask static_url_path when create app object app = flask(__name__, static_url_path='/static') and in test_page.html can have looks this <link href="{{ url_for('static', filename='css/bootstrap.min.css') }}" rel="stylesheet"> i'm html b

java - Switch/When without break in Kotlin -

this question has answer here: “when” statement vs java “switch” statement 7 answers i'm new kotlin , want switch don't have 'break'. in java that: switch (b){ case 3: log.d("int", "3"); case 2: log.d("int", "2"); case 1: log.d("int", "1"); } and if b = 2 print: d/int: 2 d/int: 1 i want in kotlin without repeting same code each case. in kotlin convertor, code output that: when (b) { 3 -> { log.d("int", "3") log.d("int", "2") log.d("int", "1") } 2 -> { log.d("int", "2") log.d("int", "1") } 1 -> log.d("int", "1") } is there way of doing that? actual

c# - Entity Framework - Table structure, navigating many descendants, etc -

Image
so i'm rewriting dated application , trying structure things right way. have category > product > part > options basic structure, there multiple layers in each , don't know how simplify data structure, , navigate children effectively. i feel it's little complicated e-commerce, have multitude of product, part, , part options. so kicks tried see if round data top level category way down swatches different part options see if entire page display entire category/product line @ once (i know not in production). immediate problem ran including descendants in linq queries, there several require intermediary objects due columns in relational tables. that's necessary, understand, gets messy setup have potentially unlimited number of category/subcategory levels. example: iqueryable<category> categories = context.categoryhierarchies .where(w => w.parentcategoryid == null) .where(w => w.active == true) .orderby(o => o.sort) .select

python - Dictionary changed size during iteration - Code works in Py2 Not in Py3 -

i have following sample code: k_list = ['test', 'test1', 'test3'] def test(*args, **kwargs): k, value in kwargs.items(): if k in k_list: print("popping k = ", k) kwargs.pop(k, none) print("remaining kwargs:", kwargs.items()) test(test='test', test1='test1', test2='test2', test3='test3') in python 2.7.13 prints expect , still has item left in kwargs : ('popping k = ', 'test') ('popping k = ', 'test1') ('popping k = ', 'test3') ('remaining kwargs:', [('test2', 'test2')]) in python 3.6.1, however, fails: popping k = test traceback (most recent call last): file "test1.py", line 11, in <module> test(test='test', test1='test1', test2='test2', test3='test3') file "test1.py", line 5, in test k, value in kwargs.items(): runt

node.js - connect-mongo, How can I confirm it re-use my mongoose connection? -

if connect-mongo re-use mongoose connection. how can confirm that? the config: const mongostore: connectmongo.mongostore = new mongostore({ mongooseconnection: mongoose.connection }); i use db.serverstatus().connections.current check whether or not connect-mongo re-use mongoose connection. think if does, count of connection mongodb should two. (one mongo shell, 1 mongoose of server.) watch out: since use webpack -w -d , nodemon index.js , not sure whether or not create new connection mongodb when saved(the webpack incremental compilation , nodemon restart server). count of connection testing, start server, not doing saved operation ensure server create initial connection mongodb. > var status = db.serverstatus() > status.connections { "current" : 1, "available" : 5733, "totalcreated" : 2 } //current: 1 - mongo shell. start server. > status.connections { "current" : 1, "available" : 5733, "totalcreat

Rails | Cucumber | Capybara | click_button generates GET request -

i have cucumber scenario following steps: def create_admin @admin ||= factorygirl.create(:admin) end def sign_in visit '/admins/sign_in' fill_in "email", with: @admin.email fill_in "password", with: @admin.password save_and_open_page click_button "sign in" end ### given ### given /^i exist admin$/ create_admin end ### when ### when /^i sign in valid credentials$/ sign_in end ### ### /^i see sign out link$/ page.should have_link "sign out" end this test log these actions: started "/admins/sign_in" 127.0.0.1 @ 2017-08-23 11:10:14 +0200 processing devise::sessionscontroller#new html rendering devise/sessions/new.html.erb within layouts/application rendered devise/shared/_links.html.erb (1.0ms) rendered devise/sessions/new.html.erb within layouts/application (130.1ms) completed 200 ok in 361ms (views: 348.5ms | activerecord: 0.0ms) started "/admins/sign_in?admin[email]=admin%40ca.coml&

How to add multiple exists fields with OR operation in elasticsearch -

i have following query: { "query": { "exists": { "field": "field1" } } } i query modified in way add filter existing field having 'or' operation between them. any idea how so? thanks. you can use bool query should . { "query": { "bool": { "should": [{ "exists": { "field": "field1" } }, { "exists": { "field": "field2" } } ] } } } wiki

javascript - Error on run app.js file (give me an error for the var line) -

Image
i try run socket server (npm start / node app.js) , gives me error line: var http = require('http'); in char 1 (for n of var character). if delete line error continue next line same error v letter of var.. image example: when run in cmd: help please dont know do try running npm install once installed required dependencies. might able run app running node app.js . wiki

polymer 2.x - prevent paper-listbox selection change -

i got paper-listbox containing paper-checkbox contained within each paper-item of list. <paper-listbox id="groupmembers" multi attr-for-selected="label"> <template is="dom-repeat" items="[[users]]" as="member"> <paper-item label="[[member.user]]"> <span class="member-user">[[member.user]]</span> <paper-checkbox checked="[[member.ismanager]]"></paper-checkbox> </paper-item> </template> </paper-listbox> whenever checkbox clicked changes selected state of listbox items resulting in paper-item becoming selected or deselected. how can prevented? paper-listbox uses polymer.ironselectablebehavior , polymer.ironmultiselectablebehavior . so, can use selectable attribute in order prevent changing selected state. selectable css selector string. if set, items match css selector selectable

c++11 - Make a boost filtered_graph by vertex label property -

currently, have graph, keep tracking of vertices , labels means of external map . anytime need access label property, find label in map , mapped vertex . /// vertex properties struct vertexdata { std::string label; int num; }; /// edges properties struct edgedata { std::string edge_name; double edge_confidence; }; /// define boost-graph typedef boost::adjacency_list<boost::vecs, boost::vecs, boost::bidirectionals, boost::property<boost::edge_index_t , size_t , vertexdata>, boost::property<boost::edge_weight_t, double, edgedata> > graph; /// define vertexmap std::map<std::string, vertex_t> vertexmap; ///loop through vertices make vertexmap here ... vertexmap.insert(std::pair<std::string, vertex_t> (label, v)); /// find label in map , access corresponding vertex vertex_t vertex = vertexmap.find(label)->second; now question is: if want make filtered_graph current graph filtering labels, how should in

Removing Windows Phone target from Xamarin.Forms app -

Image
i trying add web service reference xamarin.forms app when noticed there no "add service reference" option available when right-clicking project's references. after digging around found apparently cannot add web service reference project targets windows phone 8. fine removing windows phone 8 app care android , ios. however, when try remove it, there doesn't seem option choose whether or not want target wp8 can see in picture: so how remove windows phone 8 app? thanks in advance. removing xamarin.xxx targets uninstalling xamarin.forms pcl , adding xamarin.android , xamarin.ios targets again seems fix problem. wiki

javascript - ng2-smart-table does not bind after delete -

i trying use ng2-smart-table show data , inline editing. seems wrong component. cloned repo , run tests locally. got basic example demo , added input data object see changes/binding in object: <ng2-smart-table [settings]="settings" [source]="data"></ng2-smart-table> <pre>{{data | json}}</pre> when "add new" row, shows new entry in object array expected. editing row works too, updating row properly. however, when delete row, object not change , keeps showing deleted row in object array not in grid. when try add row, shows new row in grid, not update/bind new value in object array. update still works expected. i post question in ng2-smart-table's github , got not answer there hope can here. so real bug? here plunker tests. thank y'all. wiki

java - Quartz scheduler not executing the SQL Query in a dropwizard application -

i've application created using dropwizard framework i've registered quartz-scheduler job scheduled run after every specified duration. job fires sql query sql server db , iterates resultset , sets data pojo class later pushed queue. the sql query has union joining multiple tables fetches data records modified in delta time using last_modified_time column of related table in clause. db jar included in pom.xml sqljdbc-4.4.0 , quartz version 2.2.1 the query looks this: select u.last_modified_date, u.account_id, u.user_id, ud.is_active user u (nolock) join user_details ud (nolock) on u.account_id = ud.account_id , u.user_id = ud.user_id u.last_modifed_date > ? , ud.last_modifed_date <= ? union select u.last_modified_date, u.account_id, u.user_id, ud.is_active user u (nolock) join user_details ud (nolock) on u.account_id = ud.account_id , u.user_id = ud.user_id join user_registration_details urd (nolock) on urd.account_

node.js - Access-Control-Allow-Origin issues even on setting it up -

my nodejs/express includes: app.use(function handleapperror(err, req, res, next) { const msg = 'error: app error: ' + util.inspect(err); // website wish allow connect res.setheader('access-control-allow-origin', '*'); console.log(msg); if (res.headerssent) { next(err); } else { res.status(500).send(msg); } }); …but on making call, still end error in chrome: xmlhttprequest cannot load http://:8080/management-api/v1/bots. response preflight request doesn't pass access control check: no 'access-control-allow-origin' header present on requested resource. origin ' http://localhost:8100 ' therefore not allowed access. you need handle options method. try this app.all("/*", function(req, res, next) { res.header("access-control-allow-origin", "*"); res.header("access-control-allow-headers", "cache-control, pragma, origin,

angular - Get value with #tag from input, when the input field might not exist -

i have ngfor loop fill table me. in table, there can tables containing more data. some of elements being filled have 1 mandatory set of input, can obtain value this: <table *ngif="boolean"> ... <tr> <td><input #textinput type=text value="{{defaultvalue}}"/></td> </tr> ... <button (click)="save1(stuff, textinput.value)">save</button> </table> however, in case have 2 set of input, , 1 or both can present. <table *ngif="boolean"> ... <tr *ngif="boolean2"> <td><input #textinput type=text value="{{defaultvalue}}"/></td> </tr> <tr *ngif="boolean3"> <td><input #secondtextinput type=text value="{{defaultvalue}}"/></td> </tr> ... <button (click)="save2(stuff, textinput.value, secondtextinput.value)">save</button

amazon web services - AWS API GATEWAY - Import and export APIs with Swagger template -

it's been couple of weeks i've been fighting aws api gateway. i've working version of our apis client certificate , custom lambda authorizer in api gateway console. i trying export swagger file import within same aws account different api, imported api doesn't work. all endpoints working in "resources" panel functionality "test" when try deploy stage, doesn't work. both swagger import , export work ok, , deploying stage runs without problems calling api returns {"message": null} i've tried many times swagger or swagger + api extensions template, both json or yaml still fails when calling apis. someone knows if need steps in order export , import template? i found solution. if want use custom authorizer in api gateway, need define manually "execution role arn" ( need create new 1 or using existing ). actually, if leave field blank, using auto generation function swagger not able create automatical

json - JavaScript object assignment -

how result? {"obj1": { "title": "title", "data": [1,2,3] }, "obj2": { "title": "title", "data": [4,5,6] }, "obj3": { "title": "title", "data": [7,8,9] }} var obj = {title:'title'} var newobj = {}; newobj.obj1 = obj; newobj.obj2 = obj; newobj.obj3 = obj; newobj.obj1.data = []; newobj.obj1.data = [1,2,3]; newobj.obj2.data = []; newobj.obj2.data = [4,5,6]; newobj.obj3.data = []; newobj.obj3.data = [7,8,9]; console.log(json.stringify(newobj)) you're assigning obj newobj 's properties. wouldn't assign new object properties means they're referencing obj . , when it's referenced, whenever make changes reference, other places referenced changes. what need make copy of obj , assign newobj 's proerties. ... syntax in {}

xml - Why can't I specify TestAdaptersPaths in my runsettings file? -

i'm working on getting nunit tests running pre-deploy azure built application run tests: https://github.com/edlichtman/helloazureci when run on own pc works correctly, 3 unit tests pass , 1 fails (as expect should happen, i'm testing environment appsettings) however when deploy azure error: invalid settings 'runconfiguration'. unexpected xmlelement: 'testadapterpaths'. i automated creation of .runsettings file in powershell ensure direct path (d:\home\etc...) initialized testadapterspaths test see if couldn't find testadapterspaths path specifying it's still getting error. i'm using exact spelling , tree structure microsoft's guide .runsettings, why not working? wiki

c - MPI Scatter/Gather scope of variables -

i'm dealing mpi version of bml automaton mpi_scatter() won't work expected. read here collective communication functions every process needs copy of array, allocated space without initialization. in code there subgrid local_grid every process manipulates, , starting big grid root manipulate. mean use scatter-gather communication mpi datatype. allocate space grid , sub-grid every one, , initialize grid root. wrong? unsigned char*** local_grid; unsigned char** grid; mpi_status stat; mpi_datatype rowtype; mpi_init(&argc, &argv); mpi_comm_rank(mpi_comm_world, &rank); mpi_comm_size(mpi_comm_world, &nproc); local_n = n / nproc; mpi_type_contiguous(n + 2, /* count */ mpi_unsigned_char, /* oldtype */ &rowtype /* newtype */ ); mpi_type_commit(&rowtype); /* allocate space 3d local grids*/ lo

haskell - How to generate arbitrary two argument function with QuickCheck? -

i trying test implementation of zipwith using quickcheck. implementation, myzipwith , quickcheck test comparing standard function. like: main = quickcheck (prop_myzipwith :: (int -> int -> int) -> [int] -> [int] -> bool) prop_myzipwith :: (a -> b -> c) -> [a] -> [b] -> bool prop_myzipwith f x y = (myzipwith x y) == (zipwith f x y) this not work because (int -> int -> int) not instance of arbitrary . with single-argument functions 1 can around using test.quickcheck.function 's fun (which instantiates arbitrary ). example: main = quickcheck (prop_mymap :: fun int int -> [int] -> bool) prop_mymap :: fun b -> [a] -> bool prop_mymap (fun _ f) l = (mymap f l) == (map f l) i trying similar except generating two -argument arbitrary functions. how can generate arbitrary instances of 2 argument functions quickcheck testing of higher-order functions such zipwith ? wiki

In C, Migrate memory to a NUMA node -

i developing numa application , need migrate big arrays node (the node created) node. i can't use numa_alloc_onnode() function because need have shared memory between process allocates memory , child. the situation following: i have array (which dimension equal number of numa nodes) of (big) node* array, node* typedef of struct: node** overall_trees; i-th node* array have in i-th numa node. what have done is: overall_trees[i] = mmap(null,(1+number_of_nodes)*sizeof(node), prot_read | prot_write, map_shared | map_anonymous, -1, 0); numa_move_pages(0, (int) (1+number_of_nodes)*sizeof(node) / page_size, &overall_trees[i], &i, &status, mpol_mf_move); but numa_move_pages() returns -1. actually first time in dealing numa allocation , maybe trying totally wrong. if different solution possible, feel free expose it. thank you wiki

excel - Mathmatically adding arrays in PowerShell -

i have 2 arrays need add (along later subtract , multiply). first labeled $agrp , contains data being pulled range in excel sheet. have $bgrp pulling range same excel sheet. add them mathematically. far, can them combine new array (now double size). suggestions? if want treat arrays independently, can use this: $egrp = new-object system.collections.arraylist ($i=0; $i -lt $agrp.count; $i++){ $egrp += $agrp[$i] + $bgrp[$i] } although don't because it's not "powershell". here's suggest if need extracted directly csv: $egrp = new-object system.collections.arraylist import-csv $csv_path | %{[int]$_.agrp + [int]$_.bgrp} | %{$egrp += $_} note $_.agrp , $_.bgrp represent names of columns of csv (in first line). $csv_path string path or file object of csv. wiki

linux - MySQL won't start with innodb_log_file_size set -

i'm running mysql 5.5.57 on debian 3.16.43-2 inside of vmware machine. i need set innodb_log_file_size >= 256mb setting in my.cnf mysql don't start anymore. i've tried delete ib_logfile0 + 1 files before starting stated other posts doesn't help. what can next? best mario wiki

visual studio 2015 - After Decompilng exe with JetBrains dotPeek and Exporting as a C# Project, all Variablse are, "already defined" -

i'm trying decompile simple .exe jetbrains dotpeek , re-build it. i've far decompiled it, , exported .csproj, when opened in visual studio 2015, variables error: the type 'mainwindow' contains definition 'winmain' it appears issue between .xaml form markup , .xaml.cs code. what's meaning of conflict? there practical way resolve them? wiki

php - How to solve the html parser error on Joomla site? -

hy people, migrated site new server , getting error whenever go front page. http://144.130.57.197/monashhealthnew/beta.monashhealth.org/en/ here error getting , have no clue it: parser = xml_parser_create($encoding); xml_set_object($this->parser, &$this); xml_parser_set_option($this->parser, xml_option_case_folding, 0); xml_parser_set_option($this->parser, xml_option_skip_white, 1); xml_parser_set_option($this->parser, xml_option_target_encoding, 'utf-8'); xml_set_element_handler($this->parser, "start_element", "stop_element"); xml_set_character_data_handler($this->parser, "char_data"); } function force_to_array() { ($i = 0; $i < func_num_args(); $i++) { $this->force_to_array[] = func_get_arg($i); } } /* parse xml data, storing in instance variable; returns false if data cannot parsed. */ function parse($data) { $this->tree = array(); if (!xml_parse($this->parser, $data, 1)) { $this->error = "x

Converting hex char string to unicode string (python) -

this question has answer here: displaying unicode characters using python 2 answers i have string of unicode ordinals (in hex form) so: \u063a\u064a\u0646\u064a\u0627 it's unicode repsentation of arabic string غينيا (gotten of arabic lorem ipsum generator). i want convert unicode hex string غينيا . tried print u'%s' % "\u063a\u064a\u0646\u064a\u0627" (pointed out here ) returns hex format, not symbols. print word.replace("\u","\\u") doesn't job either. do? i'm not entirely sure question want, i'll cover both cases can see. case 1: want output arabic string code, using unicode literal syntax. in case, should prefix string literal u , you'll right rain: s = u"\u063a\u064a\u0646\u064a\u0627" print(s) this same as print u'%s' % s except shorter. in case, formatting oth

C: Pointer to an array of structs inside a struct within a function -

i pretty new c. created struct , array of structs store data , passed each of them functions: int dosomething(struct s1 *struct1, struct s2 *struct2); struct s1 { int a; int b; int c; }; struct s2 { double x; double y; double z; }; int main() { int n = 200; struct s1 s1; struct s2 *s2 = malloc(n * sizeof(struct s2)); dosomething(&s1, &s2[0]) return 0; } int dosomething(struct s1 *s1, struct s2 *s2) { s1->a = 1; s1->b = 2; s1->c = 3; s2[0].x = 1.1; s2[1].x = 1.123233; ... return 1; } this got pretty annoying on time, decided put them together. doing this struct s1 { int a; int b; int c; struct s2 *s2; }; struct s2 { double x; double y; double z; }; int main() { int n = 200; struct s1 s1; struct s2 *s2 = malloc(n * sizeof(struct s2)); s1.s2 = s2; dosomething(&s1) return 0; } int dosomething(struct s1 *s1) { s1->a

2D array issues in Google Scripts / Javascript -

i have code retrieves data google sheet. loop through data dates equal today's date only. want put values sheet. i'm not understanding how 2d arrays work... below have far. know loop find today's entries working. not sure i'm doing wrong though. appreciated. n variable returns correct number of rows should in array. however, row , column count not correct. sheet i'm reading data has 4 columns. need 3 of them though. var ss = spreadsheetapp.getactive(); var sheet = ss.getsheetbyname('edit info'); var rows = sheet.getdatarange(); var values = rows.getvalues(); logger.log(values.length) logger.log(values[0].length) var todayvalues = []; var todvalues = ""; var rowvalues = []; var today = new date(); var dd = today.getdate(); var mm = today.getmonth()+1; //january 0! var yyyy = today.getfullyear(); if(dd<10) { dd = '0'+dd } if(mm<10) { mm = '0'+mm } today = mm + "/" + dd + "/" + yyyy; logger.log(

virtualization - docker container / image not saving changes -

i pulled mysql docker(latest) & after running trying commit container after adding data & new schema's & tables in mysql docker instance. for reference following link -> http://www.servermom.org/pull-docker-images-run-docker-containers/3225/ but after trying multiple variations not achieving intend to. doing after adding new tables , schema container committing & pushing docker hub mentioned in link. after deleting deleting 1st pulled image have added new data container , committed new image different tag .. deleting 1st pulled image. (the reason doing because lets if changing machine can data intact when docker pull of committed image) just git if commit & push , lets machine broke down in new machine have git pull , without loss. not able understand how why docker not saving changes data mysql image stored in volume. means files inside volume not part of image, stored on host , assigned 1 or more running containers. to achieve want se

javascript - Disable back button to home page after logout -

in below code calling logoutfunction(), after click it's going index.html page but, again it's coming home page after clicking button page home.html <div role="main" class="ui-content"> <h3 class="ui-title">are sure want logout?</h3> <a href="#" class="ui-btn ui-corner-all ui-shadow ui-btn-inline ui-btn-b" data-rel="back">cancel</a> <a href="#index" onclick="logoutfunction()" class="ui-btn ui-corner-all ui-shadow ui-btn-inline ui-btn-b" data-iconpos="notext" data-direction="reverse">logout</a> </div> <script> function logoutfunction() { localstorage.login="false"; window.location.href = "index.html"; } </script> index.html below code wrote on index page it's not working <script type=

java - How to properly set up Lombok in Android Studio 3.0 -

i know doing wrong in lombok setup android studio 3.0 beta 2? that's how gradle build file looks like: buildscript { repositories { mavencentral() jcenter() maven { url "https://plugins.gradle.org/m2/" } } dependencies { classpath "io.franzbecker:gradle-lombok:1.10" classpath 'com.android.tools.build:gradle:2.3.3' } } allprojects { apply plugin: "eclipse" apply plugin: "idea" version = '1.0' ext { appname = "myappname" gdxversion = '1.7.0' } repositories { mavencentral() maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } maven { url "https://oss.sonatype.org/content/repositories/releases/" } } } project(":desktop") { apply plugin: "java" dependencies { compile project(":core") co

maven - Sonar refuses to analize multimodule project -

i have upgraded sonar 5.3 6.2 , project x giving me weird errors @ sonar stage of jenkins job (altough build finishes stable). the project standard multimodule maven java project. entering project dashboard single message appears on screen: "no analysis has been performed since creation. available section configuration." but in upper-right corner red "failed" tag shows up. leads background tasks of project , there failed task error log: the project "com.foo:bar-submodule-1" defined in sonarqube not module of project "com.foo:bar". if want stop directly analysing project "com.foo:bar-submodule-1", please first delete sonarqube , relaunch analysis of project "com.foo:bar" i not want delete project , lose historical data. so question is: how can add project y (that submodule of project x sonar not recognize it) submodule of project x? edit 1 the parent project 1 has been analyzed through je

python - Machine Learning directions -

i have few questions regarding machine learning problem. i have dataset (of 10000 data points) else. dataset consists of survey responses on product concepts, done across different demographic groups, geographical regions , time frames. respondents asked opinions on product concepts (so products not in market yet), , responses recorded numerical variables. there @ least 1 missing value in each row in dataset because dataset encapsulates many different surveys, each of 1 product concept. there no predetermined target variable. i asked come machine learning model based on dataset. i've tried out supervised learning (regression , classification) feel still not right, since there no target variable (so kind of randomly took 1 variable in dataset target variable). unsupervised learning clustering sounds plausible, have no idea can achieve that. in short, i'm lost regards sort of predictive model(s) can build such dataset. i've talked person regression/classification mo

excel - macro to select range depending on text -

i trying create macro read cells in column b , when finds inside cell string "inbound total" , after rows in cell(on same column though-> b column) string "outbound total" select rows exist between rows these 2 cells, containing these strings, belong to. so, lets macro runs , finds first string in cell b22 , second string in cell b56, want select rows 23 55, me able work content. also, want able find specific pair of strings many times exists inside work sheet. if first string exists in b22 cell , second string in b55 sheet, want select rows 23 55, , right code perform actions in them, , move on find if same strings exist other rows , again select in between rows me work on! ideas ?? appreciated! wiki

database - Gridview filter dropdownlist -

so have vs 2015 project taking data oracle database, displaying gridview . gridview table large, , want filter (not sort) data via dropdownlist (ddl) outside of gridview . (i.e. table 1500 entries, 15 columns, 1 column (spec) has 4 possible values of (en098, sa974, as0900, vx8762). user selects 1 of these values dropdown list (i.e. en098), table of 1500 entries displays (i.e. 670)that have en098 in spec column). i have tried binding datasource (orclsrc) ddl link ddl via statement (where spec = control [in gui] control = dropdownlist1.selected ) gridview (the gridview linked orclsrc), using wizard on gui side. upon running website, blank dropdownlist , no gridview . i have followed tutorials , previous questions on this, solutions have not assisted in own problem. declaring dropdownlist1 = param1; , setting control=param1 solved problem wiki

spring boot - ImapIdleChannelAdapter: error occurred in idle task -

i following exception in spring boot 1.4.3 based application. uses spring integration 4.3.6. the imap-server ms-exchange. any idea that's coming from? aug 22 14:46:42 2017-08-22 14:46:42.631 warn 537 --- [ask-scheduler-1] o.s.i.mail.imapidlechanneladapter : error occurred in idle task aug 22 14:46:42 javax.mail.folderclosedexception: * bye javamail exception: java.io.ioexception: connection dropped server? aug 22 14:46:42 @ com.sun.mail.imap.imapfolder.handleidle(imapfolder.java:3199) aug 22 14:46:42 @ com.sun.mail.imap.imapfolder.idle(imapfolder.java:3043) aug 22 14:46:42 @ com.sun.mail.imap.imapfolder.idle(imapfolder.java:2995) aug 22 14:46:42 @ org.springframework.integration.mail.imapmailreceiver.waitfornewmessages(imapmailreceiver.java:175) aug 22 14:46:42 @ org.springframework.integration.mail.imapidlechanneladapter$idletask.run(imapidlechanneladapter.java:271) aug 22 14:46:42 @ org.springframework.integration.mail.imapidlechanneladapter$receivingtask.run(im