Posts

postgresql - How to store dates with different levels of precision in postgres? -

i storing data on journal papers pubmed in postgres, , want store publication date of paper. however, date just year (see pubdate field), month , year, , day, month , year. what's sensible way store data in database? if use postgres date field, need specify day , month well, i'll need invent them in cases, , don't idea of losing information date's precision. for purposes think need year, don't know true possible future purposes. perhaps should have text fields day , month , year , , can convert them date field in future if need them? i store date , store precision well. for example: create type date_prec enum ('day', 'month', 'year'); create table pub ( pub_id integer primary key, pub_date date not null, pub_date_prec date_prec not null ); then can query table this: select pub_id, date_trunc(pub_date_prec::text, pub_date)::date pub; to ignore “random” day , month values in pub_date .

visual studio - Open Dynamics CRM solution with CRM Developer Extensions -

i have solution, developed in vs2012 microsofts crm toolkit . there way open in vs2015? errormessage: workflow\workflow.csproj: application project type based on not found. i have installed jason lattimer's crm developer extensions and it's great new projects, old projects? you have 2 options. first rewrite old workflows in jason lattimers crm developer extensions. second install crm developer toolkit on vs2015 - it's bit tricky not impossible, here can find how vs2013 2015 similar.

intellij idea - Java home path differs -

hello try execute project bootrun on intellij , followign error: execution failed task ':bootrun'. > process 'command '/usr/lib/jvm/java-1.8.0-openjdk- 1.8.0.101-1.b14.fc24.x86_64/bin/java'' finished non-zero exit value 1 i checked results of java paths , stuff , here there echo $java_home /home/mypc123/downloads/jdk1.8.0_101/bin/java $ java /usr/bin/java i have jdk1.8.0 in /usr/bin i looked more indepth , found this: error org.apache.tomcat.jdbc.pool.connectionpool - unable create initial connections of pool. org.postgresql.util.psqlexception: fatal: role "syn12" not exist however when connect postgresql have syn12 role , gradle jvm's in form usr/lib/jvm/java....... well got down : can't load library: /opt/symmetry/ste/java/libste-java.so ,how can install library? seems have project jdk pointed installation. second issue different, incorrect jdbc url hap...

android - BitmapFactory decode returns null -

i dealing weird thing in android now. code used work till few days ago stops working. selecting image gallery , want bitmap object of it. code: imgdecodablestring = "/storage/emulated/0/dcim/camera/img_20160114_141351594.jpg" bitmap decodedbitmap = bitmapfactory.decodefile(imgdecodablestring); log.d(constants.tag, "decodedbitmap: " + decodedbitmap); bitmap null (used work) , don't wrong. didn't changed code. had problem? thank you. i have permissions: <uses-permission android:name="android.permission.read_external_storage"/> <uses-permission android:name="android.permission.write_external_storage"/> if (checkpermission(youractivity.this, manifest.permission.write_external_storage)) { // have permission go ahead string imgdecodablestring = "/storage/emulated/0/dcim/camera/img_20160114_141351594.jpg"; if(new file(imgdecodablestring).exists()){ bitmap decodedbitmap = bitmapfactory.decodefile...

java - Short circuit logical operators over Iterable -

consider following code, loop can finish hits false value. there better way checking false after each iteration? boolean result = true; list<boolean> blist = new arraylist<>(); (boolean b : blist) { result = result && b; if (!result) { break; } } what about if (blist.contains(false)) { ...

android - When I try to install signed apk then it give me error "Application not installed" -

i running app on devices android studio direct working fine. have uninstalled unsigned apk application manager. when trying install signed apk sd card give me error "application not installed". device android version 6.0.1. not sure what's problem. tried every thing same problem. please me out , in advance. change application package name my.app.pack my.app.pack.1 remove application/photos increase memory.

visual c++ - How to force CMFCPropertyGridCtrl to refresh after adding an item? -

i add item cmfcpropertygridctrl, new item not show if click cmfcpropertygridctrl. now have indirect solution show new item calling expandall() , don't want expand have collapsed. is there way show new item gracefully ? after cmfcpropertygridproperty.addsubitem() call, new item show following 2 calls: yourgridctrl.adjustlayout(); yourgridctrl.redrawwindow(); hope helps !