Posts

Showing posts from January, 2013

MatplotLib (TKinter) + OpenCV crashing in Python 3 -

i trying run python 3 code first shows opencv window , when closes should plot using matplotlib. upon plt.show() call program crashes: python3.6 quit unexpectedly. import numpy np import matplotlib matplotlib.use("tkagg") # <== doesn't solve problem import matplotlib.pyplot plt import cv2 #cv2.ocl.setuseopencl(false) <== doesn't solve problem im = np.zeros((100,100,3)) cv2.imshow('test', im) cv2.waitkey(0) plt.plot(np.sin(np.linspace(0,20,200))) plt.show() # <== crashes on call in other stackoverflow posts found setting matplotlib backend tkagg should fix or setting setuseopencl(false) . both these potential fixes not work on macbook. i've tried several things, changing import order, trying swap matplotlib backend. has idea on how fix problem? macos sierra 10.12.3 python 3.6.0 tkinter version 8.5 opencv version 3.2.0 matplotlib version 2.0.0 the stacktrace of how crashes: libc++abi.dylib: terminat

gorm - Discriminator multi-tenant setup with SpringSecurity plugin in Grails -

i'm trying setup discriminator-based multi-tenant system based on documentation found in gorm guide do determine tenant using system want use spring security plugin , show data depending on user id. this tenantresolver: class mytenantresolver implements alltenantsresolver { def springsecurityservice @override iterable<serializable> resolvetenantids() { return new detachedcriteria(user) .distinct('id') .list() } @override serializable resolvetenantidentifier() throws tenantnotfoundexception { return springsecurityservice.currentuser.id } } and add springsecurityservice in resources.groovy file: beans = { mytenantresolver(mytenantresolver) { springsecurityservice = ref("springsecurityservice") } } unfortunately causes circular dependency: the dependencies of of beans in application context form cycle: grailscachefilter ↓ (inner bean)#6

javascript - How to select tr whose first and second td contains specific value? -

Image
i have table looks this: code follows: <table id="table1"> <tr> <td>hu</td> <td>bip</td> <td>pannon</td> </tr> <tr> <td>hu</td> <td>bip</td> <td>t-mobile</td> </tr> <tr> <td>hu</td> <td>bip</td> <td>vodafone</td> </tr> <tr> <td>hu</td> <td>fun</td> <td>pannon</td> </tr> <tr> <td>hu</td> <td>fun</td> <td>t-mobile</td> </tr> <tr> <td>hu</td> <td>fun</td> <td>vodafone</td> </tr> </table> how select last <tr> first <td> contains "hu" , second <td> contain

git - checkin locally works, I have no server checkin enabled, files stay in changes -

i have visual studio 2017 solution 6 projects in. i right clicked on solution "add solution source control". i go team explorer / changes / commit all. works fine "commit abcde123 created locally. sync share changes server. (i don't want share changes server - i'm solo dev). the changes window still full of changes. offers take commit again - press - errors, presume because trying reach server isn't configured. "fatal: unexpected sequence in commit output.". the changes window still full. i have changed files - can't see changes made (e.g. right clicking , selecting "view history"). think may because checkin server failed. how can set git in visual studio work locally, not try , upload server , see local checkin having finished checking in? (i think has worked fine in past single project solutions).

r - How to effectively flatten nested lists and dataframes into a single dataframe? -

i have data formatted in way that's difficult use, i'm trying flatten out. minimum reproducible example here . > str(sampledata) list of 4 $ events :'data.frame': 2 obs. of 3 variables: ..$ cateringoptions:list of 2 .. ..$ :'data.frame': 1 obs. of 3 variables: .. .. ..$ agreed : logi true .. .. ..$ tnc :'data.frame': 1 obs. of 5 variables: .. .. .. ..$ identity : chr "spicyowing" .. .. .. ..$ schema : logi na .. .. .. ..$ elementid : chr "105031" .. .. .. ..$ elementtype : logi na .. .. .. ..$ elementversion: logi na .. .. ..$ address: chr "new york" .. ..$ :'data.frame': 1 obs. of 3 variables: .. .. ..$ agreed : logi true .. .. ..$ tnc :'data.frame': 1 obs. of 5 variables: .. .. .. ..$ identity : chr "baconeggs" .. .. .. ..$ schema : logi na .. .. .. ..$ elementid : chr "105032" .. .. .. ..$ el

SUM on values of duplicate row in MYSQL -

i have burning question. running mysql query returns rows duplicate values in it. that's no problem because that's how saved data in past. want label stay same, value (int) must summed. have no clue how this. can me please? label |count | _________________ shelves |15 | pictures |39 | chairs |19 | tables |41 | shelves |49 | cabinets |16 | so want count summed in mysl when label duplicate. appreciated! thanks in advance! you can use group by sum , e.g.: select label, sum(`count`) table group label;

RabbitMQ security : how to prevent consumer from creating an exchange -

i have fanout exchange (named : test_exchange) allow users dynamically create queues. in order prevent them create whatever want have restricted access way: configure : test_exchange.* write : test_exchange.* read : test_exchange.* when creating queue bind exchange, have use following naming convention : test_exchange.(some guid), example : test_exchange.hjlgs6jrtzbuq48fywfizq this works fine. except can create exchanges if respect naming convention. according rabbitmq documentation queuedeclare : needs configure rights queuebind : needs write rights the problem create exchange need same configure rights. what solution allow consumer create queue, , bind specific exchange ? and no other access rights?

java - Passing both String and JSON object in POSTMAN (REST client) -

i have created springboot application accepts ' string ' , ' jsonobject ' input. i have tried passing passing them using params entering key & value like, name xyz status { "a": ["12", "11", "21"], "b": ["aa", "bb", "cc"], "c": ["aaa"] } but, "argument type mismatch\nhandlermethod details" { "timestamp": 1490697361238, "status": 500, "error": "internal server error", "exception": "java.lang.illegalstateexception", "message": "argument type mismatch\nhandlermethod details: \ncontroller [processing.querycontroller]\nmethod [public static java.lang.string preprocessing.querycontroller.abcmethod(java.lang.string,org.json.simple.jsonobject) throws java.io.ioexception,org.json.simple.parser.parseexception]\nresolved arguments: \n[0] [type=java.lang.string]

qtwebengine - Qt WebEngine simulate Mouse Event -

i want simulate mouse event in qt webengine app. i use pyqt5.8 , qt5.8 . this code: def mouse_click(self, x, y): point = qpoint(int(x), int(y)) eventp = qmouseevent(qmouseevent.mousebuttonpress,point,qt.leftbutton,qt.leftbutton,qt.nomodifier) self.sendevent(eventp) eventp = qmouseevent(qmouseevent.mousebuttonrelease,point,qt.leftbutton,qt.leftbutton,qt.nomodifier) self.sendevent(eventp) def sendevent(self, event): recipient = self.webpage.view().focusproxy() recipient.grabkeyboard() self.application.sendevent(recipient, event) recipient.releasekeyboard() i test it, not worked. can confirm mouse cursor on element, no mouse click event happend. can me? i use mac os 10.12.4, test using demo, find can not catch mouse event, can catch other events. suggestions? for qt 5.8 running following code: void leftmouseclick(qwidget* eventsreciverwidget, qpoint clickpos

linux - Find least usage drive across all Stornext mounted drives before write any content -

requirement: 6 san / stornext drive volumes(equal in size - 100tb each) mounted linux server. 10 applications 100+ read/write operations possible concurrently. trying write centralized service component(volume administration service) decide best drive perform before write operations. balance load content across drives. my approach: check disk usage of each volume reserve xxxx mb each request volume decide least capacity volume after adding reserved volume size + actual disk usage of volume release reserved volume volume starts writing. caveat: reserve xxxx mb may not provide calculate accurate size when concurrent write operations. it's feed contents unsure of size on write operations.

php - Why JavaScript won't run properly on CodeIgniter -

good evening indonesia. nice meet all. okay, have problem javascript on codeigniter. html (view), want run simple javascript, know javascript can run properly. cannot see "alert" dialog javascript. what's wrong code? <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>aluminium - persebaran alumni</title> <link href="<?php echo base_url('assets/css/bootstrap.min.css');?>" rel="stylesheet"> <link href="<?php echo base_url('assets/css/datepicker3.css');?>" rel="stylesheet"> <link href="<?php echo base_url('assets/css/styles.css');?>" rel="stylesheet"> <!--icons--> <script src="<?php echo base_url('assets/js/lumino.glyphs.js');?>"></script> <!-- javascript menampilkan lokasi

objective c - Multiple UIPickerview in single UIViewController can't add soap response -

in application have 3 uipickerview , data added using soap web service,response getting ok can't add in picker view,i'm new objectives programming,please suggest me. here post code. - (void)viewdidload { [super viewdidload]; picker1 = [[uipickerview alloc] init]; [self.view addsubview:picker1]; _custompickerarray1 = [[nsmutablearray alloc] init]; [self dropdown]; } -(void)dropdown { nslog(@"dropdown method call"); nsstring *envalope=[nsstring stringwithformat:@"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" "<soap:envelope xmlns:xsi=\"http://www.w3.org/2001/xmlschema-instance\" xmlns:xsd=\"http://www.w3.org/2001/xmlschema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\n" "<soap:body>\n" "<value xmlns=\"http://tempuri.org/\">\n"

c - XMC4400 and MAX44009 sensor light (I2C) -

Image
i'm having trouble trying connect light sensor (max44009) i2c. explain i've done , hope can me. i connecting connection card on hmi port of xmc4400 80 ports. i've connected sensor according table. sca - pin37 scl - pin38 gnd - pin 80 3.3 - pin 3.3v of xmc4400 then i've tried adapt i2c master example (available on dave tutorials) light sensor. i've created i2c master app following settings: my main.c this: code: #include <dave.h> #define io_expander_address (0x4a) uint8_t tx_buffer[4] = {0x00,0x01,0x02,0x03}; volatile uint8_t tx_completion_0 = 0; volatile uint8_t rx_completion_0 = 0; /* transmit callback handling */ void tx_callback_0(void) { tx_completion_0 = 1; } /* receive callback handling */ void rx_callback_0(void) { rx_completion_0 = 1; } /* delay */ void delay(uint32_t counter) { volatile uint32_t cnt = counter; while(--cnt); } /* * demo hmi satellite board xmc45 cpu board required.

Jasper strech subreport -

Image
i have detail band in master report 2 subreports when form report see left subreport more higher right subreport has such structure how make, if in report there less lines in other, stretched? actually, columnfooter band on same level. subreports attributes: position type: float strech type: relatives tallest object overflow type: strech i decided. listed list in 1 detail band 1 size

ios - UITextView resizes the height dynamically with restricting maximum height -

Image
i want make textview whatsapp resizing textview's height when typing long string. once reaches maximum height, textview's remained maximum height , textview becomes scrollable. same whatsapp 's textview when replying message. i found way resize dynamically, when set textview.isscrollenabled = true once reaches maximum height, textview shrink scrollable. how can make textview whatsapp 's textview? override func viewdidload() { super.viewdidload() notificationcenter.default.addobserver(self, selector: #selector(updateheight), name: nsnotification.name.uitextviewtextdidchange, object: nil) textview.isscrollenabled = false // ... } func updateheight() { var contentsize = textview.sizethatfits(textview.bounds.size) contentsize.width = uiscreen.main.bounds.width if contentsize.height > uiscreen.main.bounds.height / 5{ textview.isscrollenabled = true contentsize.height = uiscreen.main.bounds.height / 5 } else {

django - Can I dinamically add new fields to my models/serializer/db ? -

i´m developing application using django rest framework, , have problem. i´m trying make application flexible possible, wanted possibility dynamically add new fields models. example: have model robot fields id , version. user wants add new field, owner of robot. can can can make model , serializer reflect new field. can see how can easilly add new field database, model , serializer not reflect change. i wanted possibility dynamically add new fields models. short answer: can't. long answer: can use related model each record represent "field" given robot instance, ie: class robotfield(models.model): robot = models.foreignkey(robot) fieldname = models.charfield(max_length=30) value = models.textfield() class meta: unique_together = [("robot", "fieldname")] but handling value (and it's type), validations, etc etc, , queries involving "fields" become pita. or store "user-defined&q

php - Mutilple Array puzzel -

i have array : $myarrays = array( array(1, 2, 3, 4), array(5, 6, 7, 8), array(9, 10, 11, 12), array(13, 14, 15, 16) ); i need print output : 1 5 9 13 14 10 6 2 3 7 11 15 16 12 8 4 you can try is $myarrays = array( array(1, 2, 3, 4), array(5, 6, 7, 8), array(9, 10, 11, 12), array(13, 14, 15, 16) ); $i = 0; foreach($myarrays $key => $value){ $i = $key; foreach($value $keys =>$values){ $addarray[$i] = $values; $i = $i+4; } } ksort($addarray); $arrays = array_chunk($addarray,4); krsort($arrays[1]); krsort($arrays[3]); $final = array_merge($arrays[0],$arrays[1],$arrays[2],$arrays[3]); foreach ( $final $key => $value){ echo $value ."<br>"; }

c++ - Why can't I have a non-integral static const member in a class? -

i noticed c++ not compile following: class no_good { static double const d = 1.0; }; however happily allow variation double changed int, unsigned, or integral type: class happy_times { static unsigned const u = 1; }; my solution alter read: class now_good { static double d() { return 1.0; } }; and figure compiler smart enough inline necessary... left me curious. why c++ designer(s) allow me static const int or unsigned, not double? edit: using visual studio 7.1 (.net 2003) on windows xp. edit2: question has been answered, completion, error seeing: error c2864: 'd' : const static integral data members can initialized inside class or struct the problem integer, compiler usually doesn't have ever create memory address constant. doesn't exist @ runtime, , every use of gets inlined surrounding code. can still decide give memory location - if address ever taken (or if it's passed const reference function), must. in order give a

SQL Server - recursive references (loop, join, insert?) -

i appreciate if give me hints regarding fastest solution of following sql server challenge: let's have table date , client , several characteristics in other columns. need calculate column_1 , column_2 but: column_1 uses client's characteristics of current date , of previous date , column_1 value previous date (recursive referencing) column_2 additionally uses column_1 value of current date (therefore refer final value, not particular 'case when' implements column logic) how replicate logic efficiently in sql server? i thinking loop goes on data , each data, joins previous data, calculates firstly column_1, column_2 (but how make sure values in column_1 accessible column_2?) regards, bart without specific example not able tell solution efficient, when looking solution describe recursive. might not need full recursive solution if use window functions instead. in sql server 2012+ have access lead() , lag() can use previous , next va

Multiple filter in ng-repeat -

i need filtering data in ng-repeat. i've tried few things can't find solution works in case. need to this: sensor in sensors | filter: { group: group.id, (name: search || description: search) } search ng-model (text input) , group.id id of group genereted in ng-repeat (i have 2 nested ng-repeat). i've tried filter: $scope.search = ''; $scope.searchfilter = function() { return function (p) { if ($scope.search!='') { (var in p) { console.log("p.name: "+p.name+", search: "+$scope.search); if (p.name == $scope.search || p.description == $scope.search) { return p; } } } else { return p; } } } almost works. filters data if write correct name. example want find "engine". if start writing "en" there no data if write "

javascript - Lodash filter ignore case -

is there way of case-insensitive filter lodash? tried (see below), works partly (when user input lowercase). problem here after 1 search characters in lower case. i want filter regardless of how (lower case or upper). filter(q: string) { let query = q.trim(); let searchdata = []; searchdata = clone(this.data); searchdata = searchdata.map((entity) => { entity.email = entity.email.tolowercase(); return entity; }); if (query) { this.approverentities = filter(searchdata, (a) => a.email.indexof(query) >= 0); } else { this.approverentities = this.data; } } thanks in advance! you can use filter() , method() , , case-insensitive regular expression: _.filter(searchdata, _.method('email.match', /foo/i)); or, if search term dynamic: const filtercaseinsensitive = (search, searchdata) => _.filter(searchdata, _.method('email.match', new regexp(search, 'i'));

android - RuntimeException Can't create handler inside thread that has not called Looper.prepare() -

i'm trying make volley request when receive localbroadcast message. i'm getting runtimeexception. tried using thread still getting same error. should use else? i'm getting exception in method preparedata() that's why added try/catch inside it. in try/catch i'm getting exception. public class newitemsnearufragment extends fragment{ private sharedpref pref; private connectiondetector cd; private progressdialog pd; private localbroadcastmanager bmanager; activity activity; @override public void onviewcreated(view view, @nullable bundle savedinstancestate) { super.onviewcreated(view, savedinstancestate); pref = new sharedpref(getactivity()); cd = new connectiondetector(getactivity()); pd = new progressdialog(getactivity()); bmanager = localbroadcastmanager.getinstance(getactivity()); intentfilter intentfilter = new intentfilter(); intentfilter.addaction(&

codecave - Calculate 64bit jmp for code cave in c# -

i cannot solve problem. appreciated. want create jmp allocated memory. if check calculation cheat engine allocated memory fine. cause cheat engine allocates memory in higher region. allocated memory e.g: 0x870000 , adress want create jmp at: 7ffde65f5184. console.writeline("towrite: {0:x}", towrite.toint64()); /*towrite: 7ffde65f5184*/ intptr allocation = virtualallocex(openproc, intptr.zero , 0x1024, allocationtype.commit | allocationtype.reserve, memoryprotection.executereadwrite); console.writeline("allocation: {0:x}", allocation.toint64()); /* allocation: 870000*/ intptr jmp = new intptr((towrite.toint64() - (allocation.toint64() + 5))); byte[] bytes1 = bitconverter.getbytes(jmp.toint64()); byte[] bytes2 = { 0, 0, 0, 0, 0, 0, 0, 0, 0, }; bytes2[0] = 233; bytes2[1] = bytes1[0]; bytes2[2] = bytes1[1]; bytes2[3] = bytes1[2]; bytes2[4] = bytes1[3]; /*nops*/ bytes2[5] = 144; bytes2[6] = 144; bytes2[7] = 144; bytes2[8] = 144; uintptr written = new uintpt

javascript - How to choose a file and save the path's file via JS -

this question has answer here: javascript: create , save file 9 answers how can create file storage on client side javascript? 7 answers is possible write data file using javascript? 5 answers create file using javascript in chrome on client side 8 answers i want click on button open window , choose file. i'm using code choosing: <button onclick="document.getelementbyid('file-input').click();">open</button> <input id="file-input" type="file" name="name" style="display: none;" /> how can save path? (for example c:\tem

PostgreSQL- sum not recognized as aggregate function? -

i need have running amount of transactions per year. if total amount @ 2015 150 , @ 2016 , total amount 90 . means @ 2016 running amount 240 . , on. so have data: create table transactions2(year_num int, amount int); insert transactions2 values(2015, 100); insert transactions2 values(2015, 50); insert transactions2 values(2016, 90); insert transactions2 values(2017, 100); insert transactions2 values(2019, 200); select year_num, count(amount), sum(amount) on (order year_num) transactions2 group year_num order year_num; if run select sql, get: error: column "transactions2.amount" must appear in group clause or used in aggregate function line 9: select year_num, count(amount), sum(amount) on (order y... ^ ********** error ********** error: column "transactions2.amount" must appear in group clause or used in aggregate function sql state: 42803 character: 328 but have amount in sum function. why not w

c++ - Qt - Add content of QTextDocument to another one - Images not added -

i'm trying merge 2 qtextdocument , can retrieve text not images, here code example : qtextdocument doc2("test"); qtextcursor cursor(&doc2); cursor.moveposition(qtextcursor::end); cursor.inserthtml(doc1.tohtml()); //doc1 contains text , image qtextdocumentwriter docwriter; docwriter.setfilename("temptest.odf"); docwriter.setformat("odf"); docwriter.write(&doc2); if i'm writing doc1 directly, have images in file it's working don't know how transfer images qtextdocument . or maybe possible write 2 documents in same file when try last write done : docwriter.write(&doc1); docwriter.write(&doc2); i don't see how append each of them file.

java - Codename One send & display push notifications -

i'm trying find out how push proper notifications using codename 1 servers. i'd send notifications localnotifications - title, body, badge etc. however in documentation push servers there seems one field concerning notification payload: body - body of message. q1: how push(server side through codename 1 server) , display(codename 1 app) notification title , body server? i'd able send , receive custom data in payload too, e.g. reference app content should opened in app when opening app "from" particular push notification. q2: can send notification body, own json? in codename 1 api there callback interface pushcallback , method void push(string value) . callback intended purpose of "pre-processing/parsing" of notification payload before displaying localnotification? thanks. there various types of push messages can send in codename one, namely 0,1,2,3,4,5,100, , 101. if require title , body, set push type 4 , separate ti

html - Responsive iframes for mobile phones -

so, i'm having quite bit of problem in making iframes work in mobile devices. it's covering half or more of screen. suspect because of lines of css put in iframes. .wrapper2 { position: relative; padding-bottom: 56.25%; /* 16:9 */ padding-top: 25px; height: 0; } .wrapper2 iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } i add text, using viewport sizing(vw, vh, vmin, vmax) if of getting problems long blocks of texts producing scrollbars. think (???) may have iframe css and/or text sizing. necessary change need implement? thank in advance! please post html make easier understand problem is. try -- if iframe in html you'll find : <iframe width="560" height="315" src="https://www.youtube.com/embed/hdi9inno86u" frameborder="0" allowfullscreen></iframe> so, there's width & height defined inside iframe element. have change width="10

office365 - How to refresh cards in Outlook Actionable Messages? -

i'm trying refresh card in outlook actionable messages , documentation doesn't specify how this, though functionality mentioned. i've tried returning new card data in response using both application/json , application/ld+json , neither of seem work. i've tried returning json in card-action-status , doesn't have effect either. is functionality available? i can confirm functionality is available, critical piece of information missing documentation: need set card-update-in-body header value of true , work. content type on response doesn't seem matter, , card-action-status header seems ignored.

c - Mac OS X Sierra : Undefined symbols for architecture x86_64 -

i trying build c source file based on linphone in mac os x sierra getting following error. this link c source file. http://www.linphone.org/docs/liblinphone/group__basic__call__tutorials.html edited: i trying compile source code command clang -o tt tt.c -i/users/softdev/downloads/linphone-sdk-3.11.1-mac/include/ error: undefined symbols architecture x86_64 ld: symbol(s) not found architecture x86_64 clang: error: linker command failed exit code 1 (use -v see invocation) i have tried change target cpu didn't work. my system has xcode 8. regarding appreciated. edited: complete output undefined symbols architecture x86_64: "_linphone_call_get_state", referenced from: _main in tt-ca2045.o "_linphone_call_ref", referenced from: _main in tt-ca2045.o "_linphone_call_unref", referenced from: _main in tt-ca2045.o "_linphone_core_destroy", referenced from: _main in tt-c

iOS Swift: SearchController with a StoryBoard UISearchBar -

evening, have built search controller , , have code programmatically create search bar . replace code search bar designed in story board . so question is, how can connect outlet search controller? this code: public class customsearchcontroller: uisearchcontroller { public var customsearchbar = uisearchbar() override public var searchbar: uisearchbar { { return self.customsearchbar } } } func configuresearchcontroller() { searchcontroller = customsearchcontroller() searchcontroller.searchresultsupdater = self searchcontroller.dimsbackgroundduringpresentation = false searchcontroller.hidesnavigationbarduringpresentation = false searchcontroller.customsearchbar = self.customsearchbar searchcontroller.searchbar.delegate = self self.definespresentationcontext = true } extension earthsearchertableviewcontroller : uisearchresultsupdating { public func updatesearchresults(for searchcontroller: uisearchco

Why I can't use multiple columns in a GROUP BY query in MySQL? -

i need make sql groups 3 different columns, query: select notification.type, notification.triggerer, notification.to_what, any_value(user_data.name) name, any_value(user_data.surname) surname, any_value(user_data.avatarimage) avatarimage, count(*) counter notification inner join user_data on notification.triggerer = user_data.owner notification.owner = "c6cecc891f6c4cc84cc0b62062578e52" , isdelete=0 order notification.id desc group notification.triggerer, notification.type, notification.to_what limit 0,100 but when make this, shows me error: > #1064 - have error in sql syntax; check manual corresponds mysql server version right syntax use near 'group notification.triggerer, notification.type, notification.to_what limit ' @ line 15 how can fix it? you can use it, your group by must before order by select notification.type, notification.triggerer, notification.to_what, any_value(user

html5 video - Kaltura Player issues -

below issues facing kaltura player: video keeps on playing after minimize or switch tabs seek bar/ progress bar fails display in portrait mode.(observed on ios) sometimes audio keeps on playing in background video not seen. if pause video , play again video can seen. content fails resume after midroll instead next content start (observed on ios)

How to disable GPU in keras with tensorflow? -

i want compare processing time of code , without gpu. backend of keras tensorflow. uses gpu automatically. use model of keras/examples/mnist_mlp.py comparing. i checked processing time below. then, how disable gpu? should ~/.keras/keras.json modified? $ time python mnist_mlp.py test loss: 0.109761892007 test accuracy: 0.9832 python mnist_mlp.py 38.22s user 3.18s system 162% cpu 25.543 total have tried this? : $ cuda_visible_devices='' time python mnist_mlp.py cuda_visible_devices used hide gpu's cuda. here hide them don't put visible device.

testing - Is it possible to add a classname to each test case in assertion.xml using gatling? -

i want use gatling junit report upload automatically in testlink using hudson there no classname tag in file can't link test case. there way add it? finally, don't need change junit file! used test suite name in testling custom field , configured in hudson testlink plugin.

android - What does unknown app version mean in playstore -

Image
i got unknown version in play-store. mean? confused. every time upload app increase version code. can 1 tell me happened? and app icon gray box in play-store app list. mean? halt 2 roll-out cause of issues. gray box caused halted releases?

javascript - Can I add a button to start and stop the transition by using JS or CSS? -

is possible add button control(start/stop) transition? html code: https://jsfiddle.net/jxgskgp6/ @keyframes roundandround { { transform: rotatex(360deg) rotatey(360deg); } } @keyframes show { { opacity: 1; } } body { background-color: #000000; } .scene { width: 600px; height: 600px; margin: 2% auto; perspective: 1000px; } .wrapper { width: 100%; height: 100%; transform: rotatex(45deg) rotatey(45deg); transform-style: preserve-3d; } .ball { position: relative; width: 70%; height: 70%; margin: 0 auto; transform-style: preserve-3d; animation: roundandround 7.5s 1.3s infinite linear; } .ball .ring { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 6px; border-style: dashed; border-radius: 50%; opacity: 0; animation: show 0.75s forwards ease-in-out; } .ring:nth-child(1) { color: #8df435; transform: rotatey(4deg); animation-d

matlab - How to plot normal distribution along a line? -

Image
i working on matlab code plot normal distribution samples along line. keeping things simple question, using line y=10 . a=randn(300,2); x=a(:,1)'; y=a(:,2)'; x=[1.5*x(1:100)+5 1.5*x(101:200)+10 1.5*x(201:300)+15]; y=[1.5*y(1:100)+10 1.5*y(101:200)+10 1.5*y(201:300)+10]; plot(x,y,'marker','.','linestyle','none') axis ( [ 1 20 1 20 ] ) ; the aim this: my problem is, code seems inefficient, these 2 lines: x=[1.5*x(1:100)+5 1.5*x(101:200)+10 1.5*x(201:300)+15]; y=[1.5*y(1:100)+10 1.5*y(101:200)+10 1.5*y(201:300)+10]; in actual code however, expanded like x=[1.5*x(1:100)+5 1.5*x(101:200)+10 1.5*x(201:300)+15 1.5*x(301:400)+20 1.5*x(401:500)+25 ................]; is there way can make more efficient, using loops or vectorization? trying understand how that, able find simple examples. can't understand how iterate 2 variables, 1 in range part x(201:300)....x(301:400) , 1 in addition part +15...+20 also, technique using plot no