Posts

Featured post

renaming files in a directory using python or R -

i went across similar questions of renaming files in directory using python. i have these files in directory want rename: -statistical_analysis_with_r -statistical_pattern_recognition_3rd_edition -statistical analysis r -statistical pattern recognition 3rd edition for wrote script in windows: def naming(so): import re w=re.split('[ _]+',so) r=[] in w: r.append(i.capitalize()) print(' '.join(r)) import os c in os.listdir(os.getcwd()): if c.endswith(".pdf"): os.rename(c,naming(c)) print(os.listdir(os.getcwd())) but getting error: statistical analysis r.pdf traceback (most recent call last): file "<ipython-input-79-d7f645d6d3e5>", line 4, in <module> os.rename(c,naming(c)) typeerror: rename: can't specify none path argument can what's going on? and doing same thing using r (www.r-project.org)? loads of in advance. your naming functio

ruby on rails - Carrierwave Timeout -

i have used carrierwave users upload files in rails app. when user uploads multiple files of size more 400mb (approx.) timeout error. note: i've hosted app rails app on heroku. uploading large files through heroku not recommended. limit request 30 seconds , not enough time 400mb. if open using s3, heroku provides potential rails solution that.

vbscript - How to batch combine PDFs with sub-folder based non-JavaScript bookmarks -

having been avid reader here many years, have question of own couldn't find answer for. i looking solution, preferably vb scriptable, combines several pdf files different subfolders 1 new pdf , adds bookmarks based on folder structure, i.e. first page originating first file folder gets first level bookmark based on folder name, , second level bookmark based on file name. subsequent files folder second level bookmarks linked under first level bookmark. as added complication, bookmarks must point location in document; must not javascript based , call actions. this should happening on win7 pc. unfortunately don't know how internal workings of pdfs (yet), can't quite believe that problem uncommon isn't solved already!? can pointing me in right direction (or providing script, of course, if it's easy), or confirming above isn't possible, or else, really? thank much! best

Images won't display through CSS -

if try set background image using css, flat out not load. if use same path in html, will. making slider of these images, hence need work css. i've browsed every answer on internet similar problems , nothing works. relevant html: <div class="slider-container"> <div class="slider5"></div> <div class="slider4"></div> <div class="slider3"></div> <div class="slider2"></div> <div class="slider1"></div> </div> css: .slider-container { overflow: hidden; width: 100%; height: auto; } .slider1, .slider2, .slider3, .slider4, .slider5 { width: 100%; height: auto; position: static; top: 0px; cursor: pointer; transition: 0s linear; -webkit-transition: 0s linear; -moz-transition: 0s linear; -o-transition: 0s linear; }

html - outline-style different in chrome compared to firefox and internet explorer -

seems firefox , ie have default of black dotted outline while chrome has default of light blue solid outline. i tried change doing this: a{ outline-style: dotted; outline-color: black; } this seems catastrophe links got dotted black outline not hovered or focused. terrible because "outline" thing can differentiate mouse focus keyboard key focus. any other idea on how make chrome's outline others ? <!doctype html> <html> <head> <style type="text/css"> body{ font-size: 1.5em; font-family: verdana; } .zone2 a{ outline-width: thick; outline-color: red; } .zone3 a{ outline-style: solid; } </style> </head> <body> outline tests:<br/> <div class="zone1"> <a href="#">test link 1</a><br/> <a href=&quo

javascript - Spinner in Angular.js -

i want use spinner can show during of rest api calls better ux. have come across many existing github projects similar things. https://github.com/cgross/angular-busy https://github.com/urish/angular-spinner but i'm not able use of existing projects. think before start writing of own, want know if things i'm looking can done using these projects or other existing project. requirement: during of rest api calls uploading images, fetching data, deleting images, etc, want show spinner background faded. once have result, can show background again , remove spinner. i want use spinner start/stop controller not html. i don't want spinner xhr requests default. i think angular-busy demo solves of above requirements except needs promise param in html. there anyway can control start/stop dynamically controller rather giving promise. angular-spinner demo doesn't fade out background. there way fade out background ? can give me pointers how can solve prob

c# - Valueinjecter map base derived class -

i have base class ad . public class ad { public int id{get;set;} public string title{get;set;} public string price{get;set;} } then have lot of derived classes like: public class carad : ad { public string modelname {get;set;} } public class mobilead : ad { public string companyname {get;set;} } and accordingly have viewmodels these classes well. public class adviewmodel { public int id{get;set;} public string title{get;set;} public string price{get;set;} } public class caradviewmodel : adviewmodel { public string modelname {get;set;} } public class mobileadviewmodel : adviewmodel { public string companyname {get;set;} } i trying map derived class base class using value injecter. like: [httppost] public async task<ihttpactionresult> post([frombody] caradviewmodel caradmodel) { var ad = new ad(); ad.injectfrom(caradmodel); } but not mapping properties of derived class. can tell me if