Posts

Showing posts from March, 2011

mercurial - Bookmark-based hg workflow for open-source project -

in scons project, use mercurial bitbucket . we'd have several ongoing features under development different people (perhaps multiple people working on single feature, or single person working on multiple features). we've tried named branches, don't work feature development in mercurial. we'd git branch system, branches lighter weight , not permanent, still shared. other separate repos per feature, don't think we're ready (too radical), community seems bookmarks way go here; development on default branch, bookmarks each head (feature). first question: reasonable workflow? other projects working way? second question: having tried little, 1 thing that's confusing when hg update default it's semi-random head get; depends on 1 updated last. have hg update featurex or hg update featurey or else (a) land on random head, , (b) no bookmarks "activated" end not moving bookmark forward. seems recipe failure. assume i'm missing somethi

time - Android Chronotmeter onChronometerTick stackoverflowerror? -

i writting code in android develop chronometer app. facing of error while trying reset chronometer on time. mycode: mchronometer.setbase(systemclock.elapsedrealtime() - 86396000); mchronometer.start(); mchronometer.setonchronometerticklistener(new chronometer.onchronometerticklistener() { @override public void onchronometertick(chronometer chronometer) { long myelapsedmillis = systemclock.elapsedrealtime() - chronometer.getbase(); if(myelapsedmillis>=86400000) { chronometer.stop(); chronometer.setbase(0); chronometer.start(); } } } ); error: 08-18 02:30:16.793: e/androidruntime(23075): fatal exception: main 08-18 02:30:16.793: e/andr

html - Based on Multiple checkbox selection, “mailto:” link changes to “mailto: multiple variables” using javascript -

i'm trying make form. way work user chooses 3 options 10 multiple selection checkboxes. click confirm location button. click send email link. when click confirm location button, changes mailto link in send email link, based on selection (up 3) in multiple checkboxes. however, cannot figure how set multiple selection checkboxes(with max limit of 3 , min of 1), , add single/multiple email values in mailto link. have managed drop-down list (only 1 selection, hence 1 email), cannot figure out above. please help! <form>select place: <select id="myselect"> <option value="email@domain.com">location 1</option> <option value="email2@domain.com">location 2</option> <option value="email3@domain.com">location 3</option> <option value="email4@domain.com">location 4</option> </select> </form> <button type="button" on

geolocation - Android: Mimicking Geofence with BroadcastReceiver and Location Updates -

i trying build app, based on location queries database find scheduled tasks, given latitude, longitude , radius. i have found many answers, articles , libraries online similar things, sophisticated , don't quite me understand concept. i have been able set alarmmanager fire tasks based on scheduled time, , have thinking can set geofence same, without me needing create scripts implement location updates. looks not case , have manually re-implement simple system wide support. ideal scenario: 1. schedule new task lat, lng , radius. 2. add geofence, without worrying user is. 3. when user in area, find row database belongs , stuff db row. but think have go further working. any ideas how can achieve this? the geofence training good, if perhaps over-verbose example of api. core of relies building geofence requests , adding them via locationclient.addgeofences using connected locationclient. receive callbacks pendingintent passed in addgeofences() per handling

windows phone 8 - How to use MarketPlaceReviewTask in a WindowsPhone 8.1 project? -

this question has answer here: what's replacement marketplacereviewtask in windows phone 8.1 universal apps 7 answers in windows phone 8.1 project add "rate app" , "view other apps" options couldn't. know how code windows phone 8.1 silverlight project, couldn't on here. know how use in wp 8.1? using microsoft.phone.tasks; marketplacereviewtask marketplacereviewtask = new marketplacereviewtask(); marketplacereviewtask.show(); it's one-liner now: launcher.launchuriasync(new uri("ms-windows-store:reviewapp?appid=" + currentapp.appid));

xml - XSLT transforming data using choose -

i have xml document, want use xslt change formatting of data. xml values <uniquename>xxx</uniquename> <parent>xyz</parent> <name>abc</name> anytime there xxx in uniquename want change uniquename value 123 i tried below seems add column xml rather transforming xxx 123 <th style="text-align:left">uniquename</th> <th style="text-align:left">parent</th> <th style="text-align:left">name</th> </tr> <xsl:for-each select="units/row"> <tr> <review> <td><xsl:value-of select="uniquename"/></td> <xsl:if test="uniquename= 'xxx'"><text>123</text> </xsl:if> </review> what need change values want as title says, need use xsl:choose , rather xsl:if . try way: <xsl:for-each select="units/row"> <tr> <td>

angularjs - How to add an angularui accordion-group dynamically -

in angularjs service, adding html accordion-group dom of accordion element. results display of accordion-group if panel - no title bar, no collapse behavior. i'm sure because accordion gets initialized before content added. jqueryui accordion has refresh method such occasions, not sure how angualrui accordion recognize new accordion group. hope following steps : get reference of element want add accordion html : <div id = "myaccordion"> </div> controller : var parent = angular.element("#myaccordion"); compile accordion template , attach parent controller: var accordion = $compile("<div accordion> </div>")($scope); parent.append(accordion); but work around should ideally have directive dom manipulation , perhaps coding jquery in mind.

java - alert "Invalid jabber ID" when I use sendInvitation method or add withFromJid parameter in new messageBuilder -

i want assign send user. when run program, got error:java.lang.illegalargumentexception: invalid jabber id: . or show invalid jabber id. if no "withfromjid" parameter,the gae default application name send user, can not accepted it, need assign user send one. elow code: //code 1. jid jid = new jid("testa@mygmaildomain.com"); jid fromjid = new jid("testb@mygmaildomain.com"); xmppservice.sendinvitation(jid,fromjid); //code 2. jid jid = new jid("testa@mygmaildomain.com"); jid fromjid = new jid("testb@mygmaildomain.com"); message msg = new messagebuilder() .withmessagetype(messagetype.normal) .withrecipientjids(jid) .withfromjid(fromjid) .withbody("hello i'm fancy gae app, how you?") .build(); i run same problem, , cause ended being wrong fromjid argument, despite exception reporting on jid argument being invalid. if have @ code in xmppserviceimpl.s

probability - Is there a built-in function to get a number when i have numbers and their probabilities? (Python) -

i have dictionary keys numbers , values probabilities. there (built-in) way return number? basically, want analog of randrange() custom probabilities. use of dictionary not necessary. import numpy np d = {10:0.5, 9: 0.4, 8:0.1} x,p = zip(*d.items()) np.random.choice(x, p=p)

regex - verify emails in PHP -

i tried php regex verify emails, such /^[_a-z0-9-]+(\.[_a-z0-9-])*@[a-z0-9-]+(\.[a-z0-9-])*(\.[a-z]{2,4})$/ . know not correct way validate emails, abc@abc.abc correct in regex. do need enumerate domain name suffixes? i happened know in php filter_var function can verify emails, filter_var('abc@abc.abc', filter_validate_email) correct. what theory of filter_validate_email in php source code? or can tell me better way verify emails? thanks much! function php_filter_validate_email logical_filters.c used check. it tests email against following regex /^(?!(?:(?:\\x22?\\x5c[\\x00-\\x7e]\\x22?)|(?:\\x22?[^\\x5c\\x22]\\x22?)){255,})(?!(?:(?:\\x22?\\x5c[\\x00-\\x7e]\\x22?)|(?:\\x22?[^\\x5c\\x22]\\x22?)){65,}@)(?:(?:[\\x21\\x23-\\x27\\x2a\\x2b\\x2d\\x2f-\\x39\\x3d\\x3f\\x5e-\\x7e]+)|(?:\\x22(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|(?:\\x5c[\\x00-\\x7f]))*\\x22))(?:\\.(?:(?:[\\x21\\x23-\\x27\\x2a\\x2b\\x2d\\x2f-\\x39\\x3d\\x3f\\x5e-\\x

After upgrading to visual studio 2013 update 3 TFS no longer works -

after upgrading visual studio 2013 update 3 tfs components broken. if open pending changed window states system.runtime.interopservices.comexception (0x80004005): error hresult e_fail has been... microsoft.visualstudio.shell.interop.ivsshell5.loadpackagewithcontext... if try open solution bound tfs exception : package 'microsoft.visualstudio.teamfoundation.versioncontrol.hatpackage, microsoft.visualstudio.teamfoundation.versioncontrol, version=12.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a' failed load an exception thrown each project , none of projects load solution making unusable. trying sign vs team services doesn't work either. nothing happens when click sign in. has else had problem? have tried repairing install , didn't work either. ok figured out problem. when googled visual studio update 3, first item takes microsofts download site update 3 guess basic version of visual studio. using visual studio 2013 ultimate has

android - OutofMemory Error in frame animation -

i have developed tour guide app. of classes have frame animation. 3 activities frame animation work well. if similar activity clicked, gives memory leak error. images loaded drawables folder. whole drawable folder contains 3.58 mb. can't understand why it's giving error. please this. in advance. this logcat. 08-18 10:45:14.585: e/dalvikvm-heap(9523): out of memory on 6444816-byte allocation. prio=5 tid=1 runnable 08-18 10:45:14.585: i/dalvikvm(9523): | group="main" scount=0 dscount=0 obj=0x41e46578 self=0x41cc9938 08-18 10:45:14.585: i/dalvikvm(9523): | systid=9523 nice=-16 sched=0/0 cgrp=apps handle=1074774012 08-18 10:45:14.585: i/dalvikvm(9523): | state=r schedstat=( 4068370710 523035518 4253 ) utm=308 stm=98 core=0 08-18 10:45:14.585: i/dalvikvm(9523): @ android.graphics.bitmapfactory.nativedecodeasset(native method) android.graphics.bitmapfactory.decodestream(bitmapfactory.java:596)

Action bar item is not showing up in android -

i not sure how put it. so, please pardon me if doesn't sound right. problem weird one. have menu file describes action bar menu follows - <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android" > <item android:id="@+id/phone" android:icon="@drawable/phone_action_bar" android:orderincategory="1" android:showasaction="always" android:title="call"> </item> <item android:id="@+id/add_to_favourites" android:icon="@drawable/fav" android:orderincategory="2" android:showasaction="never" android:title="add favourites"> </item> <item android:id="@+id/share" android:icon="@drawable/share" android:orderincategory="3"

mvc mini profiler - Glimpse.MiniProfiler plugin not showing duration -

Image
when use miniprofiler plugin glimpse, duration column not showing anything. missing? experienced same? i'm developer behind plugin. the problem plugin collecting data before request ends. thing it's not obvious how collect data in situation , i'm working on that. i'll update answer when fix problem. ths ticket can found here: https://github.com/mcliment/miniprofiler-glimpse-plugin/issues/2

javascript - Elastic Image Slideshow with Require.js -

i'm using http://tympanus.net/codrops/2011/11/21/elastic-image-slideshow-with-thumbnail-preview/ require.js of backbone.js project, failed configure shim config in main.js . i've done, slide still doesn't work. shim: { "jquery.eislideshow" : { deps: ["jquery"], exports: "jquery.fn.eislideshow " }, "jquery.easing.1.3" : { deps: ["jquery"] } }

c++ - Create random binary string: how to remove null character '\0' from to_string() before inserting to another string -

i trying create random binary string consists of 0s , 1s. in implementation generate random integers 0s , 1s, , use std::to_string() in order typecast them string , insert them string. problem have seems using std::to_string() in order insert '0' or '1' characters, insert terminating null character '\n' , therefore double size of string. example, want create string consisting of nbits=10 characters. implementation below 10 elements string printed on screen, size of string double that. know how avoid this? the problem size trying write binary representation of genetic algorithm, , need size correct 1 crossover/mutation operators correct. #include <iostream> #include <string> #include <random> using namespace std; std::random_device rd; std::mt19937 gen(rd()); // random bit string generator string random_string(size_t nbits){ std::uniform_int_distribution<> int1(0,1); string s; s.resize(nbits); for(size_t i=0

go - golang handling kill in a process started by cmd.Start -

i have 2 go programs. proga starts progb using cmd.start(). proga try kill progb, progb should killed immediately, has cleanup before dying. i'm using signal.notify in progb handle sigcall.sigkill whenever proga calls progb.process.kill() doesn't seem notify progb(write contents sigc channel) in progb have notify this: signal.notify(sigc, syscall.sigkill) go func() { fmt.println("started listening") <-sigc fmt.println("sig term") cleanup() os.exit(1) }() somelongrunningcode() is there i'm missing out? i'm sure proga sends sigkill because cmd.process.kill() internally process.signal(sigkill) sigkill cannot trapped recieving process - kernel force process termination. may send sigterm process , handle on other side - conventional method stop application.

Problems using 'usnchanged' to poll for AD changes (Powershell) -

i have been writing interface product called successfactors , i'm having issues component of it. part of script simple ad extract, however, using previous highestcommittedusn adrootdse extract changes (rather complete ad extract). the relevant lines shown below; $dse = get-adrootdse $ou = @('**various ou's**') $activedirectory = $ou | foreach { get-aduser -filter * -properties * -searchbase $_ } $oldadtimestamp = get-content ".\adtimestamp.txt" $adusers = $activedirectory | {$_.usnchanged -gt $oldadtimestamp} | foreach {$_} $dse.highestcommittedusn > adtimestamp.txt i run through $adusers , output relevant data array exported csv outside of loop. the problem i'm having this; if perform multiple extracts throughout day, works correctly. however, if leave weekend , run script, i'm getting empty csv or complete ad extract. there seems no pattern it. am doing wrong? many thanks, tom target single dc not whole domain. each dc h

iOS Google Maps API Route Not Showing Up Correctly -

so if use overview_polyline, works properly. however, not contain points, have opted loop through steps , append paths make large, accurate path. reason, path shows say, chicago los angeles way off, looking this: http://imgur.com/avamep2 here code: - (ibaction)showroute { [otgnetworkrequest fetchroutewithstart:self.startlocation withend:self.endlocation success:^(afhttprequestoperation *operation, id responseobject) { nsdictionary *json = responseobject; nsarray *routes = json[@"routes"]; nsstring *encodedoverviewpath = @""; [self.routes removeallobjects]; self.routes = [[nsmutablearray alloc] init]; (int = 0; < routes.count; i++) { nsarray *legs = routes[i][@"legs"]; nsmutablearray *steps = [[nsmutablearray alloc] init]; nsinteger distance = 0; nsinteger traveltime = 0; (int j = 0; j < legs.count; j++) { distanc

capybara - how can I get the content generated by javascript -

i want use capybara fetch content of remote site has list , content of list generated javascript how can these content? require "capybara" require "capybara/mechanize" require "capybara-webkit" require "ko_spider/proxy/proxy" module kospider class corespider include capybara::dsl def initialize(wait=10) proxy = proxy.new capybara.configure |conf| conf.run_server = false conf.app = '' conf.javascript_driver = :webkit conf.default_driver = :mechanize conf.current_driver = :mechanize conf.default_wait_time = wait conf.ignore_hidden_elements = false conf.current_session.driver.browser.agent.user_agent_alias = 'mac safari' conf.current_session.driver.browser.agent.set_proxy(proxy.host,proxy.port) end

powershell - Set-SPBusinessDataCatalogThrottleConfig : Cannot bind parameter 'Identity' -

if working larger external list (more 2000 items) in dev environment works perfectly, when work in production environment, throws error "unable display web part. troubleshoot problem, open web page in microsoft sharepoint foundation-compatible html editor such microsoft sharepoint designer. if problem persists, contact web server administrator. correlation id: ...........". start working fix bcs limit through powershell. when enter below command in powershell error in cmd. idea? ps c:\program files\nintex\nintex workflow 2010> set-spbusinessdatacatalogthrott leconfig -identity get-spbusinessdatacatalogthrottleconfig -scope throttletype tems database-guid-serviceapplicationproxy 5222b2db-fdd1-43f5-accb-7f039155f654- 8000-default maximum 6000 set-spbusinessdatacatalogthrottleconfig : cannot bind parameter 'identity'. can not convert "get-spbusinessdatacatalogthrottleconfig" value of type "system .string" type "microsoft.sharepoint.busin

c# - Dictionary in wcf -

i have wcf service contains method returns dictionary. the generated method in proxy class returns arrayofkeyvalueofstringstringkeyvalueofstringstring array. how can use method ? the contract method : [operationcontract] dictionary<string, string> getesgkeywordquestion(); in proxy class have arrayofkeyvalueofstringstringkeyvalueofstringstring[] getesgkeywordquestion() { // code } the accepted answer in similar thread reference link telling how have dictionary @ client side in .net .net communication. in other words, poor interoperability if want service consumed non-dot-net applications php or java etc. if had learned/remember data structure in cs, know dictionary implemented through non-linear structure b-tree, dictionary not included in wsdl because of complexity , variant. arrayofkeyvalueofstringstringkeyvalueofstringstring structure generated client designed , intended. if want see consistency on both side , want interoperability

javascript - Facebook Graph API console error -

i trying display feed console using console.log returning error of no token. message: "an active access token must used query information current user." type: "oauthexception" error code : 2500; the message above getting. have followed steps given fb. the code bellow. <script> window.fbasyncinit = function() { fb.init({ appid : '', xfbml : true, version : 'v2.1', }); fb.api('/me', {fields: 'last_name'}, function(response) { console.log(response); }); }; (function(d, s, id){ var js, fjs = d.getelementsbytagname(s)[0]; if (d.getelementbyid(id)) {return;} js = d.createelement(s); js.id = id; js.src = "http://connect.facebook.net/en_uk/sdk.js"; fjs.parentnode.insertbefore(js, fjs); }(document, 'script', 'facebook-jssdk')); </script> <div id="fb-root"> </div> you tr

sap ui 5 fragment title long text -

pls me set fragment icon long text i.e. "purchase status" print "purchase st..." on screen. code : <icontabfilter key="purchase" text="purchase status" icon="sap-icon://order-status"> need print whole text on screen. mit there alternative may suit needs, if want keep icon - can specify icontabfilterdesign of "horizontal". gives little bit more space text. see example here (this shows both text property , count property).

sql - Update based on hierarchy table -

i have table of employees- active or inactive . structure below create table employee ( id int, supervisorid int, active bit ) another table component has items .. create table component ( cid int, empid int ) have sample data loaded here how can update component table , such empid field holds immediate active supervisor id inactive employees. in sample case, result of update should component --------- cid | empid -------------- 1 1235 2 1246 3 1246 i able generate hierarchy table specific employees using query mentioned in fiddle page. you can use recursive cte make table update first active supervisorid each non active id. on first iteration select active id's , set baseid same. on each next iteration select next level of non-active childs add recursive table , save root baseid in each record. when add records baseid field each id first active parent. leave id's need update (where id<>baseid ) in forupd table. use ta

maven - Jboss quickstart kitchensink-angularjs-bootstrap quickstart can't build on openshift due to unresolved pom dependencies -

the quickstart build using maven locally when push openshift, dependencies not being resolved. dependencies of type pom not seem in nexus repository openshift using. pain try put dependencies in dependent poms hoping of better way. has encountered problem , have better solution? there repository url missing? edit: quickstart in question under https://github.com/jboss-developer/jboss-wfk-quickstarts/tree/2.6.0.final stopping rockmongo cartridge mongodb stopped stopping jbossas cartridge repairing links 1 deployments building git ref 'master', commit 49dfdc8 found pom.xml... attempting build 'mvn -e clean package -popenshift -dskiptests' apache maven 3.0.4 (r1232336; 2012-12-18 14:36:37-0500) maven home: /usr/share/java/apache-maven-3.0.4 java version: 1.7.0_65, vendor: oracle corporation java home: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.65/jre default locale: en_us, platform encoding: ansi_x3.4-1968 os name: "linux", version: "2.6.32-431.23.3.el6.

inheritance - A few questions about Java Reflection -

i have parent class entity : package incubator; import java.lang.annotation.annotation; import java.lang.reflect.field; public class entity { private string gettablename() { string result = null; class<?> cl = getclass(); system.out.println(cl.getname()); (annotation : cl.getannotations()) { if (a instanceof entitytable) { entitytable ent = (entitytable) a; result = ent.name(); break; } } return result; } private string getkeyname() { string result = null; class<?> cl = getclass(); system.out.println(cl.getname()); (field f : cl.getdeclaredfields()) { (annotation : f.getannotations()) { if (a instanceof primarykey) { primarykey ann = (primarykey) a; result = ann.name(); } } } return result;

ios - UIImagePickercontroller not saving without use button -

i'm using uiimagepickercontroller take picuture , save photo gallery. when launch picker has button photo take , cancel after taking photo shows 2 button retake & use, if use, use button image saving photo album after saving can't go previous page or close picker. -(void)takepicture:(id)sender{ // create image picker controller uiimagepickercontroller *imagepicker = [[uiimagepickercontroller alloc] init]; // set source camera imagepicker.sourcetype = uiimagepickercontrollersourcetypecamera; // delegate self imagepicker.delegate = self; // show image picker [self presentmodalviewcontroller:imagepicker animated:yes]; // [self performselector:@selector(ontimer_loadpicture:) withobject:nil afterdelay:0.5]; } - (void) imagepickercontroller:(uiimagepickercontroller *)picker didfinishpickingmediawithinfo:(nsdictionary *)info { // access uncropped image info dictionary uiimage *image = [info objectforkey:@"uiimagepickercontrolleroriginalimage&qu

php - cookies: every 2 Monday (every 2 week) -

what i'm trying achieve date of next next monday , pair monday of year, example year (2014) first monday 6th jan -> (after 2 weeks)-> 20th jan. i want launch competition every 2 weeks (every 2 monday) , want set cookie expire in first minute of 3rd monday let customer see competition popup again. i tried find solution in web no luck, don't think it's common situation thanks in advance considering first contest starts @ first monday of current year (i.e. year of date you're providing function), believe following should work properly: function get_next_contest_date($current_date) { $current_date_obj = new datetime($current_date); $year = $current_date_obj->format("y"); $first_day_of_year = date('d', strtotime("$year-01-01")); $week = $current_date_obj->format("w"); $contest_week = $week; if($first_day_of_year !== 'mon') { $contest_week--; } $end_date_

javascript - Can you bind an event to access keys? -

as know, in html there's accesskey attribute lets assign key elements can trigger/focus them directly keyboard, without having tab them first. now wondering, if can bind js event exact... event, or have go old-fashioned way , listen onkeypress (for example) , check key combination? the latter kind of defeat purpose, since browsers have different key combinations trigger access keys . my idea behind assigning access key (mega menu) navigation, unfold , focus it, can tab through links. way can put navigation @ end of html, users don't have tab through hundreds of links (exaggeration) before can reach links in actual content area. there no such event, instance no onaccesskey event have hook 1 of onkey* events. however accesskey trigger activation events elements when accesskey used (tested chrome , firefox). can use events if user clicked,focused,changed part of ui. display elements, i.e. div,span, etc: onclick input elements, i.e. text,textarea: on

incorrect number of subscripts on matrix in R -

so, have list of data frames, named "d1.txt", "d2.txt"................"d45.txt". each of file contains 2 columns , each file has 1000's of rows`. i trying add new column each of data frame in list, following code, shows error incorrect number of subscripts on matrix . the code using is, l <- lapply(seq_along(l), function(i) { l[[i]][, paste0('df', i)] <- 1 l[[i]] }) where l name of list containing data frames. why error coming? thanks! :) edit: reprdoucible example: # create dummy data l <- replicate(5, expand.grid(1:10, 1:10)[sample(100, 10), ], simplify=false) # add column each data.frame in l. # indicate presence of pair when merge. l <- lapply(seq_along(l), function(i) { l[[i]][, paste0('df', i)] <- 1 l[[i]] }) i think when read in "d1.txt", "d2.txt"................"d45.txt" files converted matrices , why particular loop fails. i'll

excel - VBA code to show message box popup if the formula in the target column exceeds a certain value -

i found code on site particular cell private sub worksheet_change(byval target range) if range("a1") > 0.5 msgbox "discount high" end if end sub but wondering if possible make work entire column rather 1 particular cell? try event code: private sub worksheet_calculate() dim rr range, r range set rr = range("a:a").cells.specialcells(xlcelltypeformulas) each r in rr if r.value > 0.5 msgbox "discount high" end if next r end sub edit#1: if want restrict message single row, remove first sub , replace with: private sub worksheet_change(byval target range) rt = target.row if range("a" & rt) > 0.5 msgbox "discount high" end if end sub

Migration of TFS 2013 projects (Iterations and areas) -

i using tfs integration platform migrate projects/work items in tfs 2013 http://tfsintegration.codeplex.com/ in project (source project) have defined set of iterations , areas not migrated project b (destination project). i have tried copy xml settings shown here: http://www.vlaquest.com/2012/05/tfs-integration-tools-configuration-for-work-items/ into xml using has no effect. don't understand how mapping in xml must defined match project structure in tfs. suggestions? i wrote own tool ( witsync ) understand need migrate. designed mapping rules manage areas , iterations there many scenarios support.

mysql - displaying a 12 hours format using php by Row -

im trying display/echo 12 hours format of column modification_out row. while($row=mysql_fetch_array($raw_results)){ $username=$row['username']; $details=$row['details_out']; $details=$row['otherout']; $modification_out=$row['modification_out']; i got trouble here: echo " <tr> <td><center>".$row['username']."</center></td> <td><center>".$row['details_out']."</center></td> <td>date("m/d/y g:i a",".$row['modification_out'].")"</td> <td><center>".$row['otherout']."</center></td> </td> </tr> "; i got error: notice: non formed numeric value encountered in thanks replies guys, figure out answer. <td>".date("m/d/y g:i a", strtotime($row['modification_out']))."</td> thanks. you should

javascript - Jasmine test for Knockoutjs -

how test (using jasmine) if pre defined function such compute or subscribe called when observable variables change in knockoutjs for example: self.report.subscribe(function(){ clearall(); }); if change value of report observable clearall function called subscribe function not executing expected thanks in advance. you can use spyon method. syntax: spyon(myobject, 'nameofmethodtospyon'); //do stuff expect(moobject.nameofthemethodtospyon).tohavebeencalled(); example: spyon(window, 'alert'); alert('hi'); expect(window.alert).tohavebeencalledwith('hi'); so like: spyon(mymodel, 'clearall'); mymodel.report('something'); expect(mymodel.clearall).tohavebeencalled(); reference: http://jasmine.github.io/2.0/introduction.html#section-spies you should test own code. subscribe function part of knockoutjs , doesn't need more testing.

java - How to load custom similarity class into Solr 4.4 -

i trying deploy custom similarity class solr 4.4 on cloudera cluster. here code: package org.apache.lucene.search.similarities; import org.apache.lucene.index.fieldinvertstate; import org.apache.lucene.search.similarities.defaultsimilarity; public class mynewsimilarityclass extends defaultsimilarity { @override public float idf(long docfreq, long numdocs) { return 1.0f; } } i found similar question: solr custom similarity , have additional concerns. should compile errors? or include solr jars buildpath? where should store created jar? $instancedir/lib ok? is solr restart required make solr "see" class? what changes should make in schema.xml? have added fieldtype: <similarity class="org.apache.lucene.search.similarities.mynewsimilarityclass" /> and changed globally other fields: <similarity class="solr.schemasimilarityfactory"/> when trying reindex collection, receiving following error: error: or