Posts

Showing posts from April, 2012

svg - CSS3 animation is not working -

svg - CSS3 animation is not working - i have created animation svg using css3 working in chrome , firefox. partially working in safari not working in net explorer (ie9+ back upwards css animations) see demo css: @-webkit-keyframes dash { 70%,80% { stroke-dashoffset: 0; fill-opacity: 0; } 85% { fill-opacity: 0; stroke-opacity: 1; } 95% { stroke: #17739d; stroke-dashoffset: -301; stroke-opacity: 0; } 100% { fill-opacity: 1; stroke-dashoffset: -301; } } @-ms-keyframes dash { 70%,80% { stroke-dashoffset: 0; fill-opacity: 0; } 85% { fill-opacity: 0; stroke-opacity: 1; } 95% { stroke: #17739d; stroke-dashoffset: -301; stroke-opacity: 0; } 100% { fill-opacity: 1; stroke-dashoffset: -301; } } @-moz-keyframes dash { 70%,80% { stroke-dashoffset: 0; fill-opacity: 0; } 85% { fill-opacity: 0; stroke-opacity: 1; } 95% { stroke: #17739d; s...

opengl - Clamp to edge VS Clamp -

opengl - Clamp to edge VS Clamp - i working on opencl project, trying implement gaussian filter. @ moment stuck @ cl_adressing_mode definition, don't difference between cl_address_clamp_to_edge , cl_address_clamp. the definition of cl_addressing_mode states: addressing mode specifies when coordinate falls outside range of [0.0, 1.0](for normalized coordinates) or [0, dimension - 1](for non-normalized coordinates) still, doesn't specify parameters when apply convolution matrix image input. the details of image samplers described in section 6.12.14.1 of opencl 1.2 specification. in particular, table 6.22 on page 295 has info after: clk_address_clamp_to_edge – out-of-range image coordinates clamped extent. clk_address_clamp – out-of-range image coordinates homecoming border colour. the definition of 'border colour' in next section (it depends on channel order). opengl image-processing opencl

ios - How to add MPMoviePlayerController on current view with animation -

ios - How to add MPMoviePlayerController on current view with animation - i using mpmovieplayercontroller play video within ipad application. using below code snippet add together film player view: self.player =[[mpmovieplayercontroller alloc] initwithcontenturl: urlvideo]; [self.player preparetoplay]; [self.player setmoviesourcetype:mpmoviesourcetypestreaming]; [self.player.view setbounds:cgrectmake(0, 0, 512, 374)]; if (uideviceorientationislandscape([uiapplication sharedapplication].statusbarorientation)) { nslog(@"landscape.."); [self.player.view setcenter:cgpointmake(512, 374)]; } else{ nslog(@"portrait."); [self.player.view setcenter:cgpointmake(384, 502)]; } self.player.controlstyle=mpmoviecontrolstyleembedded; [self.player setscalingmode:mpmoviescalingmodeaspectfit]; self.player.shouldautoplay=yes; [self.viewcontroller.view addsubview: self.player.view]; self.btnclosenormalmode= [uibutton buttonwithtype:uibuttontypecustom]; [s...

node.js - Calculate the exact size of a font glyph -

node.js - Calculate the exact size of a font glyph - i need way find exact size , position of glyph relative bounding box. we're using d3.js create svg heading, smaller byline , short body text. pretty much this: lorem ipsum lorem ipsum dolor lorem ipsum dolor sit down amet, consectetur adipisicing elit, sed eiusmod tempor incididunt ut labore et dolore magna aliqua as in example, need text left-aligned regardless of font-size. the problem is each lines bounding box that's aligned , not glyphs. makes headings indented. how can calculate space between bounding box , glyph can correctly align text? a colleague sat downwards , manually measured english language font, works pretty well. in adobe illustrator, need info english, chinese , standard arabic fonts. hand more or less impossible. the solution can come type each character in canvas element , map each pixel see glyph starts , ends. what think ideal way utilize svg font path inf...

sql server - SQLCmd with connection string -

sql server - SQLCmd with connection string - can pass connection string via sqlcmd? i want alter application name , failover partner (for mirroring) connection string when utilize sqlcmd. now. when utilize sqlcmd, application name of connection set sqlcmd in sys.sysprocesses result. not far know - perhaps consider using osql, -d parameter , set odbc connection, failover partner back upwards @ least. sql-server sql-server-2008 sql-server-2008-r2 sql-server-2012 sql-server-2014

mysql - I needed hostname to run sql php script to connect but my hosting company gave me PuTTY with SSH, now I'm lost? -

mysql - I needed hostname to run sql php script to connect but my hosting company gave me PuTTY with SSH, now I'm lost? - define("host", "need host name"); define("user", ""); define("pass", ""); define("data", ""); need mysql.10web.com instead ssh , putty, been trying understand , implement lost. can explain how create thing work most of hosting companies mysql server localhost accessible only, have tried : define("host", "localhost"); php mysql ssh putty

c# - Find number of references to a dll -

c# - Find number of references to a dll - we maintain track of number of references link dll. something resharper provides: but automated can maintain track of number of usages , if number of usages increases 139 139+. is there easy way automatically? this best bet if want things returned resharper way. resharper command line tools this blog post provides additional information: resharper code analysis goes beyond visual studio c# dll reference resharper

r - getSymbols downloading data for multiple symbols and calculate returns -

r - getSymbols downloading data for multiple symbols and calculate returns - i'm downloading stock info using getsymbols quantmod bundle , calculating daily stock returns, , combining info dataframe. big set of stock symbols. see illustration below. in stead of doing manually utilize loop if possible or maybe utilize 1 of apply functions, can not find solution. this do: symbols<-c ("xom","msft","jnj","ge","cvx","wfc","pg","jpm","vz","pfe","t","ibm","mrk","bac","dis","orcl","pm","intc","slb") length(symbols) #daily returns selected stocks & sp500 index sp500<-as.xts(dailyreturn(na.omit(getsymbols("^gspc",from=startdate,auto.assign=false)))) s1<-as.xts(dailyreturn(na.omit(getsymbols(symbols[1],from=startdate,auto.assign=false)))) s2<-as.xts(dailyretur...

android - Iterating through JSONObjects -

android - Iterating through JSONObjects - i have tried several of examples listed , none of them seem work reason posting new question. i have json string coming me objects (it not formatted in array). need parse out team names this. know need iterate on them keys , store objects in new array. here json (a sample of it) {"query":{"printrequests":[{"label":"","typeid":"_wpg","mode":2,"format":false}],"results":{"team:kubbchucks":{"printouts":[],"fulltext":"team:kubbchucks","fullurl":"http://wiki.planetkubb.com/wiki/team:kubbchucks","namespace":822,"exists":true},"team:kubbchucks idp":{"printouts":[],"fulltext":"team:kubbchucks idp","fullurl":"http://wiki.planetkubb.com/wiki/team:kubbchucks_idp","namespace":822,"exists":tr...

php - yii2 REST Api file upload using PUT -

php - yii2 REST Api file upload using PUT - i trying add together rest api in yii2 used mobile applications upload image/audio file. trying utilize set method image/file info http form-data, reason fopen("php://input", "r"); returns empty stream. tried code give in sample http://www.php.net/m...put-method.php. <?php /* set info comes in on stdin stream */ $putdata = fopen("php://input", "r"); /* open file writing */ $fp = fopen("myputfile.ext", "w"); /* read info 1 kb @ time , write file */ while ($data = fread($putdata, 1024)) fwrite($fp, $data); /* close streams */ fclose($fp); fclose($putdata); ?> meanwhile, using post method works though. using next code post $putdata = fopen($_files['photo']['tmp_name'], "r"); $filename = $this->documentpath.uniqid().'.jpg'; /* open file writing */ $fp = fopen($filename, "w"); ...

python - Compress text to store in mysql database, does it have to be base64 -

python - Compress text to store in mysql database, does it have to be base64 - i got code here defines compressed text field. need because i'm storing much text , database big. problem code doesn't have documentation , it's confusing. particularly, have modified code little, in here: def get_prep_value(self,value): if not value: homecoming value try: tmp = value.encode('utf-8').encode('bz2') except exception: homecoming value else: if len(tmp) > len(value): homecoming value homecoming tmp in original code, encode base64 after bz2, shows not optimize wondering if there might reason that? btw. i'm using mysql back-end i removed lines 11-15 didn't create sense me.. why decode in here? base64-encoding info guarantees resulting info safe insert text-only column (while sacrificing of compression bzip2 offers). author must have had requirement insert info...

python - Django tuple checking: TEMPLATE_DIRS should be tuple? -

python - Django tuple checking: TEMPLATE_DIRS should be tuple? - i'm trying django 1.7. this template_dirs setting: template_dirs = ( os.path.join(os.path.dirname(__file__), 'templates').replace('\\', '/') ) which fine django 1.6, doesn't work django 1.7. can explains this? thx!! you need trailing , tuple, see below, lastly , template_dirs = ( os.path.join(os.path.dirname(__file__), 'templates').replace('\\', '/'), ) when there's single element in tuple need leave trailing comma @ end, e.g. (a,) tuple single element a , (a) resolves whatever a is. python django tuples django-1.7

Convert raw javascript object array into structured object tree ready for ng-repeat -

Convert raw javascript object array into structured object tree ready for ng-repeat - i building app node.js, mssql (don't ask.. client), socket.io , angularjs. i have managed info mssql angular in next form. [ { "measure":"value", "region":"london", "manager":"jack", "supervisor":"james", "number1":44, "number2":2244.3, "number3":1561.6 }, { "measure":"value", "region":"london", "manager":"jack", "supervisor":"jerry", "number1":335.4, "number2":33.3, "number3":11.6 }, { "measure":"value", "region":"london", "manager":"john", "s...

nosql - Couchbase as read through caching layer in the cloud + backend database -

nosql - Couchbase as read through caching layer in the cloud + backend database - our web architecture based on commercial products both in memory caching , relational backend database. in context of investigating moving web stack cloud, looking @ couchbase both caching layer (which sit down in cloud, next apps) potentially replacing internal database couchbase document oriented nosql database (at to the lowest degree read portion). that mean have create next changes: asymmetric read/write...the apps read cache write backend systems of record (read >> write). backend systems of record update internal nosql database in turn populate cache implement read through cache....apps in cloud talk in memory caching layer (including xcdr). if objects not found in cache, cache should automatically retrieve info internal backend couchbase db, without application code beingness aware of (not side cache) so, questions are: is having cloud based caching layer plus nosql i...

jquery - AJAX call returning "Unexpected token <" -

jquery - AJAX call returning "Unexpected token <" - so here's what's going on. i've got ajax phone call that's supposed returning array of json objects. the ajax phone call looks this: ajax : function( url , data, success ){ homecoming $.ajax( { url : url, type : 'post', info : data, datatype : 'json', success : function( info ){ success( info ); }, error : function( jqxhr , textstatus , errorthrown ) { console.log( errorthrown ); } } ); } the invocation of function this: this.tvmodelsajax = this.ajax( sanus_website_search.tvmodelautocomplete, {q : autocompletecontroller.query }, autocompletecontroller.success...

javascript - How to select elements with second data atribut in jquery -

javascript - How to select elements with second data atribut in jquery - i got html <td data-id="1 2 3"></td> <td data-id="1 2 3"></td> <td data-id="1 1 3"></td> <td data-id="3 3 3"></td> and want select elements sec info id eaquel 2... how write selector? wado's answer specific case, if want more generic one, can utilize filter : $('td').filter(function(){ homecoming $(this).data('id').match(/^\d+ 2 /); }) javascript jquery

can we exit without error from telnet with MozRepl? -

can we exit without error from telnet with MozRepl? - based on this answer, trying figure out way exit telnet , homecoming 0 these wont work: (echo -e "repl.quit()";sleep 1) |telnet localhost 4242;echo $? (echo -e "\029";sleep 1;echo "q";sleep 1) |telnet localhost 4242;echo $? (echo -e "\c]";sleep 1;echo "q";sleep 1) |telnet localhost 4242;echo $? (echo -e "\e]";sleep 1;echo "q";sleep 1) |telnet localhost 4242;echo $? (echo -e "\e]";sleep 1;echo "q";sleep 1) |telnet localhost 4242;echo $? the problem is: unable differentiate successful exit , failed one... i think this question can linked. you need send ^] character, unprintable grouping separator character before telnet client terminates connection after executing commands gave via pipe. versions of echo programme can produce unprintable characters using -e option. grouping separator 035 in octal (you can see entire a...

appsdk2 - Remove scoping from Rally Solr Artifact Chooser Dialog -

appsdk2 - Remove scoping from Rally Solr Artifact Chooser Dialog - i using rallysolrartifactchooserdialog display initiative picker. however, initiatives populate grid within default project scoping in rally. there way configure fetch initiatives? { xtype: 'rallysolrartifactchooserdialog', id: 'portfolioitempicker', artifacttypes: ['portfolioitem/initiative'], autoshow: true, height: 250, title: 'choose initiative', listeners: { scope: this, artifactchosen: function(picker, selectedrecord) { ... } } } i did notice storeconfig parameter in documentation - perhaps solution? you're on right track. can command scoping of artifacts including context on storeconfig: storeconfig: { context: { //specify workspace search workspace: rally.util.ref.getrelativeuri(this.getcontext().getworkspace()), ...

javascript - How can show a number in a format translation? -

javascript - How can show a number in a format translation? - hello did utilize jquery traslate numbers words. here view , demo: here <form> number words<br> <br>number/n&uacute;mero <input name="number" type="number" size="60" value="123"> <br><textarea name="spanish" rows="5" cols="90"></textarea><br> </form> and show: ciento veintitres con /100 nuevos soles but want show (when has no point symbol) ciento veintitres con 00/100 nuevos soles the other problem symbol point not working correctly, illustration in line: <input name="number" type="number" size="60" value="123.12"> <br> i should have ciento veintitres con 12/100 nuevos soles i tried here can point out i've done wrong? you can start @ top of sec function splitting number @ decimal, if there...

node.js - Socket.IO Simple Example Not Working -

node.js - Socket.IO Simple Example Not Working - i trying follow along simple illustration of socket.io located @ http://socket.io/get-started/chat/. far have next code in index.js file: // index.js file var app = require('express')(); var http = require('http').server(app); var io = require('socket.io')(http); app.get('/', function(req, res){ res.sendfile('index.html'); }); io.on('connection', function(socket){ socket.on('chat message', function(msg){ console.log('message: ' + msg); }); }); http.listen(3000, function(){ console.log('listening on *:3000'); }); the error getting is: the connection ws://localhost:3000/socket.io/?eio=2&transport=websocket&sid=i0syirvhjc1guiafaaac interrupted while page loading. i'm using firefox browse page. doesn't work in chrome. taking illustration works fine...

MySQL operator like do not find records. Equal operator do -

MySQL operator like do not find records. Equal operator do - i have mysql query weird behavior. select * user email 'john@doe.com' do not homecoming line select * user email = 'john@doe.com' returns 1 line i have solved problem replacing = (equal) operator, since in mysql it's case insensitive... know why mysql have unusual behavior in specific case (most cases works expected). mysql sql-like

r - xyplot, Error in `[.xts`(y, id) : 'i' or 'j' out of range -

r - xyplot, Error in `[.xts`(y, id) : 'i' or 'j' out of range - i trying scatter plot 2 variables, 1 of residuals lm() call. xyplot() function not scatter plot , returns error message error in `[.xts`(y, id) : 'i' or 'j' out of range the residuals xts variable , xyplot() can in fact still plot residuals (just time plot, not scatter plot). strangely, work around i've found far utilize as.xts() on xts residuals, or utilize [ ,1] indexing refer first column, though there 1 column begin with. mwe below, looking explanation, in advance. library('lattice') library('xts') = as.xts(ts(rnorm(20), start=c(1980,1), freq=4)) b = as.xts(ts(rnorm(20), start=c(1980,1), freq=4)) c = resid(lm(a~b)) str(c) # xts object xyplot(c~a) # not work: error in `[.xts`(y, id) : 'i' or 'j' out of range xyplot(c) # xyplot can plot fine xyplot(as.xts(c)~a) # works, if utilize as.xts() on xts object ? xyplot(c[ ,1]~a) # wo...

oracle - Is okay to create indexes on a table while insertion -

oracle - Is okay to create indexes on a table while insertion - is okay create index on table while , lets when there tasks creates new rows table @ same time?? there locking issues??? ex: feedback table --> creating index on (name, feedbackrule) while there inserts happening simultaneously , bad?? if what. i'm assuming, oracle not utilize index when inserts happening, later used. normally, creating index requires locking table, dml operations block; , if there active transactions on table when initiate index creation, you'd error "ora-00054: resource busy , acquire nowait specified or timeout expired". if table small, may not much of issue - transactions blocked few moments. if big bad thought seek creating index while table in use. however, if using enterprise edition, can add together online keyword create index statement, allow transactions proceed against table while index building. may still cause slower performance. oracle...

java - Why Spring only autowired beans in controller -

java - Why Spring only autowired beans in controller - my web application implemented spring can @autowire beans in controllers, not services. find below description spring document(section 4.9) it's not giving answer. looks annotations on beans in same application context in defined. means that, if set in webapplicationcontext dispatcherservlet, checks @autowired beans in controllers, , not services. see section 16.2, “the dispatcherservlet” more information. in section 16.2, neither no explain. can help me? have code below. in config package, there 3 classes public class webapp extends abstractannotationconfigdispatcherservletinitializer { @override protected class<?>[] getrootconfigclasses() { homecoming new class<?>[]{persistconfig.class}; } @override protected class<?>[] getservletconfigclasses() { homecoming new class<?>[]{ webmvcconfig.class }; } @override protected string[] getservl...

javascript - File Object in IE 10 -

javascript - File Object in IE 10 - i trying utilize html input type=file element , files using document.getelementbyid("..").files , working fine in chrome , firefox not in ie 10. i've gone through alot of blogs , suggest ie 10 onwards back upwards file object not working me in either ie 10 or ie 11. can please help me out this. code: html: <input type="file" id="fuattachment" name="fuattachment" class="mof-strip-file" style="width:68%;" /> javascript: var inputfile = document.getelementbyid("fuattachment").files[0]; – thank help. turns out activex content filtering needed turned off in net options > security. first add together website trusted site , select "custom level" , select disable under activex filtering. javascript jquery html5 internet-explorer-10

html - CSS Rounded Corner: White lines -

html - CSS Rounded Corner: White lines - i experiencing problem rounded corners on fixed body container page. extracted necessary code elements , have places them in jsfiddle. see here. notice borders of page have white lines on both inner side , outer side. suggestions on removing them? here html code: <html><body> <div id="fixedbody"> <header> <br> <br>header stuff goes here</header> <div id="maincontent">content stuff goes here</div> <footer>footer stuff goes her</footer> <br> <br> </div> </body></html> here css code: body { background:transparent ; background-color: #0c0c0c; background:transparent ; min-width: 1200px; } #fixedbody { width: 980px; display: block; margin-left: auto; margin-right: auto; border: 3px solid; border-radius: 25px; overflow: hidden; clear: both; ...

AngularJS - Get $scope variable from string -

AngularJS - Get $scope variable from string - so have $scope variable defined so: $scope.data = { filter: { state: 'wa', country: 'us' } }; how access in separate service string? e.g. data.filter in context of $scope . so have service method so: function dosomething($scope, variablename) { // want access $scope[variablename] here?? } i phone call controller so: service.dosomething($scope, 'data.filter'); you want utilize $eval: function dosomething($scope, variable) { var info = $scope.$eval(variable); // logs {state: "wa", country: "us"} console.log(data); } however, if wanted functionality every time contents changes, preferable utilize $watch function dosomething($scope, variable) { $scope.$watch(variable, function(data) { // logs {state: "wa", country: "us"} console.log(data); }); } angularjs

Invoking Linker Cross-Site-Iframe Ignoring the following script tags in the gwt.xml file -

Invoking Linker Cross-Site-Iframe Ignoring the following script tags in the gwt.xml file - //smart_gwt_exmp.gwt.xml <?xml version="1.0" encoding="utf-8"?> <module rename-to='smart_gwt_exmp'> <inherits name='com.google.gwt.user.user'/> <inherits name="com.smartgwt.smartgwt"/> <inherits name='com.google.gwt.user.theme.standard.standard'/> <entry-point class='package2.client.smart_gwt_exmp'/> <source path='client'/> <source path='shared'/> <add-linker name="xsiframe"/> <set-configuration-property name='xsiframe.failifscripttag' value='false'/> </module> //smart_gwt_exmp.html <!doctype html public "-//w3c//dtd html 4.01 transitional//en"> <html> <head> <meta http-equiv="content-t...

Http basic authentication using ldap credentials in spring security(spring-boot project) to secure rest service calls -

Http basic authentication using ldap credentials in spring security(spring-boot project) to secure rest service calls - using spring security basic authentication setup works against hardcoded username passwords shown here: http://thoughtfulsoftware.wordpress.com/2013/12/08/adding-security-to-spring-guides-rest-service/ so trying extend utilize ldap. completed set ldap authentication our ldap server now when seek phone call rest service through rest console plug-in authorization window keeps on popping username password. if cancel authorization fails, not sure going wrong @configuration @enablewebsecurity @enableglobalmethodsecurity(securedenabled = true) public class securityconfig extends websecurityconfigureradapter { @override protected void configure(httpsecurity http) throws exception {http .authorizerequests() .anyrequest().authenticated() .and() .csrf().disable() .httpbasic(); @override protect...

asp.net mvc - Best practice to inactivate records from database -

asp.net mvc - Best practice to inactivate records from database - i have 2 table in database 1.producttype 2.product user can set isactive = false in table. want user cannot set isactive=false in producttypetable if producttypeid used in product table. best practice. working in asp.net mvc 4 try create constructor method in model , set value of attribute false, this: public class producttype { public producttype() { isactive = false; } public int id { get; set; } public int isactive { get; set; } } when instance class, false, can set after too. in create method, don't set attribute isactive asp.net-mvc database

merge 2 lists A over B in scala -

merge 2 lists A over B in scala - i have 2 immutable case classes a(source, key, value) , b(source, key, value) want add together on b in such way when 'source' , 'key' doesn't exist, added b , when 'source' , 'key' exist replace value b 1 a. same way 'merge_array' function php works on multidimensional array. i tried 'a.union(b).groupby(.key)' , 'groupby(.source)' , 1st value. realized can never sure first value value of a. i'm quite new scala , ran out of ideas how functional immutable point of view. anyone has thought how this? thank you edit: case class translationvalue(source: string, key: string, value: string) def main(args:array[string]):unit = { println(merge(data1.toset, data2.toset)) } def merge(a: set[translationvalue], b: set[translationvalue]) = { a.union(b).groupby(_.key).flatmap{ case (s, v) => v.groupby(_.source).flatmap{case (s1, v1) => { (res <- 0 0)...

inheritance - Why C# does not allow abstract methods in non abstract class? -

inheritance - Why C# does not allow abstract methods in non abstract class? - i have base of operations class has "mock" method used in same way inherited classes protected class user{ protected void prepareuser() { // init } protected abstract display(); } public class person: user{ // override display } my problem of course of study can't declare abstract methods in non abstract class right oop approach have base of operations class init method triggered in same way , forcefulness inherited classes re-implement display method? first of can have abstract class method implementation bellow: protected abstract class user { protected void prepareuser() { // init } protected abstract void display(); } secondly cannot have protected class if not within other class. base of operations class cannot less accessible subclass. total working code should like: namespa...

javascript - phonegap websocket doesn't work -

javascript - phonegap websocket doesn't work - ok have tried in every way set phonegap-websocket plugin in phonegap project , there's no way work. had install plugin explained in page here, seems plugin correctly installed, if launch cordova plugin list appears, have added plugin in config.xml too, have added src cordova_plugin.js , cordova.js file in index.html, have build app , add together simple script in index.html js var ws=new websocket("ws://echo.websocket.org"); ws.onopen=function(){ alert('open') ws.send('hi') } ws.onmessage=function(){ alert('hello') } if set alerts before,between or after 2 methods cellphone test app, appears, ones within methods not, didn't work, if know why appreciate explanation. i'll write reply merit must go dawson london, project write work right need launched after device ready. javascript android cordova websocket phonegap-plugins

jquery - Position of the soft keyboard in Android -

jquery - Position of the soft keyboard in Android - i want soft keyboard popup right below input element whenever clicked. exact situation when click input element(on android smartphone) whole page(i.e entire dom) goes create room softkeyboard. don't want behavior. wanted is, softkeyboard should open popup without moving actual page. is there way this? tried lot changing position attribute nil worked. this code: <div data-role="page" id="home" data-theme="a" style="background-color:white"> <!--header--> <div data-role="header" data-theme="a"> <img src="img/hd.jpg" style="width:100%;z-index:0;"> <p><strong>booking online</strong></p> <a href="#splash" data-transition="slide" data-direction="reverse" data-shadow="false" class="ui-btn ui-nodisc-i...

Breeze query with multiple conditions -

Breeze query with multiple conditions - how write breeze query 2 'where' conditions? the next doesn't work: var query = breeze.entityquery.from("boilers") .where('boilermakeid', '==', $rootscope.boilermakeid) .and('actueel', '==', true); use predicates... http://www.breezejs.com/sites/all/apidocs/classes/predicate.html var pred1 = predicate.create("boilermakeid", "==", $rootscope.boilermakeid); var pred2 = predicate.create("actueel", "==", true); var newpred = pred1.and(pred2); var query = breeze.entityquery.from("boilers").where(newpred) breeze

netbeans - Attempting to Compile C++ App, Header File Not Found -

netbeans - Attempting to Compile C++ App, Header File Not Found - i attempting compile c++ application using netbeans. first c++ application i've built in while. surprise have setup environment , configured including netbeans, mingw, , msys; problem have while attempting compile file note found error. error message below states isn't nowadays can navigate in windows file scheme in netbeans part of project. have no uncertainty there simple step overlooking. file part of boost api , it's root folder in folder of project in turn included source folder project (under options). g++ -c -g -mmd -mp -mf "build/debug/mingw-windows/addrman.o.d" -o build/debug/mingw- windows/addrman.o addrman.cpp in file included netbase.h:10:0, addrman.h:7, addrman.cpp:5: serialize.h:19:48: fatal error: boost/type_traits/is_fundamental.hpp: no such file or directory #include <boost/type_traits/is_fundamental.hpp> is description ,...

grails - Replacing invokeMethod to intercept Controller methods -

grails - Replacing invokeMethod to intercept Controller methods - i intercept methods in controllers replacing invokemethod closure of expandometaclass. i created new grails project (2.3.5). created new controller, called accountcontroller: package com.invoke.test class accountcontroller { def index() { system.out.println("index called") } } then created additional bootstrap called securitybootstrap: class securitybootstrap { def grailsapplication def verifymethodaccess = { string name, args -> log.info "called method ${name}" def method = delegate.metaclass.getmetamethod(name, args) if (method) { homecoming method.invoke(delegate, args) } homecoming null } def init = { servletcontext -> grailsapplication.controllerclasses.each { controllerclass -> controllerclass.clazz.metaclass.invokemethod = verifymethodaccess log.info "replaced invokemethod closure on ${controllerc...

html - Table like format through divs and css -

html - Table like format through divs and css - i have next css , html code: <style type="text/css"> .formlayout { background-color: #f3f3f3; border: solid 1px #a1a1a1; padding: 10px; width: 300px; border-radius: 1em; } .formlayout label, .formlayout input { display: block; width: 120px; float: left; margin-bottom: 10px; } .formlayout label { text-align: right; padding-right: 20px; } br { clear: left; } .box_header { font-weight: 600; color: #000000; text-align: center; border-radius: 1em; } </style> <div class="formlayout" style="float:left; margin-left: 100px; margin-top:5em;"> <div class="box_header"> install </div> <label>type</label> <label>amount</label> ...

fortran - derived data types with MPI -

fortran - derived data types with MPI - i'm learning bcasting info types in fortran , have code takes 2 values terminal , displays them on each process. combination value1/value2 of type integer/integer , integer/real works, combination integer/real*8 fails. the code is: use mpi implicit none integer :: ierror, pid, ncpu, root = 0 integer :: counts, newtype, extent integer, dimension(2) :: oldtypes, blockcounts, offsets type value integer :: value1 = 0 real*8 :: value2 end type type (value) input phone call mpi_init(ierror) phone call mpi_comm_rank(mpi_comm_world, pid, ierror) phone call mpi_comm_size(mpi_comm_world, ncpu, ierror) ! setup of 1 mpi_integer field: value1 offsets(1) = 0 oldtypes(1) = mpi_integer blockcounts(1) = 1 ! setup of 1 mpi_real8 field: value2 phone call mpi_type_extent(mpi_integer, extent, ierror) !determine offset of mpi_integer offsets(2) = blockcounts(1)*extent !offset 1 mpi_integer extents oldtypes(2) = mpi_r...

c++ - Using a dll in a qt application program -

c++ - Using a dll in a qt application program - everybody, beginner , have still have things confusing about. i have programme qt want include extern library. generaly, include extern library utilize macros : includepath += "path/to/the/include/headers/file" libs += -l"path/to/where/the/lib/are" \ -llibname // .a gcc .lib mscv then can utilize library in program. @ end qt aplication programme utilize .dll associated lib name. question, why can't utilize straight .dll in qt ? don't know much difference between ".lib" , ".dll" execpt ".dll" used @ runtime. my problemen have library dll , include headers file. there way utilize library or must have .a or .lib associated ? edit : ok now,thanks useful advice, understand improve difference between, .lib , .dll , how utilize dll without .lib header. having issue. header, can create object, compilator doesn't bother can't find object , method...

javascript - Setting C.prototype.constructor = C leads to StackOverflow -

javascript - Setting C.prototype.constructor = C leads to StackOverflow - i have been learning js inheritance , study project, i'm creating own implementation of inheritance base of operations class extend method create new classes. utilize c.prototype.constructor = c stoyan sefanov says to, leads stack overflow when seek phone call base of operations class constructor. the problem sec level of inheritance keeps on calling it's own constructor! if remove line, inheritance seems work fine. jsfiddle sample. here implementation of base of operations class code. (function(testframework, undefined) { testframework.class = function() {}; testframework.class.extend = function(ctor) { var base of operations = this; var derived = ctor; //duplicate static property access derived (var property in base) { if (base.hasownproperty(property)) derived[property] = base[property]; } //create lightw...

multiple columns - Kendo DropDownList Template with Blank Item -

multiple columns - Kendo DropDownList Template with Blank Item - i trying utilize kendo dropdownlist , provide blank item @ top of list, utilize template provide multiple columns. var tickettype = $("#tickettype").kendodropdownlist ({ datatextfield: "tickettypename", datavaluefield: "tickettypeid", optionlabel: " ", //this should add together blank item, errors out instead. datasource: { serverfiltering: true, type: "jsonp", transport: { read: { url: "../service/incidentmanagement.asmx/gettickettypelist", contenttype: "application/json; charset=utf-8", type: "post" } }, schema: { data: "d" } }, template: "<div><span>${tickettypename}</span><span>${tickettypedescription}...

Error SQL in VBA Access 2010 -

Error SQL in VBA Access 2010 - i'm trying write query in ms access 2010 in order utilize print report, gives me "missing parameter" error in "set qd" line, hereunder code wrote, can please help me , tell me wrong code: `private sub command5_click() dim qd dao.querydef dim rs dao.recordset dim strsql string dim strfrom, strto string strfrom = [forms]![frmprintselection]![txtfrom] strto = [forms]![frmprintselection]![txtto] strsql = "select tblinvoicehead.customernumber, tblcustomers.accountname,tblcustomers.address, tblcustomers.phone1, tblcustomers.phone2," _ & "tblcustomers.mobile1, tblcustomers.mobile2, tblinvoicehead.invoicenumber, tblinvoicehead.invoicedate, tblinvoicehead.totalinvoice," _ & "tblinvoicehead.cashdiscount, tblinvoicedetails.item, tblinvoicedetails.unit, tblinvoicedetails.qtn, tblinvoicedetails.price," _ & "tblinvoicedetails.[discount%], tblinvoicedetails.cashdiscount, tblinvoice...

c++ - undefined reference to `WinMain@16' Code::Blocks -

c++ - undefined reference to `WinMain@16' Code::Blocks - this question has reply here: undefined reference `winmain@16' 3 answers what undefined reference/unresolved external symbol error , how prepare it? 23 answers i have problem new project. there 1 error, don't know how fix. undefined reference `winmain@16' i read lot of topic on different forums issue, couldn't find proper solution. said because project type wrong.(instead of console applicaton, windows application beingness used, etc..) confirmed in project's properties, project indeed consol application, don't have clue, i'm supposed prepare it. by way, i'm using code::blocks ide, if matters. give thanks guys in advance help, hope can find solution. c++ codeblocks undefined...

Position of the text changes when I resume my android app -

Position of the text changes when I resume my android app - i creating android app needs draw text in canvas. drawing text in custom view. text drawn in ondraw() of custom view using drawtext() of canvas class. the issue text position perfect. whenever press home button , 1 time again resumes app position of drawn text changes.the issue seems coming kitkat. protected void ondraw(canvas canvas) { super.ondraw(canvas); utility utility = new utility(); canvas.drawcircle((radiusofcircle + margin), (radiusofcircle + margin), radiusofcircle, paint); endpath.moveto((2*radiusofcircle + margin), (radiusofcircle + margin)); linepaint.setcolor(color.gray); endpath.lineto(stopx, (radiusofcircle + margin)); canvas.drawpath(endpath, linepaint); linepaint.setcolor(color.parsecolor(color)); progresspath.moveto((2*radiusofcircle + margin), (radiusofcircle + margin)); progresspath.lineto(stopofprogress, (radiusofcircle +...

c++ - Callback function not being called for pqueue class -

c++ - Callback function not being called for pqueue class - i have templatized pqueue, has function, dequeue: template <typename valtype> valtype pqueue<valtype>::dequeuemax(int(cmp(valtype one, valtype two))) { if (isempty()) error("tried dequeue max empty pqueue!"); int maxindex = 0; // assume first element largest until proven otherwise valtype maxvalue = entries[0]; (int = 1; < entries.size(); i++) { cout << "the larger 1 is: " << entries[i] << endl; if (entries[i] > maxvalue) { maxvalue = entries[i]; maxindex = i; } } entries.removeat(maxindex); // remove entry vector homecoming maxvalue; } the constructor pqueue this: pqueue(int (cmpfn)(valtype, valtype) = operatorcmp); everything else looks working normally. i trying enqueue struct called arct, works fine: set<arct *>::iterator iter = location_node->outgoing.iterator(); while (iter.hasnext()) { ...

How to implement two months calendar using android -

How to implement two months calendar using android - i want implement 2 month calendar in android application below image, i tried googling cant source code 2 months calendar,pls give source code 2 months calendar if any... awaiting replies... it possible implement 2 months calendar using grid view. main advantage of grid view , having autoscroll property default.so seek utilize gridview on android xml. refer code below, <gridview android:id="@+id/calendar" android:numcolumns="7" android:layout_width="fill_parent" android:layout_height="wrap_content"> </gridview> android android-calendar

How to select just the cols which are NOT NULL ? mysql -

How to select just the cols which are NOT NULL ? mysql - i have table : =================== col1 | col2 | col3| ------------------- 1 null 1 1 1 1 null null 1 . . . i want write query homecoming $result , $result equal : $result[0]{ "col1":1 , "col3":1 }; $result[1]{ "col1":1 , "col2":1 , "col3":1 }; $result[2]{ "col3":1 }; how ? mysql

Java SQL COUNT Value -

Java SQL COUNT Value - i trying homecoming count value in attached java, have.. package com.example.tests; import java.awt.geom.generalpath; import java.sql.connection; import java.sql.drivermanager; import java.sql.resultset; import java.sql.sqlexception; import java.sql.statement; public class testnew { public void generateid(){ int count; seek { class.forname("com.microsoft.sqlserver.jdbc.sqlserverdriver"); connection conn = drivermanager.getconnection("jdbc:sqlserver://ip:port;databasename=blabla;integratedsecurity=true;"); system.out.println("connection successfull"); system.out.println(conn); //-------------------------------------------------------------------- statement stmt = conn.createstatement(); string query1= "select count(*) dbo.vsubscriberreporting [subscriberemailaddressstatusid] in (5,1,6,7) , [subscriberstatusid] = 1 , [subscriberaddresseestatusid] = 1 , c...

oracle - Unable to invoke Stored Procedure using Spring JDBC -

oracle - Unable to invoke Stored Procedure using Spring JDBC - we unable phone call stored procedure using spring jdbc. below code snippet. procedure signature procedure get_cash_details ( p_org_id in varchar2, p_receipt_number in varchar2, p_result_type in varchar2, x_cash_detail out cash_detail_rec, x_error_msg out varchar2 ); cash_detail_rec of type strut returning record type , 2 arrays java code : public void callstoredprocedure(string receiptnumber, string orgid, string type) { cashdetailsprocedure procedure = new cashdetailsprocedure(jdbctemplate); procedure.execute(); } public class cashdetailsprocedure extends storedprocedure { @autowired jdbctemplate jdbctemplate; public cashdetailsprocedure(jdbctemplate jdbctemplate) { super(jdbctemplate, "bpel_llpocwrapper.xx_ar_cashrcpt_rcv_pkg$get_ca "); declareparameter(new sqlparame...