Posts

php - Display custom attributes before WooCommerce upsells ( linked products) -

Image
i manage display custom attributes shown after linked products how can make them appear before? on left: have, right desired result thanks if woocommerce template content-single-product.php see that: /** * woocommerce_after_single_product_summary hook. * * @hooked woocommerce_output_product_data_tabs - 10 * @hooked woocommerce_upsell_display - 15 * @hooked woocommerce_output_related_products - 20 */ do_action( 'woocommerce_after_single_product_summary' ); that means in woocommerce_after_single_product_summary hook, following displayed: first (with priority of 10) product tabs, then (with priority of 15) upsells, and finish (with priority of 20) related products. so if want display custom code between product tabs , upsells, need use custom function hooked in woocommerce_after_single_product_summary action hook priority between 11 14. you can way: add_action('woocommerce_after_single_product_summary', 'custom_code_after_single...

Inserting into Oracle-SQL with Squeryl with millisecond precision doesn't seem to be working. Why? -

i'm having trouble getting squeryl , oracle-sql save timestamp(6) data millisecond precision. every attempt i've made shows me results second precision, not millisecond: case class bookingevent(created: timestamp, ...) loggingdatabase.bookingevents.insert(bookingevent(new timestamp(system.currenttimemillis()), ...) but querying gives me stuff as: 14.08.17 16:40:50.000000000 , being true when query stuff directly in sql developer. i've tried manually adding in sql developer timestamps higher precision , seems work wonderfully, either has java's timestamps or jdbc or squeryl? edit: problem in writting side, if put hand in db , attempt read through squeryl seems ok. am missing obvious? thanks

java - From Class<? extends X> to X -

i working on reflexion stuff , i'm beginner @ it. i got : list<x> list; set<class<? extends x>> set; and want : for (class<? extends x> classx : set) list.add(classx); but couldn't find on how achieve it. can me? you can't achieve such behavior input data. list<x> list expected instance of class x, you're trying add object of type class<? extends x> . let's imagine type x number(for simplicity), have double, integer, character , etc, children of number. so, you're doing next thing: want add object of type class<integer> list can hold numbers(not class<integer> , class<double> , on). thing can do, it's create instance of class<integer> , class<double> way, using reflection: list<x> list = //some values; set<class<? extends x>> set = //some values; (class<? extends x> classx : set) list.add(classx.newinstance()); but that's bad idea use ...

image - How to create React component that can render Img or Video depending on API data it recieves -

i learning , practicing react. i trying achieve react web app allows display , scroll through nasa's picture of day based on date choose. here's api: api.nasa.gov/ the project simple but. url api returns, leads img , youtube video. example: https://apod.nasa.gov/apod/image/1708/perseidsturkey_tezel_960.jpg or https://www.youtube.com/embed/zy9jiikx62o?rel=0 i have managed display both cases using iframe. know not ideal imgs because cannot format css , looks bad scroll bars, sizing etc..but won't display video.. this react component looks (using bootstrap) detail.js import react, { component } 'react'; export default class detail extends component { render() { return ( <div classname="video-detail col-md-12"> <div classname="embed-responsive embed-responsive-16by9"> <iframe classname="embed-responsive-item" src={this.props.url}> </iframe...

osx - SAP - Mac vs Windows setup -

Image
i'm using sap gui java on mac computer. colleague sent me information on how connect: however, mac ui looks different: where can find screen add connection on windows? thank you! in experience, need use advanced settings of sap gui java on mac connect. go advanced , check expert mode. then enter connection string as: conn=/h/<saprouter>/w/<saprouter password>/h/<host>/s/<port 3270> in example i'm guessing: conn=/m/<host>/g/<group space> you may need add service number like: conn=/m/<host>/s/<service number 4201>/g/<group space>

unity3d - APPLICATION_FAULT_1007_UnityPlayer.dll!?InitializeD3DWindow -

i keep getting failure hit in windows dev portal. didn't before had added in xbox live prefabs (although specifying d3d window). can't seem happen when testing on console or on windows , haven't seen feedback of users crashing game or on side. has else started see xbox 1 s users? report specifies os build 10.0.15063, , xbox 1 s. unfortunately new tracking down issues not sure next steps should be. outside of specifying d3d on unity build settings (and not xhtml) haven't done d3d settings. for reference, using d3d because xhtml having mouse cursor , window size issues on console. using d3d build option fixed both of issues. thanks! nick edit: still getting multiple hits on 1 thing have no idea how diagnose telling me: stack trace: frame image function offset 0 unityplayer std::vector_core::basic_string_char,core::stringstoragedefault_char_ _,std::allocator_core::basic_string_char,core::stringstoragedefault_char_ _ _ _::vector_core::basic_stri...

transpose - transposing rows into multiple columns in R -

i have following data frame df id year var value 1 2011 x1 1.2 1 2011 x2 2 1 2012 x1 1.5 1 2012 x2 2.3 3 2013 x1 3 3 2014 x1 4 4 2015 x1 5 5 2016 x1 6 4 2016 x1 2 i want transform data in following format id year x1 x2 1 2011 1.2 2 1 2011 2 na 1 2012 1.5 2.3 3 2013 3 na 3 2014 4 4 4 2015 5 na 4 2016 2 na 5 2016 6 na please help using tidyr library, believe looking for: df <- data.frame(stringsasfactors=false, id = c(1l, 1l, 1l, 1l, 3l, 3l, 4l, 5l, 4l), year = c(2011l, 2011l, 2012l, 2012l, 2013l, 2014l, 2015l, 2016l, 2016l), var = c("x1", "x2", "x1", "x2", "x1", "x1", "x1", "x1", "x1"), value = c(1.2, 2, 1.5, 2.3, 3, 4, 5, 6, 2) ) library(tidyr) df2 <- df %>% spread(var, value)