Posts

Showing posts from March, 2014

ios - Crashlytics: "MyApp could not be installed at this time" when adding entitlements -

i'm trying distribute beta version through fiber/crashlytics. i've been doing ages time i'm unable make work correctly (ios9+). my app uses icloud keyvalue store, iap , push notifications, has entitlements file. thing is, when archive , distribute app, crashlytics sends email new version testers , able install but, ends installing, "…could not installed @ time" appears , app deletes itself. in other hand, if remove "code signing entitlements" value building settings, installation works ok (but icloud , other things aren't working, of course). what doing wrong? there workaround situation? it turns out entitlements file had wrong (even when i've never edited myself!). had enabled , disabled required capabilities trying fix problem didn't worked until deleted entitlements file , forced xcode recreate enabling capabilities again. after that, i've hadn't problem archive , distribute beta.

javascript - Matching strings with underscores, lowercase ASCII letters, ASCII digits, hyphens or dots only not starting with dot and hyphen -

i need regular expression match string that _test 123test test test_123 test-123 123.a i created regular expression: /^[_0-9a-z][_.\-a-z0-9]*$/ however, want exclude string if contains numbers. how can fix it? to avoid matching digit-only string, add negative lookahead: ^(?![0-9]+$)[_0-9a-z][_.\-a-z0-9]*$ ^^^^^^^^^^ the (?![0-9]+$) lookahead triggered once @ beginning of string , try match 1 or more digits end of string. if found, match failed (no match returned) lookahead negative .

javascript - How to set cookie based on browser tab -

in application have set cookie if(!isset($_cookie["uk_redirect_flag"])) { setcookie("uk_redirect_flag", 1, time() + (86400 * 30), "/"); } so if uk_redirect_flag = 0 i'm showing flash message. if uk_redirect_flag =1 flash message wont display. working in 1 tab on firefox. problem when open tab on firefox uk_redirect_flag value still 1. need delete cookie when open new tab or close tab. how set cookie value based on browser tab? that's not possible since cookie defined path, means browser tabs , windows 1 user share same cookie. you try proposed solution: how differ sessions in browser-tabs? ir propose use local storage.

functional programming - R errors indirect calling of argument -

this 1 of examples when '[' error occurs : > libs=.packages(true) > library(help=libs[1]) bÅ‚Ä…d w poleceniu 'find.package(pkgname, lib.loc, verbose = verbose)': nie ma pakietu o nazwie ‘[’ r behaves differently when use argument directly library(help="base") versus indirect use : x="base"; library(help=x) , why r thinks ask x packages, mechanism used ? think solution somewhere here : http://adv-r.had.co.nz/ looking @ source of library , find following code if (!character.only) <- as.character(substitute(help)) the substitute says that substitute returns parse tree (unevaluated) expression expr, substituting variables bound in env where env means current evaluation environment. libs bound in .globalenv , not in environment of function library . a simple example of doing x="a" test_fun=function(x) { as.character(substitute(x)) } test_fun(x) #"x" however, if x defined with

android - New to AdMob/Firebase: how to choose local business adverts? -

i developing android app, , approaching ads part of development. i using firebase app, , need know best approaches implementing following advertising requirements respective scenarios (i have never done before , wealth of information , approaches little overwhelming) : scenario 1: initial release initially, app used students of single university, , such want adverts arranged local businesses, adverts of interest students. what have in firebase/admob provide this? what businesses have utilize after have made agreement them? scenario 2: progressed release end-goal have app, in personalized form, every university interested in using students. each university's app users receive ads relevant them (ie. user @ mit wouldn't receive ads 20%-off restaurant deal in south african town) again: what have in firebase/admob provide this? what businesses have utilize after have made agreement them? and how make users ads? thanks! sounds there 2 concerns here

Using Data from Environment in R Markdown -

this question has answer here: how use objects global environment in rstudio markdown 2 answers im trying use data global environment in r markdown . when call 'summary(mydata)' gives me error: object 'mydata' not found i got work in many different scripts, not easy me create .r file each result. so, can call data defined on global environment in r markdown ? thank you. there 2 ways load data "mydata" .rmd file: don't knit file rstudio "knit" button: library(knitr) knit('your_file.rmd') this take recent environment account , error should gone. store "mydata" "mydata.rdata" , load manually in rmd file ```{r load mydata, include=false} load("mydata.rdata") if way can use "knit" button rstudio. i hope 1 of ways solution you.

templates - Xcode doesn't automatically create viewDidLoad method -

when create subclass of uiviewcontroller , xcode doesn't automatically create viewdidload method , didreceivememorywarning method. why did happen? should make work normal? make sure choosing "cocoa touch class" (from ios section of templates) , not "cocoa class" (from macos / osx section of templates) when creating new file.

c# - Remove element of unilateral many to many relation -

for mapping below: hasmanytomany(x => x.secondobjectslist) .parentkeycolumn("firstobjectoid") .childkeycolumn("secondobjectoid") .cascade.merge() .cascade.delete() .table("firsttosecond"); the second object doesn't know first, i.e. doesn't have property firstobjectslist, doesn't need know second objects exist. i need delete first object, there entry in many many table. what approach?

Android, how to save an Array of dynamic linear layouts? -

i made dynamic linear layout views on them. when close application these linear layouts gone. how can save them? whether saveinstance me , how? how can save them? you don't. save data necessary build them again. somewhere, have java code builds views data. need save data, when app runs again, can retrieve data , run java code again. whether save data in database, sharedpreferences , other form of file, or on server somewhere, you.

recurrent neural network - Simple RNN in Torch -

i trying implement rnn in torch. used start simple task of predicting next item in sequences. sequences subsequences of {1,2,3,4,5,6,7,8,9,10} offset chosen randomly. i want implement network architecture 1 hidden layer lstm cells. why use nn.seqlstm(inputsize, outputsize) rho = 5 -- number of steps bptt hiddensize = 15 inputsize = 1 outputsize = 1 seqlen = 5 nindex = 10 batchsize = 4 seqlstm = nn.seqlstm(inputsize, outputsize) criterion = nn.sequencercriterion(nn.classnllcriterion()) outputs = seqlstm:forward(inputs) -- inputs seqlen x batchsize x inputsize err = criterion:forward(outputs, targets) -- targets seqlen x batchsize x 1 do need nn.lookuptable? this code seems bit simple , missing glue guess. parts missing make complete? unless not whole code, there quite bit missing, not glue. 1- having input , output size of 1 lstm layer not make sense 2- wouldn't mess around rho unless want network backpropagate 5 timesteps only 3- classnllcriterion ex

machine learning - Tensorflow - Using batching to form a validation set -

i'm attempting use tensorflow's batching system, detailed here https://www.tensorflow.org/versions/master/how_tos/reading_data/index.html make predictions using model trained previously. @ moment have set batch size use in tf.train.batch equal size of data set want make predictions over. however, want create validation set test predictions , avoid overfitting. is there way separate validation set training data using batching system or way use placeholders? below sample of code responsible training. it: reads data csv file, converts data tensors passes tensors tf.train.shuffle_batch train def input_pipeline(filename_list, batch_size, capacity): filename_queue = tf.train.string_input_producer(filename_list,num_epochs=none) reader = tf.textlinereader() key, value = reader.read(filename_queue) # defaults force key value , label int, others float. record_defaults = [[1]]+[[46]]+[[1.0] in range(436)] # reads in single row csv , outputs list of scalars.

model view controller - Guidance on solving a task using MVC pattern in PHP -

i'm working on project in have parse file containing genealogical data (a family tree) , produce website explore it. thoughts build data structure in php of individuals, families, etc. , present these. mvc seems best way forward, i'm not sure how go implementing model uses php objects in memory. mvc guides i've seen model database. the model in mvc pattern isn't database , involves more data access. rather, database commonly accessed through model layer when persistent data required. accordingly, implement mvc pattern without relying on database. implementation details vary depending on framework/etc. having said that, if learning priority, i'd recommend reading more mvc prior using without understanding purpose.

ios - "Ambiguous Reference To" Error in Swift 3 -

good afternoon, im attempting code music play application in trying implement open source code entitled "stk audio player" coded in objective c. when attempting call method imported source, receive following compile error. "ambiguous reference member play" import uikit class viewcontroller: uiviewcontroller { var audioplayer = stkaudioplayer() override func viewdidload() { super.viewdidload() // additional setup after loading view, typically nib. let songtoplay:string = "http://themarketshop.com/beats/fatbeat.mp3" stkaudioplayer.play(songtoplay) } override func didreceivememorywarning() { super.didreceivememorywarning() // dispose of resources can recreated. } } from open source /// plays item given url string (all pending queued items removed). /// nsstring used queue item id -(void) play:(nsstring*)urlstring; play instance ( - ) method, use instance: audioplayer.play(songtoplay) and not annot

ember.js - Why is ember-data 2.7.0 normalizeHelper expecting a JSON API response from my custom adapter? -

i have ember-cli project uses jsonapi adapter, via adapters/application.js . want add model class should use ember-localstorage-adapter . declare model , respective adapter , serializer: models/widget.js import ds 'ember-data'; export default ds.model.extend({...}); adapters/widget.js import lsadapter 'ember-localstorage-adapter'; export default lsadapter.extend({}); serializers/widget.js import lsserializer 'ember-localstorage-adapter'; export default lsserializer.extend({}); and load models in route: routes/index.js import ember 'ember'; export default ember.route.extend({ model() { return this.store.findall('widget'); } }); this should work, missing function type error: ember.debug.js:19755 typeerror: serializer.normalizeresponse not function @ normalizeresponsehelper (serializer-response.js:80) @ finders.js:147 @ object.run (ember.debug.js:295) @ class._adapterrun (store.js:2056) @ finders

javascript - Angular JS and Spring - how to filter JSON Object -

i try put json object frontend backend via angular js , java spring using jhipster framework. json object looks follows: { "anzahl": 0, "category": 0, "id": 0, "parkraumid": 0, "timestamp": "2016-09-07t12:59:04.290z", "wochentag": 0 } but save in database via spring repository method createcrowdsource(crowdsource) need filter out values wochentag , anzahl following json object: { "category": 0, "id": 0, "parkraumid": 0, "timestamp": "2016-09-07t12:59:04.290z" } i tried specifying fields: 'category', 'id', 'parkraumid', 'timestamp' in following angular js controller , parameter in spring resource @requestparam string fields somehow doesn´t work. angular controller: function save() { vm.issaving = true; if (vm.crowdsource.id !== null) { //json needs these 2 attributes

visual foxpro - VFP font size in command window -

in vfp development environment both command window , code windows open display characters in courier font, possible 10 pt. reduce size of these characters, see more lines on screen. have tried going tools | options | ide , have changed several font specifications (for desktop, program files, code windows, procedures), clicked on 'apply' in attempt reduce size of these character on screen. has not been successful. how can reduce font size used code when editing it, please? check override individual settings checkbox on options | ide tab. otherwise, if you've edited particular prg, you'll see font used then. for command window, right-click, properties set font.

ruby on rails - Updating "Receipt" comments on a Shopify Order using ShopifyAPI::Fulfillment -

i'm trying update receipt attribute of order using shopifyapi::fulfillment i'm doing this: fulfill = shopifyapi::fulfillment.find(351144xxxx, :params => {:order_id => 426199xxxx}) joe = fulfill.receipt joe.response_status = "accepted" joe.response_comment = "your order received yo mama" fulfill.save it saves it, order doesn't keep save.. not sure i'm doing wrong, if anything. you should save receipt joe = fulfill.receipt joe.response_status = "accepted" joe.response_comment = "your order received yo mama" joe.save

jquery - MVC javascript display selected data -

first of all, list e-mail coming actionresult in first cycle. want see details clicking on listed data. open of jquery details. problem arises in section. in case ,the opening of details of first mail in detail of each row. there details of message in second loop.to connect 2 loops in guid font coming. (messageid). id=messageid (guid type) mailing list <div class="message-list-container"> <div class="message-list" id="message-list"> @foreach (var item in model) { <div id="@item.messageid" class="message-item"> <span class="sender" title="@item.from"> @item.from </span> <span class="time">@mvchelper.saatayarla(item.date)</span> @if(item.attachments.any()) { <span class="attachment">

slick - How can I convert Rep[Option[Instant]] to Rep[Option[String]] in scala -

i working scala play 2, slick , postgresql database. 1 of function def getallcustomerswithaccount: future[seq[customerdetail]] = { val joinexception = { (customer, account) <- table join accounttable on (_.id === _.id) } yield (customer.id, account.name, account.phone, account.email, customer.status, customer.balance, customer.payable, customer.created, customer.updated) val result = db.run(joinexception.result) result.map(row => row.map(x => customerdetail(x._1, x._2, x._3, x._4, x._5, x._6, x._7, x._8, x._9))) } this code not working. problem created , updated property of customer. customer.created , customer.updated rep[option[instant]] date time. if escape 2 column (customer.created , customer.updated) it's ok. def getallcustomerswithaccount: future[seq[customerdetail]] = { val joinexception = { (customer, account) <- table join accounttable on (_.id === _.id) } yield (customer.id, account.name, account.phone, account.email, customer.statu

java - Realm query for latest record for each user -

how accomplish similar query in realm java 1 asked in question: how query sql latest record date each user cause seems realm lacks group method when fetching queries here's realmobject: public class memo extends realmobject { @ignore public static final int sent = 1; @ignore public static final int unread = 2; @ignore public static final int read = 3; @ignore public static final int pending = 4; private static final string tag = memo.class.getname(); @primarykey public string id = ""; @index public string connection = ""; public string subject = ""; public string body = ""; public int status = 0; public date date; public boolean sentbyme = false; public string remoteid = ""; public boolean isfile = false; public string filepath = ""; } this represents user: public string connection realmresults<memo> latestmemos

VB.net - grouping identical values then manipulating the result -

i have found similar questions none hit looking for. lets have array of 10 values fruit : fruit(1) = "apple" fruit(2) = "orange" fruit(3) = "banana" fruit(4) = "cherry" fruit(5) = "peach" fruit(6) = "" fruit(7) = "" fruit(8) = "" fruit(9) = "" fruit(10) = "" now, have statement says fruit(6)="apple", making array : fruit(1) = "apple" fruit(2) = "orange" fruit(3) = "banana" fruit(4) = "cherry" fruit(5) = "peach" fruit(6) = "apple" fruit(7) = "" fruit(8) = "" fruit(9) = "" fruit(10) = "" i want have sub group items , store once. so, fruit(1) = "2 x apple" fruit(2) = "orange" fruit(3) = "banana" fruit(4) = "cherry" fruit(5) = "peach" fruit(6) = "" fruit(7) = "" fruit(8) = "" fruit(9) = &qu

java - Standard Deviation -

hi have created code calculate standard deviation of set of numbers, here code below: public class standarddev { public static void main(string[] args) { scanner in = new scanner(system.in); int n = in.nextint(); int[] arr = new int[n]; double sum = 0.0; for(int = 0; < n; i++) { arr[i] = in.nextint(); } arrays.sort(arr); double median = n % 2 != 0 ? arr[n/2] : (arr[n/2] + arr[(n/2)-1])/2; for(int = 0; < n; i++) { sum += math.pow(arr[i] - median,2); } system.out.printf("%.1f", math.sqrt(sum/n)); } } however when input this: 10 64630 11735 14216 99233 14470 4978 73429 38120 51135 67060 i different result expected answer. output: 30475.6 expected output: 30466.9 but if tried input below correct answer: 5 10 40 30 50 20 my output: 14.1 expected output: 14.1 rewrote code calculate standard deviation, based on mean: import java.util.*; import java.lang.*; import

python - Matplotlib bar chart customisation for multiple values -

Image
i have list of tuples countries , number of times occur. have 175 countries long names. when chart them, get: as can see, bunched up, there no space, can barely read anything. code use (the original data file huge, contains matplotlib specific code): def tuplecounts2percents(inputlist): total = sum(x[1] x in inputlist)*1.0 return [(x[0], 1.*x[1]/total) x in inputlist] def autolabel(rects,labels): # attach text labels i,(rect,label) in enumerate(zip(rects,labels)): height = rect.get_height() plt.text(rect.get_x() + rect.get_width()/2., 1.05*height, label, ha='center', va='bottom',fontsize=6,style='italic') def countrychartlist(inputlist,path): seen_countries = counter() dict in inputlist: seen_countries += counter(dict['location-value-pair'].keys()) seen_countries = seen_countries.most_common() seen_countries_percentage = map(itemgetter(1), tuplecounts2percent

firebase - Indexing strings to make it easier to search -

i want implement searching without using 3rd party. current idea store different string lengths keys indexed quickly. i'd implement minimum of 3 string lengths , make sure string being searched lower case. instance data in firebase this: { users: { matuserid: { name: 'mathew' } }, search: { mat: { users: { matuserid: true } }, ath: { users: { matuserid: true } }, the: { users: { matuserid: true } }, hew: { users: { matuserid: true } }, math: { users: { matuserid: true } }, athe: { users: { matuserid: true } }, thew: { users: { matuserid: true } }, mathe: { users: { matuserid: true } }, athew: { users: { matuserid: true } }, mathew: { users: { matuserid: true }

Can't archive to proper encode csv in PHP -

i have function import csv. public function csv_to_array($filename, $delimiter = ',', $enclosure = '"') { $header = null; $data = array(); if (($handle = fopen($filename, 'r')) !== false) { $all = 0; while(($row = fgetcsv($handle, 0, $delimiter, $enclosure)) !== false) { $i=0; foreach($row $string) { $row[$i] = utf8_encode($string); $i++; } if(!$header) { $header = $row; }else{ $data[] = array_combine($header, $row); } $all++; } fclose($handle); } return $data; } some files, come in ansi encoding don't work str_getcsv or fgetcsv. tried convert them first mb_convert_encoding($line, 'windows-1252', 'utf-8'); or iconv, utf8_encode, ... in other projects never stumbled issue. of above trick, not time. whole sy

ios - Xcode 8 Objective-C category warning -

i'm using xcode 8 , swift 3.0. error message mean? ld: warning: object files have incompatible objective-c category definitions. category metadata may lost. files containing objective-c categories should built using same compiler. i had issue in uicolor extension, app entirely made swift except frameworks use objective-c have no problem in declaring var @nonobjc : extension uicolor { @nonobjc static var lol: uicolor { return uicolor.red } } from apple docs: the nonobjc attribute tells compiler make declaration unavailable in objective-c code... since code unavailable objective-c warning disappears.

selenium - Webdriver - Unable to locate element (Java) -

i'm new in selenium , webdriver. have html: <input id="undefined-undefined-jobsubject-5546" type="text" value="" data-test="testing-job-subject" style="padding: 0px; position: relative; width: 100%; border: medium none; outline: medium none; background-color: transparent; color: rgb(255, 255, 255); cursor: initial; font: inherit; height: 100%; box-sizing: border-box; margin-top: 14px;"/> and have code: driver.findelement(by.xpath("//input[@data-test='testing-job-subject']")); but error is: org.openqa.selenium.nosuchelementexception: unable locate element: //input[@data-test='testing-job-subject'] i tried this: driver.findelement(by.xpath("//*[starts-with(@id,'undefined-undefined-jobsubject')]")); because number in id generated, can't take by.id(....), same error. , yes,i have in code timeouts,so element on page. where problem? thanks i

c# - Path.Combine and File.Move with dot in file path -

considering below foreach loop: foreach (fileinfo fileinfo in files) { string filename = fileinfo.tostring(); filename = filename.split('_')[0]; // file suffix string sqlstring = "select 'company-plc.' + ftpuser dbo.control brand = @filename;"; sqlconnection connection = new sqlconnection(conn); sqlcommand cmd = new sqlcommand(sqlstring, connection); cmd.parameters.addwithvalue("@filename", filename); connection.open(); sqldatareader reader = cmd.executereader(); while (reader.read()) { string destinationsuffix = reader[0].tostring(); string fullpath = path.combine(destinationpath,destinationsuffix); fullpath = path.combine(fullpath, fileinfo.fullname); file.move(fileinfo.fullname,fullpath); } reader.close(); } current fileinfo location: \\server\directory original value of destinationpath = \\server\folder\folder

jquery - Ember.JS create record in component and add to local Datastore, or best practice solution -

current situation: trying find way create record of specific model within "didinsertelement" method of component, , add said data data store. reason current situation: attaching event listeners button in component hbs file. 1 of buttons trigger 2 cascaded light ajax calls. response last of these ajax calls determine if should create records or not. problem having: when try access store component: var mystore = this.store i getting undefined object. of asking, have added following line component: store: ember.inject.service() and have ember-data installed. solutions: have found lot of research interaction store best done through main route. how attach event listeners component's jquery widget route? are there solutions wouldn't require me move all event listener code component route , thereby undo modularity ember supposed offer? this.store property exists on elements on injected default (controllers , routes) , should not used si

domain driven design - DDD: Aggregate boundary vs compositional convenience. -

i'm starting new ddd project , feel haven't grasped concepts yet. have 2 aggregate roots in domain far, recipe , food . relationship : `recipe`->*`ingredient`->`food` an ingredient quantity + food i think maybe having aggregate ( food ) in recipe aggregate bad, it's convenient because allows calculate nutritional values of recipe navigating relation. i not store result of calculation , recalculate every time if food changed recipe updated automatically , don't know if it's idea. also, ok have single repository recipe + ingredient since in same aggregate , have load ingredients can pass them in constructor of recipe anyway? is ok have single repository recipe+ingredient since in same aggregate , have load ingredients can pass them in constructor of recipe anyway? that people expect - single repository loads of state contained within aggregate boundary. i think maybe having aggregate (food) in recipe aggregate bad, it's

How to get a diff from python's `mock.assert_called_with()`? -

when calling unittest.testcase.assertequal() on 2 complex dictionaries, nice diff. is there way diff python 2.7's mock.mock.assert_called_with ? i'm testing calls take dict parameters complex values, , it's difficult see problem when 1 of them missing boolean. e.g. assertionerror: expected call: post('http://cloud-atlas.cogolo.net/api/executions', auth=('cloudatlas', 'cloudatlas'), data={'environment': 'hadoop', 'source': 'repo', 'output_path': 'hdfs://namenode-01/user/erose/testing', 'production': true, 'input_path': 'hdfs://namenode-01/foo/bar', 'name': 'linecount', 'mrcloud_options': '{"mrcloud_option_a": "foobar", "hadoop_user_name": "erose"}', 'details': '{"path_to_file": "linecount.py", "parameters": {}, "branch": "master", "r

ios - Firebase 3 update local cache -

i'm working on ios app receives data firebase database. need keep local version of db , found awesome offline capability of firebase. now, is there way disable auto sync , update when user click button? is there way update new or modified elements instead of re-download everything? 2-bis. there way know each element has been added/modified? does firdatasnapshot conform nscoding protocol? i'd save locally in plist file... edit: after reading more in firebase 3 documentation, i'm looking db tree in single request, possible? my code following firdatabasereference.goonline() var firebase = firdatabase.database().referencewithpath("items") firebase.observeeventtype(.value, withblock: { snapshot in print(snapshot.value) if let snapshots = snapshot.children.allobjects as? [firdatasnapshot] { snap in snapshots { if let postdictionary = snap.value

ios - UITableViewContorller (Static) Size -

Image
i have 2 different problems static uitableview . 1. height of table: have 4 cells in table, fourth 1 going out screen size. (the table bigger screen). how can allow scrolling size of table? 2. scrolling horizontal don't know why, when run app, can scroll horizontal table left side. why happen? how can fix it? thank you! set top,bottom,leading , trailing constraint interface builder (i.e. storyboard) tableview. below screenshot, in screenshot constrains got setting address label, need select tableview , need set 4 constraints. if totally unaware of autolayout first learn it. refer tutorial : raywenderlich's tutorial or appcoda's tutorial .

html - Text will not zoom outissues -

i'd decrease size of text when viewer zooms out menu design, it's not working. tried few suggestions offered here haven't had luck. can offer suggestions? tia here's fiddle: demo <div style="font-size:20px"> text resizes when zoon + or - </div> <div id="nav" style="display: inline-block, width: 100%;"> <ul id="nav"> <li><a href="#">top level menu</a> <ul> <li class="first"><a href="#">sub level 1</a> <ul> <li class="first"><a href="#">sub level 2</a></li> <li><a href="#">sub level 2</a></li> <li class="last"><a href="#">sub level 2</a></li> </ul> </li> <li class="last"><a href="#">sub level 1</a></li> </ul> </li> </ul> </div&

loops - Run playbook file on particular days -

i new ansible, need execute 1 playbook file 7 days alone , 8th day need run playbook file. how can set using ansible? have tried @ module it's not applicable that. how can set conditions per requirement? i have created sample job using ansible. in need run job every day once , 7 days alone, specify 24 hrs once in hour filed , in day field 01-07. here code: - - cron: name: "play mail" hour: "24" day: "01-07" job: "sh script.sh" i able run code without error , job created have seen using crontab -l . executes once. not every 24 hrs of 7 days. whether it's correct per requirement? i'm not sure understand need. if have start playbook on control machine x days, don't think need cron module. make crontab entry crontab -e on control machine scheduled 7 days, , second 1 8th. crontab entries on control machine run like: # every day @ midnight 0 0 * * * /usr/bin/ansible-playbook -i inv

File structure php templates within folders -

it question how structure template files... job, templates, then, else integrates real data , in charge on putting them live. it big project..... , have been told tidy files, have of them in same folder... i have: folder: css - bootstrap.min.css - featherlight.css - owl.carousel.css - font-awesome.min.css - style.css (all styles templates) folder: js - jquery - bootstrap.min.js - featherlight.js - owl.carousel.js - respond.min.js - modernizr.js - scripts.js (all javascript interaction on templates) folder: images folder: fonts - folder client fonts (agenda medium , agenda light) - font awesome font files - icomooon font files and files: - index.php - header.php - navigation.php - navigation_home.php - footer.php - footer_myaccount.php - sidebar_products.php - sidebar.php - preferences_myaccount.php - dashboard_myaccount.php - orders_myaccount.php - filters_product.php - filters_event.php - filters_account.php - our_blog.php - single_article.php - events.php - sin

php - After WordPress website migration fonts don't load anymore -

after migrating website temporary url live site, cannot seem understand why fonts not rendering , instead returning 404 error in console. the live site here: http://canadatkd.com the temporary site here: http://d09.cdb.myftpupload.com i'm seeing following error below on live site: failed load resource: server responded status of 404 (not found) but i've checked files , indeed there in ftp on live site it's showing me files non-existent. can please let me know why occurring? thank you! the working site has in head http://canadatkd.com/wp-content/plugins/photo-gallery/css/font-awesome/font-awesome.css?ver=4.2.0 the new site not. font awesome plugin installed and/or not activated?

visual studio code - Run VS-project on OSX -

i want join team member doing web design work in asp.net/c# project. the project setup in windows environment using tfs source control. however, work on osx , love able work in project without having setup developing environment using parallels or so. visual studio code seemed promising , installed tfs plug-in, have no idea how connect project , run on http://localhost . is there way this? (i more of designer tech person please bear me , stupid questions :)) thanks! visual studio code 1 way view code in c#, can't run unless you're in .net core . think may able debug mono , might worth first see if application supported through route. i've heard visual studio available cross-platform sometime in future (which amazing), now, ide available windows. you can try using monodevelop looks c# ide mac ( http://www.monodevelop.com/ ) , there's xamarin studio ( https://www.xamarin.com/studio ). see stackoverflow thread . as tfs, if you're using git,

.htaccess - htaccess for multiple domains to wordpress subfolders -

i have issue dealing multiple domains accesssing multiple wordpress installs on 1 server, each in own subdomain. domain1 domain2 domain3 root folder1 (wp-install1) folder2 (wp-install2) folder3 (wp-install3) more folders in settings of hoster, can configure domain1 points /folder1 domain2 points /folder2 domain3 points /folder3 of course, domains should not display folder. how handle .htaccess files? can't show code have been majorly unsuccessful. want use permalinks in each wordpress install. thank help!

Accessing element in named vector in R without variable name -

i trying access value of element in named character vector in r. using example in http://www.r-tutor.com/r-introduction/vector/named-vector-members tried following: v = c("mary", "sue") v [1] "mary" "sue" names(v) = c("first", "last") v first last "mary" "sue" v["first"] first "mary" i return "mary" without name "first" (and shown in tutorial above), when try gives name along value. tried set variable, hoping give value > teststr = v["first"] > teststr first "mary" > but still variable name (first) along value. tried following, gives same - value along element name. > > v[names(v)=="first"] first "mary" > the data have work project produces same results. appreciate getting "mary" without "first". thanks - pankaj you can use unname > unname(v["f

python - Is that Insertionsort? -

i need help, learning sorting-algorithms , tried make insertionsort-algorithm. please tell me whether insertionsort-algorithm or not? def insertsort(l): k in range(len(l)): in range(1,len(l)): if l[i]<l[i-1]: while l[i]<l[i-1]: l.insert(i-1,l.pop(i)) return l yes, insertion sort. pseudocode follows: 1. j = 2 n 2. key ← [j] 3. // insert a[j] sorted sequence a[1..j-1] 4. j ← – 1 5. while > 0 , a[i] > key 6. a[i+1] ← a[i] 7. ← – 1 8. a[j+1] ← key

security - Separate authentication server for users and APIs -

i'm working on cloud service authentication system , i'm not entirely sure optimal way handle authenticating requests is. we're planning run our image server separate process our api server can scale them independently of each other. handling request authentication api keys simple, because can have image server store own api key , check requests provide in header (over https obviously), same api server. users though gets more complex. right have setup api server handle generating session token , storing users in database, we'd use 3 servers: authentication server api server image server and have image , api servers authenticate requests against authentication server. how should done though? seems bad idea performance-wise hit authentication server every request api , image servers make. can/should token verified different server created on? so example: can/should pass token received authentication server image server, verify token came "my.auth.serv

apache commons httpclient - Unable to POST data using TLS 1.2 -

i trying post data server using tls1.2 when running code getting following response server. httpresponseproxy{http/1.1 415 unsupported media type [date: wed, 07 sep 2016 17:42:57 cst, server: , strict-transport-security: max-age=63072000; includesubdomains; preload, pragma: no-cache, content-length: 0, charset: iso-8859-1, x-oracle-dms-rid: 0, x-oracle-dms-ecid: 343fa6c0-ed24-4003-ad58-342caf000404-00000383, set-cookie: jsessionid=1zmivt1nqrtwphghs4mmmyytpugtoqgra9bice3dok5v0gdcpxu6!681252631; path=/; secure; httponly;httponly;secure, cache-control: no-store, p3p: policyref="/w3c/p3p.xml", cp="wbp dsp nor amt adm dot urt pot not", keep-alive: timeout=5, max=250, connection: keep-alive, content-type: text/xml, content-language: en] [content-type: text/xml,content-length: 0,chunked: false]} i using below code post data server . using apache httpcomponents-client-4.5.2 . private static registry<connectionsocketfactory> getregistry() throws keymanagement

reactjs - react js webpack bundling error for jsx files -

i'm doing small application. i'm using webpack bundle files, when tried execute webpack in command line error below, however, if entry extension './public/app.js' works perfectly. don't understand doing wrong. did @ other posts, different problem. appreciate if thank you. error in ./public/app.jsx module build failed: referenceerror: [babel] /users/jair/desktop/development/react-test/public/app.jsx: unknown option: base.preset. check out http://babeljs.io/docs/usage/options/ more info @ logger.error (/users/jair/desktop/development/react-test/node_modules/babel-core/lib/transformation/file/logger.js:41:11) @ optionmanager.mergeoptions (/users/jair/desktop/development/react-test/node_modules/babel-core/lib/transformation/file/options/option-manager.js:216:20) @ optionmanager.init (/users/jair/desktop/development/react-test/node_modules/babel-core/lib/transformation/file/options/option-manager.js:338:12) @ file.initoptions (/users/jair/desktop/d

html - Website goes off-screen in height -

i building website , created nice layout need. on smaller (laptop) screens content higher screen, , not allow 1 scroll , down. instead keeps showing exact center of content. how add scroll-bar entire page, people not fixed center of page ? my current css: <style> .centered { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); } #maincanvas{ position:fixed; top: 50%; left: 50%; width:700px; height:800px; /* background: background="static/bg02.png";*/ /*border: 15px solid #cc0000;*/ padding: 25px; transform: translate(-50%, -50%); } #logobox{ position:absolute; top: 0px; left: 50px; width:600px; height:50px; /*border: 10px solid #cc0000;*/ padding: 25px; } #contentbox{ position:absolute; top: 200px; left: 50px;