Posts

Showing posts from August, 2010

Android M write to SD Card - Permission Denied -

Image
i'm trying copy file within application sd card, error eacces (permission denied) . os android m , have allowed runtime storage permissions (checked in app info). have set uses-permission in androidmanifest.xml <application>...</application> <uses-permission android:name="android.permission.read_external_storage" /> <uses-permission android:name="android.permission.write_external_storage" /> doesn't work if copy sd card source: data/user/0/com.example.myapp/cache/somefile.txt destination: /storage/1032-2568/somefolder/ error: java.io.filenotfoundexception: /storage/1032-2568/somefolder/somefile.txt: open failed: eacces (permission denied) works if copy internal storage source: data/user/0/com.example.myapp/cache/somefile.txt destination: /storage/emulated/0/somefolder/ code copy file source destination /* * below parameters have tried * * inputpath - data/user/0/com.example.myapp/cache or data/user/0/com.example.m

Merging/Combining an image and text file side by side -

Image
is there way combine 2 different files (text, image) side side? output image or pdf file etc...? have found methods similar image files , system automated using bash script. looking similar thing. have frames video file , respective sensors data in other text file. need combine image info along sensor data in 1 file. output image, pdf etc... image file having naming sequence 0001.png with imagemagick installed on linux distros , available macos , windows: start picture.jpg and text file called description.txt these funky cogs found on internet place. newlines ok, , text gets smaller more add. then this: # width , height of picture read w h < <(convert picture.jpg -format '%w %h' info:-) # put text on grey background , append right of image convert -background lightgray -size ${w}x${h} -gravity center label:@description.txt picture.jpg +swap +append result.jpg there many other possibilities , techniques: geom=$(convert -format %g picture

python - Django using more than 1 package for admin site -

Image
i using 2 django packages: admin sortable (for changing order of models) , django import export (for importing csv directly models). the problem if add 2 packages model admin e.g. class categoryadmin(sortableadmin, importexportmodeladmin): they override each other. the buttons either show admin sortable or django import export. there anyway can integrate both of them together? alternatively, there package can swap out can achieve same functions (1. change order of models , 2. import csv directly models)

javascript - Array.from returns empty array -

Image
i trying filter children of div element. i direct access parent div via angular viewchild , if print children console.log(this.myparentdiv.nativeelement.children); i following output in chrome: i need convert array able filter divs. if convert console.log(array.from(this.myparentdiv.nativeelement.children)); it returns empty array. any idea why returns empty?

Dataload in Google BigQuery via java client -

i have written bigquery standard sql udf doing complex calculations , generation 45000 rows in 2 second. have requirement call udf java client , load data bigquery. please let me know fastest way bigquery load java client of 45000 rows.

html - Displaying an alert box of error message using CSS -

am creating login form on website whereby having trouble creating alert box @ top of form should display error messages after server-side validation , sanitization of user input.the problem when page loads, displays alert-box, while want display when displaying error messages. please assist? html part <!doctype html> <html> <head> <title>login form</title> <link href="style.css" rel="stylesheet" type="text/css"> </head> <body> <div class="form"> <span class="info"> <?php echo $fnameerr; $lnameerr; $emailerr; ?> </span> <br> <ul class="tab-group"> <li class="tab active"><a href="#signup">sign up</a></li> <li class="tab"><a href="login.php">log in</a></li> </ul> <di

objective c - CGColor to RGBA -

i have nsstring output in consolle: 2017-03-28 14:34:47.794794+0200 test[2647:240896] nscustomcolorspace srgb iec61966-2.1 colorspace 1 0 0 1 how convert in rgba value and/or nscolor in simple way nsstring? for (int = 0; < [arraycolors count]; i++) { nsstring *aaa = (nsstring*) [arraycolors objectatindex:i]; } i tried uicolor rgba values following: cgfloat r_fontcolor, g_fontcolor, b_fontcolor, a_fontcolor; [getlabel.textcolor getred:&r_fontcolor green:&g_fontcolor blue:&b_fontcolor alpha:&a_fontcolor]; hope works covert nscolor rgba values also.

python - Unable to Download file using flask with actual name -

i trying download file using flask. code follows @app.route('/download') def down(): rpm = request.args.get('rpm') root = '/home/rpmbuild/rpms/' return send_from_directory(root,rpm) the name of file passed in url. when hit url, able download file name of file in download . need actual name of file. have tried send_file() downloading name download . the "options" of send_from_directory same sendfile : flask.send_file(filename_or_fp, mimetype=none, as_attachment=false, attachment_filename=none , add_etags=true, cache_timeout=none, conditional=false, last_modified=none) so should call with: @app.route('/download') def down(): rpm = request.args.get('rpm') root = '/home/rpmbuild/rpms/' return send_from_directory(root,rpm, attachment_filename='foo.ext' ) where of course substitute 'foo.ext' name want give file. want set

c++ - Using a CListCtrl with Drag and Drop not working -

using visual studio 2017 trying enable drag , drop on clistctrl , have added code such as: on_wm_dropfiles() dragacceptfiles(); m_listctrl.dragacceptfiles(); void programnamehere::ondropfiles(hdrop hdropinfo) { cstring sfile; dword nbuffer = 0; // number of files dropped int nfilesdropped = dragqueryfile(hdropinfo, 0xffffffff, null, 0); (int = 0; i<nfilesdropped; i++) { // buffer size of file. nbuffer = dragqueryfile(hdropinfo, i, null, 0); // path , name of file dragqueryfile(hdropinfo, i, sfile.getbuffer(nbuffer + 1), nbuffer + 1); sfile.releasebuffer(); messagebox(pathfindfilename(sfile), pathfindfilename(sfile)); } // free memory block containing dropped-file information dragfinish(hdropinfo); cdialogex::ondropfiles(hdropinfo); } i able working when drop file onto dialog anywhere when try , drop onto list control doesn't work. would have idea doing wrong?

kendo UI grid - different behavior of filterable operators when disable them for one column -

as described in documentation of kendo ui can affect possible filter operators construct: filterable: { operators: { string: { isempty: "is empty", isnotempty: "is not empty", startswith: "starts with", contains: "contains", } }, }, with lines included in columns definition, 4 operators in dropdown select filtering. "is empty" works correctly. other 3 options no results. if delete these lines column definition of grid whole options filterable.operators.string. when select 1 of 4 options, shown above, works fine , result correct. why there different behavior between default operators column , when disabling of them? , how can correct behavior 4 operators? try putting startswith filter option first this: filterable: { extra: false, operators: { string: { startswith: "starts with", isempty: &q

python - If N is equal to an integer -

this question has answer here: checking whether variable integer or not 35 answers i'm writing function runs through list of elements, , operation on list elements integers. looks this: for n in list1: if n == int: #do stuff what i'm struggling how write out loop detect if element integer. should this? can't find in docs of python (although maybe haven't looked deep enough in). thanks help. use isinstance() function: for n in list1: if isinstance(n, int): # stuff

maven - How to deal with dependencies with "provided" scope in OSGi -

there lots of tutorials, shows how cope dependencies of osgi project , how should converted bundle. after more 1 day research, have still not found how deal dependencies provided scope. let me give example. using dropbox (dropbox-core-sdk 3.0) , has 2 dependencies ( com.google.android , javax.servlet ) provided scope. when use techniques such maven-bundle-plugin or bnd , downloads artifacts , transitive dependencies. however, need provided dependencies in order able import project osgi container. i using maven-bundle-plugin , pom.xml looks like: <build> <plugins> <plugin> <groupid>org.apache.felix</groupid> <artifactid>maven-bundle-plugin</artifactid> <extensions>true</extensions> <configuration> <instructions> <bundle-symbolicname>${project.artifactid};singleton:=true</bundle-symbolicname>

python - Parse a XML file and convert to Dict -

i need parse xml file , create equivalent dictionary same. i have gone through previous stack overflow question same. converting xml dictionary using elementtree now have xml content follows: <?xml version="1.0" encoding="utf-8"?> <data> <person> <first>john</first> <last>smith</last> <extra> <details1> <married>yes</married> <status>rich</status> </details1> </extra> </person> <person> <first>jane</first> <last>doe</last> <extra> <details1> <married>yes</married> <status>rich</status> </details1> <details2> <property>yes</property> </details2> </extra> </person> </data> it returning output follow

dynamic WPF ContextMenu -

i have wpf , dynamic contextmenu. have menuitem1.click , menuitem2.click. contextmenu contextmenu = new contextmenu(); menuitem mitem1 = new menuitem() { header = "mitem1" }; mitem1.click += new system.windows.routedeventhandler(mitem1_click); menuitem mitem2 = new menuitem() { header = "mitem2" }; mitem2.click += new ystem.windows.routedeventhandler(mitem2_click); now when call private void mitem_click(object sender, routedeventargs e) { //need put mitem1.enabled=false , mitem2.enabled = false } how do this? use contextmenu.items , what? ` since creating menuitem objects dynamically, keep reference them using 2 private fields. can access them directly in event handlers: public partial class mainwindow : window { menuitem mitem1; menuitem mitem2; public mainwindow() { initializecomponent(); contextmenu contextmenu = new contextmenu(); mitem1 = new menuitem() { header = "mi

c# - ASP.NET Identity - can't register UserTokenProvider -

Image
i have issue generating reset password token in asp.net core 1.0 project: startup.cs public void configureservices(iservicecollection services) { ... services.addidentity<userdb, groupdb>() .adddefaulttokenproviders() } then in controller di: ... usermanager<userdb> usermanager ... string token = await usermanager.generatepasswordresettokenasync(user); and no iusertokenprovider named 'default' registered. how fix ? i can see there's no providers inside of userstore constructor: i noticed userstore class didn't have iusertokenprovider interface implementation. also, in applicationusermanager class constructor, check if tokenproviderdescriptor registered public class applicationusermanager : usermanager<userdb> { public applicationusermanager(userstore store, ioptions<identityoptions> optionsaccessor, ipasswordhasher<userdb> passwordhasher, ienumerable<iuservalidator<u

url rewriting - DNS - URL re-write? -

we have requirement re-write url on our website hosting provider. have our main website sits on .net server , want /blog folder point @ different hoster (a wordpress blog). we have looked @ several options, including our load balancer, not task. is functionality available through dns providers?

Installing MVC on asp.net Core in visual Studio 2015 -

Image
i created empty asp.net 5 work .net core. trying add mvc package application receiving error versions not compatible, although tried lots of mvc versions. anyone has idea problem? thank you! if you're working .net core should using microsoft.aspnetcore.* packages. ( microsoft.aspnet.* packages target full .net framework.) your screenshot shows dependency on dnx. realize that's pre-release technology? don't mean rude i'm curious why targeting pre-release framework rather rtm (which has been available several months). if want work prerelease bits, may need tweak nuget feeds able see appropriate .net core packages (i had when working .net core betas).

java - How to get content from span with Jsoup -

i using jsoup html parser extract content html page. <span class="mainprice reduced_"> <span class="oprice" data-test="preisartikel"> <span itemprop="price" content="68.00"><span class="opriceleft">68</span><span class="opriceseparator">,</span><span class="opriceright">00</span></span><span class="opricesymbol opricesymbolright">&euro;</span> i want extract content (68.00) , tried following: elements price = doc.select("span.oprice"); string pricestring = price.text(); that doesn't work because class "oprice" occurs 44 times in page , string "pricestring" contains 44 different prices. thank help. try this: //for 1 element element elements = document.select("span[content]").first(); system.out.println(elements.attr("

c++ - function ... has already a body & function template has already been defined -

i have header file: utility.h: #pragma once #include <fstream> #include <iostream> #include <string> #include <vector> #include <windows.h> using namespace std; template<std::size_t> struct int_ {}; template <class tuple, size_t pos> std::ostream& print_tuple(std::ostream& out, const tuple& t, int_<pos>); struct timer { public: timer(); void start(); double getmillisec(); private: large_integer frequency; // ticks per second large_integer t1, t2; // ticks }; //... #include "utility.cpp" and implementation file: utility.cpp: #include "utility.h" template <class tuple, size_t pos> std::ostream& print_tuple(std::ostream& out, const tuple& t, int_<pos>) { ... } timer::timer() { // ticks per second queryperformancefrequency(&frequency); } void timer::start() { queryperformancecounter(&t1); } double time

angular - Ionic 2 GET http://localhost:8100/search/aq?query= 404 (Not Found) -

Image
i want make simple app http request have , issue cors in ionic 2. firstly, have changed ionic.config.json { "name": "weatherapp", "app_id": "", "v2": true, "typescript": true, "proxies": [ { "path": "/api", "proxyurl": "http://api.wunderground.com/api" }, { "path":"/search", "proxyurl": "http://autocomplete.wunderground.com" } ] } weather.service.ts import {injectable, inject} '@angular/core'; import {http} '@angular/http'; import {observable} 'rxjs/observable'; import 'rxjs/rx'; @injectable() export class weatherservice { http: any; searchurl: any; apikey: string; conditionsurl: string; static parameters(){ return [http]; } constructor(http){ this.http = http; console.log

android - Launcher and Home Application causes Samsung device to get stuck on reboot -

sorry long question , sorry if not right place post it. real question in end below. created application launcher application. here's code androidmanifest.xml <activity android:name=".ui.activity.mainactivity" android:excludefromrecents="true" android:label="@string/app_name" android:launchmode="singletask" android:configchanges="uimode|keyboard|keyboardhidden|orientation" android:screenorientation="sensorlandscape" android:theme="@style/apptheme.toolbar" android:windowsoftinputmode="adjustnothing"> <intent-filter> <action android:name="android.intent.action.main"/> <category android:name="android.intent.category.launcher"/> <category android:name="android.intent.category.default"/> <category android:name="an

javascript - jqgrid does not update value from textarea on editrow -

when inline edit row in jqgrid, put value rulefilter column in jqgrid textarea better editing. when edit rulefilter can see $('#rulefilter').val(); new value but, on controller in request value newfilter still same before edit. extraparam: { ajaxrequest: document.helper.getpagename(), screenmode: 'editassertion', listtable: $('#list').val(), newfilter: function() {return $('#rulefilter').val();} }, above extraparam editrow, think newfilter not changing edited value textarea, how can fix this? rulefilter assertion textarea.// think irelevant, still mention try returing value textarea editing grid

multithreading - recyclerView.adapter on notifydatasetchanged hangs the ui android -

this question has answer here: android “only original thread created view hierarchy can touch views.” 14 answers i having trouble updating recyclerview notify data set changed, since hangs ui couple of seconds upon called. after searching on net, suggested update adapter on background thread. private synchronized void updateadapter() { asynctask<void, void, void> task = new asynctask<void, void, void>() { @override public void doinbackground(void... params) { adapter.notifydatasetchanged(); return null; } }; task.execute(); } and upon running line of code, app crashed error, "only original thread created view hierarchy can touch views." and upon searching further, suggested solution run on ui thread. runonuithread(new runnable() { @override public void run() { } }); whic

amazon web services - Does the AWS Billing Management Dashboard take into account Free Tier usage -

about month ago opened aws account try out amazon's own tutorial ec2 services, give after encountering error. today accessed account once again, find out 3 tasks have been running in background whole month. billing management dashboard shows hefty total in upper right, in "free usage" tier exceeded entry s3 puts , of 10%. i can't seem find soruce anywhere in documentation explaining whether total billing in upper right takes account free tier or not . @ end of month, billed entirely or % difference? i'm more or less okay latter, can't afford former. i've opened support ticket right away, since i'm on basic plan i'm afraid might answer me after current bill becomes active. thank answers. you billed % difference. all services offer free tier have limits on can use without being charged. many services have multiple types of limits. example, amazon ec2 has limits on both type of instance can use, , how many hours can use in 1

powershell - How to run the Power Shell scripts from Automation Anywhere in Citrix? -

quick responses should appreciated.!!! answers related automation anywhere powershell can welcome.. thanks if aa installed in citrix should not problem can call type of script via aa scripts menu aa home. but if aa installed outside citrix, need rely on screen scraping / image recognizer.

sql server - Get the count in a separate column in SQL -

so have following table: ref| status op1|0 op2|2 op2|4 op2|5 op3|7 op3|6 as can see, there 3 statueses op2 , 2 statuses op3. trying archive following: ref| status | count op1|0 |1 op2|2 |3 op2|4 |3 op2|5 |3 op3|7 |2 op3|6 |2 count being number of status each ref. i have provided sql not sure going wrong? select ref,status, (select count(status) orders status > 0 group ref) orders i using sql server 2008. use count() over() select ref,status, count(*) over(partition ref1) orders to count status > 0, above query can changed to select ref,status, count(case when status>0 1 end) over(partition ref1) orders

erlang - Is the Broker able to Block unwanted topic spammers? -

Image
i have mqtt environment this: there 1 (gray) sensor , 1 observer related topic room/temp , far good, sensor can publish , observer can info should. the issue have now: need block in broker 2nd undesired client comes(the orange one),and start publish same topic, far know, mqtt loose coupled observer doesn't care pushing temp values, find security flawless when hack environment , publish non sense triggering alarms... any suggestion? am using emqttd way , according this there nothing in etc/emqttd.config file can avoid that... thanks! i have experience mosquitto but, quick read of document linked, looks there several ways achieve this. i unclear if talking incidental problem here--i.e. bad information being accidentally sent--or if protecting against active threat. if concerned incidental overwriting of value, simple clientid solution on (pg. 38) work. but impression still transmitted in clear , of little use if facing actual adversary (hacker etc.).

php - QueryBuilder: [Semantical Error]: 'partshade' is not defined -

whenever try concatenate query existing query, error ['partshade not defined']. 'partshade' 1 of array elements represented 'x'. $repository = $this->getdoctrine()->getrepository('appbundle:shrubs'); $query = $repository->createquerybuilder('p'); $shrubs = $query ->where($query->expr()->like('p.botanicalname', ':botanicalname')) ->setparameter('botanicalname', '%' . $botanicalname . '%') ->andwhere($query->expr()->like('p.commonname', ':commonname')) ->setparameter('commonname', '%' . $commonname . '%') ->orderby('p.commonname', 'asc'); $checkfor = array( "wetsoil" => "tolerates wet soil", "borderlinehardy" => "borderline hardy", "moistsoil" => "prefers moist soil", "peatysoil"

jquery - All my functions don't seem correct -

i posting broad question here , might seem quite challenge people. appreciated. i busy building small web app displays different news articles via ajax , json. i have made search feature populates various posts based on user input. problem facing lazy loading trying build. think problem starts way before execute lazy load function. when execute getposts function when reach 100 pixels above bottom of screen, getposts function seems append multiple times rather once new set of data. more piece of code here - //lazy load $(function ($) { $(window).scroll(function () { if ($(window).scrolltop() + $(window).height() > $(document).height() - 100) { getposts(str); changepage = '2'; } }); }); this gives me result of more 1 page being appended , think has getposts function. i hoping bit more knowledge me maybe take @ code, maybe sift through , criticise have done. maybe suggest better/the right way things. my artic

jsf - commandButton/commandLink/ajax action/listener method not invoked or input value not set/updated -

Image
sometimes, when using <h:commandlink> , <h:commandbutton> or <f:ajax> , action , actionlistener or listener method associated tag not being invoked. or, bean properties not updated submitted uiinput values. what possible causes , solutions this? introduction whenever uicommand component ( <h:commandxxx> , <p:commandxxx> , etc) fails invoke associated action method, or uiinput component ( <h:inputxxx> , <p:inputxxxx> , etc) fails process submitted values and/or update model values, , aren't seeing googlable exceptions and/or warnings in server log, not when configure ajax exception handler per exception handling in jsf ajax requests , nor when set below context parameter in web.xml , <context-param> <param-name>javax.faces.project_stage</param-name> <param-value>development</param-value> </context-param> and not seeing googlable errors and/or warnings in browser's jav

java - JavaFX lineChart issue -

i have following code: final treemap<integer, double> adlmap = new treemap<>(); public static void main(string[] args) { launch(args); } @override public void start(stage stage) { final string currency = "currreny"; adl(currency); stage.settitle("line chart sample"); //defining axes final numberaxis xaxis = new numberaxis(); final numberaxis yaxis = new numberaxis(); xaxis.setlabel("number of month"); //creating chart final linechart<number, number> linechart = new linechart<number, number>(xaxis, yaxis); linechart.settitle("stock monitoring, 2010"); //defining series xychart.series adlchart = new xychart.series(); xychart.series regularchart = new xychart.series(); adlchart.setname("my portfolio"); chartmap.entryset().foreach(entry -> regularchart.getdata().add(new xychart.data(entry.getkey(), entry.getvalue()))); //populati

python - Error calling a script from another script -

i trying automate script .jpg files in folder. should happen 5 images should open. instead happens 5 command windows open , close. this code automation script: import sys, os, glob path = 'c:/users/telli/desktop/test shapes/shapes/squares' filenames = glob.glob(path + '/*.jpg') filename in filenames: os.system("test.py") and code test.py being automated: import cv2 img = cv2.imread("c:\\users\\telli\\desktop\\test shapes\\shapes\\squares\\squares1.jpg") #converting image grayscale grey = cv2.cvtcolor(img, cv2.color_bgr2gray) ret,thresh = cv2.threshold(grey,127,255,1) im2,contours, h = cv2.findcontours(thresh, 1, cv2.chain_approx_simple) contours.sort(key = len) cv2.imshow('img',img) cv2.waitkey(0)

python - Do datetime objects need to be deep-copied? -

so noticed other week through running experiment, that, despite being high-level language, while can make copies of variables assigning them this: a = 5 b = print(b) # 5 b = 3 print(b) # 3 print(a) # 5 ...if treat dictionaries or possibly lists same way, comes unstuck! created bug in code other week thinking dictionaries worked same way.. found out make proper, deep copy need go: b = dict(a) anyway, i'm busy datetime objects , i'm manipulating them around if integers, starting bit nervous whether okay. seems bit arbitrary works , doesn't, have run experiment every time check behaviour? can guess strings work integers not sure behaviour changes. can see has asked about php python i'm inclined think assignment of datetime object proper, deep copy , never mess accidentally original variable. know sure? since available types in datetime module documented being immutable (right after documentation of classes stated): objects of these type

why form not submit in laravel 5.4 -

i have form user registration, working perfect before not submit , doesn't error. tried show post data not post data.. please <form role="form" id="reg-form" method="post" class="form-horizontal" action="{{ url('/create_user') }}"> {{ csrf_field() }} <h2>create account</h2> <div class="form-group"> <div class="col-sm-6" id="user-firstname"> <input type="text" class="form-control" id="firstname" name="firstname" placeholder="first name" required="required"> </div> <div class="col-sm-6"> <input type="text" class="form-control" id="lastname" name="lastname" placeholder="last name"> </div> </div> <div class="form-gro

facebook - How to include meta tags dynamically in react js? -

i using reactjs , want share content in facebook,it happening after sharing not showing images,title,description of content. used react-helmet dynamically add meta tags in index.html. <helmet> <meta property="og:type" content="video.other" /> <meta property="og:image" content="https://www.w3schools.com/css/trolltunga.jpg" /> <meta property="og:title" content="my title" /> <meta property="og:url" content="https://www.afnity.com/video/155" /> <meta property="og:description" content="some discription of shared content" /> </helmet> and here share button <button> <a title="dummy" href="http://www.facebook.com/sharer.php? u=https://dummy.com/videos/id=25" target="_blank"> share</a> </button> but not working. replace helmet component below code. <helmet

concatenation - Create view to allow certain fields - SQL -

my table includes fname,lname,studentid,major1,major2,minor attempting create 2 different create view tables different restrictions. first one, view table need show me names of students majoring in business classes. how able query include example - eco, fin, acc not include non-business majors example bio, chem. create view a7t6 select fname || ' ' || lname "student", studentid "id", gpa, upper(minor) "minor" a7 what statement be? since question includes 2 major columns "major1" , "major2", might require minor modification gurv's script. e.g.: create view a7t6 select fname || ' ' || lname "student", studentid "id", gpa, upper(minor) "minor" a7 major1 in ('eco', 'fin', 'acc') or major2 in ('eco', 'fin', 'acc'); for non-business case, might better alter clause use not in rather enumerate possible negative ca

decompression - Inno Setup - How to add multiple arc files to decompress? -

i using code: inno setup - how add cancel button decompressing page? (answer of martin prikryl) decompress arc file inno setup. i want have possibility of decompress more 1 arc file install files components selection (for example). still show on overall progress bar extractions. whole possible? this modification of answer inno setup - how add cancel button decompressing page? prerequisities same, refer other answer. in extractarc , call addarchive each archive want extract. [files] source: unarc.dll; flags: dontcopy source: innocallback.dll; flags: dontcopy [code] type tfreearccallback = function(what: pansichar; int1, int2: integer; str: pansichar): integer; function wrapfreearccallback(callback: tfreearccallback; paramcount: integer): longword; external 'wrapcallback@files:innocallback.dll stdcall'; const arccancelcode = -10; function freearcextract( callback: longword; cmd1, cmd2, cmd3, cmd4, cmd5, cmd6, cmd7, cmd8, cmd9, cmd10: pa