Posts

c# - How to set control x:Uid attribute programmatically for a metro app control? -

i need set x:uid attribute of control programmatically? attribute used localization. i not strong on subject if talking same thing, can see here: bamllocalizableresourcekey.uid property the public property has get, can't change c# code. public string uid { get; } see more x:uid directive find out property set directive , not other attributes in xaml.

c - fread into array of structs segmentation fault -

i've been working on code awhile , i've run seg fault can't seem debug. here's relevant code: typedef struct halo* halo; struct halo { float x, y, z; float vx, vy, vz; int n200a; float m200a; float r200a; int n200c; float m200c; float r200c; int n500a; float m500a; float r500a; int n500c; float m500c; float r500c; }; global variable: halo *halo_catalog; the function fails: int loadhalocatalog(char *filename) { file *catalog_file; long long halo_num; catalog_file = fopen(filename, "rb"); if (catalog_file == null) { printf("could not open halo catalog: %s\n", filename); return -1; } if (fread(&halo_num, sizeof(long long), 1, catalog_file) < 0) { printf("could not read number of halos\n"); return -1; } halo_catalog = (halo *)calloc(halo_num, sizeof(struct...

java - Maven error while assembling hadoop in stand alone mode -

i new hadoop , maven. compile hadoop 2.0.3 source , install it. following instructions http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/singlecluster.html so far, have managed download hadoop source code , source directory issued "mvn clean install -pnative" next tried execute mvn assembly:assembly, following error: failed execute goal org.apache.maven.plugins:maven-assembly-plugin:2.3:assembly (default-cli) on project hadoop-main: error reading assemblies: no assembly descriptors found. -> [help 1] please can move forward. also, above mentioned install link, not mention should value of "$hadoop_common_home/$hadoop_hdfs_home" i compiled 1.0.4 academic exercise. not sure if valid 2.0.3 this should done (on ubuntu) before start compilation make sure needed stuff there: sudo apt-get -y install maven build-essential protobuf-compiler autoconf automake libtool cmake zlib1g-dev pkg-config libssl-dev ...

urbanairship.com - Unable to push notifications via urbanairship to APNS -

i using apns app in development mode. integrated urban airship per getting started document provided on portal: created certificate in apple provisioning portal. imported .p12 file urban airship app(in dev mode debug enabled) now when open application, shows me alert , asks me permission enable notification. once done , try test push message urban airship portal device using device token generated, common error: apple push service rejected device token "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" i searched on google , found common problem; no solution. answers mention prod , dev environment conflict cause, not case in case did not create prod app in urban airship nor in apns dev certificate. settings in airshipconfig.plist are: app_store_or_ad_hoc_build : no development_app_key: xxxxxxxxxxx development_app_secret: xxxxxxxxxx (not master secret, dev app secret.) nowhere did find response user asked question , later got resolved. so, not sure how people resolved...

aop - How to easily remove Rails engines? -

my hope was, engines enable me add or remove features in app. however, whenever see how engines used, noone talks disabling/uninstalling/unmounting them cleanly. how can this? the case product line of apps pretty similar. start developing variant features , work backwards disabling features other variants of app. i work bit aspects in aop, can declare dependencies (in both directions), when want remove aspect/engine, code connected engine removed/disabled. whenever try rails engines, there has lot of entangled, customized code (e.g. when using parts of engine in views).

random - Select data based on a distribution in matlab -

i have set of data in vector. if plot histogram of data see (by clever inspection) data distributed sum of 3 distributions; one normal distribution centered around x_1 variance s_1; 1 normal distribution centered around x_2 variance s_2; once lognormal distribution. my data subset of 'real' data. what take random subset of data away data ensuring resulting subset reasonable representative sample of original data. i possible in matlab new both statistics , matlab , unsure start. thank :) if can identify each of 3 distributions (in sense can estimate parameters), 1 approach select random subset of data , try estimate parameters each distribution , see whether close enough (according own definition of "close") parameters of original distributions. should repeat process several time , @ average difference given random subset size.

php - Using AJAX rather than sending a form -

this question has answer here: jquery ajax submit form 14 answers what equivalent of using ajax rather sending form in case <form action="" method="post"> <div style="padding-left: 10 px:"></div> <input id ="datetime" style="display:none;" type="text" name="datetime" value="yyyy/mm/dd hh:mm:ss" size="5" > <a href="#" onclick="cal.select(document.forms[0].datetime,'anchor','mm/dd/yyyy'); return false;" title="cal.select(document.forms['example'].datetime,'anchor','mm/dd/yyyy'); return false;" name="anchor" id="anchor"><i class="icon-calendar"></i> </a> <input style="font-size: bold 8pt;"...