Posts

Showing posts from June, 2011

caching - centos os - apache httpd takes all my ram and cache -

i have 2 sites on machine getting unresponsive/slow. i checked on vps (virtual dedicated server) used #free -m , got this total used free shared buffers cached mem: 992 926 66 0 3 24 -/+ buffers/cache: 898 94 swap: 63 0 63 i read http://www.linuxatemyram.com/ , im pretty sure not case because cached 24mb, if flush cache with sync; echo 3 > /proc/sys/vm/drop_caches i still see usage way high total used free shared buffers cached mem: 992 903 88 0 0 9 -/+ buffers/cache: 893 98 swap: 63 28 35 but when stop httpd service with # service httpd stop stopping httpd: [ ok ] then used #free -m again , got: total used free shared buff

docusignapi - Disable In-Person Signer email notification to the host -

i'd know if it's possible disable email notification host when using in-person signing. ( sent document host in-person signing session.) repro: 1 - envelope created using api containing 3 recipients: 1 in-person captive signer , 2 remote signers. 2 - host receives email notification. in-person sign email notification json: `{ "status":"sent", "emailsubject":"contract", "compositetemplates":[ { "servertemplates":[ { "sequence":"1", "templateid":"<templateid>" } ], "inlinetemplates":[ { "sequence":"1", "recipients":{ "inpersonsigners":[ { "hostemail":"johndoe@email.com",

php - Use value from checkbox in query -

i have checkbox input value set 0. <form id="formfilter2" name="formfilter2" method="post" action=""> <input name="selview" type="checkbox" id="selview" onchange="formfilter2.submit()" value="0" <?php echo (isset($_post['selview'])?'checked':'');?> /> view accounts no fees assigned </form> i set query left join table (fees) counts how many fees account has. when view data can see count after every corresponding members.name. 0 shows if there no record in fees table members.id. members have not been assigned fee. trying use checkbox filter names , show me have 0 assigned. $varview_recordsetmembers = "%"; if (isset($_post['selview'])) { $varview_recordsetmembers = $_post['selview']; } $varfilter_recordsetmembers = "%"; if (isset($_post['selfilter'])) { $varfilter_recordsetmembers =

c# - SQLite for Universal Windows Plataform in Unity3d (5.5.3f1). How to do it? -

i'm working in project supports android, ios, osx , not uwp windows. we're trying add support uwp, had lot of problems , 1 not founding solution how use sqlite uwp in unity. possible? if how can it? or there database can use replace sqlite? please, let me know!

c# - Converting Texture2D into a video -

i've did lot of research, can't find suitable solution works unity3d/c#. i'm using fove-hmd , record/make video of integrated camera. far managed every update take snapshot of camera, can't find way merge snapshots video. know way of converting them? or can point me in right direction, in continue research? public class fovecamera : singletonbase<fovecamera>{ private bool camavailable; private webcamtexture fovecamera; private list<texture2d> snapshots; void start () { //-------------just checking if webcam available webcamdevice[] devices = webcamtexture.devices; if (devices.length == 0) { debug.logerror("fovecamera not found."); camavailable = false; return; } foreach (webcamdevice device in devices) { if (device.name.equals("fove eyes")) fovecamera = new webcamtexture(device.name);//screen.width , screen.height } if (fovecamera

jquery - Disable all the <select> items in JavaScript -

i have few <select> s items in jsp file, want disable <select> s items. this jsp file: <select id="combosupergrupos1" name="combossupg"> <option value="0">n...</option> <!-- x options --> </select> <select id="combosupergrupos2" name="combossupg"> <option value="0">n...</option> <!-- x options --> </select> this i'm trying: var combossupergrupo = document.getelementsbyname("combossupg"); combossupergrupo.disabled = true; but can't achieve goal. i'm thinking jquery, don't know if can mix javascript jquery. any question post on comments. jquery : $('select[name="combossupg"]').attr('disabled',true); javascript : var selects = document.queryselectorall("select[name='combossupg']"); selects.foreach(function(s){ s.disabled = true; });

docker - Update Windows Software in Dockerfile -

often times dockerfile linked using statements. there's no telling when upstream update package latest security fixes. include 'apt-get update && apt-get -y upgrade' in linux based dockerfile(s). what equivalent dockerfile based on windowsservercore? linux base images (like ubuntu , alpine etc.) updated regularly, , windows ones. typically, microsoft push updates every month on patch tuesday . can see history in tags on docker hub .

php - What are these mysterious things in defining methods? -

back development after spending years in management position, dealing php code, has definitions cannot understand (looks far beyond of php progress on these years). can let me know campaigndto , paramdto in definition? what returned method? /** * creates campaign * @param campaigndto $campaign * @param paramdto $param * @throws \exception * @return campaigndto */ public function createcampaign(campaigndto $campaign, paramdto $param) { } type declarations per docs : type declarations allow functions require parameters of type @ call time. if given value of incorrect type, error generated: in php 5, recoverable fatal error, while php 7 throw typeerror exception.

angular - Using resolve in angularfire2 -

i trying use route resolve in angularfire2 project. have blog page list of blogs. blogs-resolve.service.ts import { injectable } '@angular/core'; import { resolve, activatedroutesnapshot } '@angular/router'; import { blog } '../../shared/models/blog'; import { firebaseservice } './firebase.service'; import { observable } 'rxjs'; import 'rxjs/add/operator/first'; @injectable() export class blogsresolve implements resolve<blog> { constructor(private firebaseservice: firebaseservice) {} resolve(route: activatedroutesnapshot): observable<any>|promise<any>|any { return this.firebaseservice.getblogs().map(blogs => { console.log(blogs) blogs; }).first(); } } the getblogs() firebaseservice returns list of blogs. , above console.log gives array of objects i.e. no of blogs have. but in component when try console log data, shows undefined . blogs.component.ts import { component, o

c++ - char vs wchar_t when to use which data type -

i want understand difference between char , wchar_t ? understand wchar_t uses more bytes can clear cut example differentiate when use char vs wchar_t fundamentally, use wchar_t when encoding has more symbols char can contain. background char type has enough capacity hold character (encoding) in ascii character set. the issue many languages require more encodings ascii accounts for. so, instead of 127 possible encodings, more needed. languages have more 256 possible encodings. char type not guarantee range greater 256. new data type required. the wchar_t , a.k.a. wide characters, provides more room encodings. summary use char data type when range of encodings 256 or less, such ascii. use wchar_t when need capacity more 256. prefer unicode handle large character sets (such emojis).

node.js - Mongoose one to many relationship -

i have mongoose schema user data: // user schema const user = new schema( { name: {type: string}, email: {type: string, unique: true}, // other fields }) and user's daily statistics schema: // stats schema const stats = new schema( { datecreated: {type: date, default: date.now()}, stepswalked: {type: number, default: 0}, // other fields userid: string // user id field }) when trying generate multiple stats schema objects same user id this: for (let = 0; < 40; ++i) { statsdata = await stats.create({ userid: userdata._id }) } i'm getting mongoose duplicate exception on second iteration of loop. stack trace: mongoerror: e11000 duplicate key error collection: 5909aed3df9db12e2b71a579_.stats index: userid_1 dup key: { : "5991c027a572690bfd322c08" } @ function.mongoerror.create (node_modules/mongodb-core/lib/error.js:31:11) @ toerror (node_modules/mongodb/lib/utils.js:139:22) @ node_modules/mongodb/lib/collection.js:669:23 @ h

python - In ipdb, how to query a variable which as the same name as a command? -

i'm trying debug function quicksort(a, l, r) has local variable called l . however, in ipdb corresponds command view code around current line. i'm seeing this: ipdb> dir() ['a', 'ipdb', 'l', 'r'] ipdb> [2, 4, 6, 1, 3, 5, 7, 8] ipdb> l 14 a[0], a[p] = a[p], a[0] 15 16 def quicksort(a, l, r): 17 # n = len(a) 18 import ipdb; ipdb.set_trace() ---> 19 if len(a) == 1: 20 return 21 else: 22 # choose_pivot(a) 23 q = partition(a, l, r) 24 quicksort(a, l, q-1) what want in case see value of l , however. there way 'escape' default l command , see value of l variable? i found can p(l) see __repr__ representation (or print(l) see __str__ representation).

SoapUI: differences in arrow meaning opposite to method names? -

Image
what difference in arrow types (one direction vs bi-directional) opposite method names? mean in terms of web-services? seems like: one direction - there should not responce bi-directional - responce expected is so? update: according answer of @michalbabich have checked wsdl-file , there correlation one direction arrow (one-way operation): <wsdl:operation name="nmtoken"> <wsdl:input name="nmtoken"? message="qname"/> </wsdl:operation> bi-directional arrow (request-response operation): <wsdl:operation name="nmtoken" parameterorder="nmtokens"> <wsdl:input name="nmtoken"? message="qname"/> <wsdl:output name="nmtoken"? message="qname"/> <wsdl:fault name="nmtoken" message="qname"/>* </wsdl:operation> found surprisingly little on this, maybe links help: https:

c++ - How to check which millisecond a fault causing a dump happend? -

i have core dump has been generated @ customer site. can find timestamp second dump-file opened. (part of filename.) is possible see @ millisecond exception has occurred? this enable me compare more accurately log file (which in milliseconds). as mentioned above, ".time" how dump occurrence timestamp. user dumps, it's unlikely - observation it's second-level accuracy. kernel dumps have found it's accurate millisecond. however, i've found "system uptime" in ".time" output accurate millisecond both kernel , user dumps. in case able last boot time millisecond accuracy (for instance calling "wmic os lastbootuptime") add uptime lastbootuptime accurate dump occurrence timestamp.

compression - Run rar.exe and compress a file using the rar parameters (C++) -

hi guys have created code not know how put parameters rar.exe using shellexecute, of know how put parameters using shellexecute? i want use these parameters rar.exe -v50m archive.rar "windows tutorial.pdf" code: #include <stdio.h> // c library perform input/output operations #include <tchar.h> #include <stddef.h> // c standard definitions #include <iostream> // input/output #include <fstream> #include <cstdlib> #include <windows.h> int main() { shellexecute(null, "open", "rar.exe", null, null, sw_show); }

apache - htaccess redirect based on query parameter value -

my application used language switching using lang.php file. url redirect english /path/to/page.php?foo=bar this: /path/to/lang.php?lang=en-ca&uri=%2fpath%2fto%2fpage.php%3ffoo%3dbar recently there has been changes accept lang query parameter on pages. url nicer: /path/to/page.php?foo=bar&lang=en-ca i'd able add .htaccess file locations have lang.php file in order keep existing url working without lang.php file. possible? the rewriterules must relative lang.php application running on different hostnames , paths. i took stab @ based on the answer here giving me 404: rewritecond %{request_filename} lang.php$ rewritecond %{query_string} (?:^|&)uri=([^&]+) [nc] rewriterule lang.php - [e=lang_redir_uri:%1] rewritecond %{request_filename} lang.php$ rewritecond %{query_string} (?:^|&)lang=([^&]+) [nc] rewriterule lang.php - [e=lang_redir_lang:%1] rewritecond %{request_filename} lang.php$ rewriterule . %{lang_redir_uri}e [l,r=temporary] th

php - mysql join 3 tables related in pairs -

Image
► context : work in museum (for real), people come everyday, buy tickets (humans) , buy tickets drinks , foods (objects). there events, tickets have same names per event prices different. ► problem : have create report 2 results : total sales (visitors + food + drinks) , how many people came (visitors only) specific event. next image of 3 tables in database, how relate , sample data : table tickets relates sales_main through event_id column. table sales_main relates sales_detail through id → main_id columns. table sales_detail have column ticket_name it's not unique in table tickets. ► question : how both results, total sales , human count , event 555 in 1 "select" ? tried next 2 "select" when combine them inner join cartesian results : get detail sales event 555 : select sales_detail.* sales_main inner join sales_detail on sales_detail.main_id = sales_main.id sales_main.event_id = '555' get tickets event 555 : select

Need help is specific Crosstab! Python Pandas -

this link close query have in mind. python pandas groupby aggregate on multiple columns main topics covering question are: 1. python | 2. pandas ds | 3. group | 4. aggregate function | 5.efficiency current pandas ds have column names -> unique_identifier | classification | products | values so data has identifier repeating each product. need information 1 row each identifier , columns count(records) sum(values) each identifier - classification combination. i did try groupby(['unique_identifier','classficiation']) couldn't figure out new column generation part size , sum. also since data crazy big, looking high level of efficiency. novice in pandas , love gurus. thanks, m sample data looks this: index identifier classification product value 1 123 x abc 10 2 123 x bcd 20 3 123 y cde 30 4 123 y def 40 5 1

jquery - Can I use only numbers in data-chained attributes in jquery_chained script? -

i need use script jquery_chained numbers https://github.com/tuupola/jquery_chained js: <script> $(function(){ $("#series").chained("#mark"); }); </script> html code <select id="mark" name="mark"> <option value="">--</option> <option value="1">bmw</option> <option value="2">audi</option> </select> <select id="series" name="series"> <option value="">--</option> <option value="series-3" data-chained="1">3 series</option> <option value="series-5" data-chained="1">5 series</option> <option value="series-6" data-chained="1">6 series</option> <option value="a3" data-chained="2">a3</option> <option value="a4" data-chained="2">

Amazon RDS: Should I Stop or Terminate? -

i have rds instance don't use lot, don't want delete them might need them in future. now, if stop instances, aws automatically starts them after 7 days. so using aws cli , setting cron job automatically stop them after 7 days. aws rds stop-db-instance --db-instance-identifier my-db-instance1 the same way other instances. 0 0 * * 7 /etc/cron.daily/script.sh i don't believe best practice. can me understand how create config file has instance id's script reads , populates instance id's? thanking in advance. if use database , don't want starting again after 7 days, should create snapshot of instance , terminate it. the instance not auto-start. need restore snapshot new database instance when wish use it, can done command-line.

How do we obtain the Google App Engine safe-URL key in Java for a different appId and namespace? -

when need application without namespace can use following code: final key mykey = keyfactory.createkey(kind, id); final string safeurlkey = keyfactory.keytostring(mykey); unfortunately when need different appid or namespace don't find way in java. in python example can use following code: new_key = db.key.from_path(entity, id, _app=application_id, namespace=namespace) return str(new_key) but in java doesn't seem available. any idea on how can this? the app engine sdk indeed try prohibit this, evidenced lack of public classes/methods can handle app ids , namespaces. in python discouraged underscore prefix on _app keyword argument. because app engine apps meant well-contained within project. it possible use reflection workaround these barriers, only on standard java 8 runtime (which in beta). standard java 7 runtime prohibits reflecting non-accessible methods . (if you're using app engine flex suspect you'll ok too, although haven't tested

c# - How to make valid route for {id}/visit? -

i new @ asp.core , try make valid route {id}/visits my code: [produces("application/json")] [route("/users")] public class usercontroller { [httpget] [route("{id}/visits")] public async task<iactionresult> getuser([fromroute] long id) { throw new notimplementedexception() } } but, @ route {id} generated method same: // get: /users/5 [httpget("{id}")] public async task<iactionresult> getuser([fromroute] long id) { return ok(user); } how make route /users/5/visits nethod? parameters @ getuser should add? name methods differently , use constraints avoid route conflicts: [produces("application/json")] [routeprefix("users")] // different attribute here , not starting /slash public class usercontroller { // gets specific user [httpget] [route("{id:long}")] // matches users/5 public async task<iactionresult> getuser([fromroute]

intersystems cache - ObjectScript Library.FileBinaryStream convert into a string -

how can create string binary stream? tried streamget , outputtodevice class methods not returning string. there class should use thanks :) assuming stream %library.filebinarystream : set string = stream.read($$$maxstringlength) note string can't more 7mb, while stream can bigger.

Attempt to invoke virtual method on a null object reference - Firebase database android -

Image
i trying read 'resname' , 'status' values pjsxhqxcyxdsv07lxvzu7buvhkf2 under business_info node firebase database, seen . i keep getting error: attempt invoke virtual method 'java.lang.string com.example.android.project_water.utilities.restaurantinformation.getresname()' on null object reference. does know how solve this? please let me know if more info needed. code: public class info extends fragment { private databasereference mdatabase; private firebaseauth firebaseauth; private string businessid; private textview resnamechange, statuschange; public info() { } @override public view oncreateview(layoutinflater inflater, viewgroup container, bundle savedinstancestate) { view rootview = inflater.inflate(r.layout.fragment_info, container, false); sharedpreferences businessid1 = getactivity().getsharedpreferences("

Verify a card with multi-currency transactions on Authorize.net -

we have implemented credit card verification mechanism places payment authorization of random amount user's payment method. after this, user asked check online banking, find amount charged , enter verification field, confirming card ownership. this works usd, not find solution make work other currencies, having manually process foreign activations. problem has lead fact transaction place gets converted local currency, causing users input local amount verification box. we thinking converting amount local currency, rates seem off of time, depending on bank processes transaction. is there way exchange rates use local currency adaptation authorize.net able verify international accounts?

asp.net mvc - Making a Bootstrap 4 multi image carousel slider -

i working bootstrap 4 carousel slider , instead of having scroll 3 images @ time trying have scroll 4 images @ time. how best go making happen? , have bootstrap 4 also. thanks! https://www.codeply.com/go/s3i9ivcbyh/multi-carousel-single-slide-bootstrap-4 bootstrap carousel uses div each slide. mean can insert more images inside each slide proper sizing. <div class="carousel-item"> <img class="" src="http://placebeard.it/g/640/480" alt="first slide"> <img class="" src="http://placebeard.it/g/640/480" alt="first slide"> <img class="" src="http://placebeard.it/g/640/480" alt="first slide"> <img class="" src="http://placebeard.it/g/640/480" alt="first slide"> </div> here's working sample in codepen : https://codepen.io/asimaley/full/rzvglr

c# - Raise an event whenever a property's value changed? -

there property, it's named imagefullpath1 public string imagefullpath1 {get; set; } i'm going fire event whenever value changed. aware of changing inotifypropertychanged , want events. the inotifypropertychanged interface is implemented events. interface has 1 member, propertychanged , event consumers can subscribe to. the version richard posted not safe. here how safely implement interface: public class myclass : inotifypropertychanged { private string imagefullpath; protected void onpropertychanged(propertychangedeventargs e) { propertychangedeventhandler handler = propertychanged; if (handler != null) handler(this, e); } protected void onpropertychanged(string propertyname) { onpropertychanged(new propertychangedeventargs(propertyname)); } public string imagefullpath { { return imagefullpath; } set { if (value != imagefullpath) {

html - How to make webview only load specific website like youtube? -

i new swift , i'm making app webview can display youtube videos. problem don't want user go url or that. want make app load youtube.com. i'm using html instead of url because can tell webview height , width it's going have. html code: <html><head><style type=\"text/css\">body {background-color: transparent;color: white;}</style></head><body style=\"margin:0\"><iframe frameborder=\"0\" height=\"" + string(describing: height) + "\" width=\"" + string(describing: width) + "\" src=\"http://www.youtube.com/embed/" + vid.videoid + "?showinfo=0&modestbranding=1&frameborder=0&rel=0\"></iframe></body></html> you try using shouldstartloadwith delegate method of uiwebviewdelegate extension uiviewcontroller: uiwebviewdelegate { public func webview(_ webview: uiwebview, shouldstartloadwith request:

java - Save and load JavaFX TableView using Properties -

is there decent way of doing this? populate tableview enum , use getters add values columns, so: taskcolumn.setcellvaluefactory(a -> new simplestringproperty(a.getvalue().getassignmentname())); tableview.getitems().addall(tasks.values()); i have lot of editable rows user change customize way program work, doing everytime program launches tedious. what want values columns , save them using java.util.properties , can load tableview user not need re-configure next time program launched. i have use properties particular assignment i'm open suggestions on how can make simpler. one of possible solution work csv format saving user data. example of csv work . other idea json serialization/deserialization. as mentioned @james_d project details needed.

How do I stop a docker container so it will rerun with the same command? -

i start docker container name. this: docker run --name regsvc my-registrationservice if call docker stop regsvc, next time run above command fails. have run these commands first. docker kill regsvc docker system prune that seems excessive. there better way stop container , restart it? thnx matt i believe want run new container every time issue docker run , better use --rm flag: docker run --rm --name regsvc my-registrationservice this remove container when container exits. better if don't want save data of container. as suggested @trong-lam-phan restart existing container using docker restart regsvc

typescript - Using BackgroundCheck.js in Angular 2/4 -

ok has pretty stumped me. i'm trying use http://www.kennethcachia.com/background-check/ in angular 4 project. can't figure out how playing nicely in angular typescript world. any appreciated. i'm out of ideas.

database - apache derby termporary table accessible to multiple connections? -

apache derby allows creation of global temporary tables, appears these tables accessible connection/session created temporary table. our system uses connection pooling, , there no guarantee the next query use same connection. there anyway define temporary table "global" in sense accessible connections database? the docs state : "the declare global temporary table statement defines temporary table current connection." it not clear "global" means in context. link docs : https://db.apache.org/derby/docs/10.2/ref/rrefdeclaretemptable.html

ember.js - Ember Iterating through a promise/ store.findAll return value -

in router have code let users= this.store.findall('user') and model user.js name: ds.attr('string'), username: ds.attr('string'), company: ds.attr('string') in mirage fixture have user object defined [{'name':'smith','username':'smith123'},{'name':'james','username':'james222'} and in router when let users= this.store.findall('user') want iterate through users , add company manually each user. unable find way access user objects in router js file. and same object can iterate in .hbs file. unable find way iterate in router js file. can please let me know way this. findall method (and findrecord too) returns promise , not iterable object. can iterate through users after promise resolved. this, should use then method: this.store.findall('user') .then(users => { /*iterate here*/ }) .catch(error => { /*do inform user network/ser

c++ - How do I use the mpi.h in XCode? -

Image
i have installed mpich3.2 following direction in given website http://mpitutorial.com/tutorials/installing-mpich2/ i downloaded tar file , in downloads/ directory , installed using terminal.i wanted test if program works on local machine before submit remote machine. the problem when write header #include "mpi.h" xcode doesn't recognize it. how add mpich library xcode ? or how make xcode compiles using mpi? i, personally, go (please note never compile mpi code in xcode - via makefile, cmake). i have got mpi installed in location (from sources) - take here how it: running open mpi on macos then, i'd have created supper simple mpi code (e.g. this) #include <stdio.h> #include "mpi.h" int main(int argc, char * argv[]){ int my_rank, p, n; mpi_init(&argc, &argv); mpi_comm_size(mpi_comm_world, &p); mpi_comm_rank(mpi_comm_world, &my_rank); printf("size: %d rank: %d\n", p, my_rank);

Closing modal jQuery dialogs out of order causes error in IE -

as part of dropping support older browsers, updated asp.net app jquery 3.1.1 , jquery ui 1.12.1. after this, noticed getting errors logged console in ie 11. the error follows: script5007: unable property '_focustabbable' of undefined or null reference jquery-ui.js, line 12794 character 7 i able track problem fact long-running calls (e.g. database query may take 2-3 seconds) open 'please wait' modal dialog. dialog closed after content dialog opened , populated. when content dialog closed, above error occurs. i able condense issue following jsfiddle: https://jsfiddle.net/qaf1ut4b/8/ what need able have wait dialog open until after content dialog opened , populated? closing wait dialog first solves problem, isn't sufficient content dialog can take long time populate, due large numbers of <option> elements being loaded dom after database query completes. if ok destroying modals when close them can use this: $('#wait-dialog').di

c - Compiling with libcurl and Mingw32 on fedora -

i'm in trouble trying make proper compilation on c program using libcurl . going fine when run gcc main.c -lcurl -o test.out but when try same compilation mingw , using command i686-w64-mingw32-gcc -lcurl main.c -o test.out i error following output : main.c:7:23: fatal error: curl/curl.h: no such file or directory #include <curl/curl.h> ^ compilation terminated. unfortunately cannot understand few documentations managed find online. i'd glad if knew how rid of issue.

python - SimpleITK.Show() generates error in ImageJ on Linux -

edit note: question phrased as how link simpleitk.show() imagej in linux? by upgrading simpleitk 1.0.0 1.0.1, able launch imagej simpleitk.show(). however, imagej unable open "sample_mri.hdr". imagej generates following error messages. file not in supported format, reader plugin not available, or not found. root/local/linux/imagej/open("/temp/tempfile-7131-2.nii"); root/local/linux/imagej/rename("/temp/tempfile-7131-2.nii"); i have installed appropriate plugins imagej read hdr/img (analyze format). can open "sample_mri.hdr" imagej directly going file>open debug messages: sitk.show(img, 'sample image', debugon=true) findapplication search path: [ ./fiji.app, /cis/home/vwang/bin/fiji.app, ~/bin/fiji.app, /opt/fiji.app, /usr/local/fiji.app ] result: findapplication search path: [ ./fiji.app, /cis/home/vwang/bin/fiji.app, ~/bin/fiji.app, /opt/fiji.app, /usr/local/fiji.app ] resul

linux - How to get U-Boot debugging symbols -

i'm working on porting u-boot custom board we're developing, based on texas instruments am5728, , i'm having issues debugging u-boot. can load , debug u-boot spl via jtag, cannot step/reach hardware breakpoints once u-boot proper loaded via jtag after spl finishes. largely due not knowing debugging symbol table exists in u-boot binary. i've enabled debug macro in u-boot , have had no success, i'm figuring if can debug symbols, can step whatever errors i'm having. is there way debugging symbols build process/makefile? there's few things bear in mind here. first, spl/u-boot-spl , u-boot elf files u-boot , in case of am5728 you're going loading mlo , u-boot.img memory boot them. second thing keep in mind on u-boot relocate in memory loaded , address calculates , resumes running from. easiest way obtain value is, assuming system boots prompt: => bdinfo ... relocaddr = 0xfff6d000 reloc off = 0x7f76d000 these values system

python - Using keys properly in a Mongo DB collection -

i have collection, each entry consists of fields 'a' , 'b' , 'c' , 'd' . i have combination of 'a' , 'b' serving key. in other words, every combination of 'a' , 'b' must unique. for purpose, using ensure_index method: import pymongo client = pymongo.mongoclient(my_server_uri) collection = client[my_database_name][my_collection_name] collection.ensure_index([('a',pymongo.ascending),('b',pymongo.ascending)]) later in program, use find_one_and_replace method: filter = {'a':a,'b':b} replacement = {'a':a,'b':b,'c':c,'d':d} collection.find_one_and_replace(filter,replacement,upsert=true) this works fine, fail understand point in setting key , having specify again @ every update (i.e., calling ensure_index 'a' , 'b' , , passing filter {'a':a,'b':b} on every call find_one_and_replace ). is there method can se

algorithm - A* search variance -

i'm looking path searching algorithm similar a* search, taking account integral function on searched path. in particular, here problem: for each point p in search space, there function f(p). along path ab, can integrate ![formula]( https://chart.googleapis.com/chart?cht=tx&chl=%5cint_%7ba%7d%5e%7bb%7d%20f(p)) (an energy spent on path). need find optimal path spend less total energy. an a* search algorithm ask admissible h(n) - heuristic estimates cost of cheapest path n goal. i, however, couldn't find admissible function that. any direction appreciated.

filepath - VBA erroneously adds slashes to formatted date -

a file created every friday formatting: "report 08 11 2017.xlsx" dim iweekday integer, lastfridaydate date iweekday = weekday(now(), vbfriday) lastfridaydate = format(now - (iweekday - 1), "mm dd yyyy") lastfridaydate formatted way appears in file path, '08 11 2017'. however, when attempt open workbook via: dim lw_report workbook set lw_report= workbooks.open("report " & lastfridaydate & ".xlsx") i error: "report 08\22\2017.xlsx" cannot found how can file path created spaces preserved? lastfridaydate defined date when trying open workbook date concatenated standard date formatting. to fix dim lastfridaydate string dim iweekday integer, lastfridaydate string iweekday = weekday(now(), vbfriday) lastfridaydate = format(now - (iweekday - 1), "mm dd yyyy") dim lw_report workbook set lw_report = workbooks.open("report " & lastfridaydate & ".xlsx")

Spring Webflow Location Patterns -

Image
i attempting better understand spring webflow's location patterns. i want able separate views , flows own workflow folders. workflow folders contain multiple flows (most in form of sub-flows). here default (for project) configuration location pattern: <webflow:flow-registry id="flowregistry" flow-builder-services="flowbuilderservices" base-path="/web-inf/jsp"> <webflow:flow-location-pattern value="**/*-flow.xml"/> </webflow:flow-registry> i trying understand "/**" means in pattern... using pattern, see file in "/web-inf/jsp" ending "-flow.xml" mapped. however, flows defined in sub-directories ignored. want fix. i not want have provide location pattern every sub-directory generated under /web-inf/jsp. want pattern @ root (base-path) , inside children. any appreciated. here screen capture of basic project i'm using figure out: you need start pattern /** : &l

python - Storing Login Credentials for Command Line App -

i writing command line app in python using click module ssh cisco network device , send configuration commands on connection using netmiko module. problem i'm running ssh-ing network device requires hostname/ip, username, , password. trying implement way user of script login device once , keep ssh connection open, allowing subcommands run without logging in each time. example, $ myapp ssh hostname/ip: 10.10.110.10 username: user password: ******** connected device 10.10.101.10 $ myapp command1 log output $ myapp --option command2 log output $ myapp disconnect closing connection 10.10.101.10 how go storing/handling credentials allow functionality in cli? have seen recommendations of caching or oauth in researching issue, i'm still not sure how implement or recommended , safe way is. perhaps attempting this. $ myapp ssh -u user -p password (myapp) command1 (myapp) command2 (myapp) disconnect $ python has standard library module cmd may help: https://

validation - Where should I validate arguments? Factory Pattern, Java -

suppose have abstract class abstract builder, both of inherited 3 separate subclasses: public abstract class role { protected string name; protected int propertya; protected int propertyb; protected abstract static class rolebuilder<t extends role, b extends rolebuilder<t,b>> { protected t role; protected b rolebuilder; protected abstract t getrole(); protected abstract b thisbuilder(); protected rolebuilder(hero h) { role = getrole(); rolebuilder = thisbuilder(); role.name = h.name; role.propertya = h.propertya; role.propertyb = h.propertyb; } public t build() { return role; } } } public class healer extends role { int propertyc; public healer() { } public static final class healerbuilder extends role.rolebuilder<healer, healerbuilder> { @override protected healer

linux - Fetching pid and using it for kill -

i have batch file in linux (which execute externally within lazarus application). should read process pid, store in variable, , use variable execute "kill" command. this how i'm doing it: pid=`pidof myprocess` kill $pid however, kill command fails ": arguments must process or job ids" error. how can achieve this? perhaps using pkill directly better suit needs. pkill myprocess more info on pkill here: https://www.lifewire.com/list-and-kill-processes-using-the-pgrep-and-pkill-4065112

spring - Java Middleware in Hoverfly Rule -

i'm trying use hoverfly java , want set middleware in test. @classrule public static hoverflyrule hoverflyrule = hoverflyrule.incaptureorsimulationmode(("abc.json"), hoverflyconfig.configs().remote().host("localhost").adminport(8888).proxyport(8500)); how can update rule set middleware file?

c# - ActionLink with multiple parameters doesnt work -

my routing looks this: routes.maproute( name: "default", url: "{controller}/{action}/{id}", defaults: new { controller = "home", action = "index", id = urlparameter.optional } ); this link after clicking should redirect appropriate id action index. action index located in controller: kursymanage. columns.add() .encoded(false) .sanitized(false) .setwidth(10) //text //action //controller .rendervalueas(c => html.actionlink("zarzadzaj", "index", "kursymanage", new { id = c.id }, null)); unfortunately, action index gets empty value (null). in case when not use name of controller, works fine. public actionresult index(int? pidkursu) { var schemalist = (from scheme in szkolajezykowadb.kursyusers scheme.kursid == pidkursu &&

database - How to add amount data to ingredient using Airtable -

i've been exploring setting recipe web app wife's cake business. data consists of recipes, ingredients, units, amounts. setting in table using mysql decided may better use airtable wife can manage. bit struggling how add amount each ingredient within recipe. here table https://airtable.com/shr2wnah7hflblzup have pointers. cheers

Python email PDF: Some PDFs Getting Corrupted -

i trying attach pdf file e-mail message. for 1 pdf (a word document printed pdf), works (the recipient opens in outlook no problem). yet other pdfs (which seem same except being few kbs larger), corrupted. here sample use fails (becomes corrupted). import smtplib, os email.mime.multipart import mimemultipart email.mime.base import mimebase email.mime.text import mimetext email.mime.application import mimeapplication email.utils import formatdate email import encoders attachment_path=r'c:\directory'+'\\' login='login' password='password' part=mimebase('application',"octet-stream") def message(attachment): #attachment pdf file name fromaddr = "example@example.com" cc=fromaddr msg = mimemultipart() msg['from'] = fromaddr msg['to'] = "example@example.com" msg['date'] = formatdate(localtime = true) msg['subject'] = "subject" body=&#

c++ - Passing const reference leads to paradox in code..? -

ok have function within class named vector_ref class vector_ref { public: int* data() const { return m_data } void retarget(std::vector<int> const& _t) { m_data = _t.data(); m_count = _t.size() } private: int* m_data; size_t m_count; } i trying retarget vector_ref object existing vector object named v populated ints , call data(). vector_ref<int> tmp; tmp.retarget(const_cast<std::vector<int> const&>(v)); tmp.data(); // error here the pass retarget compiles, calling data() yields error: invalid conversion const int* int* { m_data = v.data() ... } this makes sense me, member variable m_data isn't const , given class definition how can ever retarget existing vector . if have pass const reference retarget() , sets non- const member variable m_data , how can ever hope compile code retargets vector_ref instance ? just declare m_data as const int* m_data; this doesn

linux - Event "cache-misses" not supported by perf in aws -

i having trouble running perf on aws(ubuntu 14.04.4) . seems none of hardware events supported. idea what's going on? using dedicated instance. here's example: $ perf stat sleep 4 performance counter stats 'sleep 4': 0.388772 task-clock (msec) # 0.000 cpus utilized 1 context-switches # 0.003 m/sec 0 cpu-migrations # 0.000 k/sec 179 page-faults # 0.460 m/sec <not supported> cycles <not supported> stalled-cycles-frontend <not supported> stalled-cycles-backend <not supported> instructions <not supported> branches <not supported> branch-misses 4.000773655 seconds time elapsed perf version: $ perf version perf version 3.13.11-ckt39 kernel version: $ uname -r 3.13.0-

string - How to convert int to binary and concatenate as char in C++ -

i have 2 values, 0 , 30, need store it's binary representation on 1 byte each. like: byte 0 = 00000000 byte 1 = 00011110 and concatenate them on string print ascii 0 (null) , 30 (record separator). so, not print "030", can't right here , neither command can print properly. know not nice things print. i doing this: string final_message = static_cast<unsigned char>(bitset<8>(0).to_ulong()); final_message += static_cast<unsigned char>((bitset<8>(answer.size())).to_ulong()); // answer.size() = 30 cout << final_message << endl; not sure if it's right, never worked bitset since now. think it's right server receives messages keep telling me numbers wrong. i'm pretty sure numbers need 0 , 30 on order, so, part i'm not sure how works 3 lines, i'm putting question here. those 3 lines right? there's better way that? a byte (or char ) holds single 8-bit value, , value same whether "view&q

java - How to stop date changing at 00:00 o'clock? -

i'm working on hotel management application [desktop] , noticed, date changing time hotels system not 00:00 , it's between 1am , 6am reservations , room status etc. should stay until audit time.when user make audit new day start. that's why need create method stop date change @ midnight , return new date when audit button clicked. briefly have create central system date. as result; when use date in classes every methods work synchronously[blockade, reservations, check in, check out etc.] couldn't find way this. i'm thinking around code : package com.coder.hms.utils; import java.text.simpledateformat; import java.time.localdate; import java.util.calendar; import java.util.date; import java.util.timer; import java.util.timertask; public class customdatefactory { private date date; private calendar calendar; private simpledateformat sdf; public customdatefactory() { //for formatting date desired sdf = new simpled

javascript - How do I handle multiple calls in one thunk function? -

i don’t know if has read this: https://medium.com/@stowball/a-dummys-guide-to-redux-and-thunk-in-react-d8904a7005d3?source=linkshare-36723b3116b2-1502668727 teaches how handle one api requests redux , redux thunk. it’s great guide, wonder if react component having more 1 request server? this: componentdidmount() { axios.get('http://localhost:3001/customers').then(res => { this.setstate({ res, customer: res.data }) }) axios.get('http://localhost:3001/events').then(res => { this.setstate({ res, event: res.data }) }) axios.get('http://localhost:3001/locks').then(res => { this.setstate({ res, lock: res.data }) }) } i've been googling crazy , think i've made progress, action creator looks (don't know if 100% correct): const fetchdata = () => async dispatch => { try { const customers = await axios.get(`${settings.