Posts

Showing posts from January, 2013

How do I reuse task configuration in Gradle? -

i have task war configuration many from/include/exclude : task war { exclude exclude ... ... ... ... ... } i have task war configuration same except 1 exclude . don't want duplicate configurations. how can reuse first configuration? try: ext.sharedcopyconf = { task, -> configure(task) { 'a' } } task copy1(type: copy) { t -> sharedcopyconf(t, 'b') } task copy2(type: copy) { t -> sharedcopyconf(t, 'c') } have @ demo .

python - PyQt5 draggable frameless window -

i found example set borders on frameless window, it's not draggable. how can make frameless window draggable? if can see example it'll awesome. here example code(normally code longer, that's why there libraries don't mind them); from pyqt5.qtwidgets import (qmessagebox,qapplication, qwidget, qtooltip, qpushbutton, qdesktopwidget, qmainwindow, qaction, qapp, qtoolbar, qvboxlayout, qcombobox,qlabel,qlineedit,qgridlayout,qmenubar,qmenu,qstatusbar, qtextedit,qdialog,qframe,qprogressbar ) pyqt5 import qtcore, qtwidgets, qtgui pyqt5.qtgui import qicon,qfont,qpixmap,qpalette pyqt5.qtcore import qcoreapplication, qt,qbasictimer import sys class cssden(qmainwindow): def __init__(self): super().__init__() self.mwidget = qmainwindow(self) self.setwindowflags(qtcore.qt.framelesswindowhint) #size self.setfixedsiz

regex - .htaccess redirect all pages to homepage except few of them -

i have site 2 sub pages want keep, want redirect other sub pages homepage. current htaccess code: # disable varnish caching on server header set set-cookie "_asomcnc=1; max-age=900; path=/;" rewriteengine on # redirect www rewritecond %{http_host} !^www\. rewriterule ^(.*)$ http://www.%{http_host}/$1 [r=301,l] # redirect index.html root rewritebase / rewriterule ^index\.html$ / [nc,r,l] # remove trailing slash rewriterule ^(.*)/$ /$1 [l,r=301] i tried few examples found here on stack overflow keep getting redirect loops, or css file , images not loaded. lets want load files these 2 folders: /css /images and want keep 2 subpages: /subpage1.html /subpage2.html everything else should redirected homepage. to exclude pages being rewritten, can either use rewritecond %{request_uri} or short circuit rule chain. to exit early, insert these rules @ beginning rewriterule ^css - [l] rewriterule ^images - [l] rewriterule ^subpage1.html$ - [l] re

javascript - Is this a good / secure way to set server side cookies from client -

i working single app application framework called reactjs , issue encountered setting httponly cookies, can not set / read client side needed figure out way how use express this. one idea came make post request route /cookie:data data value of token needs stored in cookie, so: app.post('/cookie:data', function(req, res) { // set cookie here res.send(200) }) issue hesitant token contains unique user identifier used secure api, , not sure if or not exposing setting cookie way. alternatively instead of using :data beneficial figure out how can grab data (json object) post request edit: 1 issue can think of can post route , set different cookies? way of securing it? edit 2: express setup use proxy api calls (only relevant clarifying comments) app.use('/api', function (req, res) { let url = config.api_host + req.url req.pipe(request(url)).pipe(res) }) say want proxy requests starting /api third-party, except /api/users , want p

model view controller - Return class name and access it from $this afterwards in php -

hello building application , want similar codeigniter. i have controller class: class controller{ function __construct(){ $this->view = new view(); $this->load = new loader(); } } my loader class: class loader{ function __construct(){ echo 'loader class instanciated'; } public function model($model){ $file = 'models/' . $model . '.php'; if (file_exists($file)) { require $file; $this->model = new $model(); return $this->model; } } } and controller class: class extends controller{ function __construct(){ parent::__construct(); } public function index(){ $this->view->render('index/index'); } public function other(){ $model = $this->load->model('help_model'); $model->meth(); } } so far works. have like: $this->load->model('help

java - How to resolve volley Error , I am always finding error_response error? -

i getting volley error every time data has been posted ,but in response, got volley error. please me, don't know why it's happening? private void dosignuptask(){ string strname = nameet.gettext().tostring(); string strhandicap = handicapet.gettext().tostring(); // string strcountry = countryet.gettext().tostring(); string strcode = codeet.gettext().tostring(); string strmobile = mobileet.gettext().tostring(); string stremail = emailet.gettext().tostring(); string strpassword = passwordet.gettext().tostring(); if (strname.length() == 0) { nameet.seterror(getstring(r.string.empty_name)); }else if (strhandicap.length() == 0) { handicapet.seterror(getstring(r.string.empty_handicap)); }else if (strcode.length() == 0) { codeet.seterror(getstring(r.string.empty_code)); } else if (strmobile.length() !=10 ) { m

javascript - How can I move items within an array rather than use a new array? -

i have implemented quicksort algoritm in javascript. looks this function quicksort(array){ if (array.length <= 1) return array; var less = []; var more = []; var equal = []; var i; var pivot = (array.length / 2) | 0; for(i = 0; < array.length; i++) { if (array[i] > array[pivot]) { more.push(array[i]); } else if (array[i] < array[pivot]) { less.push(array[i]); } else { equal.push(array[i]); } } return quicksort(less).concat(equal, quicksort(more)); } document.write(quicksort([3,46,78,90,48,32,13,6,45,87,32,56,45])); but want instead of pushing values in array different arrays have move values within array itself. how do that?

networking - Cannot set up Kubernetes local cluster via Docker -

i followed http://kubernetes.io/docs/getting-started-guides/docker/ . here commands literally run: export k8s_version=$(curl -ss https://storage.googleapis.com/kubernetes-release/release/stable.txt) export arch=amd64 docker run -d \ --volume=/:/rootfs:ro \ --volume=/sys:/sys:rw \ --volume=/var/lib/docker/:/var/lib/docker:rw \ --volume=/var/lib/kubelet/:/var/lib/kubelet:rw \ --volume=/var/run:/var/run:rw \ --net=host \ --pid=host \ --privileged \ gcr.io/google_containers/hyperkube-${arch}:${k8s_version} \ /hyperkube kubelet \ --containerized \ --hostname-override=127.0.0.1 \ --api-servers=http://localhost:8080 \ --config=/etc/kubernetes/manifests \ --cluster-dns=10.0.0.10 \ --cluster-domain=cluster.local \ --allow-privileged --v=2 curl -ssl "http://storage.googleapis.com/kubernetes-release/release/v1.2.0/bin/linux/amd64/kubectl" > /usr/bin/kubectl chmod +x /usr/bin/kubectl kubectl config set-cluster test-doc --server=http://localhost:8080 k

networking - Edi value added network -

can explain me means edi value added network. new edi.someone can explain me instead routing me web resources. thanks in advance. a van similar vpn dedicated b2b communication. van managed 3rd party. still used edi communications nowadays have other ways of communication via internet oftp2 or as2

I need a javascript for loop it should print 10 to 1 like it should print still 1 -

i need javascript loop should print 10 1 should still 1. my js code: var b = ""; var inc = ""; var k = 10; for(a = k;a >= 1; a--){ for(i=k; i<=1; a++) { console.log(parseint(inc)); } } console.log(parseint(b)); what expecting is: 10 9 8 7 6 5 4 3 2 1 9 8 7 6 5 4 3 2 1 8 7 6 5 4 3 2 1 7 6 5 4 3 2 1 6 5 4 3 2 1 5 4 3 2 1 4 3 2 1 3 2 1 2 1 1 use following loop, for (i = 11; > 1; i--) { (j = - 1; j > 0; j--) { console.log(j) } }

php - How do I add a wordpress blog into my existing html website -

i have complete html based website , want add blog site. i want keep design way is, including navigation. i want integrate blog part. i guess m saying blog page rest of website without having change website wordpress. i have not found me except cut off video on youtube nothing me, , codex page not either. step step great! heaven sent. thanx! my website i'd install blog: http://richminded.net/learning-center/index.html you have develop wordpress custome theme using assets js files, css files, images , fonts. and make header , footer design , copy paste pages inside admin of wordpress. to create theme go through following tutorial https://codex.wordpress.org/theme_development or http://quandaflow.com/category/website/wordpress/

node.js - Identity Map with Mongoose -

is there native way mongoose 4.x maintain identity map , avoid returning different object instances same entity in db? users.findone({_id: objectid("xxx")}, function(err, user1) { if (err) throw err; users.findone({_id: objectid("xxx")}, function(err, user2) { if (err) throw err; console.log(user1 === user2); // return false }); });

Unable to launch IE browser in selenium webdriver -

i have written sample code launch ie browser , load google page. public class sample { public static void main(string[] args) { // todo auto-generated method stub system.setproperty("webdriver.ie.driver","h:/iedriverserver.exe"); webdriver driver=new internetexplorerdriver(); driver.manage().window().maximize(); driver.manage().timeouts().implicitlywait(10,timeunit.seconds); driver.get("http://www.google.com"); } } but when run script launches browser , gets closed (less 2 sec) without prompting error , script wont terminates. this can see on console screen: started internetexplorerdriver server (32-bit) 2.53.1.0 listening on port 46974 only local connections allowed can 1 me on issue? below steps worked me, hope work well: open internet explorer. navigate tools->option navigate security tab now option internet,intranet,trusted sites , restricted site enable "enabl

ASP.NET MVC Runtime Javascript Syntax Error without error code -

there javascript syntax error form element: @html.dropdownlistfor(model => model.unit, new selectlist(viewbag.unitlist, "value", "text"), "-- select unit --", new {onchange = "showselectedvalue" }) javascript: function showselectedvalue() { alert('selected: ' + @model.unit); // syntax error underlines closing parentethesis of alert function } i want check unit being selected function showselectedvalue , razor executes server side , javascript executes client side can't mix them together; code put initial value of @model.unit script string literal , alert('selected: ' + whatever unit is); , syntax error because whatever unit is not encased in quotes. the easiest thing pass select parameter onchange function. @html.dropdownlistfor(model => model.unit, new selectlist(viewbag.unitlist, "value", "text"), "-- sele

javascript - addEventListener not working when used within addClass -

i have written following html, using material design lite progress bar: <div class="mdl-grid"> <div class="mdl-cell mdl-cell--12-col mdl-cell--12-col-phone"> <div id="stepprogress" class="mdl-progress mdl-js-progress"></div> </div> </div> <div class="mdl-grid"> <div id="step1-title" class="mdl-cell mdl-cell--4-col mdl-cell--4-col-phone steps"> <h5 class="text-center">step 1</h5> </div> <div id="step2-title" class="mdl-cell mdl-cell--4-col mdl-cell--4-col-phone steps"> <h5 class="text-center">step 2</h5> </div> <div id="step3-title" class="mdl-cell mdl-cell--4-col mdl-cell--4-col-phone steps"> <h5 class="text-center">step 3</h5> </div> </div> <div id="

How to combine PHP echo and get together? -

my website has multiple languages, , have php line in below data sql , shows text on page: <?php get_footer_menu_items(3, "col-md-6 go-right","ftitle go-text-right","footerlist go-right go-text-right" );?> the number 3 in above code text (about us) but in page, have php echo show text based on selected language: <?php echo trans('0295');?> this above line text (about us) how can combine these 2 lines change text selected language? get_footer_menu_items function probably takes integer first argument , index in array of sort text strings. so if call this: get_footer_menu_items(trans('0295'), "col-md-6 go-right","ftitle go-text-right","footerlist go-right go-text-right" ); it won't work anyway. without mentioned function's code it's hard help.

excel - Extracting text from string between two identical characters using VBA -

let's have following string within cell: e. stark, t. lannister, a. martell, p baelish, b. dondarrion, , j. mormont. increased levels of nudity across westeros contributes sporadic seasonal climate. nat. proc. aca. sci. (2011) 3: 142-149. and want extract title this. approach considering write script says "pull text string, if more 50 characters long." way returns title, , not stuff " stark, t" , " martell, p". code have far is: sub titletest() dim txt string dim output string dim integer dim rng range dim j integer dim k integer j = 5 set rng = range("a" & j) 'text in cell a5 txt = rng.value 'txt string = 1 while j <= 10 'there 5 references between a5 , a10 k = instr(i, txt, ".") - instr(i, txt, ". ") + 1 'k supposed length of string returned, can't differenciate 1 "." other. output = mid(txt, instr(i, txt, ".")

mysql - Same query without INNER JOIN? -

i'm trying convert query equivalent 1 no inner join. select c.name, c.area, ai.sum_area country c inner join ( select sum(i.area) sum_area, gi.country island inner join geo_island gi on (i.name = gi.island) group gi.country ) ai on (c.code = ai.country) (c.area * 0.99) <= ai.sum_area; i'd learn how do, feel unconfortable statement, way find write queries. edit: i'd appreciate instead of putting -1, tell me what's wrong question. one option use "old" - non ansi sql compliant join syntax: select c.name, c.area, ai.sum_area country c, ( select sum(i.area) sum_area, gi.country island i, geo_island gi (i.name = gi.island) group gi.country ) ai (c.area * 0.99) <= ai.sum_area , c.code = ai.country; the other option use few subqueries (dependent , not-dependent) , in operator. select * ( select c.name, c.area,

javascript - Stop reloading the page after location.reload(); has been called -

i have link reload page js: <a href="#" onclick="location.reload()">reload</a> how stop page reload after location.reload() method has been called? you can use following code: window.stop(); beware : microsoft internet explorer , edge don't support it.

c# - No CreateStoredProcedure method on Entity Framework Core -

i want create stored procedure using migration builder there no createstoredprocedure method in migration class this. public override void up() { createstoredprocedure( "mystoredprocedure", p => new { id = p.int() }, @"select some-data my-table id = @id" ); } public override void down() { dropstoredprocedure("mystoredprocedure"); } how create stored procedure in migration using entity framework core? use can use migrationbuilder.sql() method execute arbitrary sql in migrations ef core

c++ - Un-fortifying rippled -

i want compile rippled without source code hardening (specifically, want avoid *_chk functions). as far have been able determine, gcc/g++ hardening fortify_source , -fstack-protector , , in order disable it, either -u_fortify_source or -d_fortify_source=0 , -fno-stack-protector should used. however, reason not working me rippled. have modified sconstruct file above mentioned defines , switches added, , see during build process being passed compiler , linker. however, when run readelf -sw rippled | egrep chk , obtain several lines like: 3: 0000000000000000 0 func global default und __printf_chk@glibc_2.3.4 (2) 38: 0000000000000000 0 func global default und __vfprintf_chk@glibc_2.3.4 (2) 96: 0000000000000000 0 func global default und __sprintf_chk@glibc_2.3.4 (2) 100: 0000000000000000 0 func global default und __snprintf_chk@glibc_2.3.4 (2) 107: 0000000000000000 0 func global default und __fread_chk@glibc_2.7 (14)

php - How to upload and access a Python script in cPanel? -

i have python file, automation script github. want script executed php page. for example, have index.php page, , has button saying start script . upon clicking button, python script, instabot.py , should executed. possible in cpanel? web host hostgator. using information another stackoverflow post , might wanna use exec() run python script php. like: exec('python /path/to/file/instabot.py'); according hostgator's documentation , python scripts should have permissions set @ 755 . uploading python scripts same uploading file web host, through use of ftp or cpanel itself.

android - How to declare an object at class level and get intent data? -

i'm trying recive arraylist 1 activity , add data list , pass along again. thing is, when have declare @ class level question is. how data intent when declaring @ class level? @override protected void oncreate(bundle savedinstancestate) { log.d(tag, "start oncreate listan"); super.oncreate(savedinstancestate); setcontentview(r.layout.activity_listan); bundle listan = getintent().getextras(); arraylist<produkt> lista = (arraylist<produkt>) getintent().getserializableextra("list"); if (lista.isempty()) { log.d(tag, "lista==null"); listproduktadapter adapter = new listproduktadapter(listan.this, lista); listview listview = (listview) findviewbyid(r.id.listview); bundle produktinfo = getintent().getextras(); string name = produktinfo.getstring("name").tostring(); string allergen = produktinfo.getstring(&quo

binding - ButterKnife Android: Unable to add Listener to View -

i added butter knife library gradle this: dependencies { compile 'com.jakewharton:butterknife:8.0.1' ... } created button id btnpress . in activity, when tried add method @onclick(r.id.btnpress) , on running application, method not execute. activity: public class mainactivity extends appcompatactivity { @bindview(r.id.btnpress) button btnpress; @override protected void oncreate(bundle savedinstancestate) { ... butterknife.bind(mainactivity.this); } //this method not being called when button pressed. @onclick(r.id.btnpress) void onpress() { ... } } here's how resolved issue: first, in top-level build.gradle file, include: classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8' in buildscript dependencies, such as: buildscript { dependencies { classpath 'com.android.tools.build:gradle:2.0.0' classpath 'com.neenbedankt.gradle.plugins:andro

javascript - Semantic-ui Checkboxes and buttons check on PHP -

semantic-ui uses jquery , javascript. when use jquery checkbox, , check it, adds 'checked' class it. the problem is, want use php's isset() function, know if checkbox checked or not, because checkbox isn't checked, cant. how can identify checked semantic-ui checkbox on php? thank you. form: <form class="ui form" action="your_action.php" method="post"> <div class="field"> <label>first name</label> <input type="text" name="first-name" placeholder="first name"> </div> <div class="field"> <div class="ui checkbox"> <input name='check' type="checkbox" tabindex="0" class="hidden"> <label>i agree terms , conditions</label> </div> </div> <button name='action' value="submit" class="ui button&q

sql - Writing my result as horizontal as String -

Image
can me how can rewrite query following result. 1 2 3 4 5 u.t a.h e.z r.z s.a sometimes return more or less 5 results. my query: select left(a.vorname, 1) + '.' + left(a.name, 1) name adr_adressen left join adr_gruppenlink gl on gl.adressnradr = a.adressnradr a.z_klasse = 'ba' , gl.gruppeadr != 'kind' this you, using row_number() declare @cols nvarchar(max) select @cols = stuff((select ',[' + convert(varchar,row_number() on ( order left(a.[name],1) ) )+ ']' id [adr_adressen] xml path(''), type).value('.', 'varchar(max)'),1,1, '') declare @query nvarchar(max); set @query = n'select ' + @cols + n' ( select row_number() on ( order left(a.name,1) ) id, left(vorname,1) + ''.'' + left(name,1) name adr_adressen left join adr_gruppenlink gl on gl.adress

java - Get selected rows in JTable -

Image
i have jtable looked image below. when row clicked, want display selected row values. viewmovie public class viewmovie extends javax.swing.jframe { public viewmovie() throws exception { initcomponents(); populatejtable(); } // create methode populate data jtable mysql database , displaying picture public void populatejtable() throws exception{ myquery mq = new myquery(); arraylist<movie> list = mq.bindtable(); string[] columnname = {"title","date","time","price","hall","description","image"}; object[][] rows = new object[list.size()][8]; for(int = 0; < list.size(); i++){ //rows[i][0] = list.get(i).getid(); rows[i][0] = list.get(i).gettitle(); rows[i][1] = list.get(i).getdate(); rows[i][2] = list.get(i).gettime();

android studio "searched in the following locations" -

just moved eclipse. trying build existing (working) project. keeps giving me error error:could not find com.google.android.gms:play-services:9.2.0. searched in following locations: file:/c:/utils/androidstudio/gradle/m2repository/com/google/android/gms/play-services/9.2.0/play-services-9.2.0.pom file:/c:/utils/androidstudio/gradle/m2repository/com/google/android/gms/play-services/9.2.0/play-services-9.2.0.jar https://jcenter.bintray.com/com/google/android/gms/play-services/9.2.0/play-services-9.2.0.pom https://jcenter.bintray.com/com/google/android/gms/play-services/9.2.0/play-services-9.2.0.jar required by: :personal_weather:unspecified the library not in studio directory (androidstudio), in sdk directory (androidsdk), installation procedure insisted upon. have installed google repository using sdk manager. in project setup have correct location of sdk. how force in correct directory? the files had read far said had add class

regex - How do i validate the numbers which are multiples of 500 using regular expression? -

the text field should accept multiples of 500. ng-pattern="/^[0-9]*(0|5)(0{2})*$/" you can use: ^\d*[05]00$ which may try here or ^\d*[05]00$|^0$ if want allow 0 .

how to read a huge csv file using mmap in python? -

i want read csv file , perform operation on file. i'm created program requirement i'm not getting output because file size large i.e. ~5gb. i'm using simple system calls such open,readline ect. meanwhile explore memory mapped support in python didn't understand implementation of mmap. can me implement reading of large csv file using mmap or other way can reduce speed of application? i'm reading 1 csv file , want perform 1 task. task- i want read 1 csv file , read line_id csv file , find out unique line_id's , 1 unique line id want find out maximum time_gap single unique line_id. have find out same line_id , corresponding maximum time_gap. after getting unique line_id & corresponding maximum time_gap want 2 column information in output.csv file. i created 1 program task , working small input file not working large files. i.e ~2gb. my stuff- import csv import sys, getopt def csv_dict_reader(file_obj): listoflineid = [] reader =

VBA - ArrayList - Get element at index -

i kind of new vba , stuck @ simple task of getting element out of arraylist @ spesified index . set resultlist = createobject("system.collections.arraylist") resultlist.add element1 resultlist.add element2 resultlist.add element3 resultlist.add element4 return resultlist.get(2) '<-- not working i have checked documentation of arraylist failed find such "get(index)" function: https://msdn.microsoft.com/de-de/library/system.collections.arraylist(v=vs.110).aspx thanks in advance. if can legally use return resultlist.item(2) , have working code, you're not using vba vb.net. in vba function's return value needs assigned using function's identifier: public function getfoo() string getfoo = "hello" end function in vb.net function's return value returned using return keyword: public function getfoo() string return "hello" end function and if you're using vb.net, have absolutel

How to combine two methods in JAVA? -

i have 2 methods returns 2 values. method same thinking combine them single method , manipulate return different values not sure useful? can tell me method can converted single ? private boolean getfirst(list<apples> apples) { boolean isorange = false; if (apples != null) { (apples apple : apples) { string type = apple.getfruit(); boolean isapple = stringutils.equalsignorecase(type, orange); if (!isapple) { isorange = true; } } } return isorange; } private boolean getsecond(list<apples> apples) { boolean isappletype = false; if (apples != null) { (apples apple : apples) { string type = apple.getfruit(); boolean isapple = stringutils.equalsignorecase(type, orange); if (isapple) { isappletype = true; }

java - How to load external models when processing Spark Dataframes? -

i trying process large volumes of text. part of process want things such tokenization , stemming. of steps require loading external model (for example opennlp tokenizers ). trying following approach: sparkconf sparkconf = new sparkconf().setappname("spark tokenizer"); javasparkcontext sparkcontext = new javasparkcontext(sparkconf); sqlcontext sqlcontext = new sqlcontext(sparkcontext); dataframe corpus = sqlcontext.read().text("/home/zezke/document.nl"); // create pipeline components tokenizer tokenizer = new tokenizer() .setinputcol("value") .setoutputcol("tokens"); dataframe tokenizedcorpus = tokenizer.transform(corpus); // save output tokenizedcorpus.write().mode(savemode.overwrite).json("/home/zezke/experimentoutput"); the current approach trying using unarytransformer. public class tokenizer extends unarytransformer<string, list<string>, tokenizer> i

html - Get JSON Multidimensional Array Keys - AngularJS -

i trying build form out of json array. need load keys html. here example of array: { "fred": { "description": "a dude" }, "tomas": { "description": "another dude", "work": { "current": "no employer", "previous": "enron" } } } what values fred & thomas. when run in angular html: <div ng-repeat="set in sets"> <p ng-repeat="(key, val) in set"> <span ng-bind="key"></span>: <span ng-bind="val"></span> </p> </div> i error "ngrepeat-dupes" although fred , tomas not duplicate values. appreciated. you getting dupe error key being same in both objects. can fix using track $index , in data have provided, there no dupes... see fiddle - https://jsfiddle.net/t4q4nrfp/36/ if did have dupes in data though add in track $in

Certificate Exception In calling generated stub of AndesAdminService WSDL in wso2 message broker -

i using on wso2 message broker message brokering system in project. queue information (information queues created in wso2mb server, number of messages in each queue , on), generated client andesadminservics wsdl , tried call getallqueues() api api. everytime getting unable find valid certification path requested target exception. not able figure out problem. exception - jul 06, 2016 5:21:19 pm org.apache.axis.utils.javautils isattachmentsupported warning: unable find required classes (javax.activation.datahandler , javax.mail.internet.mimemultipart). attachment support disabled. axisfault faultcode: {http://schemas.xmlsoap.org/soap/envelope/}server.userexception faultsubcode: faultstring: javax.net.ssl.sslhandshakeexception: sun.security.validator.validatorexception: pkix path building failed: sun.security.provider.certpath.suncertpathbuilderexception: unable find valid certification path requested target faultactor: faultnode: faultdetail: {http://xml.apache.org/a

Android Material Design rounded progress_bar -

Image
i´m working on app wich uses different progress bars, , want them ones in google fit, rounded cornes. have custom drawable each bar different colors, , rounds outside corners not inside corners, can see here: custom drawable is: <?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@android:id/background"> <shape> <corners android:radius="@dimen/progress_bar_rounded" /> <solid android:color="@color/progressbarbackground" /> </shape> </item> <item android:id="@android:id/progress"> <clip> <shape> <corners android:radius="@dimen/progress_bar_rounded" /> <solid android:color="@color/progressbargreen" /> </shape>

c# - Does Windows 10 have a registry entry for LowLevelHooksTimeout -

i'm trying find workaround issue i'm having when debugging c# in visual studio 2015. when application debugging cause mouse cursor severely lag when breakpoint hit. because application registers hooks mouse , keyboard. when breakpoint hit hooks waiting input won't receive until timeout reached (~5 seconds). therefore, found solutions online, nothing relatively straightforward implement without reworking hooks. tried adding registry entry lowlevelhookstimeout see if windows more move on next hook event when breakpoint hit, doesn't seem make difference. alternatively, using raw input might way go, require bit of work. has run issue , there solutions readily available chance. https://social.msdn.microsoft.com/forums/windowsdesktop/en-us/f6032ca1-31b8-4ad5-be39-f78dd29952da/hooking-problem-in-windows-7?forum=windowscompatibility https://security.stackexchange.com/questions/78732/unregistering-keyboard-hooks-by-timeout-expiration i ended going open-sourc

matlab - Weird (I guess) behavior of integral3 -

Image
i trying calculate simple triple integral in matlab using integral3 . namely, it easy calculate i =1. however, implement as f =@(rho, x, y) 8/pi .* rho ; xmin = 0; xmax = 1; rhomin = 0; rhomax = @(x) 2.*(1-x); ymin = 0; ymax = @(x,rho) sqrt(1-(x + rho/2).^2); integral3(f, xmin, xmax, rhomin, rhomax, ymin, ymax,'method', 'auto'); and result 0.499999999999976. what doing wrong?! in advance. the order of limits have same order of variable inputs of function, change function definition to f =@(x, rho, y) 8/pi .* rho ;

ios - Background image in Swift -

i creating application fixed background (2208x2208) every screen, why setting background in application delegate. current code inside didfinishlaunchingwithoptions method is: func setbackground() { let width = self.window!.frame.size.width// * uiscreen.mainscreen().nativescale let height = self.window!.frame.size.height// * uiscreen.mainscreen().nativescale let size = max(width, height) uigraphicsbeginimagecontext(cgsize(width: width, height: height)) uiimage(named: "background.jpg")?.drawinrect(cgrectmake(-(size - width) / 2, -(size - height) / 2, size, size)) let image = uigraphicsgetimagefromcurrentimagecontext() uigraphicsendimagecontext() self.window?.backgroundcolor = uicolor(patternimage: image!) } this works supposes, 1 issue. image looks scaled down , scaled scale of screen. on iphone 6 plus doesn't sharp. might expected behaviour since window size not full resolution. when multiply native scale, 1/9th image (upper le

Rails: Shopify integration withouth a shopify app? -

i'm going use https://github.com/shopify/shopify_app gem i want able pull orders rails app using shopify api. the question have possible connect shopify store without creating shopify app, ebay model? thanks i'm pretty sure answer no. api need send store's oauth token, , can't unless store installs app.

python - Alternative way to return HTML as a read only field on the Django Admin -

i have django admin class contains read field returns table in html 2 different links. first link loads page of payments user has sent, second loads page of payments user has received. in order create functionality, there need return lot of html. there alternative returning it? here current relevant code: class useradmin(simplehistoryadmin): readonly_fields = ('payment_history') def payment_history(self, obj): return "<table style='border: none'>" \ "<tr><td><a href='/admin/payment/payment/?sender__id=%s'>sent user</a></td>" \ "<td><a href='/admin/payment/payment/?receiver__id=%s'>sent user</a></td>" \ "</tr></table>" % (obj.id, obj.id) payment_history.allow_tags = true a preferred alternative having code in real html file can returned same method. how using re

Impala query failed for -compute incremental stats databsename.table name -

we scooping data netezza hadoop non-partitioned tables , non-partition partitioned insert overwrite method. after running compute incremental stats databasename.tablename on partitioned tables query failed of partitions error could not execute command: compute incremental stats , no such file or directory file in partitioned directory. you can run refresh statement before computing stats refresh metadata right away. may necessary wait few seconds before computing stats if refresh statement return code 0 past experience has shown metadata still refreshing after return code given. won't typically won't see issue unless script executing these commands sequentially. refresh yourtablename compute stats yourtablename as of impala 2.3 can use alter table recover partitions instead of refresh metadata or repair table. alter yourtablename recover partitions compute stats yourtablename

ios - FacebookSDK Login: Unable to retrieve user profile -

i has import , integrate facebook latest ios sdk, login working fine whenever trying retrieve user profile, return admin profile info in developer portal. my app overview has cofigure public, there needed configure in order retrieve user public profile? this login code , retrieving public profile: [login setloginbehavior:fbsdkloginbehaviornative]; [fbsdkprofile enableupdatesonaccesstokenchange:yes]; [login loginwithreadpermissions: @[@"public_profile", @"email"] fromviewcontroller:nil handler:^(fbsdkloginmanagerloginresult *result, nserror *error) { if (error) { nslog(@"process error"); } else if (result.iscancelled) { nslog(@"cancelled"); } else { [[[fbsdkgraphrequest alloc] initwithgraphpath:@"me" parameters:@{@"fields": @"email"}] startwithcompletionhandler:^(fbsdkgraphrequestconnection *connection, id result, nserror *error) {

c++ - Can't acces private members in a object of same type -

the problem in title, here's code: #include <iostream> #include <cstring> using namespace std; template<typename t1, typename t2> class pair { t1 first; t2 second; public: pair(t1 _first = null, t2 _second = null) : first(_first), second(_second) {} pair(const pair<t1, t2>& other) : first(other.first), second(other.second) {} }; template<> class pair<char*, char*> { char* first; char* second; public: pair(char* _first = null, char* _second = null) : first(_strdup(_first)), second(_strdup(_second)) {} pair(const pair<char*, char*>& other) : first(_strdup(other.first)), second(_strdup(other.second)) {} }; int main() { pair<short, char> pair; pair<char*, char*> pair2; } 5 intellisense: member "pair::first" (declared @ line 20) inaccessible 6 intellisense: member "pair::second" (declared @ line 21) inaccessible so what, exclusive template c

regex - .net search for string between two known strings in a file -

Image
i have big text file. lots of irrelevant data in it. can read streamreader , doing while loop. text file this mystartstring "response:"my response web service1 myendstring somedata in between ***mystartstring* "response:"my response web service2 **myendstring so going (around 70mb file). need retrieve "response:"my response web service1 , "response:"my response web service2 etc list. saw can regex. can me out. saw stackoverflow post on this. update: pasting below file extract. so, can see "****mgrtype response body**" , "**end::" below. there response between them. need responses. image file my file extract : employeetype: manager mgrtype request payload {"events":[{"some data"}]}}}}]} ****nfn response header** x-original-http-status-code: 200 myid: cc24e044-babf-46d3-bda5-bb0de1e586e5 connection: close date: tue, 14 jun 2016 21:28:01 gmt *mgrtype response body {"