Posts

Showing posts from May, 2010

How to set image to imageview from https url android? -

i want set image in imageview,my image coming https url.here using picaso loadiing image,but not able image https url.if change https http able image,but want image https url .please solve problem @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_picaso_image); imageview img=(imageview)findviewbyid(r.id.imageview1); string url="https://www.bahrainlocator.gov.bh/blm_data/point_1418646022.jpg"; picasso.with(this).load(url).into(img); } edit: please try use activity.this context,if using fragments use getactivity() download picasso library http://square.github.io/picasso/ then try using method picasso.with(context) .load(url) .placeholder(r.drawable.user_placeholder) .error(r.drawable.user_placeholder_error) .into(imageview); and have issues high resolution images , https protocols if still cant load picasso try glide library stri

printf - C programming help, how to use the fopen and the fprintf functions in C to save the given output in a text file? -

last time worked on code, working fine. wanted output saved text file (anything printed through fprintf() ). now, when try run code again, not save output in given text file draftday.txt . appreciated. #include <stdio.h> #include <conio.h> #include <cstdlib> int main() { struct date { int day; int month; int year; }; struct details { char name[50]; int price; int code; int qty; struct date mfg; }; struct details item[50]; int n,i; getch(); fflush(stdin); printf("enter number of items:"); scanf("%d",&n); for(i=0;i<n;i++) { fflush(stdin); printf("item name:"); scanf("%[^\n]",item[i].name); fflush(stdin); printf("item code:"); scanf("%d",&item[i].code); fflush(stdin); printf("quantity:");

android - OSMDroid offset polygon -

i draw polygon on map using code similar : geopoint pt1=new geopoint(13002798,77580000); geopoint pt2= new geopoint(pt1.getlatitudee6()+diff, pt1.getlongitudee6()); geopoint pt3= new geopoint(pt1.getlatitudee6()+diff, pt1.getlongitudee6()+diff); geopoint pt4= new geopoint(pt1.getlatitudee6(), pt1.getlongitudee6()+diff); geopoint pt5= new geopoint(pt1); pathoverlay myoverlay= new pathoverlay(color.red, this); myoverlay.getpaint().setstyle(paint.style.fill); myoverlay.addpoint(pt1); myoverlay.addpoint(pt2); myoverlay.addpoint(pt3); myoverlay.addpoint(pt4); myoverlay.addpoint(pt5); map.getoverlays().add(myoverlay); now want offset overlay polygon 10px up, independent of zoom or other parameters. how can that? need draw line above poi marker arrows. something that: projection pj = mapview.getprojection(); point pix = pj.topixels(p); pix.y -= 10; //10 pixels geopoint p2 = pj.frompixels(pix2.x, pix2.y); double offset

PHP Recursively search for a file while ignoring given directories -

this question has answer here: recursive file search (php) 6 answers i'm trying create function efficiently search document root file , return path. have following recursivedirectoryiterator , regexiterator. <?php function find_file($filename) { $pattern = preg_quote($filename); $dir = new recursivedirectoryiterator($_server['document_root']); $iterate = new recursiveiteratoriterator($dir); $reg_iterate = new regexiterator($iterate, "/.*$pattern.*/", regexiterator::get_match); $ignore_pattern = '(\/?)(_*?)(old|archive|backup|cache|node_modules)'; foreach($reg_iterate $matches){ foreach($matches $file){ $file = rtrim($file, '.'); if(!preg_match("/$ignore_pattern/i", $file)){ return $file; } } } } echo find_file('sty

matlab - How to plot miss rate vs false positive rate? -

Image
i have problem plot curve miss rate vs false positive rate analyze performance of proposed system (as sampled on picture below). have 2 samples dataset positive , negative sample. want plot performance of system whether can classify people or non people curve. as far know, need true positive , false positive values after classification, not sure yet how plot curve. 1 can please?? there 2 type of bounding boxes in object detection, boxes data-set labeled theme object , second boxes algorithm detects. if bbox have huge intersection data-set bbox, okey . if bbox have not intersection data-set bbox false posative . and call data-set bbox without intersection bbox in image miss rate . , after calculating these numbers, plotting these values straight forward.

Using javascript regex to parse strings starting with "$" and other conditions -

this difficult regex wrap head around. i'd words start $ . conditions are: string must start $ , preceding character must either beginning of string or space. if $ followed " , in between "" must captured. both quotes must present or nothing captured. "" used capturing more 1 word $ not match anything some examples: bob gave jane $4 ["4"] captured $"10 thousand dollars" lot more $1 , $-3 ["10 thousand dollars", "1", "-3"] captured bob paid $590 $micro$oft $and" wa$ reimbursed $nine ["590", "micro$oft", "nine"] captured alice says $"hello $world!" ["hello $world!"] captured $ yup$ nothing captured i tried playing around horrible. look-aheads make tricky. function parse(text) { var re = /(\s|^)\$(?:"([^"]*)"|([^\s"]+)(?!\s))/g; re.lastindex = 0; var result = []; var

mysql - PHP: How to execute try block even if exception found? -

i have try block in exceptions definitely thrown don't want stop execution of try block if happens. this code: try { $querystr = "select * `$current_table` ..."; $query = $db->prepare($querystr); $query->execute(); while($row = $query->fetch()) { } } catch(pdoexception $e) { //echo $e->getmessage(); } this try/catch block inside loop, $current_table changing continously. current table can take 4 values april-june-2014 , july-september-2014 , october-december-2014 , jan-march-2015 . these table names stored in array. now when query first table , if found, it's , if not found want check other tables , see if exists. if of table not found, throw exception , won't check other tables. is there way that? use continue statement: for (/* condition */) { try { // things } catch (exception $e) { continue; } // won't reach here if exception caught } see: http://php.net/continue exampl

html - how prevent pdf from downloading automatically? -

i want show pdf file in website. looks when use each of embed , object , iframe html tags , librarys such pdf.js problem when user have windows , idm (internet download manager) , idm automatically capture pdf , in tag elements nothing visible except black area! how can solve foolish problem ? thank. you should check out website viewerjs , includes opensource project.

ios - Remove a build from itunes connect -

i wanted submit app in itunes connect , uploaded build. haven't submitted app review , found bug on app , wanted upload new build error of redundancy. searched not possible remove build wanted ask if delete whole application , start on process since haven't submitted app review yet. much you can't remove build in itunes...if want apply new build itunes....change build version in xcode...(for example 1.1.1) , can see build in itunes, next version,you can see option "prerelease".

jquery - scrolly.js initializing code , a bit confusing -

i going through source code of simple parallax plugin, , came across piece of code seems very familiar or rather pattern across lot of other plugins , the plugin in concern : scrolly.js and bit of code thats confusing : $.fn[pluginname] = function ( options ) { return this.each(function () { if (!$.data(this, 'plugin_' + pluginname)) { $.data(this, 'plugin_' + pluginname, new plugin( this, options )); } }); somehow not able come terms piece of code. on little enquiry, able demystify 1st line : $.fn[pluginname] = function ( options ) { what above line example: assuming pluginname = "killtherabbit", same $.fn.killtherabbit = function ( options ) { but can call many times different values pluginname i got following answer jquery forum . i ran few debugging console.log statements , noticed function executes 1st when plugin called . perticularly don't understand below 2 l

Android JUnit testing with files -

i have lot of files required junit testing don't want include in app when downloaded (a lot of them bitmaps take space). files stored in assets folder. there directory can put files in won't included when app downloaded? we have similar situation. create new java library , place files need in tests under src/main/resources . don't use src/test/resources or won't have visibility of files. then import module part of test dependencies. testcompile project(':files-module') // java modules or androidtestcompile project(':files-module') // android modules you should able gain access files through getresourceasstream("/" + filename) because module used dependency in tests nothing included in production code.

ssh - How to use "sudo su" in java command -

i trying use sshxcute class connect unix machine , kill zombie processes.but below program hangs. please me out. public class sshexecute { /** * @param args */ public static void main(string[] args) { // todo auto-generated method stub connbean cb = new connbean("stage2c7400.qa.com", "rmeena", "sample"); // put connbean instance parameter sshexec static method getinstance(connbean) retrieve singleton sshexec instance sshexec ssh = sshexec.getinstance(cb); // connect server ssh.connect(); customtask sampletask = new execcommand("sudo su -; ps -ef |grep defunct"); //customtask sampletask1 = new execcommand("ls -lrt"); try { result s = ssh.exec(sampletask); system.out.println("************"+s.sysout+"***********"); } catch (taskexecfailexception e) { // todo auto-ge

php - Mysql real escape -

so using mysql_real_escape_string function stop sql injection attacks in following code doesn't seem working, how go fixing this? <?php $address = mysql_real_escape_string($_post['bitcoinaddress']); $btc = mysql_real_escape_string($_post['btcamount']); $phone = mysql_real_escape_string($_post['phonenumber']); $con = mysql_connect("localhost","db user","password"); if (!$con) { die('could not connect: ' . mysql_error()); } mysql_select_db("db_name", $con); $sql="insert `db_name`.`form` (`bitcoinaddress`, `btcamount`, `phonenumber`) values ('$_post[bitcoinaddress]','$_post[btcamount]','$_post[phonenumber]')"; if (!mysql_query($sql,$con)) { die('error: ' . mysql_error()); } echo ($_post['btcamount']); mysql_close($con); ?> the problem aren't using it... make change. <?php $address = mysql_real_escape_str

image - iText page number in header within PDF/A -

i have trying adjust code add page number in pdf pdf/a. i have added font, color scheme , pdf/a creation works if leave out adding addition of pdftemplate . // pdf created when part removed // though without page number in header pdfpcell cell = new pdfpcell(image.getinstance(total)); cell.setborder(rectangle.bottom); table.addcell(cell);" though header page number in too. out of clues how add font pdfpcell . other fields add phrase or paragraph can provide font. the error thrown is: exception in thread "main" com.itextpdf.text.documentexception: com.itextpdf.text.pdf.pdfaconformanceexception: fonts must embedded. 1 isn't: helvetica @ com.itextpdf.text.pdf.pdfdocument.add(pdfdocument.java:809) public class moviecountries1 { /** * resulting pdf file. */ public static final string result = "d:/tmp/pdf/movie_countries1.pdf"; private static final string font_location = "./fonts/arial.ttf"; public static font fontarial = font

bash - Split String in shell script while reading from file -

i have following script should read line line ".properties" file , tokenize on base of "=" delimiter , store values 2 variables , display it. not getting understanding of how tokenize , store in 2 different variables , use further purposes. following script works fine in reading file line line need in implementing logic of splitting string. "properties file" fname=john lname=lock dob=01111989 script #!/bin/bash echo "filereading starts" while read line value=$line echo $value #tokenize logic property=sample property_value=sample echo $property echo $property_value done <testprop.properties echo "finish" try : #!/bin/bash while ifs='=' read -r col1 col2 echo "$col1" echo "$col2" done <testprop.properties ifs input filed separator. but instead of parsing file (like fedorqui said), can source file , accessing variables directly: sour

windows installer - WiX and ARPINSTALLLOCATION -

i want msi package write value installlocation hkey_local_machine\software\\(wow6432node)\microsoft\windows\currentversion\uninstall\\(guid) . should see value in add/remove programs control panel (column location ). to set value via wix, read property arpinstalllocation should set custom action. reduced <product> minimum. how looks like: <?xml version="1.0" encoding="utf-8"?> <wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/utilextension"> <product id="*" name="myapplication" language="1033" version="!(bind.fileversion.myapplication.exe)" manufacturer="me" upgradecode="db37f5dc-68c5-46ee-bbdf-704ff68b70db"> <package installerversion="400" compressed="yes" installscope="permachine" languages="0"

Could not read JSON: Unexpected character ('[' (code 91)): was expecting a colon to separate field name and value -

my json code { "referenceid":"referenceid0", "operation":"update", "circlelist" [ { "circlecode":"rj/or/ap", "circlename":"rajasthan/orissa/andhra pradesh" }, { "circlecode":"rj/or/ap", "circlename":"rajasthan/orissa/andhra pradesh", } ] } error message : { "responsecode": "1", "message": "system error: not read json: unexpected character ('[' (code 91)): expecting colon separate field name , value\n @ [source: org.apache.catalina.connector.coyoteinputstream@157ba3f; line: 4, column: 16]; nested exception org.codehaus.jackson.jsonparseexception: unexpected character ('[' (code 91)): expecting colon separate field name , value\n @ [source: org.apache.catalina.connector.coyoteinputstream@157ba3f; li

javascript - ng-click doesnt seem to work on programmatically inserted list ( li ) elements -

i have search box on input json data server , create menu list json data. so, i've created funcion in controller triggered when there change in search box through ng-change, function calls different function createmenu injects list elements like, element.append(''+name+' '); but handleclick method seems never triggered when click list item. can tell me how resolve this? appreciated. thanks! :) //ascript.js var landapp = angular.module('landapp', ['ngroute']); function navctrl($scope , $compile, $element, $rootscope , $http) { $scope.handleclick = function(id) { console.log("clicked"); console.log(id); }; $scope.createmenu = function(elementjson,element) { if(angular.isarray(elementjson)) { angular.foreach(elementjson, function(child , key) { $scope.createmenu(child,element); }); return; } var name = elementjson.name;

c# - DbContext.Set<T>().SqlQuery Loading related entities -

i running below code: var paramuserid = new sqlparameter { parametername = "userid", value = userid }; string query = string.format("{0} {1}", "usp_getitems", "@userid"); var results = _context.set<item>().sqlquery(query, paramuserid); the usp_getitems stored procedure have. navigation properties not being loaded. there anyway acomplish on entity framework? because according question eager loading in entityframework dbcontext.database.sqlquery looks it's possible. thanks assuming stored proc returns denormalization of items , users , 1 idea comes mind use projection dto mimics structure of results of stored procedure, , use context.database.sqlquery<t> flavour of sqlquery project flattened dto. you can use linq again re-normalize result set entity graph, guess original intention. in detail assuming existing entities ef model: public class item {

Distributed C++ Application using message passing -

i working on dmtcp ( http://dmtcp.sourceforge.net/ ) , looking developing application works across multiple remote machines , computes result through messages. example calculate fibonacci sequence 3 machines a,b,c a computes starting number , sends result b b takes a's results , uses compute next number , sends c. c computes next number , sends , on. i trying build such application such can checkpoint restart failure. was, however, unable envision code such application. first time working on distributed application. any highly appreciated :) thank :) update: suggested, machine not cluster have multiple machines individual os's connected via lan each other. main objective run instances of program on multiple machines such can communicate shown above. i hope clears question bit. if machine cluster, should using mpi (message passing interface). offers rich set of communication primitives, , parallelization workhorse in high performance computing.

shader - sampler2DRect vs samplerRect -

as titled, wish know difference between sampler2drect , samplerrect i googled, couldnt find clear , precise. found, looks me samplerrect somehow relict of past on nv cards, standardized later sampler2drect, right? i think you're correct; there's both nvidia extension , arb history involved here. in earliest version of arb_texture_rectangle , specification referred samplerrect , samplerrectshadow. can see changed in 2005. i see references samplerrect working on nvidia cards circa 2005, , it's noteworthy nv_texture_rectangle identical arb_texture_rectangle except not specifying interactions glsl. so, appears nvidia had working implementation of arb extension quickly, based on draft of extension, because had similar vendor-specific extension shipping. as of february 2005, arb_texture_rectangle specified sampler2drect , samplerrect (as say) relic of interval between march 2004 , february 2005.

touch - Android getting ACTION_UP without ACTION_DOWN -

hi want pass touch event parent, if touch has moved, when user clicks want handle within child, tried within child: private boolean moved = false; @override public boolean ontouchevent(motionevent event) { if (event.getaction() == motionevent.action_down) { super.ontouchevent(event); moved = false; return false; } if (event.getaction() == motionevent.action_move) { moved = true; return false; } if (event.getaction() == motionevent.action_up) { return !moved; } return true; } but when return false on action_down not action_up on time action_down occours not know if handle or not according this official android developer site link (read capturing touch events single view section) beware of creating listener returns false action_down event. if this, listener not called subsequent action_move , action_up string of events. because action_down starting point touch events.

android - How to handle client certificate in Ajax call in Phonegap -

i trying access https web service call in ajax in our phonegap application. giving me below error while working. client certificate has been installed in android device. error:aw_contents_client_bridge.cc(210)] client certificate request cancelled 12-16 14:26:39.502: e/chromium(5859): [error:ssl_client_socket_openssl.cc(849)] handshake failed; returned 0, ssl error code 1, net_error -107 12-16 14:26:40.558: e/chromium(5859): [error:ssl_client_socket_openssl.cc(849)] handshake failed; returned 0, ssl error code 1, net_error -107 12-16 14:26:41.584: e/chromium(5859): [error:ssl_client_socket_openssl.cc(849)] handshake failed; returned 0, ssl error code 1, net_error -107 12-16 14:26:42.672: e/chromium(5859): [error:ssl_client_socket_openssl.cc(849)] handshake failed; returned 0, ssl error code 1, net_error -107 12-16 14:26:42.715: d/cordovalog(5859)

android - Zxing using custom layout -

Image
i'm using zxing library way: repositories { mavencentral() maven { url "https://raw.github.com/embarkmobile/zxing-android-minimal/mvn-repo/maven-repository/" } } dependencies { compile filetree(dir: 'libs', include: ['*.jar']) compile 'com.google.zxing:core:2.2' compile 'com.embarkmobile:zxing-android-minimal:1.2.1@aar' } and in activity : intentintegrator.initiatescan(this); @override protected void onactivityresult(int requestcode, int resultcode, intent data) { intentresult result = intentintegrator.parseactivityresult(requestcode, resultcode, data); if(result != null) { if(result.getcontents() == null) { toast.maketext(this, "cancelled", toast.length_long).show(); } else { toast.maketext(this, "scanned: " + result.getcontents(), toast.length_long).show(); } } else { // important, otherwise result not passe

c# - Getting viewbag dynamic property's value as null -

i storing value in dynamic property called login in login action method in controller , accessing value of viewbag in index view. gettng value null. why so.? following code in controllers login action method. viewbag.login = "false"; return redirecttoaction("index"); here code using in index view(cshtml). @if (@viewbag.login != "") here in view getting @viewbag.login 's value null. if remove @ symbol this viewbag.login still value null. please help. viewbag should persist value within view's , action methods bind same controller. viewbag not persist across http requests. you do public actionresult login() { /* pass `login` querystring */ return redirecttoaction("index", new { login = false }); } public actionresult index(bool login) { /* read querystring, , pass value `viewbag` */ viewbag.login = login; return view(); }

cordova - Where are files saved in PhoneGap app stored on Android? -

i using phonegap file plugin. able read & write files file system , persisted correctly. when try locate files native file explorer app on tablet or windows explorer (through usb connection), can't find traces of these files browsing folder phonegap claims store (tablet\android\data\com.xxx.yyy\files) nor search functionality. not have external cards attached android tablet. ideas how find files? after studying android documentation storage options spotted intended behavior of internal storage used applications private data shouldn't possible read other applications accessing file system. i have time thought external referred sd cards instead external storage described this every android-compatible device supports shared "external storage" can use save files. can removable storage media (such sd card) or internal (non-removable) storage. files saved external storage world-readable , can modified user when enable usb mass storage tra

shell - Using "du" for Total File Size of Certain File Types -

i have been using du command size of directory: du /tmp/dir1 this produced total size of files: 7 /tmp/dir1 which parse , use details. this folder full of .txt , txr files. interested in total size of *.txt files. is there way can odify du command produce single line output of size of *.txt files? pass list of files du command. example: du -s /tmp/dir1/*.txt a possible solution getting total size last line of du 's output, in: du -c /tmp/dir1/*.txt | tail -1

javascript - How can I handle HTTP error responses when using an iframe file upload? -

i using following dirty workaround code simulate ajax file upload. works fine, when set maxallowedcontentlength in web.config , iframe loads 'normally' error message content: dataaccess.submitajaxpostfilerequest = function (completefunction) { $("#userprofileform").get(0).setattribute("action", $.acme.resource.links.editprofilepictureurl); var hasuploaded = false; function uploadimagecomplete() { if (hasuploaded === true) { return; } var responseobject = json.parse($("#upload_iframe").contents().find("pre")[0].innertext); completefunction(responseobject); hasuploaded = true; } $("#upload_iframe").load(function() { uploadimagecomplete(); }); $("#userprofileform")[0].submit(); }; in chrome console, can see post http:/acmehost:57810/profile/uploadprofilepicture/ 404 (not found) i prefer detect error response in code

pointers - C++ Binary Search Tree Insertion functions -

helly everyone, i took c++ coding course practically no prior knowledge(my understanding of pointers still shakey)at university semester. have implement binary search tree in c++ , problem follows: on predefined node structure values , pointers left , right node supposed implement several functions, 2 of them being: void insertnode(node* root, node* node) which supposed fit handed node given tree "root", , 1 called void insertvalue(node* root, int value) which should create new instance of node struct passed value , fit in given tree "root". supposed use both createnode (simple function create node* pointer of new node instance int value , left/right pointers set null) , insertnode. im kind of running in treadmill here , dont think understand how functions supposed work(eg. difference between them). yesterday wrote function: void insertnode(node* root, node* node){ if(root == null){ root = createnode(node->value); } else if(r

Java Web Service Soap fault exception client -

i trying web service client in java using eclipse , error: exception in thread "main" javax.xml.ws.soap.soapfaultexception: message part not recognized. (does exist in service wsdl?) @ org.apache.cxf.jaxws.jaxwsclientproxy.invoke(jaxwsclientproxy.java:158) @ com.sun.proxy.$proxy26.req(unknown source) @ com.caller.main(caller.java:31) caused by: org.apache.cxf.binding.soap.soapfault: message part not recognized. (does exist in service wsdl?) @ org.apache.cxf.binding.soap.interceptor.soap11faultininterceptor.unmarshalfault(soap11faultininterceptor.java:84) @ org.apache.cxf.binding.soap.interceptor.soap11faultininterceptor.handlemessage(soap11faultininterceptor.java:51) @ org.apache.cxf.binding.soap.interceptor.soap11faultininterceptor.handlemessage(soap11faultininterceptor.java:40) @ org.apache.cxf.phase.phaseinterceptorchain.dointercept(phaseinterceptorchain.java:272) @ org.apache.cxf.interceptor.abstractfaultchaininitiatorobserver.onm

collections - Java - How to see the definition of size() method in List interface? -

in below code, how size() method gets value? definition or control flow? as list interface, should not contain definition of size() method. in below code able use size() method interface without implementing it. list<webelement> linkelements = driver.findelements(by.tagname("a")); string[] linktexts = new string[linkelements.size()]; the size() method implemented (directly or indirectly) class implements list interface. list<webelement> variable holds reference instance of class implements list<webelement> , , therefore contains implementation of size() method.

javascript - jQuery Date format invalid -

why shows different date 05/05/1972 instead of 29/05/1970 ? $(document).ready(function(){ alert($.datepicker.formatdate('dd/mm/yy', new date("29/05/1970"))); }); jsfiddle try this... $(document).ready(function(){ alert($.datepicker.formatdate('dd/mm/yy', new date(1970, 5, 29))); });

C# WCF Soap Sign Sha256 "keyset does not exist" -

i call web service requires wss. timestamp , body blocks should signed digital signature (i use usb token) i job using asymmetricsecuritybindingelement . if use defaultalgorithmsuite , signing request message works perfectly. when changed defaultasymmetricsignaturealgorithm rsasha256signature customdefaultalgorithmsuite class, throws "cryptographicexception: keyset not exist" (at line : durum response = proxy.getbatchstatus("1"); x509certificate2 certificate = null; x509store store = new x509store("my", storelocation.currentuser); store.open(openflags.readonly | openflags.openexistingonly); x509certificate2collection collection = (x509certificate2collection)store.certificates; foreach (x509certificate2 cert in collection) { if (cert.subject.contains("serialnumber=26635982214")) { if (cert.notafter > datetime.

How to query for many facets in single elasticsearch query -

i'm looking way query distribution of top n values many object fields in single query my object in elastic search looks like: obj: { os: "android", device_model: "samsung galaxy s ii (gt-i9100)", device_brand: "samsung", os_version: "android-2.3", country: "br", interests: [1,2,3], behavioral_segment: ["sport", "lifestyle"] } the following query brings distribution of values specific field number of appearances of value uk users curl -xpost http://<endpoint>/profiles/_search?search_type=count -d ' { "query": { "match": { "country" : "uk" } }, "facets": { "itemspercategorycount": { "terms": { "field": "behavioral_segment" } } } }' how can query many fields - example result behavioral_segment , device_brand , os in single query.

xcode - How to Install .ipa file into my iphone -

created .ipa file xcode 6, i'm trying install in iphone itunes. after saying "installing" nothing seems have happened. i waited quite long time, never progressed past point. followed steps correctly, don't know happening. this may case when there issue in profile. anyway can try dragging .app file on itunes & try install on device procedure following. means dont create .ipa xcode, right click on first entry organizer , select 'show in finder', again right click on xcode archive file & click on 'show package contents'. select .app file products -> applications. , drag & drop .app file on itunes , try install. may help.

c# - devExpress, how to dock gridView to the panel and remove 'drag column header'? -

Image
i cannot dock fill gridview panel in devexpress visual studio 2010, cannot remove "drag column header..." well, both visible on screenshot. can me issue?! part of code:`entityconnection entityconn = new entityconnection(utility.getentityconnection("viefconn")); list<object> mylist = new list<object>(); //gridcontrol gridcon = new gridcontrol(); using (viefconn dbf = new viefconn(entityconn)) { // linq join query var query = f in db.fields join t in db.types on f.type_id equals t.type_id (f.ass_type == _asstype) select new { f.name, f.field , t.data, f.text, }; // add linq query

objective c - Beacon didRangeBeacons in Region not Called -

my code working months ago. dint chnage anything i dont understand why didrangebeacons in region not trigger when launch app : #import "estviewcontroller.h" #import "presentviewcontroller.h" #import <estbeaconmanager.h> #import <parse/parse.h> #import <audiotoolbox/audiotoolbox.h> @interface estviewcontroller () <estbeaconmanagerdelegate> @property (nonatomic, strong) estbeaconmanager* beaconmanager; @property (nonatomic, strong) estbeacon* selectedbeacon; @property (nonatomic, strong) nsarray *beaconsarray; @end @implementation estviewcontroller - (void)viewdidload { [super viewdidload]; // setup estimote beacon manager. // create manager instance. self.beaconmanager = [[estbeaconmanager alloc] init]; // setup delegate self.beaconmanager.delegate = self; // avoiding unknown state or not self.beaconmanager.avoidunknownstatebeacons = no; // create sample region object (beacons in case have

python - Writing a 3D numpy array to files including its indices -

i'm new apologies have syntax right understand question! have numpy array shape (2,2,2) array([[[ 1, 1], [ 2, 2]], [[ 3, 3], [ 4, 4]]]) how write file list indices , array value i.e. 0 0 0 1 1 0 0 3 0 1 0 2 1 1 0 4 0 0 1 1 1 0 1 3 0 1 1 2 1 1 1 4 thanks, ingrid. you can use numpy.ndenumerate a = np.array([[[1, 1], [2, 2]], [[3, 3], [4, 4]]]) items in np.ndenumerate(a): print(items) output ((0, 0, 0), 1) ((0, 0, 1), 1) ((0, 1, 0), 2) ((0, 1, 1), 2) ((1, 0, 0), 3) ((1, 0, 1), 3) ((1, 1, 0), 4) ((1, 1, 1), 4) to remove parentheses can unpack everything for indexes, value in np.ndenumerate(a): x,y,z = indexes print(x,y,z,value) output 0 0 0 1 0 0 1 1 0 1 0 2 0 1 1 2 1 0 0 3 1 0 1 3 1 1 0 4 1 1 1 4 to handle file writing with open('file.txt', 'w') f: indexes, value in np.ndenumerate(a): x,y,z = indexes f.write('{} {} {} {}\n

ios - Is it possible to decode QRCode image to value -

i'm looking code me convert qrcode image. there easy way avfoundation scan qr code of camera. if want encoded qr string uiimage there way so? native solution: far know can scan qr video since ios 7. (see other answers) scanning image appeared in ios 8. see ciqrcodefeature and this shinobicontrols tutorial third party libs: example zbar

user interface - Android : change the position of alert dialog icon -

Image
i have alert dialog in android xml file.my alert dialog has icon in left side of it.i want change position of icon right side. dont want use custum dialog too like : a) if have drawable in dialog title (textview), use drawableright android:drawableright="@drawable/youricon" b) if imageview/imagebutton in relativelayout, use alignparentright android:layout_alignparentright="true" c) if imageview/imagebutton in linearlayout, put after textview <linearlayout android:layout_width="300dp" android:layout_height="300dp"> <textview android:text="some text" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <imageview android:src="@drawable/youricon" android:layout_width="wrap_content" android:layout_height="wrap_content" /&

python - How to structure dynamic javascript creation in Flask? -

i'm building website using (excellent) python flask framework in there templates/ folder , static/ folder. names suggest, templates folder contains templates rendered through jinja2 templating engine , static folder contains static content such css, images, , static javascript files. the javascript files i'm having trouble though. want place jinja variable in piece of js example: var requestjson = {'text': messagetext, 'touserid': {{ user.id }}}; if in in .js file in static/ folder though, isn't rendered, works if place between <script> tags in template file. works, feels kinda messy because have js in static folder, , js in template files. i of course solve defining document.touserid = {{ user.id }}; in template , using in .js files, yeah, feels kinda hack. so question is; best/pythonic/neatest way of handling insertion of dynamic values jinja in javascript? very interesting question i've thought lot @ point in time.

How to alter how svg pattern fill is displayed -

so have webpage here . under "frame background" there patterns. when clicked display in photo frame. problem of them seem blocky. particularly last one. my code this. jquery: $(" #borders #pattern1").click (function() { $(".border").css("fill", "url(#patt1)"); }); svg: <defs> <pattern id="patt1" patternunits="userspaceonuse" width="400" height="500"> <image xlink:href="images/pattern1.jpg" x="0" y="0" width="542" height="774" /> </pattern> </defs> i hope makes sense. if down voting reason please give me feedback why.

xml - XSLT html mixed table body -

i have sample xml needs rendered html. when obx.5 greater 20 characters, want show in paragraph other wise atomic values of same need clubbed table. tried xsl below, produces empty table , nothing in paragraph. should corrected in xsl desired output? want assign table header. how detect obx.5 free-text(>30) or atomic type , setup table in xslt? xml file <?xml version="1.0" encoding="utf-8"?> <oru.orc_obr__obx_nte> <obx> <obx.5>negative specific anti-\.br\human haemoglobin antibody method.\.br\this suggests proximal g.i.t. bleed or diet/drug interference.\</obx.5> </obx> <obx> <obx.5>no salmonella, shigella, campylobacter or yersinia isolated</obx.5> </obx> <obx> <obx.5>throat</obx.5> </obx> <obx> <obx.5>negative</obx.5> </obx> <obx> <obx.5>1