Posts

physics - Create a ring body in PhysicsJS -

i working on project requires circular ring shaped body. how can achieve this? have tried use convex-polygon body vertices similar of circle getting the vertices specified not match of _convex_ polygon. error. how else can make ring shape? here current attempt: var ring = physics.body('convex-polygon',{ x: renderer.width* 0.35, y: renderer.height *0.75, vertices : [ { x: -5, y: 0}, { x: -3, y: 4}, { x: -4, y: 3}, { x: 0, y: 5}, { x: 3, y: 4}, { x: 4, y: 3}, { x: 5, y: 0}, { x: 3, y: -4}, { x: 4, y: -3}, { x: 0, y: -5}, { x: -3, y: -4}, { x: -4, y: -3} ] }); thanks in advance! a ring shaped body not convex, reason model (assuming vertices correct) not work. this old answer seems suggest concave objects such yours not implemented in physicsjs. might have changed, if not want not possible. edit: link seems have been broken. fixed.

xamarin.ios - Xamarin ios archive crash after signed -

i have ios project, link binding library , correctly works without issues. when send xarchive customer (so xarchive signed him), app crashes @ launch seem miss during xarchive build? using external library maybe have check additional options in xamarin studio build tab? update: pluggin ipad , launching xcode devices windows, error is: runtime error: assembly mscorlib.dll not found or not loaded searching found this: https://developer.xamarin.com/guides/ios/troubleshooting/questions/error-mscorlib-not-found/ this issue occurs when hidden .monotouch-32 , .monotouch-64 folders missing .xcarchive signing / ipa creation, triggering runtime error. how can fix it? i confirm issue related https://developer.xamarin.com/guides/ios/troubleshooting/questions/error-mscorlib-not-found/ my archive uploaded owncloud company. owncloud client doesn't upload hidden files/folders (as .monotouch-32 , .monotouch-64 ), xarchive received customer different , smalle...

asp.net - Nonlinear least squares curve fitting using SQL Server or .NET -

i'm reconstructing matlab based application web based. @ specific point (of matlab's implementation), user uploads set of data consisting of 2 columns (x, y) depicted dots using scatter plot. subsequently "best fitted" curve passes through points estimated , designed using matlab's build-in non-linear least squares function , trust-region optimization algorithm. is there way implement function either sql server or in .net code respectively? looking simple example understand algorithm (step-by-step) hard me find pseudocode or implementation in language concerning non-linear regression. have found solutions linear fitting in case specific algorithm work because have produce same results (as matlab's application does).

ios - Saving Contact Address to Unified Contact results in (CNErrorDomain error 500) -

there odd error in application can't find workarounds/fixes for. reason, i'm able save address contact isn't unified social profile (facebook, twitter, etc). however, when try add address contact unified facebook or twitter weird save error: the operation couldn’t completed. (cnerrordomain error 500.) here of code i'm using: if mutablecontact.iskeyavailable(cncontactpostaladdresseskey) { var postaladdresses = [cnlabeledvalue<cnpostaladdress>]() address in self.contactaddresses { let postaladdress: cnlabeledvalue<cnpostaladdress> = cnlabeledvalue(label: cnlabelother, value: address) postaladdresses.append(postaladdress) } mutablecontact.postaladdresses = postaladdresses } let saverequest = cnsaverequest() if isnewcontact { saverequest.add(mutablecontact, tocontainerwithidentifier: nil) } else { saverequest.update(mutablecontact) } { try c...

javascript - Make single MobX autorun or reaction for observable property of all objects in array -

i have class @observable (all examples typescript/pseudocode) class page { id: number = 0; @observable isvisible: boolean = false; } let array = [new page(), new page(), new page()]; and functions like: changevisibility(obj) { //ajax call .post("/api/changevisibility/", {id:obj.id, isvisible:obj.isvisible}) } and want react on isvisible change on object. i can enumerate array , make like: array.foreach(el => { reaction( () => el.isvisible, isvis => changevisibility(el); }); }); but can 1 function? kind of "array observer reacts element's property change". something this: reaction(array, //source (el) => el.isvisible, //observable react (el) => changevisibility(el) //callback object ) if reaction responsible sending the update of individual page, setup reaction in page constructor or have utility function in page that, don't have keep pages array in sy...

php - Wordpress Customizations Dont work except in admin view -

Image
i have problem, used following set of code in functions.php make changes on customization api. have customize features implemented when use them works me, admin. change make colors or pictures doesn't show on public site. admins. in public not green , have defualt pictures any or there designed code that? nevermind, wordpress decided fix , dont know how. anyway, works now.

php - How to display all orders for a single product showing the most recent first? Woocommerce -

i have password protected page on frontend. on page, want display full list of purchases associated single woocommerce product id. option 1: i've looked through woocommerce docs , , found: wc_cli_order , list_( $args, $assoc_args ) function lists orders. presumably, orders can filtered product id [--=] filter orders based on order property. line item fields (numeric array, started index zero): line_items.0.product_id option 2: i found article , based on customer id. i've modified code based on guesses meta_key , meta_value. $customer_orders = get_posts( array( 'numberposts' => -1, 'meta_key' => '_product', 'meta_value' => get_product_id(), 'post_type' => wc_get_order_types(), 'post_status' => array_keys( wc_get_order_statuses() ), ) ); how display orders single product showing recent order first? here solution put based on these articles: http://www.w...