input
stringlengths
10
828
output
stringlengths
5
107
public void set company facade company facade company facade test manager tm test manager get instance log assert ass new log assert ass set ldao company facade get postgre factory get log dao tm set assertive ass this company facade company facade
setter of the property tt company facade tt
public void set login result string login result this login result login result
setter of the property tt login result tt
public void set file list array list file list this file list file list
sets the file list to compress into the zip file
public void set zip file name string zip file name this zip file name zip file name
sets the output zip files name
public boolean start zip process try create the zip file this out new zip output stream new file output stream this target path this zip file name this on processing true catch file not found exception ex logger get logger zip files class get name log level severe null ex return false return true
starts the actual zip process
public int get current file idx return current file idx
returns the current index pointer to file list
public int get file count to go if this file list size 0 return this file list size this current file idx else return 0
return the number of files to go still
public int geti history amount return i history amount
returns the amount of old backup files to save
public void seti history amount int i history amount this i history amount i history amount this properties set property history string value of i history amount this save config
set the number of backup files to store
public string get str event span return str event span
returns the value of time span between the backup events
public void set str event span string str event span this str event span str event span this properties set property event span str event span this save config
set the value of time span between the backups
public string get str no backup pattern return str no backup pattern
returns the no backup string
public void set str no backup pattern string str no backup pattern this str no backup pattern str no backup pattern this properties set property no backup str no backup pattern this save config
sets the no backup parameter
public string get str source return str source
returns the source directory
public void set str source string str source this str source str source this properties set property source str source this save config
sets the source directory
public string get str target return str target
returns the target directory
public void set str target string str target this str target str target this properties set property target str target this save config
sets the target directory
public string get str last run return str last run
returns the last run value
public boolean save config try properties store new file output stream tiny backup properties null catch ioexception e return false return true
save config parameters to the file
public void store backup file string filename string old val for int i 9 i 0 i old val this str backup files i 1 this str backup files i old val this str backup files 0 filename for int i 0 i 9 i this properties set property backup file i 1 this str backup files i this save config
stores the new backup filename to parameters
public product info actor search string actor name string mode string page string search type actor search string type lite string offer all return generic search type actor name mode type page offer
search for an actor
public product info artist search string artist name string mode string page string search type artist search string type lite string offer all return generic search type artist name mode type page offer
search for an artist
public product info author search string author name string page string search type author search string type lite string offer all string mode books return generic search type author name mode type page offer
search for the author of books
public product info director search string director name string mode string page string search type director search string type lite string offer all return generic search type director name mode type page offer
search for the director of movies
public full product get full product from asin string asin string offer string page product product new product return product get product asin offer page
given an asin it will return a populated full product bean
public product info manufacture search string manufacture name string mode string page string search type manufacturer search string type lite string offer all return generic search type manufacture name mode type page offer
search by manufacture
public product info upc search string upc string mode string page string search type upc search string type lite string offer all return generic search type upc mode type page offer
search for cds by upc
public product info actor search string actor name string mode string page search search new search return search actor search actor name mode page
search for an actor
public product info artist search string artist name string mode string page search search new search return search artist search artist name mode page
search for an artist
public product info author search string author name string page search search new search return search author search author name page
search books for an author
public product info director search string director name string mode string page search search new search return search director search director name mode page
search for movie directors
public product info manufacture search string manufacture name string mode string page search search new search return search manufacture search manufacture name mode page
search by manufacture
public product info upc search string upc string mode string page search search new search return search upc search upc mode page
search by upc
public product info listmania search string list id search search new search return search listmania search list id
search for a listmania
public product info wish list search string wish list id search search new search return search wish list search wish list id
search for wishlist
public shopping cart addto cart string asin string quantity cart cart new cart return cart addto cart asin quantity
add to product to your shopping cart
public shopping cart add to existing cart string cart id string hmac string asin string quantity cart cart new cart return cart add to existing cart cart id hmac asin quantity
if you already have a shopping cart created add to it with this
public shopping cart clear cart string hmac string cart id cart cart new cart return cart clear cart hmac cart id
clear the shopping cart so that there is no items in it
public shopping cart modify cart string hmac string cart id string item id string quantity cart cart new cart return cart modify cart hmac cart id item id quantity
modify the cart by changing the quantity for an item in the cart
public shopping cart get items from cart string hmac string cart id cart cart new cart return cart get items from cart hmac cart id
get all of the items that are in the cart
public shopping cart remove from cart string hmac string cart id string item id cart cart new cart return cart remove from cart hmac cart id item id
remove an item from the cart
public void put named server string name string hostname named servers put name hostname
add or update named a server configuration
public void remove named server string name named servers remove name
delete a named server configuration
public string get named server hostname string name return named servers get name
get a configuration of named server
private runnable get command crontab crontab throws exception class clazz class for name crontab command class name runnable instance null try instance container adaptor get component clazz catch exception e log debug command class load failed class name clazz get canonical name if instance null instance runnable clazz new instance return instance
get runnnable class to invoke as command
public void edit cron tab string before string after if is already registered before remove crontab before add crontab after
modify crontab configuration
public boolean is already registered string line for crontab crontab crontab list if crontab line equals line return true return false
is already registered crontab configuration or not
public crontab find by line string line for crontab crontab crontab list if crontab line equals line return crontab return null
search the line in the already registered configurations
protected void logging at each invocation string message boolean is enabled container adaptor get scheduler config enable logging for each crond invocation if is enabled log info message
logging cron daemon invocation if enabled
public boolean timer start array mtime strings explode strval date time microtime timestart intval mtime get 1 intval mtime get 0 return true
timer start php 4 standard microtime start capture
public void shutdown action hook get included plugin page class do action shutdown get included cache page class wp cache close
shutdown action hook runs just before php shuts down execution
public std class get post to edit int id std class post null post std class get included org numiton nwp wp includes post page class get post id g consts get object edit if equal std class get post post type page post fields put page template get included org numiton nwp wp includes post page class get post meta id wp page template true return post
get an existing post and format it for editing
public array get meta keys array keys new array keys g vars wpdb get col n t t t select meta key n t t t from g vars wpdb postmeta n t t t group by meta key n t t t order by meta key return keys
get a list of previously defined keys
public int relocate children int old id int new id old id intval old id new id intval new id return g vars wpdb query update g vars wpdb posts set post parent new id where post parent old id
move child posts to a new parent
public array get udims int width int height return wp shrink dimensions width height 128 96
get udims calculated the new dimentions for downsampled images
public array wp shrink dimensions int width int height int wmax int hmax return get included media page class wp constrain dimensions width height wmax hmax
wp shrink dimensions calculates the new dimentions for a downsampled image
public void wp dashboard echo div id dashboard widgets n n we re already filtering dynamic sidebar params obove get included plugin page class add filter option sidebars widgets callback create callback array this wp dashboard sidebars widgets 10 1 here there be hackery get included widgets page class dynamic sidebar wp dashboard get included plugin page class remove filter option sidebars widgets wp dashboard sidebars widgets 10 1 echo br class clear n div n n n
echoes out the dashboard
public array wp dashboard sidebars widgets return wp dashboard sidebars
makes sidebar widgets option reflect the dashboard settings
public void wp dashboard rss output string widget id object deprecated array widgets new array widgets array get included functions page class get option dashboard widget options get included widgets page class wp widget rss output widgets get widget id new array
sidebar args are handled by wp dashboard empty
public void add meta box object id object title array callback object page object context if isset wp meta boxes wp meta boxes new array if isset wp meta boxes get page wp meta boxes put page new array if isset wp meta boxes get array page get context wp meta boxes get array page put context new array wp meta boxes get array page get array context put id new array new array entry id id new array entry title title new array entry callback callback
add meta box add a meta box to an edit form
public boolean maybe create table string table name string create ddl object table null int q 0 for map entry java entry238 g vars wpdb get col show tables 0 entry set table java entry238 get value if equal table table name return true q g vars wpdb query create ddl for map entry java entry239 g vars wpdb get col show tables 0 entry set table java entry239 get value if equal table table name return true return false
the functions we use to actually do stuff the functions we use to
public boolean maybe add column string table name string column name string create ddl object column null int q 0 for map entry java entry240 g vars wpdb get col desc table name 0 entry set column java entry240 get value if booleanval g vars debug echo checking strval column column name br if equal column column name return true q g vars wpdb query create ddl for map entry java entry241 g vars wpdb get col desc table name 0 entry set column java entry241 get value if equal column column name return true return false
maybe add column add column to db table if it doesnt exist
public boolean have time if date time time importer started g consts get max execution time system exit continue return true
handy function for stopping the script after a number of seconds
public boolean maybe create table string table name string create ddl object table null for map entry java entry262 g vars wpdb get col show tables 0 entry set table java entry262 get value if equal table table name return true didn t find it try to create it g vars wpdb query create ddl we cannot directly tell that whether this succeeded for map entry java entry263 g vars wpdb get col show tables 0 entry set table java entry263 get value if equal table table name return true return false
maybe create table
public boolean maybe drop column string table name string column name string drop ddl object column null for map entry java entry266 g vars wpdb get col desc table name 0 entry set column java entry266 get value if equal column column name found it try to drop it g vars wpdb query drop ddl we cannot directly tell that whether this succeeded for map entry java entry267 g vars wpdb get col desc table name 0 entry set column java entry267 get value if equal column column name return false else didn t find it return true
maybe drop column
public void hello dolly echo p id dolly strval chosen p
this just echoes the chosen line well position it later
public void dolly css echo n t style type text css n t dolly n t tposition absolute n t ttop 2 3em n t tmargin 0 n t tpadding 0 n t tright 10px n t tfont size 16px n t tcolor d54e21 n t n t style n t
we need some css to position the paragraph
public object allow fetch attachments return get included plugin page class apply filters import allow fetch attachments true
give the user the option of downloading and importing attached files
public int akismet kill proxy check object option return 0
this option causes tons of fps was removed in 2
public array check words string lang array words string wordstr null array matches new array int i 0 wordstr strings implode words matches this get matches lang wordstr words new array for i 0 i array count matches i words put this unhtmlentities get included google spell page class mb substr wordstr intval matches get array i get 1 intval matches get array i get 2 utf 8 return words
spellchecks an array of words
public array get suggestions string lang string word array sug array osug new array array matches new array object item null sug new array osug new array matches this get matches lang word if array count matches 0 sug strings explode t xmlparser utf8 encode this unhtmlentities strval matches get array 0 get 4 remove empty for map entry java entry487 sug entry set item java entry487 get value if booleanval item osug put item return osug
returns suggestions of for a specific word
public array check words string lang array words int plink 0 array out words new array string word null plink this get plink lang out words new array for map entry java entry488 words entry set word strval java entry488 get value if unsupported pspell check plink strings trim word out words put xmlparser utf8 encode word return out words
spellchecks an array of words
public array get suggestions string lang string word array words new array int i 0 words unsupported pspell suggest this get plink lang word for i 0 i array count words i words put i xmlparser utf8 encode strval words get i return words
returns suggestions of for a specific word
public array loopback object vargs modified by numiton return function handling func get args vargs
simple loopback function everything that gets in will be send back
public array get suggestions object lang object word return new array
returns suggestions of for a specific word
public void throw error string str system exit result null id null error errstr strings addslashes str errfile errline null errcontext level fatal
throws an error message back to the user
public object get level return this level
returns the current log level for example mc logger debug
public string to ospath string path return strings str replace directories directory separator path
converts a unix path to os specific path
public void start wp get included functions page class deprecated function source code info get current function 1 5 get included l10n page class new n word press loop default since the old style loop is being used advance the query iterator here g vars wp query next post get included query page class setup postdata g vars post
start wp sets up the word press loop
public object the category id object echo array categories object cat null get included functions page class deprecated function source code info get current function 0 0 get the category grab the first cat in the list categories get included category template page class get the category intval false cat categories get std class class 0 fields get term id if booleanval echo echo cat return cat
the category id return or print category id
public void the category head string before string after array categories new array get included functions page class deprecated function source code info get current function 0 0 get the category by id grab the first cat in the list categories get included category template page class get the category intval false currentcat intval std class categories get 0 fields get category id if equal currentcat previouscat echo before echo get included category template page class get the category by id currentcat echo after previouscat currentcat
the category head print category with optional text before and
public boolean user can create post int user id int blog id int category id std class author data get included functions page class deprecated function source code info get current function 0 0 current user can author data get included pluggable page class get userdata user id return intval std class get author data user level 1
user can create post whether user can create a post
public boolean user can create draft int user id int blog id int category id std class author data get included functions page class deprecated function source code info get current function 0 0 current user can author data get included pluggable page class get userdata user id return intval std class get author data user level 1
user can create draft whether user can create a post
public boolean user can delete post int user id int post id int blog id get included functions page class deprecated function source code info get current function 0 0 current user can right now if one can edit one can delete return user can edit post user id post id blog id
user can delete post whether user can delete a post
public boolean user can set post date int user id int blog id int category id std class author data get included functions page class deprecated function source code info get current function 0 0 current user can author data get included pluggable page class get userdata user id return intval std class get author data user level 4 user can create post user id blog id category id
user can set post date whether user can set new posts dates
public boolean user can edit post date int user id int post id int blog id std class author data get included functions page class deprecated function source code info get current function 0 0 current user can author data get included pluggable page class get userdata user id return intval std class get author data user level 4 user can edit post user id post id blog id
user can edit post date whether user can delete a post
public boolean user can edit post comments int user id int post id int blog id get included functions page class deprecated function source code info get current function 0 0 current user can right now if one can edit a post one can edit comments made on it return user can edit post user id post id blog id
user can edit post comments whether user can delete a post
public boolean user can delete post comments int user id int post id int blog id get included functions page class deprecated function source code info get current function 0 0 current user can right now if one can edit comments one can delete comments return user can edit post comments user id post id blog id
returns true if user id can delete post ids comments
public boolean user can edit user int user id int other user std class user std class other get included functions page class deprecated function source code info get current function 0 0 current user can user get included pluggable page class get userdata user id other get included pluggable page class get userdata other user if intval std class get user user level intval std class get other user level intval std class get user user level 8 equal std class get user id std class get other id return true else return false
user can edit user can user can edit other user
public boolean wp get linksbyname string category string args std class cat null object cat id null get included functions page class deprecated function source code info get current function 0 0 wp get links cat std class get included taxonomy page class get term by name category link category g consts get object raw if booleanval cat return false cat id std class get cat term id args get included functions page class add query arg category cat id args wp get links args return false
wp get linksbyname gets the links associated with the named
public array get linkobjectsbyname string cat name string orderby int limit int cat id 0 std class cat null get included functions page class deprecated function source code info get current function 0 0 get linkobjects cat id 1 cat std class get included taxonomy page class get term by name cat name link category g consts get object raw if booleanval cat cat id intval std class get cat term id return get linkobjects cat id orderby limit
get linkobjectsbyname gets an array of link objects associated with category cat name
public array get linkobjects int category string orderby int limit array links null array links array new array object link null get included functions page class deprecated function source code info get current function 0 0 get bookmarks links get included bookmark page class get bookmarks category strval category orderby orderby limit strval limit links array new array for map entry java entry456 links entry set link java entry456 get value links array put link return links array
get linkobjects gets an array of link objects associated with category n
public void get links withrating object category object before object after object between object show images object orderby object show description object limit object show updated get included functions page class deprecated function source code info get current function 0 0 get bookmarks get links strval category strval before strval after strval between show images strval orderby show description true intval limit intval show updated true
get links withrating gets the links associated with category n and
public int get autotoggle object id get included functions page class deprecated function source code info get current function 0 0 null return 0
get autotoggle gets the auto toggle setting
public object wp set post cats int blogid int post id object post categories get included functions page class deprecated function source code info get current function 0 0 wp set post categories return get included post page class wp set post categories post id post categories
wp set post cats sets the categories that the post id belongs to
public string get author link boolean echo object author id object author nicename string link null get included functions page class deprecated function source code info get current function 0 0 get author posts url link get included author template page class get author posts url intval author id strval author nicename if echo echo link return link
get author link returns or prints link to the authors posts
public object link pages object before object after object next or number object nextpagelink object previouspagelink object pagelink object more file array args new array get included functions page class deprecated function source code info get current function 0 0 wp link pages args array compact new array entry before before new array entry after after new array entry next or number next or number new array entry nextpagelink nextpagelink new array entry previouspagelink previouspagelink new array entry pagelink pagelink new array entry more file more file return get included post template page class wp link pages args
link pages print list of pages based on arguments
public object get settings object option get included functions page class deprecated function source code info get current function 0 0 get option return get included functions page class get option strval option
get settings get value based on option
public void permalink link get included functions page class deprecated function source code info get current function 0 0 the permalink get included link template page class the permalink
permalink link print the permalink of the current post in the loop
public void permalink single rss object deprecated get included functions page class deprecated function source code info get current function 0 0 the permalink rss get included feed page class the permalink rss
permalink single rss print the permalink to the rss feed