Posts

c++ - Where are the memory leaks? 2d array class -

i submitted program class , error message says there few memory leaks, cannot find them (i asked professor) here error message: ==27796== heap summary: ==27796== in use @ exit: 160 bytes in 2 blocks ==27796== total heap usage: 192 allocs, 190 frees, 21,989 bytes allocated ==27796== ==27796== 160 bytes in 2 blocks lost in loss record 1 of 1 ==27796== @ 0x402adfc: operator new[](unsigned int) (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so) ==27796== 0x804d5c2: sweepergrid::sweepergrid(sweepergrid const&) (in /tmp/grading20151030-8173-zfd6af-0/sweepertest) ==27796== 0x804bf57: main (sweepertest.cpp:357) and following code use new or delete: // explicit-value constructor sweepergrid::sweepergrid(const int initialrows, const int initialcols, const int density){ if ((initialrows<5 || initialcols<5) || (density<25 || density>75)) { throw out_of_range("grid not large enough (number of rows or columns cannot fewer 5) or dens...

java - Class path contains multiple SLF4J bindings after exclusion -

i've error "class path contains multiple slf4j bindings." when starting web-app server. solutions i've found here didn't seem work. i've excluded artifacts domain still error. don't understand why have error after exclusions. i'm using glassfish 4.1.1 server. severe: slf4j: class path contains multiple slf4j bindings. severe: slf4j: found binding in [jar:file:/c:/glassfish4.1.1/glassfish/domains/domain1/eclipseapps/csbasement/web-inf/lib/slf4j-log4j12-1.7.12.jar!/org/slf4j/impl/staticloggerbinder.class] severe: slf4j: found binding in [jar:file:/c:/glassfish4.1.1/glassfish/domains/domain1/eclipseapps/csbasement/web-inf/lib/slf4j-simple-1.7.12.jar!/org/slf4j/impl/staticloggerbinder.class] severe: slf4j: see http://www.slf4j.org/codes.html#multiple_bindings explanation. i excluded artifact seen in link furnished in error code : <!-- slf4j --> <dependency> <groupid>org.slf4j</groupid> <artifacti...

command line - python: how to properly pass arguments to executable via commandline -

i'm trying write small python script, allow me pass parameters command line dialog, in order run setup file. want able pass parameters executable file, example: "setup.exe --uninstall --delete-profile --force-uninstall" i've tried use "os.system" module, "subprocess.call" module, in both cases, script doesn't work. i'm not getting error. instead, script ends, setup and\or application files , folders not deleted. when i'm running same commands manually (via commandline), application , relevant files deleted. here's line of code: subprocess.call('setup.exe --uninstall --delete-profile --force-uninstall', shell=true) i think problem due permissions (though i'm running script via idle admin rights) or "--" symbols, separates arguments (unfortunately, that's format used setup file). any appreciated. use : subprocess.popen(['hostname', '-f'], stdout=subprocess.pipe).comm...

visual studio 2015 - After installing .NET Core 1.0 with VS2015 tooling (preview), I am unable to create .NET core class library projects -

i error message when try add .net core class library solution: error: template attempted load component assembly 'microsoft.visualstudio.projectsystem.dotnet.wizard, version=14.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a'. more information on problem , how enable template, please see documentation on customizing project templates. an empty folder created on disk nothing added solution. my initial process consisted of: upgrading visual studio 2015 update 3 uninstalling preview / rc bits of .net core , tooling downloading , installing release version of .net core preview tooling i have tried following after getting error: uninstalling , reinstalling .net core repairing .net core installation uninstalling , reinstalling visual studio 2015 professional w/update 3 and uninstalling , reinstalling , repairing .net core yet again afterwards measure executing devenv /setup administrator i shut down , restart after each step well, no dice. ...

security - WCF X509 getting "Could not establish trust relationship for the SSL/TLS secure channel with authority" -

Image
i'm developing wcf web service in c#, , test client go it. web service hosted in iis on server , test client running on desktop pc. able make calls web service client using http, trying working https , x509 certificates. when try make calls now, "could not establish trust relationship ssl/tls secure channel authority '192.168.5.5'". here i've done far try setup: created self-signed certificate , key use certificate root: makecert -n "cn=roottest" -r -sv roottest.pvk roottest.cer created certificates/keys signed above root server , client: makecert -iv roottest.pvk -n "cn=servertest" -ic roottest.cer -sky exchange -pe -sv servertest.pvk servertest.cer makecert -iv roottest.pvk -n "cn=clienttest" -ic roottest.cer -sky exchange -pe -sv clienttest.pvk clienttest.cer imported roottest.cer "trusted root" under "local computer" on both server , client pc using mmc. created pfx files server , client cer...

arrays - Python 3.4 TypeError: argument of type 'int' is not iterable -

i have array each position in array represents parking spot. value of each position in array (or parking lot) represents in parking spot (car, motorcycle, etc.). showspots function should show of spots vehicle in. example, showspots(car) (where car = 1) should show of spots (or positions in array) hold value 1. however, when run code, 'typeerror: argument of type 'int' not iterable' on line 'if holder in parkinglot[x]:' why getting error, , how fix it? my code: from random import * parkinglot = [0, 1, 0, 2, 0, 0, 1] empty = 0 car = 1 motorcycle = 2 def showspots(holder): x in range(0, 6): if holder in parkinglot[x]: print(x) def main(): print("there cars in lots:") showspots(car) print("there motorcycles in lots:") showspots(motorcycle) main() i think want if holder == parkinglot[x]: . doing in , python trying iterate through parkinglot[x] , check if holder in it. obviously, ...

XmlSlurper in Groovy and SOAPUI - Add new element to random location in xml -

i'm creating automated tests soapui , need check happens when add new groupingnodes on different positions in xml. i have xml structure similar this: <rootnode> <groupingnode> <id>1</id> <name>node 1</name> <groupingnode> <id>2</id> <name>node 2</name> <groupingnode> <id>3</id> <name>node 3</name> </groupingnode> </groupingnode> </groupingnode> <groupingnode> <id>4</id> <name>node 4</name> </groupingnode> and new elements add: <groupingnode> <id>5</id> <name>node 5</name> </groupingnode> in data source defined several different combinations node , add, new node in 1 test case needs added rootnode, in second test case groupnode id=3, in third test case newly created node added rootnode , on. so q...