Posts

Showing posts from April, 2013

Chrome page does not finish loading -

Chrome page does not finish loading - i have simple web page running locally on machine using xampp. when in chrome , load page, page appears load fine , appears expected. icon in tab continues show spinning "loading" icon though, never stops. using chrome developer tools can see network tab , there nil showing loading if utilize net explorer page loads , there no loading icon. any thought why chrome might think still loading something? i had same problem , found out 1 of chrome extensions. tried loading site in incognito page , loading symbol stopped after page finished. went through extensions see not allowed in incognito , found "mailto: gmail™ 2.4" causing problem. google-chrome

javascript - return statement returning before finishing the task -

javascript - return statement returning before finishing the task - this question has reply here: how homecoming response asynchronous call? 11 answers hi using kill function in application, here calling kill function within loop each time homecoming d each iteration but times getting d value before completion of d.done() , after returning d calling d.done() body please suggest me concept have utilize here kill: function() { var t = , url = "my url"//app.data.url('user', p.get('id'), 'dissociate_tag', id) , d = _.http.del(url); d.done(function() { t.resettile(); t.set('killed', true); }); homecoming d; } you give done callback method, called when it's finished, d returned before method passed done called. the trick have code calls kill wait on d finish (if

linux - Nginx setup for local webapp and websocket -

linux - Nginx setup for local webapp and websocket - following nginx configuration, server { //part-1 hear 80; server_name _; location / { proxy_pass http://127.0.0.1:8090; proxy_redirect off; proxy_pass_request_headers on; proxy_set_header host $http_host; proxy_set_header x-real-ip $remote_addr; proxy_http_version 1.1; proxy_set_header upgrade $http_upgrade; proxy_set_header connection upgrade; } } server { //part-2 hear 80; server_name service; root /usr/local/tomcat7/webapps/service-snapshot; location / { proxy_set_header x-forwarded-host $host; proxy_set_header x-forwarded-server $host; proxy_set_header x-forwarded-for $proxy_add_x_forwarded_for; proxy_pass http://127.0.0.1:8080/serviceui/;

ios - Facebook SDK, Login: How to deal with friends_list permission rejection -

ios - Facebook SDK, Login: How to deal with friends_list permission rejection - i have app work if users take give me friend list via facebook. app not usable if don't know friend using app. then, if user refuses give me friends list permission, app won't usable. is there way forcefulness user take permission (and if refuses, reject facebook login , send him login page), or discard previous app acceptation until take app adequate permissions ? i'm using facebook sdk v3. thanks in advance. ios facebook facebook-graph-api permissions facebook-ios-sdk

tsql - Strip off any characters from a string in SQL Server -

tsql - Strip off any characters from a string in SQL Server - i'm trying write stored procedures give next value on row. in case, i'm sending reference number , stored procedure returns next ref number using min , > . ref number in table includes characters 123gf, 256er, 25gd gives me error when converting varchar int . how strip off non-numerical number before comparing value passing value? this current procedure code: create procedure [dbo].nextprevious @refid integer, @next bit begin set nocount on; declare @lreturn integer if(@next = 1) select ref table ref =( select min(ref) table ref > @refid) else select ref table ref =( select max(ref) [ref ref < @refid) select @lreturn = @@rowcount homecoming @lreturn end go if using sqlserver, below other solution using replace function: select replace(ref,'a','') table --to cutting off 1

c++ - Garbage values in matching two matrices (having double type values) -

c++ - Garbage values in matching two matrices (having double type values) - i have 2 2d matrices consist of elements having double datatype. want match these values using formula value = | (a[i][j] - b[i][j]) | / ( 1 + a[i][j] + b[i][j] ) my code: double colorcorrelogram::correlogrammatching(double (&a)[num_colorbin][distance_range] , double (&b)[num_colorbin][distance_range]) { for(int i=0; i<num_colorbin; i++) { for(int j=0; j<distance_range; j++) { double value = ( (std::abs)( a[i][j] - b[i][j] ) ) / (1 + a[i][j] + b[i][j]); cout<<"\n( "<<a[i][j] <<" , " <<b[i][j]<<" )"<<" gave "<<value<<" "; } } homecoming 0; } matrix - 1: matrix - 2: result: problem: why values negative in result, when have used std::abs . there garbage values can seen in line-2 in

Calculate the grand total with javascript (onkeyup) -

Calculate the grand total with javascript (onkeyup) - how calculate grand total total using java script (onkeyup)? coding <html> <head> <form method = "post" action="text.php" name="form"> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="css/jquery-ui.css"/> <script src="js/jquery-1.9.1.js"></script> <script src="js/jquery-ui.js"></script> <!--<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>--> <script type="text/javascript"> function cal1() { var = $(".qty1").val(); var b = $(".price1").val(); c1 = * b; //a * b $(".total1").val(c1); } function cal2() { var

magento - odoo deleted module is still in list -

magento - odoo deleted module is still in list - i installed odoo 8.0. manually added mangento connector module, means downloaded module , installed via setup.py script. after updating module list correctly found module in module list in odoo well. now, wanted delete module , deletet module in directory found it. however, after clearing cache, restarting nginx, restarting odoo, restarting server alltogether still module in module list. searche entire harddisk files containing module name. still, without finding file containing "magento", still module result. checked addon folders several time. start think not understand principle of odoo... can help me? why module still displayed, after learned odoo browses through addon folders lookinf module upon refreshing module list, there shouldn't module, correct? thanks peter 1.) view installed modules list instead of default icon (kanban) mode. button on top right of module page. 2.) select check box next mangento

excel - How to Use Specified Ranges in Search Equations in VBA -

excel - How to Use Specified Ranges in Search Equations in VBA - i trying utilize countif statement locate matches in 2 criterion on separate excel sheets within vba code. if countif statement returns value other 0, code pull row in separate sheet. however, coding hard because row changing length , row location based on amount of raw info code pulls on given day. to clarify code below, i'll explain trying split value located in sheet named "lever arm" value located in sheet named "shop average calc" , set resulting reply in sheet named "sheet3". however, want split values if titles in row 1 , 2 match 1 another, i.e. split 'lever arm'!b3 'shop average calc'!b107 (could b107 b200 depending on day), 'lever arm'!b1 , 'lever arm'!b2 must match 'shop average calc'!b1 , 'shop average calc'!b2. i have matched columns of info using code below, never rows. range("b3") = "=if

ios - nil value when populating views from struct model -

ios - nil value when populating views from struct model - i'm having problem populating views data. made struct called weatherdata.swift holds properties parsed json. struct weatherdata { var currenttemp: int? init( city: nsstring) { //grab json via nsurlsession & swiftyjson , assign in closure self.currenttemp = json["currently"]["temperature"].int println("heres current temp: \(self.currenttemp!)") //heres current temp: 65 } } cool prints fine! @ view controller when i'm trying assign value uilabels: func requestdataforcity() { currentlocationdata = weatherdata(city: savedcity) var label = uilabel() label.frame = cgrectmake(0, 0, 40, 40) label.backgroundcolor = uicolor.yellowcolor() label.text = "\(currentlocationdata.currenttemp!)" scrollview.addsubview(label) } i nil currentlocationdata.currenttemp. thought maybe code assigning currenttemp property label before initialized, used nsno

c# - Algorithm for testing inequality of ordered large collections -

c# - Algorithm for testing inequality of ordered large collections - ok, need test if 2 ienumerable<t> equal. order of elements is important, means that: {1, 2, 4, 1, 3} , {1, 2, 1, 3, 4} should not equal. i've seen few answers on site explaining how linq : example, here the problem have repeatedly test equality of pretty big collections (thousands of elements) have high probability of not beingness equal, performance factor bear in mind. way see it, linq methods shown in referred reply ( count or except ) need to, if i'm not mistaken, iterate through whole collection in general case not necessary. i came code, works reasonably (i think) , fast enough. wondering if i'm missing obvious built in way of doing (i don't want reinvent wheel here if possible.) public static bool isequalto<t>(this ienumerable<t> inner, ienumerable<t> other) t: iequatable<t> { if (inner == null) throw new argumentnullexception(

clojure - How to return a list in the winning-hands function of poker? -

clojure - How to return a list in the winning-hands function of poker? - as mentioned before i'm working on poker hands in clojure, i'm on final stages of completion. i'm having problem in winning-hand function, should returns hand list of hands highest, if there ties, should homecoming list of of hands. so, here winning-hand function: (defn hand-rank "return value indicating how high hand ranks." [hand] (let [ranks (card-ranks hand)] (cond (and (straight ranks) (u-flush hand)) (-> [] (conj 8) (conj (apply max ranks))) (kind 4 ranks) (-> [] (conj 7) (conj (kind 4 ranks)) (conj (kind 1 ranks))) (and (kind 3 ranks) (kind 2 ranks)) (-> [] (conj 6) (conj (kind 3 ranks)) (conj (kind 2 ranks))) (u-flush hand) (-> [] (conj 5) (conj ranks)) (straight ranks) (conj [4] (apply max ranks)) (kind 3

python - Fibonacci Sequence Mod 1000000007 -

python - Fibonacci Sequence Mod 1000000007 - everyone knows fibonacci sequence goes f[0]=1, f[1]=1, f[2]=2, f[3]=3, f[4]=5, f[5]=8 , with f[n] = f[n-1]+f[n-2] now, how compute number in fibonacci sequence when taken modulo 1000000007 = 10^9+7? needs run efficiently possible, , in python language :) for illustration f[10**15] should take less sec or so i know matrix exponentiation works, how right matrix exponentiation reflect modulo? (another example, see http://www.nayuki.io/page/fast-fibonacci-algorithms) python

ssh - use rsa_id file with git -

ssh - use rsa_id file with git - i have git bash installed , next file : "myname.rsa_id" i have git repository link : ssh://apache@xxxx:/appli/apache/git/folders.git when doing git clone link, it's asking me password don't have, know have utilize rsa file, don't know how, have tried multiple methods, adding file in .ssh folder in home git, it's not working. does explain me how clone repository. thanks in advance by default, git private key named id_rsa. other alternative add together key ssh agent used automatically when connecting via ssh. ssh-add ~/.ssh/myname.rsa_id you'll need create sure ssh agent running work. operating scheme running? git ssh

jquery - JavaScript font-size cookie -

jquery - JavaScript font-size cookie - i'm kind of new javascript. i've created function changes font size , save size in cookie, user won't have alter every time. haven't got cookie part work. i'm using next libraries: jquery javascript library v1.11.1 , https://developer.mozilla.org/en-us/docs/web/api/document.cookie function change_size(element, size) { var new_size; var current = parseint(doccookies.getitem("fontsize")); if (current !== "") { current = parseint(element.css('font-size')); } if (size === 'smaller') { if (current > 12) { new_size = current - 2; } } else if (size === 'bigger') { if (current < 22) { new_size = current + 2; } } element.css('font-size', new_size + 'px'); doccookies.setitem("fontsize", num.tostring(new_size), infinity); } $('#smaller').click(function() { change_size($('p'), 'smaller')

c - glibc detected - double free or corruption (!prev) -

c - glibc detected - double free or corruption (!prev) - i'm getting error may see in title, , can't figure out why. the code: class="lang-c prettyprint-override"> #include <cstdlib> #include <cstdio> struct cdata { int* num; char* adr; char* ph; void (*init)(cdata* owner); void (*del)(cdata* owner); char* (*getadr)(cdata* owner); void (*setadr)(cdata* owner, char* adr); }; void cdata_init(cdata* owner) { owner->num = (int*)malloc(sizeof(int)); owner->adr = (char*)malloc(sizeof(char)*255); owner->ph = (char*)malloc(sizeof(char)*255); } void cdata_del(cdata* owner) { free(owner->num); free(owner->adr); free(owner->ph); } char* cdata_getadr(cdata* owner) { homecoming owner->adr; } void cdata_setadr(cdata* owner, char* adr) { owner->adr = adr; } int main() { cdata* info = (cdata*)malloc(sizeof(cdata)); data->init = cdata_init; data->d

asp.net - JWPlayer access files on DFS Share -

asp.net - JWPlayer access files on DFS Share - i have asp.net (.net 3.5) website , want utilize jwplayer 6.10. can player display won't play files. i'm setting filename in c# codebehind , seems working fine. however, seems jwplayer can't connect , read mp3 file dfs share location. i've tried several values filename such 'file://xyz/files/adf/1234.mp3', 'file:///\xyz\files/ad/1234.mp3', '//xyz/files/adf/1234.mp3', etc. can't seem find format works. right format jwplayer access file on dfs? <head> <script src="jwplayer-6.10/jwplayer.js" type="text/javascript"></script> <script>jwplayer.key = "abc123==";</script> <script src="jwplayer-6.10/jwplayer.html5.js" type="text/javascript"></script> </head> <body> jwplayer('jw6player').setup({ "flashplayer": "jwplayer-6.10/jwplayer.flash.swf"

Rails paperclip and update_attributes for model -

Rails paperclip and update_attributes for model - as see in logs, when update_attributes model have attachment, no matter attribute refresh, total entry refreshed - example: i have model user have fields: -active -photo ( :thumb, :large, :org etc. styles paperclip) when made @user.update_attributes(:active => true), takes long time because (as see in logs) photo refreshed paperclip , attachment recreated. is normal behavior or have bug ? this log update model id: ruby-on-rails paperclip

python - Compute numpy.inner() over first (instead of last) axis -

python - Compute numpy.inner() over first (instead of last) axis - i'm trying create function numpy.inner , sums on first axis of both arrays instead of lastly axis. i'm using tensordot rollaxis : def inner1(a, b): homecoming numpy.tensordot(numpy.rollaxis(a, 0, len(a.shape)), b, 1) but i'm wondering: there improve way? perhaps 1 doesn't require me roll axes? i sense einsum should create possible, i'm not sure how utilize here. seems require me hard-code dimensionality of a , b when specify subscripts string, can't here because there no particular requirement on input dimensionality. (note: am aware there performance implications summing on first axis instead of last, i'm ignoring them here.) i think want np.tensordot(a, b, (0, 0)) . python arrays numpy linear-algebra inner-product

download - Best Apache Configuration -

download - Best Apache Configuration - please, can help me best apache configuration i own servers files download, download files direct links ex: domain.com/files.rar without programming or php function the problem: having high load or stop servers for can help me best apache configuration such as: server limit max clients max requests per kid keep-alive keep-alive timeout max keep-alive requests etc. my servers 4gb ram , hdd drives, , 100mb-ps , 1gbmb-ps thanks. separate static , dynamic content use separate servers static , dynamic content. apache processes serving dynamic content carry overhead , swell size of content beingness served, never decreasing in size. each process incur size of loaded php or perl libraries. 6mb-30mb process size [or 10% of server's memory] not unusual, , becomes waist of resources serving static content. for more efficient utilize of scheme memory, either utilize mod_proxy pass specific requests onto apac

resharper - R# makes my Visual Studio 2012 go into 9% CPU usage every couple of minutes plus intense I/O -

resharper - R# makes my Visual Studio 2012 go into 9% CPU usage every couple of minutes plus intense I/O - the 9% cpu usage accompanied unusually high i/o total rate reported process hacker. namely in mb/s whereas rest in kb/s. has notable effect on user experience within visual studio - lagging. solution wide analysis disabled. huge source files (above 1mb in size) excluded r# the entire source code tree on ssd drive. one solution contains 73 projects. 1 - 115 projects. no such influxes in cpu , io utilization occur when r# disabled. i have browsed through various q/a sites on internet. advices can see there - turn off or feature not acceptable me - want r# features. any ideas? edit i did analysis using sysinternals process monitor. first, have captured events during abnormal operation (9% cpu , high i/o) , during normal operation. capture format csv , file scheme events saved. visual studio did nil visibly useful during time, except beingness open same solution of

html - bootstrap navbar centered in footer -

html - bootstrap navbar centered in footer - i want center ul tag in div html code <footer> <div class="wrap"> <ul class="nav navbar-nav social"> <li><a href="#">fb</a></li> <li><a href="#">li</a></li> <li><a href="#">tw</a></li> <li><a href="#">you</a></li> </ul> </div> </footer> and css footer{ position: fixed; width: 100%; background: red; height: 70px; bottom: 0; z-index: 6; } footer .wrap{ margin: 10px auto; } .social{ width: 250px; } i post screenshot of actualy situation: p.s: responsive, , sorry english in case can cancel float on navbar-nav element , center margin: 0 auto : .social { width: 250px; float: none; margin: 0 auto; } demo: http://p

javascript - PHP socket receive many data at same time -

javascript - PHP socket receive many data at same time - i'm using php , websocket (javascript) communicate between client , server. process is: - server start socket, client connects to. - when server have new data, notifies clients. - client feedback received notification, server receives info , not sent info again. if client not respond after 10 seconds, server sent again. case server sent client server many message 1 time time, client reply server server can not read data. or when many clients reply @ same time, server neither can not read data. sever using function 'socket_recv' receive info client. problem how message in server. detail code: // create socket , start hear $socket = socket_create(af_inet, sock_stream, sol_tcp); socket_set_option($socket, sol_socket, so_reuseaddr, 1); socket_bind($socket, 0, 1155); socket_listen($socket); while (true) { // check new info , sent clients .......... .......... // end of t

swift - XCode6 NSSplitViewController Holding Priorities and canCollapse not working -

swift - XCode6 NSSplitViewController Holding Priorities and canCollapse not working - i hoping can help me out this. whatever do, either though ib or in code, cannot create new nssplitviewcontroller , items collapsable or hold priorities. it cannot done interface builder although video shows otherwise: https://www.youtube.com/watch?v=ziiupo4f6tq i can create splitview items have minimum width in code pretty much it. tested both swift , objective-c implementations without luck. this have written in swift: override func viewdidload() { super.viewdidload() // --- var left: nssplitviewitem = self.splitviewitems[0] nssplitviewitem var right: nssplitviewitem = self.splitviewitems[1] nssplitviewitem // --- // note: these not working in interface builder self.view.addconstraint(nslayoutconstraint( item: left.viewcontroller.view, attribute: nslayoutattribute.width, relatedby: nslayoutrelation.greaterthanorequal,

sql - php - count elements in array -

sql - php - count elements in array - i trying count elements in array, doens't work intended: i have while loop, loops through user table: while($refsdata=$refs->fetch()){ $new_array = array($refsdata['id']); print_r($new_array); $outcome = $rentedrefs->_paying($new_array); } the print_r($new_array); gives me: array ( [0] => 90427 ) array ( [0] => 90428 ) array ( [0] => 90429 ) array ( [0] => 90430 ) array ( [0] => 90431 ) array ( [0] => 90432 ) array ( [0] => 90433 ) array ( [0] => 90434 ) array ( [0] => 90435 ) array ( [0] => 90436 ) inside _paying function, count number of values array: function _paying($referrals_array){ echo count($referrals_array); } the problem is, above count($referrals_array); gives me: 1 , when should 10 what doing wrong? you create new array @ each step of loop. instead should written this: $new_array = arra

internet explorer 11 - 0x800a01b6 - JavaScript runtime error: Object doesn't support property or method 'timepicker' -

internet explorer 11 - 0x800a01b6 - JavaScript runtime error: Object doesn't support property or method 'timepicker' - while running project in net explorer caught message " 0x800a01b6 - javascript runtime error: object doesn't back upwards property or method 'timepicker'" , indicated error occurs on 1 of js files attached project. error points line on js file --> $('.timepicker-default').timepicker(); there no other problems datetime picker works fine. project runs fine on chrome , firefox. happens ie explorer (ie 11 , version : 11.0.9600.17351) hopefully managed solve problem. not sure whether approach right or wrong. did ... 1. removed of references kid pages , set on master/layout page. 2. added jquery-1.9.1.min.js , jquery.js files on kid pages 3. added <script type="text/javascript"> $('.default-date-picker').datepicker({ format: 'mm-dd-yyyy' });

spring - How Callback parameter works using WebHCat/Hive? -

spring - How Callback parameter works using WebHCat/Hive? - i followed documentation in webhcat reference hive my goal phone call spring controller 1 time hive job status succeeded. **here inputs :** **url** : http://localhost:50111/templeton/v1/hive?user.name=hduser **parameter:** callback : http://domain:port/project-name/mycall/$jobid the $jobid paramter replaced actual jobid 1 time processing completed. ** here controller : ** @requestmapping(value = "/mycall/{jobid}", method = requestmethod.get) public void callback( @pathvariable string jobid) throws ioexception { logger.debug("jobid : {}", jobid ); } i've done sucsefully in node.js express. i'll seek explain though. first utilize request module submit job var cmd = "http://"+targ+":"+port+"/templeton/v1/hive"; request({ method: 'post', url: cmd, form: { 'user.name': user, // variable user.nam

javascript - CodeMirror going into infinite loop when implementing on change function -

javascript - CodeMirror going into infinite loop when implementing on change function - i need track alter in codemirror editor. implemented: codemirrorinstance.on("change", function(codemirrorinstance){ $scope.onchangefunc(codemirrorinstance); } ); in onchangefunc insert based on status new value using codemirrorinstance.setvalue(newcode); apparently leads infinite loop. how break vicious circle? setvalue trigger "change" event (it changes content, after all). you'll have create alter handler clever plenty not cause additional changes changes caused. looking @ origin property of sec argument passed "change" event handler might work -- contains sting identifies source of change, "setvalue" when setvalue called. javascript angularjs codemirror

javascript - ng-click does not recognize the $index -

javascript - ng-click does not recognize the $index - {{tab}} should alter when click on <a ng-click> unfortunately not alter tab value $index class="snippet-code-js lang-js prettyprint-override"> (function() { // angular var app = angular.module('app', []); app.controller('testimonialcontroller', function() { this.role = [{ 'temeperiod': 'sep 2009 -<br> sep 2010', 'position': 'developer', 'company': 'company', 'location': 'london, united kingdom', 'description': 'lorem ipsum dolor sit down amet, consectetur adipisicing elit, sed eiusmod tempor cididunt ut labore et dolore magna aliqua. ut enim advertisement minim veniam,proident, sunt in culpa qui' }, { 'temeperiod': 'sep 2009 -<br> sep 2010', 'position': 'front end developer', 'com

twitter bootstrap - PHP: Not Showing The Right Data Using Echo -

twitter bootstrap - PHP: Not Showing The Right Data Using Echo - i'm trying echo info database within modal, problem info showing within modal not info looking for. screenshot below. clicked 1st link info show sec one. sounds "index off one" logic error (possible referencing array element starting @ 1 rather 0?). i agree deefour though, need see code sample accurately investigate... twitter-bootstrap modal-dialog echo

wordpress - How to add "active" class to wp_nav_menu() current menu item (simple way) -

wordpress - How to add "active" class to wp_nav_menu() current menu item (simple way) - i creating custom wordpress theme using starter theme _underscores. using bootstrap front-end framework. i modify wp_nav_menu assigns current menu item class="active" instead of class="current-menu-item" (which default). or maybe @ to the lowest degree assigns both of these classes. need in order utilize .active class bootstrap.css. here illustration of have (all these classes wp generated, please scroll see mean): <ul id="menu-main-menu" class="nav navbar-nav"> <li id="menu-item-14" class="menu-item menu-item-type-post_type menu-item-object-page current-menu-item page_item page-item-13 current_page_item menu-item-14"><a href="">item1</a></li> <li id="menu-item-12" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-12"><

python - Deleting all but a few Variables from a Dataset in SPSS -

python - Deleting all but a few Variables from a Dataset in SPSS - i have have info set 1000 variables. want work on dataset little subset of these variables. convenient ways delete non needed variables? using delete variable command such as delete variables var1 var13 var 15 var 17 var var35 ... would quite annoying , error-prone. sample data data list list (",") / create (a18) cost (f4) mpg (f2) rep78 (f1) hdroom (comma1.1) trunk (f2) weight (f4) length (f3) turn (f2) displ (f3) gratio (comma2.2) foreign (f1) . begin data. amc concord, 4099, , 3, 2.5, 11, 2930, 186, 40, 121, 3.58, 0 amc pacer, 4749, , 3, 3.0, 11, 3350, 173, 40, 258, 2.53, 0 amc spirit, 3799, , 3, .0, 12, 2640, 168, 35, 121, 3.08, 0 audi 5000, 9690, 17, 5, 3.0, 15, 2830, 189, 37, 131, 3.20, 1 audi fox, 6295, 23, 3, 2.5, 11, 2070, 174, 36, 97, 3.70, 1 bmw 320i, 9735, 25, 4, 2.5, 12, 2650, 177, 34, 121, 3.64, 1 buick cen

javascript - how to split content on one page while first one displays first and other is hidden? -

javascript - how to split content on one page while first one displays first and other is hidden? - i'm trying display content on 1 page there 2 parts of first content display in total page while other 1 hidden first content time out after 2 minutes , after 2 minutes other part of content display below sample of code help appreciated. <div id="top"> *video play in total screen on total page using javascript time out after 2 mininutes , hide video , show the "bottom" text * <iframe width="100%" height="100%" src="//www.youtube.com/embed/lam6hufut5k?rel=0" frameborder="0" allowfullscreen></iframe> </div> <div id="bottom">*after 2 mins text content display on total page </div> css body { width: 100% ; height: 100% ; margin: 0px ;} solution 100% working without jquery : ( can see working here : http://jsfiddle.net/akmozo/ws24yd9j/ ) of course, s

microsoft dynamics - Is it possible to alter the lookup behavior behind a quickfilter in NAV '13 R2? -

microsoft dynamics - Is it possible to alter the lookup behavior behind a quickfilter in NAV '13 R2? - perhaps matter of not understanding lookup triggers on tables , pages... when perform item lookup quickfilter box on item list page, want take input , modify wildcards so: newlookup := convertstr(originallookup, '-', '*'); newlookup := originallookup + '|' + newlookup; ... can tell far, onlookup triggers don't fire when performing quickfilter... @ least, i've set code in onlookup triggers both table , page, without performing lookup action in either case, , quickfilter still homecoming results which, far understand, shouldn't happen if haven't handled aspects of lookup myself. so: is possible modify behavior of lookup behind quickfilter in c/al? if so, do that? using onlookup trigger wrong , it's matter of getting right, or have go somewhere else? quick filter in nav edit box on right side of page "type fi

Azure site deployment with Git without credentials -

Azure site deployment with Git without credentials - i have windows azure site. deploy code azure using git source command tool. asks me credentials every time. there anyway force code without entering password? can add together ssh key in github, git stash , access git repo directly. need that. can on azure site? can please tell me? git force azure-site master password 'https://admindev@azure-site.scm.azurewebsites.net:443': git azure deployment git-push

c# - OpenXml WorksheetParts.First() is not always the 1st sheet MS Excel shows -

c# - OpenXml WorksheetParts.First() is not always the 1st sheet MS Excel shows - i have xlsx files when viewed in excel have multiple sheets. however, of files using snippet below have worksheetpart.first 2nd or 3rd worksheet when viewed in excel. i think because sheets re-arranged in excel @ 1 point. q: how utilize openxml read sheets in "view" order ms-excel shows them in, versus can out of order via openxml? note: can't utilize sheet name workaround. using (var document = spreadsheetdocument.open(".\test.xlsx", false)) { var workbookpart = document.workbookpart; var worksheetpart = workbookpart.worksheetparts.first(); // worksheetpart not first worksheet excel shows } i guess worksheet parts not in order. should in order though workbook.sheets property (you can search name here). can correlate sheet worksheetpart through it's id, see here example. c# openxml

ssl - iOS Push Notification Certificates -

ssl - iOS Push Notification Certificates - so other day realized certificate app's force notifications had expired. after working certificates, provisioning profiles, , itunes connect have couple of questions i'm hoping might able clear me: is there way update force notifications , working without having new build go through apple's review process? appid app have in app store said force notifications "configurable" went through process of generating new certificates. after did provisioning profile distributed app changed "invalid". i'm guessing force notifications working 1 time again i'm going have build new version of app new provisioning profile , have reviewed apple, i'm hoping there may way around don't have wait 5 days force notifications working again. when using apple's test flight service, considered "production" or "development" , there difference way force notifications work? i'm tr

xcode - Storyboard not localizing when built for ios 7 -

xcode - Storyboard not localizing when built for ios 7 - i have entire project set single storyboard autolayout finish ios 8. project targets ios 7. in interface builder believe accidentally clicked setting , @ run-time app not load localized strings when single file built ios 7. in file inspector of storyboard if have file set build ios 8 localizes fine if set build ios 7 no localized strings load @ all. note: if storyboard set build ios 8 , effort run app ios 7 crashes "could not instantiate class named uistoryboardshowseguetemplate" i had same problem , asked here: xcode 6 not localize interface builder the release notes xcode 6 covers this: localization storyboard or xib not localize correctly if of next 3 conditions true: storyboard or xib uses size classes. base of operations localization , build target set universal. build targets ios 7.0. ios xcode swift storyboard

python - Is there a ways to take out the artist and song from the array? -

python - Is there a ways to take out the artist and song from the array? - suppose have type of array (sonny rollins|who cares?|sonny rollins , friends|jazz| various|, westminster philharmonic orchestra conducted kenneth alwyn|curse of werewolf: prelude|horror!|soundtrack|1996) . there possible way take out sonny rollins , cares array? assuming array string array of x strings, can create substring index of sec instance of '|' end of string. python python-2.7

cpu - Trying to start working with SIMD instructions, but having problems with error (0xC0000005) in C -

cpu - Trying to start working with SIMD instructions, but having problems with error (0xC0000005) in C - i'm trying larn work simd instructions in c. decided start working sse. using windows 8.1 , coding codeblocks in windows environment. codeblocks settings set utilize intel i7 (which have), sse enabled. programme compiles fine, error runtime hits. error "(0xc0000005)". here code: #include <stdio.h> #include <stdlib.h> #include <math.h> #include <xmmintrin.h> float scalarsse(float *m1, float *m2) { float prod; int i; __m128 x, y, z; for(i=0; i<5; i+=4) { x = _mm_load_ps(&*m1); y = _mm_load_ps(&*m2); x = _mm_mul_ps(x, y); z = _mm_add_ps(x, z); } for(i=0; i<4; i++) { prod += z[i]; } homecoming prod; } int main() { int i; float *s1 = calloc(1,sizeof (float)); float *s2 = calloc(1,sizeof (float)); for(i=0; i<100; i++) {

How to fix java.io.IOException: Attempted read from closed stream? -

How to fix java.io.IOException: Attempted read from closed stream? - i have below code throwing io error @ sec print statement. not able figure out why throwing. can 1 help me out. if comment line working fine. understood using response object 2 times should able utilize more 1 time. response response=customerresource.customeroperations("post", mdfcommonutil.getinstance() .readfileasstring("commonfiles/payloadforpost.xml"),null); system.out.println("inside methid=="+response.getstatuscode()); system.out.println("inside methid=="+response.asstring()); stack trace: java.io.ioexception: attempted read on closed stream. @ org.apache.http.conn.eofsensorinputstream.isreadallowed(eofsensorinputstream.java:110) @ org.apache.http.conn.eofsensorinputstream.read(eofsensorinputstream.java:136) @ sun.nio.cs.streamdecoder.readbytes(unknown source) @ sun.nio.cs.streamdecoder.implread(unknown source) @ sun.n

python - How do I print the index of the end of an aligned sequence? -

python - How do I print the index of the end of an aligned sequence? - i using code find seq_find located in seq_long , trying print out index in seq_long alignment ends. seq_long="ccgacatcgtcctcaccgaccatcgtcctgcatcgtcct" seq_find="catcgtcct" matching_seq_index=[] matching_seq_range=[] matching_seq_index_end=[] x in range(len(seq_long)): search=seq_long[x:x+9] matched=[] if search==seq_find: matching_seq_index.append(x) matching_seq_index_range.append(len(search)) matching_seq_index_end.append(x:x+len(search)) else: pass print matching_seq_index you need change: matching_seq_index_end.append(x:x+len(search)) to: matching_seq_index_end.append(x+len(search)) anyways much shorter version using re.finditer , list comprehension: >>> import re >>> [m.end() m in re.finditer(seq_find, seq_long)] [13, 29, 39] python

activerecord - sqlite3 boolean field stored as 't', 'f', not compatible with postgresql -

activerecord - sqlite3 boolean field stored as 't', 'f', not compatible with postgresql - i have user table in sqlite3 schema: create table "users" ( "id" integer primary key autoincrement not null, "email" varchar(255) default '' not null, "encrypted_password" varchar(255) default '' not null, "admin" boolean,); which has boolean field admin. i add together user record rails console: user.create!({email: "example@example.com", encrypted_password: "sample string", admin:1}) then when query user record admin field select * users admin=1; it returns empty result set. i had @ sqlite users table, admin field saved string 't' , 'f'. this cause problem, when utilize custom query in rails, admin filter not compatible sqlite3, test database, , postgresql, dev , production database. how overcome problem? if must utilize

PHP - MySQL Why is this query never returning false? -

PHP - MySQL Why is this query never returning false? - i'm busy php/mysql login system, fun. made function: function login($username, $password) { $user_id = user_id_from_username($username); $password = md5($password); homecoming (mysql_result(mysql_query("select count (`user_id`) `users` `username` = '$username' , `password` = '$password'"), 0) == 1) ? $user_id : false; but reason returns user_id, never false, when login credentials wrong! function login($username, $password) { //$user_id = user_id_from_username($username); // remove line downwards if statement $password = md5($password); $query = mysql_query("select `username`, `password` `users` `username` = '$username' , `password` = '$password'"); // check if query success if($query) { // check if there user matching info if(mysql_num_rows($query) > 0) { $user_id = user_id_from_u

matlab - How can I report custom errors when a function call is missing some arguments? -

matlab - How can I report custom errors when a function call is missing some arguments? - i'm teaching myself basics of matlab, , i'm stuck on how create errors functions. here attempt: function kinetic = ke(m,v) ke = 0.5*m*v*v %error messages if (isempty(m)) % mass empty error('no mass given (argument 1)'); elseif (isempty(v)) % velocity empty error('no velocity given (argument 2)'); end fprintf('the kinetic energy %d joules\n', ke); so if user doesn't specify 2 variables, function gives error telling user variable didn't specify. when seek error message, matlab returns generic error message: kinetic(,3) kinetic(,3) | error: look or statement incorrect--possibly unbalanced (, {, or [. i don't know how prepare this. i've tried replacing arguments of isempty arg1 or arg2 , made no difference. tried copying illustration code @ http://www.mathworks.co.uk/help/matlab/ref/error.html still didn'

c# - Routing in Asp.Net MVC4 -

c# - Routing in Asp.Net MVC4 - i getting "virtualpath must non-empty string starting ~/." error description: unhandled exception occurred during execution of current web request. please review stack trace more info error , originated in code. exception details: system.argumentexception: virtualpath must non-empty string starting ~/. parameter name: virtualpath in below code: public class routetablehelper { public static routecollection usersiteroutes() { routecollection routes = new routecollection(); registerroutes(routes); homecoming routes; } public static void registerroutes(routecollection routes) { ............... routes.mappageroute("catalogannualreport2013", "catalog/annualreport2013", "www.facebook.com"); ............. } } routing doesn't extend past own site. might i

.net - How to tell StructureMap 3 to use specific constructor for specific type? -

.net - How to tell StructureMap 3 to use specific constructor for specific type? - i using structuremap (version 3.1.4.143) general dependency resolution in web api project, , it's working fine far. want structuremap follow it's default behavior of selecting constructor parameters. however, specific type want utilize specific constructor used. e.g. have service contract public interface iservice { void dosomething(); } and implementation public class service : iservice { public service() { //something } public service(irepo repo, ilogger logger) { //something } //rest of logic } for type only, want utilize parameter-less constructor. how do in structuremap 3 ? (i types creating instance of iconstructorselector , applying policy below) x.policies.constructorselector<paramlessconstructorselector>(); answering own question: this right way in structuremap 3. selectconstructor, structuremap infers constructor given expression