Posts

Showing posts from August, 2015

javascript - How Keyboard events of a desktop website are simulated in mobile website using jquery? -

i have function tied keyboard arrow keys events in desktop website using jquery. $(document).keydown(function(e) { switch (e.which) { case 37: //left doit("leftside"); break; case 38: //up doit("upside"); break; case 39: //right doit("rightside"); break; case 40: //down doit("downside"); break; } } these working fine on desktop website, not on mobile website. (i know can't access arrow keys in mobile) i want corresponding functions executed in mobile website. (if user swipes left/up/right/down on mobile website) can me in this? i don't think can this, swipes swipes combination of different events (i.e. keydown, keyhold, keyup) . picking swipes via keyup , keydown events can difficult. better use plugin can explicitly detect swipes such hammer.js

c++ - How to compile including a .h file using mex in MATLAB? -

i'm trying compile piece of code download website. but there issues when compile mex function i'm using mex -i./ -l/lib convolve.cpp (.h , .cpp file in same folder,my current folder) i don't know it's correct or not. but matlab says error using mex /tmp/mex_100625252862836_11288/convolve.o: in function `internal_reduce(double*, int, int, double*, double*, int, int, int, int, int, int, int, int, double*, char*)': convolve.cpp:(.text+0xa2): undefined reference `edge_function(char*)' /tmp/mex_100625252862836_11288/convolve.o: in function `internal_expand(double*, double*, double*, int, int, int, int, int, int, int, int, double*, int, int, char*)': convolve.cpp:(.text+0xae4): undefined reference `edge_function(char*)' collect2: error: ld returned 1 exit status this .h file /* ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; file: convolve.h ;;; author: simoncelli ;;; description: header file convolve...

haskell - Strict Maybe in data definitions -

i have seen many talks / read blog posts should have strict fields in data avoid various performance issues, e.g.: data person = person { personname :: !text , personbirthday :: !utctime } this makes total sense me. functions operation on data lazy, composability isn't sacrificed. yet if add maybe field: data person = person { personname :: !text , personbirthday :: !utctime , personaddress :: !(maybe address) } i'm introducing lazyness data structure, after maybe control structure. can't unevaluated thunk hide behind just constructor? however, there strict maybe in strict or thru strict-base-types . according reverse dependencies ( strict , strict-base-types ) aren't used. so question: why 1 should or shouldn't use strict maybe in not-control data definitions? reasons use strict either/maybe/tuple types: if profile code , notice space leak, way plug leak strict data types regarded useful thi...

python - Creating a list of dictionaries where each dictionary contains another dictionary as values -

im writing algorithm in python plays this game. the current state of board of tiles in game dictionary in form of: { <tile_id>: { 'counters': <number of counters on tile or none>, 'player': <player id of player holds tile or none>, 'neighbours': <list of ids of neighbouring tile> }, ... } i have dictionary stores of tiles 'full' (i.e. tile has 1 less counter number of neighbours , player me) dictionary, full_tiles , in same form board dictionary above. i trying create list, chains , each element in list dictionary of full tiles neighbouring @ least 1 other full tile (i.e chain of full tiles). list of seperate chains on board. here code far: for tile_id, tile in full_tiles.items(): #iterates through full tiles current_tile = {tile_id : tile} #temporarily stores current tile if not chains: #if chain...

java - Perform action when soft keyboard is closing -

i want perform method when soft keyboard closing. tried overriding onbackpressed() method didn't work because back-button changes when soft keyboard open (below screenshot of button). hide-soft-keyboard-button i tried using onkeylistener turned out doesn't work soft keyboard. , don't know keycode of "hide-soft-keyboard-button" either... i appreciate since couldn't find solution anywhere. you use layout listener see if root layout of activity resized keyboard detecting whether softkeyboard shown or has disappeared possible workarounds , hacks, hence not recommend it. it more appropriate set focus change listener on edittext : youredittext.setonfocuschangelistener(new onfocuschangelistener() { @override public void onfocuschange(view v, boolean hasfocus) { if (hasfocus) { //got focus } else { //lost focus } } });

wordpress - Displaying Only The Excerpt In Post -

i used following place call excerpt show, showing full post:- this in function:- add_action( 'init', 'my_add_excerpts_to_pages' ); function my_add_excerpts_to_pages() { add_post_type_support( 'page', 'excerpt' ); also query <?php // retrieve 1 post id of 5 query_posts( 'p=1' ); // set $more 0 in order first part of post global $more; $more = 0; // loop while (have_posts()) : the_post(); the_content( 'read full post »' ); endwhile; ?> please can advise? thanks

ruby - Why does a method call need to be disambiguated when it can in principle be a constant? -

method calls can omit receiver , parentheses arguments: def foo; "foo" end foo # => "foo" in case above, foo ambiguous between method call , reference potential local variable. in absence of latter, interpreted method call. however, when method name can in principle constant name (i.e., when starts capital letter, , consists of letters), seems need disambiguation. def foo; "foo" end foo # => nameerror: uninitialized constant foo foo() # => "foo" self.foo # => "foo" why case? why method call need explicitly distinguished reference constant under absence of constant same name? the set of local variables in scope @ given point in program defined lexically , can determined statically, parse time. so, ruby knows before runtime local variables in scope , can distinguish between message send , local variable dereference. constants looked first lexically, via inheritance, i.e. dynamically. not known constan...

linux - How does/frequent unix tee command write stdout terminal output to file? if the output is too big -

i redirecting tool stdout tee command current progress can seen on terminal in log file here code snippet running tool , stdout fed tee command , code snippet written tcl script. $(eh_submit) $(icc_exec) $(options) -f ./scripts/$@.tcl | tee -i ./logs/$@.log i can see current real time progress on terminal same observation not seen in log file! , writes stdout log file chunk chunk how tee work? write blocks or time or both? if block minimum block size? if time minimum duration? i need parse real time log entries data analytics(as read log file via tail -f , push new data log file grows). unless programs handle buffering on own, buffering of io streams handled in libc. standard behaviour is: buffer output line wise if goes terminal, buffer output block wise if goes non-terminal, meaning file or pipe. that's why output appears in log file described it: chunk chunk. behaviour performance optimization. on linux stdbuf command can used run program adjusted bu...

tibco - How to access Spotfire expression values using IronPython script -

i'm trying results of expressions in spotfire 7, i.e., same values shown in visualisations, using ironpython script. consider following data: +----+------------+-------+ | id | date | value | +----+------------+-------+ | 1 | 2016-01-01 | 5 | | 2 | 2016-01-21 | 6 | | 3 | 2016-02-01 | 4 | +----+------------+-------+ we create scatter plot <binbydatetime([date],'year.month',1)> on x , avg([value]) on y axis, showing 5.5 2016-jan , 4 2016-feb . how these values in ironpython? of course, loop on rows , aggregate result using dictionary. i'd rather use spotfire's code calculation. i'd prefer not need intermediate visualisation either, retrieve calculated values directly. tibco documentation shows there's columnexpression class used represent expressions. there spotfire.dxp.application.calculations namespace, can't find mention of expressions there.

php - mySQL script to get results in given date and insert into table -

Image
i'm struggling days (what think) pretty advanced operation plan schedule run in database every week. this structure of table (unit_uptime_daily): what need run script every week that, every unit_id exists in table, gets rows of unit_id thats timestamp present day < 6 days (so unit_ids timestamp of previous week) add total_uptime column of 7 rows , insert new row weekly table. effectively, grabbing 7 latest rows each unit_id, adding total_uptime , inserting unit_id, result of added total_uptime , timestamp new table. thanks in advance, if possible do! use cron jobs. of hosting providers provides facility. google cron jobs find more , here's answer you. run php file in cron job using cpanel

android - Open image for sharing -

Image
i have android xamarin application imageview onclik lunch intent preview image file file = new file(photopath); intent intent = new intent(intent.actionview); intent.setdataandtype(uri.fromfile(file), "image/*"); intent.setflags(activityflags.nohistory); startactivity(intent); from apps choose 'gallery' when image opend there no sharing options when open image device 'gallery' has sharing options image saved sd card before preview. doing wrong ? solution worked me intent intent = new intent(); intent.putextra(intent.actionview, photopath); intent.settype("image/*"); startactivity(intent.createchooser(intent, "select picture")); now image opend in gallery , can use sharing options too

jboss - Caught exception inaccessible after routing -

i'm building exception handler jboss/camel project. catching exception onexception clause works, , can access caught exception bean, work's directly in exception handler. since need handler in multiple different projects, want direct handler different route (in different context), , handle exception there centrally. after routing, caught exception not accessible longer. why this, , how can fix that. i'd not have add ejb of projects. code: <camelcontext id="project1context" xmlns="http://camel.apache.org/schema/spring"> <onexception> <exception>java.lang.exception</exception> <handled> <constant>true</constant> </handled> <bean ref="projectspecificbean" method="peekexception" /> <to uri="activemq:queue:centralexceptionhandling" /> </onexception> [... routes of context, exception happens ....

c# - Unable to find the requested .Net Framework Data Provider. (SqlClient) -

i trying set simple asp.net mvc 4 webapp using db first migrations sql server (2005). have created tables in database , used entity framework create objects in code. can access data using these objects. the problems come when try initialize websecurity using websecurity.initializedatabaseconnection("flmrentities", "userprofile", "userid", "username", true); in global.asax.cs file. have tried using initializesimplemembershipattribute filter came template , got same issue. error message: unable find requested .net framework data provider. may not installed. here relevant connection string: <add name="flmrentities" connectionstring="metadata=res://*/models.flmr.csdl|res://*/models.flmr.ssdl|res://*/models.flmr.msl; provider=system.data.sqlclient; provider connection string=&quot;data source=notes.marietta.edu; initial catalog=muskwater; ...

Visual Microsoft Visual C++ Compiler for Python 2.7 vs MinGW -

i making functions in c going call python via cython. developing these functions in code:block using mingw c++ compiler. when building them python have use visual microsoft visual c++ compiler python 2. have met strang problem. when compiling visual c++ compiler have after lot of trial , fail found out variables have decleared before first in each block (if, for, function). why so. there difference between compilers c? msvc adheres original c89 spec. in later revisions of language restriction has been lifted.

@query elasticsearch spring data to get max id -

i'm trying max , min id @query elasticsearch spring data ,so use following code theis error no query registered [aggs]]; @query(value="{\"aggs\":{\"max_id\":{\"max\":{\"field\":\"id\"}}}}") segment findmaxid(); stack trace org.elasticsearch.action.search.searchphaseexecutionexception: failed execute phase [dfs], shards failed; shardfailures {[qvvc1wxqrowtkuhgsdulcg][segment][0]: searchparseexception[[segment][0]: from[0],size[10]: parse failure [failed parse source [{"from":0,"size":10,"query_binary": "eyjhz2dzijp7im1hef9pzci6eyjtyxgionsizmllb gqioijpzcj9fx19"}]]]; nested: queryparsingexception[[segment] no query registered [aggs]]; }{[qvvc1wxqrowtkuhgsdulcg][segment][1]: searchparseexception[[segment][1]: from[0],size[10]: parse failure [failed parse source [{"from":0,"size":10,"query_binary": "eyjhz2dzijp7im1hef9pzci6eyjtyxgionsi...

javascript - Angular toggle background-image -

i want change background-image of element when click it. right have: <div class="item-center text-center" toggle-class="active cable"> <div class="quiz-background"></div> <p class="size1 quiz-text">cable</p> </div> css: .quiz-background { width: 80%; min-height: 100px; background-image: url(images/ofertas/cable_darkblue.png); background-position: center center; background-size: cover; background-repeat: no-repeat; margin: auto; top: 20px; position: relative; } .cable .quiz-background { background-image: url(images/ofertas/cable_lightblue.png); } directive toggle-class: 'use strict'; angular.module('libertyprapp') .directive('toggleclass', function() { return { restrict: 'ea', link: function(scope, elem, attrs) { elem.bind('click', function() { elem.toggleclass(attrs.toggleclass); }); } } }); ...

Hadoop: Distinct count of a value (Java) -

example of (key,value) in mapper : (user,(logincount,commentcount)) public void map(longwritable key, text value, context context) throws ioexception, interruptedexception { string tempstring = value.tostring(); string[] stringdata = tempstring.split(","); string user = stringdata[2]; string activity = stringdata[1]; if (activity.matches("login")) { outcount.set(1,0); } if (activity.matches("comment")) { outcount.set(0,1); } outuserid.set(userid); context.write(outuserid, outcount); } i count logins & comments of user. want change count: count every login & if user wrote comment. how can achieve mapper or reducer search 1 comment of user , "ignores" other comments (of user)? edit: log-file: 2013-01-01t16:50:56.056+0100,login,user14133,somedata,s...

excel vba - Modify the pasting of data (constraining the range) -

i using below code: dim lastrow integer, integer, erow integer lastrow = activesheet.range("a" & rows.count).end(xlup).row = 2 lastrow if cells(i, 2) = "1" ' opposed selecting cells, copy them directly range(cells(i, 1), cells(i, 26)).copy ' opposed "activating" workbook, , selecting sheet, paste cells directly workbooks("swivel - master - january 2016.xlsm").sheets("swivel") erow = .cells(.rows.count, 1).end(xlup).offset(1, 0).row .cells(erow, 1).pastespecial xlpasteall end application.cutcopymode = false end if next this works suppose to, need constrain range pastes to. when code run, copies range of a2:z2 (sample range question, copies more rows this), pastes cells beyond column z. concerned column ad there code change text of row green when there value inserted column. after copy/...

floating point - Why is 24.0000 not equal to 24.0000 in MATLAB? -

Image
i writing program need delete duplicate points stored in matrix. problem when comes check whether points in matrix, matlab can't recognize them in matrix although exist. in following code, intersections function gets intersection points: [points(:,1), points(:,2)] = intersections(... obj.modifiedvgvertices(1,:), obj.modifiedvgvertices(2,:), ... [vertex1(1) vertex2(1)], [vertex1(2) vertex2(2)]); the result: >> points points = 12.0000 15.0000 33.0000 24.0000 33.0000 24.0000 >> vertex1 vertex1 = 12 15 >> vertex2 vertex2 = 33 24 two points ( vertex1 , vertex2 ) should eliminated result. should done below commands: points = points((points(:,1) ~= vertex1(1)) | (points(:,2) ~= vertex1(2)), :); points = points((points(:,1) ~= vertex2(1)) | (points(:,2) ~= vertex2(2)), :); after doing that, have unexpected outcome: >> points points = 33.0000 24.0000 the outcome should empty matrix. can see, fi...

iphone - How to swap value index in NSArray -

i have nsarray . have value inside array. nsarray *testarray = [nsarray arraywithobjects:@"test 1", @"test 2", @"test 3", @"test 4", @"test 5", nil]; nslog(@"%@", testarray); result bellow : ( "test 1", "test 2", "test 3", "test 4", "test 5" ) now want result : ( "test 3", "test 5", "test 1", "test 2", "test 4" ) is there way without re-initialize array? can swap value of array ? your array must instance of nsmutablearray otherwise write methods not allowed ( nsarray read only) use following method : - (void)replaceobjectatindex:(nsuinteger)index withobject:(id)anobject you need temporary storage storing replaces object : id tempobj = [testarray objectatindex:index]; [testarray replaceobjectatindex:index withobject:[testarray objectatindex:otherindex]]; [testarray replaceobjectatindex:otherinde...

html - Change the flow of colours in a CSS gradient -

Image
i use <div class="menu"></div> , set background color gradient. it floats red in top white in bottom. here .css code: .menu { background-color: #fff; background-image: -webkit-gradient(linear, left top, left bottom, from(#791014), to(#fff)); background-image: -webkit-linear-gradient(top, #791014, #fff); background-image: -moz-linear-gradient(top, #791014, #fff); background-image: -ms-linear-gradient(top, #791014, #fff); background-image: -o-linear-gradient(top, #791014, #fff); background-image: linear-gradient(top, #791014, #fff); clear: both; } i starting , end color. question is, if there way can change how flows red (top) white (bottom) example switches earlier white, have dark red @ beginning of top in middle more white. in other words, want change how fast transitions red white. if want transition between colors happen quicker normal , change point transition should completed. when 2 colors given withou...

Using a custom header in android -

i using custom header in android. issue when activity loads 1s default brown/blackish header shown. how prevent happening? relevant xml: <resources> <style name="customwindowtitlebackground"> <item name="android:background">#00693331</item> </style> <style name="customtheme" parent="android:theme"> <item name="android:windowtitlesize">70dip</item> <item name="android:windowtitlebackgroundstyle">@style/customwindowtitlebackground</item> </style> </resources> i inflating layout in java. we solved setting theme to: android:theme="@android:style/theme.notitlebar" we set whole application, override in activities our custom title bar theme.

With haskell's turtle library, how to extract filename from FilePath? -

when using takefilename type error: :t v print v :t takefilename takefilename v v :: filepath filepath "/media/miguel/backup/backups" takefilename :: filepath -> filepath couldn't match type ‘turtle.filepath’ ‘string’ expected type: ihaskellsysio.filepath actual type: turtle.filepath in first argument of ‘takefilename’, namely ‘v’ in expression: takefilename v is because turtle's filepath different prelude's filepath ? turtle still uses system-filepath has customized "filepath" type can find here . many other haskell libraries use filepath library defines filepath synonym string (type filepath = string). case here ihaskell . so yes both filepath types mismatch. note can convert turtle.filepath string using show (because type has show instance). can convert text using fp turtle.format module. system-filepath deprecated. there issue this. please read: https://github.com/gabriel439/haskell-turtle-library/issues/54 hop...

android - Please ensure Intel HAXM is properly installed and usable -

i've installed intel haxm , working fine on computer. after formatting computer , again installing same version of android sdk i'm facing problem again , again. configuration of computer 2.5 gb ram, intel dual core 1.46ghz processor in hp compaq presario c700. window7 professional 32bits. the error i'm getting is: emulator: warning: crash service did not start emulator: error: x86 emulation requires hardware acceleration! please ensure intel haxm installed , usable. cpu acceleration status: android emulator requires intel processor vt-x , nx support. (vt-x not supported) please me in regard i'm new in android. just follows these steps: go control panel → program , feature. click on turn window features on , off. window opens. uncheck hyper-v option , restart system. now, can start haxm installation without error. in cases, intel vt-x may disabled in system bios , must enabled within bios setup utility. access bios setup utility, key must pr...

jsf - How to check two conditions inside rendered attribute? -

i tried below code <h:form rendered="{#{cars.enabled} , #{cars.enablededit}}"> but doesn't works. here proper el expression <h:form rendered="#{cars.enabled , cars.enablededit}"> no need (and illegal use #{} inside #{})

ios - Streaming video from server in iphone? -

i wanted know of use mediaplayer framework stream live video wait till video downloaded , starts playing or simultaneously? many thanks. try 1 : -(void) viewwillappear:(bool)animated { [super viewwillappear:animated]; player = [[mpmovieplayercontroller alloc] initwithcontenturl:[nsurl urlwithstring:strselectedvideourl]]; player.scalingmode = mpmoviescalingmodefill; player.moviesourcetype = mpmoviesourcetypefile; player.view.frame = cgrectmake(0, 45, 320, 400); player.shouldautoplay = yes; [player preparetoplay]; [self.view addsubview:player.view]; [[nsnotificationcenter defaultcenter] addobserver:self selector:@selector(moviefinishedcallback:) name:mpmovieplayerplaybackdidfinishnotification object:player]; [player play]; } - (void) moviefinishedcallback:(nsnotification*) anotification { mpmovieplayercontroller *player1 = [anotification object]; [[nsnotificationcenter defaultcenter] removeobserver:self name:mpmovieplay...

javascript - How to ensure that JS anonymous objects continue to map onto POCO ViewModels -

we have asp.net mvc application extensively uses ajax calls. these ajax calls send data our controller method - controller method requires argument simple poco viewmodel class. in our javascript create anonymous object properties map onto properties of our viewmodel, , mvc framework handles routing in controller method our viewmodel properties. all , good. what want put in place robust way ensure javascript anonymous class , viewmodel class remain in-synch - if developer changes 1 change other. can of course put in comments in both files "change one, change other", , threat of severe beating developer fails keep these in synch, code reviews area may missed. it great have kind of automated unit test check this, i'm not aware how achieve this. any suggestions? thanks in advance griff there javascript library called knockoutjs , used trying achieve. seems trying use mvvm pattern asp.net mvc framework. mvvm pattern, it's common problem keep...

java - JUnit test fails because of user home directory syntax -

i using junit unit test, want test created file created on requested location, on case location tmp folder. test fails because user home directory got 'tmpfile.getparent()' not same got system.getproperty("user.home") : tmpfile= file.createtempfile("tmpfile", ".tmp"); string actualfolder = tmpfile.getparent();/* tmp file directory */ string expectedfolder= system.getproperty("user.home")+"\\appdata\\local\\temp" the junit tests fails , in consol, got: actualfolder = c:\users\[user_~1\]appdata\local\temp expectedfolder = c:\users\[user_000]appdata\local\temp> how can same syntax of user directory 'tmpfile.getparent()' ? in advance help! the strings trying compare representation of underlying file in filesystem. yole suggested, should compare filehandles respectively absolute or canonical path.

hibernate - Java SOAP WSDL service NoClassDefFoundError -

i have been struggling creation of soap web service , can't working. i have written service, , then, eclipse, created web service. , although saving in db worked fine when tested service locally (created simple main method), when try testing generated web service noclassdeffounderror. if has time take gratefull. https://dane289@bitbucket.org/dane289/soapservice_problems.git thank in advance! the problem eclipse not adding jars war file. after adding them war via eclipse menu assembly worked fine.

php - MYSQLI Prepared Statement White Page -

i trying convert php code notifications more suitable prepared statement. no matter try, breaks page. body out there able tell me error lies? edit page not blank. page breaks after code. $acctnotsqry = $redodb->prepare('select message, ndate notifications uid = ? , nseen = "0" order ndate desc'); $acctnotsqry->bind_param('i', intval($memid)); $acctnotsqry->execute(); $acctnotsqry->store_result(); $acctnotsqry->bind_result($notmessage, $notndate); if($acctnotsqry->num_rows == 0){ echo '<li><div class="nilnots">no notifications</div></li>'; } else { while($acctnotsqry->fetch()) { ?> <li><i class="fa fa-bell"></i> <?php echo htmlspecialchars_decode(stripslashes($notmessage)); ?> <p><?php echo date('d m y - h:ia', strtotime($notndate)); ?></p></li> <?php } } $acctnotsqry->clo...

android - Google Play InApp (Prime31, Unity) - User doesn't see products / product information not loaded -

we have app on google play store runs fine, has amount of customers , amount of people buy inapps. now 1 customer contacted us, because can't see prices of product. queryinventory thingy seems fail. me , "all" other customers works. what cause such issues? i thought about no installed play services installation not through google play store no internet however customer can see inapps in other apps, has installed play services + has internet (verified via leaderboards). is there googles side or customer device settings side, can disable functionality of google inapps?

gruntjs - Using Foundation With Yeoman -

i'm attempting build web project using yeoman , foundation. have created basic project , have included foundation component using bower install foundation when run grunt server fails compile foundation or move in app tree. how yeoman (or grunt) recognize , compile foundation? i'm using yeoman 1.0.0-beta.3. commands run set project are: npm install generator-angular generator-testacular bower install foundation yo angular --minsafe npm install bower install --dev grunt server but compass:server task reports nothing compile. if you're trying start new project, have left off directory argument. i getting used yeoman , foundation. aren't supposed add < script > tag in order grunt recognize intend use "foundation"? from yeoman getting started . yo angular bower install angular-ui # add <script src="components/angular-ui/build/angular-ui.js"></script> # , <link rel="stylesheet" href="componen...

javascript - D3 Line Chart: Setting Y.domain values to centre on a specific number -

my line chart uses entries.value make y.axis, i'm wanting make absolute centre of y axis number goal.value . https://jsfiddle.net/everina/hdz2oxhb/1/ in example see dashed line, goal.value, want make dashed line in centre of graph. (so 15 number now) i'm unsure how this. currently dashed line in view if entries.value close enough it. var entries = [{"date":"2016-01-06","value":15},{"date":"2015-11-17","value":15.4},{"date":"2015-11-11","value":16.5},{"date":"2015-09-24","value":15.1},{"date":"2015-08-22","value":15},{"date":"2015-08-12","value":15},{"date":"2015-07-30","value":14.6},{"date":"2015-07-19","value":14.8},{"date":"2015-07-18","value":14.9},{"date":"2015-07-12","val...

c# - Code echecks for DPM (Authorize.Net) -

i using asp.net, c#, , web forms (not mvc). i following thread, not sure code behind implement solution. https://community.developer.authorize.net/t5/integration-and-testing/dpm-with-echecks/m-p/33623#m181 ... it states use form: <input type='hidden' runat="server" name='x_login' id='x_login' /> <input type='text' readonly="readonly" runat="server" name='x_amount' id='x_amount' size='9' /> <input type='text' runat="server" name='x_fp_sequence' id='x_fp_sequence' /> <input type='text' runat="server" name='x_fp_timestamp' id='x_fp_timestamp' /> <input type='text' runat="server" name='x_fp_hash' id='x_fp_hash' /> <input type='hidden' name='x_method' id='x_method' value='echeck' /> <input type='hidden' name='x_b...

asp.net - Retrieving Session after login in MVC -

i want make shopping cart using session. use base controller assign new cart in session["cart"]. as expected, when go through different pages , go "cart" page, cart still exists products in it. but log in, session null. how keep session alive after login, or assign previous session data new one? my basecontroller class: protected override void initialize(requestcontext requestcontext) { base.initialize(requestcontext); if(session["cart"] == null) { session["cart"] = new order(); } } my global.asax file: protected void application_start() { arearegistration.registerallareas(); filterconfig.registerglobalfilters(globalfilters.filters); routeconfig.registerroutes(routetable.routes); bundleconfig.registerbundles(bundletable.bundles); } protected void application_authenticaterequest() { if (httpcontext.current.user != null) ...

postgresql - Postgres restore from WAL files without having a basebackup using pg_basebackup -

i have following situation. have master/replica setup. somehow database dropped , new database same name created django. in case, wal files of previous database still there? i have not created backup using of previous database using tool pg_basebackup, have wal files in pg_xlog. now, trying following: - shutdown postgres server. - use recovery.conf file in pgdata (/var/lib/postgresql/9.3/main) directory , entering following in there: restore_command = 'cp /var/lib/postgresql/9.3/main/pg_xlog_backup_jan072016/%f %p' recovery_target_time = '2016-01-07 03:00:00' - startup postgres server again. what see in log file is: postgres:~/9.3/main/pg_log$ tail -100f postgresql-2016-01-07_170256.log 2016-01-07 17:02:56 utc log: database system shut down @ 2016-01-07 17:02:55 utc 2016-01-07 17:02:56 utc log: starting point-in-time recovery 2016-01-06 00:00:00+00 cp: cannot stat ‘/var/lib/postgresql/9.3/main/pg_xlog_backup_jan072016/0000000a.history’: ...

Visual studio 2013 keeps crashing -

so have machine runs windows 10 visual studio ultimate 2013. everytime start program crashes within 1 minute, without moving mouse. when crashes gives me following error: unhandled microsoft .net framework exception occurred in devenv.exe [6820] i have noticed error started coming after connected team foundation server, dont know if has issue. furthermore, running clean windows install shouldn't problem either. at point don't know do, , have exams in 2 weeks, need visual studio team foundation server. please me this, appreciated!

html - Foundation is not working on Internet Explorer -

i working on application using foundation framework when see applicaion on ie version 8 , laters, columns overlaps in image. image i using columns class foundation, <div class="large-10 columns" style="height:40px"> <div class="large-2 columns"> <div class="large-5 columns">&nbsp;</div> <div class="large-7 column"> <a href="{{ url_for('loan', loan_id=loan['loan_id']) }}"> <span class="subtable-item link">{{ loan['loan_id'] }}</span> </a> </div> </div> .... somebody me hacks ie or else makes tables in same way chrome. you need open new row nested columns try it <div class="small-10 columns"> <div class="row"> <div class="small-5 columns">&nbsp;</div> <...

Xcode UICollectionViewCell xib not displaying any views added to it -

Image
i'm trying create custom uicollectionviewcell backed *.xib file. however, when try add subviews cell, interface builder (as actual instance of cell inside app) doesn't show them @ all. doesn't matter whether add in uiview contentview or not, subviews seem invisible. happens in xcode 7.2 inside tvos project. experience same issue or can see i'm missing?

javascript - How to set the datepicker maxDate based on another datepicker? -

i have declared date picker: define(["ui/nal.ui.core"], function () { $.widget("nal.datepi", { options: { numberofmonths: 2 }, _create: function () { var $el = this.element; $el.datepicker(this.options); } }); }); which has 2 sons: define(["ui/nal.ui.datepi","ui/nal.ui.textfielddatedeparture"], function() { $.widget( "lan.datepideparture", $.lan.datepi, { }); }); define(["ui/nal.ui.datepi","ui/nal.ui.textfielddatearrival"], function() { $.widget( "lan.datepiarrival", $.lan.datepi, { }); }); how can set maxdate on arrival 1 year depending on departure. would simpler work: (just pseudocode) var depdate = $(".divtodate").datepicker('getdate'); depdate.setdate(depdate.getyear() + 1); (".arrivaldiv").datepicker({ maxdate: depdate; basically grab date associated a...

java - file creation time of the files transferred. Get file by FIFO -

is there way in linux change creation/last access time/last modified time default, whenever new files transferred or copied. currently, need poll directory files , process files first in first out basis (fifo). if files transferred different environments eg: windows (with time stamp preserved), file time file creation time default. so while polling, list of files & if try sort files time , earliest file arrived, file created earlier, not transferred earlier. is there setting in linux can force setting file creation times incoming files. or possible how file drop time in java while polling.

php - WordPress: Exclude posts with meta_query - Not every posts has the meta_field -

i want exclude every post specific value of custom meta field. problem is, not every posts has meta field. my code looks (excerpt of working loop): // wp_query arguments $args = array ( 'post_parent' => $parentid, 'orderby' => 'menu_order', 'order' => 'asc', 'post_type' => array( 'page' ), 'meta_query' => array( array( 'key' => 'hide', 'value' => 1, 'compare' => '!=' ) ) ); not every posts uses field "hide". posts giving null. think, loop isn't working because of that?! is correct? necessary every posts has value key? try check sql statement doing below snippet. $customposts = new wp_query($yourargs); echo "last sql-query:...

swing - How do I make this run as a Java applet instead of a Java application? -

i can't figure out how run applet, please i've been trying bunch of things nothing working. believe have make class extend applet i'm not sure change after doing that edit: nevermind have solved problem! :d import java.applet.*; import java.awt.*; import java.awt.event.*; import javax.swing.*; public class howmany { private jframe mainjframe; private jlabel headerjlabel; private jlabel statusjlabel; private jpanel controljpanel; public howmany() { preparegui(); } public static void main(string[] args){ /* main part of code */ howmany howmany = new howmany(); howmany.showeventdemo(); } private void preparegui() { mainjframe = new jframe("click button!"); /*sets applet title */ mainjframe.setsize(400,400); /* sets size of applet */ mainjframe.setlayout(new gridlayout(3, 1)); headerjlabel = new jlabel("",jlabel.center ); //centers header jlabel statusjlabel = ...