Posts

javascript - It'is possible to create an alphabetic vertical sidebar in HTML/jQuery? -

i have "ul" list of names. create alphabetical vertical sidebar when click on 1 of letter, li names begin letter filtered. example : mobile, need web application. i didn't found plugins or code example. update: explanation : the list sorted. need alphabetic vertical sidebar used scroll list , down. you can achieve doing this: traverse list. if first character of list element different previous list element: add unique id list element. add link alphabetical index (pointing unique id). a simple code achieve this: $("ul li").each(function() { var current = $(this).text()[0]; if (current != previous) { $(this).attr("id", "first_letter_" + current); previous = current; $("#index").append("<a href='#first_letter_" + current + "'>" + current + "</a><br/>"); } }); and can see working on demo (or on jsfiddle ): ...

lua - Awesome wm setting size for the tasklist item -

Image
i'm coding custom vertical wibox contains tasklist, want this: but instead of being fixed height, tasklist items take available space. here's result: here's code far: function render_task_box(s) myotherbox[s] = awful.wibox({ position = "left", screen = s, ontop = true, width = 200 }) mytasklist[s] = awful.widget.tasklist( s, awful.widget.tasklist.filter.currenttags, mytasklist.buttons, nil, nil, wibox.layout.flex.vertical()) local middle_layout = wibox.layout.fixed.vertical() middle_layout:add(mytasklist[s]) local layout = wibox.layout.align.vertical() layout:set_middle(middle_layout) myotherbox[s]:set_widget(layout) end so how wanted result? (or @ least set height of tasklist icon) update looked docs , tried this: local l = wibox.layout.flex.vertical(); l:set_max_widget_size(20) it did nothing. after reading of awesome's source code i've...

github - R - install_github fails -

i trying install package github in r, getting following error: > install_github("jmp75/rclr", build_vignettes=true) downloading github repo jmp75/rclr@master error in curl::curl_fetch_memory(url, handle = handle) : peer certificate cannot authenticated given ca certificates i have set rcurl options such: options(rcurloptions = c(getoption("rcurloptions"), ssl.verifypeer = false, ssl.verifyhost = false ) ) after checking setting: getoption("rcurloptions") we see.... $cainfo [1] "c:/_code/r/library/rcurl/etc/ca-bundle.crt" $ssl.verifypeer [1] false $ssl.verifyhost [1] false still error: downloading github repo jmp75/rclr@master error in curl::curl_fetch_memory(url, handle = handle) : peer certificate cannot authenticated given ca certificates any clues does work? had change bit of code ssl.verifypeer ssl_verifypeer library(httr) set_config(config(ssl_verifypeer = 0l)) see here devtools::install_github...

php - Where to write Access-Control-Allow-Origin: or Origin in javascript? -

so came know searching need set access-control-allow-origin: or origin tags. where?? suggestions use these in header. i can't see find explained this. can please tell me put tags , how!! in php file * guess have ajax request, etc.* <?php header('access-control-allow-origin : *'); ...

javascript - AngularJS Testing with Jasmine and Karma -

i try test angular controller returns promise , cant resolve it...what's wrong code? the angular controller: kpi.aboutcontroller = function ($scope, version) { function loadversion() { //$scope.version = version.getversion(); $scope.version = '1.1.0'; } loadversion(); }; and jasmine test: describe('dashboard: aboutcontroller', function() { beforeeach(module('dashboard')); var $controller; beforeeach(inject(function(_$controller_){ // injector unwraps underscores (_) around parameter names when matching $controller = _$controller_; })); it('testing version number', function() { var $scope = {}; var controller = $controller('aboutcontroller', { $scope: $scope }); var version = 0; console.log($scope.version); expect($scope.version).tocontain("1."); }); }); this working, when change line $scope.version = '1.1.0'; $scope.version = version.getversion(); rece...

xamarin - how to open application while receive call? -

in xamarin android application have receive call using broadcastreceiver public override void onreceive(context context, intent intent) { toast.maketext(context, "received intent!", toastlength.short).show(); dialercalllistener listener = new dialercalllistener(); sipregistration.call = sipregistration.sipmanager.takeaudiocall(intent, listener); string str = sipregistration.call.peerprofile.uristring; } from here want check app run in foreground/background, , if background how can bring app foreground , show incoming call receiving page? help? xamarin cross platform application.

reporting services - SSRS Matrix Page Break of Column Group by WeekNumber -

i have similar problem one, ssrs matrix page break of column groups is not possible this? aren't there other way aside hiding column group? if not wrong looking output display week 1 record in next row or in next page display week 2 record or can generic display n week on each page. i have answered similar question few months back. can take reference m x n matrix above example give output week per row .. next give page break click on table group & press f4 set page break properties value, set breaklocation between & pagename =fields!grp.value page break