Posts

Showing posts from January, 2015

reporting services - SSRS Creating Treeview -

so i'm having problems when trying make treeview group. have folder structure in database gives me path each node should have. problem recursive parent seems @ immediate parent child relationship opposed full structure of tree. problem have in case if still need tree, there no data representing specific folder. splitting folder structure use second last entry in array. public shared function parent(byval value string, byval delimiter string) string dim listarray() string listarray = split(value, delimiter) dim lastnonempty integer = -1 integer = 0 listarray.length - 1 if listarray(i) <> "" lastnonempty += 1 listarray(lastnonempty) = listarray(i) end if next redim preserve listarray(lastnonempty) dim retvalue string = "" if listarray.length - 2 > -1 retvalue = listarray(listarray.length - 2) else retvalue = listarray(listarray.length - 1) end if return retvalue end function lets have data in root\, have no data in roo

php - cakephp file download link -

i've encountered problem i'm trying solve more 2 days now: i've built website using cakephp , working fine got stuck when tried implement download links files stored under app_dir/somefolder/somefile.zip . how set download links files inside somefolder ? stumbled on "media views" tried implementing them far i've been unsuccessful. besides there no easier way make files downloadable? media views deprecated since version 2.3. should use sending files instead. check out minimal example in controller: public function download($id) { $path = $this->yourmodel->amagicfunctionthatreturnsthepathtoyourfile($id); $this->response->file($path, array( 'download' => true, 'name' => 'the name of file should appear on client\'s computer', )); return $this->response; } the first parameter of $this->response->file relative app directory. calling $this->response->

How can I link this html button to the input type "text" so that when I press enter from the input type, the button is activated? -

here html code form: <form> input twitter id: <input type="text" name="userid" id="userid"> <button type="button" onclick="getstatuses();">get recent tweets</button> </form> currently button activates getstatuses(). want when user presses enter/return after inputting text, activates button. input used in getstatuses() , referenced id of input. you can use onkeyup attribute , call function: js: function checkkey(e){ var enterkey = 13; if (e.which == enterkey){ getstatuses(); } } html: <input type="text" name="userid" id="userid" onkeyup="checkkey(event)">

python - Multiprocess Daemon Not Terminating on Parent Exit -

i have python 2.7 multiprocessing process not exit on parent process exit. i've set daemon flag should force exit on parent death. docs state that: "when process exits, attempts terminate of daemonic child processes." p = process(target=_serverlaunchhelper, args=args) p.daemon = true print p.daemon # prints true p.start() when terminate parent process via kill command daemon left alive , running (which blocks port on next run). child process starting simplehttpserver , calling serve_forever without doing else. guess "attempts" part of docs means blocking server process stopping process death , it's letting process orphaned result. have child push serving thread , have main thread check parent process id changes, seems lot of code replicate daemon functionality. does have insight why daemon flag isn't working described? repeatable on windows8 64 bit , ubuntu12 32 bit vm. a boiled down version of process function below: def _serverlaunchhe

c# - how to reference linq in user control? -

Image
i'm trying use linq in user control , error reference "system.linq" . error:"c:\program files\common files\microsoft shared\web server extensions\14\template\controltemplates\myusercontrol.ascx.cs(23): error cs0234: type or namespace name 'linq' not exist in namespace 'system' (are missing assembly reference?)" check .net framework version. system.linq supported .net framework 3.5 , above. and write using statement include namespace using system.linq; you can check framework version under properties option of project

java - how to manage session attributes due to post requests, and history -

i have following problem: i want send information between modules (different controllers) using post due security reasons. logic has been this: user searches > clicks on specific item > sends form post request controller > controller shows view of specific item > user clicks on sub-item page > sends form post request sub-item's controller however, because of how post works out, it's giving me "webpage has expired" messages when going subitem page item page. my solution problem save these parameter(s) in java's httpsession , post . not particularly sure how go @ it. for example here snippets of code (for record i'm using thymeleaf view resolver): search.html snippet <tr th:each="customer:${results.pagelist}"> <td> <form method="post" id="gotouser" name="gotouser" action="/customer/"> <input type="hidden" name="acctcustnbr&q

algorithm - Hashing and encryption technique for a huge data set containing phone numbers -

description of problem: i'm in process of working highly sensitive data-set contains people's phone number information 1 of columns. need apply (encryption/hash function on them) convert them encoded values , analysis. can one-way hash - i.e, after processing encrypted data wont converting them original phone numbers. essentially, looking anonymizer takes phone numbers , converts them random value on can processing. suggest best way process. recommendations on best algorithms use welcome. update: size of dataset dataset huge in size of hundreds of gb. update: sensitive sensitive, meant phone number should not part of our analysis.so, need one-way hashing function without redundancy - each phone number should map unique value --two phones numbers should not map same value. update: implementation ? thanks answers.i looking elaborate implementation.i going through python's hashlib library hashing, same set of steps suggested ? here link can give me exampl

Create case sensitive database with SQL Server -

by default database created sql server case insensitive. if add 2 keys same name different case second insertion rejected. how can change behavior , make database case sensitive? you'll need change database collation latin1_general_cs_as here's how using t-sql: alter database yourdatabase collate latin1_general_cs_as

indexing - multple indexes same column sql -

for db2 database, consider table tbl ( cola , colb , colc ) , queries as select * tbl tbl.cola = 1234. select * tbl tbl.cola =1234 , tbl.colb = 73874 will if create 2 indexes i) on cola ii) composite - cola,colb if above sql's accessed have 2 indexes above. optemizer pick correct index based on query. thanks, you need index (ii). composite index used whenever search data in prefix of columns. index on cola,colb,colc,cold used when search cola , cola , colb , cola, colb, , colc , , cola, colb, colc, , cold .

ios - How can I make a transparent background for selected cells in UITableView -

how can make cells transparent. want show selected cells checkmark have done: - (void)tableview:(uitableview *)tableview didselectrowatindexpath:(nsindexpath *)path { uitableviewcell *cell = [tableview cellforrowatindexpath:path]; if (cell.accessorytype == uitableviewcellaccessorycheckmark) { cell.accessorytype = uitableviewcellaccessorynone; } else { cell.accessorytype = uitableviewcellaccessorycheckmark; } } and when first create cells next line of code rid of blue background cell.selectionstyle = uitableviewcellselectionstylenone; but have weird issue takes 2 clicks add , remove checkboxes. maybe not right way it? you can read making transparent uitableviewcell s here: how create uitableviewcell transparent background and second issue, appears perhaps want: - (void)tableview:(uitableview *)tableview didselectrowatindexpath:(nsindexpath *)path { uitableviewcell *cell = [tableview cellforrowatindexpath:path]; cell

r - How to sum values from same names? -

this question has answer here: consolidate duplicate rows 6 answers r program i need sum values same names repeated in list. i have list like, person money 1 1 3 2 2 1 3 1 2 4 3 1 5 2 1 i need, person money 1 1 (3+2=)5 2 2 2 3 3 1 here solution ddply plyr library(plyr) z=data.frame(ddply(yourdataframe,.(person),summarise))

entity framework - Code first mapping for self-related xref table -

i have read through several threads on stackoverflow , have not been able figure out. hoping can offer advice. have poco classes this: person { int personcode {get; set;} ... virtual list<personcontact> {get; set;} } personcontact { int personpersoncode {get; set;} int contactpersoncode {get; set;} int personcontacttypecode {get; set;} virtual personcontacttype {get; set;} virtual person person {get; set;} // not sure need 1 virtual person contact {get; set;} } each person record have 0 many personcontact records. each personcontact record links 1 person record 1 other person record , indicates type of relationship between 2 person records personcontacttypecode. i need able map person record can navigated related personcontact records. this: var john = new person(...); var david = new person(...); john.personcontacts.add(new personcontact { contact = david, personcontacttype = ... // manager }); and then john.personcontacts .wh

keymapping - Vim - How do I use a key mapping command like <C-L>? -

i'm else has had question, , may repeat, i'm not sure call command <c-l> , haven't had luck finding existing question. if duplicate, please redirect me. the question arises vimrc section reads this: " map <c-l> (redraw screen) turn off search highlighting until " next search nnoremap <c-l> :nohl<cr><c-l> so combination of keys press (in mode) input <c-l> mapping? in line: nnoremap <c-l> :nohl<cr><c-l> nnoremap means normal no-recursive map <c-l>... means, if press ctrl + l in normal mode, mapped key-strokes applied. <c-l> means ctrl + l if type :h control you can see keycodes: <c-...> control-key *control* *ctrl* *<c-*

jquery - centering buttons in a form -

Image
i want center 2 buttons in form. got wrapper div around them , tried margin: 0 auto , float: left, it's not working. .button_container { width: auto; min-width: 834px; margin: 0 auto; float: left; } fiddle would perfect if buttons centered under textarea. possible? updated: thank everyone, used sachins fiddle worked best situation. working fiddle you need couple of things remove float:left , add text-align:center , importantly remove min-wdith force have width of container make not center aligned. .button_container { width: 100%; /* min-width: 834px;*/ margin: 0 auto; text-align:center; } js fiddle example

c++ - Using Qt user interface in a host application -

i extending commercial application, running on windows. can extended plug-ins, application ordinary dlls. free functions exported plug-in dlls can hooked host application ui, forms commands, , these commands can used based on user interaction host application ui. additionally, looks plug-ins run in same thread host application, or @ least plug-ins run in same thread. it possible write user interface these plug-ins. host application ported platform, user interface using windows main container main window , dialog panels, window content , controls owner-drawn. example plug-ins, shipped application, use old fashioned way of writing windows user interface - have standard resource file, standard window procedure, standard dialog box procedure, standard event loop using getmessage(), translatemessage(), dispatchmessage(). windows in these example plug-ins created in 1 of plug-in dll functions. event loop running there. in examples possible create modal , modeless windows , integr

list - Counting previous lines using information from two files in python -

i delve explaining programming problem: have 2 files; file #1 gene annotation file , file #2 counts base position file (just trying give context problem). i want extract "start_codon" position in lines there "+" in column 6, , go position in file#2. instance, want extract 954 column number 3 in file #1 , go row number 954 in file #2. then, want count number of lines above line 954 yield count value of 70 or greater in file #2. file#1 chromosome exon 337 774 0.0 - . gene_id "a"; chromosome start_codon 954 956 0.0 + 0 gene_id "b"; chromosome stop_codon 2502 2504 0.0 + 0 gene_id "b"; file#2 . . . . 942 71 943 63 944 88 945 80 946 80 947 85 948 86 949 97 950 97 951 97 952 104 953 105 954 104 955 108 my final output file tab-separated file of gene_id followed number of lines yield count value of 70 or greater. exam

jquery plugins - slicebox doesn't show any animation -

i having difficulties slicebox. have checked every idea, followed tutorial, i'm missing animation. think doesn't start up, because first picture in slide appears, nothing happens. css included <link rel="stylesheet" type="text/css" href="css/slicebox.css" /> <link rel="stylesheet" type="text/css" href="css/custom.css" /> jquery latest version <script type="text/javascript" src="js/modernizr.custom.46884.js"></script> the html seems right <div class="wrapper"> <ul id="sb-slider" class="sb-slider"> <li> <a href="#" target="_blank"> <img src="slider/image1.jpg" alt="image1"/> </a> </li> <li> <a href="#" target="_blank"> <img src="slider/image2.jpg" alt="image1"/> </a> <

ios - Core data filtering -

i have core data structure follows: business <-------->> employee <-------->> address each business has multiple employees , each employee can have multiple addresses. from business object, want able nsarray or nsset of address objects specify condition. e.g. street names have unique. i know override isequal: i'm guessing going have unintended results. otherwise, have been looking using valueforkeypath:@"@distinctunionofobjects" , don't think can pass condition. here code have far: nsmutablearray *addressarray = [nsmutablearray array]; nsarray *employees = [employee sortedarray]; //loop through employees (employee *employee in employees) { (address *address in employee.addresses) { [addressarray addobject:address]; } } //filter out duplicates addressarray = [addressarray valueforkeypath:@"@distinctunionofobjects.city"]; this code gives me list of unique cities,

all the theme of moodle not working -

i have big problem theme in moodle site(version 2.2). i wanted change menus , colors , things in site theme, turned on server maintenance mode , theme designer mode. all operations disabled theme. tried turn off choices nothing happened, site still without theme. tried change theme, themes not working. what happened please, how can solve that? a few things try. turn on debugging ( site administration > development > debugging ), set "developer: moodle debug messages developers" , check "display debug messages" try , purge cache ( site administration > development > purge caches ) error message when try purge cache? if so, can paste error? do have enough free disk space on server? had issue when san stored moodledata folder full.

recursion - Recursively append files to zip archive in python -

in python 2.7.4 on windows, if have directory structure follows: test/foo/a.bak test/foo/b.bak test/foo/bar/c.bak test/d.bak and use following add them existing archive such 'd.bak' @ root of archive: import zipfile import os.path import fnmatch def find_files(directory, pattern): root, dirs, files in os.walk(directory): basename in files: if fnmatch.fnmatch(basename, pattern): filename = os.path.join(root, basename) yield filename if __name__=='__main__': z = zipfile.zipfile("testarch.zip", "a", zipfile.zip_deflated) filename in find_files('test', '*.*'): print 'found file:', filename z.write(filename, os.path.basename(filename), zipfile.zip_deflated) z.close() the directory of zip file flat. creates foo/ directory only if sub-directory exists in (if exclude test/foo/bar/c.bak , not create directory. if included, foo/ creat

python - Pygame: Collision With tiles not working -

i working on abstraction layer pygame, , have come across problem when trying check collisions maps. able load , display map, store rectangles collidable. when print list of rectangles, see in place, when iterate on every rect , try check collision rect, returns true when rects not collide. also, when try debug rects drawing red-outlined rectangle on each 1 of them, nothing gets drawn though when print rectangle, prints rectangle exists. here few snippets framework: class tilemap(object): """this tilemap object, takes array of strings object, , places surface have in strings. supports 1 surface per map, have make multiple maps floor, walls, etc.""" def __init__(self, level_surface,level_string = none, string_char = "#", surface = none, surface_dim = vector2(50, 50),surface_color = (255, 255, 255)): self.level = level_string self.char = string_char self.surface = surface if self.surface none: self.surface = pygame.s

mysql select query from multiple tables returns duplicate results -

i new myysql , stack overflow if question little vauge let me know , provide more info. i have written query gets data multiple tables isn't working how expected , stumped. here code select students.student_fname, students.student_lname students, enrolments enrolments.courseid = 'c001'; but returns of students first , last names in students table , these names displayed twice. here code 2 tables create table students ( studentid char(10) not null, student_fname varchar(15) not null, student_lname varchar(15) not null, dob varchar(10) not null, constraint pk_students primary key (studentid) ); create table enrolments ( enrolmentno int not null auto_increment, studentid char(10) not null, courseid char(4) not null, constraint pk_enrolments primary key (enrolmentno), foreign key (studentid) references students (studentid), foreign key (courseid) references courses (courseid) )engine = innodb; thanks this because you've not defined how studen

what is the difference between join keyword and inner join keyword in oracle sql? -

this question has answer here: difference between join , inner join 7 answers i can't find documentations on key word join saw examples on web using it. i doing experiment in oracle hr schema, have table departments : deparment_name manager_id location_id a table employees : first_name employee_id and table locations : location_id city query should return department_name, first_name of manager of department, , city department located. the code using keyword join seem return result in comparison using keyword inner join code join : select d.department_name, e.first_name,l.city departments d join employees e on d.manager_id=e.employee_id join locations l on d.location_id=l.location_id code inner join : select d.department_name, e.first_name,l.city departments d inner join employees e on d.manager_id=e.employee_id inn

php - Secure AJAX request to URI -

i know there have been lots of question ajax security. i've searched , read still unclear best approach is. i have specific senario: i have application build on top php mvc framework. i've turned presentation elements such "navigation menu" modular. navigation menu module has controller (sever side). controller uses model retrieving data database , responds php echo of data. can make http request controller using ajax because controller routed uri. believe call restful api. when user clicks link in navigation menu static content area update data retrieved ajax request. lets make different action in same controller capable of writing data database. having publicly available uri allows writing database bad. how 1 secure uri interface ajax can retrieve , write data, individuals malicious intent can harm? you must treat ajax request treat request or post request. in other words never trust user. have server side control, ajax client side never trust &

How to get the certain segment of a URL using regex? -

say url http://aa/bb/cc . "aa" in segment 1, "bb" in 2 , "cc" in 3. how regex extract given number of segment? (so \2 , \3 refers part of url.) try regex: http:/(?:/([^/]+))+ explaination: (subexpression) captures matched subexpression , assigns zero-based ordinal number. (?:subexpression) defines noncapturing group. + matches previous element 1 or more times. [^character_group] negation: matches single character not in character_group .

css - CSS3 column-count: 2 + height: 100% cut off images -

in process of displaying bunch of paragraph <p> elements quite few <div> mixed-in, shown nicely effect of opened book, set <html> to html { width: 100%; height: 100%; } and <body> to body { column-count: 2; height: 100%; } they work nicely except images cut off , display "next page", i.e., pictures split display in 2 columns. i tried setting img { display: inline-block; } in attempt reinstate image's integrity, without luck. appreciated. thanks

php - MySQL - Conversation History overview - Selecting multiple latest items from table -

i have joy of recreating phone, building customized messaging system in php uses api send , receive messages. i'm trying emulate functionality found in facebook messaging on desktop site. [col 1] [col 2] list of conversation view. latest messages received in order of newest oldest i having issues query first column. i have table in mysql following structure: create table if not exists `history` ( `id` int(10) not null auto_increment comment 'messageid', `sender` varchar(10) not null, `recipient` varchar(10) not null, `extreference` int(20) default null, `date` timestamp not null default current_timestamp, `status` varchar(100) not null, `userid` int(3) not null, `message` longtext not null, primary key (`id`) ) engine=myisam default charset=latin1 auto_increment=609 ; with sample date set like: insert `history` (`id`, `sender`, `recipient`, `extreference`, `date`, `status`, `userid`, `message`) values (1, '04123

javascript - Setting observable from select list in knockout.js -

i'm trying use value of select list calculation can't retrieve number when it's selected. when return selected quantity returns javascript instead of number selectedquantity value i'm trying retrieve. <table border="1"> <thead><tr> <th>id</th><th>inventory</th><th>quantity</th><th>price</th><th>total</th><th></th> </tr></thead> <tbody data-bind="foreach: itemnumbers"> <tr> <td data-bind="text: id"></td> <td data-bind="text: inventory"></td> <td><select data-bind="quantitydropdown: inventory, value: selectedquantity"></select></td> <td data-bind="text: formattedprice"></td> <td data-bind="text: itemtotal"></td>

java - Android: how to stop calling the same function while the function is running -

example: got button, if press call function fetch data api screen. how can stop calling function if user press again , function still running(processing). instead of hiding button there way handle it? need use thread handle it? check if thread alive? not familiar that. please give me suggestion , example on how handle it. sorry bad english. thanks. make boolean turns true when press button. when true normal functions of method. make when person presses button again boolean turns false . when false make want break out or return or nothing.

Python 3.0 using turtle.onclick -

so here problem, have make picture cs class , frustrating estimating in turtle. planed use .onclick() show me position. import turtle t def getpos(x,y): print("(", x, "," ,y,")") return def main(): t.onclick(getpos) t.mainloop() main() the turtle documentation seems onclick pass coordinates in function takes in 2 variables. http://docs.python.org/3.1/library/turtle.html#turtle.onclick note: works when click on arrow head, thats not want. want click other position on screen find out coordinates should send arrow head to! any appreciated. you need use screen class. however, if want stay away oop, can use built-in method turtle.onscreenclick(func). replace def main(): t.onclick(getpos) t.mainloop() main() with def main(): t.onscreenclick(getpos) t.mainloop() main()

javascript - extjs 4 dinamyc store -

i must update label takes data store. must load store new data ex. each 10 seconds. it's easy - use setinternal() (because taskrunner isn't work o_0)_ , call store.load event. task more specific. have grid contains of 2 columns , takes data store , data custom. means before columns clear store dataindexes there few new records in store custom string data , numeric data... it's may hard explain word, in code looks so: //---store--- ext.define('app.store.data', { extend: 'ext.data.store', autoload: false, storeid:'data', model: 'app.model.datamodel', proxy : { type : 'ajax', url: 'http://mybackend', reader: { type: 'json' } }, data:[first = true], listeners:{ load: function() { if(first){ first=false; myapp.getcontroller('app.controller.controller').storeloadhandler(); setinterval(

c# - check if date time string contains time -

i have run issue. i'm obtaining date time string database , and of these date time strings not contain time. new requirement every date time string should contain time so, 1) 1980/10/11 12:00:01 2) 2010/april/02 17:10:00 3) 10/02/10 03:30:34 date can in format followed time in 24hr notation. i tried detect existence of time via following code, string timestamp_string = "2013/04/08 17:30"; datetime timestamp = convert.todatetime(timestamp_string); string time =""; if (timestamp_string.length > 10) { time = timestamp.tostring("hh:mm"); } else { time = "time not registered"; } messagebox.show(time); but works no 1) type timestamps. may please know how achieve task on how detect if time element exist in date time string. thank :) possible match how validate if "date , time" string has time? info 3 answers provided arun selva kumar , guru kara , patipol paripoonnanonda correct , checks time , serves

c# - Failed to load viewstate in devexpress -

this problem creating lot of trouble in devexpress master detail gridview "failed load viewstate. control tree viewstate being loaded must match control tree used save viewstate during previous request. example, when adding controls dynamically, controls added during post-back must match type , position of controls added during initial request." i want know why happens in first place, can check code. thats why not posting code its urgent :)

ember.js - Access content inside a controller function ember -

i have route, controller, view this. problem called controller function reloadtime view in reloadtime function console content controller says undefined . question how access content in ember? app.activecallsroute = ember.route.extend({ setupcontroller:function(controller,model){ $.ajax({ url:'requests/activecalls.php', type:'post', success:function(data){ app.cdrglobal.set('active_call',data.length); controller.set('content',data); } }) } }); app.activecallscontroller = ember.arraycontroller.extend({ content:[], deletecall:function(model){ var obj = this.findproperty('id',model.id); app.cdrglobal.set('active_call',app.cdrglobal.active_call-1); this.removeobject(obj); }, reloadtime:function(){ console.log(this.get('content'));//console undefined console.log(this.conte

How to add vertical sub-menu to horizontal menu using css and html? -

i want add vertical sub-menu horizontal menu. have menu style spotlight. i've tried didn't work. please me. here code: <div class="spotlightmenu"> <ul> <li><%: html.actionlink("home", "index", "home")%> <ul> <li><%: html.actionlink("submenu1", "", "")%></li> <li><%: html.actionlink("submenu2", "", "")%></li> <li><%: html.actionlink("submenu3", "", "")%></li> </ul> </li> <%-- <li><%: html.actionlink("about", "about", "home")%></li> --%> <li><%: html.actionlink("profile", "", "")%></li> <li><%: html.actionlink("registe

java - How to show progress bar for uploading process in each row of listView one by one? -

i want set progress bar in each row of list view.a progress bar should start or show progress uploading files.i want set progress bar in each row of list view.and progress bar start progress 1 one in each row after finishing 1 progress. first you'll want create custom arrayadapter , , add progress bar each of elements, adding progressbar layout inflate with. there after you'll want catch upload listener, can listen progress, , update progress bar. if want them upload 1 @ time, suggest adding variable object or make arraylist<boolean> check if previous elements, has uploaded yet. example of how create arrayadapter shows how create layout, rows inflating.

java - Extending DefaultChannelGroup -

i create class works defaultchannelgroup, 1 difference message being written belongs connection , channel associated not have message written it. think of chat application should write other channels other 1 belonging user wrote message. looking @ implementation of defaultchannelgroup seems add new method named write expects given channel , message, , iterate non-server channels , skip channel equals given channel. you extend defaultchannelgroup outlined, channel group iterator , set of channels already. if have channel, can perform ther write directly (i.e. don't need channelgroup), or, if reason, wanted channel group, call channelgroup.find(channel.getid()) . i guess if doing pruposes of narrowing down single channel, it's issue of cosmetics. not pannning it.... personal preference ! if makes better you, go it. the more interesting scenario, useful extension defautchannelgroup, assign individual channels group of attributes encoded bit-mask. might able t

osgi - Adding Embeded-Dependency in maven -

actually when build project deploys bundle running osgi console. bundle in installed state , shows red alert commons-net bundle can not find. one way of solving problem install bundle running osgi framework explicitly. another way adding embeded-dependency maven. approach not working. added embeded-dependency instruction tag in maven-build-plugin. didn't show error. please let me know if suggestions. embeded-dependency did not show error can place instructions. if key-value pair not known inserted manifest.mf is. try writing embed-dependency, should make work. a example following (how created hibernate bundle ourselves): <plugin> <groupid>org.apache.felix</groupid> <artifactid>maven-bundle-plugin</artifactid> <extensions>true</extensions> <configuration> <instructions> <bundle-symbolicname>${project.artifactid}</bundle-symbolicname> <_exportcon

paypal - Pay Pal Recurring Payment Integration -

i have site receive money customers in regular period(say once in week). storing clients details in database , want withdraw money form customers account out prompting them authentication every time.the amount vary respect customers. how can pay pal?do need buy pay pal pro implementing this.i read docs related recurring payments , reference payment services of pay pal, don't know how work when business pay pal account registered in australia. thanks in advance. we (jan 2013) implemented recurring payment integration palpal australian site (paypal account). we used; payflow pro (doc: https://www.x.com/sites/default/files/payflowgateway_guide.pdf ) recurring payments module (doc: https://www.x.com/sites/default/files/pp_payflowpro_recurringbilling_guide.pdf ) i can't experience pleasant one, lot of reading, phone calls support, , hair-pulling - got there in end. depending on situation suggest looking @ pin payment gateway ( https://pin.net.au/ ) alternat

google app engine - GAE - mail API - dialy limits -

according https://developers.google.com/appengine/docs/quotas#mail gae app developed third party (anyone of us) , hosted in ga cloud has limit of 20.000 messages can send each day, right ? what if app has registered 100.000 end-users accepted receive daily email notification ? isnt gae platform kind of apps ? have find out provider ? app must use third-party service mailchimp api or similar job ? thanks, d.- gae no longer supports sending more 100 emails , not increase quota using form request. nudging people sendgrid (why sendgrid in unclear). unfortunate reduction in gae capabilities.

how to calculate hours,minutes and seconds from total minutes in php? -

i developing 1 website in php. i need add jobs sql server 2008 database. i taking job duration in minutes , want convert in h:i:s format. i using code : $hours = (int)($duration / 60); $minutes = $duration - ($hours * 60); $time = $hours.":".$minutes; it works fine int duration 30,60,100,120 etc. but if duration 1.33 or 5.40 output should 00:01:30 or 00:05:40 respectively. how can ? try this <?php $duration = "1.33"; $hours = (int)($duration / 60); $minutes = $duration - ($hours * 60); date_default_timezone_set('utc'); $date = new datetime($hours.":".$minutes); echo $date->format('h:i:s'); ?> output 00:01:33

makefile - Missing platform-conf.h in Thingsquare Mist (Contiki-OS) -

i cloned contiki-os port thingsquare mist work texas instruments exp430 board. when run hello world respective folder make target=mist-exp5438 i error platform-conf.h missing: in file included ../../contiki/core/./net/rime/rimeaddr.h:57:0, ../../contiki/core/net/rime/rimeaddr.c:45: ../../platform/mist-exp5438/./contiki-conf.h:36:27: fatal error: platform-conf.h: no such file or directory compilation terminated. does know how write platform-conf.h file? trying add empty file in ../../platform/mist-exp54388 makes finding file successful, yields lot of errors. that's because exp5438 not platform. platform either cc1101 or cc1120, exp5438 board cc1101 or cc1120 modules. when exp1101 , exp1120 directories find platform-conf.h files. make target=exp1120 seems makes code compile. unfortunately compiled code seems big or something, hello-world.exp1120 section '.text' not fit in region 'rom' error linker. but well, other platforms seem comp

java - Generating Hash codes with Google App Engine (GAE) -

i need design way provide hash every document stored in application. using existing hash libraries ( bcrypt , etc) , bson objectid generates nice "hash" or "key" quite long. i understand way achieve short hash, hash fewer strings (if not mistaken). hash long id's staring 0, 1, 2, 3 , on. however easy think of, hard implement in google app engine (gae) datastore, or haven't crossed need until now. the gae datastore store entities across severs , across datacenters , auto-increment id not this. what strategy achieve this? as far understand looking way generate short, unique, alphanumeric identifiers documents. kind of thing url shorteners (see questions making short url similar tinyurl.com or what's best way create short hash, similiar tiny url does? or how make unique short url python? , etc.). answer based on assumption. the datastore generates unique auto-incremented ids can rely on that. multiple data centers not problem,

c# - Get text of RadAutoCompleteBox -

how can text of radautocompletebox using radcontrols q1 2013 in c#? autocompletebox.selecteditem returns "servercraftertelerikwpf.command" . edit 1: here's xaml: <telerik:radautocompletebox x:name="txtboxcommand" itemssource="{binding commands, source={staticresource viewmodel}}" displaymemberpath="acommand" autocompletemode="append" horizontalalignment="left" telerik:stylemanager.theme="modern" margin="280,405,0,0" verticalalignment="top" width="330" height="30" keydown="txtboxcommand_keydown"/> and don't have c# code. want, when button pressed, text in radautocompletebox. edit 2: , here's collection : public class command { public string acommand { get; set; } } /// <summary> /// view model mainwindow.xaml /// </summary> public class viewmodel { public observablecollection<command> commands { get; s

c# - Mid as target of an assignment -

i try old vb application in c# convert, while i've encountered line of code: mid(strdata, intposition + 1, intlenght) = strvalue how can translated c#? you have combine remove , insert , like: strdata.remove(intposition, intlenght).insert(intposition, strvalue); the above assumes length of strvalue equal intlenght . if strvalue might longer, replicate mid statement, need do: strdata.remove(intposition, intlenght) .insert(intposition, strvalue.substring(0, intlenght));

coldfusion - Nested floats do not work in CFDOCUMENT css -

the below html provided inside <cfdocumentitem type="header"> block. output empty. <div class="grid"> <div class="span5"> <div class="span5"> label1 </div> <div class="span5"> data1 </div> </div> <div class="span5"> <div class="span5"> label2 </div> <div class="span5"> data2 </div> </div> <div style="clear:both"></div> </div> but when remove nested 'class="span5"' divs , put content there, working fine. there problem nested float in cfdocument??? unfortunately, css support in cfdocument kind of hit or miss. 2 rules follow might help: make sure html validates xhtml 1.0 transitional import style shee

objective c - SIGABRT When going back to MainViewController -

Image
in app, when user presses button, want produce information topic on different view. e.g when user presses cat button, want new view come displaying title , description. however, when press dog goes same view changes information. firstviewcontroller.h #import "secondview.h" @interface viewcontroller :uiviewcontroller { secondview *secondviewdata; iboutlet uitextfield *textfield; } @property (nonatomic, retain)secondview*secondviewdata; -(ibaction)passdata:(id)sender; @end firstviewcontroller.m #import "viewcontroller.h" #import "secondview.h" @implementation viewcontroller @synthesize secondviewdata; -(ibaction)passdata:(id)sender { secondview *second = [[secondview alloc] initwithnibname:nil bundle:nil]; self.secondviewdata = second; secondviewdata.passedvalue = @"dog info"; [self presentmodalviewcontroller:second animated:yes]; } @end secondviewcontroller.h @interface secondview :uiviewcontro

Query insert a record in sql server table like 2013040900001 -

how insert record in sql server 2005 table formatted date , appended auto incremented numeric value? for example if today's date 2013-04-09 12:05:44.640 able format 20130409 using convert(varchar, getdate(), 112) . but want insert record 2013040900001 next 2013040900002 , 2013040900003 , on. a solution generating system-wide auto-incrementing numbers via table designed task: create table [autoinc] ( [number] int identity (1,1) not null, [col1] char(1) not null ); then insert value table , remove rollback: begin tran; insert autoinc values ('a'); rollback tran; this ensures no space used (the table empty) create number (because values generated identity attribute not participate in transaction). can obtain incremented value using scope_identity() function , append date: insert yourtable (yourcol) values (convert(varchar, getdate(), 112) + right('000000000' + cast(scope_identity() varchar(10)), 10));

c# - Pattern search in a System.IO.Stream -

i receiving system io streams source. proceed stream object if contains string "mstnd" . i realize there not can on stream unless convert string. string conversion sub-string matching. don't want takes lot of time or space. how time / space intensive conversion stream string sub-string matching? the code have written is: private bool streamhasstring (stream vstream) { bool containsstr = false; byte[] streambytes = new byte[vstream.length]; vstream.read( streambytes, 0, (int) vstream.length); string stringofstream = encoding.utf32.getstring(streambytes); if (stringofstream.contains("mstnd")) { containsstr = true; } return containsstr ; } depending on in stream you're expecting sequence efficient convert string perform substring. if in standard spot each time can read through number of bytes required , convert them string. take @ reference: http://msdn.microsoft.com/en-us/library/system.