Posts

Showing posts from August, 2012

node.js - Cronjobs and Nodejs -

im trying create log file every day using cronjobs. whenever restart node server create new log file same otherwise writes log in same file. please help take minute read this: https://www.npmjs.com/package/cron , this: https://www.npmjs.com/package/moment function startlogger() { var name = (require('moment')()).format('yyyy-mm-dd') var path = ('~/' + name); // if (path) doesn't exist, create it. (do code) // write end of existent or created file: (require('fs')).appendfile(path, 'your log line or multiple lines', function (err) { if (err) throw err; console.log('log saved successfully!'); }); } ps: not recommend use require inside () , did because i'm without time hope understand , make own code.

c# - Web Api 2 string response returns as an array of characters -

i have controller method: [httpget] [route("systemcheck/pulsecheck")] public httpresponsemessage pulsecheck() { //this string var pulsecheck = pulsecheckhelper.pulsecheck(); var response = request.createresponse((httpstatuscode.ok), pulsecheck); return response; } the response comes as: [ "2", "2", "9", "9" ] instead of "2299" any ideas? i have tried different variations like: [httpget] [route("systemcheck/pulsecheck")] [responsetype(typeof(string))] public string pulsecheck() { //this string var pulsecheck = pulsecheckhelper.pulsecheck(); return pulsecheck; } but same results. there webapiconfig i'm missing. have other applications work fine same controller method code haven't been able identify configuration differences. this in webapiconfig: public static void register(httpconfiguration config) { config.formatters.jsonformatter...

javascript - How to make a list with datemarks on Vue.js? -

just have such view: <div class="items"> <div class="datemark" data-date="1">today</div> <div class="item" data-date="1">item 1</div> <div class="item" data-date="1">item 2</div> <div class="item" data-date="1">item 3</div> <div class="datemark" data-date="2">tommorow</div> <div class="item" data-date="2">item 1</div> <div class="item" data-date="2">item 2</div> <div class="item" data-date="2">item 3</div> </div> with such data: data = [ 1: { human: 'today', date: 1, items: [ item1: { name: 'test', date: 1 // possible here }, item2: {...}, ] }, ...

vbscript - Trying to press keys and shortcuts in a hidden CMD window -

i trying create script use copy con write file set objnetwork = createobject("wscript.network") currentuser = objnetwork.username set wshell = createobject("wscript.shell") wshell.run "%comspec% cd c:\users\" & currentuser & _ "\appdata\roaming\microsoft\windows\start menu\programs\startup & copy con master.vbs & x = 1 & x=2^z", 0, true the problem here while using ^z simulate output of crtl + z , cmd doesn't treat them same. as can see, wanted console window hidden, using sendkeys won't work here. any suggestions?

javascript - modal window in rails after create action? -

so, want show modal message after create event or user in website, or after editing something, far know how use flash show small messages, i'd know how modal windows, , show after method in controller used, flash message, in modal window. i've looked matter , have found format.html , format.js seem trick i'm kinda lost on how use them. you can use instance variable @objectcreated , access in view.erb file, , <% if @objectcreated %> insert html modal <% end %>. then assuming page refreshes use dom loaded javascript function open modal.

ios - Replace each character of a given string with the typed character when typing in a UITextField -

this question has answer here: how input currency format on text field (from right left) using swift? 4 answers i have uitextview have initial text of initial price @ $0.00. user set price entering number , when so, each character, starting right, replaced typed number. example: when typing 1, text's changed $0.01 then typing 2, $0.12 then 3, $1.23 then 4, $12.34 then backspace, $1.23 another backspace, $0.12 could please show me how setup kind of input of uitextfield in swift? thank you! use uitextfielddelete , implement this: func textfield(_ textfield: uitextfield, shouldchangecharactersin range: nsrange, replacementstring string: string) -> bool { let text: nsstring = (textfield.text ?? "") nsstring let resultstring = text.replacingcharacters(in: range, with: string) // take result string (user's text input)...

javascript - Chrome script that refreshes page, notifies me if element exists -

i'm looking make chrome script refreshes multiple pages every minute or so, , if element on page exists, need notify me somehow. i've heard of tampermonkey extension chrome, don't know how continue here i'm new this. thanks. a simple approach might use selenium chrome webdriver instead of trying use in browser script. standard library designed sounds want do.

javascript - VueJS Binding same variable to multiple of the same component -

let's have basic page vuejs follows: vue.component('child', { template: '<p>{{message}}</p>', props: ["message"] }); new vue({ el: '#theparent', data() { return { message: "it works!" } } }); <script src="https://cdn.jsdelivr.net/vue/2.3.2/vue.min.js"></script> <div id="theparent"> <child v-bind:message="message"></child> <child v-bind:message="message"></child> <child v-bind:message="message"></child> </div> the message it works! shows 3 times expected, if remove v-bind:message="message" on <child> components doesn't work. <child> components require value of message parent, there way specify once in vuejs component declaration rather each time in html when adding <child> ? one way use shared source o...

python - PyCharm : Error Saving System Information -

Image
error saving system information: c:\users\npratapa.pycharmce2017.2\system\stat\unit.112 (access denied) i keep getting error message. tried restarting pycharm. doesn't change anything error saving system information: c:\users\npratapa.pycharmce2017.2\system\stat\unit.112 (access denied) i keep getting error message. tried restarting pycharm. doesn't change anything

android - Does app rollout percentage in play store applies to new installs -

i mean if rollout 20% users, mean 20% of first time installers see new version , 80% of first time installers see old one? does mean 20% of first time installers see new version nd 80% of first time stallers see old one? that 20% includes first time (new) , existing users. there no differentiation between new users , existing users. from doc : new , existing users eligible receive updates staged rollouts , chosen @ random each new release rollout.

ios - UIDocumentMenuViewController open .odt and .pages -

how open .odt , .pages via uidocumentmenuviewcontroller ? constant should use? let documenttypes = [kuttypepdf string, kuttypeplaintext string, kuttypertf string, "com.microsoft.word.doc", "org.openxmlformats.wordprocessingml.document"] let importmenu = uidocumentmenuviewcontroller(documenttypes: documenttypes, in: .import) now can open .pdf, .txt, .rtf, .doc, .docx.

c# - Longest Unique Palindromes -

i have following interface public interface ipalindromeengine { palindrome getlongestpalindrome(string sequence); task<palindrome> getlongestpalindromeasync(string sequence); list<palindrome> getlongestpalindromes(string sequence, int n, bool uniqueonly); task<list<palindrome>> getlongestpalindromesasync(string sequence, int n, bool uniqueonly); } with implementation taken http://www.leetcode.com/2011/11/longest-palindromic-substring-part-ii.html code seems tested (from commenters , implementers)... /// <summary> /// computes longest palindromic substring in linear time /// using manacher's algorithm. /// /// code lifted following excellent reference /// http://www.leetcode.com/2011/11/longest-palindromic-substring-part-ii.html /// </summary> public class manacherpalindromeengine : ipalindromeengine { // p[i] = length of longest palindromic substring of transform, centered @ i. private int[] p; private c...

angular - ionic 2 firebase uploading image -

i creating chat application ionic 3 , firebase. in profile pic section allowing user upload image. image uploading , visible in firebase storage, every image uploaded user of 4 bytes , preview not available hence, profile image not set new image. kindly on how fix kind regards, aditya imagehandler.ts(that uploads file firebase) import { injectable } '@angular/core'; import { file } '@ionic-native/file'; import { filechooser } '@ionic-native/file-chooser'; import { filepath } '@ionic-native/file-path'; import firebase 'firebase'; /* generated class imghandlerprovider provider. see https://angular.io/docs/ts/latest/guide/dependency-injection.html more info on providers , angular 2 di. */ @injectable() export class imghandlerprovider { nativepath: any; firestore = firebase.storage(); constructor(public filechooser: filechooser) { } uploadimage() { var promise = new promise((resolve, reject) => { this.filech...

python pandas.Series.isin with case insensitive -

i want filter out rows 1 of dataframe's column data in list. df[df['column'].isin(mylist)] but found it's case sensitive. there method using ".isin()" case insensitive? one way comparing lower or upper case of series same list df[df['column'].str.lower().isin([x.lower() x in mylist])] the advantage here not saving changes original df or list making operation more efficient consider dummy df: color val 0 green 1 1 green 1 2 red 2 3 red 2 4 blue 3 5 blue 3 for list l: l = ['green', 'blue'] you can use isin() df[df['color'].str.lower().isin([x.lower() x in l])] you get color val 0 green 1 1 green 1 4 blue 3 5 blue 3

c# - The program hangs when I try to replace image? -

i have following code: private void datagridview1_cellformatting(object sender, datagridviewcellformattingeventargs e) { datagridview dgv = sender datagridview; if (dgv.columns[e.columnindex].name.equals("edit")) { string status = datagridview1.rows[e.rowindex].cells["status"].value.tostring(); if (status == "1") { dgv.rows[e.rowindex].cells["edit"].value = properties.resources.edit_disable; } } } when try replace image here: dgv.rows[e.rowindex].cells["edit"].value = properties.resources.edit_disable; program hangs , image , rendered infinity you selected wrong event changing image. event datagridview1_cellformatting fired when image changes, if use event change image, getting infinite loop. since code querying cell's value , might want switch different event, fired when row / cell data changes or binds, such datagridview.databindi...

vue.js - Show child component when promise data is exists and also render the data in child omponent -

i trying implement search component application, parent component have search text box , button. when user provide value want send data api , show result in child component. bit confused call api , how populate data in child component. also, child component should not render in parent component, when search result can render. please me how implement search functionality in vue js 2. parent component <template> <div><h3> search </h3></div> <div class="row"> <form role="search"> <div class="form-group col-lg-6 col-md-6"> <input type="text" v-model="searchkey" class="form-control"> </div> <div class="col-lg-6 col-md-6"> <button type="button" id="btn2" class="btn btn-danger btn-md" v-on:click="getinputvalue">search</button> </div...

node.js - Multiple apps in our parse-server -

given there's solution running multiple apps (here: https://github.com/parse-community/parse-server/issues/1979 ) in 1 parse-server, approach migrate existing data multiple parse servers while keeping ids , other relations, etc. intact?

ruby - Bypass NTLM auth when using Watir/Selenium to automate testing -

i understand watir , selenium have issues ntlm auth when trying login web pages testing. research indicated there 2 normal work around. 1. add credentials url 2. use auto auth plugin/extension. don't have option of using extension in environment, though i'm working on that. so, i'm left passing credentials. the problem have follows. chrome: in chrome pass credentials manually (as in type browser directly) http://password:user@example.com/ , opens page, not populate popup. if try manually pass http://example.com?username=usr&password=password , populates auth pop not proceed. if try automate ruby using following code unknown user name , password. have confrimed usr , pwd correct. browser.goto(" http://example.com?login=usr&password=password ") browser.goto(" http://password:usr@example.com/ ") ie ie behaves bit differently. in ie pass credentials manually http://password:user@example.com/ , returns error can't find page. if tr...

ms application insights - Dependency Tracking when using Task.Run in ASP.NET -

i have requirement use task.run(...) force non-async code run in parallel other async code. var task1 = task.run(() => synchronous code); var task2 = await dosomethingasync(); await task.whenall(task1, task2); the dependency calls in sync synchronous code not being tracked. seems application insights sdk (2.4) uses system.diagnostics.activity . there way create new activity start/stop in synchronous code, activity.current setup , dependency telemetry associated correct parent? ps cannot change synchronous code asynchronous. calling microsoft crm , crm sdk functions using not have asynchronous versions.

angularjs - OnChange fires the first file input event -

i got custome directive: angular.module('uvox-player').directive('customonchange', function() { return { restrict: 'a', link: function (scope, element, attrs) { var onchangehandler = scope.$eval(attrs.customonchange); element.bind('change', onchangehandler); } }; }); and view 2 different inputs: <div ng-show="platform == 'darwin'"> <input class="ng-hide" id="input-file-id" multiple type="file" custom-on-change="importplaylist"/> <label for="input-file-id" class="md-button md-raised md-primary">import playlist</label> </div> <div> <input class="ng-hide" id="input-file-id" multiple type="file" custom-on-change="importcover"/> <label for="input-file-id" class="md-button md-raised md-primary">...

postgresql - ansible using passed in variable in a task's when clause -

my latest playbook designed setup postgresql streaming replica database primary database. works except handful of tasks need variable decide if need run or not. my ansible-playbook command: ansible-playbook -v -i environments/sandbox replica.yaml -e "primary_server=server-a replica=sync" i'm trying use replica variable in when clause. i've tried couple of different attempts , when looks like: when: - inventory_hostname == primary_server - replica == "sync" that doesn't seem working though that's how described in documentation. should note first item in when clause working, not replica == "sync" clause. any ideas, jay

Can you define optional docker-compose services? -

is there way define docker compose service such brought up when explicitly request it? that say: docker-compose would not start it, but docker-compose optional_service would. one way achieve define optional service in different compose file. start optional service, run: $ docker-compose -f docker-compose.yaml -f optional-service.yaml for example, if have docker-compose.yaml file looks like: version: '2.1' services: lb: image: nginx:1.13 db: image: redis:3.2.9 i can extend optional-service.yaml looks like: version: '2.1' services: busy: image: busybox notice both compose files must use same compose file version. you can read more in compose documentation .

c# - Default project dependency disposing inconsistency -

after creating new asp.net core project in visual studio 2017 2 controllers: accountcontroller , managecontroller . both controllers use dependency injection via constructors applicationsigninmanager , applicationusermanager . accountcontroller 's dispose : protected override void dispose(bool disposing) { if (disposing) { if (_usermanager != null) { _usermanager.dispose(); _usermanager = null; } if (_signinmanager != null) { _signinmanager.dispose(); _signinmanager = null; } } base.dispose(disposing); } managecontroller 's dispose : protected override void dispose(bool disposing) { if (disposing && _usermanager != null) { _usermanager.dispose(); _usermanager = null; } base.dispose(disposing); } why doesn't managecontroller dispose sign in manager? why different accountcontroller ? based on juan...

What does 3 dot means( ... ) in matlab?? -

this question has answer here: what ellipsis mean in matlab function's argument list? 1 answer what meaning of … in matlab codes? [duplicate] 2 answers i new in matlab. can please tell me below code 3 dot ( ... ) means?? defaults = struct(... 'thresholddelta', 5*190/255, ... 'regionarearange', [180 1000], ... 'maxareavariation', 0.25,... 'roi', [1 1 imgsize(2) imgsize(1)]); the 3 dots mean line continuation. so syntax: defaults = struct(... 'thresholddelta', 5*190/255); is strictly equivalent to: defaults = struct('thresholddelta', 5*190/255); matlab expressions end @ end of line unless continued ... . syntax: defaults = struct( 'thresholddelta', 5*190/255); produces error ( expression or state...

jsf - Changing faces-config.xml from 2.2 to 2.3 causes javax.el.PropertyNotFoundException: Target Unreachable, identifier 'bean' resolved to null -

have following code snippets: bean: import javax.faces.view.viewscoped; import javax.inject.named; @named(value = "directorybean") @viewscoped public class directorybean implements serializable { private static final long serialversionuid = 1l; .... } faces-config.xml <?xml version="1.0" encoding="utf-8"?> <faces-config xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_3.xsd" version="2.3"> .... </faces-config> group.xhtml <ui:composition ...> <f:metadata> <f:viewparam name="id" value="#{directorybean.id}" /> </f:metadata> </ui:composition> in result getting exception: javax.el.propertynotfoundexception: /group.xhtml @6,64 value=...

matlab - How to get the threshold value of k-means algorithm that is used to binarize the images? -

i applied k-means algorithm segmenting images. used built in k-means function. works want know threshold value converts binary images in k-means method. example, can threshold value using built in function in matlab: threshold=graythresh(grayscaledimage); a=im2bw(a,threshold); %applying k-means.... imdata=reshape(grayscaledimage,[],1); imdata=double(imdata); [imdx mn]=kmeans(imdata,2); imidx=reshape(imdx,size(grayscaledimage)); imshow(imidx,[]); actually, k-means , known otsu threshold binarizing intensity images based on global threshold have interesting relationship: http://www-cs.engr.ccny.cuny.edu/~wolberg/cs470/doc/otsu-kmeanshis09.pdf it can shown k-means locally optimal, iterative solution same objective function otsu, otsu globally optimal, non-iterative solution. given greyscale intensity data, 1 compute threshold based on otsu, can expressed in matlab using graythresh , or otsuthresh , depending on interface prefer. a = imread('cameraman.tif'); ...

Applying Machine Learning on Array String Spark Java -

i have parquet data file contains multiple array string elements. these array strings elements variable in length. apache spark data frame schema shown below: root |-- dl: array (nullable = true) | |-- element: string (containsnull = true) |-- browsing_history: array (nullable = true) | |-- element: string (containsnull = true) |-- bhistid: string (nullable = true) |-- browser: string (nullable = true) |-- device: string (nullable = true) |-- geoloc: string (nullable = true) |-- os: string (nullable = true) |-- platform: string (nullable = true) |-- vendor: string (nullable = true) |-- dlist: array (nullable = true) | |-- element: string (containsnull = true) |-- rl: array (nullable = true) | |-- element: string (containsnull = true) |-- cliid: string (nullable = true) |-- date: string (nullable = true) |-- p_id: string (nullable = true) |-- userid: string (nullable = true) the parameters dl, browsing_history variable in length, depending on brows...

r - Calculate Percentage Column for List of Dataframes When Total Value is Hidden Within the Rows -

library(tidyverse) i feel there simple solution i'm stuck. code below creates simple list of 2 dataframes (they same simplicity of example, real data has different values) loc<-c("montreal","toronto","vancouver","quebec","ottawa","hamilton","total") count<-c("2344","2322","122","45","4544","44","9421") data<-data_frame(loc,count) data2<-data_frame(loc,count) data3<-list(data,data2) each dataframe has "total" within "loc" column corresponding overall total of "count" column. calculate percentages each dataframe dividing each value in "count" column total, last number in "count" column. i percentages added new columns each dataframe. for example, total last number in column, in reality, may mixed anywhere in column , can found corresponding "total" value in ...

Facebook video play open webpage -

Image
first don't know if correct place ask i'm curious how works. let me explain phenomenon (at least me), saw many times pages post videos, when tap play icon open webpage video playing, i've tried investigate thing found "power editor" facebook, wasn't able accomplish same result. anybody knows how implement this? i'm attaching images of i'm talking about: 1: video on timeline 2: webpage loaded when playing video

html rendering - Jinja2 Dependencies During Render -

i trying build dependency graph render of template , running bit of trouble trying information out of jinja. i want able render template , list/set of of files used render template. example: # template.html {% extend base.html %} {% partial in partials %} {% include partial %} {% endfor %} and have render , find out files used. # deps.py base_path = os.path.dirname(os.path.realpath(__file__)) jinja_env = jinja2.environment( loader=jinja2.filesystemloader(base_path)) template = jinja_env.get_template('template.html') template.render({ "partials": [ "test1.html", "test2.html", ], }) # ??? looking_for = ['base.html', 'test1.html', 'test2.html'] i have checked out ast tree , meta.find_referenced_templates(ast) works when using constant string include path. tried custom extension looking @ tokens, has same issues can see variable name, cannot values of variable since done during ...

python - % in pandas invalid literal for float(): -

Image
i tried running random forest model on loan data set, loaded csv file pandas dataframe, , used variable loan_amnt , int_rate feature, loan_status_b 1 or 0 label. my dataframe looks this: traning_set = train[['loan_amnt','int_rate','loan_status_b']] features_train = array(traning_set[['loan_amnt','int_rate']]) labels_train = array(traning_set[['loan_status_b']]) i created test set in same way #random forest sklearn.ensemble import randomforestclassifier clf = randomforestclassifier(n_estimators=10) clf = clf.fit(features_train, labels_train) pred = clf.predict(features_test) sklearn.metrics import accuracy_score print accuracy_score(labels_test, pred) this produced valueerror: invalid literal float(): 19.20% has encountered problem before or knows how fix it? thank you!

android - Turning/rotating effect for image -

Image
i'm trying implement top portion of this. https://play.google.com/store/apps/details?id=com.surpax.ledflashlight.panel&hl=en when swipe right or left circular/rotating turning effect. seems parallax 1 image. not sure how implement this.

php - ResponsiveFileManager9 keeps displaying 'file extension not allowed' error -

Image
<?php if (session_id() == '') session_start(); mb_internal_encoding('utf-8'); mb_http_output('utf-8'); mb_http_input('utf-8'); mb_language('uni'); mb_regex_encoding('utf-8'); ob_start('mb_output_handler'); date_default_timezone_set('europe/london'); define('use_access_keys', false); // true or false define('debug_error_message', true); // true or false $config = array( 'base_url' => ((isset($_server['https']) && $_server['https'] && ! in_array(strtolower($_server['https']), array( 'off', 'no' ))) ? 'https' : 'http') . '://' . $_server['http_host'], 'current_path' => '../source/', 'thumbs_base_path' => '../thumbs/', 'ftp_host' => false, 'ftp_user' => "user", 'ftp_pass' => "pas...

reactjs - "React.CreateElement: type is invalid" after creating typings for an existing js module -

i'm trying use react-images in typescript project. there no @types/react-images package, creating typings myself. have done before other packages no problem. process of creating declarations existing javascript modules described here . when provide simple .d.ts file like, declare module 'react-images' { export default class lightbox extends react.component { } } and import , use in project this, import lightbox 'react-images' ... return (<lightbox images={ images } onclose={ ():any => null } { ...defaultprops } />) i following error in browser: warning.js:35 warning: react.createelement: type invalid -- expected string (for built-in components) or class/function (for composite components) got: undefined. forgot export component file it's defined in. i'm wondering if may able shed light onto might doing wrong here. typical solutions kind of problem include changing way 1 includes module include mymodule style include...

python - Get source script details, similar to inspect.getmembers() without importing the script -

i'm trying source, callee list, defaults, keywords, args , varargs of functions in python script. currently, i'm importing module , using python inspect module's getmembers function , passing isfunction parameter so: members = inspect.getmembers(mymodule, inspect.isfunction) however, method doesn't work if mymodule 's imports aren't available me (since mymodule has imported first). i tried using python ast module parse , dump syntax tree, getting function source involved hacky techniques and/or questionable , far maintainable third party libraries. believe i've scoured documentation , stackoverflow pretty thoroughly , have failed find suitable solution. missing something? a possible workaround monkeypatch __import__ function custom function never throws importerror , returns dummy module instead: def force_import(module): original_import = __import__ def fake_import(*args): try: return original_impo...

javascript - TypeError: callback is not a function - -

i have code part of wrapper pipl api , getting error: this main code request , returns information api looking forward getting helped :) return callback(err, json.parse(body) || body); typeerror: callback not function what wrong here? how can solve error? (function() { var _ = require('lodash') , request = require('request') , util = require('util') , url = require('url'); var handler = function(subclass) { this.createcall = function(method, path, options, callback) { return function(config) { if (_.isfunction(options)) { callback = options; options = {}; } path = url.format({ pathname: path, query: options }); path = url.resolve(config.api_url, path); console.log(path) var parameters = { ...

c# - How to read a value from odata object -

var response = await client.getasync("/dev/rateservices/edisclaimers/format").configureawait(false); var x = response.content.readasstringasync().result; i want read value of id when name = us.centralizedrefi.tier1_moreinfo_disclaimer below object(value of var x). how that? {"@odata.context":" http://localhost/dev/rateservices/ $metadata#edisclaimers","value":[{"id":1,"name":"standard.typicaltransactions","effectivedate":"2014-05-01","expirydate":null},{"id":2,"name":"standard.additionalfees","effectivedate":"2014-05-01","expirydate":null},{"id":3,"name":"standard.endorsementonlysupport","effectivedate":"2014-05-01","expirydate":null},{"id":4,"name":"standard.cpl","effectivedate":"2016-09-21","expirydate...

c# - WCF endpoint with an invalid URL -

i have inherited couple of large legacy c# code bases make extensive use of soap/wcf talk each other , third party software. new wcf. i've run across situation can't quite explain. url pattern being used contracts in 1 of service classes invalid (the top level domain specifies not exist). [operationcontract(name = "testmethod", action = "http://hard.coded.url.that.is.definitely.invalid/testmethod")] [webmethod(messagename = "testmethod")] [system.servicemodel.xmlserializerformatattribute(supportfaults = true)] string testmethod(string x); is possible work, or explanation has never been used? i don't know sure service has been used anything. commit messages on revisions of file (and other files) useless. in 1 of modules talks third party software don't have ability deploy in test environment. there lot of other wcf endpoints in project use valid url patterns. maybe doing weird dns configuration(?) service run on local network. ...

html - Last margin ignored on CSS3 columns -

hi im trying make horizontally "paged" text. i.e. container has fixed height , should include n fixed width horizontally scrolling blocks. using css3 columns that. works nicely, but ignores last margin/padding , i.e. if scroll way right, last column flush edge of screen not want demo: https://jsfiddle.net/d1ae6uet/ #foo { column-width: 500px; height: 500px; column-gap: 50px; padding: 50px; } <div id="foo"> <p> </p> <p> produced g. fuhrman </p> <p> leaves of grass </p> <p> walt whitman </p> <p> come, said soul, such verses body let write, (for one,) should after return, or, long, long hence, in other spheres, there group of mates chants resuming, (tallying earth's soil, trees, winds, tumultuous waves,) ever pleas'd smile may keep on, ever , ever yet verses owning--as, first, here , signing soul , bod...

gcloud - How to use the google sdk to authenticate within a VM? -

working in debain 8 vagrant box , i'm trying connect gcloud, i'm unable authenticate through webapp cause there none. know how authentication? you use gcloud cli tool ( here ). install it, run gcloud auth login , display link can open on different machine authenticate , paste secret machine ran command authentication there.

python - Flask Secuirty Disable Password confirmation -

hi using python flask flask-security . i want make users confirm emails not passwords. it doesn't ask user enter in password , input confirm passwords matching. instead asks user 1 password. security_confirmable asks users required confirm email address when registering new account. i want users confirm thier email not check if passwords matching on signup. the registerform flask-security inherit confirmregisterform , passwordconfirmformmixin , nextformmixin . should import confirmregisterform , nextformmixin flask-security , define custom registerform inherit confirmregisterform , nextformmixin . from flask-security import confirmregisterform, nextformmixin class customregisterform(confirmregisterform, nextformmixin): def __init__(self, *args, **kwargs): super(customregisterform, self).__init__(*args, **kwargs) if not self.next.data: self.next.data = request.args.get('next', '') rewrite configurati...

html - How to change color below browser window to match footer -

Image
below have footer, dark purple color. when scroll past end of footer however, white. how change white match footer color, without changing background color of content have top? i want color show when user attempts scroll past footer, not anywhere else in document (or when user attempts scroll above nav example). using html {background-color: purple} colors entire document including top, want color show @ bottom. using html {background: linear-gradient(white, purple)} leaves gradient stretched across entire page more importantly shows purple @ top , white @ bottom. edit (better example) consider https://codepen.io . visit homepage. now, when attempt scroll above navigation bar, shows dark grayish color. when attempt scroll below footer, shows dark grayish color. want show color when user scrolls past footer only, not navigation. it sounds though problem comes having 2 types of content; defined section of content has own background colour, , undefined conten...