Posts

Showing posts from September, 2010

jenkins - How to know which tests were run together in parallel? -

my question in general this: when run automated tests in parallel how can know of them run @ same time? my issue this: i'm running tests in parallel (4 tests per time) have no idea of them executing (at same time) , waiting. after tests executed there failures , cause of failures other tests executing in same time failed test. want know tests executing can run them again debug failed test. technologies use: nunit 3.0, c#, selenium webdriver, jenkins i'm glad hear possible solution (doesn't matter if it's hard apply) for debug purposes, can run nunit console --trace=verbose option. this write log directory executing in, little this: 14:56:13.972 info [13] testworker: worker#4 executing testssuite1 14:56:13.973 debug [13] workitemdispatcher: directly executing testa 14:56:13.976 debug [12] workitemdispatcher: directly executing testb 14:56:13.976 debug [16] workitemdispatcher: directly executing testc 14:56:13.980 debug [12] workitemdispatche

firebase - Detecting auth token expiration with Emberfire -

i have no issue firebase token expiring i'd programmatically know can ensure ui responds in appropriate way when happens. in situations notice following message: resumesession() canceled: auth token expired. how can ember spa hook event?

How can spring sftp inbound adaptor ensure whether file is transferred completely -

how can spring sftp inbound adaptor ensure whether file transferred completely. there check sum mechanism available in spring-integration default? whether spring integration give alert/notification if file partially transferred local ?. whether spring integration give alert/notification if expected file or file format not in sftp ?. thanks in advance no; there nothing built in; write custom filelistfilter (in local-filter ) that. if add error channel poller, exception during file transfer sent it. not sure mean "format" custom filter check too. polls result in no file there nothing emitted default, detect in smart poller .

javascript - Grouping objects from multiple arrays? -

i grouping child objects parent objects. have short working example on plunker it works fine, , understand principle of nesting objects in 1 array. use 2 different scope arrays. company(parent) - workers(child) example: $scope.parent = [{id: 1, name: "nike", productof:"usa"}] $scope.child = [{ id:1, firstname:"john", lastname:"doe" }, { id:2, firstname:"john2", lastname:"doe2" }, { id:3, firstname:"john3", lastname:"doe3" } ] i've tried on own, read lot of articles, didn't find need. can give me hint do, or link article? thank you! anyway, must have mapping field company in workers array, can use use filter in ng-repeat. $scope.workers = [ { id:1, companyid:1, firstname:"john", lastname:"doe" }, { id:2, companyid:2, firstname:"john2", lastname:"doe2" }, { id:3, companyid:3, firstna

python - How to isolate parts of pandas data frame -

i have json contains backtest various assets, have separated assets using following code: preds = 'test_predictions.json' df = pd.read_json(preds) asset = 'poloniex_doge_btc' grouped = df.groupby('market_trading_pair') print grouped.get_group(asset) #each array should start , end: #start 1446012000 #end 1452556800 now how can truncate 'grouped' starts , ends above timestamps ? edit: sorry, here's example of df market_trading_pair next_future_timestep_return ohlcv_start_date \ 7073 poloniex_doge_btc -0.023256 1445392800 7074 poloniex_doge_btc 0.023810 1445396400 7075 poloniex_doge_btc 0.000000 1445400000 prediction_at_ohlcv_end_date 7073 0.999999 7074 1.000000 7075 -0.999891 using serbitar's answer: i replaced print grouped.get_group(asset) with:

windows 10 - Do I need to keep an image I used for creating SecondaryTile? -

when create secondarytile custom image, save image first in localfolder, pass "ms-appdata:///local/.." uri secondarytile constructor. after tile created, need keep logo image in local storage until it's unpinned? on desktop, create tile, remove image local storage, reboot pc , tile , image still on place. however, on mobile, same , tile ends no logo, transparent. so, os keep own cache of tile's image, or need take care of it? , behavior different between desktop , mobile? i had similar problem live tiles. speaking if want use custom image tiles, should declare image location, uwp run on mobile devices. on windows 10 mobile application referring assets folder that's why images has disappeared.

c - Address mapping of PCI-memory in Kernel space -

i'm trying read , write , pci-device loadable kernel module. therefore follow post : pci_enable_device(dev); pci_request_regions(dev, "expdev"); bar1 = pci_iomap(dev, 1, 0); // void iowrite32(u32 val, void __iomem *addr) iowrite32( 0xaaaaaaaa, bar1 + 0x060000); /* offset device spec */ but @ end device doesn't work expected. address behind bar1 , found big value ffffbaaaaa004500 . at point don't understand happen there , right. can interpret bar1 address inside kernel address space points directly base address 0x60000 offset pci chip select address? and how can value write bar1 + offset copied device? how mechanism work in behind of iowrite32 , pci_iomap ? thanks , regards alex ps: tested read same address successfully. register description of pci device: pcibar0 pci base address 0; used memory-mapped configuration registers pcibar1 pci base address 1; used i/o-mapped configuration registers pcibar2 pci base address 2; used lo

Single jQuery autocomplete for multiple textboxes with different parameters -

is there way can use autocomplete multiple textbox elements. struggle facing want dynamically change element binding , source based on textbox calling function. $("#element").autocomplete({ source: "../ajax/autocompletes/trucks.php", minlength: 0, select: function (event, ui) { $("#element_id").val(ui.item.id); }, change: function (event, ui) { if (!ui.item) { this.value = ""; alert('please select item dropdown!'); } } }).dblclick(function () { $(this).autocomplete("search"); }); i have searched google haven't found much. try , let me know , if need further assitance function multiautocomplete(element,sourceurl){ $(element).autocomplete({ source: sourceurl, minlength: 0, select: function (event, ui) { $("#element_id").val(ui.item.id); }, change: function (event,

HTML <video> tag is not working on perl -

i trying play video <video> tag cgi script. here code #!/usr/bin/perl use warnings; use strict; use cgi; $cgi = cgi->new; print $cgi->header( -type=> "text/html" ); print <<eof; <video width="320" height="240" controls> <source src="/home/ubuntu_workspace/c/video.mp4" type="video/mp4"> </video> eof when keep file in server can play it.but if keep video file in other directory wont play video instead give error. after doing research came know should in path server can access directory.so cases /var/www/ path.but should when video files in different paths.i mean able play file whichever path may be. please suggest me on going wrong. thanks in advance. you correct, must inside webserver's root directory. that's because it's not as cgi program playing video, it's you user of website playing it. the user's browser needs download video while

c++ - initializer lists with objects is non-portable? -

i'm reading mozilla's c++ portability guide 1 of advice states that: don't use initializer lists objects non-portable example (at least, used nonportable, because hp-ux!): subtlepoint mypoint = {300, 400}; this more of style thing @ point, why not splurge , nice constructor? and i'm rather curious line " non-portable example (at least, used nonportable, because hp-ux!) ". how come initializer lists are/were non-portable , in sense? safe use now? , term hp-ux refers to? how come initializer lists are/were non-portable , in sense? the guide quote implies aren't/weren't portable in sense not work in hp-ux. since using initializer list objects defined standard, implies compiler used in hp-ux not conform it. guide not specify, how breaks in hp-ux. and term hp-ux refers to? it operating system . are safe use now? if don't need support hp-ux, or other system not conform standard, , has been s

java - Batch - Error reading File path from Properties file -

i'm using java store directory path properties file. , in bat file i'm using property variable. problem in java file path stored as some_var=d\:\\madhan\\program files\\xxx\\bin in properties. note \: after drive name.its causing problem when read in batch file.i'm using below bat script refer for /f "tokens=1,2 delims==" %%g in (config/config.properties) (set %%g=%%h) java -cp xxx.jar;%some_var% xpackage.yclass if value this some_var=d:\\madhan\\program files\\xxx\\bin then it's working fine is there way in java store without escape character or how replace \: : in bat set "somevar=%some_var:\:=:%" more info

java - investigate jvm high cpu usage -

i have got jvm process consumes single cpu core. checked java threads , there seems no running operations, seems load native thread. i tried use pstack: pstack <thread_id> , returned me list of addresses not helpful: #0 0x00007fcc33c2b694 in ?? () #1 0x00007fcc3011f540 in ?? () #2 0x00007fcc2c032710 in ?? () #3 0x00007fcc3011f560 in ?? () #4 0x00007fcc33c6eaa0 in ?? () #5 0x00007fcc3011f560 in ?? () #6 0x00007fcc3011f7f0 in ?? () #7 0x00007fcc346414d0 in ?? () #8 0x00007fcc34641bf8 in ?? () #9 0x00007fcc3011f570 in ?? () #10 0x00007fcc33c83618 in ?? () #11 0x00007fcc3011f5a0 in ?? () #12 0x00007fcc33c6ea66 in ?? () #13 0x00000006b73ce4b0 in ?? () #14 0x00007fcc3011f7f0 in ?? () what can next? understand helpful use symbols convert adddresses readable names, not sure if exist jvm. another option ask jvm print internal state, not sure if such commands exist. any information appreciated. i using 1.7.0_80 jdk: # ./java -version java version "1.7.0_80&

c++11 - Random Number Order in C++ using <random> -

i have following code, wrote test part of larger program : #include <fstream> #include <random> #include <iostream> using namespace std ; int main() { mt19937_64 generator(12187) ; mt19937_64 generator2(12187) ; uniform_int_distribution<int> d1(1,6) ; cout << d1(generator) << " " ; cout << d1(generator) << " " << d1(generator) << endl ; cout << d1(generator2) << " " << d1(generator2) << " " << d1(generator2) << endl ; ofstream g1("g1.dat") ; g1 << generator ; g1.close() ; ofstream g2("g2.dat") ; g2 << generator2 ; g2.close() ; } the 2 generators seeded same value, , therefore expected second row in output identical first one. instead, output is 1 1 3 1 3 1 the state of 2 generators printed in *.dat files same. wondering if

python 2.7 - SymPy: simplifying of inverse function -

i define 2 sympy functions f , g , s.t. g inverse of f : import sympy sy g = sy.function('g') class f(sy.function): def inverse(self, argindex=1): return g x, y = sy.symbols('x y') print sy.solve(y - f(x), x) # [g(y)] - correct but if try evaluate f(g(x)) sympy doesnt simplify this: print f(g(x)) # f(g(x)) print f(g(x)).doit() # f(g(x)) - why not x? print f(g(x)).simplify() # f(g(x)) - why not x? question : how sympy f(g(x)) x ? inverse isn't implemented that. opened https://github.com/sympy/sympy/issues/10487 it. ideally write below should work default. you can make work defining _eval_simplify , like class f(sy.function): def inverse(self, argindex=1): return g def _eval_simplify(self, ratio, measure): if isinstance(self.args[0], self.inverse()): return self.args[0].args[0] return self if have many classes want can put in superclass. in [30]: f(g(

Ruby, equally distribute elements and interleave/merge multiple arrays -

i have multiple arrays unknown element count like a = [] << [:a, :c, :e] << [:b, :f, :g, :h, :i, :j] << [:d] result should ~ (i don't care details due rounding etc) r = [:b, :a, :f, :g, :d, :c, :h, :i, :e, :j] this how think done first need expand/distribute equally elements in each array same length, a << [nil, :a, nil, :c, nil, :e] << [:b, :f, :g, :h, :i, :j] << [nil, nil, :d, nil, nil] next interleave them typically r = a.shift a.each { |e| r = r.zip(e) } r = r.flatten.compact my current problem how equally (as it's possible) distribute elements across array? there 1 array 4 elements , other 5, biggest should go first. of course nice see if there's other way achieve :) i use sort this, based on element index postion, divided size of array, plus offset based on array id, keep things consistent (if don't need consistency, use small random offset instead). a = [:a,:b] b = [:c] c = [:d,:e,:f] d = [

php - Check for same Array values -

i want check in single statement, if contents of array same or not . challenge me, not able check uniqueness of values inside array. also want make sure values same as, "s" . example array: $myarray = array("s", "s", "s"); // true $myarray = array("s", "s", "s"); // false is possible using single statement? in advance. yes , possible array_count_values . looking for? the function array_count_values() count number of unique values in array. if count of 1 , unique said. count(array_count_values($myarray)) == 1 also, can check 1 of array values whatever value wanted check. $myarray[0] == "s" so combining these 2 in single condition: count(array_count_values($myarray)) == 1 && $myarray[0] == "s" this return true or false . full working code <?php // let's have 2 arrays. $myarray1 = array("s", "s", "s"); // s

excel - Returning a String Array in Outmail.body -

i using known subroutine send warning email outlook whenever condition met. in routine define string array under name datepassed in store dynamical values , intent return it's content in subject of email. the problem don't know how handle datepassed return me whole array not first element. how this? sub mail_workbook_outlook_1() dim outapp object dim outmail object set outapp = createobject("outlook.application") set outmail = outapp.createitem(0) on error resume next dim datepassed(100) variant dim integer = 6 13 if cells(i, 1) < date datepassed(i - 6) = cells(i, 2) end if next outmail .to = "joerge@johnson.com" .cc = "james@johnson.com" .bcc = "" .subject = "unmanaged clients" .body = datapassed .attachments.add activeworkbook.fullname .send

Word Search Using 2d arrays in java - getting past the second letter -

so, have been tasked creating word search program using 2d array grid. so far code can find 2 letter words in grid, go beyond 2 letters in length , code skips them. i'm dead tired @ 2am obvious im missing, if isnt, me out? current searching code: /** * searches word in lettergrid using traditional wordsearch * rules. * * @param word * word */ public boolean wordsearch(string word) { // check each letter in grid (int row = 0; row < this.noofrows; row++) { (int col = 0; col < this.rowlength; col++) { if (grid[row][col] == word.charat(0) && word.length() > 1) { return gridcheck(row, col, word, 1); } else if (grid[row][col] == word.charat(0)) {

optimization - Pack multiple files into one and then split -

i'm developing mobile game , graphics heavy, cannot put of them 1 image atlas, hence having multiple atlases. use preloadqueue load of resources. results in many hits on our server each client. there additional time delay when load every file instead of 1 big 'data' file. we guess better if pack of our atlases 1 "data" file , load preloadqueue @ once. unpack/split , use use currently: pq.getresult('startscreen'); is there way pack data 1 file? if yes wouldn't hit our clients perfomance unacking operation can take 2 times more memory , cpu resources. i suggest using following technique outlined on createjs website. manifestloader class: http://createjs.com/docs/preloadjs/classes/manifestloader.html it allows load multiple manifests , use 1 preloader. load status information can tracked well.

powershell and SQL -

i working powershell , sql using query extract drive information server i writing following query set @sql = 'c:\windows\syswow64\windowspowershell\v1.0\powershell.exe -c "get-wmiobject -class win32_volume -filter ''drivetype = 3'' | select name,label,capacity,freespace | foreach{$_.name+''!''+$_.label+''|''+$_.capacity/1048576+''%''+$_.freespace/1048576+''*''}"' xp_cmdshell @sql i following output output ******************************************************************************************* c:\!riscdcc36n03c$|139980.3984375%35242.921875* d:\!riscdcc36n03d$|139977.99609375%34774.08984375* g:\!riscdcsql552g|92151.9375%46329.1875* m:\!|0%0* m:\riscdcsql557bmp\!riscdcsql557bmp|81911.9375%31869.3125* m:\riscdcsql557dmp\!riscdcsql557dmp|40954.9375%37753.5* m:\riscdcsql557cmp\!riscdcsql557cmp|20475.9375%7643.375* t:\!riscdcsql563t$|81911.9375%15462* r:\!riscdcsql561r$|35836

angularjs - Django Angular Form Submit -

hi guys i'm trying submit data's using angularjs in django refering post , not working in case, views.py def add(request, template_name="form.html"): if request.method == "post": print request.post.get('fname') return templateresponse(request, template_name) form.html <div ng-app="myapp"> <form action="." method="post" ng-controller="myformctrl">{% csrf_token %} <input type="text" name="fname" id="fname" ng-model="userprofile.fname" placeholder="first name"> <input type="text" name="mname" id="mname" ng-model="userprofile.mname" placeholder="middle name"> <input type="text" name="lname" id="lname" ng-model="userprofile.lname" placeholder="last name"> <input type="text" name=

matlab - how to produce projective transformation matrix best fit for multiple 4-point sets? -

normally using kind of matlab code projective transformation single set of reference points: fixedpoints = [0 0; 50 0; 50 100; 0 100]; movingpoints= [752 361; 888 361; 885 609; 736 609]; transformationtype='projective'; tform = fitgeotrans(movingpoints,fixedpoints,transformationtype); imagepr = imwarp(image,tform); now have photo shows (for example 10) jumbled paper sheets, each known size, situated on plain large table. distances between these sheets unknown. so have 10 4-reference-point sets obtain projective transformation matrix , later projected image of 2d table surface. how can produce optimized transformation matrix (and later projected image), include 4-points sets kind of best fit? thanks in advance. i feel need reformulate problem follows: have table rectangular sheets of same size* in arbitrary positions , image taken camera in arbitrary position. want compute homographic transform maps plane of table image (or conversely). coordinates of 4 co

objective c - iOS TabbarViewController hide the tab bar when application become active issue -

i able hide tabbar when viewcontroller pushed(load) using following code: - (bool)hidesbottombarwhenpushed { return yes; } but when application goes in background , applicationdidbecomeactive, tabbar appears back. have tried self.tabbarcontroller.tabbar.hidden = yes; but didn't work. can hide updating frame of tabbar if([view iskindofclass:[uitabbar class]]) { [view setframe:cgrectmake(view.frame.origin.x, view.frame.origin.y + view.frame.size.height, view.frame.size.width, view.frame.size.height)]; } is best way task , acceptable apple app store? instead of using methods fuzz around tab bar (there ain't , useful methods available , setting hiden attribut not have affect reason.) can move off screen. old of reference tab bar , set frame in way, origin.x larger screen's (or self.view 's) size.width and/or same origin.y , size.height .

u sql - Writing SQL to U-SQL Query -

can please guide me in writing below sql in u-sql language used in azure data lake select tt.userid, count(tt.userid) (select userid,count(userid) cou [dbo].[users] createdtime> dateadd(wk,-1,getdate()) group userid,datepart(minute,createdtime)/5) tt group tt.userid i don't find datepart function in u-sql . azure data analytic job giving me error. u-sql not provide t-sql intrinsic functions except few (like like). see https://msdn.microsoft.com/en-us/library/azure/mt621343.aspx list. so how do datetime operations? use c# functions , methods! so dateadd(wk, -1, getdate()) datetime.now.adddays(-7) , datepart(minute,createdtime)/5 (there ) in line) createdtime.minute/5 (maybe need cast double if want non-integer value).

node.js - Gulp - After versioning my images with "gulp-rev", how can I update their references in a CSS in a different location to the outputted image files? -

using gulp , node.js , i'm creating proof of concept generates sprites folders of images, versions generated sprites have unique file names cache busting purposes. i'm using https://www.npmjs.com/package/gulp-rev version sprites ( this works! ), i'm having trouble updating css files references images. there tools have looked @ purpose haven't been able them work. 2 have @ are: https://github.com/jamesknelson/gulp-rev-replace (seems featured can't figure out) and.. https://github.com/galkinrost/gulp-rev-css-url (got working couldn't separate destination revisioned images files , updated css new images names) essentially want grab images gulp-image-versioning-poc/images/sprites/*.png , version them, put resulting images in gulp-image-versioning-poc/dist/ , update references images in gulp-image-versioning-poc/css/*.css i've created simplified example of have here: https://github.com/olthof/gulp-image-versioning-poc if me tackling pr

sql - SELECT statement to select from multiple tables referenced by ROWIDs -

i have small sqlite 3 database accessed autoit. works great, need more complex statement , maybe regret have referenced tables using rowid instead of particular id fields... this configuration: table 1 person name (string) initials (string) table 2 projekte description (string) person (containing rowid of table person) table 3 planungen projid (contains rowid of table projekte) plid (numeric, main selection identifier) (plus other fields not matter) initially, needed read data table 3 planungen filtered specific plid. did using: select rowid,* planungen plid=[filtervalue1] order rowid; works great. now, need select subset of these records, plid=[filtervalue1] , projid points table 2 projekte entry, complies projekte.person=[filtervalue2]. not need table 1 (person), 2 , 3. i thought way (now becomes obvious, sql idiot): select rowid,* planungen p, projekte pj pj.person=[filtervalue2] , p.projid=pj.rowid , p.plid=[filtervalue1] order rowid; that runs sqlite error

powershell - Issues understanding ProgressBar -

i have script need insert gui style progress bar into, @ end of it. script automated account creation. having issue understand how insert different messages box, example @ 15 seconds "creating account" display in progress bar, @ 30 seconds, "setting acl" display , on. below have far, might need take in different direction. $progressbar = new-object system.windows.forms.progressbar $progressbar.location = new-object system.drawing.size(10,10) $progressbar.size = new-object system.drawing.size(280,10) $progressbar.name = "progressbar" $objform.controls.add($progressbar) i able progress bar below show correctly not able write process, example @ 10% " creating user" written bar. help? bfunction updateprogressbar{ # divide number of items processed far total number of items process, times 100 $progress = $global:progresscurrent /$global:progresstotal*100 # update progressbar value $progressbar.value = $progress } function testbar {

jquery - s:checkbox fieldValue always true in validation before submitting -

i using struts 2 <s:checkbox /> in form processing, along angularjs , jquery. before submitting, need validation , until in project: when press submit button, function called: $scope.processform('myform', '<s:url value="/form/validate.action" />', '<s:url value="/form/save.action" />'); , processform(formid, validateurl, submiturl) function defined us: $scope.processform = function(form, validateurl, submiturl) { window.scroll(0,0); proccessformservice.processstandarform(form, validateurl, submiturl); }; and furthermore, have processstandarform() defined in global service: angular.module('ourapp').controller('myformctrl', function($scope, $modal, proccessformservice) { ... } in service: (function() { angular.module('ourapp').factory('proccessformservice', ['$http', function($htt

Manage groovy dependencies in Java -

i'm working on java motor run groovy scripts, want load dependencies needed run groovy script. @ moment, i'm loading jars bellow : file file = new file(elem); url url = file.touri().tourl(); url[] urls = new url[] { url }; @suppresswarnings("resource") classloader cl = new urlclassloader(urls); try { cl.loadclass("com.example.scriptlibrary"); return cl; } catch (classnotfoundexception e) { // todo auto-generated catch block e.printstacktrace(); throw new malformedurlexception("[error] : bad library path\n"); } it works code loads jar libraries. wanted know if there other way groovy dependencies or can , load jars java code.

sonarqube - Is there a way to get Sonar to verify that a file exists? -

something consistent problem in projects i've been working on lack of readme (of form). i'd have sonar verify either readme file exists in project root or docs/ folder exists has @ least 1 file in it. i haven't seen these options sonar rule. i more willing write extension (i have before other custom rules), seems have have same check called every file in project instead of once on project root. is there existing rule check file/folder? if not, there way write extension check file/folder once? as noted david, puppet plugin provides rule readme.md, appear have number of files want check. imo, excellent candidate custom coding, recommend implementing rule template , rather straight rule. way write rule once , configure variations in gui.

python 2.7 - Flask partial view for a list of items -

if on pages in website have list of categories or recent articles loaded db - how can avoid duplicating code using flask , jinja2 ? the way now, have html file include : {% include '/root/latest_articles.html' %} and every view has pass parameter (list of articles) template. i'd avoid this. what's best way achieve in flask? thanks. edit the "additional template context" work .. export function loads data db , access in "latest_articles.html" template. is there way ? you can add additional template context : @app.context_processor def additional_context(): return { 'content': get_page_content_context(request.endpoint, g.language), 'hot_links': get_hot_links(), } for templates code can use macros or include . upd: at first try use template inheritance , put list of categories or recent articles in base template if pages allow this. you can make template code variable `@app

c++ - FindResource() function fails although resource exists -

Image
i trying use win32 findresource() function load embedded resource buffer. adding resource compile time, in visual studio 2015 ide: as can see using pe editor cffexplorer or reshacker, resource gets added correctly: the problem comes when try use findresource() function load on runtime, @ start of dll project: int winapi dllmain( hinstance hinstdll, dword dwreason, lpvoid lpreserved ) { hrsrc reslocation = 0; switch( dwreason ) { case dll_process_attach: // show debug console allocconsole(); freopen("conout$", "w", stdout); //locate our resource reslocation = findresource(hinstdll, "resfile", "resfile"); // findresource returns null error 1813: error_resource_type_not_found printf("test result: reslocation: %i error %i\n", reslocation, getlasterror()); startproc(); break; case dll

javascript - My picklist is not filling correctly (jquery-ui picklist + angularjs filling) -

Image
(using: https://code.google.com/archive/p/jquery-ui-picklist/ ) i understand should not mix both technologies, there's not angularjs picklist , implemented 1 jquery-ui. it opening picklist in modal, using ng-repeat , not give errors , not work. it used work on picklist using (another template). please, can be? angular.module('boxapp').controller("cadastrocertificado", function($scope, $http) { $scope.clientes = {}; $scope.listaempresas = []; $scope.iniciar = function() { $http.get(urlrestserver + '/cadastrocertificado').success(function(response) { $scope.clientes = response; }); }; $scope.iniciar(); /** * trabalhando o componente picklist */ $scope.clientes2 = []; $scope.atribuirum = function(index, c) { var cliente = {}; cliente.idcliente = c.idcliente; cliente.razaosocial = c.razaosocial; $scope.clientes2.push(cliente); $scope.clientes.splice(index, 1); };

javascript - trying leaflet tutorial I get a broken map -

Image
i have followed leaflet " get started " tutorial but map looks broken , polygons not on map in example: example: my map html: my html <html> <head> <title></title> <link rel="stylesheet" href="elad_map.css" /> <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.css" /> </head> <body> <div id="map"></div> <script src="http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.js"></script> <script type="text/javascript" src="elad_map.js"></script> </body> </html> document.onload = loadmap(); function loadmap() { var map = l.map('map').setview([51.505, -0.09], 13); l.tilelayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accesstoken}', { attribution: 'map data &copy