Posts

Showing posts from July, 2010

xcode - Unable to install AppStore version directly to mobile device when using an iOS App Extension -

at our company process execute is: fix/implement test ad-hoc version create appstore package test appstore package installing directly through itunes. submit version appstore. the reason why need test appstore version because payment services wouldn't work if didn't. need real environment. previously inclusion of ios app extension (sharing) process without issues, after doing same process can't anymore. we can; test ad-hoc version signing app extension ad-hoc. create , submit app store package. however can't install app store version anymore, error mentions there issues signature, more precisely: (entitlements found not permitted provisioning profile) does have idea why happening?. you shouldn't able install app store version on physical device , run it. it can work in scenarios (like if had installed development builds on there , there valid development build on device when try run app store build). maybe device has old app

java - Spring Data: string lookup in complex object -

i have following pojo object: public class address { private string country; private string city; private string street; private string building; private string room; } and following mongo entity: @document(collection = "corporatetransport") public class corporatetransport { @id private string id; private address from; private address to; } also have repository: public interface corporatetransportrepository extends crudrepository<corporatetransport, string> { } i find corporatetransport documents address country 'republic'. how can it? should write @query or crudrepository can handle it? you dont need @query annotation @ all. try example: public interface corporatetransportrepository extends crudrepository<corporatetransport, string> { list<corporatetransport> findbyfrom_countrycontainingignorecaseorto_countrycontainingignorecase(string country); }

Laravel 5.3 sometimes return different 404 page -

Image
i'm trying understand why 404 page not loading if try go under public folders. when i'm trying go assets folder. i'm getting 404 page. make sure views placed inside resources/view folder. when run laravel in local pc or server, run administrative privileges (not must thing) sudo php -s localhost:8888 -t public this use in linux. think missing here.

multilanguage - Multi-language support without altering database structure -

i have question regarding support languages on website. what best way structure database, while using multiple languages? example, while creating database schema has agenda table, news table , products table. of these components have description , title. the structure be: agenda (id, title, description) news (id, title, description) products (id, title, description) normally, create languages table. every aforementioned table column; language_id. that means every translation of record gets inserted again, using different id. advantage of method can add multiple languages , without altering database (you can add new row in newly created language table, , insert corresponding language_id in news/agenda/products table). know aware of fact cumbersome. rows have same content - in different translation - have no way of knowing same. i have seen many approaches, using 'translation' table. you'd news_translation, products_translation , agenda_translation. is

angular - initialize veriables inside subscribe always undefined angular2 rxjs -

i new angular2 typescript , rxjs , observables . i trying information api using code let alertsanswer = this.logservice.getalertsforclient(this.userid); var = alertsanswer.subscribe((response) => { this.alerts=json.parse(response) console.log(this.alerts) //give right response. }, error => { var err = error; alert(err); } ) as can see inside subscribe initialize private variable: "this.alerts" outside subscribe variable has undefined value console.log(this.alerts) //give undefined. using this.alert in component doom undefined give error: <div>{{alerts}}</div> first question: why ""this.alerts inside subscribe give right value console outside (including doom) undefined. second question: understand the value coming server async, if have further code relay on answer write it(callback), inside subscribe? meaning of subscribe? help for first question, this.alerts right value

php - jquery ajax file upload with progressbar uploading same file multiple times -

i creating media-bank user can upload media files , can reuse later image,audio , videos can uploaded following options image upload pc, specify link audio upload pc, specify link video upload pc, youtube url, facebook embed code separate forms created in tabbed layout class="formupload" upload pc forms has <input type="file" name="file".../> while other forms has <textarea name="file" ...> my database table looks like [id, file, type, src,...] [1, pic.png, image, pc,...] [2, http://domin/img.png, image, link,...] $('body').on('submit','.formupload',function(e){ e.preventdefault(); var pr = $(this).parents('.tabpanes').find('.progressbar'); var lbl = $(this).parents('.tabpanes').find('.percentlabel'); var url = $(this).attr('action'); va

mux - VHDL: muxes between 11 buses 8 bits wide output -

i recieved question pre interview question "draw diagram , write vhdl code module meets following requirements: a. synchronous. b. muxes between 11 buses each bus 8-bits wide. c. has 2 cycles of latency. d. optimized maximum clock frequency." ive been trying myself reading old notes , assignments have done in university don't think i'm on right track this. have code soo far posted below: library ieee; use ieee.std_logic_1164.all; entity mux port( a: in std_logic_vector(7 downto 0); b: in std_logic_vector(7 downto 0); c: in std_logic_vector(7 downto 0); d: in std_logic_vector(7 downto 0); e: in std_logic_vector(7 downto 0); f: in std_logic_vector(7 downto 0); g: in std_logic_vector(7 downto 0); h: in std_logic_vector(7 downto 0); i: in std_logic_vector(7 downto 0); j: in std_logic_vector(7 downto 0); k: in std_logic_vector(7 downto 0); s0: in std_logic_vector(3 downto 0); z: out std_logic_vector(7 downto 0) ); end mux; arc

xsd - Unsupported binding namespace exception for vendor specific namespace -

i have vendor.xsd, namespace definition referencing vendor specific namespace http://vendor.com/xjc-plugins . snippet given below: ... <xs:schema xmlns:xs="http://www.w3.org/2001/xmlschema" xmlns:common="http://annox.dev.java.net" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:vendor="http://vendor.com/xjc-plugins" elementformdefault="qualified" jaxb:extensionbindingprefixes="vendor common" jaxb:version="2.0"> ... xs:complextype name="vendortype"> <xs:annotation> <xs:appinfo> <vendor:package>vendor.package</vendor:package> </xs:appinfo> </xs:annotation> ... when try generate jaxbs using either xjc command line or maven-jaxb22-plugin following exception occurs: unsupported binding namespace "http://vendor.com/xjc-plugins". perhaps meant "http://annox.dev.java.net"? the maven plugin using

signal processing - R - Train a HMM model with multiple observations -

i need train hmm multiple observation sequences. i'm using hmm package both baum-welch , viterbitraining algorithms can work 1 observation sequence. the common thing have set of observations, possible train hmm using multiple observation in package. i found library: mhsmm, i'm not sure how work.

javascript - Change stroke width of a svg image with click function jquery -

i want increase stroke width of svg image 0.5 when user clicks on button. have click function already, not sure how function work increase stroke width. function pipescalefactorplus(){ $(".pipe").style("stroke-width", "+=0.5"); drawmappipes(); } .pipe svg class , drawmappipes(); called redraw svg image. assuming using normal jquery only. here how can adjust stroke width. note have little modify svg properties because have names differ style property names. for example, attribute named stroke-width , style property strokewidth . $("button").click(function(evt) { var myline = $("line"); // current stroke-width. // try getting style object first. otherwise direct // attribute value. // use parseint() strip off units ("20px" -> 20) var currentwidth = parseint(myline.css("strokewidth") || myline.attr("stroke-width"), 10); // update style property &q

Why doesn't grails maven-deploy install to local cache? -

i using grails version 2.4.4 , release plugin version 3.0.1. seeing issue maven-deploy when trying put packaged plugin private remote repository. command errors when trying transfer file local maven cache. can see error message: |plugin packaged grails-my-plugin-0.17.9-snapshot.zip |generating pom file... .......................................................................................................................... |pom generated: /path/to/pom/pom.xml |using configured username , password grails.project.repos.myplugins ....error | error deploying artifact: error deploying artifact 'org.grails.plugins:my-plugin:zip': error retrieving previous build number artifact 'org.grails.plugins:my-plugin:zip': repository metadata for: 'snapshot org.grails.plugins:my-plugin:0.17.9-snapshot' not retrieved repository: myplugins due error: transfer of resource /path/to/cache/.m2/repository/org/grails/plugins/my-plugin/0.17.9-snapshot/maven-metadata-myplugins.x

css - Wrapping Items in Bootstrap -

i have web page uses bootstrap 3. in web page, i'm displaying list of variable number of items. want layout items horizontally , wrap next line if item goes past width of item-container . currently, have following . in code, have: <div class="container"> <div class="item-wrapper"> <div class="item"></div> <div class="item"></div> <div class="item"></div> <div class="item"></div> <div class="item"></div> <div class="item"></div> <div class="item"></div> <div class="item"></div> <div class="item"></div> <div class="item"></div> <div class="item"></div> <div class="item"></div> <div class="item"></div> <d

javascript - WebSocket binary transmission returns more data than server sent -

i have issue receiving binary data on websocket number of bytes received browser (in form of arraybuffer, in javascript) higher server sent, though chrome or firefox report correctly how many bytes transmitted on wire. the server side node js, , have used 3 different packages (ws, nodejs-websocket , websocket) , behave same. it's issue in javascript running in browser. my code on client side looks this: 1: var socket = new websocket(url); 2: socket.binarytype = 'arraybuffer'; 3: socket.onmessage = function(event) { 4: var buffer = new uint8array(event.data); 5: // consume buffer 6: } the problem if examine length of "buffer" (after line 4), it's higher data sent server. for example, if server sends binary content, 8 bytes: 0xa1 0xb2 0xc3 0xd4 0xa1 0xb2 0xc3 0xd4 on client side, see: 0xc2 0xa1 0xc2 0xb2 0xc3 0x83 0xc3 0x94 0xc2 0xa1 0xc2 0xb2 0xc3 0x83 0xc3 0x94 update: after further examination, believe has word alignment of data

sql - Cache Dynamic Query PHP + BigQuery -

i have database in google bigquery million of rows (more 2 million new rows every day) contains of user activities i create php program insight database many queries show statistic of data per day, per hour , many more i have 2 cases 2 problem: i try find data of user activities in date between 2016-11-01 , 2016-11-10, , need break down data 2016-11-05 data (the data subset of queries result). data need clasify per day or per hour or per user type , many more. right use many queries in database group data , many data manipulation. example "select * user_activities date>='2016-11-01' , date<='2016-11-10' group date,hour" , when need break down data in 2016-11-05 re-run query: "select * user_activities date='2016-11-05' group date,hour" or need query data different parameter, example user activities between 2016-11-01 , 2016-11-10 contains activities "a", , need change witch activities "b". have column iden

hoisting - Javascript function called too soon -

this question has answer here: how image size (height & width) using javascript? 23 answers i'm having problem javascript function apparently gets called soon. have hunch hoisting problem, i'm not sure. so, have function assigned onclick of <img> : function setmodalpicture(picname){ //build path picture var pic= 'assets/img/art/'+picname; //set picture $('#g-modal-img').attr('src', pic); adjustmodalpadding(); } the intention src attribute of #g-modal-img should set img , , should adjustmodalpadding called. because adjustmodalpadding needs height of #g-modal-img , 0 before src set <img> . however, noticed doesn't work properly, , if make adjustmodalpaddin g log height of #g-modal-img console, shows zero. think means function called

javascript - Alternative to "async: false" for successive AJAX calls -

i using 2 ajax get requests grab data 2 different sources. in each request parse response data, create temporary array relevant data each item, , push temporary array master array. however, works if include "async: false" in ajax request, deprecated. there alternative way write code? (note: although using 2 ajax requests in code snippet, need use total of 4 in project working on). function get_results() { $(document).ready(function() { var master_array = []; $.ajax({ type: "get", url: "http//:www.source1.com", datatype: "xml", async: false, success: function(xml) { $(xml).find('product').each(function() { var average = $(this).find('average').text(); var price = $(this).find('price').text(); var name = $(this).find('name').text(); var url = $(this).find('url').text(); var image = $(this).find('i

javascript - Preloaded radio button in Jquery -

i trying have 1 of 3 radio buttons checked, when page loads , if happen, want make actions there java code if (variable.equals("d")) { top.setvariable("{vara}", "checked='checked'"); }else if (variable.equals("r")) { top.setvariable("{varb}", "checked='checked'"); }else if (variable.equals("a")) { top.setvariable("{varc}", "checked='checked'"); } and then, html code <input name="radio" type="radio" value="d"" {vara}/> <input name="radio" type="radio" value="r"" {varb}/> <input name="radio" type="radio" value="a"" {varc}/> i want have when of radio button checked, hide or show part of pages when page loads; similar this if($j("input[name='radio'][value='d']").attr('checked','checked')) {

Java program shortestpath orientdb -

Image
i have code in java program. have built graph, call , want calculate shortest path nothing. want result in java console. can me please..... orientgraphfactory factory = new orientgraphfactory("plocal:db_path", "admin", "admin"); orientgraph db = factory.gettx(); ( int i=0; i<=number_nodes; i++){ for(int j=0; j<=number_nodes;j++) { (vertex v : db.getvertices("vertexid", i)) { (vertex v1 : db.getvertices("vertexid", j)) { (edge e : db.getedges()) { if (e.getvertex(direction.in).equals(v)) { if (e.getvertex(direction.out).equals(v1)){ string query = "select expand(shortestpath("+v+","+v1+",'out') "; iterable<orientvertex> res = db.command(new ocommandsql(query)).execute(); whi

javascript - Merging duplicate objects with same id into single object from json data using angular js -

i json data api call errors list of various items id, name, error_type , message. need display header name , id of item , under list of errors belonging id. using unique filter in angular skipping next object same id. want merge object property when id same. var items =[ { "id": 83739, "name": "abcd", "type": "error", "msg": "for macros, x >= y" }, { "id": 83739, "name": "abcd", "type": "warning", "msg": "missing power condition" },{ "id": 83740, "name": "efgh", "type": "error", "msg": "missing power supply" }] <div ng-repeat="item in items | unique:'id'"> <h4><a href="#/product/item/{{item.id}}"> {{io.item}}</a></h4> <ul> <

outsourcing strtok() in function in c -

i want outsource string operation function , ask results in main. doesn't work, , don't understand why. #include <stdio.h> #include <string.h> void splitrequest(char request[], char method[], char ressource[], char proto[]) { method = strtok(request, " "); ressource = strtok(null, " "); proto = strtok(null, " "); printf("\nresult:\n\nmethod:\t\t%s\nressource:\t%s\nproto:\t\t%s\n",method,ressource,proto); } int main() { char method[50], ressource[50], proto[50], request[50]; memset(method, '\0', 50); memset(ressource, '\0', 50); memset(proto, '\0', 50); memset(request, '\0', 50); strcpy(request,"get /index.htm http/1.1"); //rehash query splitrequest(request, method, ressource, proto); //check results printf("\nresult:\n\nmethod:\t\t%s\nressource:\t%s\nproto:\t\t%s\n",method,ressource,proto); return 0;

How to download Video URLString from Firebase Database not Storage in Swift -

i have been looking everywhere how videos urlstring out of firebase tree structure can’t find anywhere. seems showing how play directly firebase storage. have created urlstring in tree node in firebase database points video in storage. i’m trying urlstring of highlightvideo tree. here’s i’m code: private func setupplayerview() { firdatabase.database().reference().child("users").child(firauth.auth()!.currentuser!.uid).observeeventtype(.childadded, withblock: { (snapshot) in guard let dictionary = snapshot.value as? [string: string] else { return} let urlstring = dictionary["highlightvideo"] }, withcancelblock: nil) if let url = nsurl(string: urlstring) { ---code breaks on urlstring player = avplayer(url: url) let playerlayer = avplayerlayer(player: player) videoview.layer.addsublayer(playerlayer) playerlayer.frame = cgrect(x: 0, y: 0, width: frame.width, height: frame.width * (9/16))

visual studio - Pass msbuild properties to devenv.exe on the command line -

i building solution automatically devenv.exe on our ci server, works totally fine. deployment purposes added nuget package (namely octopack). documentation tells me pass properties msbuild when building, using devenv, not possible. through research, learned can add propertygroup the .csproj of project, add these properties. prefer not that, need replace values (like version number) in properties, not want put placeholders strings. additionally, need able have propertygroups active when building on ci server, not when developing , building locally. this leads question: can somehow pass properties, passed msbuild (via /p: ), devenv on command line? (i'm posting answer question can closed out). i'd suggest not using devenv.exe. start using msbuild.exe. pass in parameters using /property:name=value /p:name=value use nuget.exe restore mysolution.sln restore packages.

ionic2 - Angular 2 /Ionic 2 undefined property causes template to not refresh -

i got done trying fix below issue 4 hours. <ion-card *ngif="user"> <ion-item> <h2>{{user.firstname}}!</h2> <p>{{user.company.name}}</p> </ion-item> </ion-card> <some-other-component></some-other-component> user = { firstname: 'nick' }; notice user.company not set. entire component stopped working. not ion-card , some-other-component rendered once , stopped updating. responding click events, never updating. my question is: there way force angular / ionic display failed render versus failing? my fix to: <p>{{user?.company?.name}}</p> it's scary me going have check every object property existence. i'm wondering if there need set/configure in order change how behaves. desired outcome either console error, or render angular 1.x did. no, there no setting force rendering on runtime errors. have check assignment '?' or

c++ - Fast data structure or algorithm to find mean of each pixel in a stack of images -

i have stack of images in want calculate mean of each pixel down stack. for example, let (x_n,y_n) (x,y) pixel in nth image. thus, mean of pixel (x,y) 3 images in image stack is: mean-of-(x,y) = (1/3) * ((x_1,y_1) + (x_2,y_2) + (x_3,y_3)) my first thought load pixel intensities each image data structure single linear buffer so: |all pixels image 1| pixels image 2| pixels image 3| to find sum of pixel down image stack, perform series of nested loops so: for(int col=0; col<img_cols; col++) { for(int row=0; row<img_rows; row++) { for(int img=0; img<num_of_images; img++) { sum_of_px += px_buffer[(img*img_rows*img_cols)+col*img_rows+row]; } } } basically img*img_rows*img_cols gives buffer element of first pixel in nth image , col*img_rows+row gives (x,y) pixel want find each n image in stack. is there data structure or algorithm me sum pixel intensities down image stack faster , more organized current impleme

Understanding android navigation drawer and fragments -

i'm quite new drawer material , have trouble understanding things: need create activity fragment on it. different selections on drawer must replace current fragment one, drawer in fragment or 1 activity itself. more drawer living in fragment , if not possible create in fragment . asking cause see when initiating drawer need fill parent activity. when tried use navigation drawer template in android studio didn't had use fragment checkbox. there many ways achieve want. think simplest way is: 1) drawerlayout view should reside in activity (probably base layout). 2) when click on item in draw 2 things happen: the fragment replaced (you have 1 layout contain fragment , replace fragment in it). the items inside drawer update (if making list set data , call notifydatasetchanged() . don't forget save state can recover in case activity recreated.

scala - Play 2.5 preserve context in async calls -

in our controller class reach out service data : future<jsonnode> futuresite = someclient.getsite(siteid, queryparams); return futureconverters.tojava(futuresite).thenapplyasync((sitejson) -> { site site = json.fromjson(sitejson, site.class); try { return function.apply(site); } catch (requestexception e) { return e.result; } }).exceptionally(throwable -> { if(throwable instanceof ourclientexception) { if(((ourclientexception) throwable).httpstatuscode == 404) { return entitynotfound("site", siteid); } } return null; }); what notice context set in unit tests (we use scalatest-play) lost , becomes null after make async call (futureconverters.tojava(futuresite).thenapplyasync((sitejson) , t on separate thread. which causes problem down in controller code, use above function ... request() throw runtime exception saying there no context available. how can preserve context ? yo

excel - Activate form button subject to some condition -

i using form 2 combo-boxes , button. want button disabled , should enable when user selects valid value in both combo-boxes. i tried disable button using form initialize sub-routine button appears active. can issue? how enable button using if conditions? private sub userform1_initialize() me.shapes("buttonname1").controlformat.enabled = false activesheet.shapes("buttonname1").font.colorindex = 16 end sub you made couple of mistakes in code. userform1_initialize should userform_initialize you can use userform.buttonname1 access properties of button use textframe.characters.font.colorindex access text on button on worksheet code below should work private sub userform_initialize() userform1.buttonname1.enabled = false activesheet.shapes("buttonname1").textframe.characters.font.colorindex = 16 end sub

javascript - anyway to check that a img tag is broken or 404'd; without add'l network request -

i using casperjs scrape items, can't on page enough add load , error events on img tags. prefer not have new xhr request each image determine it's validity. is there way select image tag , determine if there image there or if not in alt text displayed? js only, after page loaded. this not duplicate. asking if there way without network request. other questions have answers require creating new image new source , network request. / edit specifically looking asserting if image loaded after complete ( document.queryselector('#myimage').complete // returns true : no new network request (includes creating new image new source) no onload/onerror events (requires doing before page loaded) assert #myimage broken without above i don't know how use , here code snippet w3schools. <!doctype html> <html> <body> <p>this example uses html dom assign "onerror" event img element.</p> <img i

Enable WebGL support for Firefox running headless on Ubuntu -

how can enable webgl support firefox running headless on ubuntu 16 server? firefox headless , there no gui see going on. suggestions appreciated! i tried installing sudo apt-get install libosmesa6 but think i'm missing step

java - Mocking and verifying SLF4J with JMockit -

i have class slf4j logger instanced like: public class myclass { private static final logger log = loggerfactory.getlogger(myclass.class); public void foo() { log.warn("my warn"); } } and need test jmockit like: @test public void shouldlogwarn(@mocked logger log) throws exception { new expectations() {{ log.warn(anystring); }}; myclass = new myclass(); my.foo(); } after searching lot figured out, need use mockup somehow. can't how exactly. btw, i'm using last version of jmockit(1.29) no more can setfield(log) final static fields. jmockit has @capturing annotation works situation. indicates mock field or mock parameter classes extending/implementing mocked type mocked. future instances of capturing mocked type (ie, instances created sometime later during test) become associated mock field/parameter. when recording or verifying expectations on mock field/parameter, these associated instance

Moodle - Insert html in between form fields -

scenario:- in moodle have form created uses $mform->addelement('hidden', 'category', $category->id); to insert fields form. i want insert table in middle of form. for example. have form fields user name, emp code , contact number. want insert table between emp code , contact name. table have data user has inputted. i have way insert table @ end of page using :- echo $output->header(); echo $output->heading($pagedesc); $table = new html_table(); $table->head = array('name', 'emp code','contact number'); echo html_writer::start_tag('div', array('class'=>'no-overflow')); echo html_writer::table($table); echo html_writer::end_tag('div'); echo $output->footer(); please suggest way insert table in middle of form. you can add html form element - https://docs.moodle.org/dev/lib/formslib.php_form_definition#html $mform->addelement('html', $output);

backwards compatibility - Image alternate text for html 1 -

is possible use alternate text in <img> tag in html in way compatible html 1(ignoring tags doesn't understand). <img src="image_source" alt="alt text"> alt text </img> valid? more importantly, display correctly? i figured out. <img src="image_source" alt="alt text" /> <!-- >alt text < --> works. space between <!-- , >, , < , --> internet explorer doesn't think broken conditional comments , try display alt text. a modern browser sees same thing as: <img src="image_source" alt="alt text" /> <!-- comment --> old(html 1) browsers see: <busted_tag busted_atribut="broken" bad_atribute="busted"> <bad_tag>alt text<broken_tag>

html - Image will not fix center on tablet screen sizes and smaller -

i attempting fix personal website project have image refuses centered on mobile/tablet screen sizes. have tried manner of custom css no avail.i have quite few media queries @ different sizes, can't find conflicting styles.i using bootstrap framework on project. website here . here html <div class="about"> <a name="abouty"></a> <h1 class="text-center">about</h1> <p class="text-center" id="myth">the man...the myth...the legend</p> <article> <div class="img-wrap"> <img id="pic" src=" http://goodedevelopment.com/images/selfie.jpg" alt="a picture of myself,one handsome devil"> </div> <p class="bio"> kyle goode young, caffeine dependent, nashville local. went school in small town west of nashville met , married high school sweetheart. in small town

apache - PHP/5.3.10-1ubuntu3.2 5 with Suhosin-Patch configured -- resuming normal operations -

i running web application in apache , getting following error. more /var/log/apache2/error.log apache/2.2.22 (ubuntu) php/5.3.10-1ubuntu3.2 5 suhosin-patch configured -- resuming normal operations how can fix issue?

Producing a Java-formated matrix in MATLAB -

i have code in matlab gives me matrix @ end. need take matrix java , use there, when matrix big, hard rewrite element element in java. wrote code in matlab: function javamatrix = generatejavaformatedmatrix(matrix, name) i=1:size(matrix,1) j=1:size(matrix,2) javamatrix(i,j) = char([name '[' num2str(i-1) ']' '[' num2str(j-1) ']=' num2str(matrix(i,j)) ';' ' ']) end end end which expect trick me, , need copy array , paste in java. example, want above code when write following command: java_matrix = generatejavaformatedmatrix(eye(3),'a') is following a[0][0]=1; a[0][1]=0; a[0][2]=0; a[1][0]=0; a[1][1]=1; a[1][2]=0; a[2][0]=0; a[2][1]=0; a[2][2]=1; however, getting following error: subscripted assignment dimension mismatch. error in generatejavaformatedmatrix (line 5) javamatrix(i,j) = char([name '[' num2str(i-1) ']' '[' num2str(j-1) ']='

rpm - How to install older package of ansible? -

i need install ansible 2.1.0.0-1.el7 . setup not work newest version of ansible installed with: yum -y --enablerepo=epel install ansible this gave me ansible-2.2.0.0-3.el7.noarch . tried list older versions not find them: # yum -y --enablerepo=epel --showduplicates list ansible failed set locale, defaulting c loaded plugins: fastestmirror loading mirror speeds cached hostfile * base: mirror2.hs-esslingen.de * epel: epel.mirrors.ovh.net * extras: it.centos.contactlab.it * updates: mirror.netcologne.de available packages ansible.noarch 2.2.0.0-3.el7 epel this site found multiple versions don't know how install it. can me install ansible version need? you should install python pip. sudo yum install python-pip python-devel python and then: sudo pip install pip --upgrade sudo pip install ansible==2.1.0.0 and should able use: ansible-playbook ... if don't manage install pip command gave you, hav

MySQL Mirroring or Triggers for duplicating data -

i developing php/javascript application access data saved application. cannot connect database cause of possible slowdown induced in mysql engine. evaluating possibilities instead of direct database connection. question better, complete mysql mirroring against on every create, update or delete launch trigger copy operation on second database? it not important difficult or quantity of work, important final performance.

c - Warning for struct padding in Clang -

i created following structure: typedef struct s_fct_printf { char flag; void (*fct)(void*); } t_fct_printf; static const t_fct_printf flags[] = { { 's', my_putstr_printf }, //[...] { 'b', display_base_2 }, }; but when compile clang -weverything, have following warning: warning: padding struct 'struct s_fct_printf' 7 bytes align 'fct' [-wpadded] i found following solution : typedef struct s_fct_printf { char flag; void (*fct)(void*); char pad[7]; } t_fct_printf; but it's not solving problem: warning: missing field 'pad' initializer [-wmissing-field-initializers] { 'b', display_base_2 }, warning: padding struct 'struct s_fct_printf' 7 bytes align 'fct' [-wpadded] so tried that: typedef struct s_fct_printf { char flag; char pad[7]; void (*fct)(void*); }

python - Animated stripchart using matplotlib in PyQt5 GUI -

i'm trying create interactive 4-channel stripchart in pyqt5 gui , i'm using matplotlib so. have matplotlib plot embedded gui widget, i'm trying make use of matplotlib.animate module in order plots update. keep getting keyerror when referring lines i've added axes. besides updating of plot functions expected far, i'm including code believe relevant. class stripchartbuilder(qtwidgets.qdialog, stripchartdialog.ui_dialog): def __init__(self, ..., parent=none) self.fig = figure() self.ax1 = self.fig.add_subplot(111) self.addfigure() self.channels = {'ch 1': {'signal': 'none', 'scale': 'x1', 'cursor': false, 'data': [0], 'line': line2d(self.tdata, [0], color='r') }, ..

Spring Oauth2 Authentication Server with AngularJS Login Page -

i trying convert sample oath2 authserver application provided @ https://github.com/spring-cloud-samples/authserver using spring mvc login page, 1 using angularjs. having problems. when running modified authentication server, i’m getting looks cors error after sending authorization client: get http://localhost:8080/dashboard/login?code=j5lpmt&state=4olepd :9999/uaa/#/login:1 xmlhttprequest cannot load http://localhost:8080/dashboard/login?code=j5lpmt&state=4olepd. no 'access-control-allow-origin' header present on requested resource. origin 'http://localhost:9999' therefore not allowed access. response had http status code 401. for client, i’m using authservers partner application sso client located at: https://github.com/spring-cloud-samples/sso . exception of swapping port numbers both applications sso client unchanged. my modified server follows: @configuration @componentscan @enableautoconfiguration @controller @sessionattributes("