Posts

Showing posts from March, 2013

jquery - Rails 4 ajax acts as votable with turbo links vote counts not updating -

Image
i'm able click on link once, , count update, doesn't update on clicks after that, nor update database (looking @ console). index.html.haml .votes - if current_user.liked? skit = link_to unlike_skit_path(skit), method: :get, remote: true, class: "unlike-post" .upvote %span.upvote-link %i.fa.fa-caret-up .vote-count= skit.votes_for.size - else = link_to like_skit_path(skit), method: :get, remote: true, class: "like-post" .upvote %span.upvote-link %i.fa.fa-caret-up .vote-count= skit.votes_for.size routes.rb resources :skits resources :challenges member "like", to: "skits#like" "unlike", to: "skits#unlike" end end unlike.js.erb $('.unlike-post').bind('ajax:success', function(){ $(this).find('.vote-count').html('<%= escape_javascript @skit.votes_for.size.to_s %>'); }); like.js.e

html - Overflow:hidden effecting zoom image -

i'm creating slider .slider-wrap parent div has rule overflow: hidden; , want every image should zoom in whenever hover on div slider-boxes working fine until i'm using overflow: hidden; when start use overflow: hidden; image doesn't zoom out desired result in snippet 2 i'm not using overflow: hidden; i want final result snippet 2 but think overflow important use because there more images come when make dynamic there way fix issue. here jsfiddle https://jsfiddle.net/rhulkashyap/7g3vypqh/ snippet 1: i'm getting body{ background-color: #dd3735; padding-top:30px; } .slider-wrap{ width:616px; height:120px; border:1px solid #ccc; margin:0 auto; box-shadow: 0 0 10px #000; border-radius:5px; overflow:hidden; } img, .slider-boxes{ width:120px; height:120px; } .slider-boxes{ display: inline-block; -webkit-transition: .2s ease-in-out; transition: .2s ease-in-out; } .slider-boxes:hover{ -webkit-t

ios - Twitter Digits 1.15.1 install error (Could not build module 'DigitsKit' || Use of undeclared identifier 'Digits') -

while installing digits 1.15.1 in ios app following errors occurs in appdelegate.m file: could not build module 'digitskit' @ import statement #import <digitskit/digitskit.h> use of undeclared identifier 'digits' @ [fabric with:@[[digits class]]] statement in didfinishlaunchingwithoptions method navigate project name -> build settings -> apple llvm 7.0-language-modules set enable modules (c , objective-c) no (default - yes). this solve both errors. show errors in digits.h file solve errors navigate digits.h file , remove __tvos_unavailable error statements now build , run project generate error statements. solve errors navigate project name -> build settings -> apple llvm 7.0-language-modules set enable modules (c , objective-c) yes (default - no). build , run project , have fun.

mysql - SQL insert into select from - insert the id instead of the data -

i need populate fact table data lds_placement table. have selected records , here looks like: fk1_account_id | fk3_job_role_id | salary | no_of_placements | year --------------------------------------------------------------------- 10 | 3 | 165000 | 5 | 2010 10 | 3 | 132000 | 4 | 2011 10 | 3 | 132000 | 4 | 2012 20 | 2 | 990000 | 3 | 2010 20 | 2 | 132000 | 2 | 2011 20 | 2 | 132000 | 2 | 2012 i want insert time_id different table called time_dim column year , not actual year itself. the time_dim table looks this: time_id | year --------------- 5 | 2015 1 | 2013 2 | 2010 3 | 2014 4 | 2012 6 | 2011 i need insert "year" column actually: year 2 6 4 2 6 4 please give

c# - HTTP request error from framework 4 application -

Image
i try use webservice .net application ( .net framework 4 , c# , vs 2010 ) , got exception: an error occurred while making http request https://... due fact server certificate not configured http.sys in https case. caused mismatch of security binding between client , server. : does know how fix code? servicepointmanager.securityprotocol = securityprotocoltype.tls | securityprotocoltype.ssl3;

php - PHPExcel proble with importing 2 .csv to separate sheets -

mission: need add 2 .csv files separate sheets problem: second import removes second created sheet , puts information on first sheet $inputfiletype = 'csv'; $objreader = phpexcel_iofactory::createreader($inputfiletype); $objreader->setdelimiter(';'); $objphpexcel = $objreader->load('fail1.csv'); $objphpexcel->getactivesheet()->settitle('laoseis'); //teine leht $objphpexcel->createsheet(); $objphpexcel->setactivesheetindex(1); $objreader = phpexcel_iofactory::createreader($inputfiletype); $objreader->setdelimiter(';'); $objphpexcel->setactivesheetindex(1); $objphpexcel = $objreader->load('fail2.csv'); $date = new datetime($_get['startdate']); $objphpexcel->getactivesheet()->settitle('müük w'.$date->format("w").''); how can solve problem? phpexcel doesn't load second file current sheet in existing phpexcel object, creates ne

html - Override Bootstrap CSS with custom CSS -

i have small problem overriding of bootstrap's css style. the standard definition of bootstrap table has following code: .table { width: 100%; max-width: 100%; margin-bottom: 20px; } i set margin-bottom 0px, using own css code, i'm having problems overriding it. this code: table .table.table-responsive .table-middle { margin-bottom: 0px; } how fix it? thanks in advance! :) don't add important. bad habit fall , cause more headaches in future. plus, doubt solve problem. instead, try find out why targeting (table .table.table-responsive .table-middle) isn't targeting , overriding table want. the easiest way via chrome or firefox's "inspect element". take @ table want change. see margin-bottom lies. maybe it's on .table.blue or .container .table or something. however, judging targeting, doubt issue. instead, believe aren't targeting element want. table .table.table-responsive .table-middle will <table> elem

javascript - directive returns the same array a few times angularjs -

i'm trying display highcharts ng-repeat displays 1 chart in every row here html: <tr ng-repeat="perspective in perspectives"> <td> <highcharts-pie class="hc-pie" items="processed"></highcharts-pie> </td> <td>{{perspective.perfomance}}</td> <td>{{perspective.current}}</td> <td>{{perspective.previous}}</td> <td>{{perspective.variance}}</td> </tr> and data in controller: $scope.perspectives=[ {perfomance:'a', current:'0', previous:'1', variance:'-1', plus:false, graphdata:[ {value: 32.4}, {value: 13.2}, {value: 84.5}, {value: 19.7}, {value: 22.6}, {value: 65.5}, {value: 77.4}, {

ssh - Error in installing patch 7405 of magento -

i have downloaded file link : https://github.com/brentwpeterson/magento-patches/blob/master/ce1.9-ee1.14/patch_supee-7405_ce_1.9.0.1_v1-2016-01-20-04-45-14.sh , has kept in root folder. when run command : bash patch_supee-7405_ce_1.9.0.1_v1-2016-01-20-04-45-14.sh then gives me error: patch_supee-7405_ce_1.9.0.1_v1-2016-01-20-04-45-14.sh: line 7: $'\r': command not found patch_supee-7405_ce_1.9.0.1_v1-2016-01-20-04-45-14.sh: line 9: syntax error near unexpected token `$'{\r'' patch_supee-7405_ce_1.9.0.1_v1-2016-01-20-04-45-14.sh: line 9: `_check_installed'tools() { i following link: magento 1.7.2 security patch error via ssh . trying running yum install patch but not getting installed move further giving me error. have not installed previous patches, patch dependent on previous patch? i want let know had made changes in core files have reverted them , after installing 4291,6237,7616 patch trying run command: sh patch_supee-7405_ce_1.9.0.1_v1-

angularjs - Controller inheritance with injection -

i'm having hard time trying understand best way achieve inheritance controllers. i've seen few other posts here these still don´t things. here's have: - 2 controllers 80% similar. have factory both use data displayed. - use controlleras notation, var vm = this - there's mix of vars , functions used in view , therefore created inside vm, , other internal vars , functions not. - tried create single parent controller , use injection create these 2 controllers, overwriting need, not working expected , i'm not sure right thing do here simplified version of code. (function() { angular .controller('parentcontroller', parentcontroller) parentcontroller.$inject = [ '$scope', '$location' ]; function parentcontroller($scope, $location) { var vm = this; // view model var url = $location.url(); var isdataloaded = false; vm.predicate = 'order'; vm.reverse = fal

android - Handle multiple imgeview with single onclick (View view) method -

i create multiple imageviews programatically inflating 1 layout , set id imageview. these task perform in loop. want set on click listener on these programatically created imageviews. set onclick listener not working. my code:- mainlinearlayout.xml <?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/linear_layout_breakfast" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/colorlightwhiteshade" android:orientation="horizontal"> layout2.xml <?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:gravity="center" android:weightsum="10" android:padding="@dimen/margin_small" android:l

PHP Strict Standards: Only variables should be passed by reference -

this question has answer here: strict standards: variables should passed reference 6 answers i got thie warnig: php strict standards: variables should passed reference and code: if ((isset($_server['http_if_modified_since']) && array_shift(explode(';', $_server['http_if_modified_since'])) == $gmt_mtime) the second line code error one. first of need explode $_server['http_if_modified_since'] ";" , can use in array_shift function. <? $exploded = explode(";",$_server['http_if_modified_since']); if ((isset($_server['http_if_modified_since']) && array_shift($exploded) == $gmt_mtime)) ?> side note: don't know typo error or not, u need add 1 ending ")" in if condition otherwise parse error .

c# - How to stretch and extend a grid up to a parent margin -

Image
i have simple structure (semplification of more complicated one) made this: so xaml is: <grid > <grid.columndefinitions> <columndefinition width="auto" /> <columndefinition width="*" /> </grid.columndefinitions> <border x:name="border1tab3" borderbrush="gainsboro" borderthickness="5" width="200" margin="10,10,10,10" > </border> <border x:name="border2tab3" borderbrush="gainsboro" background="{x:null}" minwidth="100" borderthickness="5" grid.column="1" margin="10,10,10,10" > <stackpanel name="sptab3" margin="0" background="red" verticalalignment="stretch" horizontalalignment="stretch"> <------red <grid name="grd7tab3" visibility="visible" background="blue" showgridlines="true"

laravel 5 - How to use constants with Request in Laravel5 -

i trying upgrade laravel4 app laravel5. in laravel4 app, use app/config/constants.php file , difine constants using request class. if (request::is('admin/*')) { define('path', 'admin') }else { define('path', 'public') } and read in app/start.php . require __dir__.'/../app/config/constants.php'; these constants used in controllers, models, commands, views, , files in 'app/config' directory. in laravel5, how read file? i tried: 1, added in config directory , changed composer.json "autoload": { "files": [ "config/constants.php" ] } i got error: php fatal error: class 'request' not found 2, added in config directory , changed app/providers/appserviceprovider.php public function boot() { require __dir__.'/../config/constants.php'; } i got same error: php fatal error: class 'request' not found thanks, try \reque

javascript - Three.js Tube Geometry based on a custom geometry -

i've got set of lines vectors like: line1: [10,10,9,10,10] line2: [10,9,8,10,10] line3: [10,10,10,10,10] each value of represents measure of diameter of tube (of nominal diameter 10) @ different heights in tube, each line diameter @ different rotation. is: line1 diameter of tube @ 0 degrees, line2 diameter of tube @ 15 degrees, line3 diameter of tube @ 65 degrees the number of lines , rotations can vary, want visualise these lines tube (well, tube of partial measurements) in 3d using three.js. am best trying create custom geometry using many lines have create it, or can use tubegeometry attach lines onto? possible create tube based on these lines values between lines extrapolated? the end result i'm trying achieve 3d mesh can zoom in , out of. any thoughts or suggestions welcome!

javascript - ngChange for multiple ngModels -

is there way call function if 1 of multiple ngmodel values change, without adding $scope.$watch ? change this: <div> <input ng-model="value1" ng-change="update()"> <input ng-model="value2" ng-change="update()"> </div> to this: <div ng-changes="update()"> <input ng-model="value1" > <input ng-model="value2"> </div> inspired simple implementation of ngchange , can traverse child tree, collect ngmodelcontrollers , register callback in $viewchangelisteners . function ngchanges() { return { restrict: 'a', link: function(scope, element, attr) { array.prototype.foreach.call(element[0].queryselectorall("*"), function(e) { var ngmodel = angular.element(e).controller('ngmodel'); if (ngmodel) { ngmodel.$viewchangelisteners.push(function() {

javascript - Parse.com + Cloud code + Android + Stripe -

my parse cloud function after adding stripe custom js module parse is- main.js parse.cloud.define("createcustomer", function(request, response) { // var stripe = require("stripe"); var stripe = require("cloud/stripe.js")(kstripeprivatekey); // stripe.initialize(kstripeprivatekey); stripe.customers.create( { description : request.params.description }, { success: function(httpresponse) { console.log(httpresponse); response.success(httpresponse); }, error: func

qt - bluetooth receipt printer - cannot change codepage of printer -

i have following setup: workstation ubuntu 14.04.3 lts using kernel linux work002 3.19.0-47-generic #53~14.04.1-ubuntu smp mon jan 18 16:09:14 utc 2016 x86_64 x86_64 x86_64 gnu/linux qt 5.5.1 opensource 64bit some usb<-->bluetooth dongle, has been working fine bluetooth based noname 48mm receipt printer china, shipped me without documentation (assuming esc/pos command set ). now, setup seems (initial connection, pairing , once paired blue led diode turns on on printer) work because can print text on printer via qbluetoothsocket::write method: this->uebtprintersocket()->write(qbytearray("printer ready. @[\\]^`{|}~ ĐŠŽĆČđšžćč")); however, slovenia , need slovene letters, why put slovene letters upper write - ĐŠŽĆČđšžćč , chinese letters instead. therefore tried change printer code page according esc t n function , without success: qbytearray cmdchangecodepagetoslovene; // esc t n cmdchangecodepagetoslovene.resize(3); cmdchangecodepaget

string - Java: variable names for a directory path, naming variables in general -

i'm having difficulties decide how name file variable , string variable, both describe same directory. basically have string describing location of directory containing testcases. string want create file object. this: string testcasedirectorypathstring; file testcasedirectorypath = new file(testcasedirectorypathstring); what want achieve readability code, choosing variable names. i searched internet, end finding naming conventions in general , advice variable names should 'speaking'. my question specific examples, problem not string , file naming choosing variable names in general. so here questions: is practice add word 'string' string object? is practice add word 'path' file object? is matter of personal preference , there no practices? how name variabls , why? if there articles out there, appreciate pointing me them. it's opinion: is practice add word 'string' string object? no, doesn't contribute. m

Curl build with bash script -

i want create curl #!/bin/sh script , part giving me headache is: str="-xget -v -h 'authorization: bearer "$token"' https://my_endpoint/sth?" echo $str con="$(curl $str)" the echo there is: -xget -v -h 'authorization: bearer eyjhbgcioijsuzi1niisinr5cci6ikpxuyj9.eyjlehaioje0ntm5nzixodcsinvzzxjuyw1lijoid2luz3uty2xpzw50lwfkbwluqhnwzwljagvymjewlmnvbsisimlhdci6ije0ntm4odu3odcifq.adlcrv4yph6owwgmlak2rsnc95wk17ulflcisvnwbkea93g4wuq-bmrjnhqeuigsfxsynamgmi36ggc2pytwhkqk8liyrmjth80tggbycnnua2lm26iz2viumk1cj-bh3-dh4hmqsm_hozafnvqgqi9p5j4cbz8ecf_mkc3iq-7enxriktkgakf69-jpffa_9yo26jzzedpymowa-lrpafwptyinzmkauq2shjudwtgmelayzkguooxrz8tgvv9yeb-oneoy54grslb4ogvzawwcj2y6vxmvnpan5wiuzmylqtghnqfr9mop4jid1ravjwt7strp9bchbxd55ctyoeq-ospdv6wkgb07ctcri0spx9ervsab0xf1mh9xkavjoq_dnnpktxlqixmbbosxehjye9k6z30c3uwhcgccndeehxphi7d2bro3m_3fjpksywwk5dxhxmkfpj4flf05jo31ffioj8q7h3c5nevxvk_kes-jpy5ip5xry1dv9p8bwpewfk1-qqrxz1mmnildlxdb9cxe9tm6eo4rxo71h2o4z1dhmnvhh

matlab - How to optimize simulation time in Simulink -

Image
i working on simulation model in simulink, using "nn predictive controller" module. trying display output of nn controller in scope 2. as can see in picture have 2 signals workspace. both discrete signals (sampling frequency 360 hz) - both vectors of 3600 rows. in nn predictive controller have trained neural network signals of same size , set sampling interval 0.1. when run simulation runs approximately 10 hours. there way minimize simulation time without increasing sampling interval in nn controller? second question: why takes long? if need additional inforation model please let me know. thank you picture: use accelerator mode or rapid accelerator mode in sl. can switch mode in drop-down list normal selected. in accelerator mode part of modell compiled. in rapid accelerator mode additionally scopes deactivated. data evaluation need store workspace and/or file , analyse later. see: http://de.mathworks.com/help/simulink/ug/how-the-acceleratio

c# - Return specific type in generic method -

i have written following method: public t createpackage<t>() t : new() { var package = new t(); if (typeof(componentinformationpackage) == typeof(t)) { var compinfopackage = package componentinformationpackage; // ... return compinfopackage; } throw new system.notimplementedexception(); } i check type t , according treat variable package . when want return compiler error. "the type componentinformationpackage cannot implicitly converted t" how can solve problem? first: cast doesn't work, safe cast does work: return compinfopackage t; ...provided there's class constraint on t : public static t createpackage<t>() t : class, new() { ... } second: given code: var package = new t(); if (typeof(componentinformationpackage) == typeof(t)) { var compinfopackage = package componentinformationpackage; // ... return (t)compinfopackage; }

html - How to make radiobutton and checkbox displays like they do as in IE8 -

Image
in ie11, checkbox , listbox displayd default : <html> <body> <input type="radio" /> <input type="checkbox" /> <input type="radio" /> </body> </html> can make them display in ie8 adding custom style css : p/s : notice in ie8, when hover on checkbox, there events make checkbox change little different know mouse pointer on control, in ie11 nothing happens when hove cursor on checkbox, can make happen in ie11 too? sorry not possible on these elements. have use element mimic look, perhaps scrolling actual element off page , using label attribute click event.

c# - Proper way to sync a wpf progress bar with function from a library -

so have function (from library) works big word files. can't make changes on function. while processing, want show progress bar, because either way app looks frozen , users not aware it's working. i'm using worker this: private void btnclick(object sender, routedeventargs e) { backgroundworker worker = new backgroundworker(); worker.runworkercompleted += worker_runworkercompleted; worker.workerreportsprogress = true; worker.dowork += worker_doconvertone; worker.progresschanged += worker_progresschanged; worker.runworkerasync(); } private void worker_doconvertone(object sender, doworkeventargs e) { var worker = sender backgroundworker; //the progress bar filled on 20% worker.reportprogress(0); worker.reportprogress(10); worker.reportprogress(20); //processing mylonglastingfunction(bigwordfile); //the progress bas full worker.reportprogress(100, "done processing.");

internet explorer - javascript and class class=input-range doesn't work in ie -

i having issue simple javascript not working in ie. code here: <script> function test(){ var mydivelem = document.getelementbyid("mydiv"); var sizerange= document.getelementbyid("sizeid"); mydivelem.innerhtml = sizerange.value; } </script> <div> <p> <form action="url-link-here" method="post"> <span id="mydiv">100</span> <input class="input-range" id="sizeid" oninput="test()" type="range" name="size" value="100" min="5" max="250" step ="5"> it works fine in other browsers. use onchange instead of oninput . worked in ie11 function test() { var mydivelem = document.getelementbyid("mydiv"); var sizerange = document.getelementbyid("sizeid"); mydivelem.innerhtml = sizerange.value; } <form action="url-link-here" me

c# - .net Compare two DataTable, find modified, added and deleted rows -

i have datatable holds rows modified user ui. after user save changes want check if rows added, deleted or modified , return them. //dtlast - datatable loaded on open //dtcurrent - datatable loaded on save datatable dtchanges = null; dtlast.merge(dtcurrent, true); dtchanges = dtlast.getchanges(); return dtchanges; //return rows added, deleted, modified that not work. idea wrong? ////////////////////////////////////////////// with msdn code wrote this: using system; using system.collections.generic; using system.data; using system.linq; using system.text; using system.threading.tasks; namespace consoleapplication1 { class program { static void main(string[] args) { demonstratemergetable(); } private static void demonstratemergetable() { // create new datatable. datatable table1 = new datatable("items"); // add 2 columns table: datacolumn column = new datacolumn("id", typeof(system.int32))

How to call a jQuery DataTable object in an iframe? -

i have initialized jquery datatable in iframe, if try run function in iframe on same domain reinitializes datatable instead of using existing one. how can fix this? my code in js file of iframe: $(document).ready(function(){ listtable.initdatatables(); }); var listtable = { initdatatables: function() { $.each($('.datatable'), function(){ var jqtable = $(this); // define columns var columns = []; var columnheadings = jqtable.find('thead > tr:eq(1) > th'); $.each(columnheadings, function(){ var code = $(this).attr('data-code'); var column = { data: code, defaultcontent: '' }; columns.push(column); }); // initiate table var datatable = jqtable.datatable({ 'ajax': { 'url': '/get-data', 'type' : 

kml - Showing NOAA ENC Charts on Google Maps -

i invested in project implement marine charts , maps our custom google maps application. however, quite unsure of how go doing this. use noaa enc data here: http://www.charts.noaa.gov/encs/encs.shtml what use data display charts on google maps. have ideas/tips/insight on how this? apparently there open-source reader plugs common utility (ogr2ogr) allows convert data shapefile format: http://home.gdal.org/projects/s57/ once data shapefile format, turning tiles well-understood problem. here 1 blog posting of 1 way did it: http://jongyulin.com/2009/05/getting-started-with-map-tiling-mapnik-and-shapefiles/

javascript - Angular Material input not showing value when not focused -

i'm using angular material 1.0.3 , <input> elements correctly set values visible if click 1 focus it. once it's not focused can't see value. the markup follows: <md-input-container> <label>some label</label> <input ng-model="model.someproperty"> </md-input-container> after checking if it's css issue, i've found following css selector turning color transparent : md-input-container:not(.md-input-has-value) input:not(:focus) { color: transparent; } and obviously, seems input doesn't have .md-input-has-value css class. for now, can't figure out what's going wrong. additional info in case, in opposite of angular material demos, controllers on directives , ui router states. in fact, can confirm i've copy-pasted same markup in index.html direct child of <body> , works expected. maybe has relation open issue: compiling material directives on fly: md-input-has-value

android - How to prevent EventBus from delivering event to wrong Activity -

suppose our app has 3 activities: a, b , c. , registered eventbus @ onstart() , unregistered @ onstop() explained here , , has event handler method: onevent(x event){...} navigates user c upon receiving of event x. but see below unhappy scenario: user launches a. user starts background operation on a. user navigates b tapping button on without waiting background operation completed. unregistered eventbus. user navigates a. registered eventbus again. the background operation requested before user navigated b completed, event x fired background. event x delivered a, , event handler ( onevent(x event){...} ) navigates user activity c immediately. this weird user experience, how can avoid event delivered when registered again? one solution cancel ongoing background operations @ onstop() , event never fired; however, cancelling background operation may not possible. i using eventbus of greenrobot. you can use counter bus for example have static int field

ios - UISearchController search bar shifting down when presented -

Image
issue: searchbar shifts down when presented. before presented, bar right below navigation bar. more info: the navigation bar uinavigationbar that's manually added uiviewcontroller through storyboard most importantly, uiviewcontroller uses uipresentationcontroller create effect presented vc offset top , presenting vc scaled down , "behind" presented vc. shift not happen if don't use uipresentationcontroller. searchcontroller.hidesnavigationbarduringpresentation = no any ideas? self.definespresentationcontext = yes; or self.edgesforextendedlayout = uirectedgenone; on side not better add searchbar header of tableview.

c++ - Error: Assigning to an array from an initializer list -

i have class such as: class dialog { public: double dreturntype[][5][3]; };   #include <cstdlib> #include <iostream> include <string> using namespace std; #include "dialog.h"; int main(int argc, char *argv[]) { dialog people; people.dreturntype[0][1] = {1.2,2.3,6.6}; return 0; } it returns: [warning] extended initializer lists available -std=c++11 or -std=gnu11 [enabled default] [error]: assigning array initializer list i've looked online bit , couldn't find way around this. i'd prefer not editing class within it's on class file (kinda defeats purpose). help? note: class in separate project file initializer lists usable during initialization. if want use std::initializer_list after initialization: auto init = std::initializer_list<double>({1.2,2.3,6.6}); std::copy(init.begin(), init.end(), your_array);

Do i have to write Activators to implement/deploy OSGi JAX-RS bundle as Declarative Services (BluePrint) to IBM Liberty -

i new osgi , attempting investigate osgi jax-rs bundles my target runtime ibm liberty (wlp-beta-osgi-2016.1.0.0) i jax-rs bundle started/loaded automatically , had thought can achieved using decalaritve services. i not want have develop activators each of jax-rs services, example code have found seems overly complicated , have 100 individual jax-rs services required. i using eclispe wdt (wdt-update-site_8.5.5.8.v20151130_1844) supports osgi bundles , allows me create blueprint file each bundle my issue cannot discover away have jaxrs bundle start can pure java bundles execute jaxrs bundles never become active , cannot seem find logs triuble shoot issue. is attempting achieve not possible? how deploying jar-rs bundles liberty? deploy liberty, should create osgi application (eba). bundles installed part of osgi application should automatically started.

Python bokeh figure quad categorical x-axis does not plot if strings present -

i have dataframe 2 columns: x_att1 , y_att1 . y_att1 contains int or float. if x_att1 contains numbers string can plot y_att1 . if x_att1 contains strings nothing plotted. don't know why. bug or feature? use bokeh 0.10.0 code 1 numbers string @ x_att1 (works): from bokeh.plotting import figure, output_file, show bokeh.models import linearaxis, range1d import pandas pd output_file("bars.html") df = pd.dataframe() df['y_att1'] = [0.70,0.68,0.50,0.48,0.30,0.28] df['x_att1'] = ['0','4','2','7','3','1'] p = figure(title="twin y-axis bar example", x_range=df['x_att1'].values.tolist()) p.quad(bottom=0, top=df['y_att1'], left=df['x_att1'].values.tolist() , right=df['x_att1'].values.tolist(), line_width=7, line_color='red') p.yaxis.axis_label = 'left y axis' p.yaxis.axis_label_text_color = 'red' p.xaxis.axis_label = 'x axis

Verifying Dropdown options my script is throwing an error pls help Webdriver and C# -

verifying dropdown options script throwing error pls webdriver , c# two errors returned ; expected on options ( for(iwebelement title:options)) public void verifydropdownoptions() { string[] sysviews = { "--select view--", "contacts being followed", "contact follow", "contacts: no campaign activities in last 3 months", "contacts: responded campaigns in last 6 months", "inactive contacts","my connections" }; iwebelement dropdown = findelement(by.id("crmgrid_savednewqueryselector")); selectelement select = new selectelement(dropdown); list<iwebelement> options = select.getoptions(); // list<iwebelement> options = select.findelements(by.linktext("title")); int sysoptions = sysviews.length; for(iwebelement title:options) { boolean match = false; (int i=0; < sysoptions; i++) { if (t

android - Audio Recorder Error -

i trying make voice recorder .when clicking on record button gives error fatal exception: main process: rishabh.agarwal.holmes.recorder, pid: 22175 java.lang.illegalstateexception @ android.media.mediarecorder.setoutputformat(native method) @ rishabh.agarwal.holmes.recorder.mainactivity$2.onclick(mainactivity.java:47) this code public class mainactivity extends appcompatactivity { button btnplay,btnrec,btnstop; mediarecorder mr; string fname; @override protected void oncreate(bundle savedinstancestate) { // todo auto-generated method stub super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); fname=environment.getexternalstoragedirectory()+"/myrec1.3gp"; btnplay=(button)findviewbyid(r.id.button1); btnrec=(