Posts

Showing posts from September, 2011

Python Pandas Identify Duplicated rows with Additional Column -

i have following dataframe : df out[23]: pplnum roomnum value 0 1 0 265 1 1 12 170 2 2 0 297 3 2 12 85 4 2 0 41 5 2 12 144 generally pplnum , roomnum generated this, , follow format: for ppl in [1,2,2]: room in [0, 12]: print(ppl, room) 1 0 1 12 2 0 2 12 2 0 2 12 but achieve mark duplicates combinations of pplnum , roomnum can know combinationss first occurrence, second occurrence , on... expected output dataframe this: pplnum roomnum value c 0 1 0 265 1 1 1 12 170 1 2 2 0 297 1 3 2 12 85 1 4 2 0 41 2 5 2 12 144 2 you can using groupby() cumcount() function: in [102]: df['c'] = df.groupby(['pplnum','roomnum']).cumcount() + 1 in [103]: df out[103]: pplnum roomnum value c 0 1 0 265 1 1 ...

java - Count vowels in a word -

i need find count of vowels in word. however, when compare letters in word whether vowel or not, for example, 1 below, if( word[i] == 'a' || word[i] == 'e' || word[i] == 'i' || word[i] == 'u' ...... ) //the rest omitted the if statement gets long. there way compare them regex or regex-like comparison , give me number of vowel occurrences in string? if want find vowels string line = "ahis order placed qt3000! ok?"; string pattern = "(?i)[aeiou]"; pattern r = pattern.compile(pattern); matcher m = r.matcher(line); while (m.find()) { system.out.println(m.group(0) ); } if want find number of times occur can use replace like string line = "ahis order placed qt3000! ok?"; string pattern = "(?i)[aeiou]"; system.out.println(line.replaceall(pattern, "").length()); note :- (?i) inline modifier indicates whatever pattern follows case insensitive

What does "$>" represent in Ruby documentation? -

as in: def pp.pp(obj, out=$>, width=79) ... this pp method of pp class: http://www.ruby-doc.org/stdlib-2.0/libdoc/pp/rdoc/pp.html#method-c-pp $> io destination kernel#print (and therefore puts ), , other output methods. defaults $stdout, can changed change behavior of print , printf , puts , etc.

c# - Windows application developed using VS2012 is not running in windows XP SP3 -

i have developed windows application in visual studio 2012 .net framework 4. when tried install application in windows xp sp3 shows .exe not valid win32 application. please me solve. this 1 of two, or both, issues. first, ensure have .net framework installed on machine. second, make sure application compiled targeting x86 platform. likely, the second issue.

java - NoSuchBeanDefinitionException: No qualifying bean of type [Repository] found for dependency: expected at least 1 bean which qualifies as autowire -

i found similar issues explained many web portals. guess unique situation. getting error in spring mvc app. org.springframework.beans.factory.unsatisfieddependencyexception: error creating bean name 'testcontroller' defined in file [c:\program files (x86)\sts-bundle\pivotal-tc-server-developer-3.1.2.release\base-instance\wtpwebapps\expt1\web-inf\classes\com\expt\controller\testcontroller.class]: unsatisfied dependency expressed through constructor argument index 0 of type [com.expt.repositories.categoryrepository]: no qualifying bean of type [com.expt.repositories.categoryrepository] found dependency: expected @ least 1 bean qualifies autowire candidate dependency. dependency annotations: {}; nested exception org.springframework.beans.factory.nosuchbeandefinitionexception: no qualifying bean of type [com.expt.repositories.categoryrepository] found dependency: expected @ least 1 bean qualifies autowire candidate dependency. dependency annotations: {} org.springframewor...

asp.net mvc 4 - Delete method with array type as parameter showing null value -

i calling web-api method delete array type parameter, showing value null . why? i passing data : data: "arrmenuid"+ jsarraymenuid, function performalldeletemenu() { if (confirm('are sure want delete menu?')) { var jsarraymenuid = new array(); $("input:checked").each(function () { //console.log($(this).val()); //works fine jsarraymenuid.push($(this).val()); }); alert(jsarraymenuid); $.ajax({ url: '/api/menuwebapi/deleteallmenu/', type: 'delete', contenttype: 'application/json; charset=utf-8', data: "arrmenuid"+ jsarraymenuid, success: function (data) { if (data.success == true) { //getmenulist(); } }, error: function (xhr, textstatus, errorthrown) { ...

java - Why doesn't BufferedReader buffer the input? -

i ran following example: public static void main(string[] args) throws ioexception{ reader reader = new bufferedreader(new inputstreamreader(system.in)); int character; do{ character = reader.read(); system.out.println(character); } while(character != '\n'); } and confused behaviour. thought default buffer size of bufferedreader large enough hold more 1 character. but, when entered a__new_line__ it causes character printed along new line. why? expected buffer not full, therefore there should no output. bufferedreader buffers data when possible. in case there no data buffer. so, returns enter immediately. bufferedreader useful when used large streams such file ( fileinputstream ) , in cases read method returns 1 character while behind scene, bufferedreader reads more data (depends on buffer size) related inputstream , caches improve performance.

android - RecyclerView Adapter Lint Error do not treat position as fixed -

i have surf type of error didn't can in case. i getting following lint error. do not treat position fixed; use , call holder.getadapterposition() later. recyclerview not call onbindviewholder again when position of item changes in data set unless item invalidated or new position cannot determined. reason, should use position parameter while acquiring related data item inside method, , should not keep copy of it. if need position of item later on (e.g. in click listener), use getadapterposition() have updated adapter position. my recyclerview adapter: /** * right content adapter */ public class rightcontentadapter extends recyclerview.adapter<rightcontentadapter.viewholder> { public final arraylist<idnamepair> mvalues; public activity context; private int pos; public rightcontentadapter(activity context, arraylist<idnamepair> items) { mvalues = ite...

haskell - Assigning Asc/ Desc to variable later causes a compiler error -

i getting compiler error when try have like: getorder :: text -> selectopt event getorder text = case text of "id" -> direction eventid "title" -> direction eventtitle direction = if text == "id" desc else asc if change line, work: where direction = asc same if change case - work: case text of "id" -> desc eventid "title" -> asc eventtitle so question why assigning asc , desc cause compiler error? make direction function , move top-level: direction text = if text == "id" desc else asc see updown function in answer: https://stackoverflow.com/a/37380039/866915 update in order direction eventid make sense, direction has have type: direction :: entityfield event int in order direction eventtitle make sense has have type: direction :: entityfield event string so if direction defined in clause this where direction = if ... asc...

respect __all__ variable with jedi-vim -

is possible configure jedi-vim respect __all__ variable inside module (like __init__.py )? so, when use autocomplete on imported package, inside not listed in __all__ , , not special variable/method, hidden? does not work , not work in near future. reason: i'm author. it's quite complicated understand __all__ , because can generated python code. i accept pull request, if works numpy.

html - Link doesn't work when href attribute value is url encoded -

why link doesn't work when href attribute value url encoded? are not supposed encode it? same behavior observed in chrome & ff works <!doctype html> <html> <body> <p>sweet fruit: <a href="http://google.com/search?q=banana">banana</a></p> </body> </html> doesn't work <!doctype html> <html> <body> <p>sweet fruit<a href="http%3a%2f%2fgoogle.com%2fsearch%3fq%3dbanana">banana</a></p> </body> </html> its protected link. how encode works http://www.w3schools.com/tags/ref_urlencode.asp this link u showed first 1 decoded , second 1 encoded . http://google.com/search?q=banana http%3a%2f%2fgoogle.com%2fsearch%3fq%3dbanana lets take look in case "/" becomes %2f, "?" %3f , "=" %3d its protection , link can not used. dns cant read it. , see first link clickable , second 1 not.

node.js - Understanding Kafka Partition Metadata -

i usign kafka-node within nodejs application create topics via loadmetadatafortopics option. want application dynamically understand number of partitions avaiable can distribute messages across partitions. in single node kafka instance method creating topics , returning metadata this: "step1_channelout": { "0": { "topic": "step1_channelout", "partition": 0, "leader": 1, "replicas": [ 1 ], "isr": [ 1 ] } }, however in 3 node cluster, method creates more entries: { "0": { "topic": "step1_channelout", "partition": 0, "leader": 3, "replicas": [ 3, 2, 1 ], "isr": [ 3, 2, 1 ] }, "1": { "topic": ...

I run gclient sync and build chromium source ,and get a error ,follow -

Image
'['d:\download\depot_tools\python276_bin\python.exe', 'd:\download\depot_tools\win_toolchain\get_toolchain_if_necessary.py', '--output-json', 'd:\download\chromium\src\build\win_toolchain.json', '95ddda401ec5678f15eeed01d2bee08fcbc5ee97']' returned non-zero exit status 1 error: command 'd:\download\depot_tools\python276_bin\python.exe src/build/landmines.py' returned non-zero exit status 1 in d:\download\chromium i had same problem. in case, gl clien please check cmd mode (it should admin mode).

python - Create file from bytes stored as string -

i have use case getting blob database have convert binary file. python stores string although bytes. when try write binary type error, str not accepted. i wrote sample code reproduce variable looks like. have seen sample code in other languages task rather easy. in solving problem using python 3 appreciated. simple missing , unable find answer online. import binascii f = open('test.xlsx', 'rb') content = binascii.hexlify(f.read()) f.close output = content.decode("utf-8") #output2 = hex(int(output, 16)) f = open('temp', 'wb') f.write(output) #typeerror: bytes-like object required, not 'str' f.close() #convert type bytes , recreate file you can write: f.write(bytearray(output,"utf-8")) instead of: f.write(output) #typeerror: bytes-like object required, not 'str' to solve problem. although seems not pythonic way it.

php - XMLWriter Not Found Using PHPWord -

i'm new php , working on project using phpword. when executing following code : $this->_xmlwriter = new xmlwriter(); it said: fatal error: class 'xmlwriter' not found in .../phpword/shared/xmlwriter.php on line 61 i checked php info using php -m , php --rc xmlwriter , found xmlwriter module , class has been loaded.

logical operators - XSLT equals condtional -

i have simple test in xslt <xsl:if test="istrue = 'false'"> but can't figure out how logical equals operator here. know < "&"lt; , > "&"gt; logical equals operator xslt? tries &eq; &et; == , = , or xslt can compare numbers? = should work fine e.g. input xml <xml> <someelement>1</someelement> <someattribute attr="true" /> </xml> through transform: <?xml version="1.0" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/xsl/transform"> <xsl:template match="/xml"> <xsl:if test="someelement=1"> element 1 </xsl:if> <xsl:if test="someattribute/@attr='true'"> attribute true </xsl:if> </xsl:template> </xsl:stylesheet> returns some element 1 attribute t...

ios - How to insert labels on top of images saved to .WriteToFile in PNG's Swift -

Image
i'm trying save label on top of image using .writetofile . here's code i'm using save image : let selectedimage: uiimage = image.image! let filemanager = nsfilemanager.defaultmanager() let paths = nssearchpathfordirectoriesindomains(.documentdirectory, .userdomainmask, true)[0] string let filepathtowrite = "\(paths)/user_profile_image.png" let imagedata: nsdata = uiimagepngrepresentation(selectedimage)! let jpgimagedata = uiimagejpegrepresentation(selectedimage, 1.0) filemanager.createfileatpath(filepathtowrite, contents: jpgimagedata, attributes: nil) // check file saved let getimagepath = (paths nsstring).stringbyappendingpathcomponent("user_profile_image.png") if (filemanager.fileexistsatpath(getimagepath)) { print("file available"); } else { print("file not available"); } but saves image : i'm trying retrieve : if let pdfurl = nsbundle.mainbu...

sql server - Execute query command (dynamic sql) runs faster than ordinary query -

Image
why second query execute command runs ~4 times faster first query without one? how can solve problem? why additional table (workatable) created in second case? variables: declare @count int, @followerid bigint set @count=1024 set @followerid=10 first query (usual query): select top (@count) photo.* photo exists (select accountid follower follower.followerid=@followerid , follower.accountid = photo.accountid) , photo.closed='false' order photo.createdate desc log: sql server parse , compile time: cpu time = 0 ms, elapsed time = 7 ms. sql server execution times: cpu time = 0 ms, elapsed time = 0 ms. table 'photo'. scan count 952, logical reads 542435, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. table 'follower'. scan count 1, logical reads 7, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. sql server execution times: c...

android - Can't write command in adb shell -

Image
when want use "adb shell" command connect api level 16 avds, have problem. because respond "#" in new line of terminal , it's not possible write command. image i don't have problem api level 22 or 23 avds. must change settings of avd or else? thanks in advance or hints.

opengl es - THREE.js custom shader with predefined lights -

i have following blendshader made based on three.blendshader , alteredqualia jupitershader . struggling adding directional light material shader. have read this tutorial still render lit object, without taking directional light consideration. wrong @ last row when defining gl_fragcolor can't figure out is. please help. thank you. fragmentshader : "#if num_dir_lights > 0", "uniform vec3 directionallightcolor[num_dir_lights];", "uniform vec3 directionallightdirection[num_dir_lights];", "#endif", "uniform float opacity;", "uniform float mixratio;", "uniform float staticratio;", "uniform sampler2d tdiffuse1;", "uniform sampler2d tdiffuse2;", "uniform sampler2d tdiffuse3;", "varying vec2 vuv;", // = uv // vnormal worldnormal calculated in vertex shader follows: // "vec3 worldnormal = mat3( modelmatrix[0].xyz, modelmatrix[1].xyz, modelmatrix[2].xyz ) * normal ...

Python - Get Path of Selected File in Current Windows Explorer -

i trying this in python 2.7. have found answer in c# here , having trouble recreating in python. answer suggested here explain concept understand, have no idea how going. basically want mark file, press winkey+c , have path copied. know how hotkey part (pyhk, win32 [registerhotkey]), trouble working around filepath. thanks in advance! it takes lot of hacking around, rough solution below: #!python3 import win32gui, time win32con import page_readwrite, mem_commit, mem_reserve, mem_release, process_all_access, wm_gettextlength, wm_gettext commctrl import lvm_getitemtext, lvm_getitemcount, lvm_getnextitem, lvni_selected import os import struct import ctypes import win32api getwindowthreadprocessid = ctypes.windll.user32.getwindowthreadprocessid virtualallocex = ctypes.windll.kernel32.virtualallocex virtualfreeex = ctypes.windll.kernel32.virtualfreeex openprocess = ctypes.windll.kernel32.openprocess writeprocessmemory = ctypes.windll.kernel32.writeprocessmemory readpro...

shell - Bash : How to insert a block of text after a certain line into a file in Unix? -

i have file file1.txt below : line 1 file 1 line 2 file 1 line 3 file 1 line 4 file 1 and second file file2.txt below : line 1 file 2 line 2 file 2 line 3 file 2 line 4 file 2 line 5 file 2 i want right 1 line command (preferably sed ) lines 2-4 second file (file2.txt) , add lines after line 3 first file(file1.txt) . so output should below : line 1 file 1 line 2 file 1 line 3 file 1 line 2 file 2 line 3 file 2 line 4 file 2 line 4 file 1 for getting lines 2-4 second file use : sed -n '2,4p' file2.txt and inserting lines after line 3 in file 1 use below : sed '4i<what insert here>' file1.txt but how combine both these operations ? agreeing other answerer job awk , can done sed . sed offers kind of strange commands besides famous s command , there e execute command gnu sed. after have given pieces in question, here how combine ideas: sed '4 e sed -n 2,4p file2.txt' file1.txt

R: Missing 'forest' argument when running randomForest -

i trying use randomforest classify set of data based on small percentage of 'training data'. keep receiving error "error in predict(forest, ubertable, type = "prob") : argument "forest" missing, no default" 'forest' supposed list runs entire forest, mean? mean training set? or entire data set? the code (sorry if it's long) follows: function(ubertable, forest, perf=null, order.by = "percent") { require(randomforest) my.pred = predict(forest, ubertable, type="prob") ubertable$rf_score = my.pred[,2] if (is.null(perf)) { cat("no perf object available; cannot make explicit predictions. doing rankings only! \n") } else { cat("calculating exact operating point\n") my.alpha = calculate.operating.parameters(perf=perf, method="frequency")$op ubertable$rf_prediction = ifelse(my.pred[,2] <= my.alpha, "call", "noise") } ubertable2 = ubertable[0, ] ubertab...

cant use ActionBar methods in android studio -

i trying set things action bar same errors on method use (e.g actionbar.settitle("my title"); or actionbar.setbackgrounddrawable(r.drawable.actionbar_draw); ) i cant use methods it... they give error: required android.support.v7.app.actionbar found android.app.actionbar i using minimum sdk 15 , code: package com.tos.test.testactionbarapp; import android.support.v7.app.actionbar; import android.support.v7.app.appcompatactivity; import android.os.bundle; public class mainactivity extends appcompatactivity { @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); actionbar actionbar = getactionbar(); actionbar.settitle("my title"); } } problem is, app crashes whenever start because of code , get: --- ------ beginning of cra...

java - Empirical analysis for binary search not matching Theoretical Analysis -

Image
i'm doing test binary searches average case. generate random variable , search random variable in different sized arrays using binary search. below code used: public static void main(string[] args) { //this array keeps track of times of linear search long[] arraytimetaken = new long[18]; //values of array lengths test int[] arrayassignvalues = new int[18]; arrayassignvalues[0] = 1000000; arrayassignvalues[1] = 10000000; arrayassignvalues[2] = 20000000; arrayassignvalues[3] = 30000000; arrayassignvalues[4] = 40000000; arrayassignvalues[5] = 50000000; arrayassignvalues[6] = 60000000; arrayassignvalues[7] = 70000000; arrayassignvalues[8] = 80000000; arrayassignvalues[9] = 90000000; arrayassignvalues[10] = 100000000; arrayassignvalues[11] = 110000000; arrayassignvalues[12] = 120000000; arrayassignvalues[13] = 130000000; ...

c# - Null Reference Exception error in ASP.net -

this question has answer here: what nullreferenceexception, , how fix it? 32 answers i have port application windows forms asp.net everything works fine untill try add data of sale form using form. in windows form works fine, when try in asp "null reference exception unhandeled user code this pops when try access "add new sale from" main form. the code in "add sale form" is: public partial class addsaleform : system.web.ui.page { protected void page_load(object sender, eventargs e) { } public sale getdata() { return new sale(idtextbox.text, datetextbox.text, locationtextbox.text, convert.todouble(pitchcosttextbox.text), convert.toint32(numpitchestextbox.text), charitycheckbox.checked, charitynametextbox.text, cateringcheckbox.checked); } any idea of goes wrong , can fix it? here constructor: ...

ios - NSKeyedArchiver Issue when app downloaded from iTunes via TestFlight -

i have strange bug i've bee trying track down several days. i'm saving state data game in file in app's documents directory. everything had been working fine until recent ios update (not sure when, somewhere around 9.0). suddenly, data not being archive / unarchived correctly. the weird part code works fine when run xcode ipad tethered mac or when in emulator. when download app itunes using testflight, no longer works. has made extremely difficult debug. i've checked , double checked everything, i'm using url path, added error trapping code, etc. archiving fails work correctly when app installed itunes via testflight. as last resort added new code archives object, unarchives variable, display data in label. resulting object contains null data. no exceptions thrown. just reiterate, code doesn't work when app in installed itunes. here code snippet; nsstring *documentdirectory = [[[[nsfilemanager defaultmanager] urlsfordirectory:nsdocumentdirect...

osx - Content of Mac Application not resizing on entering fullscreen mode -

Image
i developing mac application using nssplitview. there 3 columns, menu on left, nstableview in middle , detail view on right. components use constraints , none of them set restrict width or height when press button go fullscreen mode, application go fullscreen, actual content doesn't resize, stays same , large black border forms around application. what possible causes , how debug find out issue lies?

asp.net - c# QueryString exception -

in following code, got following error. an exception of type 'system.argumentoutofrangeexception' occurred in mscorlib.dll not handled in user code additional information: index out of range. must non-negative , less size of collection. the code : protected void page_load(object sender, eventargs e) { prid.text = request.querystring[0]; using (sqlconnection connection = connectionmanager.getconnection()) { string cmd = "select imagecolor, quantity, productname, price, screensize, screentype, processor, internal_memory, ram, sd_card, camera, bettery mobtabspecifications mobtabspecifications.prid ='" + prid.text+"'"; sqlcommand command = new sqlcommand(cmd, connection); sqldatareader reader = command.executereader(); while (reader.read()) { img.imageurl = "../image/"+ reader[0] string; quantity.text = reader[1] string; prname.text ...

javascript - Cannot read results from nodejs request result -

i make request towards fb graph api through node js' request: request({ url: 'https://graph.facebook.com/v2.6/' + userid + '?fields=first_name,last_name&access_token=' + token, method: 'get', }, function (error, response, body) { console.log(error); }).on('response', function (response) { response.on('data', function (data) { console.log('user data ' + data); // logs user data { // "first_name": "marcus", // "last_name": "green" } var userdata = { firstname: data['first_name'], lastname: data['last_name'] }; console.log(userdata.firstname) // logs undefined }) }); same happens when assign data.first_name or data.last_name if fir...

php - Deploying zend skeleton application on openshift server -

i deployed skeleton application on openshift paas server. using git put code in folder /php. and now, can reach application @ url: => http://zend-application.rhcloud.com/public/ in local created vitrual host : <virtualhost *:80> servername zend.localhost documentroot c:/wamp/www/zend/public setenv application_env "development" <directory c:/wamp/www/zend/public> directoryindex index.php allowoverride order allow,deny allow </directory> </virtualhost> is possible create similar vhost on openshift server , access appli base url: => http://zend-application.rhcloud.com/ (without */public/) many thanks! ced. copy content of public php directory itself. , make sure .htaccess file code given below: rewriteengine on rewritecond %{request_filename} -s [or] rewritecond %{request_filename} -l [or] rewritecond %{request_filename} -d rewriterule ^.*$ - [nc,l] rewriterule ^.*$ inde...

SVN - See the changes in a branch based upon when it was checked out -

i see modifications associated branch. can compare current state of trunk enough, trunk updated seeing changes outside scope branch. how can determine version of trunk branch based on diff (i using beyondcompare, need both sets of files) see modifications. easy task , how perform feat? thanks , kind regards, mark the svn log show when branch created , copied (that is, if did things right way explained below). use command: $ svn log -v -r1:head --stop-on-copy $repo/branches/$branch_name | head this list out branches youngest oldest means see first revision on top instead of waiting whole log print. --stop-on-copy print out beginning of branch history instead of following history branch copied from. -r1:head prints out in reverse order, , -v prints out copy information answer question. piping head limits output first 10 lines should more enough: $ svn log -v -r1:head --stopy-on-copy $repo/branches/1.3 | head --------------------------------------------------...

java - check for a substring in a string before the first comma -

Image
i have set of strings separated , example: abc,defg,ijkl pqrs,tu,vv ,klmnop,qwe aamn,nn,khhk as can see, third line doesn't start substring. starts comma. using regex how can tell string starts substring of random length before first comma. description ^"[^"]+", this regular expression following: verifies string starts substring requires substring random length greater zero example live demo https://regex101.com/r/ke3bg5/1 sample text abc,defg,ijkl pqrs,tu,vv ,klmnop,qwe aamn,nn,khhk sample matches abc, pqrs, aamn, explanation node explanation ---------------------------------------------------------------------- ^ beginning of "line" ---------------------------------------------------------------------- [^,]+ character except: ',' (1 or more times (matching amount possible)) ------------------------------...

haskell - How define an average function when dealing with monads -

i have list of type primmonad m => m [double] to calculate average defined following functions: sum' :: primmonad m => m [double] -> m double sum' xs = (sum <$> xs) len' :: primmonad m => m [double] -> m int len' xs = length <$> xs avg :: primmonad m => m [double] -> m double avg xs = (sum' xs) / (fromintegral $ len' xs) however, having problems avg function. following errors: not deduce (fractional (m double)) arising use of ‘/’ … context (primmonad m) bound type signature ...

Linking the vampir trace libraries in Cmake -

i having trouble linking vampir trace libraries in cmake. tried follow code in http://code.ohloh.net/file?fid=kpkr7xbirapei6b9ri03no7f-qo&cid=qbbsybai9cm&s=&browser=default&fp=301524&mpundefined&projselected=true#l0 i have in part of cmake file: set(vampirtrace_root $home/downloads/vampirtrace-5.14.4) set(vampirtrace_libraries ${vampirtrace_root}/vtlib/.libs/libvt.so) include_directories(${vampirtrace_root}/include) add_definitions( -dvtrace ) add_executable(applyingvtkmarchingcubes applyingvtkmarchingcubes.cxx) target_link_libraries(applyingvtkmarchingcubes ${vampirtrace_libraries}) but when cmake , make, can't recognize header file #include "vt_user.h" still. thanks set(vampirtrace_root $home/downloads/vampirtrace-5.14.4) are trying read environment variable home? if right way is: set(vampirtrace_root $env{home}/downloads/vampirtrace-5.14.4) ps can find such errors if turn on compiler messages: set(cmak...

c# - WCF Service runs perfectly when running under iis express but same service wont work when running under Local IIS with its virtual directory -

Image
i practising wcf , stuck situation. wcf service works under iisexpress (default vs2013). when use same under local iis, got below exception in wcf test client. error: cannot obtain metadata http://localhost/wcfservice1/service1.svc if windows (r) communication foundation service have access, please check have enabled metadata publishing @ specified address. enabling metadata publishing, please refer msdn documentation @ http://go.microsoft.com/fwlink/?linkid=65455.ws-metadata exchange error uri: http://localhost/wcfservice1/service1.svc metadata contains reference cannot resolved: ' http://localhost/wcfservice1/service1.svc '. remote server returned unexpected response: (405) method not allowed. remote server returned error: (405) method not allowed.http error uri: http://localhost/wcfservice1/service1.svc there error downloading ' http://localhost/wcfservice1/service1.svc '. request failed http status 404: not found. my web c...