Posts

Showing posts from September, 2010

asp.net - Circular file references are not allowed Dnn 7+ in TFS 2013 -

Image
i using dnn 7.3 website project combination of vb , c# codes. use visual studio 2013 build project. if msbuid option in property page configured allow precompiled site updatable , project published. there successful built. when checked in tfs, following exception thrown: /compiled/desktopmodules/admin/security/manageusers.ascx (8): circular file references not allowed. /compiled/desktopmodules/admin/security/manageusers.ascx (67): unknown server tag 'dnn:profile'. /compiled/desktopmodules/admin/security/edituser.ascx (5): circular file references not allowed. /compiled/desktopmodules/admin/security/edituser.ascx (163): unknown server tag 'dnn:profile'. /compiled/admin/users/viewprofile.ascx (4): unknown server tag 'dnn:profile'. also, when checked use fixed naming , single page assemblies allow precompiled site updatable. throw: aspnetcompiler: object reference not set instance of object. when searched online, given 2 options this blog . i h

ios - Received an error when trying to check for storyboard in AppDelegate -

when trying test bounds correspond storyboards, received error "linker command failed exit code 1 (use -v see invocation)". looked few ways fix it, product>clean , running test program, neither worked. happened after implemented test used below. there other way fix this? - (bool)application:(uiapplication *)application didfinishlaunchingwithoptions:(nsdictionary *)launchoptions { if(ui_user_interface_idiom() == uiuserinterfaceidiomphone){ uistoryboard *storyboard; cgsize result = [[uiscreen mainscreen] bounds].size; cgfloat scale = [uiscreen mainscreen].scale; result = cgsizemake(result.width * scale, result.height * scale); if(result.width == 960){ storyboard = [uistoryboard storyboardwithname:@"iphone4.xib" bundle:nil]; uiviewcontroller *initviewcontroller = [storyboard instantiateinitialviewcontroller]; [self.window setrootviewcontroller:initviewcontroller]; } } return yes; edit: commented part out , st

Using static variables inside Cascading -

when start mapreduce job save current timestamp date object in static variable of main class. later when want read value different class (such custom cascading filter or cascading function class) job crashes java.lang.nullpointerexception according driven. is not possible access static variable within cascading logic? have no idea why doesn't work. date variable not null print console when job launched , afterwards not touched logic. this class throws error. if create new date (with current time) within operate() method works fine. public class timestampappender extends baseoperation implements function { public timestampappender(fields fielddeclaration) { super(fields.args); } public void operate(flowprocess flowprocess, functioncall functioncall) { tupleentry argument = functioncall.getarguments(); date timestamp = main.timeframemiddle; string arg0 = argument.getstring(0); string arg1 = argument.getstring(1); tuple result = new tuple(

python - aiohttp lambda in loop.start_server() method -

i'm trying understand primer below: if __name__ == '__main__': loop = asyncio.get_event_loop() f = loop.create_server( lambda: httprequesthandler(debug=true, keep_alive=75), '0.0.0.0', '8080') srv = loop.run_until_complete(f) print('serving on', srv.sockets[0].getsockname()) try: loop.run_forever() except keyboardinterrupt: pass why there lambda nottation in asyncio.create_server method? asyncio docs, method accept class/function entry point. if attemt initiate class , pass initialized instance loop, im totally lost, because have strange behavion, init method of httprequesthandler invokes every request: class httprequesthandler(aiohttp.server.serverhttpprotocol): def __init__(self): print(id(self)) what understood: classes httpserverprotocol parent callback, initialized every single request. save states between request, or process agregate logic need new object: def process():

How can extract locations values from a dropdown menu that use geonames webservice for build a updated google map -

i have dropdown menu show list of country/state/city in hierarchy using geonames webservice when select location in dropdown menu should automatically update googlemap in div under menu , zoom location. how can extract locations dropdown menu build google map locations based ? menu code following: <script type="text/javascript" src="http://vikku.info/programming/js/geodata-jsr-class.js"></script> <script type="text/javascript"> var whos=null; function getplaces(gid,src) { whos = src // var request = "http://ws.geonames.org/childrenjson?geonameid="+gid+"&callback=getlocation&style=long"; var request = "http://www.geonames.org/childrenjson?geonameid="+gid+"&callback=listplaces&style=long"; aobj = new jsonscriptrequest(request); aobj.buildscripttag(); aobj.addscripttag(); } function listplaces(jdata) { counts = jdata.geonames.length<jdata.

Joining view and tables in sql server -

i have following tables. customer customer_id, customer_name customer_details customer_id,phone_no,address order_details order_id,customer_id,order_type i have created view following create view orders_analysis select c.customer_id,cd.phone_no,od.order_id customer c inner join order_details od on c. customer_id=od. customer_id inner join c. customer_id=cd. customer_id cd. customer_id=c.customer_id now using above view , pre mentioned tables have extract records in view of particular order_type. can guys suggest me method. first of all, have mistake in view, correct view after fix mistakes create view orders_analysis select c.customer_id,cd.phone_no,od.order_id customer c inner join order_details od on c.customer_id = od.customer_id inner join customer_details cd on c.customer_id = cd.customer_id now want extract records in view of particular order_type. solution one:- because d

php - How do search engines index MVC pages? -

manually can make php pages in directory. e.g. index.php about.php contact.php but php frameworks laravel pages not exist in file, in database , called when user visits page. e.g. if person visits http://mywebsite.com/contact , framework in database page named 'contact' output user. but how google (or other search engines) find pages if exist in database? google can index these fine "server-side" generated. files not need exist google able index them, exist @ server-side level. where google has issues indexing if site "client-side" based , uses ajax pull content browser. search engine spider can't execute javascript never find content. however, google has defined guidelines people content indexed in web masters guide .

php - How to read facebook timeline with Graph API? -

i need read facebookk timeline , tutorial says me read api graph , use: https://graph.facebook.com/***/posts?access_token=*** but when use code obtain {data[]} . don' know how wrong. can me? you question pretty broad. did use facebook api explorer? found here are sure token valid? i pretty sure doing wrong call above un-versioned default v2.0+. means can't query based on user name. next if using user id in middle *** return empty because user hasn't authorized app got token, and/or has decided hide open graph calls. can use public page id in spot page posts. give try https://graph.facebook.com/me/posts?access_token=*** provided have valid token should work unversioned calls. suggest play api explorer linked above.

android - Phonegap compass plugin not working -

i trying compass function working on app no success. judging errors inclined think plugin not being added or device not ready. far can tell have done both things. using phonegap build, code use include is: <gap:plugin name="org.apache.cordova.device-orientation" version="0.3.9" /> which far know required. when click on plugins tab in phonegap build page app shows being there. watchdirection = null; //phonegap ready var whendeviceready = function(){ console.log("deviceready"); console.log(navigator.compass); var findmydirection = function(){ console.log("find heading fired"); watchdirection = navigator.compass.watchheading( //onsuccess function(heading){ console.log(heading); var magnetdirection = heading.magneticheading; $("#movingcompass").css("transform", "rotate(" + magnetdire

Delphi XE8 - Send Notification from Parse using VCL app -

i learning new baas technology xe8. i created small app receive notification on android mobiles using parse. working fine when notification message sent parse web site. however when vcl app send notification backendpush component, nothing coming in mobile phone. the messages sending correctly because can see them on parse site. status different 1 sent parse . here vcl messages status on parse: type: api, target: chanels. when sent on parse site: type : campaign, target: everyone. what should vcl messages arrive on mobile phone. my code: backendpush1.message:=memo1.lines.text; backendpush1.push; you should try more specific on target device follows: backendpush1.target.add('{ "where": { "installationid": "'+guid.text+'" }}'); or backendpush1.target.add('{ "where": { "devicetype": "android" }}'); regards!

javascript - jshint and variable names out of my control -

i'm handling oauth response twitter in angular page reads parameter this: var oauthtoken = $location.search().oauth_token; jshint complain because line 13 col 0 identifier 'oauth_token' not in camel case. alternatively can write var oauthtoken = $location.search()['oauth_token']; but jshint complain line 13 col 40 ['oauth_token'] better written in dot notation. is there recommended way handle these without using //jshint ignore:line comment? var oauth_token = 'oauth_token'; var oauthtoken = $location.search()[oauth_token]; ofc choose more appropriate name variables

Elixir/Plug/Phoenix: Calling halt doesn't stop downstream plugs from getting invoked during test -

if start instance of phoenix app , hit requests, plugs halt appropriately. however, doing same in test environment halt doesn't stop plugs downstream being invoked causes tests fail. think issue might come way i'm invoking router during test. here's helper function i'm using heavily borrowed similar function in phoenix framework itself: def call(router, verb, path, params \\ nil, headers \\ []) add_headers(conn(verb, path, params), headers) |> plug.conn.fetch_params |> plug.parsers.call(parsers: [plug.parsers.json], pass: ["*/*"], json_decoder: poison) |> router.call(router.init([])) end any ideas why calling router causes halting stop working? edit: i'm upgrading phoenix 0.13.1 in order use new endpoint testing module instead of helper rolled. i'll report whether fixes issue or not. halt works inside plug pipeline. if manually piping need manually check halt. hone

swift - Using if let syntax in switch statement -

in swift if let syntax allows me execute statements if variable of type. example class {...} class b: {...} class c: {...} func foo(thing: a) { if let b = thing as? b { // }else if let c = thing as? c { // else } } is possible achieve switch statement? i have got far, variables b , c still of type a, not cast b , c: func foo(thing: a) { switch thing { case let b b b: // case let c c c: // else default: // else: } } if want know whether it's b or c, can case b , case c . if want capture , cast down, case let b b , case let c c .

angularjs - Delete first occurence of javascript map -

i using javascript , angularjs right now. have map keys , values variable. there no incrementing index, key idea of object , value attribute of same object. it possible @ point have 2 times same entry in map like: map[1] = 3 map[1] = 3 now, want delete 1 occurrence of those. possible ? know delete map[1] deleting every occurrence , want delete 1 :s

ms office - Macro to iterate through a field filter one at a time using VBA Microsoft project 2010 -

basically title suggest, i'm trying iterate through custom field, named "text3" associated "task owner", drop down filter 1 resource @ time. new @ please bear me. here code: sub macro1() ' macro macro1 ' macro recorded fri 5/29/15 valencia, jonathan. ' suppose go down task owner filtered list each resource , ' print xps dim res resource, name string 'apply gantt view first viewapply name:="gantt chart" 'expand tasks outlineshowalltasks 'apply late task filter filterapply name:="late tasks" each res in activeproject.resources name = res.name 'apply filter task owner resource 'checks see if filter set on application first if not activeproject.autofilter application.autofilter end if application.setautofilter fieldname:="text3", _ filtertype:=pjautofiltercustom, _ test1:="contains", c

gmail - How can I decode the content of the email? -

i have received email: dear xxx, thank you. have ordered ultimate treat taste buds. yummy, lip smacking delight being prepared utmost love , attention @ own neighbouring pizza hut – bengaluru - airport road.... but when "show original" shows as: mime-version: 1.0 sender: noreply@pizzahut.co.in from: noreply@pizzahut.co.in to: xxx@gmail.com reply-to: noreply@pizzahut.co.in date: 19 sep 2014 19:44:26 +0530 subject: phd: order confirmation content-type: text/html; charset=utf-8 content-transfer-encoding: base64 x-antiabuse: header added track abuse, please include abuse report x-antiabuse: primary hostname - server.pizzahut.co.in x-antiabuse: original domain - gmail.com x-antiabuse: originator/caller uid/gid - [47 12] / [47 12] x-antiabuse: sender address domain - pizzahut.co.in x-get-message-sender-via: server.pizzahut.co.in: authenticated_id: noreply@pizzahut.co.in pcfet0nuwvbfigh0bwwgufvcteldicitly9xm0mvl0rurcbysfrntcaxljagvhjhbnnp dglvbmfsly9ftiigimh0dha6ly93d3c

scala - Why this error : type mismatch; found : Unit required: String => Unit -

below code : object gen { println("welcome scala worksheet") case class cs(funtorun: string => unit) val l: list[cs] = list( cs(open("filepath")) ) def open(path: string): unit = { java.awt.desktop.getdesktop.open(new java.io.file(path)) } } causes compiler error : type mismatch; found : unit required: string => unit but open function of of type string => unit , param type of funtorun string => unit ? cs accepts function string unit , you're passing result of open , unit . if want pass open function instead, need do: cs(open) although without knowing you're trying achieve, it's impossibile provide sensible solution. a possible alternative performing open action @ later time case class cs(funtorun: () => unit) // function not taking parameters longer val cs = cs(() => open("filepath")) // 'open' not performed here cs.funtorun() // 'open' performed h

windows - Setting Static IP Address VB.net -

i writing script setting static ip computers. reads file has mac addr - ip addr pair. based on computers mac address gets ip address file. have problem setting up. have never done kind of .net programming. wrote bashscript linux side works, windows don't have experience. wrote program in vb.net. until program can data file, have set static ip based on mac address , hostname. there several different posts 1 , 2 , in c# ,and have problem converting them vb.net. great if provide pointer on how set static ip address specific nic on local computer. imports system imports system.text.regularexpressions imports system.net.networkinformation imports system.io imports system.management module module1 const failure = 1 const success = 0 dim phyaddr string = getmac() sub main() dim arguments(3) string dim filename string = "" if environment.getcommandlineargs.count = 3 arguments = environment.getcommandlineargs filename = arguments(2)

amazon web services - EC2ResponseError: 401 Unauthorized using Saltstack boto_vpc module -

i'm trying create vpc using saltstack , boto_vpc module. state: vpc_create: module.run: - name: boto_vpc.create - cidr_block: '10.0.0.0/24' - vpc_name: 'myvpc' - region: 'us-east-1' - key: 'adjjdnejfjgnfkfkfkiw' - keyid: 'sjdjnfnejuwlllclclennrbflgslslkemfuhe' the keys i'm using correct got error : [info ] running state [boto_vpc.create] @ time 14:25:35.839797 [info ] executing state module.run boto_vpc.create [error ] ec2responseerror: 401 unauthorized <?xml version="1.0" encoding="utf-8"?> <response><errors><error><code>authfailure</code><message>aws not able validate provided access credentials</message></error></errors><requestid>7cb74939-afda-4722-a31e-2855c5cbe16b</requestid></response> [error ] {'ret': false} [info ] completed state [boto_vpc.create]

python - How to get dictionary to save newly added item for the next run? -

i'm learning python , i've made password locker that's supposed copy password clipboard. if doesn't find account looking for, it'll ask if want add password account, , update dictionary new items. my problem dictionary updates every run, loses new items when run again. every run doesn't carry on next. here's code: #! python2 # password locker program in python # dict store account: password passwords = {"email": "password", "blog": "password", "luggage": "password", "house": "password"} import sys, pyperclip # handles command line arguments if len(sys.argv) < 2: # sys.argv takes 2 arguments, first filename, second first command line arg. # if argument entered less 2, print below print "usage: python pw.py [acount] - copy account password" sys.exit() # done sys.argv account = sys.argv[1] # first command l

form for - rails form_for create new entry instead of updating -

i using form_for in order create new entry. in controller set: def create_ab_campaign @campaign = campaign.find_by(id: params[:id], account_id: current_account.id) @campaign_id = params[:id] end in view do: <%= form_for (@campaign), :url => {:controller => "campaigns", :action => "create_new_ab_campaign"} |f| %> <div class="form-group"> <%= f.label :name, "name", class: "control-label" %> <%= f.text_field :name, class: "form-control", placeholder: "name" %> </div> <%= f.submit "save settings" %> on submit want to create new entry instead of updating existing one. i did following in controller: def create_ab_campaign_new @campaign_new = campaign.new(create_a_new_ab_campaign) if @campaign_new.save redirect_to(:controller =>"campaigns", :action =>"index") else redirect_to(:action =>"new")

android - inflateexeption : binary xml file line 31 (use patternview in overlyview) -

sorry bad english . want use pattern view in overly view . public class patternoverlayview extends overlayview implements patternview.onpatternlistener{ private cameragesturesensor mgesturesensor; private boolean mopencvinitiated = false; private final static string format_12_hours = "hh:mm"; private final static string format_24_hours = "kk:mm"; private string mtimeformat; private string mdateformat; private calendar mcalendar; private string mam, mpm; private string mdayformat; private string moformat; numberpicker np,np1,np2 ; static textview tim; static textview month; static textview dayt; static textview salt; static textview roozt; static textview chargelevel; static textview am; private static final string tag = "practicegesturesactivity"; //private direction mcurrentdirection; sharedpreferences getload ; activity acti ; relativelayout ivloader ; animationdrawable frameanimation; private gesturedetector mgesture; relativelayout topvi ;

Is mongoose capable of having pluggable backends other than MongoDB, like plain, old JSON files on the filesystem as a datastore? -

we have tool used on server (in cloud, behind firewall, etc). uses mongoose mongodb. we need use our tool standalone app on laptop , want reuse code uses mongoose. considering possibility of not requiring our customers install mongodb on each laptop. tool on laptop run service, headless, , process touching data that's stored via mongoose. does mongoose offer support pluggable backends? there embeddable mongoose backend can use? storage via plain, old json text files fine, unless there's better out there. thanks, matthew

Share reCAPTCHA settings page with other team members -

Image
i've added recaptcha client's website. easy enough. works enough too. but settings etc. here... https://www.google.com/recaptcha/admin#site/ ?setup ... available google account. does know how share access other members of team here? obviously i've asked on google group it, got no response far. giving developer access recaptcha settings page easy adding them owners in key settings dialog of admin panel: after doing so, able access , change settings via https://www.google.com/recaptcha/admin , are.

Scala syntax which I don't understand -

i started scala course on coursera, can't 1 thing here: trait generator[+t] { self => // able use self instead of def generate: t def map[s](f: t => s): generator[s] = new generator[s] { def generate = f(self.generate) } } why using map[s] not map in function definition? the [s] after map type parameter , makes so-called polymorphic method . in example above, if wrote same def map , without [s] , compiler wouldn't able tell s when encountering in remaining method definition. [s] makes identifier s known compiler , puts in position report typos errors. for example, assume new method in accidentally wrote f: t => floot rather f: t => float . want compiler complain floot unknown identifier. wouldn't want silently assume floot sort of type parameter.

Groovy: println vs System.out.println with GroovyInterceptable -

why need use system.out.println instead of println when use groovyinterceptable ? for example if coding in groovy file can print console typing: println "printing console" but if want print here: class test implements groovyinterceptable { def sum(integer x, integer y) { x + y } def invokemethod(string name, args) { system.out.println "invoke method $name args: $args" } } def test = new test() test?.sum(2,3) i have use system.out.println in method, or else stackoverflowerror . why? update: @dan getz answer below know why happens groovyinterceptable class now. know if there other class implementations in groovy issue arise? this because class test implements groovyinterceptable interface, according docs, is used notify methods should intercepted through invokemethod mechanism of groovyobject . this isn't methods have been defined on class. try: test?.total(2,3) you'll see returns invoke me

Wicket: Submit button to download binary file -

i know how create plain link download arbitrary binary data (using resourcelink resourcestreamresource , abstractresourcestream ), want create form submit button should either redirect form again (e.g. correct input error) or download arbitrary binary data file without going different page. how can achieved? for binary part, try this: final resourcestreamrequesthandler target = new resourcestreamrequesthandler(new abstractresourcestream() { @override public string getcontenttype() { return "application/octet-stream"; } @override public inputstream getinputstream() throws resourcestreamnotfoundexception { return new bytearrayinputstream(yourbinarycontent); } @override public void close() throws ioexception { } }); target.setfilename("response.dat"); target.setcontentdisposition(contentdisposition.attachment); getrequestcycle().schedulerequesthandleraftercurrent(target); otherwise, handle 't

javascript - how to i change mouse pointer to hand signal and change the color of row while mouse go over a row in table -

<logic:iterate name="studentdetails" id="student" indexid="index"> <tr> <td><bean:write name="student" property="name" /></td> <td><bean:write name="student" property="age" /></td> <td><bean:write name="student" property="class" /></td> <td><bean:write name="student" property="mark" /></td> <td><bean:write name="student" property="result" /></td> </tr> </logic:iterate> i want display student details, , want highlight passed student details in diffrent color/set mouse pointer hand signal while mouse go on rows in result table. how can checked student details passed or not , how set highlighting color in table iterator? add onmouseover or onmouseout in <tr onmouseover="chang

c++ - Transferring argv into a new array -

i can't figure out why code not working. have seen this still didn't it. segmentation fault (11) , not see argv array printed testarray . my code far #include <iostream> int main(int argc, char**argv) { char testarray[argc]; (int i=0; argc; i++){ std::cout << argv[i] << std::endl; testarray[i] = *argv[i]; } (int i=0; argc; i++){ std::cout << testarray[i] << std::endl; } return 0; } in code, change (int i=0; argc; i++){ to (int i=0; < argc; i++){ otherwise, there apparently no conditional check for loop ( argc >= 1 , unchanged, usually), transforming infinite loop. fwiw, unbound increment of i causes testarray[i] access out-of-bound memory causes undefined behaviour . that said, there more bothered. there nothing called c , c++ code. different , should tread way. please not mix them up. each of them have own advantages/disadvantages, use whichev

javascript - Angular UI mask remove placeholder -

i using angular ui mask directive credit card field , adding underscores placeholder. there way not show placeholder? you can find example in demo . just write want placeholder attribute. <input name="masked" ui-mask="{{y}}" ng-model="x" placeholder="write mask or click button" class="input-large" style="vertical-align: top;">

tfs - Using Teamcity to deploy css into git repository -

i have git repository set our angular project. styling website being worked on separate front end team checking in work tfvc repository in tfs. using teamcity ci. i able deploy latest style sheets tfvc repository on checkin project on git date when pull. can teamcity or there way in git? you can use tfs-git or git-tf push , forth between tfvc repository , git. as executable should able in team city or anywhere.

Any way to hook onto every Ion request on a global level? -

i'm using ion async http library android , i'd custom logging. ideal hook onto every reqest start , end in order total request time , other meta data http response code , url. know of way this? i'm experimenting setasynchttprequestfactory , seems allow hook onto request begin, not end. ion.config ionconf = ion.getdefault(appcontext).configure(); final asynchttprequestfactory reqfac = ionconf.getasynchttprequestfactory(); ionconf.setasynchttprequestfactory((uri, method, headers) -> { // custom logging stuff here asynchttprequest req = reqfac.createasynchttprequest(uri, method, headers); return req; }); implement , add asynchttpclientmiddleware (inherit simplemiddleware) , inject asynchttpclient's pipeline. override onrequest , onresponsecompleted events start , end of request. or, if enable ion logging globally, can see request time, , sorts of metadata in adb logcat.

android - Apply multiple effect on bitmap without saving it -

my requirement load multiple effect on bitmap. following apply-effects-on-image-using-effects it. got success applying effect requirements give brightness effect separately. means user can able give brightness effect after applying other effect without saving file. i know after saving file , render file again makes possible. need without saving image file. right now, if apply brightness on applied effect applied effect gone , brightness shows effect. because of below code: meffect = effectfactory.createeffect(effectfactory.effect_brightness); here, meffect initialize give new effect on texture. without not able load effect. so, question is, how load multiple effect on same texture without saving it. create 3 textures, instead of 2: private int[] mtextures = new int[3]; private void loadtextures() { // generate textures gles20.glgentextures(3, mtextures, 0); ... after that, can apply sequentially 2 effects 1 after another, that: private void a

python - downsampling data using timestamp information -

i have array of arbitrary data x , associated timestamps t correspond data in x (they same length n ). i want downsample data x smaller length m < n , such new data equally spaced in time (by using timestamp information). instead of decimating data taking every nth datapoint. using closest time-neighbor fine. scipy has resampling code, tries interpolate between data points, cannot data. numpy or scipy have code this? for example, suppose want downsample letters of alphabet according logarithmic time: import string import numpy np x = string.lowercase[::] t = np.logspace(1, 10, num=26) y = downsample(x, t, 8) i'd suggest using pandas , resample function: convenience method frequency conversion , resampling of regular time-series data. note how parameter in particular. you can convert numpy array dataframe: import pandas pd yourpandasdf = pd.dataframe(yournumpyarray)

tomcat - MySQL number of connections not increasing -

i have set mysql max_connections variable 1024. i'm using connection pool connect database. <resource type="javax.sql.datasource" name="jdbc/testdb" factory="org.apache.tomcat.jdbc.pool.datasourcefactory" driverclassname="com.mysql.jdbc.driver" url="jdbc:mysql://192.168.2.110:3306/testdb?zerodatetimebehavior=converttonull&amp;autoreconnect=true" username="test" password="test" initialsize="10" maxactive="1000" maxwait="60000" maxidle="50" removeabandonedtimeout="300" removeabandoned="true" minidle="10

jsf 2 - How to call the same method after every include of a .xhtml page in JSF? -

i have following part of .xhtml page: <ui:composition template="./templates/template.xhtml"> <ui:define name="maincontent"> <ui:include src="include/includeableeditor.xhtml"> <ui:param name="includeparam" value="myclass" /> </ui:include> <ui:include src="include/includeableeditor.xhtml"> <ui:param name="includeparam" value="yourclass" /> </ui:include> </ui:define> in "includeableeditor.xhtml" want call method after included (in case should happend 2 times). now tried solve this: (metadata tag part of includeableeditor.xhtml) <f:metadata> <f:event type="prerenderview" listener="#{editor.onload}" /> <f:attribute name="textfieldid" value="#{includeparam}" /> </f:metadata> the problem: the method being called once. should

Launch new activity after successful Facebook login, Facebook Api v.4.0 | Android -

i'm android noob , want use facebook api login app. have managed setup facebook login using loginbutton class on fragment facebook documentation. can login using facebook, each time succesfully login logout button need able redirect activity after successful login or when logged in. how can track login status , redirect since in api 4.0 session doesn't work? make sure activity or fragment implements facebookcallback (my exampel here uses fragment, easy adapt.) make sure have following member variables: callbackmanager mfacebookcallbackmanager; loginbutton mfbloginbutton; then setup variables in oncreate: mfacebookcallbackmanager = callbackmanager.factory.create(); mfbloginbutton = (loginbutton) getview().findviewbyid(r.id.facebook_login_button); mfbloginbutton.setfragment(this); mfbloginbutton.registercallback(mfacebookcallbackmanager, this); ensure add enable callback: @override public void onactivityresult(int requestcode, int resultcod

windows - Why don't the number of files deleted per second change? -

i deleting 200gb 1 of partition. getting deleted 33xx files per second. in middle of operation gave delete operation partition , had speed of 18xx files per second. didn't affect speed of first operation. why so? since hard disk same , has share delete between these 2 process. i have xeon processor windows 7. probably, progress indicator looked @ takes while notice change in rate. maybe progress calculated average total duration , total number of files deleted far. some disks have hardware parallelism (mainly ssds). can provide more throughput if run multiple ios in parallel.

html - Embedding video with object tag for self hosted content and player -

i new video player world. want develop mobile browser based video player. know html5 , flash fall different requirement . the requirement is, using object tag should embed video plays in mobile devices(browser). code highly useful . mandatory use object tag . if swf or compatible mobile browsers.. thanks in advance . using <object> -tag bad way. why mandatory use? why not go <video> -tag instead? also, <object> deprecated of january 27, 2015. if file want embed playable phones (such .mp4 file), can use <video> -tag instead. <video width="500" controls> <source src="video.mp4" type="video/mp4"> browser not support html5 video. </video> if you're embedding .swf file, cannot play on devices no flash support. unable play .swf files natively in chrome on android phone, , don't think ios devices. if really, really want use <object> -tag well, can wrap inside <video>

linux - Does sonarqube 5.1 support ARM? -

i'm trying install sonarqube in synology diskstation ds112j arm processor. in sonarqube-5.1/bin folder there's batch files linux-x86-32/64 bits can't start sonarqube due error /var/services/sonarqube-5.1/bin/linux-x86-32/./wrapper: line 1: syntax error: unexpected "(" failed start sonarqube. is there sonar.sh arm or workaround install sonarqube in arm diskstation? sonarqube not officialy support arm processors, that's why there's no sonar.sh script arm. what's more, know guys tried make work, failed. thread 1 thread 2 still, can try again , write simple script start sq: #! /bin/sh java -jar lib/sonar-application-5.1.jar just put script in sq intallation root directory, run it, et voilà! (if sonarqube starts has other errors, please open question)

Are C# Collections value types or reference Types? -

i busy learning c# here, c# collections value types or reference types?, since arrays reference types , know strings reference types well. thank you. you create value type collection (so struct mycollection<t> : ienumerable<t> ), useless (because make read-only, , simple, or try make mutable, difficult make "value-type" copiable, copy of collection distinct entity original) (and note still useless, because if use value type through 1 if interfaces, box it). in end, don't :-) all .net "stock" collections can remember reference types. arrays, list<> , arraylist , dictionary<,> , ...

CMake add_subdirectory in subdirectory not included -

i have directory tree this: libs support db csv patterns support_qt helpers dialogs etc. now when add_subdirectory in support level, can add db , patterns , files collected. in db added add_subdirectory referencing csv , somehow ignored. in support set(support_source ${cmake_current_source_dir}/support_defs.h ${cmake_current_source_dir}/support_dll_api.h ${cmake_current_source_dir}/supportlib_namespace.h ${cmake_current_source_dir}/dll_main.cpp ) add_subdirectory (db) add_subdirectory (patterns) in db set(support_source ${support_source} ${cmake_current_source_dir}/column_types.h ${cmake_current_source_dir}/dbcolumn.h ${cmake_current_source_dir}/database_login.h ${cmake_current_source_dir}/database_login.cpp ${cmake_current_source_dir}/type_helper.h ${cmake_current_source_dir}/type_helper.cpp parent_scope ) add_subdirectory(csv) the above works fine in csv set(support

mysql - Error in SQL syntax MySQLSyntaxErrorException in Grails -

i request mysql database, searches data in table criteria: def tableacounting(){ def user = person.findbyusername(springsecurityservice.currentuser.username) def cafee = user.cafee def tablesquery = tableplacesinfo.createcriteria() def tables = tablesquery.list { //an error show on string 'in'("hall", hallszones.findallbycafee(cafee)) } def halls = cafee.halls but such error: class:com.mysql.jdbc.exceptions.jdbc4.mysqlsyntaxerrorexception message:you have error in sql syntax; check manual corresponds mysql server version right syntax use near ')' @ line 1 this happends if in search using empty set. means, need check size of hallszones.findallbycafee(cafee) because set empty.

Sphinx 2.3.1-beta where is search binary? -

having built sphinx source, cannot find cli search tool 'search'. everything else in place! ie, config set up, searchd runs aok... cli search tool removed sphinx in version 2.2.2. for testing purposes can use mysql client , sphinxql.

python - pymongo sorting by date -

i want newest posts first, , try following: db.posts.find({"date": {"$lt": tomorrow, "$gte": today}}).sort({'date':pymongo.descending}) (without sort , oldest posts first fine) i getting error typeerror: if no direction specified, key_or_list must instance of list what going on here? not possible sort date? this not correct format of parameters sort function. correct syntax this: db.posts.find(...).sort('date',pymongo.descending) here link relevant documentation sort function: http://api.mongodb.org/python/current/api/pymongo/cursor.html#pymongo.cursor.cursor.sort to sort multiple parameters can use following syntax: db.posts.find(...).sort([ ('date', pymongo.ascending), ('other_field', pymongo.descending) ]):

css - Perspective bug -

Image
i'm having following div structure <div class="a"> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> </div> div.a { -webkit-perspective: 1000px; perspective: 1000px; -ms-perspective: 1000px; } div.a div { float: left; width:33.33333333333333%; height: 30px; overflow: hidden background: transparent url(someimage) no-repeat; } all divs (div.a div) positioned js , having background image appears single image (a image broken in 6parts) the problem i'm having line between div childs. if remove perspective fine. the div structure , css class presented here simplifying code. i solve removing perspective after square has been animated use following structure square <div class="parent"> <div class="block"></div> </div> the perspective applied parent , removed after animation (

Nearby Bus Stops on Google Maps on Android -

is there anyway query google maps list of bus stops (bus stop id, bus stop name) nearby based user's current location? i able esri shape file http://www.mytransport.sg/ . however, have no idea how use integrate these files android. read can integrate data esri shape file google maps using fusiontable. i've done have no idea how integrate fusiontable android application. not sure how these bus stops based on user's current location in fusiontable maps. am going on right track? there other options me these bus stops information? try this: use below google api find out near bus stop locations here have send current latitude , longitude values able near bus stop location details. https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=13.0611704,80.28284059999999&radius=3&types=bus_station&sensor=true&key=aizasydvem91dvzcxp3wwylczn-vwlsgjvmmm8g and return this { "html_attributions" : [], "results"