Posts

.net - YouTube data api v3 - Browser based uploading -

with old gdata api upload directly youtube using form post without having upload file server , post on. this easy in javascript, shown here: https://developers.google.com/youtube/v3/code_samples/javascript however, i'm acquiring access token using .net client library , storing refresh token in db can't use javascript version. is supported in api v3? struggling find it.

android - How to use CircleImageView with Volley's NetworkImageView? -

i need circle images rectangular/square images taken network. in application images volley's networkimageview. found fantastic library https://github.com/hdodenhof/circleimageview don't understand how can use networkimageview. can me? check class public class circulairenetworkimageview extends networkimageview { private int borderwidth; private int canvassize; private bitmap image; private paint paint; private paint paintborder; public circulairenetworkimageview(final context context) { this(context, null); } public circulairenetworkimageview(context context, attributeset attrs) { this(context, attrs, r.attr.actionbuttonstyle); } public circulairenetworkimageview(context context, attributeset attrs, int defstyle) { super(context, attrs, defstyle); paint = new paint(); paint.setantialias(true); paintborder = new paint(); paintborder.setantialias(true); } ...

What's the height of the Android Toolbar? -

what height of android toolbar introduced in lollipop? it's quite simple question haven't found answer here except actionbar ; has different height. the toolbar (if not extended) has height of: 56dp (default) 48dp (landscape) 64dp (sw600dp; i.e. tablet) the toolbar higher pre-lollipop actionbar ; 48dp default, 40dp in landscape , 56dp in sw600dp. and retrieve height of toolbar in xml, use ?android:attr/actionbarsize or if you're using appcompat library this ?attr/actionbarsize

c++ - How do I identify the last variable argument? -

this question has answer here: count number of parameters in c variable argument method call 3 answers so in function want take variable number of char pointers. void myfunction(char *_name, ...); only, when iterate through arguments code breaks because i'm not sure how stop on last argument pass , not keep going. void myclass::myfunction(char *_name, ...) { char *a; std::vector<char*> names; va_list variablepathlist; va_start (variablepathlist, _name); = _name; bool exitloop = false; while(!exitloop) { names.emplace_back(a); = va_arg(variablepathlist, char *); //what must set "exitloop = true" @ right time? } va_end (variablepathlist); } say pass 2 char pointers myfunction, code breaks on third loop when va_arg calling on unreadable memory. without telling myfunctio...

r - hcpc and hclust functions give different results for mixed classification -

i started hierarchical classification on mixed datas using "hclust". however, results not contain details variables importance each cluster. that's why did classification using "hcpc" give these details. my question following : why results of 2 hierarchical classifications different ? (for example, in first classification, there 881 individuals in first cluster, there 679 individuals in first cluster second classification) dtf.year <- read.table(file="studies/dtf.year.txt", sep="\t", header=t) #hclust library(ade4) year.afdm <- dudi.mix(dtf.year,scannf=f,nf=2) dist.year <- dist(year.afdm$li[,1:2],method="euclidian") dist.year <- dist.year^2 year.tree <- hclust(dist.year,method="ward.d") #i tried ward.d2 year.clusters <- cutree(year.tree, k=3) table(year.clusters) > 1 2 3 881 225 535 #hcpc library(factominer) year.afdm <- famd(dtf.year, ncp=2) year.tree2 <- hcpc(year.afdm , meth...

java - uploading files using spring boot and angularjs not working -

i want upload files using spring boot annd angular js. here's form: <!doctype html> <html> <head> <meta charset="iso-8859-1"> <title>insert title here</title> </head> <body ng-app="mycat" ng-controller="catcontroller > <form id="main-contact-form" class="contact-form" name="contact-form" method="post" enctype="multipart/form-data" > <div class="col-sm-5 col-sm-offset-1"> <div class="form-group"> <label>name *</label> <input type="text" name="name" class="form-control" required="required" ng-model="rap.name"> </div> <!-- <div class="form-group"> --> <!-- ...

python - Use celery priority queue with broadcast tasks -

i want implement tasks priority in celery workers. can create different queues high priority tasks , low priority tasks. need send broadcast tasks workers broadcast queue , not working. here tasks.py file: from celery import celery kombu.common import broadcast, queue, exchange app = celery('tasks') app.conf.update( celery_result_backend='amqp', celery_accept_content=['json'], celery_task_serializer='json', celery_result_serializer='json', broker_url='amqp://', celery_queues=(queue('default', exchange('default'), routing_key='default'), queue('low_priority', exchange('low_priority'), routing_key='low_priority'), broadcast('broadcast_tasks'), ), celery_routes={'tasks.broadcast': {'qu...