Posts

Showing posts from January, 2015

python - Upgrading to latest pip caused ValueError -

the latest upgrade pip (using python 3.5) causes following error occur pip command: traceback (most recent call last): file "/library/frameworks/python.framework/versions/3.5/bin/pip3.5", line 7, in <module> pip import main file "/library/frameworks/python.framework/versions/3.5/lib/python3.5/site-packages/pip/__init__.py", line 15, in <module> pip.vcs import git, mercurial, subversion, bazaar # noqa file "/library/frameworks/python.framework/versions/3.5/lib/python3.5/site-packages/pip/vcs/subversion.py", line 9, in <module> pip.index import link file "/library/frameworks/python.framework/versions/3.5/lib/python3.5/site-packages/pip/index.py", line 29, in <module> pip.wheel import wheel, wheel_ext file "/library/frameworks/python.framework/versions/3.5/lib/python3.5/site-packages/pip/wheel.py", line 32, in <module> pip import pep425tags file "/library/framework...

asp.net - How to set session variable for Eval values for multiple record in database -

< asp:lable runat="server" id="emailid" text='<%#eval("email") %>' height="20px" width="150px" borderstyle="none" font-bold="true"></asp:label> <%# session["session_taskcode"] = databinder.eval(container.dataitem, "email")%> i getting value of email through session["session_taskcode"] variable in .cs file. problem have multiple records in gridview. so, when wanted values email particular records, session["session_taskcode"] variable takes values of email of last record only. so, how should take values of email different records in session variable? hi use rowdatabound event of grid take emails. can use list store emails. ad list session. //global declaration list<string> emaillist= new list<string>; //rowdatabound event label lblemail= e.finfcontrol("lblemail") lable; emaillist.add(lblemail.text); sess...

Making Empty C++ Project: General exception (Exception from HRESULT:0x80131500) Visual Studio Community 2015 -

i'm trying make new c++ empty project in visual studio community 2015. however, hit okay, tells me 1 or more errors have occured, , general exception (exception hresult:0x80131500). i've been trying online other results, none have helped far , wondering if here knew how fix it. i've tried re installing , tried windows ultimate 2013 , i'd still unable make empty project. in case stopped working when i've tried switch solution "debug" "release" configuration. after vs started fail load projects or create new ones message have mentioned (exception hresult:0x80131500). what did trying create new c# project on have got more clear , useful message, saying vs 2015 can not open following file: c\programfiles(x86)\msbuild\14.0\bin\microsoft.common.currentversion.targets when have checked file have found corrupted in weird way - size of file same original 80% of file garbage. after have downloaded original file microsoft reference so...

php - can't create automatic sql tables after first use -

i'm new php , sql... i'm trying create new tables based on url, it's working first time use it. after that, it's not possible. here php code: if(isset($_get['id'])){ $tabela = $_get['tabela']; $_get['id']; $criar = $tabela . $nivel . $page_id; // se clicar no botão 'confirmar', então ele faz o seguinte: if(isset($_post['submit'])){ $titulo = $_post['titulo']; $_files['imagem']['tmp_name']; $texto = $_post['texto']; // se um destes campos estiver vazio: if($titulo=='' or $imagem=='' or $texto==''){ echo "preencha todos os campos para o menu!"; exit(); } // se não houver campos vazios, ele faz: else { $servername = "localhost"; $username = "root"; $password = ""; $dbname = "site"; ...

php - SimpleXMLElement Object and hidden child elements -

i'm asking explanation of following behavior behind scene in php. i have simplexmlelement object print_r(); here result: array ( [shipments] => simplexmlelement object ( [shipment] => simplexmlelement object ( [rates] => simplexmlelement object ( [rate] => simplexmlelement object ( [service] => c [servicecharge] => 10.18 [servicechargedetails] => simplexmlelement object ( [basecharge] => 8.33 [codcharge] => 0 [declaredcharge] => 0 [additionalcharges] => 1.85 ...

html - After ajax request jquery can't find the correct div -

for project load html file populate div s directly inserting html content div s. problem is, have many elements has div inside them same id. causes problem select correct 1 i.e. $('#div_name') . finds wrong one. example how can solve problem. update $('.to_be_filled:eq(1)').children('#graph_container').css('background-color', 'red'); $('.to_be_filled:eq(2)').children('#graph_container').css('background-color', 'green'); since eq() supplied index zero-based, select 2nd , 3rd need select eq(1),eq(2)... here fiddle

groupingBy & Java 8 - after groupingBy convert map to a list of objects -

is there way simplify , directly convert map got groupingby list of elements have key , values attributes? , not have 2 times conversions stream. what doing here fetch riskitems , map them dto, after need them grouped attribute riskitemdto - riskdto , these list of elements have riskdto , coressponding riskitemdtos elements.. riskitemrepositorycustom.findriskitemsbyrisktypename(risktypename) .stream() .map(mapper::maptodto) .collect(groupingby(riskitemdto::getrisk)) .entryset() .stream() .map( entry -> new riskwithriskitemsdto(entry.getkey(),entry.getvalue())) .collect(collectors.tolist()); no, 2 separate stream operations; result of grouping input second pipeline. i know lots of people try make game out of "use few semicolons possible", goal should readability , clarity, not concision. in general, think better honest going on, , write 2 separate stream operations: m...

ios - In Realm, Is there any way to make a custom array of database rows that I can still Query? -

if need custom build list of database rows because can not query (i need correlate external data), there anyway make resulting rlmarray able queried? when run following line: return [all_matches objectswhere:@"rootguid == ''"]; i following exception: this method can called on rlmarray instances retrieved rlmrealm the thing can think of have empty column can manually flag it, seems bit outrageous. i found decent way around this. instead of collecting instances in rlmarray, collected primary key within nsarray. then, when want rlmresult specific values found, call. [myrealmtable objectswhere:@"primarykey in %@", collected_key_array];

Git submodules peer2peer workflow -

i have tools collection sync between computers via git pull on remote repo working tree. whenever of tools have git source add them 'git submodule add' . sometimes small modifications, compile tools, , add want commit in git repo - aim use them fast possibility recompile. proper workflow that? if start with: modulepath/submodulepath/bin$ git add submodulefile modulepath/submodulepath/bin$ git commit -m "subfix" modulepath/submodulepath/bin$ git pull origin master modulepath/submodulepath/bin$ cd ../../ modulepath/$ git add submodulepath;git commit -m "subfix in sub" then commit subfix propagated after pull main repo ? i've read here git submodule update need commit first submodule. fact commit won't pushed submodule origin want sync change between hosts sharing main module, how proceed? possible overlay changes in submodule main module? or can start submodule branch without upstream url - fetched/merged parent main module. bu...

javascript - AngularJS: how to change button text onclick rendered using ng-repeat -

i have following html + angularjs code: <table class="table table-hover"> <thead> <tr> <th width="80%">task</th> <th width="10%">delete</th> </tr> </thead> <tbody> <tr ng-repeat="task in task_list track $index"> <td>{{task.title}}</td> <td> <button ng-click="delete_task($index)" class="btn btn-success btn-xs">completed</button> </td> </tr> </tbody> </table> this generate list of task in following image: view image when click on "complete" button sending http request server, , part working fine. trying achieve is, when click on button button text should change 'please wait'. how can achieve using angularjs without using jquery. you can this. foll...

Passing a variable between Python functions -

i new python , coding , trying figure out how pass result of 1 function calling function variable passed can used within calling function. in code below, error states that: global name 'quiz' not defined. my intent pass string printed based upon user input. difficulty = raw_input("please enter level of difficulty: easy, medium, or hard: ") def test_method(difficulty): if difficulty == 'easy': quiz = "yup - quiz me" else: quiz = "nope - yikes!" return quiz i've tried using print quiz here , expected string prints. pass quiz variable calling function , print result there. def test_call(difficulty): test_method(difficulty) print quiz test_call(difficulty) just assign , / or return quiz def test_call(difficulty): quiz = test_method(difficulty) print quiz return quiz

php - How to hide, pre-set and disable a select tag -

how hidden select option tag . when try put hidden in select can still see in php page don't know why ? input tag easy hidden select option difficult hide <select type="hidden" style="text-color:white;"name="syearid" class="select2_group form-control" style="text-align:center;" > <?php $yearnow=date('y'); include('../connection/connect.php'); $result = $db->prepare("select * school_year"); $result->bindparam(':syearid', $res); $result->execute(); ($i=0; $row = $result->fetch(); $i++) { $isselected = (($yearnow=date('y') == $row['from_year']) ? " selected" : ""); echo "<option style='text-color:white;' val...

ruby - Generate Rows And Columns from Rails Console -

i have small predicament. i have table called users. table users has relationship table called user notification. here migration user table: create_table "user_notifications", force: :cascade |t| t.belongs_to :user t.integer "other_user" t.integer "unseen_count", default: 0 t.datetime "created_at", null: false t.datetime "updated_at", null: false end the problem when create new user table populated row of new user. how add row existing users. needed function of app. using putty connect server tool have rails console. example: have 60 users. how have 60 users row in new table using rails console. edit: method use whenever user signed up. can use method within rails console or create deviation of this? user.rb: after_create :create_user_notification def create_user_notification usernotification.create(:user_id => self.id) end thank in advance. ...

c# - Containing type does not implement interface IMessageFilter -

i'm still trying find out happening error: ocr.test.imessagefilter.prefiltermessage(ref system.windows.forms.message): containing type not implement interface system.windows.forms.imessagefilter here codes: bool imessagefilter.prefiltermessage(ref message m) // error line { twaincommand cmd = tw.passmessage(ref m); if (cmd == twaincommand.not) return false; switch (cmd) { case twaincommand.closerequest: { endingscan(); tw.closesrc(); break; } case twaincommand.closeok: { endingscan(); tw.closesrc(); break; } case twaincommand.deviceevent: { break; } case twaincommand.transferready: { arraylist pics = tw.transferpictures(); endingscan(); tw.closesrc(); picnumber++; (int = 0; < pics.count; i++) { ...

extjs - Display validation errors in a div with extjs4 -

i'm trying add validations form (which has few mandatary fields , few alpha , max length validation). need display error messages(how many might be) in top left of form have div id. i'm not sure start first try validation. 1 post simple example or example in net (i had searched lot not able find match need) can start with...pls help... links may read : ext.form.basic ext.form.field.field geterrors method advanced validation examples using vtypes an example of can ( live example here ) : var errors = []; var fields = form.getfields(); // form : ext.form.basic var errorstpl = new ext.xtemplate( '<ul><tpl for="."><li>{field} : {error}</li></tpl></ul>' ); fields.each(function (field) { errors = errors.concat(ext.array.map(field.geterrors(), function (error) { return { field: field.getname(), error: error } })); }); errorstpl.overwrite('myoutputdiv', errors);

compiler construction - Sass --watch in particular order -

in textmate, .scss files in alphabetical order. compile them .css files. sass --watch css/sass:css/compiled i'm getting errors though because need variables, mixins , resets compiled first, followed rest of files. how can set order in files compiled? you have file structure this: css/sass/main.scss css/sass/mixins.scss css/sass/print.scss css/sass/reset.scss css/sass/variables.scss those files called partials . thing need add _ (underscore) before each filename, this: css/sass/_main.scss css/sass/_mixins.scss css/sass/_print.scss css/sass/_reset.scss css/sass/_variables.scss this tell sass not compile files separate .css files. now want compile them single file. create new file, style.scss (without underscore) here: css/sass/style.scss open , put partial files in desired order there: @import "variables"; @import "mixins"; @import "reset"; @import "main"; @import "print"; note underscore @ beggi...

Understanding the order of execution in a CSS stylesheet -

consider following css stylesheet: #start_experiment_button { display: inline-block; color: black; border: 3px outset gray; background-color: #cccccc; padding: 8px; text-decoration: none; font-family: arial, helvetica; font-weight: bold; } #start_experiment_button:hover { border: 3px inset gray; } #start_experiment_button:active { border: 3px inset gray; } #start_experiment_button { display: none; } notice display property of #start_experiment_button defined twice. serve purpose? second definition over-ride first, such first need not have been written @ all? or intervening definitions hover , active somehow influence when 2 display values take effect? the last rule #start_experiment_button { display: none; } overrides first one. hence element not shown @ all. because element invisible both :hover , :active not applied. note more specific selector higher priority rule has. if element visible rules defined selectors...

Is there an easy way to check library compatibility with Django versions? -

i have inherited django application on 1.4 (so no longer officially supported). working way through django versions, upgrading application , many of libraries used in application quite old versions well. is there easy / standard way know versions of library compatible specific django releases?

oracle - can a timesten replication agent hold deadlock to itself? -

i experiencing strange issue, timesten subdaemon core dumped, , in analysing tterrors log, find stream of lock errors, replication agent trying obtain lock held itself(see pids in below log message), cause ? can see logs @ least repeated next 7 minutes , lead core dump, has been problem timesten/oracle ? cannot find known bugs , , not able reproduce problem well under circumstances ,can replication agent lock self out ? , wouldnt release lock in case 15:59:23.89 warn: rep: 14037: collectordb:receiver.c(9880): tt6003: tt6003: lock request denied because of time-out details: tran 28.27845 (pid 14037) wants x lock on rowid bmufvuaaaaaachfk+g, table dbuser.customers. tran 7.327400504 (pid 14037) has in x (request x). holder sql () -- file "tindex.c", lineno 4429, procedure "sbtixnext()"

powershell - Dumping all variables to a text file -

i've made windows forms application seems create memory leak occasionally. there way dump variable information text file can through , see might causing this? get-variable lists variables values. there various ways of dumping information file, e.g.: get-variable | export-csv 'c:\variables.csv' get-variable | export-clixml 'c:\variables.xml' (get-variable | convertto-xml).save('c:\variables.xml') get-variable | convertto-json | out-file 'c:\variables.json' get-variable | format-table -wrap | out-string | out-file 'c:\variables.txt' ...

c# - Replace the string array value -

my string structure below. want insert new value in fourth position instead of old one.how can insert it. array structure : arr_val[0]="100"; arr_val[1]="300"; arr_val[2]="150"; arr_val[3]="360"; //i want replace value , insert 200 in array arr_val[4]="100"; arr_val[5]="300"; i can't sure fourth value may changed. like did when initialized arrayvariable can set new value: arr_val[3] = "200";

python - Modifying request.url without changing request.host -

i'm using mitmproxy python http proxy i run proxy following command: mitmdump -s proxy.py -u http://upstreamproxy the proxy.py following: #!/usr/bin/mitmdump __future__ import print_function import pprint import datetime import os import re pp = pprint.prettyprinter(indent=4) def request(context, flow): print("debug") oldhost = flow.request.host flow.request.url = re.sub(r"www.verycd.com",r"115.182.66.26",flow.request.url) # flow.request.host = oldhost #<---this modify url print("debug") what expect change www.verycd.com ip in url keep host field still using www.verycd.com, following: get http://115.182.66.26/ http/1.1 te: deflate,gzip;q=0.3 connection: te, close accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 accept-encoding: gzip, deflate accept-language: zh,en-us;q=0.5 host: www.verycd.com user-agent: mozilla/5.0 (windows nt 6.1; wow64; rv:43.0) gecko/20100101 firefox/43.0...

c# - Unable to create date with current time from string -

i taking selected date telerik date picker , want take selected date , current system time 24 hours format , want date this: for ex: current date = dd/mm/yy hh:minutes:seconds 21/1/2016 14:48:21 this code: datetime dt = datetime.parseexact(datepicker1.selecteddate.value.toshortdatestring(), "dd/mm/yyyy", cultureinfo.invariantculture);//error:string not recognized valid datetime. datepicker1.selecteddate.value= {1/21/2016 12:00:00 am} datepicker1.selecteddate.value.toshortdatestring()=1/21/2016 error : string not recognized valid datetime on datetime.parseexact . change format in parseexact from "dd/mm/yyyy" to "m/d/yyyy" or "m/d/yyyy h:m:s tt" //the first 1 use .toshortdatestring(), second 1 1/21/2016 12:00:00 the first 1 takes care case 21/12/1997 the second 1 takes care 12/21/1997 , 2/21/1997 , 12/2/1997 , , 2/1/1997 in addition take care of time info also, note may consider have multiple formats (just i...

How can I get mobile node IP address in OPNET 14.5? -

i tried following code in opnet modeler 14.5 objid addr_info_attr_objid; char address_string[128]; addr_info_attr_objid = op_id_self(); op_ima_obj_attr_get(addr_info_attr_objid, "address", address_string); to node ip address gives error message: <<<recoverable error>>> attribute name(address) unrecognizzed object(542) you have find proper ip interface first. based on code, not right way ip address of one-interface node, such server/client model. here sample code op_ima_obj_attr_get(ip_moudle_objid, "ip router parameters [0].interface information [3].address", &address_str);

sitecore8 - Master/Detail Dilema: Wildcard items vs Sitecore Pipeline for Virtual Items or any better idea? -

i used implement listing/detail scenarios using wildcard items, meaning that, sake of url, create regular item display list , under node, create wildcard item represent possible detail pages, like: /news/* (i generate friendly name code replace wildcard , produce full url such as: mywebsite.com/news/the-meeting-press-release) then create folder or bucket of content items somewhere else repository. assign same datasource listing node , wildcard node give them same repository of content items. main reason want use datasources , make navigational nodes (which generate actual pages , urls) separate content folder structure. in other words, separation of concerns: navigational items presentation nodes , content items data repository. this easy way work around master/detail requirements feel guilty this, feels technique breaks integrity (sitecore links table on database) , design pattern in sitecore back-end. for example when @ analytics, * name of items, feels aliens back-...

excel - Test for existence of Worksheet without using On Error Resume Next -

i use on error resume next in vba . it's lazy habit. the following autofit columns if sheet has not been deleted workbook - if has been deleted error raised , compiler moves next line of code. what other approach can use achieve same result? on error resume next bkexampleworkbook.sheets("foo").columns("e:g").autofit bkexampleworkbook.sheets("bar").columns("k:m").autofit on error goto 0 assuming working same sheet names , want resize them if exist can start function make easy see if exist , resize them if do: the basics function autofitsheetrange(objworkbook workbook, _ strsheetname string, _ strsheetrange string) boolean dim sheet worksheet, boolsheetfound boolean each sheet in objworkbook.worksheets if sheet.name strsheetname boolsheetfound = true exit end if next if boolsheetfound objworkboo...

Age Filter slider IOS -

Image
i want achieve in ios app. is there component available on github same? try nmrangeslider has got 2 ranges edges suitable age range slider

openssl CAPI Engine dll not generating in openssl version 1.0.1x -

i trying use capi engine using windows certificate store. openssl version used 1.0.1x . acc. knowledge version 0.9.8 , capi engine not compiled default have use switch enable-capieng compile , there no engine dll generated built libeay32.dll but in v1.0.1x , think capi engine compiled default , engine dll i.e capi.dll generated. in case not generated. possible reason ? should have use switch enable-capieng ?

Grails linking tables using pre-existing SQL join table -

i've got 3 tables, scenarios, forms , link table connect two, form can belong multiple scenarios, , scenario can have multiple forms, link table holds relationship information... how do in grails? can't alter structure of tables exist... :/ the structure of link table simply: form_id (matches pk of form table) test_scenario_id (matches pk on test scenario table) [order] (defines order in forms should display) within plain old sql can utilise join follows have no idea how translate groovy speak: - select lnk_scenario_form.test_scenario_id, dbo.lnk_scenario_form.[order], dbo.form.form_id dbo.form join lnk_scenario_form on form.form_id = lnk_scenario_form.form_id join dbo.test_scenario on dbo.test_scenario.test_scenario_id = lnk_scenario_form.test_scenario_id lnk_scenario_form.test_scenario_id = scenario id order lnk_scenario_form.[order]; here classes have set far: - class form { static constraints = { formdesc(blank:false,maxsize:100) } ...

iphone - Cocos2d Background image not showing properly on retina simulator and devices -

i have implemented below code in cocos2d showing background image , code working fine except in retina devices. background images not scaled or set properly. working fine on ipad 2 ios 6.0 not on retina ipad (3) 6.0 , retina simulators. have tried samples github , ray wonder -samples. codes have same issues. did face same kind of issue ? ccsprite *bg ; bg = [ccsprite spritewithfile:@"gamebgipad1.png"]; bg.anchorpoint = cgpointzero; [self addchild:bg z:-2]; i have included below lines enable retina display , added image name "gamebgipad1-hd.png" showing black background on retina after adding below code:- also included below code in app delegate:- if( ! [director enableretinadisplay:yes] ) cclog(@"retina display not supported"); both images not part of sprite sheet placed in images folder. cocos2d 1.0 : not supports ipad retina display. cocos2d 2.0 : use below naming convention. for ipad retina need put image ex...

objective c - iOS Storyboard: set ImageView width and height not work -

Image
i have image need display use uiimageview , use storyboard set view's height , width in size inspector , set view's horizontal centre in super view.but when click update frames in resolve auto layout issues ,it uses image resource size.how can ? my constraints you need add width , height constrains imageview.

java - i cant adding item to my jcombobox from my database -

i've been trying hours insert data jcombobox , frustates me can please me find error here's code import java.awt.borderlayout; import java.awt.eventqueue; import javax.swing.defaultlistmodel; import javax.swing.jframe; import javax.swing.joptionpane; import javax.swing.jpanel; import javax.swing.border.emptyborder; import javax.swing.jlabel; import javax.swing.jbutton; import java.awt.gridlayout; import java.awt.font; import java.sql.sqlexception; import java.util.vector; import javax.swing.jlist; import javax.swing.jtextfield; import javax.swing.jcombobox; import java.awt.event.itemlistener; import java.awt.event.itemevent; import java.awt.event.actionlistener; import java.awt.event.actionevent; public class staffeditdelete extends jframe { private jpanel contentpane; private jtextfield textfield; private jtextfield textfield_1; private jtextfield textfield_2; private jtextfield textfield_3; private jtextfield textfield_4; private jte...

parse.com - Most effective method of communicating between two android app installations -

i writing android app uses parse.com , pubnub together. app uses pubnub communicate between 2 installations. app ever need 1-on-1 communication. not chat, however. 1 installation send boolean (among other values) across pubnub installation picks , runs methods depending on values sent. sends other value across first install, responds values (all of not seen user). the above thing use pubnub for. have been looking parse push notifications , can see can send json data along push, interpreted receiving install. it apparently possible make notifications "silent", take advantage of. is there wrong removing pubnub altogether , relying on parse little back-and-forth between apps? pubnub realtime messaging mobile push fallback parse push is mobile push notifications (apns , gcm). if want/need realtime messaging, use pubnub mobile push fallback , continue use parse baas. if need mobile push , using parse, parse push should best option (for simplicity , economic...

flexbox - Angular Material nested layouts breaks md-content scrolling -

i make layout toolbar fixed on top, 2 side-by-side content scrollable sections on bottom. i can correctly create layout when md-content s nested under 1 div . example ( codepen ): <body ng-app="app" layout="column"> <md-toolbar class="md-whiteframe-z4">toolbar</md-toolbar> <div layout="column" flex> <md-content layout flex> <md-content flex="50" layout="column"> <md-content flex="50" layout="column"> however, if nested md-content under 2 or more div s breaks layout , causes content overflow out , causes entire page scrollable. example ( codepen ): <body ng-app="app" layout="column"> <md-toolbar class="md-whiteframe-z4">toolbar</md-toolbar> <div layout="column" flex> <div layout="column" flex> <md-content layout flex> ...

Usable space exhausted in flume using file channel -

i’m working on flume spool directory source,hdfs sink , file channel. when executing flume job. i’m getting below issue. memory channel working fine. need implement same using file channel. using file channel i’m getting below issue. i have configured jvm memory size 3gb in flume.env.sh file. please let me know other settings need do. 20 jan 2016 20:05:27,099 error [sinkrunner-pollingrunner-defaultsinkprocessor] (org.apache.flume.sinkrunner$pollingrunner.run:160) - unable deliver event. exception follows. java.lang.illegalstateexception: channel closed [channel=artiva-memory-channel]. due java.io.ioexception: usable space exhausted, 427515904 bytes remaining, required 524288000 bytes file channel has nothing memory hdd (disk). such channel uses file system storing data. thus, check how free space available in disks checkpoint file , data files written (please, have on filechannel parameters).

Android paypal sdk Integration : Server communication error on the sandbox account -

Image
e/paypal.sdk: request failed server response:certificate pinning failure! peer certificate chain: sha1/sq+edyjo3zoeorzsec2jqv3g3l4=: cn=api-m.paypal.com,ou=cdn support,o=paypal\, inc.,l=san jose,st=california,c=us sha1/ucm4nf92oh7yvezetygw+brftb4=: cn=symantec class 3 secure server ca - g4,ou=symantec trust network,o=symantec corporation,c=us pinned certificates api-m.sandbox.paypal.com: sha1/u8i+kquzkhcdrt6itb30i70gsd0= sha1/7q3i1izteynygv4tw/zfennnuxq= sha1/syeighmkwjqf+uivkmekyzs0rmc= sha1/gzf+yovcu9bxedgq7jgqvumruem= 01-21 13:04:51.999 20902-20902/sprittle.com.sprittle e/paypal.sdk: server_communication_error version 2.13.0 of paypal android sdk should fix issue. paypal sandbox upgraded allow tls 1.2 , made other pre-emptive security updates ahead of pci compliance requirements. can find out more details @ infocenter microsite .

java - Using subtype for parameter in method override -

public abstract class sequenceitemholder { public sequenceitemholder(view itemview) { } public abstract void setdata(sequencerowelement.rowelement rowelement); public static class testeitemholder extends sequenceitemholder { public testeitemholder(view itemview) { } @override public void setdata(sequencerowelement.testrowelement rowelement) { } } } please can explain me why compile error in override? please how fix (without using interface)? note: testrowelement extends rowelement error 1 public sequenceitemholder(view itemview) { super(itemview); } object doesn't have constructor taking view parameter. remove super call. error 2 public abstract void setdata(sequencerowelement.rowelement rowelement) {} abstract methods should not have body. replace this: public abstract void setdata(sequencerowelement.rowelement rowelement); error 3 your overriden method should have sam...

c# - Can I change all solution's projects output paths simultaneously in VS12/10? -

i have solution on 61 projects. there 3 target platforms: 'debug', 'release', 'release tablet' there 2 solution platforms: 'x86' , 'any cpu' i want projects build in 2 folders: d:\samplepath\debug\ 'debug' configuration on platform 'x86' , 'any cpu' d:\samplepath\release\ 'release' , 'release tablet' configurations on platforms is there simple way manage of these paths rather setting them 1 one (it's 61x3x2 = 366 paths set !sic!)? in advance try (i run code in linqpad, can create console app if like): const string xmlns = "http://schemas.microsoft.com/developer/msbuild/2003"; void main() { var dir = @"c:\proj\catalyst\source"; var xmlns = "http://schemas.microsoft.com/developer/msbuild/2003"; foreach( var configfile in directory.enumeratefiles(dir,"*.csproj",searchoption.alldirectories)) { var doc =...

java - Does @Transactional annotation work if autocommit is true? -

would roll work if auto commit turned on? if not implications of turning auto commit off? @transactional(rollbackfor = {managerexception.class}) public mymethod()....{ system.out.println(my_spring_stored_procedure.getdatasource() .getconnection().getautocommit()) //true .... try { result = this.my_spring_stored_procedure.execute(params); }catch(dataaccessexception e){ throw new managerexception(e); } } yes. if check code, find when spring uses kind of way transaction. if config auto commit true, change false , after transaction change true.

python - Compare groups of 4 characters to see if they're the same in a string -

i'm trying use python compare 2 strings , see if of them have common groups of 4 letters. sequence1 = "acacgcgtctccttgcgggtaaat" sequence2 = "gttaccaatttcttgtttccgaat" in range(0,24,4): print list1.append(sequence1[i:i+4]) in range(0,24,4): print list2.append(sequence2[i:i+4]) but doesn't seem it. want return groups of letters equal in both strings, ideas? you can iterate on groups of 4 using list comprehension slicing. have edited sequences contain 2 common 4 letter elements: s1 = "acacgcggtctcttgcgggaaatt" s2 = "gttaccaatttcttgcttccaaat" c = [s1[i:i+4] in range(0, len(s1), 4) if s1[i:i+4] in s2] the list c contains common entries: ['ttgc', 'aaat'] do note, not discriminate on position; if required change if statement in list comprehension define that: c = [s1[i:i+4] in range(0, len(s1), 4) if s1[i:i+4] == s2[i:i+4]] now contains ['ttgc'] .

php - L5 Form Model Binding with multiple Parameter -

Image
how make form::model multiple parameter? have example route this. www.domain.com/product/2/product-attributes/3/edit in normal form can this: <form method="post" action="{{ route('product.{product}.product-attributes.update', [$product->id, $product-attribute->id ]) }}"> </form> but if im trying use laravelcolective/html form::model() this: form::model($productattributes, array('method' => 'post', array('route' => array('product.{product}.product-attributes.update', [$product->id, $product-attribute->id ]))) i error array string conversion... ==== update ============== my routes: route::resource('backend/product', 'backend\productcontroller'); route::resource('backend/product/{product}/product-attributes', 'backend\productattributescontroller',['except' => ['index']]); ===== update 2 ========================= already solved p...

asp.net mvc - Scheduled task on Azure that runs a webpage with javascript -

i have data-driven view on azure site renders lot of javascript/ css / xml , html third party plugin , generates pdf emailed user. i need call page on weekly schedule each user - , azure jobs it's straightforward set up. there no javascript engine render code generates pdf, options? would have go down route of installing nodejs on azure instance? if steps , other modules required. the site running mvc c# , has sql end. cheers pointers. if code need run can factored / extracted node.js app, can run scheduled azure webjob . can find details on how here . don't need install node.js - it's installed on azure app service workers. one thing note webjobs run execution sandbox (details here ) , there restrictions on allowed run in sandbox. you'd have experiment see if pdf library runs there. for example, 1 of popular libraries pdf generation wkhtmtopdf not work on azure app service. so post discusses in more detail. 1 user has hosted wkhtmtopdf on az...

python - Restrict access to only owned content django -

i'm writing api using django-tastypie . have 2 custom permisions issues i'm hoping django-guardian can fix. i have 2 user groups clinicians , patients. clinicians should able access objects belonging patients , patients should able access objects created themselves. my code follows: class userresource(modelresource): class meta: queryset = user.objects.all() resource_name = 'auth/user' excludes = ['email', 'password', 'is_superuser'] class blogpostresource(modelresource): author = fields.toonefield(userresource, 'author', full=true) class meta: queryset = blogpost.objects.all() resource_name = 'posts' allowed_methods = ["get", "post"] # add here. authentication = basicauthentication() authorization = djangoauthorization() filtering = { 'author': all_with_relations, } how can us...

Why Android layout inflater is inflating blank space? -

i'm trying inflate layout on onpostexectue method of asynctask, nothing gets displayed, think view gets inflated because parent scrollview's size increases. why nothing visible? here i'm doing in onpostexecute method: linearlayout rootview = (linearlayout) getactivity().findviewbyid(r.id.root_view); view child = getactivity() .getlayoutinflater() .inflate(r.layout.layout_child, rootview, false); rootview.addview(child); child layout inflated: <?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center_vertical" android:orientation="horizontal"> <imagebutton android:layout_width="wrap_content" android:layout_height="wrap_content" androi...

ruby on rails - simple_form custom wrapper with a plain radio button -

Image
i trying make custom wrapper hybrid form this: the idea here there radio buttons enable either date picker, occurrences or indefinite. have these manually created , trying make custom simple form wrapper avoid hassle of adding tons of code simple input. second occurrence input 1 can't quite right. here html form shown: <div class="form-group radio_buttons required work_order_end_task"> <label class="radio_buttons required col-sm-2 control-label"><i class="fa fa-check-circle text-danger"></i> end date</label> <div class="col-sm-2"> <div class="input-group"> <span class="input-group-addon border-none"> <input class="radio_buttons required" type="radio" value="date" name="work_order[end_task]" id="work_order_end_task_date"> </span> <input disabled="" type=...

asp.net mvc - DatePickerFor does not work -

i using telerik datepickerfor getting datetime value. here model class: public class kisi { [display(name="date1")] public datetime date1{ get; set; } [display(name = "date2")] public datetime date2 { get; set; } [display(name = "date3")] public datetime date3{ get; set; } } here view class: //most parts ommited brevity @model lojmanmvc.domain.kisi @{ viewbag.title = "kisiolustur2"; } <h2>kisiolustur2</h2> @using (html.beginform()) { @html.antiforgerytoken() @html.validationsummary(true) <fieldset> <!-- date1--> <div> <div class="editor-label"> <label>date1? </label> </div> <div class="editor-field"> @(html.kendo().datepickerfor(m=>m.date1) .name("dtpickermemuriyetbaslama") .min(new datetime(1900, 1, 1)) .max(new date...

Javascript/Jquery - Calculate values and show inside a div -

Image
i've got write down scheme show trying develop. can see in image below, there radio , select area. depending on users choice on both areas there different values consider in function. red values related dropdown list. if choose op1 , "a" on dropdown, "a" 2160. if choose op3 , "c" on dropdown, "c" 3888 , on. total shown inside #total div , values related choice on radio , dropdown shown inside other 2 divs #subradio , #subdrop (the value been added radio value). when tried solve end huge list of if's didn't worked @ all, ask guys on problem. just in case ask, i'll put here code started write: <form class="form-horizontal text-left" id="meishi"> <div class="form-group"> <div class="col-lg-2 topic"> <label>design</label> </div> <div class="col-lg-3"> <label class="radio-inline"> ...

android - parent-child relation NOT returning parent name using NavUtils.getParentActivityName(this) in child activity -

i have 1 activity called a . , starting activity b this intent i=new intent(getactivity(),b.class); i.putextra(bfragment.extra_crime_id, c.getmid()); startactivity(i); the above code assumed activity a parent of b . but when try access name of parent a in activity b this navutils.getparentactivityname(this) it giving me empty string. why this. when start new activity using intent, dont mean a parent of b how can access a name? how can create parent-child relationship? parent relations should marked on manifest, following code: <activity android:name=".b" android:parentactivityname="com.alex.myapp.mainactivity"> <!-- parent activity meta-data support 4.0 , lower --> <meta-data android:name="android.support.parent_activity" android:value="com.alex.myapp.mainactivity"/> </activity>

arrays - using window.open with knockout binding -

i'm using knockout's foreach loop fetches values array , displays in href tag. this works once use javascript's onclick (i need onclick using inappbrowser plugin mobiles) , uses variables inside it, doesn't work. see example here: <div data-bind="foreach: consumerdata" style="margin-bottom:100px;"> <table> <tr> <td colspan="2"> <p style="font-size:larger; margin-bottom:5px;"> <a style="text-decoration:none;" data-bind="attr: { href: 'http://domain:8080/dsservlet/'+$data[0]+'.png?key=dk188961' }, text: $data[1]" target="_blank" onclick="window.open('http://domain:8080/dsservlet/'+$data[0]+'.png?key=dk188961', '_blank', 'location=yes'); return false;"></a></p> </td></tr> </table> </div> as can see $data[0] works fine inside data-bind attribute. using same ...