Posts

Showing posts from January, 2013

reporting services - When executing report part in Report Builder, The path of the item "~" is not valid. The full path must be less than 260 characters long -

all, recently ran issue while working on report parts client. have utility creates report parts in batches based on information provide it. includes paths datasets , data sources. after creating report parts , corresponding data sources (all tablixes based on views) tried run them in report builder 3.0. got error: the path of item '{path report part here}' not valid. full path must less 260 characters long at first assumed path length issue, since long path. around 160 characters. not close. when expand error message, essential, this: ...; other restrictions apply. if report server in native mode, path must start slash. this ended being issue. person ran utility incorrectly eliminated leading forward slash in path data sets , data sources. along these lines on msdn, wanted have here well. my suggestion open xml files in notepad ++ , replace paths across files have. you'll have both report parts , data sources far know.

c++ - HorizontalHeader with QCheckBox in cell 0 -

Image
how add horizontalheader checkbox in first index (cell 0) qtablewidget in qt? below instructions did not work. headeritem->setflags(headeritem->flags() ^ qt::itemiseditable); headeritem->data(qt::checkstaterole); headeritem->setcheckstate(qt::checked); qtablewidget->sethorizontalheaderitem(0,headeritem); please share thoughts you can set flag, see documentation : headeritem->setflags(headeritem->flags() ^ qt::itemiseditable | qt::itemisusercheckable); that first thought. after several tries , research in documentation , several fora quite sure, items in qheaderview don't support checkboxes. but can set different icons headeritem in dependance of (pseudo-)checkstate , save checkstate if necassary in headeritem.data(userrole) . did in following steps (i know python, think, can translate c++): set icon: headeritem.seticon(qtgui.qicon('unchecked.png')) headeritem.setdata(256,'unchecked') headeritem.setflags(qtcore.qt.itemi

php - Call method recursively through class hierarchy -

i want call recursively parent methods : <?php class generation1 { public function whoami() { echo get_class($this).php_eol; } public function awesome() { // stop recursion $this->whoami(); } } class generation2 extends generation1 { public function awesome() { $this->whoami(); parent::awesome(); } } class generation3 extends generation2 {} class generation4 extends generation3 {} $gen = new generation4(); $gen->awesome(); the output : generation4 generation4 i have : generation4 generation3 generation2 generation1 the __class__ magic constant not interpreted being whatever concrete class instance is , instead evaluates class name constant contained in. if want concrete class name (rather base class name), try using get_class() instead. <?php class { public function test1() { echo __class__ . "\n"; } public function

asp.net web api - Practical examples of OWIN middleware usage -

Image
i consider self rank beginner owin , after reading lot of documentation have gotten more confused conflicting notions before began. know these multiple questions, feel answering these clear fundamental doubts regarding owin , how best use it. here questions: what can use owin middleware couldn't using message handlers or http modules? or both same thing except latter 2 tightly coupled iis? a lot of documentation says owin allows decoupling between web server , web application ie. removing dependency on iis hosting web api applications. have yet see example of web application or web api used owin , ported being hosted on iis , other web server. iis , self hosting way go decoupling between web server , web app? when searched owin middleware examples, got katana , helios 2 implementations of owin spec. katana done , wont go beyond revision3 , helios not yet supported microsoft per articles. future of owin in case? the detailed practical usage have seen far of using owin auth

ruby on rails - Mapping the index of values in an array that match a specific value? -

disclaimer, i'm beginner. i have array 16 digits, limited 0's , 1's. i'm trying create new array contains index values 1's in original array. i have: one_pos = [] image_flat.each |x| if x == 1 p = image_flat.index(x) one_pos << p image_flat.at(p).replace(0) end end the image_flat array [0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] with code above, one_pos returns [3, 3] rather [3, 5] i'd expect. where going wrong? try using each_with_index ( http://apidock.com/ruby/enumerable/each_with_index ) on array. image_flat = [0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] one_pos = [] image_flat.each_with_index |value, index| if value == 1 one_pos << index end end

ios - How to add specific view to uitableviewcell? -

i have personcell xib , .h , .m files , person's characteristics. so, depending on personcell.state , want show different number , kind of characteristics. i want use specific parameterview titlelabel , constantlabel , can add parameterviews for-in array . can't use constraints in code, coz of cell reuse . how that? see stupid way - add every characteristic view personcell , depending on state, show , hide them. there 50+ different characteristics. you try use tableview instead of array of views. example, personcell have tableview inside, each cell contains parameterview . from array have, implement uitableviewdatasource in personcell . think pretty simple solution when personcell depends on state. let me know if have questions or need more specific information.

Soundcloud python OAuth error -

this should simple python app uses oauth authenticate soundclodu api. follows closely code official library: https://github.com/soundcloud/soundcloud-python when load app, sent soundcloud login page, re-directs me /user code query string. however, fails @ part attempt obtain access token,etc... this error get: file "/users/asselinpaul/dropbox/upenn/spring15/cis192/final_project/server.py", line 19, in user code = request.args.get('code')) typeerror: 'resource' object not iterable i'm pretty sure means client.exchange_token returning 401 error (this happens when try print client.exchange_token(code = request.args.get('code')). code: import soundcloud flask import flask, redirect, request app = flask(__name__) client = soundcloud.client( client_id="*****************************", client_secret="*****************************", redirect_uri=

What do the Clojure docs mean by "associative support"? -

i reading clojure documentation on datatypes . under list of differences between deftype , defrecord states defrecord has "associative support". i'm new clojure , wondering if clarify term me. "associative support" means object implements the associative interface . includes lookup key, , ability create new object additional key/value pair added. in general, means objects created defrecord can -- large part -- treated if standard clojure maps, whereas when using deftype , if want functionality need implement yourself.

html - jQuery Text box not showing -

i trying show text box when 1 click on click me button check here when user click on "click me" button want display area colored box. here code. html <h1>welcome quickschools</h1> <div id="section" style="display:none;">here new section</div> <div>lorem ipsum dummy text of printing , typesetting</div> <button type="button" id="btn">click me</button> css #section{ background-color:red; margin-left: 363px; width: 200px; height: 150px; margin-top: -61px} jquery $( "button" ).click(function() { $("#section").show();}); can 1 ? here jsfiddle: http://jsfiddle.net/nz7z9dtu/ please see jsfiddle - http://jsfiddle.net/nz7z9dtu/9/ in order achieve looking - prntscr.com/6tpi12 - should decrease width of 'content' class div on click displaying 'section' class. jquery should follows: $( "button" ).click(function() {

node.js - Updating nested array inside array mongodb -

i have following mongodb document structure: [ { "_id": "04", "name": "test service 4", "id": "04", "version": "0.0.1", "title": "testing", "description": "test", "protocol": "test", "operations": [ { "_id": "99", "oname": "test op 52222222222", "sid": "04", "name": "test op 52222222222", "oid": "99", "description": "testing", "returntype": "test", "parameters": [ { "oname": "param1", "name

How to group one to many data in one XML node - SQL Server -

there 1 many relation between tables, 1 inspector can have many documents , group them inspector id , show them in 1 xml <row> node. what have tried far here; sql: select d.inspectorid "@inspectorid", d.docid "qualification/docid", d.filesize "qualification/filesize", q.name "qualification/name", d.enddate "qualification/enddate", d.datecreated "qualification/datecreated" inspectordocs d left join documenttype dt on dt.documenttypeid = d.doctype left join qualificationtype q on q.qualificationtypeid = d.qualificationtypeid d.inspectorid = 6390 xml path xml output: <row inspectorid="6390"> <qualification> <docid>23107</docid> <filesize>248724</filesize> <name>aws cwi</name> <enddate>2016-12-01t00:00:00</enddate> <datecreated>2014-07-23

sql server - How to omit empty values from PredictTimeSeries DMX query -

i'm using predicttimeseries function within dmx query in order values predictions, follows: select flattened predicttimeseries([miningmodel_8].[values], 100) [miningmodel_8] it works well, problem @ point, result set returns empty values, so: expression.$time expression.values ------------------------------------- 30/04/2015 6 01/05/2015 4 02/05/2015 4 03/05/2015 3 04/05/2015 3 05/05/2015 <<-- here becomes empty 06/05/2015 07/05/2015 how can cut empty rest of result set (so last record in above example 04/05/2015 )? any advice or appreciated, thank you i believe can limit result set using clause. more details: https://msdn.microsoft.com/en-us/library/ms132048.aspx

node.js - How to abort query on demand using Neo4j drivers -

i making search engine application using node.js , neo4j allows users submit graph traversal query via web-based user interface. want give users option cancel query after has been submitted (i.e. if user decides change query parameters). thus, need way abort query using either command node.js-to-neo4j driver or via cypher query. after few hours of searching, haven't been able find way using of node.js-to-neo4j drivers. can't seem find cypher query allows killing of query. overlooking something, or not possible neo4j? using neo4j 2.0.4, willing upgrade newer version of neo4j if has query killing capabilities. starting neo4j version 2.2.0, it's possible kill queries ui , via rest interface. don't know if existing nodejs drivers support feature, if not can still achieve same functionality making http request rest interface. if run query in browser in version 2.2.x or later, notice there (x) close link @ top-right corner of area queries executed , displayed

angularjs and google maps - ng-click works in root but not in scope -

why in order getdirections called, has in $root ? ui-gmap below assigned controller via routes. here source: angular.module('app').controller('mainctrl', function ($scope) { //this works $scope.$root.getdirections = function () {alert('here')}; //this should work! $scope.getdirections = function () {alert('here')}; } html <ui-gmap-google-map center='mapinfo.map.center' zoom='mapinfo.map.zoom'> <ui-gmap-marker coords="mapinfo.marker.coords" options="mapinfo.marker.options" idkey="mapinfo.marker.id"> <ui-gmap-window ng-cloak closeclick="closeclick()"> <ui-gmaps-window> <a ng-click="getdirections()" class="location" href="#">doesnt work</a> <a ng-clic

php - Installation xdebud on sublime 3 error -

i'm trying install xdebug on sublime3. installed package control , added following code in php.info: xdebug.remote_enable=1 xdebug.remote_handler=dbgp xdebug.remote_host=127.0.0.1 xdebug.remote_port=9000 xdebug.remote_log="/var/log/xdebug/xdebug.log" but doesn't list in info.php. documentation says add zend_extension="/wherever/you/put/it/xdebug.so" but can't find location of .so in fedora i'm using, , guess it's because downloaded package control. can help? run php -i | grep extension_dir in terminal see extensions php installed.

amazon web services - Chef12 Management Console not showing up on Ubuntu 14.04 -

i have aws instance (ubuntu 14.04) have installed chef server 12 using following commands: sudo wget https://web-dl.packagecloud.io/chef/stable/packages/ubuntu/trusty/chef-server-core_12.0.7-1_amd64.deb sudo dpkg -i chef-server-core_12.0.7-1_amd64.deb sudo chef-server-ctl reconfigure sudo chef-server-ctl test sudo chef-server-ctl user-create user1 user1 user1@gmail.com user1pwd --filename /home/maverick09/user1.pem sudo chef-server-ctl org-create chef software, inc. --association_user user1 --filename /home/maverick09/chef-validator.pem sudo chef-server-ctl install opscode-manage sudo chef-server-ctl reconfigure when execute these commands on personal ubuntu machine, works fine , able launch chef server web ui , can see organization , user. so, works expected. but, when try exact same commands on aws instance, getting following message: chef server api main endpoint of chef api's. in general, none of these have html representations, , vast majority of them require send

python - Django 1.9 deprecation warnings app_label -

i've updated django v1.8, , testing local setup before updating project , i've had deprecation warning i've never seen before, nor make sense me. may overlooking or misunderstanding documentation. /users/neilhickman/sites/guild/ankylosguild/apps/raiding/models.py:6: removedindjango19warning: model class ankylosguild.apps.raiding.models.difficulty doesn't declare explicit app_label , either isn't in application in installed_apps or else imported before application loaded. no longer supported in django 1.9. class difficulty(models.model): /users/neilhickman/sites/guild/ankylosguild/apps/raiding/models.py:21: removedindjango19warning: model class ankylosguild.apps.raiding.models.zone doesn't declare explicit app_label , either isn't in application in installed_apps or else imported before application loaded. no longer supported in django 1.9. class zone(models.model): /users/neilhickman/sites/guild/ankylosguild/apps/raiding/models.py:49: removedind

ruby on rails - How to incorporate Google's Web Starter Kit in a Middleman project? -

just found google's new web starter kit today , much. but, how go incorporating baseline html, css/sass, js, etc... middleman project? i imagine answer apply other frameworks asp.net mvc, ruby on rails, etc.... here's steps i'm doing when incorporating framework middleman. base html , convert base html .haml , set layout template. sass, js, etc , put them in respective directories ( images/ , stylesheets/ ) have @ bootstrap starter kit middleman give idea how use framework in middleman. hope helps ;)

terminal - mySql query is not printing all characters. How to show all characters -

Image
table has got values. perfectly. times not printing characters , using | ( meaning before characters same of previous record). how can see entire characters. i'm using putty access remote mysql db. first 1 primary key auto_increment. still i'm facing issue. please me.

shell - I want to automate android OS and how I can recognize Android application components like buttons? -

i want write android application press buttons on other android application , don't want use shell scripting python ! there way program android similar c# win32 api ? short answer depends. yes if both apps yours , prepared, try spoon , no in other case. long answer android applications runs in separate processes , every process has not easy communication process. have make kind of pipeline between 2 applications called ipc (inter-process communication) or send broadcast intent. anyway work if both applications prepared so. imagine can happen' if, example, decide create application sends whatsapp's contacts, because can access whatsapp application. security, every application runs in own sandbox , have no way manipulate 1 application unless other application prepared it.

jquery - Use StackBlur as background Image for a div -

Image
i like, if possible, use stackblur.js set background of div specified image, let's one: http://img.youtube.com/vi/2uphazryvpy/mqdefault.jpg , don't know how accomplish this. since code required 7 lines long...here is! :-) here's example of how use quasimondo's stackblur.js blur image , set background of div: var img=new image(); img.crossorigin='anonymous'; img.onload=start; img.src="https://dl.dropboxusercontent.com/u/139992952/idcard1.png"; function start(){ blurimagetobackground(img,document.getelementbyid('mydiv')); } function blurimagetobackground(img,element){ var c=document.createelement('canvas'); var ctx=c.getcontext('2d'); c.width=img.width; c.height=img.height; ctx.drawimage(img,0,0); stackblurcanvasrgba(c,0,0,c.width,c.height,8) element.style.background='url('+c.todataurl()+')'; } body{ background-color: ivory; } #mydiv{width

ios - Any reason to use restoreCompletedTransactions given appStoreReceiptURL in iOS7/8? -

i in process of updating app new ios7/8 in-app purchase libraries. see of ios7, have access appstorereceipturl part of nsbundle. it appears can access url, , concomitant data, @ time, without interacting or interfacing skpaymentqueue . previously, when customer installed our app , wanted restore in-app subscription, app call restorecompletedtransactions method of [skpaymentqueue defaultqueue] , , obtain receipt information, 1 transaction @ time, app upload our server 1 transaction @ time. however, while testing in ios app store sandbox, appear able obtain 1 piece of master receipt data [[nsbundle mainbundle] appstorereceipturl] , upload server, obtain complete history of every in-app transaction user has made, , record transactions on server appropriate , send notification client. consequently, why or when need call restorecompletedtransactions ? in app, sell single, auto-renewing in-app subscription; there other use cases today in ios7/8 api still helpful? if us

ios - Send a push notification from a user to another using parse -

in application notification sent using parse when user request buy user. notification sent parse doesn't sent user(the receiver)! tried send notification parse website directly , received. can see in image below (a screenshot notification on parse) push sent=1 when send parse website , push sent= 0 when send code. tried many times don't know wrong code (unfortunately need 10 reputatuin post image) here code: var pushquery:pfquery = pfinstallation.query() pushquery.wherekey("user", equalto: self.recipientobjectid) let data = [ "alert" : "username requested buy item", "itemid" : "kotjr9dyge"] var push:pfpush = pfpush() push.setquery(pushquery) push.setdata(data) push.setmessage("username requested buy item") push.sendpushinbackgroundwithblock({ (issuccessful: bool, e

performance - localjump and no block given error while starting rails server on c9 -

i'm creating rails 4.2 app , happened while deploying heroku. i'm using cloud 9 ,after doing changes listed below tried run rails app , received error: (master) $ rails s /usr/local/rvm/gems/ruby-2.1.5@global/gems/bundler-1.7.6/lib/bundler/dsl.rb:157:in `group': no block given (yield) (localjumperror) i replaced gem 'sqlite3 in gemfile with: group :production gem 'pg' gem 'rails_12factor' end group :development gem 'sqlite3' end then changed applicationcontroller file so: class applicationcontroller < actioncontroller::base # prevent csrf attacks raising exception. # apis, may want use :null_session instead. protect_from_forgery with: :exception def hello render text: "<h1>hello</h1><p>welcome home</p>" end end and changed config.routes.rb file to: first-app::application.routes.draw root "application#hello" i've searched on place answers came

Delphi - tfilestream: write time and date to file -

i trying save line each event containing piece of text , time + date when happened. the problem is: time shown chinese font it replaces same line on , on again here code: uses sysutils, classes; function log: boolean; var fs: tfilestream; : string; time : tdatetime; begin := 'boss dead!'; time := now; try fs := tfilestream.create('log.txt', fmcreate or fmopenwrite); fs.write(pchar(i +timetostr(time))^, length(i +timetostr(time))); fs.write(i, sizeof(i)); fs.free; end; end; thank you. usually when expect latin text, see chinese text, means interpreting ansi text though utf-16. infer intending write out utf-16 text, writing out ansi text. means have pre-unicode delphi. as far why keep overwriting file, that's because pass fmcreate . want open existing file in write mode, or if no file exists, create new file. win32 api function supports open_always creation disposition. not available through tfile

android - Setting DataPoint for for Custom DataType in Google Fit -

i'm getting following error when trying set datapoint custom datatype app use google fit. error: getvalue (com.google.android.gms.fitness.data.field) in datapoint cannot applied (int) datapoint datapoint = datapoint.create(mydatasource); datapoint.getvalue(0).setint(totalcount); dataset.add(datapoint); i know missing i'm not sure what. i had create own field, not sure .zzn after exploring field datatype saw method , seems working far myfield = field.zzn("custom",field.format_int32); datatypecreaterequest request = new datatypecreaterequest.builder() .setname("net.riversidestudios.pushupchallenge.pushup") .addfield(myfield) .build();

OSX Removing app data from Xcode -

new os x development , have tried removing ~/library/developer/xcode/deriveddata system, product>clean still wouldn't wipe data. know simpler in ios simulator. advise on removing os x app data runs if first time? oh open simulator , click (and hold) on app icon. it'll shake , click 'x' in corner delete app , data.

ruby - How to put space between flows, I'm using shoes gui toolkit -

i'm new programmer, , know ruby programming language. asked make interactive interface still struggling layout. of aesthetic reasons want add space between boxes inside flow blue border. here code far shoes.app(title: "bullying app", width: 1250, height: 840) #header flow width: 1.0, height: 0.3 title 'bullying app' background rgb(119,136,153) border pink end #dropdown menu child stack margin: 20 para 'which child' list_box items: ["child 1", "child 2", "child 3"] end # tabs buttons flow margin_left: 800 button 'summary' button 'web' button 'time' button 'social media' button 'alerts' border red end flow margin: 10 flow width: 1.0, height: 0.4 border blue #first square "most recent sites" flow width: 0.2, height: 0.99 flow margin_left: 400 background white border darkorange,strok

c# - Visual Studio Universal App Resource is not found when in Shared folder -

Image
this problem bother visual studio ide telling me cant find resource, when build application not having problem. in visual studio have this: here example of universal app architecture follows: example.windowsphone ->mainpage.xaml example.share -> style.xaml -> app.xaml has style.xaml referenced eventhought have reference dmbluebrush in style page : <solidcolorbrush x:key="dmbluebrush" color="{staticresource dmblue}" /> in visual studio tell me cant find it, when build application find resource. have not reference correctly ide work? i using visual studio 2013 professional version 12.0.31101.00 update 4. edit 1: in app.xaml in shared have: <application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" > <application.resources> <resourcedictionary> <resourcedictionary.mergeddicti

MonetDB table statistics -

below portion of statistics of 1 of tables. i'm not sure how understand width column. values in bytes? if so, know fname , lname have higher ascii char counts 5 , 6 , there 1 char long values in mname . update 1. below output of select * statistics . i'm showing first 5 columns of ouput. +--------+---------+------------------------+---------+-------+ | schema | table | column | type | width | +========+=========+========================+=========+=======+ | abc | targets | fname | varchar | 5 | | abc | targets | mname | varchar | 0 | | abc | targets | lname | varchar | 6 | the column width shows "byte-width of atom array" (defined in gdk.h ). not entire story in case of string columns, because here atom array stores offsets string heap. monetdb uses variable-width columns, because if there few distinct string values, 64-bit offsets waste of memory. in cas

bigdata - How big the MySQL Data can be on a PC? -

i have mac pro i7 processor, 16gb ram, , sufficient storage running win 8.1 via parallel on top of os x yosemite. have 23gb mysql data , wondering if able have such big data loaded mysql in pc. started import data stops after hour throwing error error 1114 (hy000) @ line 223. table x full. i googled error , found same error discussed in stackoverflow (but not of data). tried resolve using given solutions failed. mysql imports 3g of data , throws error. now, here 3 main questions. is data more bigger mysql data engine can have on pc? if not case , go data, have configuration required enable running 23gb data on pc? final concluding question how big big 1 cannot run on machine? matter able store data locally or needs other things? of course mysql on windows can handle 23gb of data. that's not close limit. keep in mind database takes lots of disk space indexes , other things. 23gb of raw data need 100gb of disk space load, index, , running. if loading in

C# driver 2.0 Mongodb UpdateOneAsync -

` public class student { public long studentid {get; set;} public string fname {get; set;} public string lname {get; set;} public list<objectid> courseslist {get; set;} public int iq {get;set;} } public class courses { [bsonid] public objectid id { get; set; } public string coursenumber{get; set;} public string coursename{get; set;} } ` how add/append courser id course list(which may null first time) of student object ps: know how set field using below command. hoping on similar lines above problem await studentcollection.updateoneasync(a => a.studentid == studentid, builders<student>.update.set( => a.iq,90)); as you've discovered, c# code use $addtoset is: var filter = builders<student>.filter.eq(s => s.studentid, studentid); var update = builders<student>.update.addtoset(s => s.courseslist, courseid); var result = await collection.updateoneasync(filter, update); however, $addtoset

flash - ActionScript Library Project vs. Flex Library Project -

i've got couple of issues nature of inconsistency between flexlib project , as3 lib project in flash builder 4.7, air sdk 15, 16 , 17, flex sdk 4.6. common thing these flexlib not allow (syntax error highlighted) build/compile pieces of code allowed in regular as3lib project. please note examples bellow simplified, , there real life use cases if it's against practices. internal classes above package internal class before { public function before(){} } package { public class main { public function main() { } } } in flex library project code causes: 1083: syntax error: package unexpected. in regular actionscript library project works fine, without single warning. array key type greediness var array:array = [boolean, number, xml]; for(var c:class in array) { if(c object) { trace('test') } } in flex library project code causes: 1067: implicit coercion of value of type string unrelated type class.

hadoop - How to extract keywords from lots of documents? -

i have many documents, on ten thousands (maybe more). i'd extract keywords each document, let's 5 keywords each document, using hadoop. each document may talk unique topic. current approach use latent dirichlet allocation (lda) implemented in mahout. each document talks different topic, number of extracted topics should equal number of documents, large. lda become inefficient when number of topics become large, approach randomly group documents small groups each having 100 documents , use mahout lda extract 100 topics each group. approach works, may not efficient because each time run hadoop on small set of documents. has better (more efficient) idea this?

python - Series Index Pandas -

i have simple question. have series [in]: item_series [out]: item_nbr 9 27396 28 4893 40 254 47 2409 now have loop for j in item_series: print j right prints: 27396, 4893, 254, 2409. how can print item number? in example: 9, 28, 40, 47. you can access index of pandas series using item_series.index so example for j in item_series.index: print j

java - Jaxb : IllegalAnnotationExceptions -

i getting following exception "1 counts of illegalannotationexceptions " code: image image = new image("url"); stringwriter sw = new stringwriter(); jaxbcontext jaxbcontext = jaxbcontext.newinstance(image.class); marshaller jaxbmarshaller = jaxbcontext.createmarshaller(); jaxbmarshaller.setproperty(marshaller.jaxb_formatted_output, true); jaxbmarshaller.marshal(image, sw); class: @xmlrootelement(name="productimage") public class image { private string url; public image( string url) { this.url = url; } @xmlelement(name = "imagelocation") public string geturl() { return this.url; } } i tried setting @xmlelement annotation on field , setting accessortype field on class. getting same exception. i missing default constructor. public image () { } use class.. import javax.xml.bind.annotation.xmlaccesstype; import javax.xml.bind.annotation.xmlaccessortype; import javax.xml.bind.

javascript - Redirect a logged in user from login page to user dashboard with php -

i need manage php page redirection function. i want logged in users redirect user dashboard instead of displaying login page typing address in browser's address bar. how prevent users display login page login page codes given below <?php include 'dbc.php'; $err = array(); foreach($_get $key => $value) { $get[$key] = filter($value); //get variables filtered. } if ($_post['dologin']=='login') { foreach($_post $key => $value) { $data[$key] = filter($value); // post variables filtered } $user_email = $data['user_email']; $pass = $data['pwd']; if (strpos($user_email,'@') === false) { $user_cond = "user_name='$user_email'"; } else { $user_cond = "user_email='$user_email'"; } $result = mysql_query("select `id`,`pwd`,`full_name`,`approved`,`user_level` users $user_cond , `banned` = '0' ") or die (mysql_er

csv - Getting respective columns for the unique records in r -

i have large csv file millions of records , 6 columns . want unique records of 1 column "name" , columns associated unique records in "name". 50,000 unique "name" records want other 5 columns associated 50,000 records. know how unique records in column. in code below filter out name column(1st column) want separate data frame , return unique records using unique function. not sure how other 5 columns unique records. m <- read.csv(file="test.csv", header=t, sep=",", colclasses = c("character","null","null","null","null","null")) names <- unique(m, incomparables = false) yes, others unique w.r.t. 1st column. if same name has repeated , have different entries in at-least 1 of other 5 columns, row count unique one. m <- read.csv(file="test.csv", header=t, sep=",", colclasses = c("character","null",&quo

javascript - Page.ClientScript.RegisterStartupScript Not Injecting Script -

i cannot page.clientscript.registerstartupscript work. have looked through possible suggestions on stackoverflow , other sites, yet nothing seems working. not see "alert" message. kept simplifying code until ended simple html file , line of c# code. <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> </head> <body> <form></form> </body> </html> and backend c# call: page.clientscript.registerstartupscript(this.gettype(), "alerttab", "alert('here!')", true); the script not being appended page (i not see in browser html). have tried surrounding script <script>..</script> tags has not changed anything. page.clientscript.registerstartupscript being called page_load try this. page.clientscript.registerstartupscript(gettype(), "alerttab"," <script>alert('here!')</script>", fals

How to remove php bad tag -

how remove <range/> , <heading/> " echo "? seems 2 tags broken. <lookat> <longitude>121.5445472</longitude> <latitude>25.16207778</latitude> <altitude>0</altitude> <range/> <tilt>0</tilt> <heading/> <altitudemode>absolute</altitudemode> </lookat> it doesn't seem php me, code tags removed: <lookat> <longitude>121.5445472</longitude> <latitude>25.16207778</latitude> <altitude>0</altitude> <tilt>0</tilt> <altitudemode>absolute</altitudemode> </lookat> but if you're trying embed part of php script, might want try this.... <?php // insert php code here ?> <lookat> <longitude>121.5445472</longitude> <latitude>25.16207778</latitude> <altitude>0</altitude> <tilt>0</tilt> <altitudemode>absolute</alti

javascript - Bootstrap collapsible behaves weird -

my problem sampled in fiddle . i have basic collapsible element toggle button inside: <div class="visible-xs collapsible collapse in panel panel-primary"> <div> lorem ipsum dolor sit amet, consectetur adipisicing elit. hic veritatis fugit veniam sapiente rem excepturi velit animi inventore mollitia reprehenderit nostrum natus autem quae minima dolor dolores voluptatum eum quia. </div> <br /> <div class="btn btn-primary" data-toggle="collapse" data-target=".collapsible">collapse</div> </div> when element collapses, children elements jumps out of collapsible. what's wrong here? because of visible-xs class. <div class="collapsible collapse in panel panel-primary"> http://jsfiddle.net/g238b1qn/

How to disable comments on Page on wordpress? -

i have create page http://www.example.com/sitemap there static content on page. , under template homepagete_hierachy coming. but getting comments on page. how disable comments on page here page template <?php get_header(); ?> <div id="content"> <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?> <?php the_content(); ?> <?php endwhile; ?> </div> <?php get_footer(); ?> go edit page, @ top right corner there's "screen options", click there , make sure "discussion" , "comments" selected. see below page textarea checkboxes allow or disallow comments , trackbacks page.

Drupal Chaos Tool Suit Custom Ruleset error -

i using drupal core 6.14 , chaos tool suit 6.x-1.12 , in ctool custom access rulesets page getting error when loading ctools modal dialog. the post request url in local machine http://localhost/drupal/?q=ctools/context/ajax/add/ctools_export_ui-ctools_access_ruleset/requiredcontext/%3a%3aadd/node . response status 200 , statustext "parsererror". it's giving error alert, an error occurred @ http://localhost/drupal/?q=ctools/context/ajax/add/ctools_export_ui-ctools_access_ruleset/requiredcontext/%3a%3aadd/node. error description: "[ { "command": "settings", "argument": { "basepath": "/drupal/", "cron": { "basepath": "/drupal/?q=poormanscron", "runnext": 1362598387 } } }, { "command": "css_files", "argument": [ { "file": "/drupal/sites/all/modules/activities/activities.css?0", "media": "all" }, { &qu

Custom JSF component declared in .tld file works in JSP but not in Facelets -

i have custom jsf component registered in .tld file. works fine in jsp when declare below: <%@taglib uri="http://example.com/ui" prefix="ex"%> however, doesn't work in facelets when try declare below: <html xmlns:ex="http://example.com/ui"> how can use custom jsf component in facelets too? jsp , facelets entirely distinct view technologies. jsp servlet based while facelets xml based. can't reuse tags/taglibs of 1 on other. *.tld files jsp are, *.taglib.xml files facelets. here's kickoff example of how facelets taglib file jsf 2.0: <?xml version="1.0" encoding="utf-8"?> <facelet-taglib xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facelettaglibrary_2_0.xsd" version="2.0"> &l