Posts

Showing posts from March, 2012

ios - how to pass the pointer in objective c? -

i'm developing mini quiz game. in opening xib, preferred username using methods below , pass model(modelunit): //intro.h @interface introviewcontroller : uiviewcontroller{ modelunit * modl; } //intro.m -(modelunit *) modl{ if(!modl){ modl = [[modelunit alloc] init]; } return modl; } - (ibaction)nickentered:(uitextfield *)sender{ [[self modl] setname:[sender text]]; ..... } however, when try create pointer points modelunit in sequentially last xib, returns username null. assume has same pointer reach same location. how can go it? help. you not setting right. how refer 'modl' in 2 different ways in intro.m file [self modl] refers property called 'modl' normal use of 'modl' refers variable declared in interface. this suggests not storing username in 'modl' object created. or have 2 'modl' objects. (would have see complete code know sure) to able access 'mo

python - Sphinx todo box not showing -

in sphinx, can not make todo list show. here have: .. todo:: blah blah blah conf.py extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.todo', ] i tried sphinx.ext.todo=true in conf.py, syntax errors when make html . based on documentation have set todo_include_todos in configuration. http://sphinx-doc.org/ext/todo.html#confval-todo_include_todos if syntax errors maybe try (as in note example linked docs above): .. todo:: blah blah edit: it doesn't same in site because site has applied customed css that. looked @ sphinx source code , "pyramid" theme theme mentions todo styles, can see site mentioned uses default theme. site has it's own css file . should able add own css file "doc/source/_static" directory , add conf.py include it: def setup(app): app.add_stylesheet('my_styles.css') specifically notice section of css file div.admonition-todo : div.admonition-todo { border-top: 2

javascript - Angular ui-router scroll to top, not to ui-view -

i've upgraded ui-router 0.2.8 0.2.0 , i've noticed when state changes, scroll position jumps top of te child ui-view subject of new state. this fine have 2 problems it: 1) have 30px padding between top of page , ui-view , scroll top of page, leaving gap. @ moment goes top of ui-view looks ugly. achieve guess either need know how scroll top of div ui-view in (not browser viewport ), or need find out how override $uiviewscroll scroll ui-view minus 30px. i have tried $uiviewscrollprovider.useanchorscroll(); if doesn't scroll @ all. have tried <ui-view autoscroll="false">; , stops scrolling completely. 2) doesn't scroll @ moment, jumps. suppose scroll or developer css transitions? any appreciated :) another approach decorate default $uiviewscroll service, overriding default behaviour. app.config(function ($provide) { $provide.decorator('$uiviewscroll', function ($delegate) { return function (uiviewelement) {

javascript - white space appear after call phonegap camera function -

Image
in app, everytime when call camera ( either take picture or scan barcode), there white space added bottom(tested on ios 7). can grow how many times used camera. looks same height of status bar. the camera using native sdk, nothing else in code. camerahelper.prototype.takecameraimage = function(callback){ console.log("takecameraimage"); navigator.camera.getpicture(onsuccess, onfail, { quality: 49, destinationtype: camera.destinationtype.file_uri, sourcetype: navigator.camera.picturesourcetype.camera, correctorientation: true, targetwidth: 266, targetheight: 266 }); function onsuccess(imageuri) { callback({imageuri: imageuri}); } function onfail(message) {

eclipse - Java Applet, repaint 60times/sec method and polygons -

i have run method repaints 60times/sec , have paint method 4polygons in it. 4 buttons. when press 1st, poligons range in order red 1 on top, when press 2nd button polygons swop , green on top , others behind it. on eclipse , working, when run in terminal applet viewer, polygons not stoping , refreshing constantly. how make statement repaint 60time/sec polygon once when clicked on button. public void run() { long lasttime = system.nanotime(); double ns = 1000000000.0 / 1.0; double delta = 0; requestfocus(); while (running) { long = system.nanotime(); delta += (now - lasttime) / ns; lasttime = now; while (delta >= 1) { delta--; update(); repaint(); validate(); } } } and paint method public void paint(graphics g) { // gives sharper graphics g2 = (graphics2d) g; g2.setrenderinghint(renderinghints.key_antialiasing,

How to sell digital goods in a PhoneGap/Cordova application on Android? -

i porting (cordova) app blackberry10 android , have not been able find equivalent of following plugins: blackberry.payment.getprice(options); blackberry.payment.getexistingpurchases(); blackberry.payment.purchase({ digitalgoodsku: '12345' }); has written plugin can used enable in-app payments within phonegap/cordova application, integrates android marketplace? hoping provides great user experience. in advance. a developer has created cordova plugin in-app billing on android: https://github.com/poiuytrez/androidinappbilling/blob/master/v3/readme.md

javascript - Getting Pre-Populated Tags Via JQuery/AJAX -

i'm using "bootstrap-tags" jquery plugin ( https://github.com/maxwells/bootstrap-tags ) add simple tagging interface web app i'm working on. in happy path, can plugin work fine, need pull tags shown on page load mysql db. code have is: $.get("getcurrenttags.php", {"id": id] }, function(data) { $('#my-tag-list').tags({ tagdata: data, bootstrapversion: "2" }); } ); doing gives me following error in chrome console: uncaught typeerror: cannot use 'in' operator search '12' in ["civil war"] i think more of general problem , has how 'data' formatted going callback function, especially since works if manually type like tagdata: ["civil war"] but can't figure out exactly. for thoroughness, 'getcurrenttags.php' looks this: include('db.php'); $oid = $_get['id']; $currenttags = array(); $

perl - How to add and remove routes dynamically in Mojolicious? -

i trying put maintenance page in mojolicious app of users shown whenever file or db entry present on server. i know can check file or entry on startup , if there add in 'catch all' route. i'm not sure how dynamically? don't want have restart backend whenever want go maintenance. is there way add , remove routes hook? example use before dispatch hook monitor file/db entry , if exists modify routes? i tried didn't seem able access routes hooked function, in startup function. thank you. the router dynamic until first request has been served, after that, router cannot change routes ( source ). said, can not declare route , prohibit access until condition exists? #!/usr/bin/env perl use mojolicious::lite; '/' => sub { shift->render( text => 'hello world' ) }; under sub { unless (-e 'myfile') { shift->render_not_found; return 0; } return 1; }; '/protected' => sub { shift->render(

c++ - Why can't decltype work with overloaded functions? -

decltype fails if function you're calling on overloaded, in code: #include <iostream> int test(double x, double y); double test(int x, int y); char test(char x, int y); int main() { std::cout << decltype(test) << std::endl; return 0; } results: error: decltype cannot resolve address of overloaded function i understand because decltype can't figure out function you're trying type of. why isn't there way make work, this: std::cout << decltype(test(double, double)) << std::endl; or this: double x = 5, y = 2; std::cout << decltype(test(x, y)) << std::endl; since function cannot overloaded based on return type, wouldn't passing either datatypes or actual variables decltype call enough tell of overloads it's supposed examine? missing here? to figure out type of function type of arguments you'd pass, can "build" return type using decltype , "calling" types, , add o

postgresql - New table with all columns as differences between two base tables columns -

i using postgres 9.1 , have 2 tables ( tab1 , tab2 ). wish create third table ( tab3 ) each column difference between respective columns in these tables, i.e. tab3.col1 = (tab1.col1 - tab2.col1) . tables tab1 , tab2 have large number columns. there efficient way create table tab3 ? if hard code desired output plan use code below. wish avoid have on 60 columns create , want avoid hard-coding errors. columns may not in same order across 2 tables, naming consistent across tables. create table tab3 select a.col1_01 - b.col2_01 col3_01, a.col1_02 - b.col2_02 col3_02, ... ... tab1 full join tab2 b using (permno, datadate); you can build whole statement information in system catalog (or information schema) , execute dynamically do command . that's do. do $do$ begin execute ( select 'create table tab3 select ' || string_agg(format('a.%1$i - b.%1$i %1$i', attname) , e'\n , ' order attnum) || '

javascript - call a function on chrome app -

i working chrome app , developed normal web page. includes several .js files , calls functions on click , on load. <body onload="thisisonloadfunction()"> <button class='btn btn-info btn-large icon-undo pull-right' onclick='cancelall()'> they of them. not work when run app. in console shows error saying refused execute inline event handler because violates following content security policy directive: "default-src 'self' chrome-extension-resource:". note 'script-src' not explicitly set, 'default-src' used fallback how can working. you can not use inline event handler in apps. security issue. include js file like: document.getelementbyid("some_id").addeventlistener("click", some_function); or use queryselector attach event directly ..byid("some_id").onclick etc. typically wrap code in: document.addeventlistener('domcontentloaded', function

box api - Upload files to my personal box account using box api java sdk -

i create java application automatically uploads files personal box account using box api java sdk. can save credentials , not want enter them each time. not uploading files on other users' behalf , hence prefer not use oauth. can tell me how this? you have authenticate using oauth2 since of box api calls require oauth2 token in header. it looks java sdk auto-refresh token when it's expire, need authenticate once (unless application restarts).

asp.net mvc 4 - mvc 4 How to call javascript function after @Html.RadioButtonFor clicked -

view has : <div monthly @html.radiobuttonfor(m => m.ddpaymentoption, "monthly", true) yearly @html.radiobuttonfor(m => m.ddpaymentoption, "yearly", true) </div> tried $(":radio").click(function () { var selectedvalue = $(this).val(); var isdiv = document.getelementbyid('instalmentschedulediv'); if (selectedvalue == "yearly") { isdiv.classname = "hidediv"; } }); does not hit function use code $('#ddpaymentoption').click(function(){ if($(this).val()=='yearly') { $('#instalmentschedulediv').addclass('hidediv'); } }); and if using hidediv class hide div can jquery methods show or hide div element $('#instalmentschedulediv').hide(); // hide element and/or $('#instalmentschedulediv').show(); // show element

python - Model name is being displayed in Django template -

i'm new django i'm building few simple apps increase knowledge. trying display concatenated list, when display list shows model names so: [<famousquote: yourself; else taken>][<infamousquote: . dunno. either way. >] this views.py file: def index(request): famous_quote = famousquote.objects.all().order_by('?')[:1] infamous_quote = infamousquote.objects.all().order_by('?')[:1] compiled = [famous_quote, infamous_quote] return render(request, 'funnyquotes/index.html', {'compiled': compiled}) and index.html file: {% if compiled %} {{ compiled|join:"" }} {% else %} <p>no quotes you.</p> {% endif %} is there i'm doing wrong, or better way this? you have list of lists, unicode representation of list contains <objectname:string> , if had list of model objects, you'd proper __unicode__ representation of objects. ultimately, template automatically trying co

vb.net - How do I use the Tag property with forms and code in VB 2012? -

i writing program using database customers , technicians. main form (customerincidents) has toolstripbutton opens different form (searchbystate) user inputs state code , looks incidents. if user clicks 1 of datagrid cells want customers information stored in tag when form closed using ok button show in main form (customerincidents). edited 03/11/14 12:21pm the problem in main form. when click ok button in second form tries convert dialogresult button string. can't figure out how fix it. customer form (main form) opens secondary form private sub btnopenstate_click(byval sender system.object, byval e system.eventargs) handles btnopenstate.click dim frmsearchstate new findcustomer ----->>dim selectedbutton dialogresult = frmsearchstate.showdialog() if selectedbutton = windows.forms.dialogresult.ok customeridtoolstriptextbox.text = frmsearchstate.tag.tostring end if' search state form (secondary form) or "child form&q

code generation - drools programmatically generate a fact model -

i need generate enormous fact model using ontology external drools. now, write script/program pull off. approach generate java bean each ontology class contains appropriate fields, methods, , references other java objects based on ontological relationships (probably in map). question whether drools has more elegant way approach problem. figure must common problem fact model derivable resource available outside of drools, i'm wondering if maybe drools(or guvnor) has built in method of generating fact model given structured input. i did find discussion in following thread: http://drools.46999.n3.nabble.com/rules-users-using-an-owl-ontology-in-drools-advice-td3724566.html unfortunately wasn't able far following conversation. update: the traits article linked @alikok helpful. @ least provides framework ontology can fit. summarize, 1 of big problems fitting ontology java bean class model java doesn't multiple inheritance. ontology require this, , mine no exception. t

java - Why am I getting a NullPointerException on my clear() method? -

on junittest getting java.lang.nullpointerexception error, mean? clear() method wrong? here fields: private static class node<e> { /** data value. */ private e data; /** link */ private node<e> next = null; /** * construct node given data value , link * @param data - data value * @param next - link */ public node(e data, node<e> next) { this.data = data; this.next = next; } /** * construct node given data value * @param data - data value */ public node(e data) { this(data, null); } } /*</listing>*/ // data fields /** reference head of list */ private node<e> head = null; /** size of list */ private int size = 0; this clear() method: /** * removes of elements list (optional operation). * list empty after call returns * @throws unsupportedoperationexception if clear operation not supported list */ public void clear() { node<e>

unityscript - In Unity3D ,How do you play video on a game object a rectangle, for example, so that it acts like a television? -

this question has answer here: how play news in tv when switch on, using scripting language in unity3d? [closed] 1 answer i new unity3d , need know how play video on game object rectangle, example acts television. a standard library version of available pro/advanced users: https://docs.unity3d.com/documentation/manual/videofiles.html

How to Recall Stop Drawing From Outside of Map -

Image
drawing manager using stop (not end) drawing session. can please let me know how can call other button utside of map canvas? example if have button <button type="button" id="stopdrawing"</button> <button type="button" id="startdrawing"</button> please informed not want end drawing manager session. thanks when click on hand drawingmode set null , may same : drawingmanagerinstance.setdrawingmode(null);

interrupt handling by C code -

i trying disable interrupts through c code stuck @ request_irq() . 1 argument request_irq() flag , sa_interrupt flag deprecated. can tell me alternative sa_interrupt ?. using kernel version 3.8. any other alternative request_irq() disabling interrupts? request_irq() not "disable" interrupt. called driver wants attach interrupt service routine irq. flag irqf_shared if interrupt shared or 0 otherwise. here example driver realtek 8169 pcie network adapter: http://lxr.free-electrons.com/source/drivers/net/ethernet/realtek/r8169.c retval = request_irq(pdev->irq, rtl8169_interrupt, (tp->features & rtl_feature_msi) ? 0 : irqf_shared, dev->name, dev); in example above, rtl8169_interrupt interrupt service routine (isr) invoked each time irq raised. it job of isr find out if interrupt indeed fired "owned" device (relevant shared interrupts) if device indeed fired interrupt, isr reads interrupt status clears interrupt.

Find the last entry of a data in sql server 2008 R2 -

Image
i need find latest entry comparing 2 columns table follows i need find latest entry of each player may went out in striker or in nonstricker .how find last entry of each player comparing striker , nonstricker column,ie need sthe result follows it shows last entry of rr_2 , rr_3

Calling union member in struct with c -

below piece of code working on.. struct argusrecord { struct argusrecordheader hdr; union { struct argusmarstruct mar; struct argusmarsupstruct sup; struct argusfarstruct far; struct arguseventstruct event; #if defined argus_pluribus struct argusvflowstruct vflow; #endif } ar_un; }; i have defined variable as struct argusrecord myrecord; i can call first member myrecord.hdr if same way call union members such mar , sup .. etc getting error message ..... has no member named ‘mar’ please 1 tell me how call union members. you have call using union name ar_un myrecord.ar_un.mar

nokia - How to mix android.support.v4.app.Fragment and android.app.Fragment -

i'm having problem com.here.android.mapping.mapfragment when trying use tabs. the issue comes since tabactivity deprecated(i know still works, need future proof solution), , fragmenttabhost appears requiring v4 fragment used (it crashes if fragment derived other one) , when try having com.here.android.mapping.mapfragment used in layout of 1 of tab fragments, can not retrieve required initialization, since (mapfragment) getfragmentmanager().findfragmentbyid() line has error indicating casting mapfragment can not made. i suppose issue mapfragment derived android.app.fragment , findfragmentbyid expects return mix android.support.v4.app.fragment, question on how mixture run smoothly ? the android.support.v4.app.fragment , android.app.fragment classes can't used interchangeably. nokia have created com.here.android.mapping.mapcompatibilityfragment extends android.support.v4.app.fragment - use instead if app uses support fragments.

php - Access Session data in codeigniter -

$username = $this->input->post('username'); $password = $this->input->post('password'); $result = $this->accountmodel->login($username,$password); if($result){ foreach($result $row){ $loggedin = array('admin_name' => $row['username'], 'is_loggedin' => true); $this->session->set_userdata($loggedin); how able access ['admin_name'] , ['is_loggedin'] without having run code , running foreach loop $this->session->all_userdata() from "retrieving session data" section of session class docs: any piece of information session array available using following function: $this->session->userdata('item'); so want: $this->session->userdata('admin_name'); the docs friend ;)

javascript - "Uncaught Error: [$injector:modulerr] Failed to instantiate module" when there are multiple "ng-app" directives -

i learning angularjs , , while experimenting met error: uncaught error: [$injector:modulerr] failed instantiate module myapp due to: error: [$injector:nomod] module 'myapp' not available! either misspelled module name or forgot load it. if registering module ensure specify th......0) here code: <!doctype html> <html > <head> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.9/angular.js"></script> <script type="text/javascript"> function controller( $scope, $location ){ // } function controller2( $scope, $location ){ // } </script> <title>angular js application</title> </head> <body > <div ng-app="myapp"> <div ng-controller='controller' > <h1>app1</h1> </div>

c# - Cannot create instance of 'ProductListingUserControl' defined in assembly ProductListing -

hi getting following error: cannot create instance of 'productlistingusercontrol' defined in assembly 'productlisting, version=1.0.0.0, culture=neutral, publickeytoken=null'. exception has been thrown target of invocation. error @ object 'system.windows.controls.grid' in markup file 'productlisting;component/views/productlistingcshostedcontrol.xaml' line 22 position 10. i have user control using in class.in class have defined event productselectionchangedevent giving me above error whenever creating instance of user control. i creating following event user control: window w = window.getwindow(productservicefunction); w.locationchanged += new eventhandler(productlistingusercontrol_locationchanged); this.sizechanged += new sizechangedeventhandler(productlistingusercontrol_sizechanged);

php - Request Soap WSDL -

i've started new project soap request, follow tutorials , doesn't work should. i use part of code request : $client = new soapclient("wsdl");   $param = array(   "requestdate" => $date,   "accountuid" => $id,   "userid" => $id,   "locale" => $local,   "authenticationinfo" => array("password" => $pass),   "image" => array(                 "type" => $type,                 "light" => $light,                 "source" => $source,                                 //the image has in base64binary                 "image" => base64_encode((fread(fopen("file", "r"), filesize("file"))))             )                   );   try{    //checkimage --> function on server side    $answer = $client->checkimage($param); } catch(soapfault $e){    echo $e; } and give me error : soapfault exception:

mysql - Do DBMSs store referencing attributes separately? -

suppose have following relations (tables) : student (id, name , family) course (id, title, unit, ref) std-course (std-id, course-id) // std-id , course-id foreign keys referencing student , course relations respectively. are std-id , course-id stored separately or stored pointers? (specially in mysql , ms sqlserver ) edit : let me explain more way : if there such row (123456, john, smith) in student table, , (123456,db1) in std-course 123456 stored twice or in second table (as foreign key) it's link? as per documentation: mysql supports foreign keys, let cross-reference related data across tables, , foreign key constraints, keep spread-out data consistent. meaning, use child , parent store data. instruction of foreign key ... references ... stored in system table table_constraints maintain defined relation among tables. edit : if there such row ( 123456 , john , smith ) in student table, , ( 123456 , db1 ) in std-course , 123456 s

javascript - Google Map marker tooltip on all markers, TypeError: projection is undefined -

ctooltip.prototype = new google.maps.overlayview; ctooltip.prototype.draw1 = function(pos, content, margin){ var div = this.div_; div.style.csstext = 'z-index:9999;cursor:pointer;visibility:hidden;position:absolute;text-align:center;margin:'+margin; if(content){ div.innerhtml = content; } if(pos){ $(markers_sets).each(function () { if (this.id == per.markers_set) { m_settings = this.settings; } }); var markersoffset = (typeof m_settings.markers_offset !== 'undefined' ? parseint(m_settings.markers_offset) : 7); var width = $('.vipul_'+tooltipcount).outerwidth() / 2; pin_center = 56 - width; var projection = this.getprojection(); var position = projection.fromlatlngtodivpixel(pos); div.style.left = (position.x - 64 + pin_center + markersoffset) + 'px'; div.style.top = (position.y - 40) + 'px'; div.style.visibility = 'visible'; } tooltipcount++; } wh

What is the logic behind this prolog code? -

i have short prolog code finds last element of given list. last_of([_|tail], x) :- last_of(tail, x), !. last_of([x], x). but have question logic of program. why use last_of([x], x). , couldn't understand this. can explain? there several comments program: 1st, name misnomer. first argument list, second last element. name suggests otherwise. better name list_last/2 or last/2 . 2nd, cut misplaced. in fact, exchanging rules , removing cut, more efficient, , more declarative: last([x] , x). last([_|xs], x) :- last(xs,x). now question. when starting programming in prolog, best imagine ground queries first. let's make several examples relation should succeed. ?- last([a],a). for true, fact last([a],a). sufficient. can generalize fact last([x],x). . after that, might consider list 2 elements fact last([_,x],x). cover lists of length 2. etc. last([x],x). last([_,x],x). last([_,_,x],x). ... now, let's generalize pattern! lets reduce case of lo

linux - Cannot Pull branch -

i new git. i pushed new changes online branch laptop. in server( linux centos ) want pull changes. i stashed files, when check 'git status' , output be: # on branch master # branch behind 'origin/master' 35 commits, , can fast-forwarded. # nothing commit (working directory clean) when git pull origin master , gives me: from https:***************** * branch master -> fetch_head updating ddebf93..669051e error: untracked working tree file 'framework/.htaccess' overwritten merge. aborting i don't know do. the framework/.htaccess file on server not part of git repo. the stash work files have been added repo. add framework/.htaccess repo git add framework/* or ignore in .gitignore file then commit , push/pull again

c - Strtok not creating a token -

i trying parse char * array tokens , researching strtok. whenever run code, doesn't return temporary value , wondering doing wrong int length; int = 0; int tokencounter = 0; int commandcounter = -1; char *temptoken; char tempinput[max_line]; length = read(stdin_fileno, tempinput, max_line); commandcounter = -1; if (length < 0) { perror ("there error reading command"); } else if (length == 0) { exit (0); } else { (i = 0; < length; ++i) { if (tempinput[i] == "\n" || tempinput[i] == ' ' || tempinput == "\t") { /* if (commandcounter != -1) { ptokens[tokencounter] = &tempinput[commandcounter]; ++tokencounter; } tempinput [i] = '\0'; commandcounter = -1; */ } else { temptoken = strtok (tempinput, " \n"); while (temptok

c# - Application closes without a reason -

my applications quit no reason without error, stops, , don't see why happens. whenever go through in debug mode, stops on line database.cmd.executenonquery() database.con.open(); using(database.cmd = new idb2command(query, database.con)) { database.cmd.commandtext = query; foreach(var value in para) { database.cmd.parameters.addwithvalue(value.key, value.value); } database.cmd.executenonquery(); } database.con.close(); my query wasn't correct, rather thought connection, searched in wrong place... anyways, guys :-) put whole code try catch block , print exception message in label or popup. exact error being thrown. while in debug mode, can see details of error on exception e part. try { //your code } catch(exception e) { label1.text = e.message; } the issue may database instance.

spring - java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSource -

iam doing project on spring mvc maven.iam getting error java.lang.classnotfoundexception: org.apache.commons.dbcp.basicdatasource while running project.i include dependencies think..below codes.waiting reply web.xml <?xml version="1.0" encoding="utf-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemalocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0"> <servlet> <servlet-name>accperspring</servlet-name> <servlet-class>org.springframework.web.servlet.dispatcherservlet</servlet-class> <init-param> <param-name>contextconfiglocation</param-name> <param-value>/web-inf/servlet-context.xml</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapp

html - How to add Schema.org type for feeds? -

<div itemscope="" itemtype="http://schema.org/itemlist" > <span itemprop="???"><a href="feed.rss">rss of section</a></span> <ul> <li itemprop="itemlistelement" itemscope itemtype="http://example.net/item"> <a href="" itemprop="url">title</a> </li> <li></li> <li></li> <li></li> </ul> </div> what feed in span tag? there schema.org type that? the schema.org vocabulary doesn’t define class or property feeds . but html5 defines way link feeds: use alternate link type type attribute set application/rss+xml resp. application/atom+xml . <a href="…" rel="alternate" type="application/rss+xml">…</a> (the first feed linked way treated default feed autodiscovery; when have several section feeds linked on same pag

excel - Convert XML file to String variable in VBA -

i'm looking convert contents of xml file string variable in excel vba can search file specific string. however don't know how initial conversion xml file string variable. i've been able far load xml document, , there i'm stuck. public function determinespecifiedchange(byval vstrinputgbompath string, byval vstrinputpdppath string) dim strpdpstring string dim strgbomstring string dim xmlgbom new domdocument60 dim xmlpdp new domdocument60 strpdpstring = xmlpdp.load(vstrinputpdppath) end function so far returns "true", signifying file being loaded. how go converting xml file string? here's way ask: dim fso object : set fso = createobject("scripting.filesystemobject") dim strxml string strxml = fso.opentextfile("c:\myfile.xml").readall

android - Overriding the funcationality of home button -

in android have been able override funcationality of button app need override home button. sure can done how can achieve this. @override public void onattachedtowindow() { this.getwindow().settype(windowmanager.layoutparams.type_keyguard); super.onattachedtowindow(); } and then @override public boolean onkeydown(int keycode, keyevent event) { if(keycode == keyevent.keycode_home) { log.i("home button","clicked"); } if(keycode==keyevent.keycode_back) { finish(); } return false; }

awk - take the entire row from whith the smallest value from column 1 -

i have file 2 1 12 2 34 1 56 1 45 3 33 2 77 1 83 2 62 3 75 3 i want take entire row whith smallest value column 1 this 2 1 12 2 45 3 here start with { if (!vals[$2] || vals[$2] > $1) vals[$2] = $1 } end { (idx in vals) print vals[idx] " " idx } you should add robustness code.

java - How to attach a pointcut to a to a method of class residing inside a .jar file using command line? -

i new aop . have created class in hookshow.java file: public class hookshow { void show(string msg) { system.out.println("in show :"+msg); } public static void main(string[] args) { hookshow cm=new hookshow(); cm.show("called main method"); } } then compiled , added generated .class file .jar file using : jar cf hshow.jar hookshow.class now have hshow.jar. creating aspect has pointcut executed on call of show() . dont have idea how can reffer class , method inside jar file. following aspect file: public aspect aspecthookshow { pointcut changemsgpointcut( string str) :execution(void hookshow.show(string)) && args(str); before(string str ) : changemsgpointcut( str) { system.out.println("inside pointcut :"+str); } } so please can tell me how can reffer method inside class in jar file. after research of 3 hours found 3 wa

loops - Java count spesific char in file -

i need count amount of specific character in file. user specify char need check how many chars there in file. package assignmentoneqone; import java.util.scanner; import java.io.filereader; import java.io.file; import java.io.ioexception; /** * * @author hannes */ public class assignmentoneqone { /** * @param args command line arguments */ public static void main(string[] args) { // todo code application logic here scanner kb = new scanner(system.in); string fileloc; string userchar; //user specify file , character system.out.println("enter file name"); fileloc = kb.nextline(); system.out.println("enter character"); userchar = kb.nextline(); file file = new file(fileloc); try { filereader fw = new filereader(file); this should search characters. } catch(ioexception e) { system.out

apache - Reduce Time for Tomcat Load Balancer Failover -

i new modjk. trying trying reduce time needed load balancing failover. load balancer works in round robin fashion. currently, takes 30s 40s load balancer send request connection when 1 connection fails. there code reduce time failover? this code: # worker.balancer.type=lb worker.balancer.balance_workers=worker1,worker2 worker.balancer.sticky_session=false # set properties worker1 (ajp13) worker.worker1.type=ajp13 worker.worker1.host=192.168.200.5 worker.worker1.port=8009 worker.worker1.lbfactor=1 # set properties worker2 (ajp13) worker.worker2.type=ajp13 worker.worker2.host=192.168.200.1 worker.worker2.port=8009 worker.worker2.lbfactor=1 looking forward help. thank much! what looking ping_mode setting documented in workers.properties configuration reference . sets way mod_jk checks see back-end connection working properly. if set ping_mode either p or a ( a implies p ), connection "tested" ever

Delete facebook post I am tagged in -

is there way delete post person tagged in? if 1 posted post can delete post. or if else have tagged in photo don't want go post , remove tag search name below photo , click on remove button.

php - Incorrect values functions -

i have problem script, script read file (csv) , stores last value of each line in array, calculate maximun, minimun , average of values in array, big files script give me incorrect value maximun , minimun, here can download script , 2 files, file 8.csv calculations correct file 1.csv values wrong, difference see file 1.csv larger other. this code: <?php $variable2=file("1.csv"); $i=0; foreach($variable2 $var){ if($i==0){ $i++; }else{ $datos=explode(",",$var); $valor=$datos[count($datos)-1]; if($valor!= -3000){ $todos[$i-1]=$valor; $i++; } } } $promedio=array_sum($todos) / count($todos); $maximo=max($todos); $minimo=min($todos); echo "maximo = ".$maximo." minimo = ".$minimo." promedio = ".$promedio; ?> and part of file script read: objectid,pointid,grid_code,potrero_id,mod13q1.a2 7300.0,7300.0,1.0,1,6431 7498.0,7498.0,1.0,1,6684 7499.0,7499.0,

lcs - How to print all possible solutions for Longest Common subsequence -

i want print possible solutions lcs problem. the 2 strings abcbdab , bdcaba should print following 3 strings: bdab,bcba,bcab. c global matrix table takes values according algorithm , m, n length of sequences a, b. but output unexpected. #include<stdio.h> #include<conio.h> int co=0,m=0,n=0,c[10][10]; char a[10],b[10]; void main() { int i,j; clrscr(); printf("enter 2 strings: "); scanf("%s",a); scanf("%s",b); m=strlen(a); n=strlen(b); for(i=0;i<=m;i++) { for(j=0;j<=n;j++) { if(i==0 || j==0) { c[i][j]=0; } else if(a[i-1]==b[j-1]) { c[i][j]=c[i-1][j-1]+1; } else if(c[i-1][j]>=c[i][j-1]) { c[i][j]=c[i-1][j]; } else { c[i][j]=c[i][j-1]; } } } for(i=0;i<=m;i++) {

android - Google Places Autocomplete API not retrieving place suggestions -

i'm using google places autocomplete api in application. followed tutorial http://wptrafficanalyzer.in/blog/adding-google-places-autocomplete-api-as-custom-suggestions-in-android-search-dialog/ when write place name in search box, doesn't retrieves suggestions , when press go button, app crashes. please help log file 03-10 16:51:56.383: e/activitythread(25238): failed find provider info com.appscourt.earth.map.placeprovider 03-10 16:51:58.798: e/activitythread(25238): failed find provider info com.appscourt.earth.map.placeprovider 03-10 16:51:59.594: e/activitythread(25238): failed find provider info com.appscourt.earth.map.placeprovider 03-10 16:52:00.399: e/activitythread(25238): failed find provider info com.appscourt.earth.map.placeprovider 03-10 16:52:01.805: e/activitythread(25238): failed find provider info com.appscourt.earth.map.placeprovider 03-10 16:52:06.298: e/activitythread(25238): failed find provider info com.appscourt.earth.map.placeprovider 03-10 16:5

oMail - adding changing merge fields to vba code from database form -

i basic user , i've set command button, on click send email. far, have managed make work point can send email particular email address in database, have stored field 'servicecontact' , want able send email address specified in field. insert merge fields email body specify email relating to this code have used far private sub receipt_confirmation_email_click() dim oapp outlook.application dim omail mailitem dim rs dao.recordset set oapp = createobject("outlook.application") set omail = oapp.createitem(olmailitem) set db = currentdb set rs = db.openrecordset("select * [checks]", dbopendynaset) omail.body = "re <insert field name here>" omail.body = omail.body & " " omail.subject = "confirmation email" omail.to = {{{{this section struggling format}}}} omail.sentonbehalfofname = "specific@emailaddress.org" omail.send set omail = nothing set oapp = nothing end sub any might able give me gratefully

java - launching a test project from another application -

i have created test project 1 of android app. test project creates excel file content. now, every time have run app, have connect device , run through eclipse. however, need generate excel whenever want (on go). but test app doesn't show in launcher(obviously). can see test project installed at, settings-->apps-->all . , hence cannot tap , launch. (first problem) my approach : thought of creating separate android app 1 or 2 buttons , invoking test app onclicklistner event. again, new app unable find test class. this code : private onclicklistener launchlistener = new onclicklistener() { public void onclick(view v) { intent intent = new intent(intent.action_main); intent.setcomponent(new componentname("com.org.search.test","com.org.search.test.mytestclassname")); startactivity(intent); } }; and below exception log: 03-10 17:05:44.185: e/androidruntime(22195): fatal exception: main a

jquery - Full year calendar view -

Image
i'm looking jquery calendar can manage events , view availability dates. use fullcalendar , in year view. i have tried jquery ui datepicker can't figure out how implement on event. $(function() { $( "#datepicker" ).datepicker({ numberofmonths: 12, showbuttonpanel: true }); }); this image describes functionality need: can suggest nice full year calendar can manage events , view availability dates? thanks in advance

html - SVG and parent height of svg different -

i have svg element ( height: 50px; ) inside of div (style not specified) in page. but, height value parent div 5px different svg. <div id="parentele"> <svg id="svgele" style="height:50px"></svg> </div> i got $('#parentele').height() is 55 , $('#svgele').height() is 50 . if use div element instead of svg height same. may know reason 5px difference svg case? thanks, viji svg elements inline elements, meant render text, space reserved underneath element (below baseline) letters descender. you can work around in several ways: change block level element : svg { display: block; } float element : svg { float: left; } eliminate line height of container : #parentele { line-height: 0; } compare reference demo .

components - Joomla JToolBarHelp -

i develoment joomla component , try add jtoolbarhelp jtoolbarhelper::addnew('anadir'); jtoolbarhelper::editlist('ver'); jtoolbarhelper::deletelist('vergrupos'); i have 'anadir' , 'ver' , 'vergrupos' functions in controller function ver() { $this->showview('ver'); } function anadir() { $this->showview('anadir'); } function vergrupos() { $this->showview('vergrupos'); } but when click button page donts redirect anyway have idea ? thanks need add name of controller name before function want call jtoolbarhelper::addnew('controller.anadir'); jtoolbarhelper::editlist('controller.ver'); jtoolbarhelper::deletelist('controller.vergrupos'); remove controller name of controller in case