Posts

Showing posts from June, 2010

C# Visual Studio 2015 - Automatic jump into brackets -

this first question on stackoverflow, here goes: i've got annoying problem/feature in visual studio 2015. problem every time create if statement, for, while, etc. autocomplete (tab-tab). when go line of end bracket , try create new line (simple press of enter) right after it, text cursor jump brackets, instead of making new line. i've looked far wide trying disable "feature" incredibly annoying. have not been able find information on anywhere, asking question. thank you! how produce problem: anywhere in c# project, make new if statement (while, for, etc. can used too). navigate after end bracket. press enter make new line. the marker have jumped inside of statement, instead of making new line. the 'problem' when using tab key activating snippets feature. after typing tab in 'snippet editing' mode, each tab (and shift + tab ) used navigate placeholders defined snippet. in snippet mode, enter key takes wherever person de

ruby on rails - Update ElasticSearch mapping in production (Tire) -

i have clear understanding on how deal following scenario: i'm adding or removing attribute activerecord model, want update mapping in elasticsearch, in production. from understood, should... 1- create new index , import mysql is right command? rake environment tire:import class='bow' index='new-bows' create right mapping, should have updated mapping in model, right? 2- delete old mapping , create alias named bows new-bows i that, correct? old_index_name = bow.tire.index.name bow.tire.index.delete alias = tire::alias.new alias.name(old_index_name) alias.index('new-bows') alias.save 3- restart app am missing something, or there simpler way achieve want using tire? at point should delete old index? before creating alias same name, or can after? you should keep old index around until you're sure new index 100% want. can flip alias if not case. there's integration test in tire test suite "flipping aliases&q

css - Scaling sprites below 100% alters their position -

i've followed tutorial on scaling sprites http://tobyj.net/responsive-sprites/ - when set images 100% fine when use value of 35% in media queries sprite images displaced. any ideas why? site here http://edharrisondesign.com/pocketpictograms/ here's css: #icon-container { position: absolute; top: 50%; margin-top: -225px; left: 50%; width: 400px; margin-left: -200px; } .icon img{ padding-bottom: 150%; } /*set max-width width of individual sprites:*/ .stretchy { display:block; position:relative; overflow:hidden; width: 100%; max-width:400px; margin: 0 auto; } .stretchy .spacer { width: 100%; height: auto; } .stretchy .sprite { position:absolute; top:0; left:0; max-width:none; max-height:100%; } .stretchy .sprite.s2 {left:-100%;} .stretchy .sprite.s3 {left:-200%;} .stretchy .sprite.s4 {left:-300%;} .stretchy .sprite.s5 {left:-400%;} .stretchy .sprite.s6 {left:-500%;} .stretchy .sprite.s7

javascript - How to get HTML5 Range Slider's value in PHP? -

i have html5 range slider. can send value php? send email value. html: <div class="unit"> <div class="slider-group"> max value: <label id="1-h"></label> </div> <div id="slider-1-h"></div> </div> javascript: $(function() { $( '#slider-1-h' ).slider({ range: "min", min: 0, max: 300, value: 99, slide: function( event, ui ) { $( '#1-h' ).html( ui.value ); } }); $( '#1-h' ).html( $( '#slider-1-h' ).slider( 'value' ) ); }); ok fine. , now, can send this? have no input box. can`t use $_post[""] or? :/ in jquery add: change: function(event, ui) { $('#slidervalue').attr('value', ui.value); } in form add: <input type="hidden" name="slidervalue" id="slidervalue" value="

c++ - What should I replace num with? -

i'm trying write program determine whether both sum , product of 2 integers either or odd. everything seems fine, except when run program, comes out: "the product of 2 , 3 5 , even." even? why when should odd? understanding, reading num since put (num%2==0) , that's why saying even. how can make read outcome of 2 numbers (sum/product)? #include<iostream> using namespace std; int main () { int num; cout << "please enter integer: "; cin >> num; int num2; cout << "please enter integer: "; cin >> num2; if ( num % 2 == 0 ) { cout << "the product of " << num << " , " << num2 << " " << num*num2 << " , even." << endl; cout << "the sum of " << num << " , " << num2 << " " << n

Why isn't it possible to use prepared statements (based on ALTER TABLE) to set default values of MySQL fields from PHP? -

i'm writing php code change default value of varchar field in mysql database. in order code secure, use prepared statement, reason seemingly impossible php/mysql accept in particular situation, why that? (i'm using php 5.5.11) here code using prepared statements, not work (the mysqli_stmt_execute() call returns null, , default value of field remains unaltered): $new_field_default_value = 'test'; $field_modification_sql_command = "alter table mytable alter column mycolumn set default ?"; $stmt = mysqli_stmt_init($db_conn_handle); mysqli_stmt_prepare($stmt, $field_modification_sql_command); mysqli_stmt_bind_param($stmt, 's', $new_field_default_value); $temp_db_res = mysqli_stmt_execute($stmt); mysqli_stmt_close($stmt); here (insecure) code using concatenation , pure query execution, work (the mysqli_query() call returns true, , default value of field indeed altered): $new_field_default_value = 'test'; $field_modification_sql_command

jquery - Javascript Not Running or Working? -

Image
i have project includes login form password meter. followed a tutorial cssdeck , tried copy-pasting code jsfiddle see results. works on demo, not on my jsfiddle . issue password meter not working. have read through javascript , can not see wrong it. suggestions nice. why exact same code not work in fiddle? $(function(){ var pass1 = $('#password1'), pass2 = $('#password2'), email = $('#email'), form = $('#main form'), arrow = $('#main .arrow'); // empty fields on load $('#main .row input').val(''); // handle form submissions form.on('submit', function(e){ // entered correctly? if ($('#main .row.success').length == $('#main .row').length) { // yes! alert("thank trying out demo!"); e.preventdefault(); // remove allow actual submission } else { // no. preven

Blackberry app version update deletes persistent store object on some devices -

i have blackberry app stores object in persistent store. after updating app, supposed read existing value persistent store, if any, , continue use value. works on devices, not work on others. tested on several devices running os version 7, of work expected. on device using version 5 , using version 6, object no longer readable in persistent store. this case if don't change app other version number. same exact class/object being saved & loaded persistent store, , same object id used access it. the process i'm following reproduce is: completely delete app & it's data using command line. load version of app, downloading .jad file browser, verify stores data in persistent store. while app running in background, load later version via browser download of .jad file. after downloading later version, system asks if want replace previous version, , confirm do. the system loads new version, , prompts must reboot change take effect. select "reboot". d

How to generate byte arrays for sending data over a network in Java -

i trying connect postgresql server (implementing wire protocol) can't figure out how dynamically generate message frames of byte arrays. example, in following code i'm doing lot of system.arraycopy calls push generated bytes single byte array , seems there has better way. import java.io.*; import java.net.socket; import java.nio.bytebuffer; public class connection { public void connect(string hostname, int port) { try { socket dbsocket = new socket(hostname, port); dataoutputstream dout = new dataoutputstream(dbsocket.getoutputstream()); byte[] message = buildstartupmessage("sa"); dout.write(message); datainputstream din = new datainputstream(dbsocket.getinputstream()); byte bytes; while((bytes = din.readbyte()) != 0) { system.out.println(bytes); } } catch(exception e) { system.out.println("got exception"

elasticsearch - Error:Class cast exception in elastic search while sorting buckets in aggregation -

error: classcastexception[org.elasticsearch.search. aggregations.support.valuessource$bytes$withordinals$fielddata cannot cast org.elasticsearch.search.aggregations.support.valuessource$numeric]}{[vthdfzputegmgr8mes_b9g] my query: _search { "size" : 0, "query" : { "filtered" : { "query" : { "dis_max" : { "tie_breaker" : 0.7, "queries" : [ { "bool" : { "should" : [ { "match" : { "post.body" : { "query" : "check", "type" : "boolean" } } }, { "match" : { "post.parentbody" : { "query" : "check", &qu

python - Anaconda activate environment "The syntax of the command is incorrect" -

probably simple (i hope) activate environment_name giving me message "the syntax of command incorrect." i'm using windows 7, conda 3.19.0, python 2.7.11, , message both cmd.exe , anaconda command prompt. it may relevant has never worked me before installed anaconda - admin - (and environment i'm referencing tutorial example). even after remove environment , re-create still same thing: c:\anaconda>conda create -n snowflakes biopython fetching package metadata: .... solving package specifications: ............ package plan installation in environment c:\anaconda\envs\snowflakes: following new packages installed: biopython: 1.66-np110py27_0 msvc_runtime: 1.0.1-vc9_0 [vc9] numpy: 1.10.1-py27_0 pip: 7.1.2-py27_0 python: 2.7.11-0 setuptools: 19.2-py27_0 wheel: 0.26.0-py27_1 proceed ([y]/n)? y linking packages ... [ complete ]|##################################################| 1

bash - Grep N times from pipe using xargs -

i have file named input contains list of wikipedia or substring of wikipedia titles. want print out lines wikipedia titles, not substring. i have file named wikititle contains list of wikipedia titles. want grep each line input , if matches ^{string}$, want print out line. i came below command: cat input | xargs -0 -i{} bash -c 'grep -q -w ^{}$ wikititle && { echo {}; }' but gives me error of: xargs: command long how make happen? thanks! the right way print out lines found in both of 2 files comm : comm -12 <(sort input) <(sort wikititle) this vastly more efficient trying do: runs single pass, , needs store little content in memory @ time ( sort can have larger memory requirements, gnu implementation supports using disk-backed temporary storage). another more efficient approach following: grep -f -x -f input wikititle ...this run grep only once , using (newline-separated) strings given in input , against contents of wi

groovy - For loop variable initialisation from a list -

groovy allows unfolding lists in assignment, in: (x, y) = [1, 2] so assumed similar work in loop, in: list = [[1, 2], [2, 4], [3, 6]] ((elm1, elm2) in list) {...} which turns out syntax error. style not possible or there trick i'm missing? i guess won't work for loop (or don't know syntax), two-argument closure can used iterate such list , unfold tuples: def list = [[1, 2], [2, 4], [3, 6]] assert list.collect { a, b -> + b } == [3, 6, 9, ]

How to set android MediaPlayer volume according to ringtone volume? -

how can set mediaplayer sound volume according ringtone volume? i did method, doesn't work: mediaplayer player = mediaplayer.create(myactivity.this, r.raw.sound); audiomanager audio = (audiomanager) getsystemservice(context.audio_service); int currentvolume = audio.getstreamvolume(audiomanager.ringer_mode_normal); player.setvolume(currentvolume, currentvolume); instead of adjusting volume, should use setaudiostreamtype() set audio stream want play audio on - automatically uses volume of selected stream. example, if want audio play @ same volume notification would, use audiomanager.stream_notification : mediaplayer.setaudiostreamtype(audiomanager.stream_notification);

javascript - Click event only triggers once, after the page is loaded -

i have click event in jquery. desired behavior function execute every time link clicked. however, actual behavior page loads , function executed once , never again. offending code follows. thanks! <!doctype html> <head> <meta charset="utf-8"> <style> #sub { position:fixed; z-index:999; margin-top:180px; margin-left:200px; display:none;} </style> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <script> function showdiv(divid) { $('.menu').hide(); $('#'+divid).fadetoggle('slow'); }; $(document).ready(function(){ $('a#opt1').click(showdiv('sub')); $('a#opt2').click(function(){$('.menu').hide();}); }); </script> </head> <body> <li><a id="opt1" href="#">option1</a></li> <li><a id="opt2" href="#">optio

c - unrolling loops macros needed -

consider following code: extern int conn_fds[max_clients]; extern int fl_conn_indexes[max_clients]; extern int fl_req_bufs[max_clients]; extern struct epoll_event estab_events[max_threads]; extern req_buf_t req_bufs[max_req_bufs]; extern int fl_req_bufs_top; extern int conn_statuses[max_clients]; extern int fl_conn_indexes_top; extern tcpl_nc_t nc_http_list; extern struct sockaddr_in conn_addresses[max_clients]; void accept_connections(unsigned int num_conns) { int fds[max_threads]; int conn_indexes[max_threads]; int conn_idx=0; int new_bottom; socklen_t slenghts[max_threads]; void *labels1[max_threads] = {&&a0,&&a1,&&a2,&&a3,&&a4,&&a5,&&a6,&&a7,&&a8,&&a9,&&a10,&&a11,&&a12,&&a13,&&a14,&&a15}; void *labels2[max_threads] = {&&b0,&&b1,&&b2,&&b3,&&b4,&&b5,&&b6,&&b7,

PHP Variables Not Displaying in Browser -

i have following function: function getallproducts($productcount) { $productsparsed = 0; $limit = 250; $pages = ceil($productcount / $limit); $pagenumber = 1; $filters = ""; $requestparams = array("page" => $pagenumber, "limit" => $limit, "include" => $filters); echo $productcount . " products parse... \n"; echo "=======================================\n"; if ($productcount <= $limit) { $products = bigcommerce::getproducts($requestparams); $products = (array) $products; foreach ($products $product) { $productsparsed++; echo $product -> name . " " . $product -> price . "\n"; } } else { // more $limit products in catalog. while ($productsparsed <= $productcount) { if ($productsparsed === 0 || $productsparsed % $limit > 0) { // 0 or not on multiple of $limit $products = bigcommerce::getproducts($requestparams

c++ - How to read xsd file where root element is not a named type -

i have xml , xsd file. can read xml using xerces if xsd file has root xml element define named complextype trying figure out how read file if root item in xsd not named type. here files: the xml file <?xml version="1.0"?> <x:books xmlns:x="urn:bookstore" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="urn:bookstore books.xsd"> <book id="bk001"> <author>writer</author> <title>the first book</title> <genre>fiction</genre> <price>44.95</price> <pub_date>2000-10-01</pub_date> <review>an amazing story of nothing.</review> </book> <book id="bk002"> <author>poet</author> <title>the poet's first poem</title> <genre>poem</genre> <price>24.95</price> <pub_date>2

sql - what is a stored procedure and in what sense its differenct than a simple one? -

i want know difference between "stored procedure" , simple one. stored procedures built-in? a stored procedure nothing more prepared sql code save can reuse code on , on again. if think query write on , on again, instead of having write query each time save stored procedure , call stored procedure execute sql code saved part of stored procedure. in addition running same sql code on , on again have ability pass parameters stored procedure, depending on need stored procedure can act accordingly based on parameter values passed. benefits of using stored procedure one of main benefits of using stored procedure reduces amount of information sent database server. can become more important benefit when bandwidth of network less. since if send sql query (statement) executing in loop server through network , network gets disconnected, execution of sql statement doesn't return expected results, if sql query not used between transaction statement , rollback stat

java - parse image in dom parser using jsoup in android -

i trying rss feed of website: http://www.phonearena.com/feed here domparser activity: public class domparser { private rssfeed _feed = new rssfeed(); public rssfeed parsexml(string xml) { url url = null; try { url = new url(xml); } catch (malformedurlexception e1) { e1.printstacktrace(); } try { documentbuilderfactory dbf; dbf = documentbuilderfactory.newinstance(); documentbuilder db = dbf.newdocumentbuilder(); document doc = db.parse(new inputsource(url.openstream())); doc.getdocumentelement().normalize(); nodelist nl = doc.getelementsbytagname("item"); nodelist itemchildren = null; node currentitem = null; node currentchild = null; int length = nl.getlength(); (int = 0; < length; i++) { currentitem = nl.item(i); rssitem _item = new rssitem(); nodelist nchild = currentitem.getchildno

c# - How to create a modified copy of machine.config file? -

i want add/remove/upsert line ado .net data provider programmatically c#. my first thought parse file parser (like eto.parse), add/remove necessary span of text , write new file install image directory (which not write protected unlike write protected main machine.config). then think, file xml, , possible use existing xml machinery instead of custom parser. load xml, build object model xml, modify , serialize. then realise, object model working configs present in system.configuraion namespace. and decide search existing example on how modify machine config these classes. found example how obtain it's location new configurationfilemap().machineconfigfilename; (see the best way path machine.config of different .net version ) just tell configmanager looking edit other current app's config file. configuration config = configurationmanager.openmachineconfiguration(); the, can use config.sections[whatever] access specific sections. keep in mind config ob

Parallelize three_for_loop in C++ by openmp -

i have code. here, a, b, c, a1, b1, c1 vectors in 3 dimensional. a, b, c independent , a1, b1, c1 independent together. want parallelize calculate using openmp. however, run openmp, "segmentation fault" error.could me problem? thank in advance. #include <omp.h> #include<math.h> #include<cmath> #include<vector> #include<iostream> using namespace std; int main () { int nx=801; // number of grid in x direction int ny=501; int nz=401; float pi=3.14159265358979323846; unsigned int i,j,k; vector<vector<vector<float> > > (nx,vector<vector<float> >(ny,vector <float>(nz,0.0))); vector<vector<vector<float> > > b (nx,vector<vector<float> >(ny,vector <float>(nz,0.0))); vector<vector<vector<float> > > c (nx,vector<vector<float> >(ny,vector <float>(nz,0.0))); vector<vector<vector<float> > > a1

javascript - CSS id selectors just won't work -

in react.js project, have div. div has button, , list. list marked id="results". return <div> <button label="combine cards" disabled={!this.props.combineready} onclick={this.handleclick} accent primary raised /> <br /> <ul > { json.parse(this.state.data).resultcards.map(function(card){ return <li id="results">{card.deviation} <img src={'https://image.deckbrew.com/mtg/multiverseid/123456.jpg'}/></li>; }) } </ul> </div>; the styles.css file have displeasure of wrestling looks this; /* list container. */ ul{ list-style: none; display: inline-block; width: 263px; text-align: left; } /* individual list items. */ ul li{ display: block; padding: 15px 20px; background-color: #f8f8f8; color: #7b8585; margin-bottom: 3px; position: relative;

c# - How to get the unit of a specific performance counter -

i reading different data cpu usage via system.diagnostics.performancecounter class. after i'd output values , unit associated counter (ex. mb or gb memory). is there way query unit value of performance counter has? look @ countername property , and inside string (mbytes or kbytes) if not found bytes. let know scale of counter (vb.net) if instr(somecounter.countername.tolower , "mbytes") blah blah elseif instr(somecounter.countername.tolower , "kbytes") blah blah elseif instr(somecounter.countername.tolower , "bytes") blah blah else blah blah end if or dim scale string = "" dim xpos integer = instr(somecounter.countername.tolower, "bytes") grab char before , trim remove space in front if otherwise return scale if xpos>1 scale=strings.mid(somecounter.countername.tolower, xpos-1, 6).trim elseif xpos=1 the first word of countername if bytes scale="bytes"

excel - JMeter: java.net.URISyntaxException: Malformed escape pair at index -

Image
i recoding scenario in jmeter user searches record, once result listed, clicks on excel icon download result in .xls below error displaying while click on "excel" icon while recording. java.net.urisyntaxexception: malformed escape pair @ index 336: https://mylink.myurl.com/change/exporthandler?objchanger=ank,all%20products,a,jan-2015,jan-2016,country,india,,,1&tablename=datatable-example5&isortcol_0=2&ssortdir_0=desc&aocolumns=name,salesa,salesb,share,&header=name,abc%20fm%20gross%20sales%20(lakhs),industry%20gross%20sales%20(lakhs),share%20share%20(%), at java.net.uri$parser.fail(unknown source) at java.net.uri$parser.scanescape(unknown source) at java.net.uri$parser.scan(unknown source) at java.net.uri$parser.checkchars(unknown source) at java.net.uri$parser.parsehierarchical(unknown source) at java.net.uri$parser.parse(unknown source) at java.net.uri.<init>(unknown source) at java.net.url.touri(unknown source) at org.ap

javascript - Wordpress plugin: how do you pass parameters to be used as attributes in a javascrtipt tag? -

i'm trying write widget plugin in wordpress creates javascript tag , drops in footer of page. know can use wp_enqueue_script create this, no problem. need pass parameter widget settings script tag. example: wp_enqueue_script( 'script-name', '/js/example.js' ); will render tag looks this: <script type='text/javascript' src='/js/example.js'></script> what want create tag looks this: <script type='text/javascript' data-id='12345' src='/js/example.js'></script> where 12345 passed in widget settings. how do this? here figured out. in widget code, create front-end display piece, use this: add_action('wp_footer',create_function( '', 'echo(\'<script type="text/javascript" data-id="' . $instance['widgetparamname'] . '" src="//someurl.com/some.js"></script>\');' ),1,0); $instance passed i

neo4j - Spring data wth ne04j error...error while retrieving paths -

i using spring data neo4j. i used @query annotation place query in repository, query follows @query(value = "start me=node({0}), friend=node({1}) " + "match p=shortestpath(me-[:activefriend*..]->friend)" + " return p") public iterable<entitypath<user, user>> getshortestpathbetween(user a, user b); in controller accessing as iterable<entitypath<user, user>> shortestpathbetween = this.queryservice.getshortestpathbetween(user, friend); (entitypath<user, user> path : shortestpathbetween) { iterator<user> iter = path.<user>nodeentities().iterator(); } when tries access path.nodeentities , causing error: nested exception java.lang.nullpointerexception] root cause java.lang.nullpointerexception @ org.springframework.data.neo4j.support.path.convertingentitypath.nodes(convertingentitypath.java:137) @ org.springframework.data.neo4j.support.

android - aapt dump badging on adb shell -

i'm trying list of apps , launchable activities command line. know that aapt dump badging will give me information. i'm wondering if can information within context of adb shell. realize pull files local machine, of apks rather large, i'd prefer information directly device... adb shell dumpsys give ton of information, including launchable activities. example, output list activities react action android.intent.action.main : android.intent.action.main: 423fff90 com.android.bluetooth/.bpp.bluetoothbppactivity filter 42400218 424003d0 com.android.bluetooth/.bpp.bluetoothbppsetting filter 42400608 42400758 com.android.bluetooth/.bpp.bluetoothbppprintprefactivity filter 424009b8 42400b08 com.android.bluetooth/.bpp.bluetoothbppstatusactivity filter 42400d60 42400f10 com.android.bluetooth/.bpp.bluetoothbppauthactivity filter 42401158 42408bb8 com.google.android.apps.books/.app.booksactivity filter 42408e88 42414f50 com.android.pro

git - How to upgrade Gitlab 7 to 8 with old backup -

i using gitlab 7.10.4. created backup using following command : # have installed gitlab omnibus package sudo gitlab-rake gitlab:backup:create then tried upgrade lastest gitlab version (eg. 8.3.4 ) using : sudo apt-get update sudo apt-get install gitlab-ce for unknow reason, has failed. had install fresh install of gitlab, don't understand why old backup can't installed on new version of gitlab generates version mismatch error. how keep old data backup , upgrade lastest version of gitlab ? i've upgraded gitlab 7.10.4 8.5.0 using : $ curl -ss https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash $ sudo apt-get install gitlab-ce $ sudo gitlab-ctl restart

sql server - Get the TOP 10 Countries have peoples age 40+ from their DOB ? SQL -

i have table persons have feilds pid , pname , pdateofbirth , pcountry now have 10thousand peoples or above in database question? want top 10 name of coutries pcountry have persons age 40+? my effort select top 10 count(pid) ratio ,pcountry, datediff(pdob, date.now) age age > '40' group country what want pak = 555 india = 6666 usa= 88 aus = 557 etc if understood correctly, want top of countries number of persons aged 40+, grouping should country only. setup -- drop table person create table person ( pid int not null identity(1, 1) constraint pk_person primary key, pdateofbirth date, pcountry varchar(3) ) go insert person (pdateofbirth, pcountry) select top 1000 dateadd(day, message_id, '19740101'), 'bel' sys.messages go insert person (pdateofbirth, pcountry) select top 1000 dateadd(day, message_id, '19730101'), 'ned' sys.messages go insert person (pdateofbirt

ios - I have an error with video settings when creating a video from an array of images in swift -

so i've been having problem while. when creating video file array of images, i've been getting errors linking video settings let paths = nsfilemanager.defaultmanager().urlsfordirectory(.documentdirectory, indomains: .userdomainmask) let documentsurl = images[0] let videowriter: avassetwriter = avassetwriter(url: documentsurl, filetype: avfiletypequicktimemovie, error: nil) var videosettings: nsdictionary = nsdictionary() videosettings = [ avvideocodeckey: avvideocodech264, avvideowidthkey: 1080, avvideoheightkey: 1920 ] var exportpath: nsstring = nstemporarydirectory().stringbyappendingformat("/video.mov") var exporturl: nsurl = nsurl.fileurlwithpath(exportpath string) var exporter = avassetexportsession(asset: videosettings, presetname: avassetexportpresethighestquality) exporter.outputurl = exporturl exporter.exportasynchronouslywithcompletionhandler({ let library = alassetslibrary()

asp.net - Multiple index.html in Visual Studio web project -

with web.config, can create 1 transform file per build configuration. can similar done files of other types? in release build configuration want reference minified content files. is possible have different index.html files in visual studio 2015 web project based on build configuration?

android - Error:(4) Error parsing XML: not well-formed (invalid token) -

whenever run app error. have tried solutions online of them failed. any help? <?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <textview android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="dishname" android:id="@+id/item_name" android:textsize="24dp" android:textcolor="#396fd1" android:layout_alignparenttop="true" android:layout_alignstart="@+id/item_type" /> <textview android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="price" android:id="@+id/item_price" android:textsize="1

r - Moving averages -

i have daily data on 100 years looks 01.01.1856 12 02.01.1956 9 03.01.1956 -12 04.01.1956 7 etc. i wish calculate 30 year running average huge data. tried converting data time series cant still figure out how go it. prefer simple method has working data.frame. i guess preparation difficulty considering leapyears. try show way preparing, before using mentioned function runmean of package require(catools) . first create example data (which not necessary you, understanding). second divide data frame list of data frames, 1 each year , taking mean values each year. these 2 steps done @ once, think separated way easier understand , adapt. #example data days <- seq(as.date("1958-01-01"), as.date("2015-12-31"), by="days") values <- runif(length(days)) df <- data.frame(days = days, values = values) #start of script years <- format(df$days, "%y") uniqueyears <- unique(format(df$days, &