Posts

Showing posts from January, 2014

angularjs - Getting 403 error while accessing facebook user profile pic -

facebook api returns me facebook profile picture url. save url in db , fetch there when view profile page. i'm trying show facebook profile picture in profile page of angularjs application i'm building. this url getting response. https://scontent.xx.fbcdn.net/v/t1.0-1/p200x200/14100401_286861985019877_63722353171428782_n.jpg?oh=b2bfb6e86553aef6f37989d965e5375e&amp;oe=58584dc1 i'm trying show this. <img src="https://scontent.xx.fbcdn.net/v/t1.0-1/p200x200/14100401_286861985019877_63722353171428782_n.jpg?oh=b2bfb6e86553aef6f37989d965e5375e&amp;oe=58584dc1" ng-src="https://scontent.xx.fbcdn.net/v/t1.0-1/p200x200/14100401_286861985019877_63722353171428782_n.jpg?oh=b2bfb6e86553aef6f37989d965e5375e&amp;oe=58584dc1" class="img-circle"> i fetch db , save in variable , pass variable src, i'm getting network error: 403 forbidden. but when edit html console , hard code url, shows. why facing such issue? my faceboo...

javascript - How to prevent Axios from encoding my request parameters? -

i'm trying pass in api key through url parameters in request. however, notice axios encodes characters in api key when sending request. causes api reject request couldn't recognise key. how can prevent axios encoding parameters? you can use custom param serializer follows: axios.get('https://foobar.com/api', { paramsserializer: function(params) { var result = ''; // build query string return result; } }); paramsserializer can set @ instance level: var instance = axios.create({ paramsserializer: function(params) { /* ... */ } }) or @ global level: axios.defaults.paramsserializer = function(params) { /* ... */ }; another option directly add api key url: axios.get('https://foobar.com/api?api_key=' + key); you can add additional parameters using `params' config option: axios.get('https://foobar.com/api?api_key=' + key, { params: { foo: 'bar' } });

android - Resize height of Infowindow -

i have google map showing current location , place name in infowindow. it's working well, problem when place name long, @ time, whole text not showing in infowindow this . how can resize infowindow? code below: private class custominfowindowadapter implements googlemap.infowindowadapter { private view view; public custominfowindowadapter() { view = getlayoutinflater().inflate(r.layout.info_window, null); view.setlayoutparams(new relativelayout.layoutparams(500, relativelayout.layoutparams.wrap_content)); } @override public view getinfocontents(marker marker) { if (checkin.this.marker != null && checkin.this.marker.isinfowindowshown()) { checkin.this.marker.hideinfowindow(); checkin.this.marker.showinfowindow(); } return null; } @override public view getinfowindow(final marker marker) { checkin.t...

ios - Why must I define variables twice in the Header file? -

why must define variables twice in header file? differences there between these variables? the first definition here: @interface mycontroller: uiviewcontroller { nsinteger selectedindex; } the second definition here: @property (nonatomic) nsinteger selectedindex; what you're seeing required in earlier versions of objective-c, isn't more. in first versions of objective-c used next until new runtime introduced (with objective-c 2.0 on mac os x), instance variables had declared part of class's structure in @interface . reason if subclassed class, compiler needed know instance variable layout of class see @ offset put subclass's instance variables. when properties introduced, synthesized properties had "backed" instance variable in class's structure. therefore had declare both instance variable , property. all of above no longer true. newer objective-c less fragile in way looks instance variable...

c++ - SFML & OpenGL(glew) Why does my program fail when drawing to new window? -

i have problem regarding sfml windows, contexts , opengl drawing follows: when create new window draw (because need fullscreen or changed delicate context settings @ runtime) use sf::window::create(args...) create new window, old 1 vanishes. understanding not affect opengl calls, because "active" states of contexts windows hold set automatically (so new window active). so why opengl fail draw new window or stops working ? i use wrappers sfmlcontents(sfmlhandler) , hide opengl calls in class(graphics). here's code: constructor of mainapp: mainapp::mainapp() { imediahandle::contextsettings settings; settings.depth = 24; settings.stencil = 8; settings.antialiasing = 0; settings.openglmajor = 3; settings.openglminor = 3; sfmlhandle.createwindow("test", 800, 600, settings); graphics.init(); //i want able following line sfmlhandle.createwindow("test", 200, 400, settings); } this code works fine old wind...

Android : How to set ClickListener for Pop-Menu in Card View? -

Image
i'm developing android music streaming application. have card views , each card view has pop menus (as shown in image) . want id of card clicked. albumadapter class extends recyclerview , can't set id of card clicked. showing error red lines. the code have set having error inside lines.. albumsadapter.java.. public class albumsadapter extends recyclerview.adapter<albumsadapter.myviewholder> { private context mcontext; private list<album> albumlist; public class myviewholder extends recyclerview.viewholder { public textview title, count; public imageview thumbnail, overflow; public myviewholder(view view) { super(view); title = (textview) view.findviewbyid(r.id.title); count = (textview) view.findviewbyid(r.id.count); thumbnail = (imageview) view.findviewbyid(r.id.thumbnail); overflow = (imageview) view.findviewbyid(r.id.overflow); } ...

php - How to open port in Ubuntu 14.04 for Sendgrid -

i have problem send email through sendgrid host. https://sendgrid.com/docs/classroom/basics/email_infrastructure/smtp_ports.html how open port 25, 2525, 465 , 587 respectfully send mail sendgrid? thanks sendgrid provides rest api , dont need open ports that. article refers setting own smtp server not want. have @ this example better explain how can send mail using sendgrid.

html - How to control position of profile element in parent element? -

i write profile html , css. have problem when control element position , send front. i have code this: /* profile custom */ .service-container { background: url('http://images.indianexpress.com/2016/05/love-autumn-tree_759_thinkstockphotos-177812216.jpg'); height:500px; width: 400px; } .layer { background-color: rgba(0, 179, 0, 0.6); width: 100%; height: 100%; } figure.card-profile { font-family: roboto_regular; border-style: solid; border-width: 1px; border-color: rgb(255, 255, 255); position: relative; float: left; overflow: hidden; margin: 10px 1%; width: 100%; color: #333; text-align: left; } figure.card-profile img { max-width: 100%; vertical-align: middle; border-style: solid; border-width: 6px; border-color: rgb(255, 255, 255); height: 90px; width: 90px; border-radius: 50%; margin: 40px 0 0 10px; } figure.card-profile p { display: block; border-radiu...

java - singleton class that survives Process termination -

i've read several post regarding singleton class destruction or singleton pattern bad in android this , this but not able understand how declare singleton class or use sharedpreference persistance can provide example on how maintain global objects across application or how achieve in proper way appreciated. i think this link mentioned quite good.as personal experience best way maintain global objects in application use class extends application class, can manage objects setter , getter methods in class.this technically works singleton in android except of house keeping done android it's wise use mechanism instead of singleton. on other hand shared preferences has entirely different job , used storing user data , behavior

mesos - Apache ZooKeeper Error status=1 -

i getting error on mesos master node. anyone know means , how resolve it? bash-4.2$ sudo systemctl status zookeeper â— zookeeper.service - apache zookeeper loaded: loaded (/usr/lib/systemd/system/zookeeper.service; enabled; vendor preset: disabled) active: activating (auto-restart) (result: exit-code) since wed 2016-08-24 01:44:31 edt; 2s ago process: 3164 execstart=/opt/mesosphere/zookeeper/bin/zkserver.sh start-foreground (code=exited, status=1/failure) main pid: 3164 (code=exited, status=1/failure) aug 24 01:44:31 scsor0004331001.rtp.openenglab.netapp.com systemd[1]: unit zookeeper.service entered failed state. aug 24 01:44:31 scsor0004331001.rtp.openenglab.netapp.com systemd[1]: zookeeper.service failed. sudo journalctl -u zookeeper aug 24 01:19:52 scsor0004331001.rtp.openenglab.netapp.com zookeeper[382]: using config: /etc/zookeeper/conf/zoo.cfg aug 24 01:19:52 scsor0004331001.rtp.openenglab.netapp.com zookeeper[382]: 2016-08-24 01:19:52,582 [myid:] - info [...

angular - Add AngularJS2 plugin in Eclipse -

i started learning angularjs2. want plugin angularjs2 in eclipse ide. please suggest me how this. using eclipse mars. there's https://marketplace.eclipse.org/content/angular2-eclipse can install in eclipse neon. don't think it's compatible eclipse mars, using neon worth anyway.

npm install error (fatal: bad object f18e4d058698a689943db9cb41f767efbc2c85ed) -

recently downloaded code github , tried install it. however, found errors during process ass followed: terrylai@terrys-macbook-pro:~/copay$ npm install npm err! git rev-list -n1 f18e4d058698a689943db9cb41f767efbc2c85ed: fatal: bad object f18e4d058698a689943db9cb41f767efbc2c85ed npm err! git rev-list -n1 f18e4d058698a689943db9cb41f767efbc2c85ed: npm err! darwin 15.5.0 npm err! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" npm err! node v6.4.0 npm err! npm v3.10.3 npm err! code 128 the following part of package.json. tell me how solve it? "dependencies": { "bitcore-wallet-client": "git://github.com/digibyte/bitcore-wallet-client.git#32b2f6434d1d4a77d4878d7dee9cf374086c3966", "express": "^4.11.2", "fs": "0.0.2", "grunt": "^0.4.5", "grunt-angular-gettext": "^0.2.15", "grunt-browserify": "...

windows - how to bind a specific ip to a mongodb service? -

i want send request mongodb in remote server machine. following line in configuration, , not allowed remove it: bindip:127.0.0.1 i want bind ip 45.56.65.100 mongodb service on windows. can include 45.56.65.100 in ip solve problem? you can bind 1 ip shown above "bindip:127.0.0.1" ips machine using: "bindip:0.0.0.0" or multiple ips notated here: https://stackoverflow.com/a/36450320/2585788 bindip: 172.31.60.184,127.0.0.1 remember not put space after comma. answered apr 6 @ 11:50 puneet goyal please make sure up-vote original related answer.

java - Method overload attempt gives name clash error. Not using Generics -

i have following code. public class myclass { public static void mymethod( arraylist<arraylist<integer>> src, arraylist<arraylist<integer>> dest, integer[] selectedindices) { } public static void mymethod( arraylist<arraylist<double>> src, arraylist<arraylist<double>> dest, integer[] selectedindices) { } } i expecting overload of mymethod compiler complains of name clash error. upon searching so, found related (probably, not sure) answer here , not using generics. methods don't go through type-erasure . can explain missing? you missing 1 important point here. you still using generics in code. consider these 2 loc arraylist<arraylist<integer>> src arraylist<arraylist<double>> src java internally, in implementation of these collection classes using generics handle both of these situation , henc...

jquery - Ajax call successful, but not appearing in network panel -

i've implemented ajax call in js on wordpress front-end page. ajax call successful (sucess() called, , see 200 response on complete()), ajax call not appear in network panel within chrome. it's understanding, based on working ajax calls in past, call should appear in network panel within chrome further inspection. i'm looking in xhr subsection of network panel, , see no calls being made. have, however, looked in 'all' section of network panel verify call never showing in network panel @ all. i'm curious why be. here's js: jquery(document).ready(function() { jquery.ajax({ datatype: 'json', method: 'post', url: "<?php echo admin_url('admin-ajax.php'); ?>", data: {action: 'myaction'} }) .success(function(data) { console.log( "success " + data); }) .fail(function() { console.log( ...

use Tortoise git does not appear to be a git repository -

i use tortoise git when click git clone set url ssh://git@192.168.3.98/var/www/git.repos/myproject.git and click ok button ,showing error message fatal: 'var/www/git.repos/myproject.git' not appear git repository fatal: not read remote repository. please make sure have correct access rights , repository exists git did not exit cleanly this message. 192.168.3.98/var/www/git.repos/mypoject.git here. space directory. how error message solve? try instead: ssh://git@192.168.3.98:/var/www/git.repos/myproject.git notice ':' before path.

Type Error Occured in python executed in visual studio -

i running below code calculate current age in python using visual studio. but getting below piece of error: error: type error occured unsupported operand type built_in_function or method code: import datetime def my_current_age(): user_input = input("enter year") date_of_birth = (datetime.date(1990 , 10 , 28)) today_date=(datetime.date.today) current_age = (today_date - date_of_birth) print("you lived {}" .format(current_age)) print(my_current_age()) any suggestion python developer please thanks you assigning method of datetime today_date with: today_date=(datetime.date.today) i.e, calling function. call it, instead: today_date=(datetime.date.today()) in order work. apart that, take note parenthesis around expressions redundant, is: today_date=(datetime.date.today()) is directly equivalent to: today_date = datetime.date.today()

gcc - How do you load/store from/to an array of doubles with GNU C Vector Extensions? -

i'm using gnu c vector extensions , not intel's _mm_* intrinsics. i want same thing intel's _m256_loadu_pd intrinsic. assigning values 1 one slow: gcc produces code has 4 load instructions, rather 1 single vmovupd (which _m256_loadu_pd generate). typedef double vector __attribute__((vector_size(4 * sizeof(double)))); int main(int argc, char **argv) { double a[4] = {1.0, 2.0, 3.0, 4.0}; vector v; /* */ v[0] = a[0]; v[1] = a[1]; v[2] = a[2]; v[3] = a[3]; } i want this: v = (vector)(a); or v = *((vector*)(a)); but neither work. first fails "can't convert value vector" while second results in segfaults. update: see you're using gnu c's native vector syntax, not intel intrinsics. avoiding intel intrinsics portability non-x86? gcc bad job compiling code uses gnu c vectors wider target machine supports. (you'd hope use 2 128b vectors , operate on each separately, apparently it's worse tha...

ios - "The application bundle does not contain a valid identifier" error after installing socket mobile scan api sdk -

after installing socket mobile scan api sdk via cocoa pod, couldn't run on real device anymore. noticed sdk include "resources" group. couldn't able run project on real device after renaming , deleting "resources" group. i'm using "scanapisdk-10-3-41 2" on xcode 7.3.1 , trying run on ipad air 2. i'm posting answer in case if other people face same problem in future. commented in original question. issue solved removing space in project target name (eg. sample project -> sampleproject ). i'm not sure real reason causing problem. don't face anymore issue after re-name project target. edit : faced problem again after installing frameworks using cocoapods. managed solve problem workaround (re-naming target).

javascript - How do I loop through divs and find the nearest span and add different things to each span? -

for example had following html: <div class="div-style">div text</div> <span>span text</span> <div class="div-style">another div</div> <span>another span</span> <div class="div-style">hello</div> <span>world</span> now want is: (using jquery) go each <div> class 'div-style' find following <span> append current <span> 's text span (in effect repeating span text within span text, first span display 'span textspan text') $('.div-style').each(function(){ var t = $(this).next('span').text(); $(this).next('span').text($(this).next('span').text() + t); }) <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <div class="div-style">div text</div> <span>span text</span> <div class="div-sty...

php - Insert Multiple Records At Once With Laravel -

i inserting data rows 1 one, have heard somewhere requires time if there many data insert. ways of inserting them @ once? public function add(request $request) { if ($request->ajax()) { $books = $request->books; foreach ($books $book) { if (!empty($book)) { $add = new book; $add->name = $book; $add->user_id = auth::user()->id; $add->save(); } } } } insert multiple records using model as others have pointed out, using query builder way insert multiple records @ time. fortunately laravel , eloquent orm coupled in many useful ways. coupling allows use model query builder instance set model. // use auth; // use carbon; // use app\book; public function add(request $request) { if($request->ajax()) { // submitted books $books = $request->books; // book records saved $book_records = []; ...

progressdialog - Android tv DownloadManager with progress dialog -

i'm struggling downloadmanager on androidtv, implement download download manager, don't know progress of download process until finishes, implement download progress dialog. i found following link downloadmanager notification don't know how implement it. hope help. since able implement downloading using downloadmanager , may try adding column_bytes_downloaded_so_far constant number of bytes downloaded far. you may ideas on how implementation should done solutions given in following posts: show download progress inside activity using downloadmanager show download manager progress inside activity another option may try use progressdialog . mentioned in documentation, functions as a dialog showing progress indicator , optional text message or view. to implementation part, please check brief comprehensive solution given in post - download file android, , showing progress in progressdialog .

Rails 4 - pundit - how to write if statement to check user permissions -

i'm trying learn how use pundit rails 4 app. i have potential use policy. potential use table has attribute called :user_id. i want users permitted update instances if created them. i'm trying figure out how update action work. my current attempts shown below. class potentialusepolicy < applicationpolicy attr_reader :user, :record def initialize(user, record) @user = user @record = record end def index? true if user.is_admin? end def show? true end def new? true end def create? new? end def update? if @user.id == @potential_use.user_id # if user.id == potential_use.user_id true else false end end def destroy? update? end def edit? true end def potential_use record end end when try these, keep getting errors saying: undefined method `user_id' nil:ni...

Find and Replace in Visual Studio with Regex -

i have xsl file need replace classes single class. example: class="class1" , class="anotherclass" , class="yoyoclass" and replace values between quotes newclass . find: class=".*?" replace: class="newclass" explanation: the replacement self-explanatory, since same classes. part of find regex needs explanation .*? term. here, ? tells regex stop consuming upon hitting first closing quotes. try removing ? , see regex become greedy , match until last quote.

java - Handling JWT Exception in Spring MVC -

i trying implement token authentication on our rest api, , referring article . on article discusses on creating token jwt used, current problem every time invalid token being passed on application exception being created jwtexception.class , want catch exception using global exception handler class. tried wrapped jwtexception on application's exception class no avail exception not caught. @controlleradvice public class globalexceptionhandler { @exceptionhandler(value={jwtexception.class}) public responseentity<?> handletokenexception(jwtexception e){ return new responseentity<object>(httpstatus.unauthorized); } @exceptionhandler(value={invalidauthtokenexception.class}) public responseentity<?> handletokenexception(invalidauthtokenexception e){ return new responseentity<object>(httpstatus.unauthorized); } } your globalexceptionhandler isn't global, catch exceptions occur in controller (hence controlleradvice ), exceptions runn...

ios - Multiple Unresolved Identifiers in Swift -

Image
have no clue how fix these errors because i'm amateur developer keep reoccurring on , on again no matter do. there way can stop once , all? looks may have curly bracket since unresolved identifier means doesn't know item specified @ location it's written. think have curly bracket after "declare hide keyboard tap" block of code. proofread code small mistakes that. when many similar errors show up, it's caused small

c# - Entity Framework Create Audit Table/History table? -

i want create history/audit table particular entity. complex entity many child tables , using repository patter our application. looked overriding dbcontext savechanges?. practice use specially 1 entity?. other options?. thanks in advance. i've been working on library might help. take @ audit.entityframework library, intercepts savechanges() , can configured filter entities want audit.

php - What are the best practices for creatiang a "settings" model in Laravel 5? -

this first project using laravel (i'm starting 5.2). i'm building self managed website. there's admin should save site settings using later in website. eg: background color, social networks, carousel pictures, products, etc. my first try creating model "setting" with: id | key (unique) | value. when tried save social networks (to display in site header), realized i'd have save in "value" json url, title, etc... ugly implementation relational model, came conclussion bad. created sepparated model socialnetwork with: id | url | image | name. now i'm thinking in loading these models @ once in basecontroller can have through controllers, i'm not sure it's correct. mean, array $settings models part of it: abstract class basecontroller extends controller { protected $settings; ... public function __construct(...) { $this->settings = [ 'backgroundcolor' => 'red', ...

javascript - How can I toggle the title attribute of a element? -

i have html: <i class="fa fa-check" title="click accept"></i> <i class="fa fa-check checked" title="undo"></i> <i class="fa fa-check" title="click accept"></i> as see everywhere there checked class name , title of element has undo (also title of other elements have click accept ) . mean checked class name , undo title have unique . now i'm toggling class name this: $('.fa-check').on('click', function(){ $el = $(this); $el.not($el).removeclass('checked'); $el.toggleclass('checked'); }); in other word, i'm removing checked class elements , toggling checked class clicked element. want know, how can same thing title attribute ? prop preferred on attr for example: $('.fa-check').on('click', function(){ var $el = $(this); var title = $(this).prop('title'); if(title === 'undo...

Listing SoftLayer invoice greater than a date and time -

i have softlayer invoice has " createdate " value of " 2016-08-23t14:21:29-05:00 ". (** note 5 hour offset). i use softlayer_account::getinvoices() api object filter set below: $filter = new stdclass(); $filter->invoices = new stdclass(); $filter->invoices->createdate = new stdclass(); $filter->invoices->createdate->operation = 'greaterthandate'; $filter->invoices->createdate->options = array(); $filter->invoices->createdate->options[0] = new stdclass(); $filter->invoices->createdate->options[0]->name = 'date'; $filter->invoices->createdate->options[0]->value = array($searchdatetime->format('m/d/y h:i:s')); $slclient->setobjectfilter($filter); $result = $slclient->getinvoices(); it used date specify in query, can add 5 hour time offset date , time shown in createdate , still invoice. (i.e. query dates greater "2016-08-23t19:21:00" , invoice "creat...

javascript - Owl Carousel JS return to first image -

i have owlcarousel nav links within first slide, there way make carousel return first slide after event, timer, or when mouse moves out of carousel? possible trigger carousel mousing on link rather clicking it? code snippet: <div class="owl-carousel"> <div class="item" data-hash="slide0"> <ul> <li><a class="button secondary url" href="#slide1">1</a></li><br/> <li><a class="button secondary url" href="#slide2">2</a></li><br/> <li><a class="button secondary url" href="#slide3">3</a></li><br/> <li><a class="button secondary url" href="#silde4">4</a></li><br/> <li>...

CSS styling not working when uploaded to server? -

i've created basic page, template had rest of site, pulled of apart make page "not designed". has unordered list short paragraph fixed top , logo float right. works in system preview, when uploaded server loses css styling. this html: #title { width:400px; position:fixed; } #icon { position:relative; float:right; } h5 { font-size:25px; color:#ff6682; line-height:1.35em; } a:link { color:#253b84; } <!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>/other</title> <link href="assets/scripts/amk_website.css" rel="stylesheet" type="text/css" /...

c# - Selecting a partially displayed WPF checkbox -

Image
i having design problem , know there has way make work. tried solutions here: annoying auto scroll of partially displayed items in wpf listview didnt work me because not allowed work in code-behind. have list of items wpf listbox . this: when try select checkbox in line 5, window centers on not check it. after further testing, found not select checkbox long bottom border of item not in view. here xaml listbox , style : <listbox grid.column="0" grid.row="1" name="requestcheckoutv" itemssource="{binding path=checkoutvm, mode=twoway, isasync=true}" selecteditem="{binding path=selectedpermit}" borderthickness="0" keyboardnavigation.tabnavigation="continue"> <listbox.itemcontainerstyle> <style targettype="{x:type listboxitem}"> <setter property="keyboardnavigation.istabstop" value="false" /> <se...

c# - Aspose PDF check formatting before fill field -

i'm using aspose pdf read pdf, fields have format restrictions (ie. format set number, no chars can inputted field). however; when i'm trying fill field using aspose pdf, there way let aspose check field's format before enters value? aspose.pdf.facades.form form = new aspose.pdf.facades.form(appdomain.currentdomain.basedirectory + "test.pdf"); try { form.fillfield("percentage_textbox", "testing"); } catch (exception) { // never triggers console.writeline("error"); throw; } form.save(appdomain.currentdomain.basedirectory + "test(output).pdf"); this code i'm using. i'm expecting when it's filling field, result error, since field's format in acrobat set number field.

xcode - Is it possible to define different background image for each ios device? -

for example, set background of iphone 5 image1 , background of iphone 6 image2, , third different image iphone 6+ how can achieve using interface builder programmatically (this assumes portrait only): enum device { case iphone5 case iphone6 case iphone6p static var sizeclass: device { let screenwidth = uiscreen.mainscreen().bounds.width switch screenwidth { case _ screenwidth < 375: return .iphone5 case 414: return iphone6p default: return .iphone6 } } } then set image: switch device.sizeclass { case .iphone5: // set image case .iphone6: // set image case .iphone6p: // set image }

imagemagick - Bash output image dimensions of all files with a specific name -

i want go through album artwork images in music folder, and make sure album covers square (width = height) make sure album covers have minimum width of 500px i found several things each of these, i'm painfully slow bash, , can't quite figure out. closest i've come this: find /mnt/2tb_1/music/archive/complete -mindepth 2 -maxdepth 2 -type d -exec echo identify -format "%wx%h" "{}/folder.jpg" ';' -fprint0 /mnt/2tb_1/music/output.txt this looking @ correct folder depth. when run this, command prompt shows dimensions correct folder.jpgs, , output.txt file has paths (without line breaks). however, need them in 1 place (and preferably in output.txt file, since there lot of folder.jpg files at). i wouldn't turn down bash script filtering mentioned, i'm quite willing settle output like: w xh path 500x500 /mnt/2tb_1/music/archive/complete/artist1/album1/folder.jpg 500x500 /mnt/2tb_1/music/archive/complete/artist1/album2/fo...

javascript - Using redux-form's Field with additional props -

i create higher-order component renders field component of redux-form library. problem like pass other props decorate component label , example. these input components usable without redux form. one way of accomplishing following: function mycomponent(props) { return ( <div> <label>{props.label}</label> <field name={props.name} component="input" type="text" /> </div> ) } this good, redux-form throws error if component rendered without having been wrapped in reduxform({}) . another way following: <field component={mycomponent} name="my-component" type="text" /> but doesn't allow me pass props, label mycomponent . the current solution have come pass form={false} prop mycomponent render <input> if component not in form , <field> if component is in form. seems inelegant solution, i'd rather render same component regardl...

Keep html formatting of outlook email body in access form -

i have linked table in access points folder in outlook. want able manipulate these emails inside of access. i'm able this, problem formatting of email body field (called contents in linked outlook table) lost. have text box set rich text, converted plain text. there workaround here keep original formatting including tables seen in email? used wizard in access link outlook folder.

jquery - Using SVG to animate and flip a hexagon -

i have never used svgs reading tutorials , tested stuff. learning how make shapes hexagon need make flip down on vertical axis , expanding in size while keeping bottom of non flipped hexagon top of new flipped hexagon. my code here: <html> <style> #test:hover { fill: yellow; } </style> <body> <div class="viewbox"> <h1>svg testing</h1> <svg height="900" width="400" version="1.1" xmlns="http://www.w3.org/2000/svg" style="background-color: gray;"> <path d="m0 86.60254037844386l50 0l150 0l200 86.60254037844386l150 173.20508075688772l50 173.20508075688772z" fill="green" id="test"></path> </svg> </div> </body> </html> what next steps? do use library this? you can use snap, have tagged question that.. snap('#test').animate({ transf...

python - Import error when I try use "requests" module -

this question has answer here: importing installed package script raises “attributeerror: module has no attribute” or “importerror: cannot import name” 1 answer i have problem, when try use requests lib import requests r = requests.get('http://www.python.org/') print(r) after that, got following error traceback (most recent call last): file "c:/users/admin/documents/alex/test.py", line 3, in <module> import requests file "c:\program files\python3\lib\site-packages\requests\__init__.py", line 53, in <module> .packages.urllib3.contrib import pyopenssl file "c:\program files\python3\lib\site-packages\requests\packages\__init__.py", line 27, in <module> . import urllib3 file "c:\program files\python3\lib\site-packages\requests\packages\urllib3\__init__.py", line 8, in <module...

How is a double loop implemented in Elixir? -

how double loop implemented in elixir? i interested in writing double loop compare naivesort quicksort implementation. then realized don't know how write double loop in elixir! so, how double loop written in elixir? keep in mind i'm trying naivesort... an idiomatic way might use list comprehensions like: defmodule quick def sort([first | rest]) sort(for(n <- rest, n < first, do: n)) ++ [first] ++ sort(for(n <- rest, n >= first, do: n)) end def sort([]) [] end end iex(5)> quick.sort [5,4,3,2,1] [1, 2, 3, 4, 5] of course quick sort lends quite nicely recursive solution since algorithm "sort items smaller me, add me, add items larger me". expressed in elixir (and erlang). the for list comprehension. builds list based upon generator (the n <- rest part , filter (the n < first part).

Does Anypoint studio have a plugin for debugging mule files in Intellij -

i want debug through code contains mule , various xml files in intellij. hoping know if there plugin same. use mule-intellij plugin reference urls: https://plugins.jetbrains.com/plugin/8212?pr= https://github.com/machaval/mule-intellij-plugins https://forums.mulesoft.com/questions/1777/moving-from-mule-studio-to-intellij.html my entire project coupled both front end application , mule - maven based( suppose work both intellij , anypoint).each , every application have own pom. when work individual mule application, import apps maven based. anypoint studio best work on mule interfaces compare intellij. when comes front end application, used intellij. when working on large project ( both front end , mule) if try import entire project in anypoint- hangs. cases intellij best import module( easy search, code monitor jira history etc). i switch intellij , mule studio case case. after installing mule-intelij plugin. see mule configuration xml marked 'm'. ...

r - How to add numbered section folding to rmarkdown -

i trying show sections of text after clicking on them (very code folding). so far using following html script @ beginning of rmd file: <script language="javascript"> function toggle(num) { var ele = document.getelementbyid("toggletext" + num); var text = document.getelementbyid("displaytext" + num); if(ele.style.display == "block") { ele.style.display = "none"; text.innerhtml = "show"; } else { ele.style.display = "block"; text.innerhtml = "hide"; } } </script> but whenever use sections/headers lose automatic numbering. <a id="displaytext" href="javascript:toggle(5);"><h1>i code fold section </h1></a> <div id="toggletext5" style="display: none"> bla bla </div> and heading numbering this: 1 - code fold section

joomla - PHP Fatal error: Call to undefined method JDocumentError::close() -

i've searched solution everywhere couldn't find answer. days got error without change or anything: and can't access website in entire day starts working again without change, , days later same problem. can do? internal server error the server encountered internal error or misconfiguration , unable complete request. please contact server administrator @ webmaster@magic.kiwitextil.com inform them of time error occurred, , actions performed before error. more information error may available in server error log. additionally, 500 internal server error error encountered while trying use errordocument handle request. my site is: www.magic.cr i can access backend always! (magic.cr/administrator) i've checked server logs , got lines repeating constantly: [23-aug-2016 16:44:53 utc] php deprecated: non-static method japplication::redirect() should not called statically, assuming $this incompatible context in /home/kiw...

fftw/c++ computes fft wrong, compared to matlab -

Image
i trying fftw c++. want test works correct. implemented simple ifft(fft(shift(data)) - data == 0 test, fails completely. the testdata rect function, amplitude , phase 1. matlab code comparison works same test. the basic question is: doing wrong? here matlab code (which using fftw...) fftw dll/.h latest. data = zeros(1, 64); halfsize = numel(data)/2; data(halfsize-10:halfsize+10) = 1; phase = ones(size(data)); data = data.*exp(phase*sqrt(-1)); ft = fft(fftshift(data)); in c++ code (not complete) std::vector<complex<double>,fftalloc<complex<double> > > data(n); std::vector<complex<double>,fftalloc<complex<double> > > datafourier(n); ... create data int nfft = data.size(); fftw_plan plan = fftw_plan_dft_1d(nfft,fftw_cast(&data[0]),fftw_cast(&datafourier[0]), fftw_forward, fftw_estimate|fftw_preserve_input); fftw_execute(plan); //fftw_execute_dft( plan, fftw_cast(&data[0]),fftw_cast(&datafourier[0]));...

python - "list indices must be integers, not list" with enumerate -

i have code cnames = data["channelnames"] goodchannels = [i i,x in enumerate(cnames) if x!='skipped'] data["channelnames"]=cnames[goodchannels] i need channel numbers later, cnames[goodchannels] throws error "list indices must integers, not list" the list made of integers. there way make work correctly? cnames[np.array(goodchannels)] not work same error, assuming there else going on here. you need list comprehension: data["channelnames"] = [cnames[i] in goodchannels]