Posts

html - Difficulties with background-image property -

i working bootstrap , change .jumbotron background image instead of default color. tried using "background-image: url("img/ponder.jpg");" , it's not working reason. have tried using , without quotation marks, , i've tried placing image in root folder.. still no luck. here picture of file structure (root folder): https://i.gyazo.com/1cf9dcfd20224c4fce8fe4a775863ab1.png and here code: html: <div class="jumbotron"> <div class="container text-center"> <h1>hello world</h1> <p>lorem ipsum dolor sit amet, consectetur adipiscing elit. integer @ pharetra eros, vel condimentum nunc. vivamus eget bibendum mauris. integer quis volutpat enim. duis id lorem feugiat, mattis sapien eget, luctus eros. pellentesque vestibulum tempus elit, sit amet luctus purus dictum vitae. suspendisse non aliquam augue. morbi sagittis mi @ turpis luctus pretium. vestibulum sit amet orci orci.</p> ...

ios - Segue not passing data between ViewControllers -

Image
i making ios app uses payment methods. at moment trying work on checkout flow, contains oderformviewcontroller , checkouttableviewcontroller can see below: i connected both dragging segue, highlighted in blue. added segue identifier segue. i called first view controller e_orderformviewcontroller (its title shipping address), , in created ibaction for continue button , used -(void)prepareforsegue:(uistoryboardsegue *)segue sender:(id)sender pass in information. i have order model, properties in it. on checkouttableviewcontroller, have got labels , orderinfo public properties, first view controller 1 can access it. #import <foundation/foundation.h> @interface order : nsobject @property(strong, nonatomic) nsstring *shippingname; @property (strong, nonatomic) nsstring *shippingaddress; @property (strong, nonatomic) nsstring *shippingcity; @property(strong, nonatomic) nsstring *shippingstate; @property(strong, nonatomic) nsstring *shippingzip; @end //e_orderform...

bitbucket - How to automate building and deploying Jekyll site to webserver via FTP -

my jekyll files stored in bitbucket, , able automatically generate _site folder on every new change gets pushed. (note, don't want push _site folder git, out of question). once _site generated, automatically deploy webserver via ftp. is @ possible? options? thank you! since didn't mention _site folder go, here' generic answer. in short, need webserver or service listens bitbucket post commit hook , here relevant documentation that. that way, on every push, bitbucket trigger action , notify server/app/service build new _site , deploy want to. here's tutorial on setting use of cron jobs , webserver. link a simple vps work, or tiny amazon ec instance/azure virtual machine. of course, these not 100% free. if hate using servers, a continuous integration (ci) service can used instead, on commit hooks trigger build, travis-ci , drone.io free public repos, if repo private you'll have go paid service. there many others well. (note tr...

visual studio code - What does the isShellCommand property actually do and how should you use it? -

what isshellcommand property , how should use it? the description when hovering says: "specifies whether command shell command or external programm. defaults false if omitted" and in https://code.visualstudio.com/docs/editor/tasks mention in example with: "we want run gulp command in shell (vs code directly executing it) used isshellcommand" so difference between shell command vs external program? does running isshellcommand = false mean vscode not "directly executing it" meaning run "command" , don´t listen output (because ran external command?) in turn means cannot use problem matchers. or if setting isshellcommand = true mean vscode "directly executing it" , keep track of , listen output generated can use problem matchers etc integrate vscode? considering example below using tsc compile typescript project: c:\users\j\code\vscode-project>where tsc c:\program files (x86)\microsoft sdks\typescript\1.4\tsc.exe ...

amazon web services - JEE Container (Glassfish) and HikariCP - JNDI vs managing my own instance -

is considered bad/acceptable/good/best practice manage own instance of hikaricp connection pool, goal don't have configure jndi resources within glassfish? some background: my deployment environment aws's elastic beanstalk, running glassfish within docker container. have working solution generating jndi resources whe deploying in environment, makes deployment quite fragile. see following question details: how configure glassfish instance running on aws/elasticbeanstalk/docker? . i'm quite keen rid of deployment hassles, don't know connection pooling, , hikaricp in particular. cruising bruising in direction? super simple implementation might create static variable contains connection pool.

ios - Change UITableView custom header view's button image not working -

i created uiview using nib file. , set table view header view. in view have button. tried change button's image, nothing changes. - (uiview *)tableview:(uitableview *)tableview viewforheaderinsection:(nsinteger)section { if (section == 0) { healthplanheaderview *view = (healthplanheaderview *)[[[nsbundle mainbundle] loadnibnamed:nsstringfromclass([healthplanheaderview class]) owner:self options:nil] firstobject]; [view.addbutton addtarget:self action:@selector(editfood) forcontrolevents:uicontroleventtouchupinside]; self.healthplanheaderview = view; return view; }else { return nil; } } - (void)editfood { self.healthediting = !self.healthediting; uiimage *image = self.healthediting ? [uiimage imagenamed:@"finish"] : [uiimage imagenamed:@"edit-button"]; [self.healthplanheaderview.addbutton setimage:image forstate:uicontrolstatenormal]; } i noticed button image did set, button won't show n...

javascript - Calling layout on a subset of nodes in a loop does not properly layout the nodes -

i have several groups of nodes, , need each group own circle around different location. i have loop adds nodes chart, , @ end gets nodes, , attempts circularize them. however when run program, nodes end in grid format. how expected behavior? for( group in groups ){ cy.add([ { group:'nodes', data: { id: 1, customgroup: group}, position:{x: 0,y: 0} }, { group:'nodes', data: { id: 2, customgroup: group}, position:{x: 0,y: 0} }, { group:'nodes', data: { id: 3, customgroup: group}, position:{x: 0,y: 0} }, { group:'nodes', data: { id: 4, customgroup: group}, position:{x: 0,y: 0} }, { group:'nodes', data: { id: 5, customgroup: group}, position:{x: 0,y: 0} }, { group:'edges', data: { source: '1',target: '2', weight:1} }, { group:'edges', data: { source: '2',target: '3', weigh...

meteor - from relation table to mongodb -

i'm trying create mongodb design (but i'm new @ mongo) based on relation database schema. my question is: how far denormalize schema? : -users --wallets[field1,field2] ---items[field1,field2] ----transactions[field1,field2] --.... users -> linked lot of tables. wallets -> user can have more wallets. items -> wallet can have more items(the field values of items not regulary change). transactions -> item can have more transactions. idea to: split users in document group wallets , transactions (create reference user_id (at wallet level) , item_id (on transaction level)) in document items in document will right approach? as why mongodb: because i'm creating meteor app. as alternative @inspired's answer (which translates schema straight mongodb , models via document references ), might easier embed data user document . if choose embed, like: { name: 'username', id: objectid("512512a5d86041c7dca81914"...

how to install boost-devel 1.59 in CentOS7‏ -

i want install boost-devel 1.59 in centos7, default repo has 1.53, have compile source code. i have download 1.59 web page, , use ./bootstrap.sh , ./b2 install install boost 1.59. but when want install other packages such cgal-devel, tells me donnot install boost-devel 1.59, wonder how install boost-devel? thanks. got boost 1.59 version installed in centos 7 below commands: sudo wget http://repo.enetres.net/enetres.repo -o /etc/yum.repos.d/enetres.repo download lib64icu42-4.2.1-1mdv2010.0.x86_64.rpm below link: ftp://fr2.rpmfind.net/linux/mandriva/official/2010.0/x86_64/media/main/release/lib64icu42-4.2.1-1mdv2010.0.x86_64.rpm install rpm: sudo rpm -ivh lib64icu42-4.2.1-1mdv2010.0.x86_64.rpm install required boost library version: sudo yum install boost-devel that's it. have great day! rpm link: https://www.rpmfind.net/linux/rpm2html/search.php?query=libicuuc.so.42()(64bit)

javascript - How to run a .js file on multiple Bootstrap tabs? -

i have page runs javascript file pulls data json file. js appends div on page. js runs on $(document).ready. i have added tabs page bootstrap, , run same js code on different tabs, accessing different json file each tab. would need wrap js new function , call on function using tab click event? looking little on best way this. edited add code: <!doctype html> <html lang = "en"> <head> <meta charset="utf-8"> <meta http-equiv="x-ua-compatible" content="ie=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- above 3 meta tags *must* come first in head; other head content must come *after* these tags --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <script type="text/javascript" src="quiz.json"></script> <script src="quiz.js">...

python - Unpack list of strings inside another list of strings -

i have found multiple examples similar questions in want flatten list made of multiple lists e.g [[0,1][2,3][3,4]] 1 list. in case want unpack 1 item. note using " * " operator work expand lists function arguments in following example. but, use instead " * " unpack files in scenario ? unpack = ["file_1.txt", "file_2.txt", "file_3.txt"] if unpack: subprocess.call(["mv", *unpack, "/destination_path"]) subprocess.call(["mv"] + unpack + ["/destination_path"])

flash - Embed my swf file on html -

i want embed swf-file via html. part of code. problem file shows on desktop , not on mobile devices. need show on mobile devices too. mistake? <center><object data="flickr_lung.swf" width="500" height="500"></object></center> i'm not sure how missed memo on this...it's been going on near decade @ point...but i'll explain anyway. practically no common mobile device browsers support flash player , .swf format . in general don't typically support plugin technology. option 1 : flash (the authoring tool, distinct flash player) can output html/css/js type content instead of .swf format. may take mucking project, it's new stuff learn , deal with. worth it. option 2 : progressive enhancement. have flash sites made before mobiles around still work great day because progressively enhanced them outputting simpler html version of same content "backup" content swf. ironically simple html versio...

php - The type of the third parameter in preg_match_all() when no matches are found -

i'm using preg_match_all() in project find matches in given string. example: preg_match_all( $pattern, $subject, $matches, $flags ); if matches found, $matches parameter multidimensional array of matches ordered according $flags . if matches weren't found, type $matches be? still array, albeit empty array, or else such false or null ? ref: http://php.net/manual/en/function.preg-match-all.php $matches array containing empty sub-array. it's can test yourself. <?php preg_match_all('/o/', 'foo', $matches); var_dump($matches); output: array(1) { [0]=> array(0) { } }

jQuery in two external java script files -

i have html page 2 external javascript files one global <script src=".../js/global.js" type="text/javascript"></script> and 1 local <script src="js/local.js" type="text/javascript"></script> obviously, use jquery <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js" type="text/javascript"></script> so far, good. in both external javascript files, insert jquery code inside following piece of code $(document).ready(function() { // code goes here... }); i've tried removing piece of code in local external javascript file since i've have on global file. doesn't work. so, question absolutely need start both external java script files piece of code? how make have on global file? thanks if have 2 javascript files, , you're doing dom manipulation in both files (using jquery) - yes, need start both $(document).ready(function()...

html - background-image appearing in the body margin -

i have thought background-image of element appears in element itself, padding , border not margin . however, while trying else work discovered seems not case , background-image appearing in margin . body { background: url("https://www.google.co.uk/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png"); background-size: contain; background-repeat: no-repeat; border-width: 1px; border-style: solid; border-color:red; margin: 50px; } <p>lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.</p> https://jsfiddle.net/rz52z14r/ as can seen, background appearing in margin . additionally, if add in overflow: hidden overflow not hidden. again, under impression overflow outside bounds of el...

rss viewer webpart is missing in sharepoint 2013 how to activate it -

rss viewer webpart missing in sharepoint 2013 shown in default folder , when adding rss viewer web part default folder shows error 'an unexpected error occurred processing request. check logs details , correct problem.' the corresponding feature might not enabled, should follow path: under site settings, click modify site settings. under site collection administration, click site collection features. enable office sharepoint server enterprise site collection features. if problem not solved, can try going central administration: under central administration, click on operations. under upgrade , migration, select enable features on existing sites. select appropriate checkbox, , click ok.

Error:(39, 13) Failed to resolve: com.parse.bolts:bolts-android:1.+ -

error:(39, 13) failed resolve: com.parse.bolts:bolts-android:1.+ and build.gradle dependencies { compile files('libs/aspose-cells-8.3.1.jar') compile files('libs/bcprov-jdk15-146.jar') compile files('libs/nineoldandroids-library-2.4.0.jar') compile files('libs/renderscript-v8.jar') compile files('libs/parse-1.10.0.jar') compile 'com.android.support:support-v4:23.0.1' compile 'com.android.support:appcompat-v7:23.0.1' compile 'com.google.android.gms:play-services:8.1.0' compile 'com.android.support:multidex:1.0.0' compile 'com.parse.bolts:bolts-android:1.+' compile 'com.google.android.gms:play-services-ads:8.1.0' compile 'com.google.android.gms:play-services-identity:8.1.0' compile 'com.google.android.gms:play-services-gcm:8.1.0' } gradle build error message project structure - dependencies please need go app-...

android - Why does my gradle take so long? > 13 minutes -

Image
why gradle take long on computer? after making minor changes? must broken. have ideas? i'm using android studio on ubuntu 15.04. android studio updated. here gradle files if relevant. // top-level build file can add configuration options common sub-projects/modules. buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:1.3.0' classpath 'com.google.gms:google-services:1.3.0-beta1' // note: not place application dependencies here; belong // in individual module build.gradle files } } allprojects { repositories { jcenter() } } and... apply plugin: 'com.android.application' apply plugin: 'com.google.gms.google-services' android { compilesdkversion 23 buildtoolsversion '23.0.0' defaultconfig { applicationid "ca.deanresin.arecipebook" minsdkversion 15 targetsdkversi...

Can't deploy Hexo blog to Github in Cloud9 -

i set hexo blog in cloud9. can generate well, nothing works when deploy github. doesn't return error information, nothing has been pushed github. don't know do. terminal info ... info generated: css/fonts/fontawesome-webfont.woff info generated: css/fonts/fontawesome-webfont.ttf info generated: css/fonts/fontawesome-webfont.svg info generated: css/fonts/fontawesome-webfont.eot info generated: css/fonts/fontawesome.otf info 28 files generated in 71 ms younglaker@hexo-blog:~/workspace/hexo-theme-leo (gh-pages) $ hexo d younglaker@hexo-blog:~/workspace/hexo-theme-leo (gh-pages) $ make sure you've configured "_config.yml" file this: deploy: type: git repository: https://github.com/xxxx/xxxx.github.io.git branch: master or if using ssh key: deploy: type: git repo: git@github.com:xxxx/xxxx.github.io.git branch: master the repository github project build now,and attention format.

c++ boost write memory mapped file -

i searching fast writing file using c++ , boost library. , use memory mapped file. example reading. working simple. there string array. array elements 2 millions. ofstream outfile("text.txt"); (int = 0; < 2000000; ++i) { outfile << strarray[i] << "\n"; } outfile.close(); how can using memory mapped file? can find writing file using memory mapped file? thank concerning. you use boost iostreams mapped_file{_sink,_source} this. although boost interprocess use mapped files, you'd better off using iostreams kind of raw access. see http://www.boost.org/doc/libs/1_50_0/libs/iostreams/doc/classes/mapped_file.html live on coliru #include <boost/iostreams/device/mapped_file.hpp> #include <boost/iostreams/stream.hpp> #include <vector> namespace bio = boost::iostreams; int main() { using namespace std; vector<string> strarray(2000000); bio::mapped_file_params params; params.path ...