Posts

Showing posts from January, 2010

devops - What Commitizen type should I use for a change that is an improvemant for an existing feature? -

Image
here commitizen types: what commitizen type should use a change improvement existing feature ? cz resources : http://commitizen.github.io/cz-cli/ https://github.com/commitizen/cz-cli

android - How do you get data from a Bluetooth LE device -

i have bluetooth barcode scanner supports bluetooth le , trying barcode information when 1 scanned. i can connect fine onservicesdiscovered gets called in bluetoothgattcallback not sure there. with classic bluetooth connection inputstream bluetoothsocket , wait read() give data not sure how works bluetooth le. tried looping through bluetoothgattcharacteristic 's checking property , if read property call gatt.readcharacteristic(characteristic); gives me useless information , that's before attempt scan something. so how barcode data scanner? this scanner have https://www.zebra.com/us/en/support-downloads/scanners/ultra-rugged-scanners/li3608-li3678.html the data provided ble devices called characteristics . these data packages specially formed, tightly packed byte arrays encode specific values specific services . can check out services @ official bluetooth website. here you'll find defined (authoritative) gatt services , belonging characteristics....

css - Bootstrap3 navbar-fixed-top height -

i'm using bootstrap3 navbar-fixed-top in project. in mentioned navbar, there div height 700px , makes entire navbar stretch 700px , covers content (i'm not able click inside inputs of main container). can set overflow parameter properly, element inside navbar doesn't stretch entire navbar, stays "outside" of it? <nav class="navbar navbar-default navbar-fixed-top"> ... <my-custom-widget></my-custom-widget> <!-- widget height of 700px --> ... </nav> thanks. g. if creating custom widget can set widget's position attribute absolute or fixed , if want prevent oversized can use overflow property of css checkout pen example my-custom-widget{ position: absolute; top: 0; right: 0; } https://codepen.io/anon/pen/xaeznr

node.js - path.join does not work? -

i want read path , wrote 2 different codes.the first code not work second code works perfectly. not understand differences. can explain me going on? thanks. file stored in /modules/config/ first code: var tmpmodulepath = path.join('./modules/',"config/"); var moduleconfiginfo = require(tmpmodulepath + "_test.js"); second code: var tmpmodulepath = path.join('./modules/',"config/"); var moduleconfiginfo = require("./" + tmpmodulepath + "_test.js"); from first code, error: can not find module ..._tset.csv if console.log generated path results: first code block: "modules/config/_test.js" second code block: "./modules/config/_test.js" in second case, have relative path starting current directory ( ./ ). require modules folder starting current directory. in first case, path absolute, meaning require modules folder starting root path of filesystem. i hope understand d...

python - Pocketsphinx new_Decoder runtime error -

i'm facing error in pocketsphinx code. have both pocketsphinx , sphinxbase installed. , have built both of these packages visual studio. here code: #!/usr/bin/python os import environ, path pocketsphinx.pocketsphinx import * sphinxbase.sphinxbase import * modeldir = "../../../model" datadir = "../../../test/data" config = decoder.default_config() config.set_string('-hmm', path.join(modeldir, 'en-us/en-us')) config.set_string('-lm', path.join(modeldir, 'en-us/en-us.lm.bin')) config.set_string('-dict', path.join(modeldir, 'en-us/cmudict-en-us.dict')) config.set_string('-logfn', '/dev/null') decoder = decoder(config) stream = open(path.join(datadir, 'goforward.raw'), 'rb') #stream = open('10001-90210-01803.wav', 'rb') in_speech_bf = false decoder.start_utt() while true: buf = stream.read(1024) if buf: decoder.process_raw(buf, false, false) ...

demo - No member named error - cgal -

i configure aabb_tree demo of cgal cmake use make command got error: in file included /home/pc/projects/cgal/aabb_tree/demo/aabb_tree/aabb_demo.cpp:68:0: /home/pc/projects/cgal/aabb_tree/demo/aabb_tree/mainwindow.cpp: in member function ‘void mainwindow::on_actioncopy_snapshot_triggered()’: /home/pc/projects/cgal/aabb_tree/demo/aabb_tree/mainwindow.cpp:427:32: error: ‘class viewer’ has no member named ‘grabframebuffer’ qimage snapshot = m_pviewer->grabframebuffer(true); ^ cmakefiles/aabb_demo.dir/build.make:87: recipe target 'cmakefiles/aabb_demo.dir/aabb_demo.cpp.o' failed make[2]: *** [cmakefiles/aabb_demo.dir/aabb_demo.cpp.o] error 1 cmakefiles/makefile2:67: recipe target 'cmakefiles/aabb_demo.dir/all' failed make[1]: *** [cmakefiles/aabb_demo.dir/all] error 2 makefile:83: recipe target 'all' failed make: *** [all] error 2 how can solve it?

Running Java batch deployed in Liberty profile on z/OS -

is approach of running java batch programs in liberty profile (supporting jsr352 specification) on z/os relatively new market or been long time ? the reason behind question because, hearing relatively new attempt ibm , there not of live systems in market running in approach. true ? note : understand jsr352 has been there quite sometime but, question specific support liberty profile in z/os (mainframe) support jsr-352 showed in websphere liberty part of java ee7 support delivered in 8.5.5.6 in june of 2015. supported on z/os , other platforms supported liberty. there features supported on z/os (i.e. smf recording, z/os-specific command line interface). support in websphere traditional ibm's proprietary java batch product (websphere compute grid) goes @ least decade (on z/os , distributed platforms). there's lot of information liberty jsr-352 support (especially on z/os) starting here: http://www-03.ibm.com/support/techdocs/atsmastr.nsf/webindex/wp102544...

mongodb - How to delete the document based on ObjectId (_id) -

how write mongodb shell query return documents objects created after specific date? collections like: { "_id" : objectid("59918c9014450171039b7e1f"), "cont_id" : "59918c9014450171039b7e1d", "systemdate" : isodate("2017-07-25t00:09:00.567z"), } db.itemtable.count({"systemdate" : { $gte: isodate("2017-07-25t00:00:00.000z")}}) returns - 15210 db.itemtable.count({'_id': {'$gt' : objectid("59918c9014450171039b7e1f")}}) returns - 987652 thanks! bharathi db.itemtable.find({"systemdate" : { $gte: isodate("2017-07-25t00:00:00.000z")}}).count() returns count of documents. if want cursor documents, use find db.itemtable.find({"systemdate" : { $gte: isodate("2017-07-25t00:00:00.000z")}})

How to fix InputMethodManager Leaks in android? -

i keep seeing inputmethodmanager leaks coming android view in login fragment in android. using leakcanary detect these. has faced these issues before , knows how fix it? here's leak info: in com.mymyapp.myapp2.beta.debug:2.1 * com.myapp.enterprise.registration.steps.loginfragment has leaked: * gc root android.view.inputmethod.inputmethodmanager$controlledinputconnectionwrapper.mparentinputmethodmanager * references android.view.inputmethod.inputmethodmanager.mnextservedview * references android.support.design.widget.textinputedittext.mlisteners * references java.util.arraylist.elementdata * references array java.lang.object[].[1] * references com.myapp.enterprise.registration.steps.loginfragment$1.this$0 (anonymous implementation of android.text.textwatcher) * leaks com.myapp.enterprise.registration.steps.loginfragment instance * retaining: 447 b. * reference key: 4cc86cd2-758c-4888-9b57-67d28ff25cab * device: motorola motorola moto g (4) athene_f * android version: 7.0 ap...

jenkins - Unique workspace directories for build executors -

Image
i've got jenkins instance running multiple build executors. all of have workspace in /tmp/workspace. i've got new build executor , want have workspace in different location. (somewhere little more space). @ option can configure path of executing job particular job. @ directory can set path.

permissions - Full control in Sharepoint site for all users in domain -

i installed sharepoint 2013 , have issue users when add them sharepoint site in read-only group have defult full control permissons. have access sites settings etc , group permissions ignoring. checked groups , there nothing can dilegate kind of permissions. any suggestions?

npm - Local versus global packages for Angular development -

when developing angular, 1 can npm install to install packages locally, or npm install -g to install them globally. wondering implications of each practice. , happens if particular package installed both ways, perhaps different versions? 1 angular app use?

javascript - How to customize close dialog function for ngDialog? -

i have implement customized close dialog function close button of ngdialog . as per requirement in cases (where there form) have show ngdialog confirm popup asking if user want close dialog or not there 2 options 'yes' , 'no' has behavior. i have tried preclosecallback() method somehow did not worked me does not wait user confirmation . function called on click of close , dialog closed or stays open depending on return function immediately. if don't return assumes true , closes dialog. can please let me know way solve issue? here comes nice solutions! it's bit hacky worked case. step 1 set showclose option false while opening dialog. // in controller popupfactory.openmodal('some_name','some_url.html', 'ngdialog-theme-default some_extra_css', $scope, function(value){ console.log("done:", value); },'some_controller',false); // false passes set **showclose** option false // in common factory...

javascript - Accessing the properties of an object without knowing the names of those properties not working -

i have index.php with: these php lines $sql = "select * voedingsmiddelen"; $result = mysqli_query($conn, $sql); on same page have code extract data table , put in array. var array = <?php echo json_encode( mysqli_fetch_all( $result, mysqli_assoc ) ) ?>; var arraytype = typeof array; alert('type: '+arraytype); var i=0; for(key in array) { alert('for loop working'); if(data.hasownproperty(key)) { var value = data[key]; alert(value); } else { alert('has no property'); } } i 1 alert saying 'type: object'. "gettype" working. other alerts not displaying. doing wrong? hasownproperty returns boolean value indicating whether object on calling has property name of argument here .so try this for (var i=0; i<array.length; i++) { alert('for loop working'); if(array.hasownproperty(i)) { var value = i; alert(value); } else { alert(...

r - EyetrackingR: make_eyetrackingr_data -- subscript out of bounds -

i using eyetrackingr package ( http://www.eyetracking-r.com/workflow ) analyse data. package includes function called make_eyetrackingr_data using raw data (all_kids). the code type in looks this: data <- make_eyetrackingr_data(all_kids, participant_column = "subject", trial_column = "trialid", time_column = "tettime", trackloss_column = c('validitylefteye','validityrighteye'), aoi_columns = c('targetlook','distractorlook'), treat_non_aoi_looks_as_missing = true) the output r gives me is: converting trial proper type. converting trackloss proper type. converting trackloss proper type. converting aoi proper type. converting aoi proper type. error in .subset2(x, i, exact = exact) : subscript out of bounds now, apparently there sort of problem data fr...

javascript - On Success in Jquery load the div -

i have jquery code : function delete_buyer(val) { $.ajax({ type: "post", url: "ajax_delete_supplier.php", data: 'id=' + val, success: function(data) { $("#msg").html(data); $("#pks1").load("buyer_details.php"); } }); } jquery.min.js:4 [deprecation] synchronous xmlhttprequest on main thread deprecated because of detrimental effects end user's experience. more help, check https://xhr.spec.whatwg.org/ . where if result success table reloaded/refreshed. div not getting refreshed. can me out went wrong, thank you!

java - Apache Camel is not capturing the SOAP service response -

i'm using apache camel 2.19.2 dsl , trying consume soap service hosted in different server. camel code - soapjaxbdataformat soap = new soapjaxbdataformat("<service class package path>"); soap.setcontextpath("root element package path"); soap.setversion("1.1"); from("direct:invokesoapservice") .process(new processor1()) //constructs main message body set body of soap-envelope .removeheaders("*") .setheader(exchange.soap_action, simple("soap action of service asdl")) .setheader(exchange.http_method, simple("post")) .setheader(exchange.content_type, constant("text/xml")) .marshal(soap) .log(logginglevel.debug, log, "request xml===========>${body}") .log(logginglevel.debug, log, "posting request server url") .to("cxf://http://<ip>:<port>/<wsdl server location without ?wsdl>?serviceclass=<qualified service class ...

vue.js - Event from a child component isn't detected -

based on tree view sample ( https://vuejs.org/v2/examples/tree-view.html ) on vue , reorganize code followings: in parent component <ul> <item class="item" :model="treedata" v-on:changetype="changetypeevent"></item> </ul> ... <script> ... methods: { changetypeevent: function () { console.log('incoming event ' ) } ... </script> in child component, <li> <div :class="{bold: isfolder}" @click="toggle" @dblclick.once="changetype"> {{model.name}} <span v-if="isfolder">[{{open ? '-' : '+'}}]</span> </div> <ul v-show="open" v-if="isfolder"> <item class="item" v-for="model in model.children" v-bind:key="model.name" :model="model"> </item> <li class="add" @click="addchi...

python - ImportError: No module named openerp -

while running odoo @ first time shows importerror: no module named openerp c:\python27\python.exe e:/workspaces/odoo-10.0-20170812/odoo.py -c e:\workspaces\odoo-10.0-20170812\odoo.conf traceback (most recent call last): file "e:/workspaces/odoo-10.0-20170812/odoo.py", line 160, in main() file "e:/workspaces/odoo-10.0-20170812/odoo.py", line 156, in main import openerp importerror: no module named openerp process finished exit code 1 import openerp won't work in odoo 10 because openerp replaced odoo. upto version 9 openerp in 10 changed. so try: import odoo instead of import openerp. odoo 10 source code not contain import openerp anywhere, maybe have downloaded wrong source.

xamarin.forms - Azure Media services Dynamic AES encrypted video Xamarin Forms -

i have video works fine in native xamarin android because can pass authorization header. however can't life of me figure out how pass jwt token in xamarin forms because none of players out there allow pass authorization headers. the documentation find indicates should able pass ?token={armored token} on end of url , should work. however doesn't work , authorization error indicating wasn't accepted. how 1 go passing token in scenario azure media services , having video playback in xamarin forms?

swift - How to receive a watchOS file transfer on iOS in the background -

i using transferfile , can send , receive files, in order complete transfer process, need open iphone app. in observing other apps, appears able receive , act upon received data in background (and send push notification user, example). i wondering how did this. you should send message watch app phone using sendmessage function of watch connectivity requesting data. wake iphone app. in didreceivemessage method on phone should use filetransfer function send files watch. to clarify when message sent using sendmessage wakes iphone application in background receive message can respond file transfer. hope helps you need send message first before sending file transfer. implement on watch side func sendactivationmessage() { if session.activationstate == .activated && session.isreachable { session.sendmessage(["watch message" : "activate"], replyhandler: { (reply) in if reply["phone message"] as! string =...

Rails: rollback all transactions if one fails -

so have configurations class post < activerecord::base has_many :photo_albums class photoalbum < activerecord::base has_many :photos and want following @post = post.new(post_params) @photo_album = @post.photo_albums.create(name: 'album name') @photo_urls = params[:photo_urls] @photo_urls.each |pu| @photo_album.photos.create(url: pu) end @post.save now want that, if @post.save fails transactions of photo_albums, photos should rollback. you can add if filter if @post.save , write code block create photo_album , photos if @post saved @post = post.new(post_params) if @post.save @photo_album = @post.photo_albums.create(name: 'album name') @photo_urls = params[:photo_urls] @photo_urls.each |pu| @photo_album.photos.create(url: pu) end else # handle @post.save fail end

swift - Complex Dynamic Collection Of UILabels Two Columns and Multiple Rows iOS -

Image
i've been struggling thinking how setup kind of layout in tableviewcell. see photo: more info: data dynamic. there might other days , each days might consists of multiple set of time. auto-layout needed of course dynamic/responsive height of cell. what did: i did try doing using ib. i tried programmatically. both in ib , programmatically, used uistackview . kinda hard set up. i'm thinking set using uiviews containers, uistackview less complex. i'm setting row row. first line time vertically, , view or stackview of paired horizontally day. after that, same other days. for formality of question, here part of code in cell setting layout, suggest not taking effort read it, believe know doing, , think need approach guys. var job: job! { didset { _ = self.subviews.map { if $0 uistackview { $0.removefromsuperview() } } gplog(classsender: self, log: "🎉setting stackview jobshift...

reactjs - What is the reasoning behind the following Redux paradigm? -

i have been seeing following snippet in couple of react/redux tutorials: componentwillunmount() { this.unsubscribe(); } componentdidmount() { this.unsubscribe = this.context.store.subscribe(() => { this.forceupdate(); }); } what purpose of code? when component unmounted, doesn't code call forceupdate whenever store changes? why want that? i think you're misreading snippet bit. store.subscribe() takes callback run every time action dispatched store. returns function remove specific callback store's list of listeners. in example, component have this.forceupdate() called each time action dispatched. when component unmounted, calls this.unsubscribe() , remove listener store. however, "raw" use of store api in react component anti-pattern. react-redux library abstracts out process of interacting store, , should use connect react components redux. similar abstractions exist angular, ember, vue, , more. there's...

ios - Can I launch a lower version to App Store than previously? -

i inherited ios application version 20.0.0 (looks launched typo). wondering if can lower version down 3.0.0? in word, no. version numbers can go up. if attempt upload binary lower version number, itunes connect balk.

html - CSS `clear: both;` property inside body -

Image
i reading html , css , produced following code. body { width: 752px; font-family: arial, verdana, sans-serif; color: #665544; } div { border: 1px solid #665544; } p { width: 230px; float: left; margin: 10px; } .clear { clear: both; } <!doctype html> <html> <head> <title>parent float - problem</title> </head> <body> <h1>the evolution of bicycle</h1> <div> <p class="one">in 1817 baron von drais invented walking machine him around royal gardens faster.</p> <p class="two">the device know draisienne (or "hobby horse") made of wood, , propelled pushing feed on ground in gliding movement.</p> <p class="three">it not seen suitable place other maintained pathway. </p> <p class="four clear">in 1865, velocipede (meaning "fast f...

applying a function recursively on dataframes in r -

i have 2 dataframes: df1 : fruit basket1 basket2 basket3 basket4 basket5 fruit1 10 9 3 5 1 fruit2 10 10 3 10 1 fruit3 1 10 10 1 10 fruit4 1 1 1 1 1 fruit5 2 2 3 3 3 df2 : fruit basket1 basket2 basket3 basket4 basket5 fruit1 1 0 3 4 1 fruit2 9 10 3 1 1 fruit3 10 10 10 10 10 fruit4 1 10 1 1 1 fruit5 2 20 3 3 3 i want save each row of df1 , df2 2 vectors , set wilcoxon test. right can manually, row row a = as.numeric(as.vector(df1[1,])) b = as.numeric(as.vector(df2[1,])) wilcox.test(a,b) = as.numeric(as.vector(df1[2,])) b = as.numeric(as.vector(df2[2,])) wilcox.test(a,b) and on .....

python - How to make a tree-like survey avoiding excessive usage of if statements? -

i'm trying create questionnaire each answer leads different question (similar decision tree does). it fairy simple accomplish using if-else statements, expect have more branches , depth "tree". i'm afraid @ point won't able read code anymore. is there cleaner, easy read way write this? here's example of figure out far: q1 = raw_input("q1 \n\n1)\n\n2)\n\n3)\n") if q1 == "1": q2 = raw_input("q1.1 \n\n1)\n\n2)\n\n") if q2 == "1": q3 = raw_input("q1.1.1 \n\n1)\n\n2)\n\n3)\n\n") if q2 == "2": q3 = raw_input("q1.1.2 \n\n1)\n\n2)\n\n3)\n\n") if q1 == "2": q2 = raw_input("q1.2 \n\n1)\n\n2)\n\n3)\n\n") if q2 == "1": q3 = raw_input("q1.2.1 \n\n1)\n\n2)\n\n") if q2 == "2": q3 = raw_input("q1.2.2 \n\n1)\n\n2)\n\n") if q2 == "3": q3 = raw_input("q1.2.3 \n\n1)\n\n2)\n...

git - Travis CI running on Docker Image - Switch to last comited branch -

i'm working on operating systems, , want use travis ci continuous integration. basically, os can perform bunch of kernel tests on boot, , want them run @ every push. however, setup environment bit complex, , i'm using docker image want application run on docker image, tavis ci's example doing: https://docs.travis-ci.com/user/docker/ as can see in dockefile of example: https://github.com/travis-ci/docker-sinatra/blob/master/dockerfile , repo clonned inside image, , soin travis ci's configuration file ( https://github.com/travis-ci/docker-sinatra/blob/master/.travis.yml ), have run "make". this easy because project single branch project, me want tests operated lastest comitted branch (the 1 triggered travis's build). which solution think can use this? using environment variables on travis ci pass docker image , checkout branch passed parameter? there not more "classy options"? i think both docker file , .travis.yml files not necess...

video - FFmpeg HLS Segmenting start time miscalculated -

trying re-stream , record hikvision ip camera ffmpeg via hls. so works fine, however, when trying calculate duration of entire day of record, results in mismatches between segmented ts files. so doing in ffmpeg: "ffmpeg", "-rtsp_transport", "tcp", "-stimeout", "3000000", "-re", "-i", stream, "-vcodec", "copy", "-acodec", "libfdk_aac", "-f", "segment", "-segment_list_type", "m3u8", "-segment_list", name, "-segment_list_size", "1", "-segment_format", "mpegts", "-segment_time", "5", segment_filename, and result is: filename cam1-1502731225-000018.ts start_time 90.128000 end_time 96.150489 filename cam1-1502731225-000019.ts start_time 96.128000 end_time 102.150489 filename cam1-1502731225-000020.ts start_time 102.128000 end_time 105.150489...

parsing - PHP Parse/Syntax Errors; and How to solve them? -

Image
everyone runs syntax errors. experienced programmers make typos. newcomers it's part of learning process. however, it's easy interpret error messages such as: php parse error: syntax error, unexpected '{' in index.php on line 20 the unexpected symbol isn't real culprit. line number gives rough idea start looking. always @ code context . syntax mistake hides in mentioned or in previous code lines . compare code against syntax examples manual. while not every case matches other. yet there general steps solve syntax mistakes . references summarized common pitfalls: unexpected t_string unexpected t_variable unexpected '$varname' (t_variable) unexpected t_constant_encapsed_string unexpected t_encapsed_and_whitespace unexpected $end unexpected t_function … unexpected { unexpected } unexpected ( unexpected ) unexpected [ unexpected ] unexpected t_if unexpected t_foreach unexpected t_for unexpected t_while unexpected t_do ...

Using XSLT 1.0 to insert element in middle of XML List -

i have xml 1.0 document need transform xslt 1.0 file. xml need transform looks this: <commandbardata guid="f3016f3c-2847-4557-b61a-a2d05319cf18"> <menubar> <modedata guid="76d73481-9076-44c9-821c-52de9408cce2"> <item guidref="0f948c18-f326-40e5-9beb-2efc73803797"/> <item guidref="6c91d5ab-d648-4364-96fb-3e71bcfaf70d"/> <item guidref="71f8ffd6-46bd-43a3-8256-5412bc2d7741"/> <item guidref="ac291790-gf51-d4s1-f23x-dsf9dfb6fgf5"/> </modedata> </menubar> </commandbardata> i need insert <item guidref="21c1f231-e03e-48e8-916a-d8790442b417"/> after element <item guidref="0f948c18-f326-40e5-9beb-2efc73803797"/> so list this: <commandbardata guid="f3016f3c-2847-4557-b61a-a2d05319cf18"> <menubar> <modedata guid="76d73481-9076-44c9-821c-52de9408cce2"> ...

javascript - Bloodhound.js - No sub-completions of strings -

sub-completions in, if write "og", "dog", right now, implemented standalone .js engine code, , can search "d", , give me "dog, dinner" if search "og", don't "dog", different demos, i'm doing currently... acts.prototype.initializebloodhound = function (myparam) { var options = myparam.split(","); myengine = new bloodhound({ initialize: false, local: options, querytokenizer: bloodhound.tokenizers.whitespace, datumtokenizer: bloodhound.tokenizers.whitespace }); var vret = myengine.initialize(true); vret.fail(function() { assert("bloodhound failed."); }); }; // ... other actions here ... acts.prototype.bloodhoundautocomplete = function (myparam) { myengine.search(myparam, bloodhound_sync, bloodhound_async); } function bloodhound_sync(datums) { lastreturn = datums; } function bloodhound_async(datums) { lastreturn = datums; } i...

android - Firebase database data retrieving -

Image
`i retrying data "news" shown in screen shot , same procedure trying retrieve from"info" in android showing data news not info have tried lot, unable solve please help. i'm doing this: databasereference minfo= firebasedatabase.getinstance().getreference().child("info"); databasereference mdatabase= firebasedatabase.getinstance().getreference().child("news"); it working news, not info. code here ` import android.os.bundle; import android.support.v4.app.fragment; import android.support.v7.widget.linearlayoutmanager; import android.support.v7.widget.recyclerview; import android.view.layoutinflater; import android.view.view; import android.view.viewgroup; import android.widget.textview; import com.firebase.ui.database.firebaserecycleradapter; import com.google.firebase.database.databasereference; import com.google.firebase.database.firebasedatabase; /** * created hp india on 0...

c++ - QMake - How and where to add linker flag? -

Image
i tried add following in .pro file of our project: win32 { ... qmake_lflags_windows += -wl,--large-address-aware } i error link : warning lnk4044: nicht erkannte option /wl,--large-address-aware; wird ignoriert. translation: unrecognised option /wl,--large-address-aware; gets ignored. before tried find out add linker options seems normal variable put in .pro file. searched searchcode entry in option part of .pro file. i added options increase memory limit 32 bit application according this post... i use following qt kit: how apply option functioning? the linker options in .pro file mingw using msvc so... i had add linker flags in msdn documentation slash , linker option in capital letters. largeaddressaware : qmake_lflags_windows += /largeaddressaware

Postgresql timestamps -

currently have 1 column of timestamps showing now: tuesday, august 2, 2016 1:00 pm these time stamps not limited 1 date shows various dates different times. edit these time stamps, whereby if time shown more 10:20pm of day, change time portion 10:20pm example: tuesday, august 2, 2016 23:21 pm change to tuesday, august 2, 2016 22:20 pm tuesday, august 3, 2016 1:00 pm no change essentially, more 22:20 day amend 22:20 while earlier remain before. update table1 set ts = date_trunc('day', ts) + '22:20:00'::interval ts - date_trunc('day', ts) > '22:20:00'::interval

python - Flask/Sqlaclemy: How to do one to many polymorphic inheritance -

i attempting create 1 many polymorphic relationship in flask/sqlalchemy. concept provide temporary data using authorizations table. table have 2 fields, authorizable_id , authorizable_type. authorizable_id refers id of entry referring to. not foreign key can refer different tables. authorizable_type determines table referring to. example, file, 'file'. i've seen how similar sqlalchemy documenation pretty implicit role of fields. in addition, require table being referred (here file), have id foreign key refers table holds relationship (discriminator/id). doing opposite, polymorphic relationship holds id of asset. hoping sqlalchemy had value such "polymorphic_field" can indicate field name. i've added code below. guidance appreciated. thank you! class authorizableinterface(model): __mapper_args__ = { 'polymorphic_identity':'authorizable', } class authorization(model): __tablename__ = 'authorizations' token...

Microsoft Access - Does a value exist for this record? -

Image
forewarning - new microsoft access , have limited knowledge of formulas , expressions. go easy! i've built basic database store , track stories of people nonprofit organization has helped (we're calling them "subjects"). produce various publications , it's important know when , we've featured our subjects, can avoid repeating same content in same publication. when putting content new issue, ask ourselves "okay, haven't featured in publication before?" this i'm trying accomplish right now: able , find out hasn't been used in particular publication. here tables , relationships. a subject's content used in number of publications ("use/type publication") so basically, trying say: if specific value in "use/type publication" field exists "subject(s)" , don't show subject in results or alternatively, results subjects , return value yes/no. i want able input specific value. for exampl...

python - Populating Array with an indexed array -

i have numpy array called "precip" shape (2,3,3) corresponds (time, lat, lon) array([[[ 0.05368402, 0.43843025, 0.09521903], [ 0.22627141, 0.12920409, 0.17039465], [ 0.48148674, 0.59170703, 0.41321763]], [[ 0.63621704, 0.11119242, 0.25992372], [ 0.67846732, 0.3710733 , 0.25641174], [ 0.1992151 , 0.86837441, 0.80136514]]]) i have numpy array called "idx" list of indices, shape (3, 4): array([[0,0,1,1], # time [0,2,0,2], # x coordinate [0,2,0,2]]) # y coordinate so far have been able index "precip" variable "idx" variable array shape (4,), ie. >>>accum = precip[idx[0,:],idx[1,:],idx[2,:]] array([ 0.05368402, 0.41321763, 0.63621704, 0.80136514]) but, need array of zeros "accum" shape (3,3), populated sum of "precip" each pair of coordinates in "idx". other gridpoints not listed in "idx" 0. basically want array ...