Posts

Showing posts from May, 2014

Teamcity interaction with powershell script -

i have powershell script runs ~30 minutes (waiting on various process' finish). @ end, writes message event log, determining if process success or failure. plan on hosting script on teamcity , want build fail, don't know how handle interaction between script , teamcity in order happen. i'm looking way make powershell script ran remotely communicate teamcity whether failure or success. i've read on lot of teamcity documentation , i'm still not sure how start going this. you should consider using teamcity service messages , or reporting build problems . an example of how emit service message using powershell (assuming you're using powershell build step): write-output "##teamcity[buildstatus text='i successful build']" or write-output "##teamcity[buildproblem description='$powershell_error_message']" where can inject captured powershell error message.

ios - XCode 7 beta debugger not showing values of variable at breakpoint for swift code -

Image
i have tried answers question here none of them helped :( i have installed xcode 7 beta 5 , debugger not show values of variables when debugging swift code. works fine in obj-c code. i have tried changing compiler optimisation level none , had not effect. ideas? i still finding issue in final release of xcode 7.0. turns out bridging header needed updating 1 of references no longer needed in it. i found out using 'po' in debugger 1 of variables, e.g. 'po self.views'. debugger listed errors in bridging header me. weird way find out problem worked. edit: , in case clean build after fixing issues

java - null pointer exception from toolbar when set to landscape -

the app , toolbar work fine in portrait mode set landscape mode app crashes. here logcat caused by: java.lang.nullpointerexception @ android.support.v7.internal.widget.toolbarwidgetwrapper.<init>(toolbarwidgetwrapper.java:94) @ android.support.v7.internal.widget.toolbarwidgetwrapper.<init>(toolbarwidgetwrapper.java:87) @ android.support.v7.internal.app.toolbaractionbar.<init>(toolbaractionbar.java:77) @ android.support.v7.app.appcompatdelegateimplv7.setsupportactionbar(appcompatdelegateimplv7.java:198) @ android.support.v7.app.appcompatactivity.setsupportactionbar(appcompatactivity.java:96) @ maxbleggi.afstudentplanner.activities.mainactivity.oncreate(mainactivity.java:104) @ android.app.activity.performcreate(activity.java:5323) @ android.app.instrumentation.callactivityoncreate(instrumentation.java:1088) @ android.app.activitythread.performlaunchactivity(activitythread.java:2302) @ android.app.activitythread.handlelaunchactivity(activitythread.java:2390) @ a...

javascript - Strip all HTML from string, except <mark> tags -

i have large string in javascript need strip html, minus specific tags. i'm using var nohtml = /(<([^>]+)>)/ig; now strips html, regex can add ignore mark tags while doing this? as mentioned in comments above, regex isn't right tool use parsing html. being said, 1 way use ahead tags want keep: var nohtml = /(?!(<ul|<\/ul>))(<([^>]+)>)/ig; in example, "ul" so specific case: var nohtml = /(?!(<mark|<\/mark>))(<([^>]+)>)/ig; you can see working here in fiddle: https://jsfiddle.net/0xgs0u9m/ you may want instead consider using html parser on npm: https://www.npmjs.com/package/htmlparser from example: var handler = new tautologistics.nodehtmlparser.defaulthandler(function (error, dom) { if (error) [...do errors...] else [...parsing done, something...] }); var parser = new tautologistics.nodehtmlparser.parser(handler); parser.parsecomplete(document.body.innerhtml); ale...

android - nullpointer exception at onServiceConnected() -

edit 2 : realized didn't initialize info new accessibilityserviceinfo , i'm stupid. i'm trying use accessibilityservice listen , retrieve information of notifications other apps phone (youtube , facebook, sms) it crashes , logcat report null pointer exception on onserviceconnected after googling think might due activity has not yet bind service , not launch ? do need bind accessibility service? if how do ? i have these codes in accessibilitylistener class @override public void oncreate() { super.oncreate(); intent intent = new intent(broadcast_action); log.d("tag","oncreate"); } @override public void onserviceconnected() { info.packagenames = new string[] {"com.whatsapp","com.facebook"}; info.notificationtimeout = 100; this.setserviceinfo(info); log.d("tag","onserviceconnected"); } @override public void onacces...

git - local cache for a github repository? -

we use github manage great deal of our software environment, , wager many other orgs overwhelming majority of traffic to/from repo comes our office. in mind, there way build local cache of given github repository, still have protection of cloud version? i'm thinking of in model of caching proxy server, local server (presumably in our building, on our local network) handle vast majority of cloning/pull operations. this seems should doable, searching has been difficult, think in no small part because words "local" , "cache" have overloaded meanings git(hub) questions. your latest comment makes clear you're looking performance optimization. helps. you can start creating local mirror of github repository following these instructions . can either periodically update it, or arrange receive web hooks github update local mirror "on demand". need set small web service respond hooks github. can add web hook going https://github.com/s...

ios - "The dimensions of one or more screenshots are wrong." when uploading screenshots to iTunes Connect -

Image
i uploading screenshots itunes connect, , lots of questions preceding me, "the dimensions of 1 or more screenshots wrong." error. problem is, i've scoured every resource could. here have: 3.5, 4, , 5.5 inch screenshots uploaded fine. getting error iphone 6/4.7 inch screenshots i have 4 screenshots set following in jpeg form 72 dpi: solutions have tried: renaming file "1", "2", ... exporting both .png , .jpeg formats uploading archive itunes connect(testing not enabled) waiting between tries tried on 2 different imac computers attempted both on os x 10.10 , 10.11 cleared website data , restarted computer i dumbfounded. i notice dimensions 750 x 1344. iphone 6 750 x 13 3 4. from: https://developer.apple.com/library/ios/documentation/languagesutilities/conceptual/itunesconnect_guide/appendices/properties.html#//apple_ref/doc/uid/tp40011225-ch26-sw2

c# - scheduling web services in Quartz.Net - windows service or singleton -

i have web app that's running bunch of data processing jobs on backend, rather bogging down server want schedule jobs , decided give quartz.net go. the obvious thing guess create scheduler windows service. have similar running, find windows service bit of pain several reasons (one of them being if crashes needs manually restarted). i thinking more elegant way create service singleton, questions be: if have several ashx backend calls, can declare this: public static ischeduler scheduler { get; private set; } in each ashx , singleton across backend calls? can check running jobs scheduler.getcurrentlyexecutingjobs(); , shut scheduler down if there aren't any? the main reason want use quartz.net limit amount of jobs running concurrently, create simple jobs run now. read, if there no threads available, job rejected , handled once threads become available again. scheduler.getcurrentlyexecutingjobs(); return rejected/waiting jobs well? how start scheduler if i...

css3 - CSS confuse: Why people used to horizontal padding to link text? -

recently read tutorial how make pure css drop-down menu: http://line25.com/tutorials/how-to-create-a-pure-css-dropdown-menu http://designmodo.com/css3-dropdown-menu/ http://red-team-design.com/css3-dropdown-menu/ i found them when dealing links in li items, used add horizontal padding <a> element. code this: li { padding:0 20px; } in opinion, event without padding, won't effect functionality or visual effect. reason adding padding guess padding make click area more bigger? could explain this? removing padding on elements have large effect on visual effect on list items in question. taking 3rd link example, uses nested lists, <ul> list inside <li> list item of list. the <a> inside nested list item has following padding rule: padding: 10px; this creates space around text, , without it, list cramped , put simply, unnatractive. on main navigation bar, there padding rule on #menu a, padding: 0 25px; , assume origina...

ios - UICollectionView cells do not take up width of UICollectionView -

Image
the uicollectionview width change per device constrained reach horizontal margins of view. collectionview's layout flow. reason using uicollectionview space images evenly across on different device sizes, , of these images have tap gesture recogniser. , amount of rows variable, amount of image icons vary. apparently method after: func collectionview(collectionview: uicollectionview, layout collectionviewlayout: uicollectionviewlayout, sizeforitematindexpath indexpath: nsindexpath) -> cgsize { return cgsize(width: collectionviewwidth/6, height: collectionviewwidth/6); } i have tried this: var collectionviewwidth: cgfloat = 0.0 override func viewdidload() { super.viewdidload() collectionview.datasource = self } override func viewdidappear(animated: bool) { collectionviewwidth = collectionview.collectionviewlayout .collectionviewcontentsize().width } func collectionview(collectionview: uicollectionview, layout collectionviewlayout: uicollection...

javascript - Dynamically add different sized data sets to Google Visulation Chart -

i loop through data using simplexml. i'm looking flexible way loop through data purposes of drawing google chart. keeping in mind number of columns google chart vary @ stage. below sample of data trying plot on chart. <dealers> <dealer> <dealer>sydney</dealer> <sales>265</sales> <year>2015 fy</year> </dealer> <dealer> <dealer>sydney</dealer> <sales>218</sales> <year>2016 fy</year> </dealer> <dealer> <dealer>melbourne</dealer> <sales>143</sales> <year>2016 fy</year> </dealer> <dealer> <dealer>brisbane</dealer> <sales>181</sales> <year>2016 fy</year> </dealer> </dealers> how can loop through produce below draw chart? var data = google.visualization.arraytodatatable([ ['year', 'sy...

objective c - CoreData Entity Fetch Request -

i have entity called timeinterval attributes startdate , finishdate , type date. not need add attribute called totaltime because can calculated doing: [finishdate timeintervalsincedate: startdate] can create fetched property attribute totaltime ? if not best way go without having add totaltime attribute seems redundant. i new core-data way. you can separate property (or full-on transient attribute if like). consider this... @interface item : nsmanagedobject @property (nonatomic, readonly, assign) nstimeinterval totaltime; @end @implementation item - (nstimeinterval)totaltime { [self willaccessvalueforkey:@"totaltime"]; nsdate *finishdate = [self primitivefinishdate]; nsdate *startdate = [self primitivestartdate]; nstimeinterval result = [finishdate timeintervalsincedate: startdate]; [self didaccessvalueforkey:@"totaltime"]; return result; } @end

latex - Loading AMSmath explicitly in IPython notebook causes "[Math Processing Error]" -

Image
i relatively new ipython notebook user , using ipython 3.2.1. upfront, apologies if did not read documentation carefully! i trying typeset latex in notebook intended presentation. tried utilize mathjax capabilities better what's (supposedly) available default , tried incorporating other extensions come mathjax explicitly. in particular, tried getting ipython notebook load amscd.js, amssymbols.js , unicode.js through following sequence of steps: obtain .js files these extensions latest mathjax (v2.5) source add them ~/.ipython/nbextensions modify custom.js in ~/.ipython/profile_<mine>/static/custom appending ipython.load_extensions("amscd") , etc. now, these work fine, , able typeset commutative diagrams nicely in ipython notebook. so, while @ this, decided include/load amsmath.js comes along mathjax , problematic. (to me, seems natural thing given other extensions work well!) however, attempting include amsmath.js via ipython.load_extensions("amsm...

javascript - what does (**variable) mean in node.js? -

at https://www.airpair.com/javascript/node-js-tutorial see haven't seen before: var gzip = zlib.creategzip(); var readstream = fs.createreadstream(**filename); // current file var writestream = fs.createwritestream(**dirname + '/out.gz'); what ** mean in ...(**filename); , ...(**dirname ...); ? thank you it's typo in tutorial. var gzip = zlib.creategzip(); var readstream = fs.createreadstream(__filename); // current file var writestream = fs.createwritestream(__dirname + '/out.gz'); they globals in node

macvim - vimrc not being respected in terminal vim -

Image
some settings in vimrc file use not being respected in terminal vim when use gui mvim works fine. wondering doing wrong. running iterm2 , using same theme being used in vim (gotham). can see differences in pictures attach below. notice difference in colors, gui version uses correct colors. terminal vim(incorrect version): gui version(correct colors): here .vimrc i'm using let g:startify_custom_header = \ map(split(system('fortune | cowsay'), '\n'), '" ". v:val') + ['',''] let g:startify_custom_footer = [ \ '', \ ] let &t_co=256 let base16colorspace=256 syntax enable if strftime("%h") < 16 set background=light colorscheme solarized else set background=dark colorscheme gotham256 endif set ttyfast set magic set showmatch set clipboard=unnamed set autoread set encoding=utf8 set paste set ignorecase set smartcase set number set numberwidth=6 set guifont=sauce_...

c# - How to save the specific textboxes with special order to a text file? -

i want use button save contents. here code! can't see show on text file. can me? way? how choose saving location whatever choose? it's seems save in debug folder. private void button1_click_1(object sender, eventargs e) { savefiledialog save = new savefiledialog(); save.filename = "parameters.txt"; save.filter = "text file | *.txt"; system.io.streamwriter file = new system.io.streamwriter(save.filename); if (save.showdialog() == system.windows.forms.dialogresult.ok) { file.write("===========parameters===========" + "\r\n"); file.write("number of teeth: " + textbox1.text + "\r\n"); * * * * file.close(); messagebox.show("saving succeed(parameters)"); } } try this: savefiledialog save = new savefiledialog(); // save.filename = "parameters.txt"; save.filter = "...

ruby on rails - Send mail at particular time in action mailer using delayed job -

def time_confirmation(user) @user = user if(@time == (time.now())) mail(:to => user.email) end end is right? mail has sent @ current time. on controller like: def create @user = user.create(user_params) delayedemailjob.new(@user.email).enqueue(wait: 30.minutes) redirect_to root_path end

android - how to replace String array value with another value in java -

string[] arr_infraid; list<string> list_infraid = new arraylist<string>(); arr_infraid = list_infraid.toarray(new string[list_infraid.size()]); this string array , values in string array getting 1,2,3,4...10 respectively want replace values a,b,c,.....j respectively , store in string array 1->a,2->b,3->c........10->j . please tell me how replace getting null pointer exception when trying got loop , try replace it. public class main { static string [] string1 = { "1","2", "3","4", "5","6", "7","8", "9","10"}; static arraylist<string> = new arraylist<string>(); public static void main(string[] args) { for(int =0;i<string1.length;i++){ getarray(string1[i]); } system.out.println(as.tostring()); } public static void getarray(string string){ switch (string) { ca...

javascript - Calendar validation -

i want know how validate calendar, mean getting calendar values database i.e., start date , end date. when click on calendar able see before dates , after dates, example: if select 27-aug-2015 , 30-aug-2015 able see 25-aug-2015 above 30-aug-2015 . must b/w 27th 30. how validate this. <input type="text" id="start" value="<?php echo $this->singlesevasdata['startdate'];?>" placeholder="select start date"> <input type="text" id="end" value="<?php echo $this->singlesevasdata['enddate'];?>" placeholder="select end date"> i using js file validate. <script type="text/javascript" src="<?php echo themeurl;?>js/pikaday.js"></script>

javascript - Loopback & Angular : How to set default value in form -

so hit error today when tried set value in form. this form: <div class="list"> <label class="item item-input"> <input type="text" ng-model="user.isactive" value="false"> </label> </div> the value didn't appear when put ng-model="user.isactive" in <input> . please looking code. thanks use ng-init <input type="text" ng-model="user.isactive" ng-init="user.isactive='yourvalue'">

logging - Why Spring interceptor called twice? -

why spring interceptor called twice in situation? controller public class usercontroller { @resource(name="userdao") private userdao userdao; @requestmapping("/user/registuser") public string registuser(httpservletrequest request, model model) { string message = "regist user page!"; model.addattribute("message", message); return "/user/registuser"; } } interceptor public class loggerinterceptor extends handlerinterceptoradapter { final protected logger logger = logmanager.getlogger(loggerinterceptor.class); @override public boolean prehandle(httpservletrequest request, httpservletresponse response, object handler) throws exception { logger.debug("===============================================start================================================"); logger.debug("request uri : " + request.getrequesturi()); return...

Pinch Zoom and onClickListener for same layout not working in Android -

i've tried implement pinchzoom custom layout in android based on below link. https://gist.github.com/anorth/9845602 at same time implemented onclicklistener same layout. but, not working when click on particular position in layout, pinch zoom not working after onclick functionality. other wise working fine. how resolve this? can suggestion appreciated. try may you no need set onclick() method ontouch() handle both case. package com.example.demo; import android.app.activity; import android.os.bundle; import android.view.gesturedetector; import android.view.gesturedetector.simpleongesturelistener; import android.view.menu; import android.view.motionevent; import android.view.view; import android.view.view.ontouchlistener; import android.widget.imagebutton; public class mainactivity extends activity { private gesturedetector gesturedetector; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate...

jquery - Difficulty positioning images using CSS -

Image
i experiencing difficulty positioning (or more accurately, combining) various graphical images form one complete image using css. reason doing way (eventually), when have them correctly placed in header of web site building, able use easing css animation bring them together. the bigger picture consists of following graphic images: the way want this: with css have below, looking this: here css , html code: .clip_frame /* used clip contents in case of image frame */ { overflow: hidden; } .middlecontent { text-align: center; position: relative; } .middlecontent > img { display: inline-block; } .centervertical { display: inline-block; vertical-align: middle; } .header-left { float: left; margin-left: 0; position: relative; } .header-left-top { vertical-align: top; position: absolute; } .header-left-bottom { vertical-align: bottom; position: absolute; } .header-right { float: right; margin-rig...

runnable - Android update UI every 2 seconds -

Image
i have been searching around , tried out solutions day nothing worked, decide post code here , hope can give me help, thanks! i have fragment extends listfragment. the list has 4 items; bottom three, set pictures , text in getview() method in private listadapter class . first one, want continuously change picture. have array, promotion_image_array , of bitmap contains 3 bitmap use source first item. following code of getview() , screenshot of got right now: @override public view getview(int position, view convertview, viewgroup parent) { final viewholder holder; view myview = convertview; system.out.println("in getview"); if (myview == null) { myview = inflater.inflate(r.layout.home_category_item, null); holder = new viewholder(); holder.item_image= (imageview)myview.findviewbyid(r.id.item_image); holder.res_name = (textview)myview.findviewbyid(r.id.res_name); ...

A strange ssl error on android: SSL handshake aborted,Connection reset by peer -

Image
the error happens sometimes, error state may last while, , after recover automatically. the exception below: ssl handshakes failed,it seems server reset connection,then captured packets @ sever end: 192.168.5.126 server,192.168.111.216 android client.we can see client reset connection first , send "client hello" server repeatedly, server reset connection. in successfull case, packets below: so, why client choose reset connection, happens @ time? does server not support tls1? not exactly, ok. dose network affected? use wifi , can capture packets on server end indicates network ok. some bugs may exist in implementation of https? use org.apache.http package connect https server. then google it, found no complete solution. has encountered problem this, or can help? lot!

sorting data in crystal report that contains a combination of strings and numbers -

i have read how sort data in crystal report, have different issue, data want sort contain description(string) , numbers, , want sorting according these numbers ascending.. data description of stock item plus weight in kg, sorting according weight.. data like: boxes / kg +300 kg boxes / kg +1000 kg boxes / kg +500 kg boxes / kg +25 kg they must : boxes / kg +25 kg boxes / kg +300 kg boxes / kg +500 kg boxes / kg +1000 kg so how sort them? create formula below: @splitstring stringvar s1; stringvar s2; numbervar n1; s1 := {stringformat_.stringvalue}[13 20]; s2 := s1[1 length(s1)-2]; n1 :=tonumber(s2); place formula in report apply short on formula. after can suppress if required...

sql - Previous Weekdays -

i have requirement in have find start , end date. start date first sat of previous month of created date , end date previous friday of created date. eg below .. passing created date , need derive start , end date below. created_dt start_date end_date 04/08/2015 15:36 04/07/2015 00:00 31/07/2015 23:59 07/07/2015 15:32 06/06/2015 00:00 03/07/2015 23:59 you should not depend on locale-specific nls settings . you use following functions: next_day add_months trunc for example, sql> alter session set nls_date_format='dd/mm/yyyy hh24:mi:ss'; sql> t(created_dt) as( 2 select to_date('04/08/2015 15:36','dd/mm/yyyy hh24:mi') dual union 3 select to_date('07/07/2015 15:32','dd/mm/yyyy hh24:mi') dual 4 ) 5 select created_dt, 6 next_day(trunc(add_months(created_dt, -1),'mm') -1,to_char(to_date('6','j'),'day')) -1 start_date, 7 next_day(trunc(...

Show PDF saved as blob in oracle db in Birt report -

i designing birt report have requirement of showing pdf saved blob in oracle db. tried add dynamic image in table column of report. when generate report output in bytes format not pdf. possible show pdf in report saved blob in db table. birt doesn't recognize pdf image format probably. i don't think supported. btw, birt rom documentation not formats are supported. handling pdf image seems weird, anyway. pdf can have multiple pages. in our application, use post-processing tool (you use itext this) append pdf birt-generated pdf. however, approach depends on way have birt integrated application. example, not work sample webviewer.

ios - Importing AFNetworking without pod -

Image
i want add afnetworking without pod , source code project. started adding source code , following libraries. then added prefix file #import <availability.h> #if __iphone_os_version_min_required #ifndef __iphone_6_0 #warning "this project uses features available in iphone sdk 6.0 , later." #endif #ifdef __objc__ #import <uikit/uikit.h> #import <foundation/foundation.h> #import <systemconfiguration/systemconfiguration.h> #import <mobilecoreservices/mobilecoreservices.h> #endif #else #ifdef __objc__ #import <cocoa/cocoa.h> #import <systemconfiguration/systemconfiguration.h> #import <assertmacros.h> #import <coreservices/coreservices.h> #endif #endif and add prefix file build settings -> apple llvm 6.1 - language -> prefix header. after built project , got following errors: implicit declaration of function 'secitemexport' invalid in c99 use of undeclared identif...

What is the relationship between Errors, Exceptions and Interrupts in Python 3? -

in python 3 there many types of exception. exception names end "error" (for example, standarderror , overflowerror ). other exceptions not end in error (eg. keyboardinterrupt , systemexit ). are errors derived class exception? exceptions interrupt program execution? is inheritance tree accurate? errors -> exceptions -> interrupt docs : exception : built-in, non-system-exiting exceptions derived class. user-defined exceptions should derived class. so, systemexit , keyboardinterrupt meant terminate program (and don't expect except exception catch them; if want catch them, need more specific); generatorexit explained in docs itself.

ionic - navigator.online works in desktop but always returns true in my android phone -

i need check if user connected internet. code works on browser fails in android phone. in app.js , have following code: $rootscope.online = navigator.online; $window.addeventlistener("offline", function () { console.log("called offline") $rootscope.$apply(function() { $rootscope.online = false; }); }, false); $window.addeventlistener("online", function () { console.log("called online") $rootscope.$apply(function() { $rootscope.online = true; }); }, false); in app, events never fired , navigator.online returns true? how fix this?

android - Different AndroidManifest.xml for low resolution and high resolution -

i'll have split app (apk) in 2 chunks: low res, uses low res textures. high res, uses high res textures. now "low" , "high" here relative. low comprises textures in 1x , 2x scales, , high same textures @ 3x scale. yes app ported ios. because of size reasons i'll have make multiple apks. so, have draw line somewhere, , i'll decide use low res devices 320 dpi, , high res devices dpi beyond that. 400 , up, or something. looks like, can separate dpis using supported-screens tag in androidmanifest.xml, it's clear me how should performed, there no way specify actual dpi. knowledge might not enough have hard time grasping how relate thing "dp" (essentially points in ios speak) "dpi" i.e. density. http://developer.android.com/guide/practices/screens_support.html it looks 320ish dpi in android-speak "xhdpi" , stuff above xxhdpi , on (~480 dpi) according table: low res: xhdpi (extra-high) ~320dpi high res: xx...

c# - Taking input in c sharp program from another screen -

i have develop data base calling center, have software provided company. when ever call number of caller shown in minor screen inside calling program. i have take caller id input database in order save , search address , other information user. friend told me auto can take type of input want create in c #, dont know search it. can point me right direction ? or share example edit: suggestion given 1 have use image processing. thats way solve problem. no other solution yet. what auto it, can ? dont want in image processing.

android - Crashlytics Fabric : Failed to execute task -

i've been having issue , don't know how fix it. my project use crashlytics, it's crash , not sent report. have timeoutexception: 08-25 03:04:31.876 2856-2856/connectivit.app e/fabric﹕ failed execute task. java.util.concurrent.timeoutexception @ java.util.concurrent.futuretask.get(futuretask.java:176) @ com.crashlytics.android.core.crashlyticsexecutorservicewrapper.executesyncloggingexception(crashlyticsexecutorservicewrapper.java:44) @ com.crashlytics.android.core.crashlyticsuncaughtexceptionhandler.uncaughtexception(crashlyticsuncaughtexceptionhandler.java:275) @ java.lang.threadgroup.uncaughtexception(threadgroup.java:693) @ java.lang.threadgroup.uncaughtexception(threadgroup.java:690) --------- beginning of crash 08-25 03:04:31.876 2856-2856/connectivit.app e/androidruntime﹕ fatal exception: main process: connectivit.app, pid: 2856 java.lang.runtimeexception: unable start activity componentinfo{connectivit.app/connect...

memory - Java - Running .jar heapdump error -

i'm running .jar on ibm (as400) server. works fine, .jar runs tcp server using netty framework sockets. after while, java throws heap dump error , stops execution. generates files: .phd , .txt. how can solve this? why produced?

python - Scraping Multiple Websites with Single Spider using Scrapy -

i using scrapy scrape data this website . following code spider . class stackitem(scrapy.item): def __setitem__(self, key, value): if key not in self.fields: self.fields[key] = scrapy.field() self._values[key] = value class betaspider(crawlspider): name = "betaspider" def __init__(self, *args, **kwargs): super(betaspider, self).__init__(*args, **kwargs) self.start_urls = [kwargs.get('start_url')] rules = (rule (linkextractor(unique=true, allow=('.*\?id1=.*',),restrict_xpaths=('//a[@class="prevnext next"]',)), callback="parse_items", follow= true),) def parse_items(self, response): hxs = htmlxpathselector(response) posts = hxs.select("//article[@class='classified']") items = [] post in posts: item = stackitem() item["job_role"] = post.select("div[@class='uu mb2px']/a/strong/tex...