Posts

Showing posts from July, 2011

php - Codeigniter - How to get Other user session -

i'm using chat in codeigniter here i'm tring active users can display in chat whether user online or offline. tried following result empty. $this->session->all_userdata(); kindly me. if using database sessions, potentially verify login status using call ci_sessions table (or whatever have named it). can use simple query validate if have been browsing within last hour (or whatever) , validate them being online. sample sql query this: select from_unixtime(timestamp) 'timestamp' ci_sessions timestamp > unix_timestamp(date_add(curdate(),interval -1 hour)) order timestamp desc this return users active in last hour (the timestamp col updated each time page requested) you can grab users details out of 'data' column... $this->session->all_userdata() will not return logged in users available data of current logged in user

ios - Response in alert view -

Image
i new ios want display response post in alert view.in nslog showed response. need when clicked button alert view can display response. coding: -(void) senddatatoserver : (nsstring *) method params:(nsstring *)str{ nsdata *postdata = [str datausingencoding:nsasciistringencoding allowlossyconversion:yes]; nsstring *postlength = [nsstring stringwithformat:@"%lu", (unsigned long)[str length]]; nsmutableurlrequest *request = [[nsmutableurlrequest alloc] initwithurl:[nsurl urlwithstring:url]]; nslog(@"%@",str); [request sethttpmethod:@"post"]; [request setvalue:postlength forhttpheaderfield:@"content-length"]; [request sethttpbody:postdata]; nsurlconnection *theconnection = [nsurlconnection connectionwithrequest:request delegate:self]; if( theconnection ){ mutabledata = [[nsmutabledata alloc]init]; } } alerview: - (ibaction)butt1:(id)sender { uialertview *alert = [[uialertview allo

java - Where does Gradle managed dependency without Maven or Ivy? -

i understand java projects using gradle publishing reusable code publishing maven's pom.xml file along side jar file. i'm wondering gradle store dependency list if library not published using neither ivy nor maven. moreover, gradle can used not jvm-based project, can used build non-jvm project, not use maven or ivy. i've read chapter 23. dependency management doesn't give clue how gradle can publish java library without maven or ivy. transitive dependencies native projects in gradle not possible of gradle 2.13. you need implement own plugin somehow store/retrieve , process such metadata , use them correctly (resolve, download , put files correct directories). we plan implement similar functionality. closest solution maven nar plugin .

Cmake install header without a specific method -

i have small library made stand along except 1 optional method in class requires imagemagick. looking make possible not compile method if machine not have imagemagick installed; rather failing. issue header still have method defined (though not compiled). there way remove method header using cmake or other approach? wrap definition in preprocessor definition: #ifdef have_imagemagick void myfunctiondefinition(void); #endif then, in cmake, if imagemagick found, add definition project. cmake pass definition command line of compiler, define preprocessor token. if(imagemagick_found) # or whatever cmake variable holds info add_definitions(-dhave_imagemagick) endif() alternatively, if have many such defines, consider include file hold of these configurations. cmake command configure_file can expand out entire file's worth of configuration statements @ once.

python - Convert mayavi mlab.contour3d plot to vtkPolyData -

i trying triangulated vtkpolydata mlab.contour3d plot. using mayavi because seems fastest way minimal surfaces triangulated properly. need vtkpolydata because want save .stl file. here mwe of code: import numpy np mayavi import mlab def fun(x, y, z): return np.cos(x) + np.cos(y) + np.cos(z) x, y, z = np.mgrid[-1:1:100j, -1:1:100j, -1:1:100j] contour = mlab.contour3d(x, y, z, fun) mlab.show() what mayavi surface triangulated , displayed using vtk (or tvtk ), should possible vtkpolydata there. way found far use mlab.savefig(test.obj) export .obj-file (which bad, because takes time save file everytime mayavi ui opens) , import file again using vtkobjreader , gives me vtkpolydata want. does know more straight-forward way this? edit: clarify problem bit more: can access data visualization e.g. mayavi.tools.pipeline.get_vtk_src() , comes in form of vtkimagedata . if knows way convert vtkpolydata , solution. by total coincidence found solution. impor

How to design content share model for social network in Django? -

Image
this not program bug fix problem. looks silly, since don't have experience in designing website. want make sure design pattern right before began write code. i want design social network google+ or facebook(only accomplish basic function sharing content), google+, users can share different types of content texts, photos, link , video. picture below: i'm confused need design different model every type sharing content? below codes: class textpost(models.models): text=models.charfield(max_length=140) createdate=models.datetimefield(auto_now_add=true) author=models.onetoonefield(user) class gallerypost(models.model): gallerytitle=models.charfield(max_length=140) createdate=models.datetimefield(auto_now_add=true) author=models.onetoonefield(user) class images(models.models): image = models.imagefield() gallerypost=models.foreignkey(gallerypost) class linkpost(models.models): link=... createdate=... class videopost(models.models

vb.net - Adding the Google Contacts v3 API to my project -

Image
please forgive me if sounds simple question getting myself confused. i have visual basic application uses google calendar v3 api , has been operational several months. authentication working etc.. now wanting extend cababilities of project include contact details. intially found this: https://developers.google.com/google-apps/contacts/v3/#retrieving_a_single_contact it provides several examples, although c#. eg: using google.contacts; using google.gdata.contacts; using google.gdata.client; using google.gdata.extensions; // ... requestsettings settings = new requestsettings("your_application_name"); // add authorization token. // ... contactsrequest cr = new contactsrequest(settings); // ... in visual basic application have header section instead: imports system.collections.generic imports system.io imports system.threading imports system.xml imports google.apis.calendar.v3 imports google.apis.calendar.v3.data imports google.apis.calendar.v

sql server - Why my Linqued query is not giving me proper result? -

i have sql query gives me proper result i.e names of employee sorted z using order clause select distinct(empntlogin),employee attendance createdate>='2016-01-01' order empntlogin when converted same query in linq,i getting right result order clause not working. here linqued query var query = (from attendance in db.attendances orderby attendance.empntlogin attendance.createdate.value.year >= 2016 select new { attendance.employee, attendance.empntlogin }).distinct(); in linq query, distinct applied after orderby , therefore order discarded. apply orderby after call distinct var query = (from attendance in db.attendances attendance.createdate.value.year >= 2016 select new { attendance.employee, attendance.empntlogin }).distinct().orderby(att => att.empntlogin);

escape sequences are not working in php -

if im not wrong \n representation means newline <br> .but when use <br> or tags work escape sequences. example echo "write somethings<br>"; echo "about coding"; above example works fine when try use escape sequences none of them not working echo "write something\n"; echo "about coding"; it's example newline character , other escaping characters dont work \n .what real logic on case? \n , other similar escape sequences not part of html. should use html escape sequences. these can found here: http://www.theukwebdesigncompany.com/articles/entity-escape-characters.php so <br> tag works \n not

ruby - Rails: Send request back to router -

i working on app cms-functionality client can match arbitrary paths articles. now, use route globbing match html request , check in controller if have article show. if no article present, want send request route resolution flow, search other potential matches. i imagine there should exception that, can't figure out. it's not routingerror . the configuration file: config/routes.rb runs top-to-bottom when defining application routes. need define catch-all @ top of file. i'd recommend using sort of constraint (so can cache result). example, solution may like: # config/routes.rb '*', to: 'article#show', constraints: articleconstraint.new # lib/article_constraint.rb class articleconstraint def matches? # trivial example... make better, e.g. use cacheing! article.exists?(name: request.path) end end

R and postgreSQL table operation -

i have been working on function tries obtain of households @ least 1 la. when use package data.table, possible upload , run function results, due memory problems i'm using postgresql , here becomes problem. year sample serial pernum wtper relate birthyr bplctry 2005 8406 1244876000 3 75 4 na 24040 2005 8406 1244877000 1 62 1 na 22010 2005 8406 1244877000 2 67 2 na 24040 2005 8406 1244878000 1 137 1 na 24040 2005 8406 1244878000 2 130 2 na 24040 2005 8406 1244878000 3 149 3 na 24040 > paises [1] 21080 21100 21130 22020 22030 22040 22050 22060 22070 22080 23010 23020 23030 23040 23050 23060 23100 23110 23130 23140 then, reading (works)... create postgresql instance , create 1 connection. m <- dbdriver("postgresql") con <- dbconnect(m, user="postgres", password="xxxx", dbname="ipums", host='localhost&

php - How do I purge Image Cache in ZenPhoto 1.4.5? -

in previous version of zenphoto had installed, there big button on overview page 'purge image cache'. has gone. i need facility. know located. i found need enable cachemanager plugin. i don't remember having before, maybe off default now.

ssl certificate - Spring Dashboard: No entries. Check internet connection? -

Image
in spring tool suite "internet connection" error displaying while opening dashboard of sts. have checked internet connectivity in google chrome, mozilla, working , connecting internet. there no proxy server internet connection, behind firewall. above configuration set in sts: windows-->preferences-->general-->network connectivity. "active provider" set direct. still error displayed. one more thing add, sts ide integrated browser can access internet, while dashboard can't. there no proxy configuration mentioned in maven .m2/settings.xml when clicked on "getting started guide" here error displayed "suncertpathbuilderexception": checked in google chrome browser ca certificate existence , found "firewallname ssl ca"(here path cross checked: google chrome browser: customize , control google chrome-->settings-->show advanced settings-->https/ssl-->manage certificates-->trustedrootcertificationauth

html - How to make image responsive -

i trying make image responsive.in web version looks when trying see image in mobile version it's not in responsive .please me find out solution.. here html code <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="x-ua-compatible" content="ie=edge"> <link rel="stylesheet" href="css/style.css"> </head> <body> <div class="banner-bg"> <div class="banner-bg-item"><img src="img/banner-bg-1.jpg" style="max-width: 100%;" alt=""></div> <div class="banner-bg-item"><img src="img/banner-bg-2.jpg" style="max-width: 100%;" alt=""></div> <div class="banner-bg-item"><img src="img/banner-bg-3.jpg" style=&qu

ios - How can I show a custom Local notification View or an Custom Alert view when app is in Background? -

Image
actually want show local notification in app. want show notification custom design ok , cancel button on it.and on click of ok , cancel want perform actions.please suggest something. thanks in advance. i impliment code custom local notification may helping accept identifier in delegates of local notification in appdelegate.m nsstring *idetnt = @"accept"; nsstring *idetnt1 = @"reject"; nsstring *idetnt2 = @"local notification"; uimutableusernotificationaction *notificationaction1 = [[uimutableusernotificationaction alloc] init]; notificationaction1.identifier = idetnt; notificationaction1.title = @"snooze"; notificationaction1.activationmode = uiusernotificationactivationmodebackground; notificationaction1.destructive = no; notificationaction1.authenticationrequired = no; uimutableusernotificationaction *notificationaction2 = [[uimutableusernotificationaction alloc] init]; notificationa

url rewriting - Remove directory from URL. Web.Config URLRewrite -

i working on little web project expand knowledge in web development. not have domain working server ips. current web.config <?xml version="1.0" encoding="utf-8"?> <configuration> <system.webserver> <rewrite> <rules> <rule name="hide .html ext"> <match ignorecase="true" url="^(.*)"/> <conditions> <add input="{request_filename}" matchtype="isfile" negate="true"/> <add input="{request_filename}" matchtype="isdirectory" negate="true"/> <add input="{request_filename}.html" matchtype="isfile"/> </conditions> <action type="rewrite" url="{r:0}.html"/> </rul

vb.net - my log in form logic seems flawed and i cant figure it out -

im making log in form users can input details main program, , (eventually) users able change passwords my "passwords.txt" file contains: 123 password and code executes see whether username , password correct or not imports system.io public class login public structure info dim username string dim password string end structure dim details info private sub button2_click(byval sender system.object, byval e system.eventargs) handles button2.click if txtusername.text = details.password , txtpassword.text = details.password form1.show() me.hide() else msgbox("your username or password incorrect!") txtpassword.text = "" txtusername.text = "" end if end sub private sub login_load(byval sender system.object, byval e system.eventargs) handles mybase.

Print selected attribute on select option with PHP and MySQL -

i'm printing select list database. here's part of code: <form action="" method="post"> <div class="form-item"> <select name="specialties"> <?php $query = "select * specialties"; $result = mysqli_query($connection, $query); echo '<option value="all">' . $filtertitle . '</option>'; while($row = mysqli_fetch_assoc($result)) { $id = $row['id']; $title = $row['title_'. $lang]; if($_post['specialties'] == $id) { $selected = 'selected'; } echo '<option value="' . $id . ' "' . $selected . '>' . $title . '</option>'; } ?> </select> </div> <div class="form-item"> <input class="fo

regex - C# Getting value between two same characters -

usually, can string value between 2 characters. question is, how value between 2 same characters . for example: string full_value = "http://stackoverflow.com/questions/9367119/title-goes-here"; in example, how can extract value 9367119 entire string? the solution use doesn't work since 9367119 has same / characters right , left of it. here's have far: this works values doesn't have 2 same characters left , right. such as: /dog\ can replace / , \ solution public static string between(string full_value, string a, string b) { int posa = full_value.indexof(a); int posb = full_value.lastindexof(b); if (posa == -1) { return ""; } if (posb == -1) { return ""; } int adjustedposa = posa + a.length; if (adjustedposa >= posb) { return ""; } return full_value.substring(adjustedposa,

r - Factoextra - change line width for ellipses and variables -

i'm making pca factominer , factoextra packages. an example of code data iris : library(factominer) library(factoextra) data(iris) res.pca<-pca(iris , scale.unit=true, ncp=2, quali.sup=c(5), graph = false) fviz_pca_biplot(res.pca, label="var", habillage=5, addellipses=true) + theme_minimal() http://i.stack.imgur.com/s7jo4.png i want change width of lines surrounding ellipses , same width of variables. tried several methods couldn't figure how want. any ideas? i create copies of functions needed , change code inside them. specifically, increase width of ellipses can add size=.. in call ggplot2::stat_ellipse command. my_fviz_pca_biplot <- function (x, axes = c(1, 2), geom = c("point", "text"), label = "all", invisible = "none", labelsize = 4, pointsize = 2, habillage = "none", addellipses = false, elli

c# - Run background service in android for data syncing -

i'm new xamarin platform. i'm developing application android platform using xamarin.forms. how can sync data server in background. want upload data internet connection available , @ time whatever user doing. here sample service code have tried [service] public class longrunningtaskservice : service { public override ibinder onbind (intent intent) { return null; } public override startcommandresult onstartcommand (intent intent, startcommandflags flags, int startid) { // start task here new task (() => { // long running code dowork(); }).start(); return startcommandresult.sticky; } public override void ondestroy () { base.ondestroy (); } public void dowork () { while (true) { //printing text checking if service continously running or not log.write ("hello"); thread.sleep (5000); }

How to use Chrome Inspector to show the popup css for a jquery plugin -

Image
i'm trying chrome inspector show me class names , properties used in jquery plug-in can overwrite , adjust them want. chrome inspector css window doesn't show it. i using plugin shows popup of list items when click on textbox. see jsfiddle $('#example-1').timeselect({ 'step': 15, autocompletesettings: { autofocus: true } }); i want change highlighted row background colour , text size there shown in following screenshot i read in this answer see hover css in chrome inspector need check .hov style in window. it not matter element state set to. chrome css window not show me css 2 properties trying change i.e. highlighted row font size , background colour. doesn't show me gray colour in window @ all. allows me change static font size of textbox, not text size of when textbox clicked , hover active. i had @ javascript code on github plugin. there no reference. there no reference css or style being applied it. summary of a

java ee - How to configure JBoss AS7.1.1 to reference a CORBA Remote-Bean -

i'm switching local development glassfish jboss. i'm not experienced corba , remote-beans. how can configure following gf-configuration in jboss 7.1.1? the config gf: <external-jndi-resource res-type="javax.naming.reference" description="" jndi-name="ejb/documentserviceinvocation" factory-class="com.sun.jndi.cosnaming.cnctxfactory" jndi-lookup-name="ejb/documentserviceinvocation"> <property name="java.naming.provider.url" value="corbaname::server01:9812,:server01:9813/nameserviceserverroot"></property> </external-jndi-resource> and... <servers> <server name="server" config-ref="server-config"> ... <resource-ref ref="ejb/documentserviceinvocation"></resource-ref> </server> </servers> my web.xml: <ejb-ref> <ejb-ref-name>ejb/documentserviceinvocation</ejb-ref-name&

asp.net mvc - Umbraco MVC - how can I override globa Authorize filter in controller? -

i secure whole website every page except login page require user authenticated. in order achieve this, register authorize filter @ application startup: public static void registerglobalfilters(globalfiltercollection filters) { filters.add(new authorizeattribute()); } now there problem logincontroller , despite applying [allowanonymous] attribute , still requires user authenticated. login controller: [allowanonymous] public class logincontroller : surfacecontroller { public logincontroller() { } [httppost] [validateantiforgerytoken] [allowanonymous] public async task<actionresult> handlelogin(loginmodel model, string returnto) { return currentumbracopage(); } } there no other child actions on page , problem definitively logincontroller . happens here , how can fixed? update: views are login page template: @inherits umbraco.web.mvc.umbracotemplatepage @{ // layout = "master.cshtml"; layou

php - Error in passing the variable to url as a variable -

i trying pass session variable url in variable 'var' new please me resolve issue in below code line no 7. php if($user){ $response["error"] = false; $_session['vault_no'] = $user['vault_no']; $to=$email; $subject = "reset profile password"; $txt = "click on link reset profile password-> www.miisky.com/appmiisky/reset_pro.php?var = $_session['vault_no']" ; $headers = 'from: innovation@miisky.com' . "\r\n" ; $headers .= "bcc: prajwalkm7@gmail.com\r\n"; $headers .= 'reply-to: innovation@miisky.com' . "\r\n" . 'x-mailer: php/' . phpversion(); /*$headers = 'from: innovation@miisky.com' . "\r\n" . 'cc: innovation@miisky.com' . "\r\n&q

c++ - Qt - QStringList to QListWidget*item -

i have list of inputs csv document in qlistwidget, , want associate each item id, when double click specific item can configure it. tried "qlistwidgetitem *item = rowdata;", gave me error. code in constructor: if (getin.open(qfile::readonly)) { //collect data file items = getin.readall(); //split data line line rowofdata = items.split("\n"); //close csv document getin.close(); } //go through data collected, , split them 2 delimiters. (int x = 0; x < rowofdata.size(); x++) { rowdata = rowofdata.at(x).split(",").first().split(":"); if(!rowdata.isempty()) ui->itemlistwidget->additem(rowdata.first()); qlistwidgetitem *item = rowdata; } the function when item double-clicked: void storage::on_itemlistwidget_itemdoubleclicked(qlistwidgetitem *item) { itemwindow = new itemwindow(this); itemwindow->show(); } let me try answer. ofc error : qlistwidgetitem *item = rowdat

java - JFrame: No process -

i learning java gui swing library. know how make jframe , add jbutton , add actionlistener e.t.c today jframe not showing. doing usual. please have @ code , suggest doing wrong.. import javax.swing.*; import java.awt.*; import java.util.concurrent.timeunit; public class mygroup extends jframe { private buttongroup mygroup = new buttongroup(); public mygroup(){ setsize(500, 500); setdefaultcloseoperation(jframe.exit_on_close); setlayout(new flowlayout()); jradiobutton b1 = new jradiobutton("check1"); jradiobutton b2 = new jradiobutton("check2"); jradiobutton b3 = new jradiobutton("check3"); jradiobutton b4 = new jradiobutton("check4"); add(b1); add(b2); add(b3); add(b4); mygroup.add(b1); mygroup.add(b2); mygroup.add(b3); mygroup.add(b4); setvisible(true); } public static void main(string[

database - What was picked within a columns.picklist? -

i wasted bit of time trying work out figured simple. i've got database multiple tables (mysql). 1 table containing "components" , containing "products". products built using components, example; product abc might made of 3 x screws, 4 x bolts, 1 kilogram of fresh air... etc! making sense far? the components displayed in dbgrid. if user makes mistake , wants add "component" "product" picklist appears listing components (from different table) them select from. now, here's problem! when selected column[i].picklist (this part of dbgrid) how know selected. thought there event fired, there doesn't seem be. i need know item selected can retrieve appropriate description next field. there 3 fields, component, description, quantity. component , quantity can edited user. i hope i'm making sense here. here code i'm using (as messy is); procedure tform1.completepolessourcestatechange(sender: tobject); var loop: inte

MongoDB connecting to authenticationdatabase using shell command -

when connect using os shell, mongo --port 27017 -u "testusr" -p "testpwd" --authenticationdatabase "testdb" instead of switching taking me testdb, logs me test database? missing here? db.auth("testusr","testpwd") working wihtout authentication issues? how redirect correct database? the following works me mongo localhost:27017/testdb -u "user" -p "pass" --authenticationdatabase "testdb" you can find help(i used in linux) mongo --help usage: mongo [options] [db address] [file names (ending in .js)] db address can be: foo foo database on local machine 192.169.0.5/foo foo database on 192.168.0.5 machine 192.169.0.5:9999/foo foo database on 192.168.0.5 machine on port 9999

spring - File Upload (multipart) is not working with Zuul Proxy -

i using spring security spring boot , angular js. in application, every request redirecting gateway app other apps using zuul proxy. file upload module not working in architecture. file upload javascript code below: if(idprooffile.files.length == 0) { $scope.alerts = [ { type: 'danger', msg: 'no file(s) selected, please browse , select id proof file(s) first.' }, ]; return; } else{ // upload user's files:: //create form data send via post var formdata = new formdata(); for(var i=0; i< idprooffile.files.length; i++){ if(idprooffile.files[i].size > 31457280) // check each file size should not more 30 mb = 30*1024*1024 bytes { $scope.alerts = [ { type: 'danger', msg: 'the size of file: '+ idprooffile.files[i].name +' more 30 mb. max limit of file size 30

html - Find element by xpath selenium web driver -

i have webpage: <div class="formfonttitle">wireless - general</div> <div style="margin-left:5px;margin-top:10px;margin-bottom:10px"><img src="/images/new_ui/export/line_export.png"></div> <div class="formfontdesc">set wireless related information below.</div> <table width="99%" border="1" align="center" cellpadding="4" cellspacing="0" id="wlgeneral" class="formtable"> <tr id="wl_unit_field"> <th>frequency</th> <td> <select name="wl_unit" class="input_option" onchange="_change_wl_unit(this.value);"> <option class="content_input_fd" value="0" >2.4ghz</option> <option class="content_input_fd" value="1" selected>5ghz</option> </select> <

activerecord - Rails save record second time -

i have function : def vote story.increment_counter(:vote, params[:id]) end first database , see : vote = 2. when refresh page database again see : vote = 4. second try : def vote story = story.find_by_id(params[:id]) @test = story.vote @test2 = @test.to_i + 1 story.vote = @test2.to_i story.save end in viem have result : @test = 2, @test2 = 3, in database vote = 4. when use +5 have in database +10 votes. i use ruby 4. thanks yours help.

r - jags.parallel - Error in get(name, envir = envir) : invalid first argument -

when using jags.parallel , following error: > out <- jags.parallel(win.data, inits, params, "poisson.od.t.test.txt", + nc, ni, nb, nt); error in get(name, envir = envir) : invalid first argument the same call using jags function runs ok. have found one thread on topic , there 1 speculative suggestion not apply nor work here. reproducible code, taken introduction winbugs ecologists, see chapter 14.1 (slightly modified): set.seed(123) ### 14.1.2. data generation n.site <- 10 x <- gl(n = 2, k = n.site, labels = c("grassland", "arable")) eps <- rnorm(2*n.site, mean = 0, sd = 0.5)# normal random effect lambda.od <- exp(0.69 +(0.92*(as.numeric(x)-1) + eps) ) lambda.poisson <- exp(0.69 +(0.92*(as.numeric(x)-1)) ) # comparison c.od <- rpois(n = 2*n.site, lambda = lambda.od) c.poisson <- rpois(n = 2*n.site, lambda = lambda.poisson) ### 14.1.4. analysis using winbugs # define model sink("poisson.od.t.test.txt") c

c# - Cannot get SaveFileDialog to work with my web page -

this question has answer here: displaying save file dialog in asp.net web page 2 answers i'm trying add method uses link grid view gets file server in form of stream , prompts user save it. i've added system.windows.forms reference controller , added following method. [httpget] [authorize] public void downloadassetstream(int assetid) { //gstream created server file. stream mystream = gstream; savefiledialog savefiledialog1 = new savefiledialog(); savefiledialog1.filter = "pdf files (*.pdf)|*.pdf|all files (*.*)|*.*"; savefiledialog1.filterindex = 2; savefiledialog1.restoredirectory = true; if (savefiledialog1.showdialog() == dialogresult.ok) { if ((mystream = savefiledialog1.openfile()) != null) { // write file stream. mystream.close(); }

powershell - How can I specify the type of a parameter when the object type is from a web service? -

i'm writing powershell module. have get-myperson function accepts identity parameter, calls web service , returns object of type person (the return type web service). i'm working on set-myperson object update couple of properties. want able is: set-myperson 1234 -golfhandicap 22 get-myperson jdoe | set-myperson -golfhandicap 22 (the latter following get-aduser | set-aduser usage) this requires set-myperson accept parameter of type string former , parameter of type person latter, using parameter sets distinguish. i have basic functionality working string struggling parameter person objects. [parameter(parametersetname="person",mandatory=$true,valuefrompipeline=$true,valuefrompipelinebypropertyname=$true)] [person]$person, won't work because powershell doesn't recognize person (as expected): set-myperson : unable find type [person]: make sure assembly containing type loaded. how can powershell recognize person class? do try [

javascript - Onclick play the song - jPlayer -

i making music site when users enter page called top 50, in page there thumbnails of fifty music , on mouse on shows play button, , when click on button loads music. code of play button is: <a href="#" id="song_1"><i class="icon-control-play i-2x"></i></a> and javascript : $(document).ready(function(){ var myplaylist = new jplayerplaylist({ jplayer: "#jplayer_n", cssselectorancestor: "#jp_container_n" }, [ { title:"pay it", artist:"oloni", mp3: "http://all.com/uploads/7/3/3/6/73364003/what_makes_you_beautiful.mp3", oga: "http://all.com/uploads/7/3/3/6/73364003/what_makes_you_beautiful.ogg", poster: "images/m0.jpg" }, { title:"lentement", artist:"miaow", mp3: "http://all.com/themes/assets/musics/miaow-03-lentement.mp3",