Posts

Showing posts from July, 2011

MySQL performance issue comparing 2 DateTime fields on the same table -

my feed_listingjob has 2 datetime fields: +------------+-------------+------+-----+---------+----------------+ | field | type | null | key | default | | +------------+-------------+------+-----+---------+----------------+ | id | int(11) | no | pri | null | auto_increment | | data | longtext | no | | null | | | meta_data | longtext | no | | null | | | state | varchar(25) | no | | null | | | error | longtext | no | | null | | | job_id | int(11) | no | mul | null | | | created_at | datetime(6) | no | mul | null | | | updated_at | datetime(6) | no | mul | null | | | es_sync_at | datetime(6) | yes | mul | null | | +------------+-------------+------+-----+---------+----------------+ updated_at , es_sync_at both indexed individually below:...

c++11 - Reading multiple column and put them in vector in c++ -

i have file containing values in 15 columns , 1000+ rows. 45285785.00 45285797.00 45285776.00 45285795.00 45285785.00 45285803.00 45285769.00 45285773.00 45285771.00 45285795.00 45285771.00 45285798.00 45285796.00 45285797.00 45285753.00 35497405.00 35497437.00 35497423.00 35497465.00 35497463.00 35497468.00 35497437.00 35497481.00 35497417.00 35497479.00 35497469.00 35497454.00 35497442.00 35497467.00 35497482.00 46598490.00 46598483.00 46598460.00 46598505.00 46598481.00 46598480.00 46598477.00 46598485.00 46598494.00 46598478.00 46598482.00 46598495.00 46598491.00 46598491.00 46598476.00 i want read file. way i'm doing right taking 15 variables , put them vectors individually. double col1, col2, ... , col15; vector <double> c1, c2, ..., c15; ifstream input('file'); while(input >> col1 >> col2 >> ... >> col15) { c1.push_back(col1); c2.push_back(col2); ... c15.push_back(col15); } is there better way this? mean witho...

ruby on rails - Bizarre Rails4 error when using link_to -

this line of code: <%=link_to('click video.', image_path("create_institution.gif"), :target => "_blank")%> is throwing error: couldn't find image 'id'=create_institution request parameters {"action"=>"show", "controller"=>"images", "id"=>"create_institution", "format"=>"gif"} is problem routes or else? "create_institution.gif" in /assets/images have model "images" have not had problem using images elsewhere. pastebin of my routes.rb in application, have image resource , why image_path resolves images#show from documentation of image_path , if have images application resources method may conflict named routes. alias path_to_image provided avoid that. rails uses alias internally, , plugin authors encouraged so. so, can use path_to_image resolve this. <%=link_to('click video....

ios - CGPathAddArc clockwise and anticlockwise confusion -

Image
below code draws arc m_pi/2 m_pi . cgcontextref contet=uigraphicsgetcurrentcontext(); cgmutablepathref path = cgpathcreatemutable(); cgpathaddarc(path, null, cgrectgetmidx(rect), cgrectgetmidy(rect), cgrectgetmidx(rect), m_pi/2.0,m_pi, yes); cgcontextaddpath(contet, path); cgcontextsetstrokecolorwithcolor(contet, [uicolor redcolor].cgcolor); cgcontextstrokepath(content); below drawing of above code. i expecting draw in empty or missing part , clockwise. referred answer why giving addarcwithcenter startangle of 0 degrees make start @ 90 degrees? but, don't know wrong. you should pay more attention method used. cgpathaddarc(path, null, cgrectgetmidx(rect), cgrectgetmidy(rect), cgrectgetmidx(rect), m_pi/2.0,m_pi, no); just change last parameter no, want, can control drawing direction.

c++ - Boost directory iterator "no such file or directory" -

i using boost::filesystem::directory_iterator iterate on contents of folder(non-recursively) , count how many elements in folder. able iterate on entire folder, when boost::filesystem::directory_iterator advances end iterator error thrown: libc++abi.dylib: terminating uncaught exception of type boost::filesystem::filesystem_error: boost::filesystem::directory_iterator::construct: no such file or directory i not see how using directory iterator incorrectly in code, code throws error: boost::filesystem::path pcdfiledir(getpcdfilepath().string().substr(0, getpcdfilepath().string().find_last_of(boost::filesystem::path::preferred_separator))); std::cout << "pcdfiledirectory: " << pcdfiledir.string() << std::endl; size_t file_count = 0; for(boost::filesystem::directory_iterator itr(pcdfiledir); itr != boost::filesystem::directory_iterator(); ++itr){ std::cout << itr->path() << std::endl; file_count++; ...

spring - Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.5.0:java (default-cli) on project nextrtc-signaling-serverrror -

i tested nextrtc-signaling-server opensource java. encountered building maven problem. hope solved. my console log. [info] building jar: d:\signallinserver\nextrtc-signaling-server\target\nextrtc-signaling-server-0.0.4-snapshot-javadoc.jar [info] [info] --- exec-maven-plugin:1.5.0:java (default-cli) @ nextrtc-signaling-server --- [info] ------------------------------------------------------------------------ [info] build failure [info] ------------------------------------------------------------------------ [info] total time: 12.430 s [info] finished at: 2016-08-29t11:12:34+09:00 [info] final memory: 26m/223m [info] ------------------------------------------------------------------------ [error] failed execute goal org.codehaus.mojo:exec-maven-plugin:1.5.0:java (default-cli) on project nextrtc-signaling-server: parameters 'mainclass' goal org.codehaus.mojo:exec-maven-plugin:1.5.0:java missing or invalid -> [help 1] [error] [error] see full stack trace ...

osx - Mac OS X - Git repository at user home -

i wanted free disk space on mac, , using omnidisksweeper, found there .git folder in /users/oliverni took 25 gb of space. i wondering why there, used github desktop view repository. turns out, there no history, 77,721 uncommitted changes. thought little useless, , wanted delete it, don't know if it's being used system or not. delete it. os x doesn't ship git installed default rest assured, not system files. in future, please direct these types of questions super user because stack overflow not correct place ask. thanks!

multithreading - c++ Armadillo matrix circular buffer and row assignment -

i'm trying populate arma::mat data_mat(n,n) streaming data of size n in each time step. high frequency real time system. so, efficiency , thread safety important design goals. in mind, 1) best (efficient,threadsafe) way populate data_mat vector (double/float) in each time step until finished populating n rows. 2)after n rows populated,the rows should circularly buffered row elements being shifted upward or downward. i tried data_mat.row(i)=vec however,i'm not sure if efficient way. , i'm emulating circular buffer copying in loop guess not efficient. advice highly appreciated.

ios - Resize TableView Height after -

Image
i have uitableview inside regular viewcontroller , i'd adjust tableview's entire height. i created tableview through storyboard, , i'm loading data api in viewdidload . set cells in typical tableview method. override func viewdidload() { self.loadperformers() setuptableview(performerstableview) } func setuptableview(tableview: uitableview) { tableview.datasource = self tableview.delegate = self tableview.estimatedrowheight = 90 tableview.rowheight = uitableviewautomaticdimension } func tableview(tableview: uitableview, cellforrowatindexpath indexpath: nsindexpath) -> uitableviewcell { if tableview == self.performerstableview { let performercell = tableview.dequeuereusablecellwithidentifier("performercell", forindexpath: indexpath) as! performerstableviewcell let performer = self.performersarray[indexpath.row] performercell.performerpic.image = getperformerimage(performer.english_name...

spring - How to get the current info of the JedisPool -

when use spring-data-redis inject redisconnectionfactory , setup poolconfig, how can infomation of pool in runtime, because found factory not expose pool. thank advance.^.^ my code : @bean public redisconnectionfactory jedisconnectionfactory() { jedispoolconfig poolconfig = new jedispoolconfig(); poolconfig.setmaxidle(128); poolconfig.setjmxenabled(true); poolconfig.setmaxtotal(8); poolconfig.setminidle(2); jedisconnectionfactory factory = new jedisconnectionfactory(poolconfig); factory.sethostname("localhost"); factory.setport(6379); factory.setusepool(true); return factory; }

Include fields in message of PHP contact form -

being bad @ php, i've decided post here last resort. want add "who" variable message body of emails sent via php contact form. form works fine name, email , message "who" input part of email message comes through, way communicate being referred. i have tried add $who=$_request['who']; $who mail line neither work, latter doesn't send email @ all. <?php $action=$_request['action']; if ($action=="") /* display contact form */ { ?> <form action="" method="post" enctype="multipart/form-data"> <input type="hidden" name="action" value="submit"> <input name="name" type="text" placeholder="your name" value="" size="14"/> <input name="email" type="text" placeholder="your email" value="" size="14"/> <textarea name="...

android - how to stop timer before onclick event and start after onclick event -

how stop timer before onclick event , start after onclick event? starttimer() function should called after button click event completed after click button it's not working. how fix issue? here's code: protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_words); timer = new timer(); timer.scheduleatfixedrate(new timertask() { @override public void run() { if(!test){ sp.playmusic(); test = true; } else{ sp.playmusic1(); test = false; } } }, 0, 7000); txtone = (imageview)findviewbyid(r.id.imageview); txttwo = (imageview)findviewbyid(r.id.imageview2); txtone.setonclicklistener(this); txttwo.setonclicklistener(this); @override public void onclick(view v) { switch(v.getid()) { case r.id.imageview:...

r - rbindlist data.tables different dimensions -

i perform function multiple times different outputs exemplified. require(data.table) myfunction<-function(x){ dt1<-data.table(a=c(1,2,3),b=c("a","b","c")) dt2<-data.table(d=c(4,5,6), e=c("d","e","f")) return(list(dt1=dt1, dt2=dt2)) } result<-lapply(1:2, myfunction) i want bind results . desired output 1 showing. real example uses hundreds of tables. l1<-rbindlist(list(result[[1]]$dt1, result[[2]]$dt1), idcol = true) l2<-rbindlist(list(result[[1]]$dt2, result[[2]]$dt2), idcol = true) desired_output<-list(l1, l2) i use option not working: rbindlist data.tables wtih different number of columns ====================================================================== update the option @nicola proposed doesn´t work when number of elements of list diferent 2. first example (dt1 , dt2). solution create variable "l" calculate number of elements inside list of function. new example soluti...

php - How to remove duplicates and the original one from a multidimensional array? -

how can delete duplicates in multidimensional array? tried several answers found on stackoverflow none of them works me in multi array. closest answer found this: how delete duplicates in array? worked on single-dimensional array. for example have this: $array = array( [0] = array( [color] => red, [type] => color, [name] => color1 ) [1] = array( [color] => gray, [type] => color, [name] => color2 ) [2] = array( [color] => blue, [type] => color, [name] => color3 ) [3] = array( [color] => green, [type] => color, [name] => color4 ) [4] = array( [color] => black, [type] => color, [name] => color5 ) [3] = array( [color] => gray, [type] => color, [name] => color2 ) [4] = array( [color] => blue, [type] => color, ...

javascript - React Native / Redux - setState - Cannot update during an existing state transition -

Image
i'm building app using react native , redux , have come across problem during implementation. i'm receiving error says setstate cannot update during existing state transition (such within render or component's constructor). when load app simulator, seems trigger handlelogin() right away (and on loop) before user input. here's authenticationcontainer , authenticationpage code: authenticationcontainer.js: 'use strict' import react, { component, proptypes } 'react'; import authenticatepage '../../components/authenticate/authenticatepage' import { connect } 'react-redux'; import { bindactioncreators } 'redux' import * sessionactioncreators '../../redux/session'; import {actions, actionconst} 'react-native-router-flux' class authenticatecontainer extends component { constructor(props) { super(props); this.state = { email: '', pa...

swift - Error in pageviewcontroller cannot convert [AnyObject] to expected arguments -

i new ios developer , doing pageviewcontroller in take 4 labels , these 4 label while shown on each screen respectively.but getting error while taking in array in code in have shown var pageviewcontroller:uipageviewcontroller! var label:nsarray! override func viewdidload() { super.viewdidload() // additional setup after loading view, typically nib. self.label = nsarray(objects: "1", "2", "3", "4") self.pageviewcontroller = self.storyboard?.instantiateviewcontrollerwithidentifier("pageviewcontroller") as! uipageviewcontroller self.pageviewcontroller.datasource = self var startvc = self.viewcontrolleratindex(0) contentviewcontroller var viewcontrollers = nsarray(object: startvc) self.pageviewcontroller.setviewcontrollers(viewcontrollers [anyobject], direction: .forward, animated: true, completion: nil) self.pageviewcontroller.view.frame = cgrectmake(0, 0, self.view.frame.width, self.view.frame...

How to update only one column value in database using Entity Framework? -

i have table columns username , password . data can updated admin table. now want add new column named isagree (as flag), need set when user logs in first time. while setting data, should not affect other column data, send usename , isagree flag object. flgdetail = { usename:"vis" isallowed:true } [route("api/termsandcondition/setflag")] public ihttpactionresult post(flagdetails flagdetail) { var user = _context.table.where(s => s.username == flagdetail.username); } should use post or put? how can update 1 column? and should not affect other columns. you can use either post or put .it's not problem.you can update shown below. [route("api/termsandcondition/setflag")] public ihttpactionresult post(flagdetails flagdetail) { var user = _context.table.where(s => s.username == flagdetail.username); user.isagree =flagdetail.isallowed; _context.savechanges() }

SQL - last datetime -

Image
i have select select fisrttable.[date , time],fisrttable.[new value],secondtable.[registering date] fisrttable join secondtable on fisrttable.[new value] = secondtable.[new value] secondtable.[registering date] >= '26-05-2015 0:00' i need select retrieve last datetime [new value], have but want last row time use below query. with cte_1 (select fisrttable.[date , time],fisrttable.[new value],secondtable.[registering date], row_number()over(partition fisrttable.[new value] order fisrttable.[date , time] desc) rno fisrttable join secondtable on fisrttable.[new value] = secondtable.[new value] secondtable.[registering date] >= '26-05-2015 0:00') select [date , time],[new value],[registering date] cte_1 rno=1

sql - how to select sepecific email domain from email column -

i have cust_tbl 1 of column email , user_id. i have many records in cust_tbl, want show record have specific email domain (like @gmail.com) , user user_id = 'sysadmin1'. i have tried query select substr(email,instr(email,'@gmail.com')) corp_usr user_id = 'sysadmin1'; but shows email column (i want column filter) , still shows email that's not @gmail.com what correct query this? just use instr() in where clause : select * corp_usr user_id = 'sysadmin1' , instr(email,'@gmail.com') > 0;

xml - Not able to get value of data if it has <b> or <i> in Word Template using VBA -

i able read xml file , convert in array successfully. want add formatting in data. reason have added , tag in xml not able value of tag if has or or other formatting tag. here code: <?xml version="1.0" encoding="utf-8"?> <testclass> <testobject> <site><b><i>whatsapp</i></b></site> <url>https://www.whatsapp.com/abc/</url> </testobject> <testobject> <site>facebook</site> <url>https://www.facebook.com/xyz/</url> </testobject> <testobject> <site>twitter</site> <url>https://www.twitter.com/abc/</url> </testobject> </testclass> code: dim oxmlfile object dim xmlfilename string dim sites object dim urls object set oxmlfile = createobject("microsoft.xmldom") xmlfilename = "c:\users\abc\desktop\files\test.xml" oxmlfile.load (xmlfilename) set sites = oxmlfi...

ios - How can I place a UILabel below an UIImageView such that it is always evenly placed -

Image
i have made custom pop view looks this i want place label of user name below user image rounded uiimageview in given image i want user name placed evenly irrespective of size of text. want name appear this align label content center. set constraint label image view. horizontally center label image view.

Docker shared volume creation -

i trying create docker volume shared between 2 hosts. let's have 2 hosts , b. when volume created on host following command: docker volume create --driver local --opt type=nfs --opt o=addr=b,rw --opt device=:/tmp/dir --name foo after inspection of volume, result following: docker volume inspect foo [ { "name": "foo", "driver": "local", "mountpoint": "/var/lib/docker/volumes/foo/_data", "labels": {}, "scope": "local" } ] my question is: why mountpoint directory of volume doesn't point directory /tmp/dir, default docker volume location? how can consider data in directory host b/tmp/dir sharable? thanks in advance!

android - Data binding in library module -

i have project 2 modules: library , example. working fine since use data binding in library module. when try use class in example module databinding usage app crashes with: caused by: java.lang.noclassdeffounderror: failed resolution of: lcom/app/test/databinding/textitembinding; i'm using gradle 2.1.2 , tested 2.2.0-beta2 . both modules has import for: databinding { enabled true } when move code of databinding single module project code working correctly. has had similar problem? found resolution, had: testcoverageenabled true in debug section showing error.

openerp - How to upload image from android to Odoo -

i used xml-rpc upload image, worked me, slow! image size 3.5m , took 3 minutes upload hashmap map = new hashmap(); map.put("res_model", res_model); map.put("res_name", res_name); map.put("type", "binary"); map.put("res_field","image"); map.put("res_id", res_id); map.put("name", "image"); map.put("datas", image2base64(imagepath)); models.execute("execute_kw", aslist( db, uid, password, "ir.attachment", "create", aslist(map) )); and image2base64 method: private string image2base64(string path){ file file = new file(path); string str = null; try { // reading image file file system fileinputstream imageinfile = new fileinputstream(file); byte imagedata[] = new byte[(int) file.length()]; imageinfile.read(imagedata)...

javascript - How can I execute js functions onClick just after form is loaded -

i have form , 2 buttons: <input type="button" name="btn" onclick="a()" value="--->"><br> <input type="button" name="btn" onclick="b()" value="<---"> in javascript.js file have: function a(){ console.log("a"); } function b(){ console.log("b"); } i want call function (just when click buttons) when document loaded. how can do? code included inside $( document ).ready() run once page document object model (dom) ready javascript code execute. $(document).ready(function(){ a(); //executes function on dom load b(); // executes function b on dom load }); you can use $( window ).load() , gets executed after entire page (images or iframes), not dom, ready. $(window).load(function(){ a(); //executes function on page load b(); // executes function b on page load });

Ruby Key Using Split and Join -

i have written exam here, here's instruction. write program prints out groups of words anagrams. anagrams words have same exact letters in them in different order. output should this: ["demo", "dome", "mode"] ["neon", "none"] (etc) and here's solution this: words = ['demo', 'none', 'tied', 'evil', 'dome', 'mode', 'live', 'fowl', 'veil', 'wolf', 'diet', 'vile', 'edit', 'tide', 'flow', 'neon'] result = {} words.each |word| key = word.split('').sort.join if result.has_key?(key) result[key].push(word) else result[key] = [word] end end result.each |k, v| puts "------" p v end i've been trying understand ruby code solution can't grasp it. 1 of question how can test result hash if has no key or element contain it....

audio - Play specific frequency with javascript -

i want function works this: playsound(345, 1000) which play tone of 345 hz 1000 milliseconds. simplest way achieve in javascript? don't mind if uses sample (maybe of sin wave, or piano), or uses computer's hardware generate sound. as pointed out in comments, way through oscillatornode. var audioctx = new (window.audiocontext || window.webkitaudiocontext)(); function playnote(frequency, duration) { // create oscillator node var oscillator = audioctx.createoscillator(); oscillator.type = 'square'; oscillator.frequency.value = frequency; // value in hertz oscillator.connect(audioctx.destination); oscillator.start(); settimeout( function(){ oscillator.stop(); }, duration); } also, made simple fiddle playing star wars imperial march

office365 - In Office Apps - Cannot redefine non-configurable property 'context'" -

this similar in office apps excel 2013 - cannot redefine non-configurable property 'context'" . however happens on ie 11 , edge. use case followin: open outlook or office application add-in. run pop-up oauth, on popup close redirect iframe page. first time open addin , finish oauth flow working correctly. when close add-in , open again (this time redirect done automatically because user authentication , recognized cookie) office add-in fails start, when restart manually few times open , work correctly. error i'm getting is: cannot redefine non-configurable property 'context' in office.js (o15apptofilemappingtable.js (11,3563)) edit: issue occurs on firefox , chrome, handled more gracefully , add-in doesn't crash, starts error logged console. in end issue there 2 office.js libraries of different version referenced. when older 1 removed, issue gone.

grouping List of Objects and counting using Java collection -

which java collection class better group list of objects? i have list of messages users below: aaa hi bbb hello ccc gm aaa can? ccc yes ddd no from list of message object want count , display aaa(2)+bbb(1)+ccc(2)+ddd(1) . code help? putting pieces couple of other answers, adapting code other question , fixing few trivial errors: // want sorted list of keys, should use treemap map<string, integer> stringswithcount = new treemap<>(); (message msg : convinfo.messages) { // ever input comes from: turn lower case, // "ccc" , "ccc" go same counter string item = msg.username.tolowercase(); if (stringswithcount.containskey(item)) { stringswithcount.put(item, stringswithcount.get(item) + 1); } else { stringswithcount.put(item, 1); } } string result = stringswithcount .entryset() .stream() .map(entry -> entry....

html - CSS - box-shadow not appearing when using :before and z-index -

my goal prevent box-shadow overlapping on top of nearby elements using :before , z-index . but shadow going underneath container of list item casts because of z-index . it works fine if parent container body . is there workaround regarding or should change html , css html (pug) div#main ul li li li css (stylus) #main background-color lightyellow height 300px width 300px ul padding 10px li background-color lightblue height 50px width 50px margin 10px position relative &::before content '' box-shadow 0px 0px 15px 20px rgba(0,0,0,0.5) position absolute top 0px right 0px bottom 0px left 0px z-index -1 you using absolutely positioned pseudo elements without setting position: relative parent, i.e. why causing type of issues haven't set basic css rules better results as: code snippet html, body { margin: 0; padding: 0; } * { -webkit-box-sizing: b...

SignalR with Azure causes Bad gateway error 502 -

Image
i have setup site on azure causing bad gateway error though it's working fine on local machine. here's error facing: also failed request logs contains following error: signalr logs following: signalr logs i adding following line startup.cs configuration method: globalhost.dependencyresolver.usesqlserver(sqlconnectionstring) but sql azure doesn't support , that's causing issue.

Echo total in array codeigniter -

how echo total out of array created model function count { $this->db->select('user_id, count(user_id) total); $this->db->group_by('user_id'); $this->db->order_by('total', 'desc'); $query = $this->db->get('tablename', 10); return $query->result_array();} controller data [total] = $this->mymodel->count(); vardump count function current arrays array = user_id => 1 total. => 2 examle i.need echo total in view

html - Python Mechanize: How to download a file custom buttons -

i'm trying download file website in page source there no tags related buttons or forms. using custom buttons. page source like var labels={"kind":"template type","format":"file format","btn_generate":"generate template","btn_cancel":"cancel","btn_start":"start import","btn_back":"back overview","legend":"mandatory fields <span class='marked'>blue</span>"}; from above code "btn_generate":"generate template" button. normally if click on button in webpage download file. i'm parsing page source , getting value of "btn_generate" "generate template" . now want apply button click on "btn_generate":"generate template" download file. as, not sure whether possible or not. my code: #!/usr/bin/python import mechanize cookies import * mycookie = cookiee(...

html - Antialias not working on pictures in python WebKit.WebView -

i have pygtk app embedded webkit.webview displaying webpage text , pictures. have map form openstreetmap. fonts , maps correctly antialiased, pictures not. happends on raspberry pi 3 (because of arm version of webkit suppose) same app on pc works fine it due webkit browser or html page? any advice me understand going on? is there way get/set antialiasing option on webview can perform test? edit: i know due webkit. if open webpage browser in raspbian you'll see images not antialiased. i installed chromium , antialias working fine it how fix this?

Clear service worker cache from Android API -

we have native andorid app webviews. using service worker functionality in android webviews. http://www.html5rocks.com/en/tutorials/service-worker/introduction/ is there way clear out service worker cache android api? want clear cache when user logs out android app. i'm not android developer, webstorage#deletealldata() method looks accomplish you'd want. if doesn't, sounds bug, , i'd recommend follow via whatever mechanism used android framework bugs. alternatively, , since web developer, here's javascript approach clearing things out. note you're referring "service worker cache" isn't limited service workers; cache storage api exposed in both work global scope , window.caches , used directly context of web pages. can run code deletes of caches directly web page execution context, without jumping through hoops trigger service worker: caches.keys() .then(cachenames => promise.all(cachenames.map(cachename => caches.dele...

Reverse Engine of Entity Framework Core -

greetings have existing database , going build application using asp.net core, based on tutorial , i've installed packages entity framework core, have reverse tables, tutorial said used command: scaffold-dbcontext "server= (localdb)\mssqllocaldb;database=rfid;trusted_connection=true;" microsoft.entityframeworkcore.sqlserver -outputdir models however keeps getting me error: invalid json file in c:\users\user11\documents\visual studio 2015\projects\coreoas\src\coreoas\project.json what should do? if have comment below above error emit.so have remove that. wrong : // required ef <--- issue "buildoptions": { "emitentrypoint": true }, correct way : "buildoptions": { "emitentrypoint": true }, you can read more here : their (json) decision not support comments

java - I need to convert PDDocument to File Object -

i trying split pdf document through org.apache.pdfbox.multipdf.splitter , need perform file operations on single page pddocument , how can convert pddocument file object in java? with apache commons inputstream = null try { pddocument document = pddocument.load(filepath); file targetfile = new file("nameoffile.pdf"); pdstream ps = new pdstream(document); = ps.createinputstream(); fileutils.copyinputstreamtofile(ps.inputstream(), targetfile); } catch (ioexception io) {} { if (is != null) ioutils.closequietly(is); }

fortran - How to correctly use mkl_domatcopy from MKL? -

i need find faster way transpose matrix using mkl. , tried mkl_domatcopy mkl never right. here test code(fortran): program main integer, parameter:: nrow = 3 !rows integer, parameter:: ncol = 3 !cols real*8, allocatable:: m(:,:) real*8, allocatable:: mt(:,:) integer:: i,j allocate(m(nrow,ncol)) allocate(mt(nrow,ncol)) = 1, nrow j = 1, ncol m(i,j)=i end end call mkl_domatcopy("c","t",3,3,9,m,3,mt,3) print *,m print *,"************************" print *,mt end and output is: 1.00000000000000 2.00000000000000 3.00000000000000 1.00000000000000 2.00000000000000 3.00000000000000 1.00000000000000 2.00000000000000 3.00000000000000 ***...

git - List of commands with --porcelain option available -

is there public official (or maybe not) list of git commands, --porcelain option available? or should manually review each of them in the porcelain commands list ? i've managed google following three: git status --porcelain git push --porcelain git blame --porcelain but there more? , if not, can find somewhere information on whether additional appear , when? upd: here full list of collected available commands --porcelain option (based on answers below): git status --porcelain git push --porcelain git blame --porcelain git commit --porcelain git worktree list --porcelain will try keep up-to-date new information available. please if find new, leave response in comments or answer. you can combine: git/git/search?l=bash&q=porcelain git/git/search?l=c&q=porcelain that confirm have: git commit --porcelain git worktree list --porcelain for more on meaning of porcelain, see answer " what term “porcelain” mean in git? " the mean...

error 24 13 android studio faild to resolve -

Image
i want add library project in android studio, gave me error no matter library is. error when want add library: error:(24, 13) failed resolve: com.squareup.retrofit2:retrofit:2.1.0 do have sync project in online mode add library? sync project online work sync never ended. open android studio , file -> settings , search offline find gradle category contain offline work . disable there.

python - I got an error while using "heroku open" command -

i'm created python app on heroku. after pushing gave heroku open command , got error on browser this application error error occurred in application , page not served. please try again in few moments. if application owner, check logs details. i check logs using command heroku logs ,i got 2016-08-29t09:53:21.255789+00:00 heroku[api]: enable logplex aparnabalagopal328@gmail.com 2016-08-29t09:53:21.255849+00:00 heroku[api]: release v2 created aparnabalagopal328@gmail.com 2016-08-29t09:54:11.279935+00:00 heroku[api]: attach database (@ref:postgresql-parallel-41683) aparnabalagopal328@gmail.com 2016-08-29t09:54:11.280127+00:00 heroku[api]: release v3 created aparnabalagopal328@gmail.com 2016-08-29t09:54:11.802177+00:00 heroku[api]: scale web=1 aparnabalagopal328@gmail.com 2016-08-29t09:54:11.802730+00:00 heroku[api]: deploy 07b053c aparnabalagopal328@gmail.com 2016-08-29t09:54:11.802825+00:00 heroku[api]: release v4 created aparnabalagopal328@gmail.com 2016-08-29t09:54:12....

sql - Is that possible to write the below query using CTE recursion? -

create table #temp (date date) declare @x date set @x = '2016-7-01' declare @y date set @y = cast (getdate() date) while(@x<=@y) begin if (datename(weekday,@x) = 'sunday') insert #temp values (@x) set @x = cast(((cast(@x datetime))+1)as date) continue end select * #temp drop table #temp is possible write above query using cte recursion? you can use cte create numbers table. can use numbers table dates so: declare @startdate datetime = '2016-07-01' declare @enddate datetime = '2016-08-29' ;with n0 (select 1 n union select 1) ,n1 (select 1 n n0 t1, n0 t2) ,n2 (select 1 n n1 t1, n1 t2) ,n3 (select 1 n n2 t1, n2 t2) ,n4 (select 1 n n3 t1, n3 t2) ,nums (select row_number() on (order (select 1)) num n4) select dateadd(day,num-1,@startdate) thedate nums num <= datediff(day,@startdate,@enddate) + 1 , datename(weekday, dateadd(day,num-1,@startdate)) = 'sunday' each table ( n0 nums ) multiplies number of rows in previous '...

How to pass an object from a view to a controller in ionic -

i pass object view controller , don't know ow ... the object checked musics : <label class="item item-input" id="lbl-name-playlist"> <input ng-model="nom" type="text" placeholder="nom de la playlist"> </label> <div class="list"> <ion-list ng-repeat="lamusique in lesmusiques" ng-model="lamusique"> <ion-checkbox class="item" ng-model="ischecked">{{lamusique.titre}} - {{lamusique.artiste}}</ion-checkbox> </ion-list> </div> <button class="button button-full button-balanced" ng-click="createplaylist(nom, lamusique)">enregistrer</button> and controller : $scope.createplaylist = function(nomplaylist, lamusique){ var nom = nomplaylist; //console.log(nom); var lesmusiquesselectionnees = lamusique; console.log(lamusique); }; console.log(lamusique) show me "unde...

css - how to make wordpress header transparent -

hello working on wordpress thrive theme "squared", trying make header of theme transparent. i have searched online , tried saw, still shows white instead of transparent. have tried header { background: transparent; font-weight: 400; padding-top: 10px; padding-bottom: 10px; } this site trying make header transparent http://digitalmarketer.mu/?page_id=65 please there has been able overcome such, please help, thanks it's not element showing white, it's what's behind white. if want transparent menu overlayed on hero photo, need set header background:transparent; , set #floating_menu either position: fixed or position: absolute; . position:fixed 1 want, since named "floating menu" (fixed position keep menu @ top of viewport).

java - How to create seprate log file for all Level in log4j -

my requirement create separate log file each level info,warn,error etc , each day should create new file myapp_info_log_29-8-2016.log if 1 have kind of property file request pls share me file or code. current code : # root logger option log4j.rootlogger=info, file, stdout # direct log messages log file log4j.appender.file=org.apache.log4j.rollingfileappender log4j.appender.file.file=c:\\webapps\\path\\fc_info.log log4j.appender.file.datepattern='.'yyyy-mm-dd log4j.appender.file.append=true log4j.appender.file.layout=org.apache.log4j.patternlayout log4j.appender.file.layout.conversionpattern=%d{yyyy-mm-dd hh:mm:ss} %-5p %c %3x - %m%n log4j.appender.file.maxfilesize=10mb log4j.appender.file.maxbackupindex=10 log4j.rootlogger=warn, file, stdout # direct log messages log file log4j.appender.file=org.apache.log4j.rollingfileappender log4j.appender.file.file=c:\\webapps\\logs\\fc_warn.log log4j.appender.file.datepattern='.'yyyy-mm-dd log4j.appender.file.append=tr...

Difference between binary and character datatype in MySQL? with examples and limitation -

what difference between binary , character datatype in mysql? need examples , limitation info the binary , varbinary types similar char , varchar, except contain binary strings rather nonbinary strings. is, contain byte strings rather character strings. means have no character set, , sorting , comparison based on numeric values of bytes in values. more details http://www.tutorialspoint.com/mysql/mysql-data-types.htm http://dev.mysql.com/doc/refman/5.7/en/binary-varbinary.html and read mysql "binary" vs "char character set binary"