Posts

Showing posts from July, 2011

javascript - Framework7 <a href=""> not working -

i have simple <a> in page using framework7 follows: <li><a href="https://www.google.com/"><img src="images/icons/black/users.png" alt="" title="" /><span>go google/span></a></li> but when click on not redirecting google page. have checked console , shows follows: xmlhttprequest cannot load https://www.google.com/. no 'access-control-allow-origin' header present on requested resource. origin 'http://localhost:8080' therefore not allowed access. framework7.js:12307 xhr failed loading: "https://www.google.com/".$.ajax @ framework7.js:12307app.get @ framework7.js:1652app.router.load @ framework7.js:2648load @ framework7.js:636handleclicks @ framework7.js:7573handleliveevent @ framework7.js:11488 i new framework7 . have purchased template development. you want redirect external website, add external class a href , working properly <li><a href=...

Integrate single sign on using spring security oauth -

i working on application guarding few rest apis spring security oauth2.the authentication works fine.now want implement single sign on feature each account.that once user login using credential 1 device not possible login same use user other device.that @ time 1 login allowed user.if wants login in device should logout login device.how in spring security oauth.below codes. spring-security.xml : <?xml version="1.0" encoding="utf-8" ?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:oauth="http://www.springframework.org/schema/security/oauth2" xmlns:context="http://www.springframework.org/schema/context" xmlns:sec="http://www.springframework.org/schema/security" xmlns:mvc="http://www.springframework.org/schema/mvc" xsi:schemalocation="http://www.springframework.o...

sql - store 50000 records per month -

i'm working on hr system. need store information 50000 employees every month. (same employees repeated next month changes data job or compensation changes) best approach store such data. better save in single table or save data new table every month. i need show reports based on period of time jan may. in case if i'm using separate tables each month feasible run query on this. possible pass table name in variable. you can store in single table. conventional dbms can handle such amount of data. designed store , access millions of records @ time. no worries.

java - IntelliJ - Select source code location while debugging -

i'm trying step jdk source, versions of local jdk , remote jdk different, hence line numbers not match. have downloaded sources of remote jdk, can't find out how tell intellij use them. how can tell intellij use specific jdk sources debugging? you can set jdk based on this: https://www.jetbrains.com/help/idea/2016.2/configuring-global-project-and-module-sdks.html to configure project sdk open project structure dialog (e.g. ctrl+shift+alt+s). in left-hand pane, under project settings, click project. on page opens in right-hand part of dialog, select necessary sdk project sdk list. if desired sdk not present in list, click new , select necessary sdk type. in dialog opens, select sdk home directory , click ok. result, new sdk added intellij idea , selected project sdk. view or edit sdk name , contents, click edit. (the sdk page open.) click ok in project structure dialog. configure module sdk open project structure di...

progressdialog - Getting error in Progress Dialog in android? -

i have mainactivity adds fragment "a",in fragment"a" sending server request using volley.i had made class known dialogutil contain progress dialog implementation.problem when launch app shows error in progress dialog implementation in fragment "a".that java.lang.illegalargumentexception: view=com.android.internal.policy.impl.phonewindow$decorview{42759d68 v.e..... r......d 0,0-456,144} not attached window manager , becomes force close. dialogutil class code:- public class dialogutils { public static progressdialog showprogressdialog(context context, string message) { progressdialog m_dialog = new progressdialog(context); m_dialog.setmessage(message); m_dialog.setprogressstyle(progressdialog.style_spinner); m_dialog.setcancelable(false); m_dialog.show(); return m_dialog; } } progress dialog implementation in fragment "a" m_dialog = dialogutils.showprogressdialog(ge...

javascript - Hide part of the text returned from the server -

on webpage want hide part of text in object returned server.for example: <div> <h4>{{name.subname}}</h4> </div> the string returned {{name.subname}} contains name followed text within brackets, "sample name(xyz)". want able hide appearing within brackets i.e. (xyz) in case. suggestions on how can make work? upon returning server, add function object returns intended format, $.get('example', function(name){ name.cleansubname = function(){ this.subname.replace(/\([^)]+\)/, "") } }); and use in template like, <h4>{{name.cleansubname()}}</h4> regex borrowed @rohan kumar :) hope helps.

date - DAX compare two years YTD -

Image
i need compare data year data last year. customer wants switch between full year , year-to-date comparison. full year have, year-to-date want see how going compared data today last year e.g.: full data jan 2016 - 24. aug (today) compared jan 2015 - 24. aug 2015. how implement in dax? i'm using in power bi. supposing have measure called [sales], calculated fact table, , dates table, can write 2 new measures compare data year , previous: sales ytd = calculate ( [sales]; datesytd ( 'dates'[date] ) ) sales py ytd = calculate ( [sales]; dateadd ( datesytd ( 'dates'[date] ); -1; year ) ) putting in matrix visualization, give following: please remember have 'dates' relationship sales table correctly configured in order have time intelligence calculations done right. can find more info here .

sdn - What is the difference between these two OpenvSwitch commands? -

what difference between these 2 openvswitch commands? ovs-vsctl add-br br0 -- set bridge br0 datapath_type=netdev & ovs-vsctl add-br br0 . the first command sets bridge userspace-only mode. second command default setup bridge. more information can found here .

What does <?..?> mean in XML? -

what <?..?> mean in xml? example: <?xml version="1.0" encoding="utf-8"?> <tests> <test><?xml-multiple ?> </test> </tests> i want know <?xml-multiple ?> means in above xml? syntax-checked xml in w3schools , there no error. this processing instruction. processing instructions used directly pass on information or instruction application via parser, without parser interpreting it. <?my-application instructions ?> the token after initial question mark (here my-application ) called target , identifies application @ instruction aimed. follows not further specified xml, treated parser black box, , application interpret it. entity , character references not recognized. processing instructions target xml-multiple seem commonly produced, accepted , recognized applications transform xml json or json xml (including oracle) in order identify arrays, though not sure , if behavior officially standardi...

ruby on rails - Why is current_user called on render in controller? -

i'm getting following error when trying access log in method of sessions controller: jwt::decodeerror (nil json web token): lib/json_web_token.rb:11:in `decode' app/helpers/sessions_helper.rb:15:in `current_user' app/controllers/api/sessions_controller.rb:11:in `create' if comment out render json: user in controller response, good, except need respond user...why on earth current_user method called on through line 11 of sessions_controller.rb . here's relevant code: lib/json_web_token.rb require 'jwt' class jsonwebtoken def self.encode(payload, expiration = 24.hours.from_now) payload = payload.dup payload['exp'] = expiration.to_i jwt.encode(payload, rails.application.secrets.json_web_token_secret) end def self.decode(token) jwt.decode(token, rails.application.secrets.json_web_token_secret).first end end sessions_helper.rb require 'json_web_token' module sessionshelper def create_session(user) ...

PostgreSql: how to create index for character varying array type column -

my table structure create table product ( id bigserial not null, seller_id integer, product_data character varying[], ptype integer, constraint config_pkey primary key (id) ) index created: create index product_name_idx on product using gin (product_data); proudct_data column can have around 50 different product names @ max in array , product table has around 1m unique rows. need find out seller_id s have 'steel' product, 'steel' may sub-string of product name in product_data; currently using following query: select * product ptype in ( 2,3 ) , '%steel%' % any(product_data) offset 0 limit 10; the above query gives expected results, not using product_name_idx index, slow. how can create proper index on column? please me out. i thought gin indexes work on tsvector data types? alter product_data tsvector type, recreate index , ensure cast tsvector on query: select * product ptype in ( 2,3 ) , '%steel%'::tsvector ...

Check if an object is an instance of class meta type in Swift -

this question has answer here: check whether swift object instance of given metatype 3 answers i have array of objects of various types , array of types. each object, i'd iterate on array of types , see if object type. this: class parent {} class childa: parent {} class childb: parent {} class grandchilda: childa {} var objects: [any] = ["foo", childa(), childa(), childb(), grandchilda()] var classes = [parent, childa, childb] // line doesn't compile!! obj in objects { cls in classes { if obj cls { nslog("obj matches type!") } } } this doesn't work because can't store classes in array. understand, can store class types such childa.self : childa().dynamictype == childa.self // true but doesn't handle subclasses: childa().dynamictype == parent.self // false obviously is operator...

Sort array of objects by quarterly-yearly data in JavaScript -

i have array of data containing objects below [ { "name":"q1'2016", "y":0 }, { "name":"q2'2016", "y":0 }, { "name":"q3'2016", "y":0 }, { "name":"q4'2015", "y":0 } ] i want sort them based on quarterly, q4'2015 should come first, q1'2016 , on. how can acheived? you can use sort method , give callback sort object based on predicate; in case, want inspect objects' name property containing quarter-year information. since you'll have data different quarters , years, you'll want map quarters month values can convert them year/month dates , compare them way. var data = [{ "name": "q1'2016", "y": 0 }, { "name": "q2'2016", "y": 0 }, { "name":...

Need help writing xpath expression on xml response returned from WeatherWS app -

i'm struggling write xpath expression extract values returned following xml response. <soap:envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:xsd="http://www.w3.org/2001/xmlschema"> <soap:body> <getcityforecastbyzipresponse xmlns="http://ws.cdyne.com/weatherws/"> <getcityforecastbyzipresult> <success>true</success> <responsetext>city found</responsetext> <state>md</state> <city>columbia</city> <weatherstationcity>baltimore</weatherstationcity> <forecastresult> <forecast> <date>2011-10-08t00:00:00</date> <weatherid>4</weatherid> <desciption>sunny</desciption> ...

html - Divs for containing image and caption (as image) -

i have been going nuts trying figure out why isn't working. have researched lot , can't seem find right answer: i trying make set of div items act vertically stacked two-cell table table displays inline can span across screen , break text (for responsive appearance). top cell , bottom cell fixed sizes , images within each (one art thumbnail , 1 handwritten caption) centered vertically , horizontally within cells. here code: css & html div.artpluslabel { width: 275px; height: 375px; position: relative; display: inline-table; } div.artcontainer { width: 275px; height: 325px; text-align: center; position: absolute; display: table-cell; vertical-align: middle; } div.label { width: 275px; height: 50px; text-align: center; position: absolute; display: table-cell; vertical-align: middle; } <div class="artpluslabel"> <div class="artcontainer"> <a href = "art.php?id=...

vba - MS Access 2013 saved append query not updating all fields -

i have saved query, qryinsertlog follows: parameters useridpar long, unitidpar long, logentrypar longtext, fnotespar longtext; insert tbllogbook ( userid, unitid, logentry, fnotes ) select [useridpar] expr1, [unitidpar] expr2, [logentrypar] expr3, [fnotespar] expr4; i'm trying run query when save button clicked on unbound form, parameters gathered form controls. vba code save button is: private sub cmdsave_click() dim db dao.database dim qdf dao.querydef dim oktosave boolean if me.cbouser.value = 0 or isnull(me.cbouser.value) msgbox "you must choose user. record not saved." oktosave = false elseif me.cbounit.value = 0 or isnull(me.cbounit.value) msgbox "you must choose unit. record not saved." oktosave = false elseif me.txtlogentry.value = "" or isnull(me.txtlogentry.value) msgbox "you must have somtehing log. record not saved." oktosave = false else oktosave = true end if set db = currentdb set qdf = d...

ios - Bring navbar in front of the UISearchController, Swift -

Image
i used navbar created programmatically uisearchcontroller. when start editing uisearchbar: - navbar stays behind dim view - tableview hides half of navbar - when tabeview appeared, cancel buttons not selectable. uisearchcontroller : let locationsearchtable = storyboard!.instantiateviewcontrollerwithidentifier("searchtableviewcontroller") as! searchtableviewcontroller resultsearchcontroller = uisearchcontroller(searchresultscontroller: locationsearchtable) resultsearchcontroller.searchresultsupdater = locationsearchtable resultsearchcontroller.view.backgroundcolor=uicolor.clearcolor() locationsearchtable.delegate = self let searchbar = self.resultsearchcontroller.searchbar searchbar.sizetofit() searchbar.placeholder = "search" searchbar.searchbarstyle = .minimal searchbar.barstyle = .default searchbar.translucent = true searchbar.bartintcolor = uicolor.whitecolor() searchbar.setimage(uiimage(named...

getopt - Running a bash script with mandatory arguments -

i want bash script working when type bash.sh --subj directoryname --input filename --all --subj , --input , , --all required make script work, , --all argument not require input. if either --subj or --input missing, want following message printed: please provide both directory name , file name. if --all argument missing, want print: please use --all option. i fix script github using optparse . source optparse.bash optparse.define short=s long=subj desc="subject name" variable=subj optparse.define short=i long=input desc="the file process" variable=input optparse.define short=a long=all desc="all option" variable=all value=true default=false source $(optparse.build) if [ "$subj" == "" ]; echo "error: please provide directory name" exit 1 fi if [ "$input" == "" ]; echo "error: please provide input" exit 1 fi if [ "$all" == "" ]; echo ...

elasticsearch - Get count for unique terms -

in elasticsearch, want unique terms , counts terms. index: doc1: filetype(multivalued): pdf, zip, zip, txt expected result: pdf: 1 zip: 2 txt: 1 i made query, got error. "aggs": { "uniqueterms": { "terms": { "field": "filetype" } }, "aggs": { "count": { "cardinality": { "field": "filetype" } } } } how can make query result? index mapping updated: "file" : { "properties" : { "filetype" : { "type" : "string", "norms" : { "enabled" : false }, "fields" : { "raw" : { "type" : "string", "index" : "not_analyzed", ...

ftp - Cannot convert 'double' to 'int' C# -

i have code => var timer = new system.threading.timer((e) => { upload(); }, null, 0, timespan.fromminutes(5).totalmilliseconds); it supposed execute method every 5 minutes, keeps throwing error: cannot convert 'double' 'int'. making no sense because have had other strings in there "upload()", such "ftpfileuploader.upload()" , work fine. though don't want that... please help... in advance! system.threading.timer takes integer, following code returns double timespan.fromminutes(5).totalmilliseconds so need cast integer: (int)timespan.fromminutes(5).totalmilliseconds

java - Android Studio, Error: package does not exist -

i suffering form on couple weeks, , killing me. i working on android project in android studio. imported haibison lockpattern module projects. in "settings.gradle" add include ':androidlockpattern' in "build.gradle" add dependencies { compile project(':androidlockpattern') ... } when run project, print errors "error: package haibison.android.lockpattern.util" not exist. i checked thousands times, package right there, , when import package in code: import haibison.android.lockpattern.lockpatternactivity; import haibison.android.lockpattern.util.alpsettings it looks fine... plz help. try using in gradle project: compile 'haibison.android:underdogs:+ hope helps!

powershell - Export-Csv emits Length and not values -

i want read csv file , output csv file 1 (1) field. have tried create concise example. ps c:\src\powershell> get-content .\t.csv field1,field2,field3 1,2,3 4,55,6 7,888,9 ps c:\src\powershell> import-csv -path .\t.csv | ` >> foreach-object { >> $_.field2 ` >> } | ` >> export-csv -path .\x.csv -notypeinformation >> the problem length of field2 written exported csv file. want field header "field2" , values value original csv file. also, want quotes required; not everywhere. i have read export-csv exports length not name , export csv returning string length . these not seem address producing actual csv file header , 1 field value. ps c:\src\powershell> get-content .\x.csv "length" "1" "2" "3" csv object uses note properties in each row store fields we'll need filter each row object , leave field(s) want using select-object cmdlet (alias: select ), processes e...

symfony - Why are my old URLs still called? -

there website took down long time (almost 6 months). refurbished full website, it's , feel , in (i changed framework php zend symfony3). after launching on production, activated symfony monolog reporting system see errors getting. bunch of errors sure, known , clear me except one. no route found @ /some_old_route. i not sure whether google reindexing whole website new urls or going on. old links being called , causing "no route found" problem more 3000 errors being reported in 2 days. this example of error server log file. error 69.30.213.82 404 /dienstleister/eco-express/9260 http/1.0 mozilla/5.0 (compatible; mj12bot/v1.4.5; http://www.majestic12.co.uk/bot.php?+) 23.8 k apache access any thoughts? , if google, how tell these urls gone now? as can see log entry, specific request done mj12bot , whoever is. if bot works correctly remember url not available anymore , not try again in future.

phoenix framework - How to implement to_query(data) in Elixir Struct -

i attempting update existing records in database using repo.update: def subscribe_email(conn, %{"email-address"=>email_address, "shop"=>shop}) current_record = repo.all(%oauth.emailaddress{email_address: email_address, active: false, shop: shop, verified: :true}) current_record = ecto.changeset.change(current_record, active: :true) case repo.update current_record {:ok, struct} -> io.puts "updated correctly." {:error, changeset} -> io.puts "did not update" end end i have model %oauth.emailaddress: defmodule oauth.emailaddress use ecto.model schema "email_address" field :email_address, :string field :active, :boolean field :shop, :string field :verified, :boolean timestamps end end when hit subscribe_email(), exception raised: ** (protocol.undefinederror) protocol ecto.queryable not implemented %oauth.emailaddress i know need implement to_query() ecto...

vb.net - Have an IF statement constantly check -

is there anyway have if statement checking? i'm working list , need check if list count exceeds variable. i've since noticed easiest way make program run smoothly have if statement checking while program running. the best approach change 'list' 'bindinglist'. event enabled list fire events when list changes: private withevents mlist new system.componentmodel.bindinglist(of string) public sub main() mlist.add("an item") end sub private sub mlist_addingnew(sender object, e system.componentmodel.addingneweventargs) handles mlist.addingnew if mlist.count > 100 messagebox.show("threshold exceeded") end if end sub alernatively start thread / timer polls this, you'll have watch out synchronization issues.

c# - Getting 127.0.0.1 when using HttpContext.Features.Get<IHttpConnectionFeature>()?.RemoteIpAddress -

i using asp.net core mvc. trying ip address using below code. var ipaddress = httpcontext.features.get<ihttpconnectionfeature>()?.remoteipaddress?.tostring(); its returning ::1 means 127.0.0.1 on local machine fine. have hosted on azure cloud testing using testing azure account , still giving me 127.0.0.1. what doing wrong? project.json { "dependencies": { "microsoft.netcore.app": { "version": "1.0.0-rc2-3002702", "author": [ "musaab mushtaq", "programmer" ], "type": "platform" }, "microsoft.aspnetcore.server.iisintegration": "1.0.0-rc2-final", "microsoft.aspnetcore.server.kestrel": "1.0.0-rc2-final", "microsoft.aspnetcore.mvc": "1.0.0-rc2-final", "microsoft.aspnetcore.staticfiles": "1.0.0-rc2-final", "microsoft.aspnetcore.diagnostics": ...

c# - How to save null strings as string.empty when saving changes? -

say have class (details omitted brevity): public class address { public address() { postalcode = ""; } public string postalcode { get; set; } } in mapping, postal code marked required: public addressmap() { this.property(t => t.postalcode) .hascolumnname("postalcode") .isrequired() .hasmaxlength(50); } in database defined follows: create table [dbo].[address] ( [postalcode] varchar (50) not null default (('')) ); it initialized in code null value postalcode : string pc = null; var address = new address() { postalcode = pc }; when go add address dbcontext, , save changes, dbentityvalidationexception because i'm trying save null value not null column. is there way have entity framework or database not attempt save .isrequired string column null instead save empty string? one option change get accessor of property remove null values: public class addre...

php - Looping through table columns -

i have query supposed loop through tables in database. fine, test outputting table names. but, i'm trying loop through every column in database use inside query. this current code, loops through tables in database: <?php $host = "127.0.0.1"; $username = "username"; $password = "password"; $database = "database"; $link = new mysqli($host, $username, $password, $database); if($link->connect_error) { die("connection died: ".$link->connect_error); } $showtables = $link->query("show tables;"); foreach($showtables->fetch_all() $table) { printf($table[0] . "\n"); // i'm trying achieve: foreach(/* ??? */ $column) { printf("\t- ".$column."\n"); } } ?> could lend hand? thank you! something : $host = "127.0.0.1"; $username = "username"; $password = "password"; $database = "database"; ...

javascript - If/Else statement not functioning properly (Else statement won't function in particular) -

i trying create script manages visibility of content based on whether option selected. issue running if/else statement not functioning properly. it shows div .provider-info when last .radial-container radio button checked (i.e. "i keep number"). it's supposed slideup when class .select removed parent container, doesn't. i experimented bit , able gain functionality looking different piece of code: $(function() { $('.radial-container').on('click', function() { $(this).addclass('select').siblings().removeclass('select'); if($('.radial-container').last().hasclass('select')) { $(this).children('.provider-info').slidedown(300); } else { $('.provider-info').slideup(300); } }) }) but issue above segment works unlimited line 2. unlimited line 1 loses functionality. how can fix code in order if/else statement function properly? want div .provider-info visible wh...

mvvm - How to allow hyphen in kendo numerictextbox? -

(function ($) { $("#numeric").kendonumerictextbox({ format: "-" }); } unable add hyphen in middle of text box then have use kendomaskedtextbox $("#mytextbox").kendomaskedtextbox({ mask: "000-00000000" });

templates - Bigcommerce sale price not being calculated when logged in -

the productprice variable responsible displaying cost of item, when user guest variable holds sale price of product, when user logged in sale price not being calculated. has encountered similar bigcommerce. this template file: <li class="%%global_alternateclass%%"> <div class="productwrapper"> <div class="productimage quickview" data-product="%%global_productid%%"> %%global_productthumb%% </div> <div class="productdetails"> <a href="%%global_productlink%%" class="%%global_searchtrackclass%% pname">%%global_productname%%</a> </div> <em class="p-price">%%global_productprice%%</em> <div class="productcomparebutton" style="display:%%global_hidecompareitems%%"> <input type="checkbox" class="checkbox" name="compare_product_ids" id="comp...

php - Product Attributes Not Loading -

i'm adding "most viewed" section our website. while product url loading correctly, other attributes (image, product name, price, etc) not. any idea might doing wrong here? <?php if (($_products = $this->getproductcollection()) && $_products->getsize()): ?> <div class=" most_viewed"> <?php $_productcollection=$this->getloadedproductcollection(); $_helper = $this->helper('catalog/output'); ?> <?php $_collectionsize = 5;//count($_products->getitems()); echo $_collectionsize; ?> <?php $_columncount = 4; ?> <div class="category-products"> <ul class="products-grid"> <?php $i=1; foreach ($_products->getitems() $_product): ?> <li class="item<?php if(($i-1)%$_columncount==0): ?> first<?php elseif($i%$_columncount==0): ?> last<?php endif; ?>"> <a class="product-image" href="<?p...

visual c++ - C++ MSVC dll compiling error missing type specifier and redefinition -

i'm using microsoft visual studio community 2015 update 3 , im compiling dll. want call function initpreysplitpipe have tried calling ::pr::initpreysplitpipe , copied interprocess.cpp code game_local.cpp , interprocess.hpp code game_local.h , call there didnt work either. i have set github repository code if 1 interested. thanks reading , sorry bad english :/ compiler output: error c4430 missing type specifier - int assumed. note: c++ not support default-int error c2371 'pr::initpreysplitpipe': redefinition; different basic types error c2556 'int initpreysplitpipe(void)': overloaded function differs return type 'void pr::initpreysplitpipe(void)' interprocess.hpp namespace pr { (...) void initpreysplitpipe(); (...) } interprocess.cpp #include "interprocess.hpp" namespace pr { (...) void initpreysplitpipe() { pipe_preysplit = createnamedpipe("\\\\.\\pipe\\" preysplit_pipe_name,pipe_access_outbound | fil...

Quit R session in RStudio without leaving RStudio -

this strange request - possible 1) terminate r session within rstudio keep rstudio open? ... , 2) start new r session within rstudio? i see such feature was requested of rstudio in 2013 don't know if implemented. in rstudio (at least on windows version 3.3.0), in top menu bar file, edit etc. under session option terminate r... terminate r session rstudio stay open , automatically restart new r session.

javascript - How to get dynamic view to update properly when scope variable changes -

i developing angular spa , on 1 view there $scope variable determines majority of content page. if user clicks on different link in menu, parameters passed through url, , scope variable gets updated. however, when doing this, view not updated. don't ask questions on here, have tried seems everything, , can't figure out why view isn't being updated. here code looks like: html <div ng-init="loadtopicview()"> <h1 ng-bind="selectedtopic.title"></h1> <p ng-bind="selectedtopic.body"></p> </div> js $scope.loadtopicview = function() { var selectedtopic = urlparams.index; $scope.selectedtopic = $scope.topics[selectedtopic]; } initially, thought because of way being called $scope.selectedtopic wasn't getting correct value, url didn't have value yet. $scope.topics array of objects , ever link user clicks on pass index through url , assign correct object $scope.selectedtopic . ...

POST XML information using Python -

i creating program in python posts xml file website's rest api create vcs root (this website api documentation suggests). program creates xml file, based on user input, posts (using requests library), deletes file. there way can post information contained in xml file (mostly property values), without creating , deleting temporary xml file? can post information string or something? examples in python or curl help. use data-attribute of requests : from io import bytesio import xml.etree.elementtree et data = et.element('some-xml') tree = et.elementtree(data) payload = bytesio() tree.write(payload) r = requests.post(url, data=payload.getvalue())