Posts

linux - Best way to edit android shell files /system/bin/ in windows -

what simplest way edit android shell files in "/system/bin/ on windows without installing linux or cygwin or these? have checked out: atom editor - http://www.atom.io sublimetext - http://www.sublimetext.com/3 or notepad ++ - https://notepad-plus-plus.org/ all of these able open/edit .sh filetype

c# - MVVM Light create multiple instance of DataService -

right using mvvm light achieve mvvm pattern. in view create multiple tabs , bind them multiple instances of 1 viewmodel. achieve with: servicelocator.current.getinstance<viewmodel>(key); when this, every instance of viewmodel connected same 1 instance of dataservice registered in viewmodellocator: simpleioc.default.register<idataservice, dataservice>(); but want have every instance of viewmodel 1 instance of dataservice. why? because each instance of viewmodel has same function requires other data. how create in mvvm lights viewmodellocator new instance of dataservice when new instance of viewmodel? possible or isn't approach in mvvm pattern , failed understand dataservice correctly? you can use overloaded version of register method create multiple instances of data service. simpleioc.default.register<idataservice>(()=>new dataservice(),"viewmodel1"); simpleioc.default.register<idataservice>(()=>new dataservice(),...

mysql - I cannot assign a primary key or a foreign key in mysqldb, with python. -

i using mysqldb in python, , cannot create table primary or foreign key. can create table, since following works: theconn = mdb.connect('localhost', 'root', 'pw', 'db') thedb = theconn.cursor(); thedb.execute("create table hf_aum_returns ( \ fundid int not null , \ metric_type char(10) , \ metric_value float , \ datetime date )") however, when run following line: thedb.execute("create table hf_aum_returns_2 ( \ fundid int not null , \ metric_type char(10) , \ metric_value float , \ datetime date , \ constraint returns_pk primary key ( fundid , metric_type , metric_value , datetime )") i error telling me check syntax: _mysql_exceptions.programmingerror: (1064, "you have error in sql syntax; check manual corresponds mysql server version right syntax use near '' @ line 1") ugh. not bright. missed parenthesis, @ end of statement. (...been staring @ hour...) ...

charts - VBA error "Method or Data Memeber Not Found..." when using .chartdata -

hopefully can help. new , big picture trying alter data on existing chart on ppt slide data excel sheet. simple problem when try create new chart error: method or data member not found on line set gchartdata = mychart.chartdata why .chartdata not option in vba menu following mchart? running office pro plus 2010. have ms powerpoint 14.0 object lirary reference checked. thanks sub createchart() dim mychart chart dim gchartdata chartdata dim gworkbook excel.workbook dim gworksheet excel.worksheet ' create chart , set reference chart data. set mychart = activepresentation.slides(1).shapes.addchart.chart set gchartdata = mychart.chartdata ' set workbook , worksheet references. set gworkbook = gchartdata.workbook set gworksheet = gworkbook.worksheets(1) ' add data workbook. gworksheet.listobjects("table1").resize gworksheet.range("a1:b5") gworksheet.range("table1[[#headers],[series 1]]").value = "items" gworksheet.range(...

tomcat - Packaging using Maven -

i have java web application deployed using tomcat. want package tomcat root .war file using maven. can guide me through process? thank you create pom.xml file in root directory following code. <project xmlns="http://maven.apache.org/pom/4.0.0" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://maven.apache.org/pom/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelversion>4.0.0</modelversion> <groupid>package</groupid> <artifactid>artifactid</artifactid> <version>0.0.1-snapshot</version> <name>project</name> <packaging>war</packaging> <build> <plugins> <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-war-plugin</artifactid> <configuration> ...

Jenkins Git global timeout change -

Image
one of our jobs runs timeout @ following command: git checkout -f <commit> the timeout 10 minutes default. tried execute manually, takes bit more 10 minutes. set 20 minutes in job's configure menu, doesn't work. advanced checkout behaviours: timeout (in minutes) checkout operation: 20 our git plugin version 2.3.4. read posts downgrade version, can't try option (i'm not allowed), decided set global timeout value. can tell me how (in jenkins-slave.xml or command line)? my git plugin version 2.3.5 , below configurations works me. additional behaviours-->advanced checkout behaviours--> timeout (in minutes) checkout operation: 20

python - TypeError raised while trying to use range -

while i'm running following code shows typeerror : a = int(input("enter iteration value:")) b=[] c in range[0,a]: d=int(input("enter:")) b.append(d) f=0 e in b: f = f + e print f it shows following error enter iteration value:5 traceback (most recent call last): file "/var/app/eclipse/plugins/org.python.pydev_3.5.0.201405201709/pysrc/pydevd.py", line 1845, in <module> debugger.run(setup['file'], none, none) file "/var/app/eclipse/plugins/org.python.pydev_3.5.0.201405201709/pysrc/pydevd.py", line 1373, in run pydev_imports.execfile(file, globals, locals) # execute script file "/opt/odoo/v7.0_cust_mod/python/print.py", line 68, in <module> c in range[0,a]: typeerror: 'builtin_function_or_method' object has no attribute '__getitem__' you using wrong syntax range() function: for c in range[0,a]: note square brackets, should use parentheses...