Posts

Showing posts from September, 2013

c# - Why does Silverlight View not throw a null exception? -

given silverlight view following binding: <textbox width="200" text="{binding customer.firstname, mode=twoway}"/> and code behind has following: customerclass customer {get; set;} this not throw nullreferenceexception following string firstname { { return customer.firstname; } } does when attempt bind firstname instead of customer.firstname , why , how corrected? (other binding directly customer.firstname or initializing customerclass object) edit : address possible duplicate issue. thought binding still tried reference when view first initialized, not case? if can see difference between getting reference , being bound @ view time i thought binding still tried reference when view first initialized, not case? the binding process designed handle null values , check initial target reference given , not attempt action if null. remember binding process of reflection off of named path/location , not actual extraction of va

full text search - Ignore leading zeros with Elasticsearch -

i trying create search bar common query "serviceorderno". "serviceorderno" not number field in database, string field. examples: 000000007 000000002 wo0000042 123456789 alltextss 000000054 000000065 000000874 the common format integer proceeded number of zeros. how set elasticsearch searching "65" match "000000065"? want give precedence "serviceorderno" field (which have working). here @ right now: { "query": { "multi_match": { "query": "65", "fields": ["serviceorderno^2", "_all"], } } } one way of doing using lucene flavour regular exression query: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-regexp-query.html "query": { "regexp":{ "serviceorderno": "[0]*65" } } also, query string query supports small set of special

ios - Triangle UIView - Swift -

so i'm making game in dropping objects have destroyed spike(triangle) @ bottom of screen user. i cannot work out how make uiview triangle. have been able make work rectangle this: let barrier = uiview(frame: cgrect(x:125, y: 650, width: 130, height:20)) barrier.backgroundcolor = uicolor.orangecolor() view.addsubview(barrier) and has worked. cannot work out how make triangle. reason want uiview because im using collisions on , user move it. have tried png triangle detects collision border of image not start of triangle. i have tried doesn't work... let square = uiview(frame: cgpathmovetopoint(path, nil, 50, 0), cgpathaddlinetopoint(path, nil, 100, 50), cgpathaddlinetopoint(path, nil, 0, 100)) square.backgroundcolor = uicolor.purplecolor() view.addsubview(square) any , appreciated, thanks, alex updated swift 3 : class triangleview : uiview { override init(frame: cgrect) { super.init(frame: frame) } required init?(coder ad

html - Script tags are being nested even though I'm closing one before opening the next one -

i'm trying export 2 external scripts jsp , declare 1 on jsp body itself. altogether, have 3 tags on code. his: <script src="dist/jstree.min.js" /> <script src="dist/libs/jquery.js" /> <script> $(function () { (...) </script> for reason, however, when open jsp on browser, renders things this: <script src="dist/jstree.min.js"> <script src="dist/libs/jquery.js"/><script> $(fu… </script> that is, it's skipping end of first script , interpreting else string. i've tried explicitly writing </script> opposed /> behaves same way. know why happening? every browser supports xhtml (firefox, opera, safari, ie9) supports self-closing syntax on every element. having on hand, if dont have valid xhtml document, might end having problems self-closing tags, commonly if given tag empty (as in script tags load script src), recommend doing follows

How to read HDR envi image in the Java (using GDAL or Opencv)? -

i have hdr envi image 160 bands , image has 4 gb size. each band each pixel (row, column) has double value associated (a reflectance value). in addition, each pixel has geographical point associated. i can read using r packages, such raster. however, application written in java , know if used library (such opencv) read hdr envi images. accept other libraries in java. i need read reflectance value , geographical point each band , each pixel of hdr image. means that: pixel has 160 different values of reflectance, generate graph (band x reflectance). possible in java? please, need example it.

json - Extracting usable data from an API response in Swift -

i picked project previous dev kind of left mess. we've moved new api better structure , i'm confused how can work. i've got api i'm trying parse data it's in usable form , i'm new enough use help. could take @ following code , kind of guide me , explain what's going on here andy maybe how work properly? i've been beating head against wall on 1 few days now. here's sample of json response i'm getting: { “green shirt": [ { "id": "740", "name": “nice green shirt", "quantity": "0", "make": "", "model": "", "price": “15.00", "size": "xxs", "sku": null, "image": "https:\/\/google.com\/green_shirt.jpg", "new_record": false, &quo

c++ - What is going wrong with my multidimentional array function? -

here have problem. want manipulate following matrix matrix = 1---------2----------3 4---------5----------6 7---------8----------9 into 7---------8----------9 4---------5----------6 1---------2----------3 #include<iostream> using namespace std; void f(int arrayname, int size); int main() { int x[3][3]={{1,2,3}, {4, 5,6},{7,8,9}}; f(x, 3); system("pause"); } void f(int arrayname, int size) { int holder; for(int i=0; i<size; i++){ for(int j=0; j<size; j++) { holder=arrayname[i][j]; arrayname[i][j]=arrayname[i+2][j+2]; arrayname[i+2][j+2]=holder; } } for(int k=0; k<size; k++) for(int l=0; l<size; l++) { cout<<arrayname[k][l]; if(l=3) cout<<"\n"; } } errors: e:\semester 2\cprograms\array2.cpp i

sql - calculate distance live and order asc|desc -

so when start web app, server gets user geolocation , save variable (latitude/longitude) i've got database with: id, name, latitude, longitude now want select entries database , order them distance i know how calculate distance between coordinates, dont know how order things "live" can guys give me hint how solve this? you can specify distance calculation (say example (longitude + latitude) divided 42) in order by clause select id, name, latitude, longitude, (longitude + latitude) / 42 distance yourtable order (longitude + latitude) / 42 however, because distance calculation more complex (longitude + latitude) / 42, might want consider ordering results based on ordinal of column in result set (i think databases support this). like..... select id, name, latitude, longitude, /* insert distance calculation here */ distance yourtable order 5 -- column ordinals 1-based you should note though there gotchas approach. example, if order of column

git - __git_ps1 shows wrong branch -

i'm getting issue __git_ps1 script returns wrong branch. first, i'll check branches: ssalisbury@dotweb ssalisbury (master)$ git branch -a * master remotes/origin/head -> origin/master remotes/origin/master then i'll create , checkout new branch, , __git_ps1 script still show i'm on original branch: ssalisbury@dotweb ssalisbury (master)$ git checkout -b newbranch switched new branch 'newbranch' ssalisbury@dotweb ssalisbury (master)$ git branch -a master * newbranch remotes/origin/head -> origin/master remotes/origin/master ssalisbury@dotweb ssalisbury (master)$ i've been able determine it's showing branch repository on same machine has checked out, although can't figure out why. how can make sure it's displaying information repository i'm in? my ps1 following: \[\e[1;32m\]\u\[\e[0;33m\]@\h \[\e[1;36m\]\w\[\e[1;33m\]$(__git_ps1 " (%s)")\[\e[1;32m\]\$ \[\e[0m\] the ps1 string created login script. h

environment variables - Skipping parts of a Travis job if building from a fork -

i've been writing shell tasks can't run unless there secure environment variables present in travis ci pr build. there auth token must present push information build, builds originating forks, i'd skip these parts. they're not critical. how can tell if build originating fork? from the documentation around "environment variables" : travis_secure_env_vars : whether or not secure environment vars being used. value either "true" or "false". this little ambiguous. mean secure environment variables being used anywhere (as in, present in .travis.yml )? being exported environment variables in current build? i'm not sure way guarantee i'm testing pull request has originated fork, didn't see other way it. my first attempted had code looked like [ ${travis_secure_env_vars} = "false" ] && exit 0; # more shell code here... but appears continue ahead , push without auth token, failing task (and build).

python - How to add to the list HEX values while preserving their original form -

this code: first_xor_list=[0xaa,0x89,0xc4,0xfe,0x46] secpnd_xor_list=[0x78,0xf0,0xd0,0x03,0xe7] after_xor=[] xor_helper=[] name = "userna" after_xor.append(hex(ord(name[0])))#first stage - xor second char end , add second char end of list in range(len(name)): if < len(name)-1: after_xor.append(hex((first_xor_list[i])^ (ord(name[i+1])))) elif < len(name): after_xor.append(hex(ord(name[1]))) the problem values go list string,this output: ['0x55', '0xd9', '0xec', '0xb6', '0xb0', '0x27', '0x73'] and because have xor values in list need them this: [0x55, 0xd9, 0xec, 0xb6, 0xb0, 0x27, 0x73] how can add them list in way? delete hex, hex converts int string containing hexadecimal form. first_xor_list=[0xaa,0x89,0xc4,0xfe,0x46] secpnd_xor_list=[0x78,0xf0,0xd0,0x03,0xe7] after_xor=[] xor_helper=[] name = "userna" after_xor.append(ord(name[0]))#first stage - x

re write-sql statement Insert OR REPLACE from java to c++ NDK Android -

i need re write sqlite statements java c++, becouse of low performance: red arcticle: improve insert-per-second performance of sqlite? but iam totaly confused, becouse cant find sqlstatemenst of insert or update public synchronized void savematchvalue(int photorecowner, int[] photorecassign, float[] value) { sqlitedatabase database = databasehelper.getwritabledatabase(); database.begintransaction(); in java: string sql = " insert or replace " + typecontract.ctablephotomatch.table_name + "(" + typecontract.ctablephotomatch.fk_owner + "," + typecontract.ctablephotomatch.fk_assign + "," + typecontract.ctablephotomatch.value + ") values (?, ?, ?) ;"; // can same in c++? string sqlstatement = "insert abe_account ("........... and rest clear me plus minus // it sqlitestatement stmt = database.compilestatement(sql

android - Custom Expandablelistview unsorting data -

i have expandable listview data, stored in list , in hashmap. problem expandable listview showing data unsorted when collapse , expand group. i'm going crazy!!! import java.util.arrays; import java.util.hashmap; import java.util.hashset; import java.util.list; import java.util.set; import android.content.context; import android.graphics.color; import android.graphics.typeface; import android.view.layoutinflater; import android.view.view; import android.view.viewgroup; import android.widget.baseexpandablelistadapter; import android.widget.filter; import android.widget.linearlayout; import android.widget.textview; import com.pebbo.yaa.r; public class customexpandablelistadapter extends baseexpandablelistadapter { private context _context; private list<pojoalgcat> _listdataheader; // header titles // child data in format of header title, child title private hashmap<pojoalgcat, list<pojoalg>> _listdatachild; integer[] algs_lite = {5, 19}

forms - Lost Qty number of products from catalog to cart -

i changing things on catalog, , on checkout cart, lost number of products. as see, in form data: form_key:xxxxxxxxxxx product:712 related_product: bundle_option[1][]:1 bundle_option_qty[ 1][1]:3 bundle_option[1][]:2 bundle_option_qty[ 1][2]:1 bundle_option[1][]:3 bundle_option_qty[ 1][3]: i have correct qty sent. but in cart see this: 1 x xxxxx 1 x xxxxx 1 x xxxxx what do? the problem send data in 2 lines, it´s not same normal. it must be product:712 related_product: bundle_option[1][]:1 bundle_option_qty[1][1]:3 bundle_option[1][]:2 bundle_option_qty[1][2]:1 bundle_option[1][]:3 bundle_option_qty[1][3]: tip: never make space nothing.

JQuery - Add click event to multiple elements -

i have following: $('#applicationsgrid tbody').on('click', 'td.details-control', function () { var formatteddata = dosomething(); $(this).parent('tr').after(formatteddata); }); $('#applicationsgrid tbody').on('click', 'td.child-details-control', function () { var formatteddata = dosomething(); $(this).parent('tr').after(formatteddata); }); $('#applicationsgrid tbody').on('click', 'td.grand-child-details-control', function () { var formatteddata = dosomething(); $(this).parent('tr').after(formatteddata); }); how can combine "on" events 1 click event take care of clicking on 'td.details-control', 'td.child-details-control', 'td.grand-child-details-control', can reduce duplicate code? use multiple selector (“selector1, selector2, selectorn”) in jquery $('#applicationsgrid tbody').on('click', 'td.

symfony - How to get file size in symfony2? -

i'm using following code upload file submitted through form. how can file size before uploading it? want max file size 20mb. $file = $data->getfilename(); if ($file instanceof uploadedfile) { $uploadmanager = $this->get('probus_upload.upload_manager.user_files'); if ($newfilename = $uploadmanager->move($file)) { $data->setfilename(basename($newfilename)); } } oldskool correct. if want retrieve exact file size after has been uploaded, can use following: $filesize = $file->getclientsize(); another solution change maximum size of upload file in php.ini. following echo current file size limit. echo $file->getmaxfilesize(); to form errors, should validate form , print errors if validation fails. //include @ top of controller use symfony\component\httpfoundation\response; $form = $this->createform(new filetype(), $file); $form->handlerequest($request); if ($form->isvalid()) { //store data $data = &

uninstall MySQL only from LAMP install Ubuntu 15.5 -

i believe there error mysql install -- auto installed while installing ubuntu 15.5/lamp. uninstall mysql , try again, usual "sudo apt-get remove --purge mysql-server mysql-client mysql-common sudo apt-get autoremove sudo apt-get autoclean" does not remove , shows instead option remove entire lamp image. how can remove/reinstall mysql only?

c# - Structuring a Web API Stack for Versioning -

so i've spent past few hours trolling through genuinely fantastic advice web api versioning. of favourites, having fun am, in no particular order: best practices api versioning? versioning rest api of asp.net mvc application http://www.troyhunt.com/2014/02/your-api-versioning-is-wrong-which-is.html http://www.pluralsight.com/courses/web-api-design http://www.pluralsight.com/courses/implementing-restful-aspdotnet-web-api so advice has been helpful in designing "front end" of api. can version api calls... now, i'm on hard part. this heavily data driven application, company several products (this new one) doing monthly releases. big customers want long-term support api calls, smaller customers want latest releases. manage similar milestone/long-term-support releases of api. great. but in practice going messy, fast. we've worked hard separate out layers of our own website, beta internal/external apis, repository layers , sdk boot. separate ou

xslt - Sharepoint 2007 not displaying certain entities -

this has been haunting me days now. have simple multiple lines of text column content type text. created xslt datable , when data displayed add &lt; &gt; &amp; quot; &#39; , across of data , can't figure out missing. would have suggestion? don't know getting question correctly or not. try disable-output-escaping in xslt <xsl:value-of select="expression" disable-output-escaping="yes" /> optional. "yes" indicates special characters (like "<") should output is. "no" indicates special characters (like "<") should output "<". default "no"

r - Adjust space between gridded, same-sized ggplot2 figures -

Image
i attempting arrange multiple ggplot2 plots 1 output/grid. i'd plots (without considering labels) same size. have found way this , i'd adjust space between plots. for example: in plot, i'd reduce amount of space between 2 plots. i've tried adjusting margins, removing ticks, etc. has removed of space. is there way have more control of spacing adjustment between plots in situations such these? library(mass) data(iris) library(ggplot2) library(grid) library(gridextra) p1 <- ggplot(iris,aes(species,sepal.width))+geom_violin(fill="light gray")+geom_boxplot(width=.1) +coord_flip() + theme(axis.title.y = element_blank()) + ylab("sepal width") p2 <- ggplot(iris,aes(species,petal.width))+geom_violin(fill="light gray")+geom_boxplot(width=.1) + coord_flip() + theme(axis.title.y = element_blank(), axis.text.y=element_blank()) + ylab("petal width") p11 <- p1 + theme(plot.margin = unit(c(-0.5,-0.5,-0.5,-0.5),"

com - Preview of Power Point in Sharepoint 2013 -

i developing web part using share point 2013 , visual studio 2013.i have display preview of power point file(also excel , word files).preview working fine .pdf files.so idea convert ppt file pdf file , display preview.please see code. microsoft.office.interop.powerpoint._application ppapplication = new application(); presentation ppdoc = null; ppdoc = ppapplication.presentations.open(inputfilepath); ppdoc.saveas(outputfilepath, ppsaveasfiletype.ppsaveaspdf); but first line of code create object generated following error. retrieving com class factory component clsid {91493441-5a91-11cf-8700-00aa0060263b} failed due following error: 80070005 access denied. (exception hresult: 0x80070005 (e_accessdenied)) followed steps in link below. "retrieving com class factory component.... error: 80070005 access denied." (exception hresult: 0x80070005 (e_accessdenied)) error changed given below. retrieving

erlang - Riak mapReduce fails with > 15 records -

problem i've been learning riak , ran issue mapreduce. mapreduce functions work fine when there's 15 records, after that, throws stack trace error. i'm new riak , erlang, i'm unsure whether it's code or it's riak. advice on how debug or problem appreciated! code map -module(identity_map). -export([identity/3]). identity(values, _, _) -> jsondata = riak_object:get_values(values), {struct, objects} = mochijson2:decode(jsondata), [objects]. reduce -module(stocks_summary). -export([average_high/2]). % returns values map phase average_high(values, _) -> total = lists:foldl( fun(record, accum) -> high = proplists:get_value(<<"high_d">>, record), accum + high end, 0, values), [total / length(values)]. invocation curl -xpost http://192.168.0.126:8098/mapred \ -h 'content-type: application/json' \ -d '{"inputs": ["stocks","goog&q

Parsing big json data with php -

i have json this: [ { "event": "hard_bounce", "_id": "323418ee24f744859ce7b7e01f28e0d1", "msg": { "ts": 1433426374, "_id": "323418ee24f744859ce7b7e01f28e0d1", "state": "bounced", "subject": "subject", "email": "testmail@hotmail.com", "tags": [], "smtp_events": [], "resends": [], "_version": "hm-1sbyhpapyouvsce2-zw", "diag": "smtp;550 requested action not taken: mailbox unavailable", "bgtools_code": 10, "sender": "noreply@domain.net", "template": null, "bounce_description": "bad_mailbox" }, "ts": 1

html - Arrow menu and line-height -

i've got problem menu, work great, i've got longer menu item names, , messing layout. can help, i've run out of ideas. html <ul> <li><a href="#">foobar</a></li> <li class="active"><a href="#">foobar</a></li> <li><a href="http://line25.com/tutorials/how-to-create-flat-style-breadcrumb-links-with-css">foobar longer</a></li> <li><a href="#">foobar</a></li> <li><a href="#">foobar</a></li> </ul> css ul { margin: 20px 60px; } ul li { display: inline-block; height: 60px; line-height: 60px; width: 100px; margin: 15px 10px 0 0; text-indent: 35px; position: relative; } ul li:before { content: " "; height: 0; width: 0; position: absolute; left: -2px; border-style: solid; border-width: 30px 0 30px 30px;

multithreading - What is the best way to determine max amount of threads for C# IO operations based on the system's hard drive? -

i've got tool run multiple threads @ once perform simple io operation. question have is; best way determine max amount of possible threads, based on system's hard drive capabilities, io operations? i don't think os 'knows' kind (hdd/sdd) of drive have. it might possible find out raid configurations through wmi i'm not sure if reliable (some raids implemented in hardware). and if know drive, there might other processes using it. so experimentation required, , probing if want on multiple machines can't measure upfront.

python - Replace ends of string in eclipse -

i trying refactor large source base in company work in. instead of using print function in python 2.7x want use logger function. example: print "sample print %d" % timestamp logger.info("sample print %d" % timestamp) so basically, want remove print , , insert remains parentheses , logger.info (ill assume current prints info until full refactor possible). thanks in advance search (^\s+)print (.*)$ replace $1logger.info($2) python should complain pretty fast places print goes on more single line. you'll have fix places manually. note: skips comments the alternative source 2to3.py replaces print ... print(...) convert code python 2 3.

jquery - Datatables shared parameters affected by sorting -

i have datatable can have n number of children datatable(s) can added/removed/recreated @ time. children share initialization parameters seems datatables affect original data structure. when adding 2 children , sorting first one, second child inherit sorting when recreated. have created fiddle here: http://jsfiddle.net/wthy9/44/ var mydatatable; var index = 0; var parentparams = { "order":[], "columns":[ {"name":"col 1"}, {"name":"col 2"}, {"name":"col 3"}, {"name":"col 4"}, ], }; var childparams = { "columns":[ {"name":"col 1"}, {"name":"col 2"}, {"name":"col 3"}, ], "order":[], }; $(document).ready(function(){ mydatatable = $('#mytable').datatable(parentparams); $('#createchild').click(funct

.net 4.5 - How to sign security tokens using SHA256 in WIF STS? -

i using thinktecture sts , sign issued tokens using sha256 instead of sha1? tried adding algorithm application using: cryptoconfig.addalgorithm( typeof(rsapkcs1sha256signaturedescription), "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"); but starts giving error: invalid algorithm specified knowing certificate using compatible sha256. idea?

python - How to read specific rows from excel file using pandas -

i have excel file , need extract data rows of sheet. far have import pandas pd xl_file = pd.excelfile((xlfilepath) dfs = {sheet_name: xl_file.parse(sheet_name) sheet_name in xl_file.sheet_names} now read numerical values found in particular row. row structure like: length (mm) 10.1 - 16.0 - 19.5 - 16.4 - 11.3 where attempting show in each cell of row. dashes indicate empty entry in cell! how can read in row using pandas library? happen know row number above row has there way pandas through data frame , find entry length (mm) instead of having specify row number? edit: actual df.loc['length (mm)'] suggested edchum looks this: 0 17.92377 unnamed: 1 nan 0.05 18.55764 unnamed: 3 nan 0.1 19.17039 unnamed: 5 nan 0.15 19.7507 unnamed: 7 nan 0.2 20.29776 unnamed: 9 nan 0.25 20.80492 unnamed: 11 nan 0.3 21.2667 unnamed: 13 nan 0.35

scala - Composing type-level functions with implicit witnesses -

i experimenting rather complex type-level calculations. there, have type tags (say, a , b , , c ), , functions working on them, represented implicit witnesses path-dependent result types: class class b class c trait f1[t] { type result } trait f2[t] { type result } implicit object f1ofa extends f1[a] { type result = b } implicit object f2ofb extends f2[b] { type result = c } trait composed[t] { type result } in course of calculations, when "implementing" composed , need make use of fact can, given above code, in principle transform a c (in example, need composition, there's more things involved). however, don't know how express composition, limited restriction implicits not transitively applied; following code fails "implicit not found": implicit def composed1[x](implicit f2dotf1ofx: f2[f1[x]]): composed[x] = new composed[x] { type result = f2dotf1ofx.result } implicitly[composed[c]] what tried write following: implicit def composed

javascript - How to remove a span element from Backbone.js $el? -

this.$el has following structure: <div> <span class="orword">or</span> <span>...</span> </div> i trying retrieve span class orword , remove dom. in order achieve tried didn't work: this.$el('span.andword').remove(); please let me how above span can removed $el element. thanks you need use find() search child element: this.$el.find('span.orword').remove();

r - Modifying terminal node in ctree(), partykit package -

Image
i have dependent variable classify decision tree. it's composed 3 categories of frequences: 738 (19%), 426 (15%) , 1800 (66%). imagine predicted category third one, purpose of tree descriptive not matter. thing is, when plotting tree ctree() function (package partykit ) terminal nodes display histograms showing probability of occurrence of 3 classes. need modify output: obtain proportions of occurrence of each class within terminal node respect class' absolute frequency. example, percentage of 738 participants in class1 belongs terminal node? each terminal node display values 3 classes compose dependent variable. bellow plot of tree, default reports prevalence of each class within terminal nodes. you can define own panel function draw goes each terminal panel window. if know little bit grid graphics , @ how current terminal panel functions defined see how works. one panel function ought want node_terminal() in partykit package (the improved re-implementati

c++ - Is there any way to check whether a function has been declared? -

suppose there's library, 1 version of defines function name foo , , version has name changed foo_other , both these functions still have same arguments , return values. use conditional compilation this: #include <foo.h> #ifdef use_new_foo #define truefoo foo_other #else #define truefoo foo #endif but requires external detection of library version , setting corresponding compiler option -duse_new_foo . i'd rather have code automatically figure function should call, based on being declared or not in <foo.h> . is there way achieve in version of c? if not, switching version of c++ provide me ways this? (assuming library needed actions extern "c" blocks in headers)? namely, i'm thinking of somehow making use of sfinae , global function, rather method, discussed in linked question. in c++ can use expression sfinae this: //this template enabled if foo declared right args template <typename... args> auto truefoo (args&&..

objective c - SDWebImage's sd_setImageWithURL crashes the application when trying to show 100 of images in view -

i showing around 100 of urls in 1 screen asyncronusly in button image sdwebimage. i facing issues memory load when tried show images url. i have 1 uiscrollview , in have 1 uiimageview has 100 uibutton added dynamaically. now requirement when user zoomed int uiscrollview @ level need show image in uibutton , when start show image server button following code crashes witht memory warning. [btn sd_setimagewithurl:[nsurl urlwithstring:busowner.whitelargelogourl] forstate:uicontrolstatenormal placeholderimage:[uiimage imagenamed:placeholderimage]]; can 1 please let me know how can resolve memory issues , can show images @ same time 100 buttons? i have tried put uiiamgeview instead of uibutton , have tried use dispatch_queue_t queue = dispatch_get_global_queue(dispatch_queue_priority_default, 0ul); dispatch_async(queue, ^{ // perform non main thread operation (businessownerentity *busowner in arrbusowner) { nsurl *url = [nsu

windows runtime - Remove Combobox winrt flayout heading -

in winrt windows phone app when have more 5 items in combobox, opens on full screen. , on top written 'choose item'. i want remove heading combo boxes. you can set pickerflyoutbase.title property of combobox either space or text of choice. like: pickerflyoutbase.title= " " or pickerflyoutbase.title="some text"

Put a maximum width on a fluid video -

i using method make video fluid https://css-tricks.com/netmag/fluidwidthvideo/article-fluidwidthvideo.php .video-container { position: relative; padding-bottom: 56.25%; /* 16:9 */ height: 0; > iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } } when try add maximum width maxwidth: 400px; getting black padding on top , button of video, how can avoid ? my question how can set maximum width without getting black padding ? set width 100% mentioned in article, , change height based on ratio of video you've embedded , width of window. in article (third section)... (or question else, in case sorry misunderstanding)

greenDao importing classes in Android Studio -

i'm trying include in project greendao orm, useless there no tutorial makes work scratch , there ridiculous documentation on official site. used greendao tutorial , made intermediary steps generating classes gradle task. i'm stuck, android studio gives me error every generated class like: cannot resolve symbol 'abstractdaomaster' . imports in place there no way make work. things tried: invalidating caches updating 1.2.1.1 i have imac os x yosemite 10.10.2 i have no clue next. the documentation on official site it's bit old, eclipse projects. using android studio follow this tutorial , worked charm.

Akka.NET Remote Log Aggregation/Collecting -

i have scenario have client (console) application invoked enterprise job scheduler (autosys). client sends work "server " (quotes because cluster). need able ship log messages server client log messages related client's work request. built in logging support kind of distribution? can guidance on how can achieve this? i see in codebase called loggingbus , need look? my core usecase being able ship log entries across remote actors. the best thing in case use built-in logger supports remote log shipping. akka.logging.serilog , akka.logging.nlog both have configurable logging targets can support this. i think serilog combined seq best option.

ios - Is Silent Remote Notifications possible if user has disabled push for the app? -

in settings tabbar: i have feature specific switch can turned off or on based on api response. from website admin authorized turn on/off. i can make /user api call everytime on settings tap check current settings user there couple of disadvantage if user on setting not update ui , calling api everytime on settings tap doesn't sounds perfect solution. i think better solution send silent push notification can use make api call update settings ui whenever needed. but if user has disabled push notification still receive silent push ? recommended approach handle such situations ? short answer, yes the exciting new opportunity app developers in ios 8 apple deliver “silent” pushes if user has opted out of notifications. also, “silent push” no longer newsstand apps. every app can take advantage of ability refresh content in background, creating up-to-date, responsive experience possible, moment user opens app. although... users still have ability switch

stm32f4discovery - printing the stack of a task in FreeRTOS -

i working on stm32f4-discovery board, installed freertos on board , able run 2 tasks created main function. want task 1 access local variables of task 2 passing of variable reference or value. thought print stack content of task 2 , locate local variables , use in task1 can guide me this? tried print address of each variable , tried use in task1, program did not compile , returned -1. it not clear me trying achieve, or mean program returning -1 because didn't compile, not normal 1 task access stack variable of task. each task has own stack, , stack private task. there lots of ways tasks can communicate each other though, without need access each other's stack. simplest way make variable global, although global variables thing. other send value 1 task on queue ( http://www.freertos.org/inter-task-communication.html ), or using task notification mailbox ( http://www.freertos.org/rtos_task_notification_as_mailbox.html ).

html - PHP mail function doesn't complete sending of e-mail -

<?php $name = $_post['name']; $email = $_post['email']; $message = $_post['message']; $from = 'from: yoursite.com'; $to = 'contact@yoursite.com'; $subject = 'customer inquiry'; $body = "from: $name\n e-mail: $email\n message:\n $message"; if ($_post['submit']) { if (mail ($to, $subject, $body, $from)) { echo '<p>your message has been sent!</p>'; } else { echo '<p>something went wrong, go , try again!</p>'; } } ?> i've tried creating simple mail form. form on index.html page, submits separate "thank submission" page, thankyou.php , above php code embedded. code submits perfectly, never sends email. please help. there variety of reasons script appears not sending emails. it's difficult diagnose these things unless there obvious syntax error. without 1 need

javascript - Autosuggest tutorial with PHP and MySQL -

i found tutorial on how create simple autosuggest php & mysql. tutorial i'm using: http://www.2my4edge.com/2013/08/autocomplete-search-using-php-mysql-and.html when try tutorial, i'm finding bug. when search, , click on image or text, item not selected. have click in "white" area. have tried change script, still have same problem, because still don't know javascript. this tutorial script: index.php <!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <title>autocomplete search using php, mysql , ajax</title> <script type="text/javascript" src="jquery-1.8.0.min.js"></script> <script type="text/javascript">