Posts

Showing posts from April, 2014

How can I fetch source code from synergy using Jenkins -

i have installed synergy plugin jenkins. i want fetch code synergy db. how can using jenkins? i have given details in scm section of jenkins db value, engine, username , password. well, stated in comments, reason behind following original issue error related path: cannot run program "ccm" (in directory "c:\program files\jenkins\jobs\test\workspace"): createprocess error=2, system cannot find file specified... for second issue i.e., cannot run program "c:\program files\ibm\rational\synergy\7.1\bin" (in directory "c:\program files\jenkins\jobs\test\workspace"): createprocess error=5, access denied it seems have not specified full path executable shown in above error message. hopefully, changing "c:\program files\ibm\rational\synergy\7.1\bin" to "c:\program files\ibm\rational\synergy\7.1\bin\executable_name.exe" should trick.

apache - Redirect HTTP to HTTPS using an .htaccess file -

i change ht-access file rewriterule ^index\.php$ - [l] rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule . /index.php [l] rewritecond %{server_port} !^443$ rewritecond %{https} !=on rewriterule ^.*$ https://%{server_name}%{request_uri} [r,l] when coming home page example: www.xyz.com redirect https://www.xyz.com/ my ploblem when load www.xyz.com/about not going https://www.xyz.com/about . showing www.xyz.com/about . if suggection change htaccess file work this. place https redirect @ beginning. [l] tells apache last directive, line rewriterule . /index.php [l] will last line used.

regex - Regular Expression for email to check repetitive characters -

i'm validating email address regular expression. test following conditions: minimum of 3 characters in name, symbol @, minimum 3 characters in first part of domain, dot,no more 3 repetitive characters i tried regular expression , it's working fine cases except last one. /^[a-za-z0-9._%+-]{3,}\@[a-za-z0-9.-]{3,}\.[a-za-z]{2,4}$/ it's not checking repetitive character(any character) after dot(.) not ok: test@test. ccccom , test@test.coooom ok : test@test.com don't know wrong last portion of re. any input appreciated. you can use following regex: ^(?!.*([a-za-z0-9])\1{3})[a-za-z0-9._%+-]{3,}\@[a-za-z0-9-]{3,}\.[a-za-z]{2,4}$ changes made: (?!.*([a-za-z0-9])\1{3}) - negative lookahead makes sure none of characters repeat more thrice in row. the rest of regex same is, except removal of . second character class. regex demo if want disallow repeated characters after last . , use following instead: ^[a-za-z0-9._%+-]{3,}\@[a-za-z0-9

performance - Mongodb query using $and operator does full scan while same query without doesn't -

i'm relatively new mongodb , i'm having trouble understanding why query $and operator seems full scan, while same query without doesn't. my document looks this {_id:"123456", labels : [{label:"beef", language:"en"}, {...}],...} i have compound index on label , language, however, explain shows different results depending on whether do db.mycollection.find({ "labels" : { "$elemmatch" : { "label" : "beef" , "$and" : [ { "lang" : "en"}]}}}).explain() { "cursor" : "complex plan", "n" : 4, "nscannedobjects" : 0, "nscanned" : 16701573, "nscannedobjectsallplans" : 0, "nscannedallplans" : 16701573, "nyields" : 130540, "nchunkskips" : 0, "millis" : 16283, "filterset" : false } or db.mycollection.find({ "labels" :

javascript - Code updates color but not the actual text? -

this chunk of code have updates color of text not actual text... var lastwordtyped; var ele = document.queryselector("#my_text"); //code //... lastwordtyped = capitalizefirstletterofkeyword(lastwordtyped); lastwordtyped = lastwordtyped.fontcolor("blue"); ele.innerhtml = lastwordtyped; function capitalizefirstletterofkeyword(keyword) { var word; word = keyword.charat(0).touppercase() + keyword.slice(1); return word; } when step through it, recognizing new string should doesnt update actual text new string, change color. can provide me reason why won't update it? you haven't declared lastwordtyped, capitalizefirstletterofkeyword() gets 'undefined' input. working demo here: http://jsfiddle.net/yc4mvm1n/1/ var lastwordtyped = "newword"; var ele = document.queryselector("#my_text"); lastwordtyped = capitalizefirstletterofkeyword(lastwordtyped); lastwordtyped = lastwordtyped.fontcolor

tfs2012 - Backlog and board pages in TFS 2012 -

currently using team foundation server 2012 (version 11.0.50727.1), have developers' team working backlog , board pages, fine. and have bunch of clients, not developers. give them sufficient access able see backlog , board pages. i'm understanding "limited" rights not enough. what permissions needed able that? plus, if need them create/edit/delete work items, licence need? any appreciated, thanks! to use agile planning features in tfs2012 (backlog management , boards) each person must licensed either visual studio test professional, premium or ultimate. if have cals people need ensure web access permissions set full, via admin panel. source: http://blogs.msdn.com/b/govdev/archive/2012/09/06/license-the-new-tfs-2012-agile-planning-boards.aspx

Grails - HQL Exception when comparing date field to today -

i have following hql query i'm running against h2 database: "select count(*) event e " + "e.org.id = :orgid , " + "e.deleted = :deleted , " + "e.startdate >= :startdate , " + "lower(e.name) :name " + "order startdate asc" it works fine startdate params except today. if startdate today, following exception: org.springframework.jdbc.uncategorizedsqlexception: hibernate operation: not execute query; uncategorized sqlexception sql [select count(*) col_0_0_ event event0_ event0_.org_id=? , event0_.deleted=? , event0_.start_date>=? , (lower(event0_.event_name) ?) order event0_.start_date asc]; sql state [90016]; error code [90016]; column "event0_.start_date" must in group list; sql statement: anyone have suggestions?

knockout.js - Knockout ViewModel is being updated after ajax, but my foreach is not getting trigged -

i have view model. person retrieved ajax call var vm = ko.mapping.fromjs(persons, {}); vm.hobbies = ko.observablearray(); // other vm objects after viewmodel loaded display page, want load part(hobbies) view model (working) // ...ajax call... success: function(results){ ko.utils.arrayforeach(results.hobbies, function(item) { vm.hobbies.push(item); }); debugger } // ...end ajax call... on debugger can see hobbies populated. i have view loaded in on page load <!--ko if: $data.hobbies--> <div> <ul class="fares-by-date-carousel" data-bind="foreach: hobbies()"> <li>2</li> </ul> </div> <!-- /ko --> at start portion not load (as expensive ajax call hasn't been called yet, fine) after vm.hobbies populated above html section still never displays. not sure missing the issue usage of: <!--

apache - Virtualhosts pointing to the first virtualhost directory -

i have problem in httpd.conf. all virtualhosts created webmin interface pointing same directory despite give specific directory each vh. directory pointing first vh(when change position of vh, it's first vh directory). thanks help. i don't know how webmin handles virtual hosts, apache needs namevirtualhost directive namevirtualhost *:80 you can add httpd.conf well. in ports.conf or in default virtual host (000-default)

maven - Documentum xCP - Failed to start webby at port 8888 -

i using xcpdesigner 2.1 in order build documentum xcp 2.1 application. seems uses maven eclipse m2e-webby plugin. unable start preview mode. nothing happens within ui of designer. in logs can find error [tworker-4] [internal.com.emc.xcp.builder.ui.util.previewstartjob:115] failed start webby @ port 8888 org.eclipse.core.runtime.coreexception: exception occurred executing command line. @ org.eclipse.debug.core.debugplugin.exec(debugplugin.java:842) @ org.eclipse.jdt.launching.abstractvmrunner.exec(abstractvmrunner.java:86) @ org.eclipse.jdt.internal.launching.standardvmrunner.run(standardvmrunner.java:323) @ org.sonatype.m2e.webby.internal.launch.webbylaunchdelegate.launchembedded(webbylaunchdelegate.java:310) @ org.sonatype.m2e.webby.internal.launch.webbylaunchdelegate.launch(webbylaunchdelegate.java:157) @ org.eclipse.debug.internal.core.launchconfiguration.launch(launchconfiguration.java:855) @ org.eclipse.debug.internal.core.launchconfiguration.lau

In shell for awk, can I have variable instead of file path? -

for awk, instead of file path can have variable?? arr=$(awk -v str=start '$2 ~ "^" str "[0-9]*" { print $2; exit; }' /filepath) note output in file path before , in variable "a". tried following: arr=$(awk -v str=start '$2 ~ "^" str "[0-9]*" { print $2; exit; }' ,$a) arr=$(awk -v var="a" str=start '$2 ~ "^" str "[0-9]*" { print $2; exit; }' ,$a) doesn't work. previous post more details: visit using awk find string in file ! any appreciated. this worked, anubhava use: arr=$(echo "$a" | awk -v str=start '$2 ~ "^" str "[0-9]*" { print $2; exit; }')

javascript - Three.js raycasting and placing object above plane does not work -

i've created plane based on heightmap intersecting (raycasting) not work. i'm trying place object above triangle hover fails edit: when quote out height (pgeo.vertices[i].z = heightmap[i] * 5;), seems work sometimes . highlight shows not , depends on camera view also. if zoom in/out triangle disappears/appears again etc.. i've based jsfiddle on voxelpainter example: http://jsfiddle.net/waf6u7xp/1/ however i'm not sure if there better way calculate triangle hover? maybe projection based on heightmap? ideas? this code executes raycast: function ondocumentmousemove( event ) { event.preventdefault(); mouse2d.x = ( event.clientx / window.innerwidth ) * 2 - 1; mouse2d.y = - ( event.clienty / window.innerheight ) * 2 + 1; var vector = new three.vector3( mouse2d.x, mouse2d.y, camera.near ); projector.unprojectvector( vector, camera ); var raycaster = new three.raycaster( camera.position, vector.sub( camera.position ).normalize() );

ruby on rails - Even Empty application does not execute in Heroku app -

i tried search types of answers didnt . first tried solve . sqlite -v 1.3.9 probelm adding group:development, :test gem 'sqlite3' end group :production, :staging gem 'pg' gem 'rails_12factor' end and removed pg problem installing -v 1.17.0.1 . again got warnings install rails factor can see in last config file above. still page not exist in heroku page . empty application following michael hartls chapter 1. im new dont find perfect place find required code . i cant attach log here :/. edit : log file below http://pastebin.com/cntsmyxk you haven't set root route yet. actioncontroller::routingerror (no route matches [get] "/"): in tutorial following, mentioned application won't work on heroku @ point of time. application should work once add root route application @ later stages in tutorial. see: https://www.railstutorial.org/book/beginning#uid98 if want make work now, add root route follows: add co

Error importing XML file with accent mark in Android Eclipse -

i have many .xml files import "value" folder in android project (eclipse), , these files contain string resources (´) accent mark (spanish accent). when import these files, characters accent mark change character (�), original files fine. you should migrate android studio. if prefer keep using eclipse, make sure save string resources utf-8 encoding. common when trying importing projects computer. greetings!

ruby - gsub same pattern from a string -

i have big problems figuring out how regex works. want text: this example\e[213] text\e[123] demonstration to become this: this example text demonstration. so means want remove strings begin \e[ , end ] cant find proper regex this. current regex looks this: /.*?(\\e\[.*\])?.*/ig but dont work. appreciate every help. you need this: txt.gsub(/\\e\[[^\]]*\]/i, "") there no need match before or after .* the second problem use .* describe content between brackets. since * quantifier default greedy, match until last closing bracket in same line. to prevent behaviour way use negated character class in place of dot excludes closing square brackets [^\]] . in way keep advantage of using greedy quantifier.

javascript - How to rotate HTML5 page on mobile rotation -

hi i'm trying rotate html page on mobile have div take width , height of screen , inside div image when page re-sized image re-sized (in responsive way) css: body, html { height: 100%; } body { background-color: #1e4922; } div#cont { height: 100%; } img#menu { display: block; margin-left: auto; margin-right: auto; height: 100%; } and html: <!doctype html> <html> <head> <title>card game</title> <link rel="stylesheet" type="text/css" href="css/style.css"> </head> <body> <div id="cont"> <img id="menu" src="static/images/2%20main%20menu.jpg"/> </div> </body> </html> and result when re-size page image re-sized when open page in mobile need display in landscape view try this: <link rel="stylesheet" type="text/css" media="screen , (max-device-width: 768p

itunesconnect - Added to iTunes connect, does this mean I have an iOS Developer license? -

i'm new ios development, i've been asked write automated tests iphone app on physical device using appium. read need ios developer license this, asked company 1 , added me itunes connect. mean have developer license? when log ios dev center it's asking if want join ios developer program , can't see place create provisioning profile, i'm thinking still need license. yes long keep name in group, company has enterprise account. here description. https://developer.apple.com/programs/ios/enterprise/

jquery - DataTables : filtering different types of filtering on individual columns -

i using datatables display , filter data in .jsp page , works great. have table 6 columns , each set-up drop-down list filter tables content. this nice , 1 of columns 'description' column , nice filter based on text input , individual column. is possible have multiple filter types on table? below code use currently. i've tried searching example of no success. advice appreciated! $("#example tfoot td.ex-filter").each( function ( ) { var select = $('<select><option value=""></option></select>') .appendto( $(this).empty() ) .on( 'change', function () { var val = $(this).val(); table.column( ) .search( val ? '^'+$(this).val()+'$' : val, true, false ) .draw(); } ); table.column( ).data().unique().sort().each( function ( d, j ) { select.append( '<option value="' + d + '">' + d + '</option&

php - Use an access token provided by Google APIs for a long time -

i created app uses google analytics api. however, i've got following question: when i'm asking access token i'm getting access token expires after 3600 seconds. got refresh token can use generate more access tokens later on. do need use refresh token generate working access token every hour or there way have user authenticate once , use same code without going through expiration trouble? i want have cronjob, , while know, it's easy use refresh token obtain new one, i'm still asking if it's somehow possible have access token lasts forever ? otherwise i'll refresh token when needed. there middle path: can request access token new on each call rather use refresh token. that simplifies things can have 1 function access token , use within cron job. eliminates needing store refresh otken between cron executions.

JQuery Autocomplete & Classic ASP -

i'm frustrated heck inexplicable! code works: <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>autocomplete demo</title> <link rel="stylesheet" href="//code.jquery.com/ui/1.11.1/themes/smoothness/jquery-ui.css"> <script src="//code.jquery.com/jquery-1.10.2.js"></script> <script src="//code.jquery.com/ui/1.11.1/jquery-ui.js"></script> </head> <body> <label for="autocomplete">select programming language: </label> <input id="autocomplete"> <script> $( "#autocomplete" ).autocomplete({ source: [ "c++", "java", "php", "coldfusion", "javascript", "asp", "ruby" ] }); </script> </body> </html> but when place necessary code in page, doesn't work!! i've ensured jqu

java - How to setup basic authentication in Websphere 8.5 console? -

how setup basic authentication in websphere 8.5 console? i've setup basic authentication on tomcat. my web.xml looks - <security-constraint> <web-resource-collection> <web-resource-name>my manager</web-resource-name> <url-pattern>/rest/logintopropmanager</url-pattern> <http-method>get</http-method> </web-resource-collection> <auth-constraint> <description>let administrator login</description> <role-name>propertymanageradmin</role-name> </auth-constraint> </security-constraint> <security-role> <role-name>propertymanageradmin</role-name> </security-role> <login-config> <auth-method>basic</auth-method> <realm-name>admin</realm-name> </login-config> in tomcat, i've following configuration - <role rolename="propertymanageradmin"/> <u

sharepoint 2013 - Any way to hide the "New App for Office" warning for on-premise apps? -

Image
i created first app office, , talked deploying our on-premise sharepoint app catalog. there way, in sharepoint 2013, hide/bypass security dialog people visiting page first time? here's dialog box i'm talking about, there no way disable dialog; end user must click "start" in order trust app. dialog not reappear once user has trusted app first time.

iphone - Custom UISearchBar in navigationItem ios7 -

i have customized uisearchbar want display in self.navigationitem.titleview. have no problem getting in there , looking way want think wrong how connect uisearchdisplaycontroller. here uisearchbar , uisearchdisplaycontroller in viewdidload: searchbar = [[uisearchbar alloc] initwithframe:cgrectmake(0.0,0.0,200.0, 22.0)]; searchbar.barstyle = uisearchbarstyledefault; searchbar.showscancelbutton = no; searchbar.placeholder = @"search"; searchbar.delegate = self; self.navigationitem.titleview = searchbar; searchdisplaycontroller = [[uisearchdisplaycontroller alloc] initwithsearchbar:searchbar contentscontroller:self]; searchdisplaycontroller.delegate = self; searchdisplaycontroller.searchresultsdelegate = self; searchdisplaycontroller.searchresultsdatasource = self; at point search function not working. if add [searchdisplaycontroller setdisplayssearchbarinnavigationbar:yes]; search function works messes style i had added searchbar . edit: additional information:

xaml - Silverlight progressbar animation did not work -

please me silverlight code, why progress bar never moves. in designer progress bar looks fine in action never moves. don't need binding of % of process connected progress. need move forward , bar forever. without code behind ofc. help! <controls:childwindow x:class="progressbardialog" .... .... minwidth="305" borderthickness="0" title="busyindicatordialog"> <controls:childwindow.resources> <resourcedictionary> <lineargradientbrush x:key="progressbarindicatoranimatedfill" startpoint="0,0" endpoint="1,0"> <lineargradientbrush.gradientstops> <gradientstop color="#00ffffff" offset="0.0" /> <gradientstop color="#80ffffff" offset="0.6" /> <gradientstop color="#ffffffff" offset

c# 3.0 - rdlc report page header field values not displaying when the sub report page breaks happens in body section -

i got field values of report header section using "=reportitems!txtbox_body1.value" report body section binding through dataset value. , have subreport in report body. problem page header values comming in first page, not in second page when page break happens sub-report. please advise if has solution sample coding. thanks,

ruby - Looping HTML5 video with Rails and HAML video_tag -

this question has answer here: play infinitely looping video on-load in html5 1 answer i'm using rails video_tag render video so: = video_tag("smr_video.mp4", :controls => false, :autobuffer => true, :autoplay => true, :loop => true, :id => "hero-video") this results in following, video doesn't loop: <video autobuffer="autobuffer" autoplay="autoplay" id="hero-video" loop="loop" src="/assets/smr_video.mp4"></video> where going wrong here? thanks it looks can use <video loop> . i'm not sure how generate haml, if works in html closer finding problem. https://stackoverflow.com/a/10415231/4018167 if not work, play page in different browsers. if using old browser, might work depricated <video loop='true'>

How to Compress/Decompress payload in Mule and get back original payload -

i doing sort of poc mule gzip compressor , de-compressor.. mule flow following <flow name="gzipcompress" doc:name="gzipflow1"> <file:inbound-endpoint path="e:\backup\test" responsetimeout="10000" doc:name="file"> <file:filename-regex-filter pattern="anirban.doc" casesensitive="false"/> </file:inbound-endpoint> <string-to-byte-array-transformer doc:name="string byte array"/> <gzip-compress-transformer/> <file:outbound-endpoint path="e:\backup\test\ss" responsetimeout="10000" doc:name="file"/> </flow> <flow name="gzipuncompress" doc:name="gzipflow2"> <file:inbound-endpoint path="e:\backup\test\ss" responsetimeout="10000" doc:name="file"> <file:filename-regex-filter pattern="anirban.doc" casesensitive="false"/&g

java - OpenCV + Android + Vehicle number Plate Recognition -

Image
i'm developing android app detect vehicle number plate. did image processing findcontours level of image. need convert following c++ code opencv based android java. this original image this after otsu thresholding image this andoid+opencv code (working 100%) imageview imgview = (imageview) findviewbyid(r.id.imageview1); bitmap bmp = bitmapfactory.decoderesource(getresources(),car); //first convert bitmap mat mat imagematin = new mat ( bmp.getheight(), bmp.getwidth(), cvtype.cv_8u, new scalar(4)); mat imagematout = new mat ( bmp.getheight(), bmp.getwidth(), cvtype.cv_8u, new scalar(4)); mat imagematbk = new mat ( bmp.getheight(), bmp.getwidth(), cvtype.cv_8u, new scalar(4)); mat imagemattophat = new mat ( bmp.getheight(), bmp.getwidth(), cvtype.cv_8u, new scalar(4)); mat temp = new mat ( bmp.getheight(), bmp.getwidth(), cvtype.cv_8u, new scalar(4)); bitmap mybitmap32 = bmp.copy(bitmap.config.argb_8888, true); utils.bitmaptomat(mybitmap32, imagematin); //c

javascript - Rendering Spring ModelAndView Object with Thymeleaf -

i have controller : @autowired servletcontext servletcontext; public modelandview handlelogin(locale locale, model viewmodel, httpservletrequest request) throws exception { [...] modelandview scheduler = new modelandview("scheduler"); scheduler.addobject("body", schedulercreator.getscheduler().render()); return scheduler; } the render() function returns string html/css/javascript, should place on page html. i attempted placing in thymeleaf template : <html xmlns:th="http://www.thymeleaf.org"> <head th:include="layout :: htmlhead" th:with="title='doctorscheduler'"></head> <body> <div th:replace="layout :: navbar">(navbar)</div> <div th:text="${body}" id="scheduler"></div> <div th:include="layout :: footer"

powershell - Errors in listing AD groups for AD PCs -

i writing script work , trying determine why code showing errors. new coding , want understand wrong. the errors tag .... pc listings in .txt file. ex: get-content : cannot find path 'f:\tag 77909' because not exist. confusion when write-host after .replace code prints correctly ex:you cannot call method on null-valued expression. + $notags =$pc.replace <<<< ("tag ", "pc") + categoryinfo : invalidoperation: (replace:string) [], runtimeex ception + fullyqualifiederrorid : invokemethodonnull last error prints out last pc.... id in .txt file listing??? unsure why given have foreach loop **my code far:** import-module activedirectory $compimports = get-content "c:\temp\temp\input.txt" $groupexport = "c:\temp\temp\output.txt" clear-content $groupexport $header = "pc name" + "|" + "group name" + "|" + "group description" #write header $heade

git - Appengine (Python) "Push to Deploy" app.yaml Location -

i have app following file structure app ├── src │   ├── app.yaml │ ├── {other} │ ├── {.py source} │ └── {files} ├── {{other}} ├── {{meta}} └── {{data}} before "push deploy", deploy app cd app/; appcfg.py --oauth2 update src i set "push deploy" seems requires app.cfg @ root directory this. app ├── app.yaml ├── {other} ├── {.py source} ├── {files} ├── {{other}} ├── {{meta}} └── {{data}} is there way use "push deploy" without moving {other .py source files} root directory? i'm ok moving app.yaml file root. however, change in app.cfg required? this app.cfg file application: myapp version: v1 runtime: python27 api_version: 1 threadsafe: true handlers: - url: / script: main.application - url: /tasks/.* script: tasks.update.app login: admin - url: /favicon.ico static_files: resources/images/static/favicon.ico upload: resources/images/static/favicon.ico - url: /redirect/.* script: redirect.app you shou

iis - Installing UCC SSL on ISS server for multiple domain hosted on multiple ip on Amazon EC2 -

i have searched everywhere have not got problem solved. if have solution offer please offer. here problem: i have ucc ssl certificate have bought godaddy (which supposedly can used on 5 different domains). have generated csr server www.example.com , in subject alternative name (san) have mentioned api.example.com, test.example.com, testapi.example.com. got certificate reflects other sites names in san. my www.example.com on let's ip 1 api.example.com on ip 2 and test.example.com, testapi.example.com both on ip 3 all sites on windows server iis 7 on amazon ec2 i have installed certificate on main site (www.example.com) server on ip 1 , working fine, how can make work other sites.

javascript - How to annotate anonymous object with optional property in JSDoc -

i have javascript class takes 1 argument of type object defined set of properties , closure compiler happy when annotate like: @constructor @param {{ subview:baseview, el:(jquery|element), title:string }} options var myview = function(options){ } i make title key optional , pass title value instances of class , implement fallback behavior when key not present, annotated class with: @constructor @param {{ subview:baseview, el:(jquery|element), title:string= }} options var myview = function(options){ } and closure compiler complaining: warning - bad type annotation. expected closing } i've checked annotating javascript closure compiler , see no single line describing such use case. @param {{ subview:baseview, el:(jquery|element), title:(string|undefined) }} options

sql server - Outputting column name / values as key value pairs in SQL view field -

i have database multiple tables share several common fields (id (guid), title, parentid(guid)), of them can have table specific fields. is possible create view unions on these tables , outputs forth column json representation of key value pairs representing column name , value of other fields other 3 common ones? value of field used web application. doesn't have json, xml, comma separated, should represent fieldname / value pairing of 1 or more fields not common between unioned tables. to clarify. take following 2 table schemas table1 id title parentid abooleanfield anintegerfield 1 parent null true 50 2 child 1 false 100 table2 id title parentid adatefield 3 anotherparent null 10/12/2014 the view output id title parentid uncommon 1 parent null abooleanfield:true,anintegerfield:50 2 child 1 abooleanfield:false,anintegerf

How do I send mail on Google App Engine from user that can't also view the project? -

how can send mail using google's mail api without adding email address project? right google says need add them developer don't want user see project. example contact form email coming sales don't want sales find way google dev console , see our costs. you use services sendgrid give lot more features gae's mail api. see more detailed answer here: send email on google app engine custom domain

sql server 2008 r2 - return modified value from a database table -

i in situation need fetch data table , condition need change data. exp. if column has value 0 return '-' else return actual value here example declare @aa int=0 declare @ww nvarchar='-1' select @aa select case when @aa=0 cast(@ww nvarchar) when @aa>0 @aa end aa but return 0 if value 0. please me. try this declare @aa int=0 declare @ww nvarchar(10) = '-1' select case @aa when 0 @ww else @aa end aa

android - Image of item changes when scroll up and down listview -

i have used custom base adapter listview. each row contains progressbar, imagebutton , 2 textview. have made audio player each row play button (which changes image pause on clicking) , progressbar (which starts showing progress button clicks). problem arise when scroll list: 1) when scroll down , back, image of imagebutton returns play , progressbar clears progress although song still playing. 2) other items of listview starts showing pause images on imagebutton , progressbar shows progress of song being played(i think after every 6th row 7th 1 that). please me. here custom adapter: public class audioadapter extends baseadapter { context context; uri[] uris; layoutinflater layout; imagebutton previousbutton = null; progressbar previousprogressbar = null; static private handler myhandler = new handler(); public audioadapter(context context, int resource, uri[] uris) { // todo auto-generated constructor stub this.context = context; this.uris = uris; } class audi

xml - Attribute is missing the android namespace prefix, can't find error -

<linearlayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#ffcccccc" android:orientation="vertical" tools:context=".maindrawingactivity" > </linearlayout> i can't figure out what's missing... please? it's linearlayout, not linearlayout. capitalize l.

html - Keep child position the same after parent moved with CSS transform -

is possible take child outside of flow of transformed parent? simple example below: html: <div class="parent"> <div class="child"></div> </div> <a href="#" id="button">move parent</a> css: .parent { background: red; height: 200px; position: relative; transition: 0.5s ease-in-out; width: 200px; } .child { background: black; height: 100px; left: 0; top: 0; position: absolute; width: 100px; } .moved { transform: translatex(100px); } javascript: $('#button').on('click', function(e) { e.preventdefault(); console.log('test'); $('.parent').toggleclass('moved'); }); jsfiddle: http://jsfiddle.net/ous3s873/1/ very simple stuff. basically, parent (red box) being moved 100px right using css transform. desired output child (black box) stay in same place parent moves behind it. one option add

javascript - event object not defined only with Firefox (IE and Chrome works) -

this question has answer here: event.target not working on firefox 2 answers <a class="lnk" href="#" onclick="showitem();"> <span data-id="27">test</span> </a> function showitem() { var itid = event.target.dataset.id; alert(itid); } if try this jsfiddle code can see ie (11) , chrome event object correctly evaluated, firefox (32.0) error (referenceerror : event not defined) it's bug of firefox or different event object lifecycle in ie , chrome ? since in ie , chrome it's working think it's problem. workaround ? p.s: in jsfiddle, firefox, code selection still having problem (after run cannot select code. you should pass event argument function: <a class="lnk" href="#" onclick="showitem(event);"> <span data-id="27&qu

powershell - Trouble with Remote Sessions and Exchange 2007 Servers -

anyway, i'm working on powershell scripts work, , i'm stuck on thought simple. basically, there tasks need perform on our exchange server great script. spent time writing script connect me our server (on same domain), , run invoke-command few test commands. once test commands running, can start writing meat of script. for however, i'm stuck getting get-mailbox return information, me trying test things working. see 3 lines of test code here: $mainsession = new-pssession -computername theservername invoke-command -session $mainsession -scriptblock {add-pssnapin microsoft.exchange.management.powershell.admin} invoke-command -session $mainsession -scriptblock {get-mailbox} i "psremotingtransportexception" exception "job_failure" error. be? know snap-in , get-mailbox commands work when log-in server via remote-desktop , test them out. assuming can get-mailbox function, perform more complicated tasks want put in script. exchange server i'm

c# - Object locks instance member to synchronize access to it -

this question has answer here: why lock(this) {…} bad? 14 answers is neccessary create placeholder lock object thread-safety (and correctness) or sufficient lock on resource (assuming no other code need it). locking system.random private static readonly random rnd = new random(); public static int rand(int min, int max) { lock(rnd) { return rnd.next(min, max); } } using separate placeholder/dummy lock object private static readonly random rnd = new random(); private static readonly object rndlock = new object() public static int rand(int min, int max) { lock(rndlock) { return rnd.next(min, max); } } this may seem trivial i'm concerned if first code-block susceptible deadlock or other issues the reason avoid locking object itself, avoid situation lock taken inadvertently, if "object itself" publicly expo

Show dialog or popup after database insertion using jQuery Mobile -

i'm using webmatrix jquery mobile develop simple mobile web page involves database operations. 1 of requirements show alert-like dialog inform users how operation goes. i've done researches, couldn't find working solution when comes database operations. followings best can do, there seems problem though. the data insertion successful, goes redirect in catch block, ignoring 1 in try block. this not practice. can give me direction implement more efficiently? thanks in advance. default.cshtml @{ layout = "~/_layout.cshtml"; page.name = "test adding records"; if (ispost) { string strfirst, strsecond; strfirst = request.form["first"]; strsecond = request.form["second"]; var database = database.open("testdb"); string strsql = "insert testtable " + "(firstcol, secondcol) " + "values(@0, @1);"; tr

mvn verify dowloads jars from artifactory but Eclipse Maven -> Update project does not work -

when checkout project git repository, error saying non-resolvable parent pom. manages checkout src files not download maven dependencies , other jar files , not produce valid maven project. "cannot resolved type" errors in bunch of files. error see in .lastupdated file on parent project in .m2 repository . "sun.security.validator.validatorexception: pkix path building failed: sun.security.provider.certpath.suncertpathbuilderexception: unable find valid certification path requested target" but if go , run mvn verify command line, downloads jar files. , when maven update project eclipse, errors gone. the artifactory has self-signed ssl certificate , have followed steps this. i have set maven_opts truststore location , password. what don't why connecting commandline , not eclipse. thanks..

java - Unused String Variable -

import java.util.scanner; public class main { public static void main(string[] args) { scanner input = new scanner(system.in); system.out.println("enter name of favorite insect: "); string userstring = input.next(); string lyric = ""; string endlyric = ""; string onethree = "i'm " +lyric+ "my baby " +userstring; string 2 = "won't mommy proud of me"; int count = 5; while (count != 0) { if (count == 5) { lyric = "bringing home "; endlyric = "ouch!! stung me!!"; count = count - 1; } else if (count == 4) { lyric = "squishin' "; endlyric = "ick!! feel sick!!"; count = count - 1; } else if (count == 3) { lyric = "barfin "; endlyric = "oh!! mess!!"; count = count -

regex - Caseless matching using views in Cloudant -

i have database of documents have following data structure: { "_id": "sampleid", "_rev": "sample-rev", "added": "2014-09-09 01:05:32", "cached": 1, "subject": "sample topic", "mode": "<samplemode>", "protected": 0, "added_by": "myname", "factoid": "sample factoid" } and have following view: function(doc) { if (doc.subject && doc.factoid && doc.mode){ emit(doc.subject, doc.factoid); } } i need retrieve docs "subject" matches provided key. non case sensitive. post give me of matches want, if case matches. https://<username>.cloudant.com/<db>/_design/<designdoc>/_view/<view>?include_docs=true { "keys" : ["<subject>"] } i have tried search indexes without success. api mentions rege

javascript - How to implement WS-Federation using Thinktecture.IdentityServer.v2 with Node.js? -

i'm hoping can point me in right direction. we have thinktecture.identityserver.v2 running , working beutifully out asp.net apps. i'm working on app node.js. no microsoft code @ all. can give me links me started? there tutorials out there haven't been able find? i found https://www.npmjs.org/package/node-wsfed i'm not sure if need. (or more point how need) ok have found solution in case else ends here just need use http://passportjs.org/ , use passport-wsfed-saml2 stategy

data modeling - Why use lookup tables in a database -

this theoretical question ask due request has come way recently. own support of master operational data store maintains set of data tables (with master data), along set of lookup tables (which contain list of reference codes along descriptions). there has been push downstream applications unite 2 structures (data , lookup values) logically in presentation layer easier them find out if there have been updates in overall data. while request understandable, first thought should implemented @ interface level rather @ source. combining 2 tables logically (last_update_date) @ ods level similar de-normalization of data , seems contrary idea of keeping lookups , data separate. said, cannot think of reason of why should not done @ ods level apart fact not "seem" right... have thoughts around why such approach should or should not followed? i listing example here simplicity's sake. data table id name emp_typ_cd last_update_date 1 x e1 2014-08-01 2

dart - Add a property to an object (or at least similar outcome) -

first, context of i'm doing. running httpserver handling httprequests. httpserver.bind(address, port).then((httpserver server) { listensubscription = server.listen(onrequest); }); void onrequest(httprequest request) { //handle request here } i'd add logging this, , due asynchronous nature of all, want add identifying marker requests (so can match request receipts responses, fer example). code inside of onrequest() calls bunch of other functions different things (handle vs post requests, etc.), generating id @ top cumbersome solution i'd have pass around through other function calls. am, however, passing around httprequest object, thought nice throw id field on it, in javascript, except dart doesn't work way. thoughts went subclassing httprequest class, converting httprequest object onrequest() method receives seemed more trouble , overhead needs required. so ask, there idiomatic dart way attach data existing object? i

How to retrieve reference to AWS::S3::MultipartUpload with ruby -

i have rails app , in controller action able create multipart upload so: def create s3 = aws::s3.new bucket = s3.buckets["my_bucket"] key = "some_new_file_name.ext" obj = bucket.objects[key] mpu = obj.multipart_upload render json: { :id => mpu.id } end so client has multipart upload id , can upload parts aws browser. wish create action assemble parts once done uploading. like: def assemble s3 = aws::s3.new bucket = s3.buckets["my_bucket"] key = params['key'] bucket.objects[key].multipart_upload.complete render json: { :status => "all good" } end this isn't working though. how retrieve reference multipartupload object or create new 1 key or id can call "complete" method on it? insight appreciated i found method in documentation client class , got work follows: client = aws::s3::client.new # reassemble partslist partslist = [] param

php loop through array -

i trying values array got stuck. here how array looks: array(2) { [0]=> array(2) { ["attribute_code"]=> string(12) "manufacturer" ["attribute_value"]=> string(3) "205" } [1]=> array(2) { ["attribute_code"]=> string(10) "silhouette" ["attribute_value"]=> array(1) { [0]=> string(3) "169" } } } so have attribute_values, , insert new array, in example need 205 , 169. problem attribute_value can array or string. have right gets me first value - 205. foreach ($array $k => $v) { $vmine[] = $v['attribute_value']; } what missing here? thank you! i suggest use array_map instead of for loop . can try this.. $vmine = array_map(function($v) { return is_array($v['attribute_value']) ? current($v['attribute_value']) : $v['attribute_value']; }, $arr); print '<pre>'

java - a coding about reflection has a error "No enclosing instance of type student is accessible" -

here coding reflection: public class student { private string name; public student(){ this.name = "elodie"; } public string getname(){return name;} class teacher { private string name; public teacher(){ this.name = "lady lee"; } public string getname() { return name; } } public static class reflect{ public static void main(string[] args) {student student = new student(); teacher teacher = new teacher(); system.out.println(student.getclass().getname() + " " + student.getname()); system.out.println(teacher.getclass().getname() + " " + teacher.getname()); } } } i got 1 error message "no enclosing instance of type student accessible. must qualify allocation enclosing instance of type student (e.g. x.new a() x instance of student)." at teacher teacher = new teacher(); since want coding result like: student elodie teacher lady lee so cannot write student.new teacher()