Posts

Showing posts from August, 2010

ios - Firebase Database indexPath -

i'm trying retrieve data firebase using function i'm not getting data: func retrievevideos(_ completionblock: @escaping (_ success: bool, _ error: error?) -> ()) { let usermessagesref = dataservice.instance.ref_artistarts.child(auth.auth().currentuser!.uid) usermessagesref.observe(.childadded, with: { [weak self] (snapshot) in if let snapshot = snapshot.children.allobjects as? [datasnapshot] { print("snapshot: (snapshot.count)") = 12 } guard let strongself = self else {return} guard let dictionary = snapshot.value as? [string: anyobject] else { completionblock(false, nil) return } var arts = [art?]() if let art = artviewmodelcontroller.parse(dictionary) { arts.append(art) print(arts.count) = 1 } strongself.viewmodels = artviewmodelcontroller.initviewmodels(arts) completionblock(true, nil) }) { (error: e...

excel - Using VBA to scrape data -

i trying pull price data tropical veggie ($5) code below using vba h2 class="ng-binding" meat lovers/h2 h3 class="ng-biding" ng-show="canshowprice"$9.00/h3 h2 class="ng-binding"tropical veggie/h2 h3 class="ng-biding" ng-show="canshowprice"$5.00/h3 here code dim tropicalveggie string tropicalveggie = ie.document.getelementsbyclassname("ng-binding")(0).innertext i think part of problem there multiple class names "ng-binding". have no idea

java - Why does this sequence generator not create a database table in Spring Boot? -

@entity @table(name = "addition_type") public class additiontype { @id @sequencegenerator(name = "addition_type_id_seq", sequencename = "addition_type_id_seq", allocationsize = 1) @generatedvalue(strategy = generationtype.auto, generator = "addition_type_id_seq") @column(name = "id") private int id; @column(name = "code") private string code; @column(name = "name") private string name; @column(name = "sinhala_name") private string sinhalaname; @column(name = "report_name") private string reportname; @column(name = "status") private int status; @manytoone @joincolumn(referencedcolumnname = "id") private companyinfo companyinfo; // there not show getter , setter } when use class in spring, 2 database tables generated: additiontype table entity, , addition_type_id_seq table corresponding seq...

Issue with labeled arguments in OCaml -

this line of ocaml: let c ~f = f() in let () = c (fun () -> ()) in () leads following error on c (fun () -> ()) expression: file "tst.ml", line 1, characters 27-43: error: expression has type f:(unit -> (unit -> unit) -> 'a) -> 'a expression expected of type unit without ~ , there no error. there no error if explicitly label argument c ~f:(fun -> ()) . how labeling messing things up? here's happening, believe. you're trying use following special case functions labeled parameters: as special case, if function has known arity, arguments unlabeled, , number matches number of non-optional parameters, labels ignored , non-optional parameters matched in definition order. optional arguments defaulted. (section 6.7.1 of ocaml manual.) but in definition, c doesn't have known arity. because f can return function, , hence c can return function. since special case doesn't apply, compiler has assume...

css - how do I select .class-a:nth-child only when it also has class .class-b -

i have grid of images. within grid have albums. albums displayed single image (images-album-cover) until expanded, after entire album displayed among rest of images (images-album-images). both images-album-cover , images-album-image have class images-image-col. images-image-col class of rest of non-album images. i've added border (with div, not actual border) bottom of each album image indicate images part of album. i need able few things: select each images-album-cover or images-album-image on left side of grid. select each images-album-cover or images-album-image on right side of grid. select each images-album-image last image in album. so far have been able select left images , right images when grid has non-album images, i'm @ loss of how handle albums when need it. not unable select nth-child when matches class, when grid has albums in @ nth-child stops working no albums though i'm trying target images (images-image-col) heres fiddle of working (on...

angularjs - When I hit Tab key on tags-input the value I set gets disappear -

i use various kind of templates in document. reason have define , set tabindex manually below: javascript: scope.keydown = $(document).on("keydown", function (e) { if ((e.keycode || e.which) == 9) { scope.tab_index_dptag = scope.tab_index_dptag + 1; console.log("scope.tab_index_dptag: " + scope.tab_index_dptag); if (scope.tab_index_dptag == scope.dptabindex) { console.log("active element(befor): ", document.activeelement.tabindex); if ($('[dp-tabindex=' + (scope.tab_index_dptag - 1) + ']')) { $('[dp-tabindex=' + (scope.tab_index_dptag - 1) + '] div div tags-input div div input').blur(); }; $('[dp-tabindex=' + scope.tab_index_dptag + '] div div tags-input div div input').attr("tabindex", scope.tab_index_dptag); console.log("active element(when assigned): ", document.activeelement.tabindex); $timeo...

ffmpeg - avconv on debian jessie throws error when trying to convert raw video to mp4 -

i trying convert raw video captured using logitech usb cam(yuyv) mp4 using avconv. have tried below so: avconv -i out.raw -c copy output.mp4 avconv -i out.raw -vcodec copy -acodec copy output.mp4 but error shown below. root@beaglebone:~/bbb_cv/bonecv# avconv -i out.raw -c copy output.mp4 avconv version 11.9-6:11.9-1~deb8u1, copyright (c) 2000-2017 libav developersbuilt on apr 23 2017 23:00:54 gcc 4.9.2 (debian 4.9.2-10) out.raw: invalid data found when processing input i have checked here , did not find relevant examples above purpose. edit: added more details-- i tried doing below adding infile options suggested: root@beaglebone:~/bbb_cv/bonecv# avconv -s 640x480 -framerate 30 -pix_fmt yuyv422 -f rawvideo -i out.raw -c copy output.mp4 this got me rid of previous error , new ones popped shown below. root@beaglebone:~/bbb_cv/bonecv# avconv -s 640x480 -framerate 30 -pix_fmt yuyv422 -f rawvideo -i out.raw -c copy output.mp4 avconv version 11.9-6:11.9-1~deb8u1, copyri...

linux - realtek ethernet driver compilation failed with error "realtek: disagrees about version of symbol module_layout" -

i compiling ethernet realtek driver explicitly debug prints enabled.i able compile module, not able insert module. i have info here: output of uname -r: root@vkalyanam-lenovo-b41-80:~/realtek# uname -r 4.11.0 realtek ethernet sources: root@vkalyanam-lenovo-b41-80:~/realtek# ls cscope.out icmp icmp2_recev logs_kernel makefile out realtek.c tags upon make, realtek.ko module has created, not able load it. surprisingly, figured out makefile picking wrong sources while compiling. requirement compile against current running kernel. pwd: root@vkalyanam-lenovo-b41-80:~/realtek# pwd /home/vkalyanam/realtek makefile: root@vkalyanam-lenovo-b41-80:~/realtek# cat makefile kernel_src := /lib/modules/$(shell uname -r)/build obj-m := realtek.o all: make -c $(kernel_src) m=$(pwd) modules clean: make -c $(kernel_src) m=$(pwd) clean driver compilation: root@vkalyanam-lenovo-b41-80:~/realtek# make make -c /...

c++ - Setup nana with CMake in CLion -

i been trying setup nana cmake in clion don't know how setup cmake load nana . i make try use nana cmake given here cant find way make function, or maybe dont know how use cmake library don't have cmake search function. i'd try this dont have knowledge make work. i installed latest versions of cmake , clion , tested nana, , nana-demo. way fixed issues, not see serios problems. until now, rechecked question , see pointed old , outdated: https://github.com/cnjinhao/nana-demo/blob/master/cmakelists.txt , not "official" nana-demo: https://github.com/qpcr4vir/nana-demo/blob/master/cmakelists.txt (we update old version too, in case) please test nana latest hotfix branch: https://github.com/cnjinhao/nana/tree/hotfix-1.5.5 and corrresponding nana-demo: https://github.com/qpcr4vir/nana-demo/tree/hotfix-1.5 which latest actualizations. here have find_library.

?Chrome on Windows 10 and mousewheel: smoothscroll enabled results in ~1.25 change per wheel click -

i'm trying track down issue mousewheel scrolling in chrome on windows 10. on 1 page, if smooth scrolling enabled, each tick of mouse wheel results in 1.25px change in scroll, , doesn't go fast if move wheel considerably in small amount of time. if disable smooth scrolling (via chrome://flags), each tick 125 pixels. i haven't been able find location in chrome source delta determined based on smooth-scrolling setting, , wondering if else knows , might have insight chrome doing based on smooth-scrolling setting. really weird. thx! the answer posted @ how disable smooth scrolling in chrome ben mosher. snippet answer addresses this: function wheeled(event) { event.preventdefault() container.scrolltop += event.deltay container.scrollleft += event.deltax } container.addeventlistener('wheel', wheeled, { passive: false, capture: true }) // actual render code in `scrolled` handler because // there other wheel events in code adjust scroll pos...

c++ - Empty response from post request to https url -

i trying response server using post method, works if server has http address. if try response similar server has https url, empty response. when check logs server, see request did not reach server @ all. using sockets connect server. not sure going wrong. appreciated. here code: #include <iostream> #include <winsock2.h> #include <winsock.h> #include <ws2tcpip.h> #include <iphlpapi.h> #include "httprequest.h" #include <windows.h> // following code in main() // code connect server (port used 443) return succesfully. socket socket = connecttoserver(strip); // returns me size of request int iresult = send(socket , request.tostring().c_str(), requestlength - isent, 0 ); // returns me 0 https server url // tried msg_waitall\0 results same char buffer[10054]; iresult = recv(socket , buffer, 10054, msg_waitall); // returns 0 indicating no error. int err = wsagetlasterror();

python - No module named googlesamples.assistant.auth_helpers -

i'm receiving error when trying install google assistant , , using windows 10 , python 3.6 , sdk 0.3.3 . please recommend next step? i've tried inputting in string recommended on other sites, ends --scope https://googleapis.com... did not work. easy fix hard find. need make sure settings there mentioned before. completed above actions, , set administrator , input 3 commands: pip install --upgrade google-api-python-client pip install --upgrade google-auth-oauthlib[tool] google-oauthlib-tool --client-secrets path/to/client_secret_xxxxx.json --scope https://www.googleapis.com/auth/assistant-sdk-prototype --save --headless success!

vba - Task Reminder to non-delegate -

i developing task reminder in access alert concerning employees critical due tasks. i have table details due dates , want set task specific employees specific records. i can set task outlook. there way may set task other user's outlook? i want accomplish without setting delegates or shared folders. dim outlookapp outlook.application dim outlooktask outlook.taskitem dim mydelegate outlook.recipient set outlookapp = createobject("outlook.application") set outlooktask = outlookapp.createitem(oltaskitem) outlooktaskoutlooktask.to = me.text33 .subject = "contract expiry in month of:" & space(2) &forms!frmrem!empname.value .body = "employeename:" & space(2) & forms!frmrem!empname.value .reminderset = true .duedate = me.doj .remindertime = me.doj - 30 & " 8:00 am" .reminderplaysound = true .save end msgbox "...

java - Why sin function in programming language returning strange sin value unlike calculators -

Image
i familiar value of sin in calculator when calculate in either java program or google.i getting strange value below please let me know how works , if want calculator sin function in java program? the reason you're getting different results because calculator giving sin of 27.5 degrees , whereas google giving sin of 27.5 radians (which equivalent 1576 degrees). to same result you'll either have change calculator deg mode rad mode, or convince google work in degrees somehow. as java program, care on site, java's built-in math.sin , math.cos work in radians. if wan't use degrees, you'll have convert them radian form. can either use math.toradians : math.cos(math.toradians(27.5)) or, can use actual math: math.sin(27.5 * math.pi / 180);

linux - permision denied when change gpu clock rate in TX1 -

i have nvidia tx1 development kit i've installed ubuntu 16.04 using jetpack-l4t-3.1-linux-x64.run (in full installation mode) on it. installation procedure based on following link: " http://docs.nvidia.com/jetpack-l4t/2_1/content/developertools/mobile/jetpack/jetpack_l4t/2.0/jetpack_l4t_install.htm " i wanted test gpu performance our application since clock set minimum value 76800000 hz. can't enough performance out of it. i've read in link: " changing gpu clock rate on linux system (nvidia jetson tx1) " change value of gpu clock rate, permission denied happens linux! there hope changing clock speed of gpu on board ? it worth mentioning instead of having path changing clock rate /sys/kernel/debug/clock/override.gbus/rate have path: /sys/kernel/debug/clk/override.gbus/clk_rate so can see don't have clock folder or rate file ! can see different options gpu clock rate in file: /sys/kernel/debug/clk/gbus/clk_possible_rates thanks ...

Python How to declare each line in file as a variable -

i trying seperate each line of file , create new file content. this content of data.txt 210ct 201707001 michael_tan 0 17.5 210ct 201707001 michael_tan 0 20.0 210ct 201707001 michael_tan 70.0 35.0 210ct 201707002 jasmine_tang 0 20.5 210ct 201707002 jasmine_tang 0 30.0 210ct 201707002 jasmine_tang 80.0 38.5 this code attempt i'm stuck don't know next. open(home + "\\desktop\\pads assignment\\student's mark.txt", "w") c: open(home + "\\desktop\\pads assignment\\data.txt", "r") d: line in d: module, stdid , atdname , totalmark , mark = line.strip().split() i want student's mark.txt content (the order of number must in output) 210ct 201707001 michael_tan 70.0 17.5 20.0 35.0 210ct 201707002 jasmine_tang 80.0 20.5 30.0 38.6 is possible this? note: please feel free change code want long content correct my solution first save records ordered dictionary when process whole file save...

Dynamic Image resizing for firebase storage -

is there efficient method serve dynamic size images stored in firebase storage through changing query parameter in image url? or imgix? efficient method? i recommend try cloud functions firebase storage resizing using imagemagick writing cloud storage trigger cloud functions firebase sample code generate thumbnail

google app engine - Does Firebase's lack of region support have a significant impact on app performance? -

firebase doesn't support regions. understanding is based in central google cloud region. if serving app in london, in turn calls google cloud function, in turn calls google app engine, in turn calls database, i'm under impression involve circuitous routing. for example: 1) web application served in london (cdn) -> 2) firebase database (us central) -> 3) google app engine (us central) -> 4) database request (london, uk) -> 5) written firebase database (us central) -> 6) served web application (london, uk). with ~30,000km of cabling travel through, general impact on performance / lag sufficient affect app performance? i recommend using firebase performance monitoring gain insights, run run load tests, or simulations make better call. https://firebase.google.com/docs/perf-mon/

validation - How to verify if variable contains valid filename in Windows Batch -

i'm asking user provide filename in windows batch, using command: set /p my_filename=enter filename project how can verify %my_filename% contains valid windows filename (not path) , re ask user if not? edit file in question not yet exists when running script (it created script) @echo off setlocal enableextensions disabledelayedexpansion :askfile rem retrieve filename. on empty input ask again set /p "my_file=enter filename project: " || goto :askfile rem use delayed expansion avoid problems special characters setlocal enabledelayedexpansion rem disable delimiters , end of line characters in command /f delims^=^ eol^= %%a in ("!my_file!") ( rem cancel delayed expansion avoid ! removal during expansion endlocal rem until checked, don't have valid file set "my_file=" rem check don't have path, not folder , file exists if /i "%%~a"==...

xamarin.android - running WCF service on background -

i using xamarin android android application development. have wcf post services in activity, when click button wcf post service should run on background service of android app. service should continuously working evenafter go other activities , layouts. can me resolve issue. thanks in advance,

asp.net - Errors after upgrading to netcoreapp2.0 -

i upgraded asp.net core solution netcoreapp1.1 netcoreapp2.0: i used upgrade guide installed new sdk upgraded vs2017 15.3.1 removed old nuget packages, , replaced them new metapackage cleaned solution, manually deleted bin , obj directories, , rebuilt i tried tips found such as: removed packagetargetfallback / assettargetfallback not necessary ensured csproj don't have runtimeframeworkversion / netstandardimplicitpackageversion tried , without global.json in solution root { "sdk": { "version": "2.0.0" } } deleted .vs directory in solution root cleared nuget package cache (tools-options-nuget-clear), , restored however lots of errors this: the type 'object' defined in assembly not referenced. must add reference assembly 'netstandard, version=2.0.0.0, culture=neutral, publickeytoken=cc7b13ffcd2ddd51'. what more must do? turns out had directory.build.props file in solution root, had common...

entity framework 4 - How to avoid login with an empty password field in ASP.NET MVC 5? -

i'm working on asp.net mvc 5 project have created customized login , registration page. application working fine, problem able login when password field empty. here code controller(i used namespaces , reference correctly) public class usercontroller : controller { // // get: /register/ public actionresult index() { return view(); } [httpget] public actionresult login() { return view(); } [httppost] public actionresult login(models.register userr) { if (isvalid(userr.email_id, userr.password)) { formsauthentication.setauthcookie(userr.email_id, false); return redirecttoaction("index", "home"); } else { modelstate.addmodelerror("", "login details wrong."); } return view(userr); } [httpget] public actionresult register() { return view(); } [httppos...

mysql - Querying DB Continuously for Update - java -

i have query fetch name , id of companies. able fetch companies issue id of companies. have combo box display list of companies , label displays id of company selected in combo box. here issue, when change selected company in combo box, label showing id still remains displays id of initial company selected. there way continuously query database update id? ps display companies in combo box reference no. public assigncompanies() { initcomponents(); conn = dbconnection.connectdb(); findcompanyid(); } public void findcompanyid() { string sql = "select * company id = "+findselectedcompany.getselecteditem(); try { statement stmt = conn.createstatement(); resultset rs = stmt.executequery(sql); while(rs.next()) { string getselectedcompany = rs.getstring("reference number"); ...

c++ - Count the digits -

here's question: take integer n (n >= 0) , digit d (0 <= d <= 9) integer. square numbers k (0 <= k <= n) between 0 , n. count numbers of digits d used in writing of k**2. call nb_dig (or nbdig or ...) function taking n , d parameters , returning count. but output 1 less expected. can tell missing: expected: equal 4700 actual: 4699 class countdig { public: static int nbdig(int n, int d) { if(n==0 && d==0) return 0; int c = 0; for(int = 0;i<=n;i++) { int p=i*i; while(p) { int l; l=p%10; if(l==d) c++; p=p/10; } } return c; } }; you dont count first 0 (0*0), because loop condition p (while(p)). so add condition add 1 c, if p 0 , d zero class countdig { public: static int nbdig(int n, int d) { int c=0; if (d==0) c=1; // start 1, when counting 0 for(int i=1;i<=n;i++) { int p=i*i; while(p) ...

javascript - Hide <div> for country IP -

i hide <div> 1 country. works when use api test it, reason doesn't work when put on website. there can host on website or similar? i'm using wordpress. here's code $.get("freegeoip.net/json/";, function(response) { if (response.country_code != 'ba') { if (jquery.cookie('prikazii') == null) { if (ref.match(/^https?:\/\/([^\/]+\.)?facebook\.com(\/|$)/i)) { document.getelementbyid('chat').style.display = 'block'; } } } }, "jsonp");

data structures - AVL tree worst case number of rotations during insertion and deletion -

in avl tree, worst case number of rotations during insertion , deletion of n elements ? i think insertion should o(n) , deletion should o(nlogn). however, not sure deletion . am correct? for both operations - inserting or deleting of node x , there cases require rotations made on nodes x root. since height of tree n nodes o(log n) , worst case both operations take o(log n) rotations. n insert/delete operations gives o(n log n) .

java - Does Project->Build Project in Eclipse with m2e include any Maven goal by default? -

Image
update: project->build project in eclipse m2e include maven goal default? does including <build> <defaultgoal>install</defaultgoal> </build> pom.xml change action of "build project" , add second compilation maven builder? when flag project-> build automatically checked in eclipse 2 builders differnt things when update project. far understand: 1) maven project builder gets dependencies when update pom.xml. 2) 1 of these 2 builders compiles code when change it. a. builder compiles code? far know maven has own java_home. , can attach jre eclipse project. jres may different. b. other actions maven builder , when (when updating pom or code)? the maven builder build according goal defined , check correctness of dependencied pom file. the java builder compiles code , automatically , responsible ther correctness of eclipse project.

protocol buffers - Common protobuf data types in microservice architecture? -

we thinking of implementing kind of microservice architecture. have software maintained multiple teams , use grpc protobuf 3 serialization mechanism point point communication. goal decouple business logic application logic on 1 hand , allow uis spanning multiple business contexts on other hand. microservices have handle data similar or identical data handled other microservices. in context, advisable extract common proto3 data types, handle them separately , import them dependencies each microservice? way reused in multiple services. or better focus on decoupling microservices each other not sharing (common) data types (share nothing architecture)? what should make wonder why multiple microservices handle similar or identical data. may mean going far in slicing solution. quoting sam newman - " bounded contexts represent autonomous business domains (i.e., distinct business capabilities), , therefore appropriate starting point identifying dividing lines microserv...

I want to export large data set from MS sql server to Excel using python -

Image
i new python, want export large data set ms sql excel using different stored procedure , result should written in different sheet in same workbook. if want export data, can try export data feature built in sql server management studio , provides gui. if want use python this, pymssql is way go. it's database connection driver handles lot of things you.

video - Increasing fps & decreasing duration while streaming using VLC -

hello stackoverflow :3 i have been trying increase fps , decreasing duration while increasing speed when streaming video hard drive using vlc. transcode while streaming if possible. can speed video before streaming not desired task. the command use streaming regularly (note xxx.xxx.x.xxx represents ip): vlc --intf dummy -vvv /users/amr/downloads/bigbangsample.mp4 --sout '#rtp{dst=127.0.0.1,port=1234,sdp=rtsp://xxx.xxx.x.xxx:1236/test.sdp}' after following tips change frames per second vlc stream have tried transcoding using command: vlc --intf dummy -vvv /users/amr/downloads/bigbangsample.mp4 --sout='#transcode{fps=60}:rtp{dst=127.0.0.1,port=1234,sdp=rtsp://xxx.xxx.x.xxx:1236/test.sdp}' although can still view stream no warnings or errors video not seem affected @ all. i unsure if command wrong or if fps has been changed copying frames keep duration same. new vlc , video processing , appreciate input. update: ffprobe (see below) seems show fps hasn...

python 3.x - Scraping information from website using beautifullsoup wont work -

i have been using beautiful soup extract info website http://slc.bioparadigms.org but interested in diseases , omim number, each slc transporter have in list want extract these 2 characteristics. thing both related class prt_col2. if search class lot of hits. how can diseases? there no diseases related slc transporter or there no omim number. how can extract information? put screenshots below show how looks like. highly appreciated! first post here forgive me mistakes or missing information. thank you! http://imgur.com/atigi84 other 1 /l65hsym so ideally output example: transporter: slc1a1 disease: epilepsy omim: 12345 edit: code have far: import os import re bs4 import beautifulsoup bs import requests import sys import time def hasnumbers(inputstring): #get transporter names contain numbers return any(char.isdigit() char in inputstring) def get_list(file): #get list of transporters transport...

couchdb - Can we open Design Documents directly in an IDE? -

if 1 wants edit design document has make several clicks in fauxton (browser-tool) accomplish this. there faster way edit documents rather loggin in fauxton, open database, open d-doc, ..., etc.? or in other words: can open design documents directly in ide? consider using couchapp management tool. couchapps allow many things don't ever want touch, 1 thing can use them ddoc management. create directory structure javascript files maps , reducers , use tool push server. there many such tools available, e.g. http://guide.couchdb.org/draft/managing.html http://metsonet.co.uk/situp/ the workflow this: create local directory name of design document. in directory, create sub directories names of views. in these directories create files map.js , reduce.j can open in ide, , version in git . whenever make change, use (say) situp sync changes (a bit git push ). create ddoc views in right place , send remote server.

r - Programmatically factorize selected columns in data frame, the tidy way? -

here simplified example: library(tidyverse) frame <- tribble( ~a, ~b, ~c, 1, 1, 2, 5, 4, 7, 2, 3, 4, 3, 1, 6 ) key <- tribble( ~col, ~name, ~type, ~labels, 1, "a", "f", c("one", "two", "three", "four", "five"), 2, "b", "f", c("uno", "dos", "tres", "cuatro"), 3, "c", "f", 1:7 ) is there elegant way of programmatically sweeping across columns in frame , applying specific factor class, based on parameters in key ? expected result be: # tibble: 4 x 3 b c <fctr> <fctr> <fctr> 1 1 uno 2 2 5 cuatro 7 3 2 tres 4 4 3 uno 6 the best solution have far using purrr 's map2() assignment imo not elegant: frame[key$col] <- map2(key$col, key$labels, function(x, y) factor(frame[[x]...

selenium - Can not find Element Through Xpath -

element not found correct x path xapth = //div[@class='note note-danger'] getting below - [[chromedriver: chrome on win8_1 (d878ca30732296716482f8befc5a605a)] -> xpath: //div[@class='note note-danger']] link :- sandbox.avactis.com/ketan479/register.php steps reproduce highlighted element: register on website retry register same user you error :- account name taken. please choose different account name. i not able capture text in step 3, though able locate element through xpath in firebug.

personalization - User specific information in Android -

i'm trying guess users personality-traits when open app. to i'm using list of installed apps : getpackagemanager.getinstalledapplications(packagemanager.get_meta_data); i check users country : locale.getdefault().getcountry(); and phone type build.model + build.manufacturer; compare questionnaire , other users, works decent, i'm looking more "meta-data" might correlates users personality. has idea? ps. information should anonymous not use google, facebook or e-mail account information.

Fix IP for Docker -

i have deploy docker server learning , testing proposes, have start installing portainer. when try access portainer publica ip, have noted not have given, portainer use private ip.. error during connect: http://remote.host:2375/v1.29/info: dial tcp: lookup remote.host on 10.1.94.8:53: no such host i have try accessing public ip: myip:9000 not working how can change it? thank you, i have resolved it, editing: /etc/resolv.conf and change nameserver private ip nameserver - public ip

c# - Can't convert a Marshal pointer of a struct back to struct -

Image
i'm coding windows service communicates driver, such i'm trying to, test, pass struct , returned struct. in c++ working in c# i'm not being able convert intptr struct using marshal , that's why i'm not able struct returned driver. struct: [structlayout(layoutkind.sequential)] struct testest { public int value; } then in driver: typedef struct _test_est { int value; } test_est, *ptest_est; and code going pass struct via ioctl is: void sendioctl<t>(intptr hdevice, uint dwiocontrolcode, ref t inobj, ref t outobj) { intptr inpointer = intptr.zero; intptr outpointer = intptr.zero; int inobjsize = 0; int outobjsize = 0; uint bytesreturned = 0; if(inobj != null) { inobjsize = marshal.sizeof(inobj.gettype()); inpointer = marshal.allochglobal(inobjsize); marshal.structuretoptr(inobj, inpointer, false); if (dwiocontrolcode == test_ctl) ...

python 3.x - subprocess.call() to remove except *.txt files -

i have shell command: rm !(*.esla.ass|*.mp4|*.txt|*.sh|*.py) i trying with: files = [i in glob.glob("*") if not in ('*.esla', '*.mp4')] subprocess.call(['rm','-r'] + files) but deletes me everything can me please??? you're not using glob file names, ' ' interpreted string literal in case you're deleting in glob(' '). use extension like: [filename filename in glob('*') if filename.split('.')[-1] not in ['.esla', '.mp4']]

function - PHP-Nginx timeout error -

i have written php code finds title of webpage , writes title database. till had no problems list got expanded , more websites means more required time php function. causes nginx web-server run "timeout" error. i not want increase timeout setting nginx defaults since don't want abused other users on other pages sending long requests , keeping server busy. here code i'm using getting title ; function get_data($url) { $ch = curl_init(); $timeout = 15; curl_setopt($ch, curlopt_url, $url); curl_setopt($ch, curlopt_useragent,'mozilla/5.0 (windows; u; windows nt 5.1; en-us; rv:1.8.1.13) gecko/20080311 firefox/2.0.0.13'); curl_setopt($ch, curlopt_url, $url); curl_setopt($ch, curlopt_timeout, 60); curl_setopt($ch, curlopt_httpget, 1); curl_setopt($ch, curlopt_returntransfer, true); curl_setopt($ch, curlopt_followlocation, true); curl_setopt($ch, curlopt_connecttimeout, $timeout); $data = curl_exec($ch); if(strlen($data)>0){ $dat...

javascript - How to disable a button at an empty text/number field -

i wish disable button in html on condition required fields empty. code given below of form in button there: <form> name*: <input type="text" size="20" name="name" /> <br /><br /> surname: <input type="text" size="20" name="sur_name" /> <br /> <br /><br /> mobile number: <input type="tel" size="15" name="mob" /> <br /><br /> e-mail id*: <input type="email" size="30" name="user_id" /> <br /><br /> password*: <input type="password" size="30" name="pw1" /> <br /><br /> confirm password*: <input type="password" size="30" name="pw2" /> <br /><br /><br /><br /> accept terms , conditions <input type="checkbox" name="t&c" /><br />...

Resizing borderless form in Windows Forms C#? -

i've tried this tutorial . borderless resizable, problem i've tried anchor objects, when resize form, these objects still remained @ same position. my code: protected override void wndproc(ref message m) { const int resize_handle_size = 10; switch (m.msg) { case 0x0084/*nchittest*/ : base.wndproc(ref m); if ((int)m.result == 0x01/*htclient*/) { point screenpoint = new point(m.lparam.toint32()); point clientpoint = this.pointtoclient(screenpoint); if (clientpoint.y <= resize_handle_size) { if (clientpoint.x <= resize_handle_size) m.result = (intptr)13/*httopleft*/ ; else if (clientpoint.x < (size.width - resize_handle_size)) m.res...