Posts

Showing posts from March, 2013

java - WildcardPatternSuite finds no classes -

i'm trying use wildcardpatternsuite junit-toolbox , testsuite fails with java.lang.exception: failed scan c:\users\ms\workspaces\comet4\pubservertests\build\com\priint\pubserver\tests\testsuites using wildcard patterns [**/*test.class] -- org.junit.runners.model.initializationerror @ org.junit.runners.model.initializationerror.<init>(initializationerror.java:32) @ com.googlecode.junittoolbox.wildcardpatternsuite.findsuiteclasses(wildcardpatternsuite.java:128) @ com.googlecode.junittoolbox.wildcardpatternsuite.getsuiteclasses(wildcardpatternsuite.java:54) @ com.googlecode.junittoolbox.wildcardpatternsuite.<init>(wildcardpatternsuite.java:180) @ sun.reflect.nativeconstructoraccessorimpl.newinstance0(native method) @ sun.reflect.nativeconstructoraccessorimpl.newinstance(nativeconstructoraccessorimpl.java:57) @ sun.reflect.delegatingconstructoraccessorimpl.newinstance(delegatingconstructoraccessorimpl.java:45) @ java.lang.reflect.const

php - How can i see profile details according to id? -

i trying see profile details there problem getting 'id'. have errors: severity: warning message: missing argument 1 customers::details() filename: controllers/customers.php and, a php error encountered severity: notice message: undefined variable: id filename: controllers/customers.php here model: function selectcustomer(){ $this->db->select('*'); $this->db->from('customers'); $query = $this->db->get(); return $query->result(); } function detailscustomer($id){ //$id= $_get['id']; //$this->db->select('*'); //$this->db->from('customers'); $this->db->where('id', $id); $query = $this->db->get('customers'); } here controller: publicfunction viewcustomers(){ $this->load->model('customermodel'); $result = $this->customermodel->selectcustomer(); return $result;} public function d

javascript - Is it possible to define settimeout intervals in array? -

here's situation: var firefliptimer = ''; var unfliptimer = []; $('.categorybox').on('mouseenter', '.box', function() { cleartimeout(firefliptimer); var $t = $(this); var = $t.index(); cleartimeout(unfliptimer[i]); bht = settimeout(function() { flipcat($t); }, 250); }).on('mouseleave', '.box', function() { cleartimeout(firefliptimer); var $t = $(this); var = $t.index(); unfliptimer[i] = settimeout(function() { unflipcat($t); }, 600); }); basically there div, on: mouseenter - animates mouseleave - after 600ms comes previous state before animation. i'm trying thing, if leave mouse , enters div in 600ms interval, div not come previous state :) as there multiple div's i'm trying handle settimeout intervals array, not successfully... is possible define intervals in array? or should use different method task. p.s. problem in case last element reacts mouseleave event, if go

javascript - Detecting collision on canvas border -

i making little game friends trying detect collision when bumping in the walls of canvas, , made work when hit wall caracter gets stuck.. , dont know how find out way make him move again. think of guys me out one. help! javascript / jquery: function player() { this.w = 50; this.h = 60; this.x = (cw / 2) - (this.w / 2); this.y = (ch / 2) - (this.h / 2); this.name = username.value; this.nw = ctx.measuretext(this.name).width; // username.clientwidth + 1; this.src = playerimage; this.dx = 0; this.dy = 0; this.render = function() { ctx.drawimage(this.src, this.x, this.y, this.w, this.h); ctx.fillstyle = 'orange'; ctx.font = '15px arial, sans-serif'; // fixa x-värdet ctx.filltext(this.name, (this.x + this.w / 2) - (this.nw / 2), (this.y - 6)); } } var player = new player(); function animate() { if(player.x > 0 && player.y > 0 && player.x + player.w < cw &

XML with PHP “echo” getting error “Extra content at the end of the document” -

i have asked question here on how generate sitemap automatically, need xml? here solution have concluded: <?php header ("content-type:text/xml"); echo '<?xml version="1.0" encoding="utf-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">'; // code extract , echo links file echo ' </urlset>'; ?> <?php // original php code chirp internet: www.chirp.com.au // please acknowledge use of code including header. $url = "assets/includes/menu.inc"; $input = @file_get_contents($url) or die("could not access file: $url"); $regexp = "<a\s[^>]*href=(\"??)([^\" >]*?)\\1[^>]*>(.*)<\/a>"; if(preg_match_all("/$regexp/siu", $input, $matches, preg_set_order)) { foreach($matches $match) { // $match[2] = link address // $match[3] = link text echo '<url><loc>' . $m

java - Multi module Ant build system and Eclipse -

se lets starting multi-module project. library , 2 modules depend on library. i planning on using ant plus ivy dependency management. looking way integrate eclipse + ant + ivy. so standard way of working these tools create different project in eclipse each module? or create single project , multiple src folders each module?. although question might seem subjective one, looking standard way handle multi-module projects under eclipse when using external tool building , dependency management. , standard mean, in way eclipse find dependencies project, auto complete works , src , javadoc available when needed inside ide, when debuging within eclipse, source attached navigate through breakpoints. please don't tell me use maven, have used , hate passion. you have ivyde works dependency management (can jar repository or ivy module in workspace). each eclipse project ivy module dependency may resolved workspace (build path entry eclipse project) or ivy resolver (buil

ruby - php_serialize gem doesn't load -

i'm trying use gem: php serialize i type gem install php-serialize and in main.rb ruby app require 'php_serialize' the result is boot error went wrong while loading main.rb loaderror: cannot load such file -- php_serialize the environment sinatra, , in main.rb have: require 'rubygems' require 'sanitize' require 'sinatra' require 'active_record' require 'nokogiri' require 'open-uri' require 'uri' require 'pry' require 'chronic' require 'json' require 'zip' require 'php_serialize' any idea? update rubygems environment: - rubygems version: 2.1.11 - ruby version: 2.0.0 (2013-11-22 patchlevel 353) [x86_64-darwin13.0.0] - installation directory: /users/scrivoaroby/.rvm/gems/ruby-2.0.0-p353 - ruby executable: /users/scrivoaroby/.rvm/rubies/ruby-2.0.0-p353/bin/ruby - executable directory: /users/scrivoaroby/.rvm/gems/ruby-2.0.0-p353/bin - spec c

android - how can I make two google maps listeners? setOnCameraChangeListener -

how can create 2 listeners? 1 used clustering , other load new cluster items map if no cluster items exists on map. //needed clustering map.setoncamerachangelistener(mclustermanager); // need loading clusteritems map.setoncamerachangelistener(new googlemap.oncamerachangelistener() { @override public void oncamerachange(cameraposition position) { // ifmarkesnotinsidemapreload... i think it's not possible maybe solved this... one idea set starting position , poll changes manually.. not cool :-) i'm using googles cluster library: google cluster i have looked clustermanager implementation of amutils library , looks calls oncamerachange on implementation of clusterrenderer if implements oncamerachangelistener . make implement interface. relevant parts of code: @override public void oncamerachange(cameraposition cameraposition) { if (mrenderer instanceof googlemap.oncamerachangelistener) { ((go

How to reload/refresh subgrid in JQgrid? -

this of subgrid code in jquery. problem , have dropdown user. each user have own id , transmitted method. when select different user expected show in subgrid different values, not happens after manually refresh page (crtl + f5). im using ajax , json . code : subgrid : true, subgridrowexpanded: function(subgrid_id, row_id) { //var projectidrow = $('#list2').jqgrid('getcell',rowid,'projectid'); //alert(row_id); var subgrid_table_id; subgrid_table_id = subgrid_id+"_t"; $("#"+subgrid_id).html("<table id='"+subgrid_table_id+"'></table>"); $("#"+subgrid_table_id).jqgrid({ url:"/taskuri/subgrid/?id="+row_id+"&userid="+useralocat, datatype: "json", colnames: ['subtask',' ','pri','responsabil','alocator','alocat'

perl - Large reference file (800,000 lines). Store in array or use filehandle -

i have large tab delimited file information. chr9 refflat exon 136333685 136335910 . + . gene_id "cacfd1"; transcript_id "nm_001242370"; exon_number "5"; exon_id "nm_001242370.5"; gene_name "cacfd1"; chrx refflat exon 51804923 51805135 . - . gene_id "maged4b"; transcript_id "nm_001242362"; exon_number "14"; exon_id "nm_001242362.1"; gene_name "maged4b"; i have file coordinates search (1800 lines) chr11 62105438 chr11 85195064 chr17 33478139 chr21 9827089 i have nested loop in loop, each line in coordinate file searches against reference file. #!/usr/bin/perl -w use strict; foreach(@coord){ @query = split(/\t/,$_); chomp @query; #clean foreach(@ref){ @ref_line = split(/\t/,$_); chomp @ref_line; #clean

c++ - pass the argv and argc to thread -

my program receives arguments user int main(int argc, char *argv[]) and have function inside thread (i can't change function): func (&argc, &argv); as can see, need call the thread, , inside thread, call func parameters. saw there way sent thread multiple parameters struct. but how struct suppose looks like? , how copy parameters struct? thanks! struct arg_holder { int argc; char ** argv; }; void * thread_caller(void * arg) { struct arg_holder arg_struct = *(struct arg_holder *)arg; free(arg); return func(arg_struct->argc, arg_struct->argv); } in main : struct arg_holder * arg_struct = malloc(sizeof(*arg_struct)); arg_struct->argc = argc; arg_struct->argv = argv; pthread_create(&thread_id, null, thread_caller, arg_struct);

javascript - flexslider responsive carousel problems -

Image
i need create responsive carousel using flexslider. problem 1 shrink browser window below size of container, item positions messed up. this screenshot of slider on >1200 screen (fine) this screenshot of slider on >800 screen (!!) my js init.: $('.flexslider').flexslider({ animation: "slide", animationloop: true, touch: true, mousewheel: true, itemwidth: 400, prevtext: "", nexttext: "" }); as can see in image (2), third image chopped off. want either reduce number of visible elements 2 when resolution reaches threshold, , make images adapt available space nothing chopped off. ideas? a bit late, looks might solve problem: http://flexslider.woothemes.com/dynamic-carousel-min-max.html the min- , max-items settings set dynamically, based on window width... a bit messy, work no image gets chopped of.

javascript - Form Validation with tabs: jump to first invalid tab -

this follow-up question validation in form tabs using nested ng-forms . in jsfiddle http://jsfiddle.net/gaby/lrfry/4/ have form won't submit unless it's subforms $valid . how make jump first invalid tab when user tries submit? i think better if use directive because going touch dom , because can group logic need form in 1 place (you thank when app grows) , form becomes more portable well. i have changed form bit, it's using 1 ngform , tabs normal divs. form , it's inputs given names because ngform directive needs them create formcontroller object. the directive listening clicks on submit button , use formcontroller object check errors , react accordingly. .directive('myform', function () { return { restrict: 'a', link: function (scope, elm, attrs) { var inputs = elm.find('input'), //get form inputs inputtab1 = inputs[0], //asign each input var inputtab2 = inputs[1],

android - In my view something unwanted shows up -

i building snake game app. fur works, except shows. reason shows 2 snakes: original snake moves , can controlled, , begginging of snake doesn't anything. before drew @ every cycle in loop background color, cover last canvas, , there no problem. then decided divide snake background, have made snake canvas's background transparent , clear canvas each time wants draw new canvas (each loop-to move snake). here code: the run of thread: public void run() { long steppersecond=1000/fps; long starttime; long sleeptime; while(isrunning){ canvas c=null; starttime=system.currenttimemillis(); try{ c=this.getholder().lockcanvas(); synchronized (this.getholder()) { this.ondraw(c); } } catch(exception e){ } finally{ if(c!=null){ this.getholder().unlockcanvasandpost(c); } } sleeptime= steppersec

sharepoint 2013 Sp.Webproxy.invoke not include headers -

i working on sharepoint-hosted app needs call yammer rest api javascript. access token has been obtained. need pass in request headers. have use sharepoint cross-domain library in app.js. doesn't matter how tried, sp.webproxy calls endpoint without including header. turns out sharepoint intentionally ignores "authorizatio" header. know alternative approach? thank you. function getyammer() { var request = new sp.webrequestinfo(); request.set_url("https://www.yammer.com/api/v1/messages/algo.json"); request.set_headers({ "authorization": "bearer abcedfghijk" }); //headers not sent out external service request.set_method("get"); var response = sp.webproxy.invoke(context, request); context.executequeryasync(onsuccess, onfail); function onsuccess() { if (response.get_statuscode() == 200) { removeposts('yammer'); var responsebody = json.parse(response.get_body()); (var = 0,

android - GPS coordinates using network -

i working gps in android application.my questions are, 1.is gprs needed gps coordinates,if want coordinates without gps? 2.what settings need enabled to work gps coordinates using network? you want geographical coordinates pair: latitude, longitude. (not gps coordinates) such coordinates , other attributes can delivered either gps, wlan or cell-tower locating. for wlan , cell-tower (network) locating need internet connection. for gps locationg provider, ususally don't need network (gsm) there android phones strange designed, such gps not work without having internet connection while starting gps. if want network locating, can explicitly set location provider. set network_provider: if (locationmanager.isproviderenabled(locationmanager.network_provider)) { locationmanager.requestlocationupdates(locationmanager.network_provider, 0, 0, locationlistener); }

python - How could I make a 2-D map for a set of points, based on their probability distribution? -

Image
i want make 2-d map , have set of data x , y coordinates , each point has probability distribution based on 1 of properties. in somehow smooth probability distribution of each point in x , y coordinate , make 2-d map based on maximum , width of peak of each point probability distribution. how use python implement it? it looks question going closed seems way broad, think looking kernel density estimation , or multivariate kernel density estimation . loosely, each point defines distribution (the kernel) when convolved, gives "smoothed" version. see linked article @ picture below better example: scipy has gaussian kde .

Error parsing JSON in python -

i'm trying parse reddit json file titles of posts, when use code: import urllib2 import json response = urllib2.urlopen('http://www.reddit.com/r/technology/.json') data = json.load(response) print data['title'] i error: traceback (most recent call last): file "c:\users\harry\desktop\py\jason.py", line 6, in <module> print data['title'] keyerror: 'title' any appreciated, thanks. that response has no 'title' top-level key. 'kind' , 'data' keys found in top-level dictionary. you need more closely @ structure here; data key contains actual payload, that's dictionary without 'title' key well. here elided version of contents: >>> import pprint >>> pprint.pprint(data) {u'data': {u'after': u't3_1wnfuv', u'before': none, u'children': [{u'data': {u'approved_by': none,

android - Store record of purchased items locally vs query google play for purchased items [ queryInventoryAsync(QueryInventoryFinishedListener)] -

i using iab application. google's iab v3 api provides method query google play managed items owned user(device) v.i.z. queryinventoryasync(queryinventoryfinishedlistener) however, use sqlite database app , thinking of storing record of purchased items in own database instead of querying google play every second time. is bad idea? what pros , cons of queryinventoryasync vs storing purchased items in local sqlite database? user can manually clear application data , database dropped. or user can run application on device same account. purchasing in-app billing products it practice query in-app billing service user’s purchases, example whenever app starts or resumes, user’s current in-app product ownership information reflected in app.

Creating Adaptive Table Based Floating Column Email without Media Query -

unfortunately program use send out email not allow @media queries nor .css lists @ top of said code. problematic seeing building email template based around floating columns. 2 columns next 1 while viewing on tablet or desktop, have list drop underneath content panel while viewing on mobile device. here base of have: <div style="width: 100%; max-width: 650px; margin-left: auto; margin-right: auto;"> <table cellpadding="0" cellspacing="0"> <tbody> <tr> <td colspan="1" style="width: 100%;"> --banner image here-- </td> </tr> </tbody> </table> <table style="width: 100%;"> <tbody> <tr> <td align="left" valign="top" width="320px;" style="padding-left: 10px; padding-right: 10px;"> --content goes here-- </td> <td align="left" valign="top" width="180px;" style="padding

ios - Fast enumeration situation -

i'm working fast enumeration variables, seems simple can't make work. i have code, work for (nsdictionary *story in stories){ nslog(@"%@", [story objectforkey:@"title"]); } this prints every single key stored in tittle. now, try this for (nsdictionary *story in stories){ nslog(@"%@", [story objectforkey:@"title"]); nsstring *titles = [story objectforkey:@"title"]; [self.bigtext settext:titles]; } and print one. why? nevermind, figured out myself. nsmutablestring *string = [[nsmutablestring alloc] init]; (nsdictionary *story in stories){ nslog(@"%@", [story objectforkey:@"title"]); [string appendstring:[nsstring stringwithformat:@"%@", [story objectforkey:@"title"]]]; } self.bigtext.text = string;

memory leaks - iOS App is getting slower after dismissing ModalViewController -

i'm developing ios app has work on modal vc. (images, etc). this leads lot of allocated memory. okay while presenting view. after dismissing view i'm still having memory allocated. in simulator can free memory sending memory warning. the problem app runs slower after dismissing view. i'm doing fade , move animations after , slower before. i'm using arc , developing ios 6/7. have ideas how free memory programmatically? found problem... i had still reference modal view in view controller presented modal view. but still have same problem. app runs slower after presenting moadl view. although don't have memory allocated.

java - Primefaces datatable disapeares after update from commandLink -

when try update datatable comandlink on first time works fine, on second time datatable disapeares yet still see paginator. here datatable code : <p:datatable id="tabexam" paginatorposition="bottom" var="exam" value="#{dyna.examviewdatamodel}" widgetvar="examtable" emptymessage="aucun résultat trouvé pour votre recherche" paginator="true" rows="40" selection="#{dyna.selectedexamen}" selectionmode="single" resizablecolumns="true" draggablecolumns="true" paginatortemplate="{currentpagereport} {firstpagelink} {previouspagelink} {pagelinks} {nextpagelink} {lastpagelink} {rowsperpagedropdown}" rowsperpagetemplate="40,80,120" rowstyleclass="#{exam.st

c# - How to stop Timer Tick from spamming? -

i trying implement idle detection thread: hide mouse cursor after idle time i have made little change it, having problem spamming test messagebox. void activityworker_tick(object sender, eventargs e) { bool checkidle = (user32interop.getlastinput() > activitythreshold); if (isidle != checkidle) { if (checkidle && (datetime.now.subtract(idlechecktimestamp) > timespan.fromminutes(1))) { system.windows.forms.messagebox.show("idle: " + count); idlechecktimestamp = datetime.now; count++; } isidle = checkidle; } } each time event fires,the messagebox displayed, nothing after runs, making seem impossible stop spamming. not reset timestamp, nor increment count variable, spams messagebox "idle: 0". can point me in correct direction on make stop spamming? want system checking idle time, want code fire once every mi

iOS - Scrolling to the top of a UITableView -

this question has answer here: force uitableview scroll top? 6 answers in app there uitableview 6 sections. while number of rows increasing, think user should have option scroll top of tableview. thinking including button on title header perform scrolling action. have seen in similar question problem here: ios scroll section in uitable view but don't know include code given in answer question , don't know put param insection : nsindexpath * indexpath = [nsindexpath indexpathforrow:row insection:section]; [_tableview scrolltorowatindexpath:indexpath atscrollposition:uitableviewscrollpositiontop animated:yes] any welcome. //assuming want scroll top of current section: i advise private variable save indexpath of current cell. in button in top, when user wants go top of section, can access section indexpath. //in .m file @ top @property(nonat

Yeoman cucumberjs -

hi learning use cucumberjs on ember. using yeoman it. when try run cucumberjs command prompt below error $ grunt cucumberjs no "cucumberjs" targets found.warning: task "cucumberjs" failed. use --force continue. aborted due warnings.

java - How do you use Webstorm and Idea together? -

i've started working on project uses mix of javascript , java code. we're using community edition of idea java code , webstorm javascript. this fine except fact share same .iml files , result end interacting horribly each other! there way stop this? there few things do: upgrade intellij idea ultimate (paid product) supports these languages. separate javascript , java code in different projects. 2 options here: a) keep both projects in different folders (subfolders) *.iml , other config files not intersect , not interfere each other. b) keep actual code have now, store project config files ( .idea subfolder) separately -- follow steps described in wi-343 ticket body (create empty project elsewhere; remove default content root; add desired content root).

mysql - SQL: get min and max value along with another respective column for each value -

this question has answer here: how can select rows max(column value), distinct column in sql? 16 answers -------------------------------- |uid |lesson_score |date | -------------------------------- |1 |2 |1391023460 | |1 |4 |1391023518 | |2 |3 |1391023557 | |1 |8 |1391023596 | -------------------------------- how determine maximum , minimum scores particular user, , respective date? so far have this: select max(lesson_score) max_lesson_score, min(lesson_score) min_lesson_score, date user_progress uid = 1 what need this: min: 2, 1391023460 max: 8, 1391023460 i know it's returning correct min , max score, it's returning 1 date, , i'm not sure date it's returning... thanks! your query not legal sql, because there different data values min , max scores. the query not simpl

python - How to test session in flask resource -

i'd test resource. response of depends on parameter in session (logged) test resource, i've wrote tests: import app import unittest class test(unittest.testcase): def setup(self): self.app = app.app.test_client() def test_without_session(self): resp = self.app.get('/') self.assertequal('without session', resp.data) def test_with_session(self): self.app c: c.session_transaction() sess: sess['logged'] = true resp = c.get('/') self.assertequal('with session', resp.data) if __name__ == '__main__': unittest.main() my app.py this: from flask import flask, session app = flask(__name__) @app.route('/') def home(): if 'logged' in session: return 'with session' return 'without session' if __name__ == '__main__': app.run(debug=true) when run tests have error: erro

Warnings suppressed with mclapply in R -

with mclapply() issued warnings seems suppressed: library(multicore) mclapply(1:3, function(x) warning(x)) [[1]] [1] "1" [[2]] [1] "2" [[3]] [1] "3" while lapply give: lapply(1:3, function(x) warning(x)) [[1]] [1] "1" [[2]] [1] "2" [[3]] [1] "3" warning messages: 1: in fun(1:3[[3l]], ...) : 1 2: in fun(1:3[[3l]], ...) : 2 3: in fun(1:3[[3l]], ...) : 3 any tips on how avoid loosing warnings? according mclapply 's page, in opinion argument mc.silent should allow chose if warnings printed or not. strangely, not that. setting explictly true or false not have effect in situation. so leaves dirty hack: forcing r print warnings occur. options(warn=1) mclapply(1:3, function(x) warning(x)) # warning in fun(1l[[1l]], ...) : 1 # warning in fun(2l[[1l]], ...) : 2 # warning in fun(3l[[1l]], ...) : 3 # [[1]] # [1] "1" # # [[2]] # [1] "2" # # [[3]] # [1] "3"

c# - Select SQL Search String Based on Content of ASP.NET Text Field -

the goal of code-behind below select sql select statement in string variable based on whether or not text box or not null, execute statement. i've tried both using variable , directly executing select statement using sqldatasource1.selectcommand = 'select...' unfortunately, neither method returning @ when put data in text fields checked. using system; using system.collections.generic; using system.linq; using system.web; using system.web.ui; using system.web.ui.webcontrols; using system.data.sqlclient; using system.data.sql; namespace myprogram { public partial class webform1 : system.web.ui.page { string query = ""; protected void page_load(object sender, eventargs e) { sqldatasource1.selectcommand = query; sqldatasource1.selectparameters.add("namelast", searchlast.tostring()); sqldatasource1.selectparameters.add("namefirst", searchfirst.tostring());

declaration - Ada: Access types and invalid completion with records -

i'm learning ada , using book rendez-vous ada naiditch (1995) . on page 385 , example given package specification file incomplete type declaration: package restaurant_linked_list subtype name_type string (1..20); type restaurant_record private; procedure add_to_list (new_entry: in restaurant_record); procedure (new_restaurant: out restaurant_record); procedure delete_from_list (target: in name_type); procedure search_list (target: in name_type); procedure output_list; private type ethnicity (chinese, japanese, french, korean, mexican, italian, jewish, american, german); subtype price_type float range 0.0 .. 150.0; type restaurant_record; -- incomplete type declaration type restaurant_pointer access restaurant_record; type restaurant_record -- complete type declaration record name: name_type; food: ethnicity; average_price: price_type; next: restaurant_pointer;

javascript - Jquery only fires, upon inspection of the core element and or use of the orientation detection in mobile and tablets. -

i have implemented gallery/slideshow webpage, seen here (www.scandalband.co.uk). have come accross issue don't know how correct. jq not strong yet think problem related to, $(document).ready. as mentioned int title slider fires when inspect core element affected jq i.e. slider. or alternativly use orentation detection on mobiles , tablets. can solve problem using document.onload rather document.ready. when use onload, first image in slideshow slider locks completely. i have provided affected code <!-- ꜜꜜ slider initilizer ꜜꜜ --> <script> $(document).ready(function(){ // slider swipe function slider = $('#slider').swipe({ auto: 3000, continuous: false }).data('swipe'); $('.next').on('click', slider.next); $('.prev').on('click', slider.prev); }); </script> any appreciated. try , lemme know , joined these scripts

ios - Only changing X axis value -

im aware can change position of image view this myimageview.frame = cgrectmake(99, 34, 32, 32); but how change x value leave rest are? realize simple question because don't know how word search im having difficulty finding solution. thanks //capture frame cgrect thisrect = myimageview.frame; //modify required frame parameter (.origin.x/y, .size.width/height) thisrect.origin.x = 0; //set modified frame object [myimageview setframe:thisrect];

ruby - How to export a Confluence "Space" to PDF using remote API -

i"m looking examples of exporting confluence 'space' pdf. docs horrible this. looks might still supported in latest confluence ( 5.0 ) using xml-rpc api cannot find example of call though. https://developer.atlassian.com/display/confdev/remote+api+specification+for+pdf+export#remoteapispecificationforpdfexport-xml-rpcinformation that links says calls hould prefixed pdfexport dosen't list of calls or give example. i know php example, not ruby, can check out xml-rpc example in voycerag's php project on github @ https://github.com/voycerag/confluence-xmlrpc-pdf-export/blob/master/src/voycer/confluence/command/pdfexportcommand.php ... hope helps. basically need make call login method , user authentication token returned make call exportspace method. in turn gives url authenticated user can download pdf from.

javascript - Saved PNG image is a bit larger than canvas size in Firefox -

newbie here. i testing out kinecticjs , made several tech demos. canvas size set 700x900 , loaded several svg paths. on browser winder good: clean clear crisp, no pixelation on edges. in firefox when right click , choose "view image". resulting image of 875x1125, increased 25%! image when saved , viewed @ 100% fuzzy on edges , not crisp @ all! did wrong? tried change display scale in firefox result still same. jsfiddle url provided in comments. it's tech demo draggable body parts.

java - How can I access the variables of an inner class? -

class outer{ int c, void values() { inner.a=3; inner.b=4; } void addvalues() { **inner.a += c;** // **how can access value of a=3 values() method?** } class inner{ int a,b; } } 1) need instance of inner that or 2) can declare inner static , make variable a static

c# - Using Zip to combine 3 strings instead of 2 -

i'm writing function add new nodes xml file, created 2 list<string> , combined them following var firsttext = firstlist; var secondtext = secondlist; var alltext = firsttext.zip(secondtext, (t1, t2) => new { firstword = t1, secondword = t2 }); foreach (var tt in alltext) { xml.writestartelement(tt.firstword); xml.writevalue(tt.secondword); xml.writeendelement(); } to add this <force>true</force> <auto>false</auto> right want combine 3 strings instead of 2 writing this xml.writestartelement(tt.firstword); xml.writestartelement(tt.secondword); xml.writevalue(tt.thirdword); xml.writeendelement(); xml.writeendelement(); so xml like <settings> <force>true</force> </settings> <settings> <auto>true</auto> </settings> how can such thing? just call .zip again: var alltext = firsttext.zip(secondtext, (t1, t2) => new { firstword = t1, secondword = t2 });

.net - STS logging user out after 60 mins, how to extend? -

i have setup relying party, sharepoint site , claims application. application's talking each other , sso working sharepoint. issue after hour, user logged out of application , sent sts login. can't seem pinpoint needs changed extend users "session." realize possibly cookie , not session. have pointers? spent time looking around on web, haven't been able pin point solution issue. i have done of following iis extend timeout no avail: change application pools idle time-out. change asp session time-out value going asp – session properties under iis manager. change cookie settings time-out value going session state ->cookie settings federatedauthentication of rp: <federatedauthentication> <wsfederation passiveredirectenabled="true" issuer="mystsapplication" realm="relyingparturl" requirehttps="false" /> <cookiehandler requiressl="false" path="/" name="mycookiehand

mysql - I tried to run this query but it shows Subquery return more than 1 row -

select name test.projectusermap p projectid in( if(1 = 1, ( select projectid test.projectusermap ), ( select projectid test.projectusermap name = 'ravi' )) ) you need this select name test.projectusermap p projectid in(select projectid test.projectusermap ( 1 = 1 ) /*i assume boolean condition placeholder testing , won't this*/ or name = 'ravi')

Java/JPA persist return value -

i have 2 entities question , publication . publication has list of question. when persist question ok, check on database , row insersed (i'm using mysql). then need show question of publication, , when select questions question persisted before not show. i " select p publicacion ", returns publications questions , not new one. if stop sever , deploy again application web when show question of publication appears! i dont know happening, dont know if someting memory or entity manager. please im stuck thanks public t persist(t object){ entitymanager.persist(object); entitymanager.flush(); return object; }

build.gradle - integrate ant junit generated test-results in gradle html report -

in gradle build script, added dolast method test task run ant.junit task execute tests few jar files. test << { //run ant junit task reports stored in $builddir/test-results //after ant junit completion , "test" task completion, //how can gradle generated html report include above test-results? } how enhance task gradle html report benefit? see ant junit test xml reports getting created in $builddir/test-results along other "gradle test" created xmls. $builddir/reports/tests" contains only. hoping gradle pick ant junit created test result xml files , include in html report. not happening. how can behaviour? i tried create task of type testreport. did not help. task runtestsfromjar( type: testreport ) { destinationdir=file("$builddir/reports/tests") reporton tasks.test, files("$builddir/test-results/binary/test") } i working gradle 1.8. i suggest creating task of

gcc - Strange pointer arithmetic -

i came across strange behaviour of pointer arithmetic. developing program develop sd card lpc2148 using arm gnu toolchain (on linux). sd card sector contains data (in hex) (checked linux "xxd" command): fe 2a 01 34 21 45 aa 35 90 75 52 78 while printing individual byte, printing perfectly. char *ch = buffer; /* char buffer[512]; */ for(i=0; i<12; i++) debug("%x ", *ch++); here debug function sending output on uart. pointer arithmetic specially adding number not multiple of 4 giving strange results. uint32_t *p; // uint32_t typedef unsigned long. p = (uint32_t*)((char*)buffer + 0); debug("%x ", *p); // prints 34012afe // correct p = (uint32_t*)((char*)buffer + 4); debug("%x ", *p); // prints 35aa4521 // correct p = (uint32_t*)((char*)buffer + 2); debug("%x ", *p); // prints 0134fe2a // strange?? am choosing wrong compiler option? pls help. tried optimization options -0 , -s; no change.

SQLite count in left join request -

my model 1 wine can have many bottles. these bottles have field output_type null or not null. actually, can count bottles this: select count(distinct(bottles.id)) total_bottles wines left join bottles on wines.id = bottles.wine_id , bottles.status=1 , bottles.output_type null this works well. but need more: want count bottles stored (output_type null) , count bottles gone (output_type not null) in same request. so left join not enough because can't count bottles stored , bottles gone in main request. i have seen this, including "sub request" in left join: left join (select count(*) bottle_stored bottles bottles.status=1 , bottles.output_type null) total_stored on wines.id = bottles.wine_id but not working. if working, can duplicate left join count gone bottles. edit: more explanations here. current request. can count bottles stored (output_type null) each wine. select wines.id, wines.winery count(distinct(bottles.id)) total_bottles wines left jo

http headers - Which HttpConfiguration object do I need to access to create a custom HttpParameterBinding? -

in this post , mike wasson states: " besides parameterbindingattribute, there hook adding custom httpparameterbinding. on httpconfiguration object " but have 3 httpconfiguration objects in web api app, namely: public static void register(httpconfiguration config, iwindsorcontainer container) <-- in webapiconfig.cs private static void maproutes(httpconfiguration config) <-- "" public static void configurewindsor(httpconfiguration configuration) <-- in global.asax.cs which of these (config, config, or configuration) should use (if any)? update i tried this, breakpoint on "if" line: public static void configurewindsor(httpconfiguration configuration) { _container = new windsorcontainer(); _container.install(fromassembly.this()); _container.kernel.resolver.addsubresolver(new collectionresolver(_container.kernel, true)); var dependencyresolver = new windsordependencyresolver(_container); configuration.dependencyres

margins - CSS Issue with the footerwrapper -

i can't figure out why unable footer wrapper , elements inside center rest of page. i'm using code , not working: #footer-wrapper{ margin:0 auto; } if has minute , can take look, appreciate it. http://skeeterz71.com/auto/ thanks when you're aligning content margin: 0 auto; need set-width because divs automatically 100% means width of window means there's no space center. also, it's better wrapper within parent. see this: http://jsfiddle.net/cranavvo/zkmd5/

Iterating Through Multiple PHP Variables, Assigning Values To Each For SQL Statement -

so been searching around , not sure regarding question. basically, wanting have going on in code (i have ingredient variables hardcoded), instead create single loop iterate through , assign available ingredients corresponding variable , update sql record accordingly. what's best way go this? i want make more efficient, don't end empty columns in sql db, instead leave null in database if ingredient strings empty in url api, consists of ingredients.php?ingredient[]=apple&ingredient[]=pepper&ingredient[]=..... $ingredients = $_get['ingredient']; $ingredient1 = $ingredients[0]; $ingredient2 = $ingredients[1]; $ingredient3 = $ingredients[2]; $ingredient4 = $ingredients[3]; $ingredient5 = $ingredients[4]; $ingredient6 = $ingredients[5]; $ingredient7 = $ingredients[6]; $ingredient8 = $ingredients[7]; $ingredient9 = $ingredients[8]; $ingredient10 = $ingredients[9]; $ingredient11 = $ingredients[10]; $ingredient12 =