Posts

Showing posts from August, 2013

javascript - How to check if a user likes my Facebook Page or URL using Facebook's API -

javascript - How to check if a user likes my Facebook Page or URL using Facebook's API - i think i'm going crazy. can't work. want check if user has liked page javascript in iframe app. fb.api({ method: "pages.isfan", page_id: my_page_id, }, function(response) { console.log(response); if(response){ alert('you likey'); } else { alert('you not likey :('); } } ); this returns: false i'm fan of page shouldn't homecoming true?! i tore hair out on 1 too. code works if user has granted extended permission not ideal. here's approach. in nutshell, if turn on oauth 2.0 canvas advanced option, facebook send $_request['signed_request'] along every page requested within tab app. if parse signed_request can info user including if they've liked page or not. function parsepagesignedrequest() { if (isset($_request['signed_requ

Any idea why this piece of PHP code is making my script hang? -

Any idea why this piece of PHP code is making my script hang? - thanks time in reading this. not programmer limited skills have been able determine function called @ origin of every page making our store pos script fail. when goto our url php application blank page. when phone call function commented out, pages load fine. the interesting thing note no changes have been made our code , has been in utilize on 3 years. stopped working couple days ago , our webhost useless. haven't been able tell me if there changes made our server environment don't know start looking information. colleague suspects may have changed version of php in use, though don't know version might have preceded 1 listed here. server info -apache version 2.2.29 -php version 5.4.33 -mysql version 5.5.37-cll -architecture x86_64 -operating scheme linux // new version seo htaccess short url's function makesecure(){ if($_server['https'] != "on"){

Multiplying cell data by data in other cells in Excel -

Multiplying cell data by data in other cells in Excel - i have rather big worksheet in need average out numbers big array of criteria. cells a1-452 , c1-452 need multiplied together, info different in each row. to clarify a1 multiplied c1, , on. since info different in cells i'm not sure if possible accomplish using excel macro. any thoughts? thanks! as array formula simply, =average((a1:a452)*(c1:c452)) an array formula requires ctrl+shift+enter finalize. not take business relationship discard of blanks average collection. post comment if concern. excel excel-vba automation excel-formula

javascript - ajax HTML content not rendering in bootstrap pop -

javascript - ajax HTML content not rendering in bootstrap pop - i trying html content ajax request load in twitter bootstrap (v3) popover. the popover element looks this. <a class="more-info" data-remotecontent="/tasks/moreinfo/56eb0256-1a78-483c-b053-a387011f5b97" data-original-title="task 1" data-title="task 1" data-toggle="popover" rel="popover" href="/tasks/56eb0256-1a78-483c-b053-a387011f5b97">task 1</a> and javascript looks this. $('a.more-info').each(function () { var info = $(this); info.bind('mouseenter', function () { info.popover({ html: true, title: info.html(), content: 'loading', }).popover('show'); $.get(info.attr('data-remotecontent'), function (data) { }).done(function (data) {

javascript - This jquery lookup is not working for some reason -

javascript - This jquery lookup is not working for some reason - $(".pagination.postpagination a").click(function(event) { // populate hidden page_number field , submit search form. event.preventdefault(); var page = $(this).attr('data-page-number'); $("#id_page_number").val(page); $("#customer-search-form").submit(); }); for reason client search not fire unless there 'console.log()' before or after line client search. ideas? not js programmer helping on our team. lookup failing reason think. thanks! javascript jquery

html - Fill SVG path element with a background-image -

html - Fill SVG path element with a background-image - is possible set backgound-image svg path element? for instance, if set element's class wall , css style .wall {fill: red;} works, .wall{background-image: url(wall.jpg)} not, neither .wall {background-color: red;} . you can making background pattern: <defs> <pattern id="img1" patternunits="userspaceonuse" width="100" height="100"> <image xlink:href="wall.jpg" x="0" y="0" width="100" height="100" /> </pattern> </defs> adjust width , height according image, reference path this: <path d="m5,50 l0,100 l100,0 l0,-100 l-100,0 m215,100 a50,50 0 1 1 -100,0 50,50 0 1 1 100,0 m265,50 l50,100 l-100,0 l50,-100 z" fill="url(#img1)" /> working example html css image svg background-image

Crop image to square - Android -

Crop image to square - Android - how can cutting rectangular image (600 x 300) left , right fit in square imageview ? don't want resize image, want crop it, 300 x 300. [solution] as @blackbelt said bitmap cropimg = bitmap.createbitmap(src, startx, starty, dstwidth, dstheight); is great cropping images. how can automatically crop images different sizes. create simple code that: // drawable bitmap src= bitmapfactory.decoderesource(context.getresources(), r.drawable.image); // url bitmap src = null; seek { string url = "http://www.example.com/image.jpg"; inputstream in = new java.net.url(url).openstream(); src = bitmapfactory.decodestream(in); } grab (exception e) { e.printstacktrace(); } int width = src.getwidth(); int height = src.getheight(); int crop = (width - height) / 2; bitmap cropimg = bitmap.createbitmap(src, crop, 0, height, height); imageview.setimagebitmap(cropimg); you can utilize bitmap dst = bitmap.createbitma

javascript - How to check what was clicked in jquery? -

javascript - How to check what was clicked in jquery? - i want check clicked on whole document , save info target variable. i want create logic knowledge clicked target. here sample code: $(document).ready(function(){ console.log("document ready"); event = ""; previousevent = ""; function init() { event = ""; target = ""; } init(); function loop() { if(event==previousevent) {event="event_nothing"; } if(event!=previousevent&&event!="event_nothing") { console.log("event: " + event); // (...) logic (...) } previousevent = event; } loop = setinterval(loop,100); //events $(document).keydown(function(e){ var key = e.which; if(key == "37") event = "event_keypress_leftarrow"; else if(key == "38") event = "event

How to make Multiple APKs based on uses-features "android.hardware.telephony" in Android? -

How to make Multiple APKs based on uses-features "android.hardware.telephony" in Android? - i want utilize multiple apk back upwards in android create 2 different apks. one apk devices supports "phone phone call & sms". another apk devices doesn't back upwards "phone phone call & sms". rest of features mutual in both apks. i've achieved first apk when maintain required feature & permissions in manifest.xml . <uses-feature android:name="android.hardware.telephony" android:required="true"/> <uses-permission android:name="android.permission.send_sms"/> i tried create apk devices should not have "phone phone call & sms" feature next manifest changes. <uses-feature android:name="android.hardware.telephony" android:required="false"/> <!-- <uses-permission android:name="android.permission.send_sms"/> -->

mpmediaitem - Some items in my ipod library have a NULL assturl property -

mpmediaitem - Some items in my ipod library have a NULL assturl property - when seek pick item ipod library items play , dont. looking @ log items have null asseturl. why be? all item drm protected homecoming null asseturl. can't access such item mpmediaitem

javascript - Jquery HTML Method -

javascript - Jquery HTML Method - i'm using jquery work on project , having problem html() method. there way method can ignore tags in text? illustration if string is "a paragraph can started <code><p><code> tag" how can create code tag interpreted p tag it's brackets not? if solution requires beside jquery, still allow me know. thanks in advance! try this: use symbol &lt; , &lt;/ &gt; closing tag this. illustration : "a paragraph can started <p> tutorial </p> tag" &lt; < , &gr; > . combining both of them create bracket tag not interpreted browser html tag. bonus: demo. easy use. javascript jquery html string

php - PDO ruining my JSON with " -

php - PDO ruining my JSON with &quot; - i'm storing json array in mysql text field using pdo. (encoded json_encode() ) once data, if json_decode result null . it seems pdo replacing every " &quot; . i have utilize pdo , json multiple times, first time got problem don't understand what's happening. i'm on php 5.4.4 also, json sent ajax info thanks if can help. example of json in table : {"type_voie":"bd","indice_repetition":"t","num_voie":"121","nom_voie":"nom_rue","infos_voie":"nom_rue2","distribution_speciale":"bp789","cp":"34000","ville":"montpellier","bureau_distributeur":""} what see var_dump : {&quot;type_voie&quot;:&quot;bd&quot;,&quot;indice_repetition&quot;:&quot;t&quot;,&quot;num_voie&quot;:&quot;12

Add a new JSON Data on Tableview when it was scrolled in ios -

Add a new JSON Data on Tableview when it was scrolled in ios - i create application utilize json info web services.and in web services contain 3 page.when add together info tableview fill first page info when scroll table view fill sec page info first page info removed want maintain both page data. in tableview want create load more listview android. please give me solution.i post code here. - (void)viewdidload { pagenum=0; nsurl * url=[nsurl urlwithstring:[nsstring stringwithformat:@"http://www.truemanindiamagazine.com/webservice/news.php?page=%d",pagenum]]; nsdata * data=[nsdata datawithcontentsofurl:url]; nserror * error; nsdictionary *json = [nsjsonserialization jsonobjectwithdata:data options: nsjsonreadingmutablecontainers error: &error]; nslog(@"%@",json); self.imagesa=[json objectforkey:@"data"]; nslog(@"images,%@",self.imagesa); [self.spinner startanimating]; [self.tabl

Rust slice definition as reference with and without & -

Rust slice definition as reference with and without & - i have next sample: extern crate debug; utilize std::mem::size_of_val; struct a<'a> { a: &'a [i64], } fn main() { // code } when define piece & programme print in console: println!("{} - `{:?}`", size_of_val(&a { a: &[1, 2, 3] }), { a: &[1, 2, 3] }); // 16 - `a<'static>{a: &[1i64, 2i64, 3i64]}` defining piece without & give same result: println!("{} - `{:?}`", size_of_val(&a { a: [1, 2, 3] }), { a: [1, 2, 3] }); // 16 - `a<'static>{a: &[1i64, 2i64, 3i64]}` when seek move definition & variable steel work: let x = { a: &[1, 2, 3] }; println!("{} - `{:?}`", size_of_val(&x), x); // 16 - `a<'static>{a: &[1i64, 2i64, 3i64]}` but when seek move definition without & variable: let x = { a: [1, 2, 3] }; println!("{} - `{:?}`", size_of_val(&x

match - using a lookup table in R with varying counts of data -

match - using a lookup table in R with varying counts of data - hiiii, i've been working on issue weekend. i'm trying simple lookup, lookup table has different counts of info per lookup key. let's have 2 tables: table1: (there columns of data, irrelevant problem) table1: (sample of 3 rows) genename col1 col2 hggr .554444 brac4 .333222 fam34 .111222 my lookup table table of gene groups followed respective genes. lookup table can varying amount of columns depending on how many genes in group... little example, table has 20-30 genes per group... table2: (example of 2 rows) genegroupname col1 col2 col3 chr1_45000_46000 hggr brac4 chr1_67000_70000 fam34 what want column in table1 shows corresponding gene group! finalresulttable col1 col2 col3 chr1_45000_46000 hggr .554444 chr1_45000_46000 brac4 .333222 chr1_67000_70000 fam34 .111222 the code have

subroutine - How to run perl critic from a script with ProhibitExcessComplexity enabled? -

subroutine - How to run perl critic from a script with ProhibitExcessComplexity enabled? - how run perl critic script subroutines::prohibitexcesscomplexity enabled ? tried next wasn't flagging complex 500+ line subroutines. not have .perlcriticrc (neither want 1 there) use perl::critic; run_critic('temp.pl'); exit; sub run_critic { $file = shift; $critic = perl::critic->new( -severity => 5, -policy => 'subroutines::prohibitexcesscomplexity', -verbose => 5, ); @violations = $critic->critique($file); print @violations; } my perl::critic version 1.116 perl -mperl::critic -e 'print "$perl::critic::version\n"' 1.116 view loaded policies to view policies loaded, utilize perl::critic->policies . policies() returns list containing references policy objects have been loaded engine. objects in order loaded. if view policies, can see it's not being

php - Variable inside a string inside array? -

php - Variable inside a string inside array? - in php, want create array of strings variables, this: $myarr = array("this $animal.", "something else"); what happens if this: $animal = "dog"; $myarr = array("this $animal.", "something else"); $animal = "cat"; echo $myarr[0]; will output "this dog." or "this cat." in other words, variable within string within array change? after string defined, no longer changes. variable expansion happens @ define-time. i agree @esqew though have taken sec verify this. php

configuration - Using environment variables in camel.xml to configure endpoints -

configuration - Using environment variables in camel.xml to configure endpoints - i have cxf endpoint configuration in camel.xml this: <cxf:cxfendpoint id="callbackinbound" serviceclass="ch.axpo.emis.v1.timeseriesservice.callback" wsdlurl="wsdl/timeseries.wsdl" endpointname="tss:callbackport" address="http://somehost.com:9090/callbackservice" servicename="tss:callbackservice"/> in 1 of routes phone call endpoint this: .to("cxf:bean:callbackinbound?dataformat=payload") so, instead of having prepare address (http://somehost.com:9090/callbackservice) want able configure address different environments (dev, test, prod, ...) using scheme variables. because utilize jboss 7 runtime environment camel , there quite simple way add together scheme variables jboss. there way that? or there improve way configure cxf endpoints in different environments? thanks, sven you can

connect - A request to send or receive data was disallowed because the socket is not connected C# -

connect - A request to send or receive data was disallowed because the socket is not connected C# - i trying send username , password authentication response machine getting next error a request send or receive info disallowed because socket not connected , (when sending on datagram socket using sendto call) no address supplied static void main(string[] args) { socket sck = new socket(addressfamily.internetwork, sockettype.stream, protocoltype.tcp); sck.bind(new ipendpoint(ipaddress.parse("192.168.5.40"), 10022)); sck.listen(1); socket accepted = sck.accept(); byte[] buffer = encoding.default.getbytes("test post"); accepted.send(buffer, 0, buffer.length, 0); buffer = new byte[255]; int rec = accepted.receive(buffer, 0, buffer.length, 0); array.resize(ref buffer, rec); console.writeline("recieved: {0}", encoding.default.getstring(buffer,24,buffer.length-24)); console.writeline("recieved: {0}

ruby on rails - add a record to has_many model without saving -

ruby on rails - add a record to has_many model without saving - a client has many orders. customer.orders gives me orders. i want add together order orders internal check. don't want order added info base. but when doing: customer.orders << test_order it beingness saved , committed info base. so how can add together utilize without saving? you can utilize build, initialize order object without saving it. test_order = customer.orders.build(order_params) ruby-on-rails

javascript - Input Sanitising Laravel 4 -

javascript - Input Sanitising Laravel 4 - i using laravel 4 create restful interface angularjs app. at moment, want update object. model called discount link way is: $data = input::all(); $affectedrows = discountlink::where('id', '=', $id)->update($data); (please imagine there kind of validation checks) i error in laravel.log : general error: 1 no such column: $edit edit value passed server because added in angular. don't see need explicitly remove in js question is: how can create kind of whitelist of key-names model pay attending to. way, if get's passed in accident, rest phone call doesn't have fail. i guess there arguments sanitising in js pollute code many de-assignment statements become messy, when dealing angularjs: delete discountlink.$edit; any suggestions? $data = input::all(); $discountlink = discountlink::find($id); $discountlink->fill($data); $discountlink->save(); this method working

javascript - Long Polling: Why do some messages come in twice? -

javascript - Long Polling: Why do some messages come in twice? - i'm building chat application log polling. prototype located here: http://chat.alexanderjank.de on server side php used. think it's javascript issue, messages come in couple of times. the javascript code used is: var t; var xhr; var ids = []; var panel = $('#posts-panel'); var indexof = function(needle) { if(typeof array.prototype.indexof === 'function') { indexof = array.prototype.indexof; } else { indexof = function(needle) { var = -1, index = -1; for(i = 0; < this.length; i++) { if(this[i] === needle) { index = i; break; } } homecoming index; }; } homecoming indexof.call(this, needle); }; function getnewposts(timestamp) { xhr = $.ajax({ url: 'chat.php', data: 'timestamp=' + timestamp, da

java - How to deploy WAR manually to JBOSS 5? -

java - How to deploy WAR manually to JBOSS 5? - i've used tomcat simple apps. when needed deploy application packed maven war file , set app.war tomcat\webapps , started tomcat. need same jboss v.5 , totally cannot understand jboss way :( ps: utilize jboss through integration ide in particular case need manual deployment place application within \server\default\deploy and cmd go to <jboss_home>\bin and execute command run.bat ---> run local access only run.bat -b 0.0.0.0 --> run in broadcast mode, (can accessed other scheme in lan) check app in browser http://localhost:8080/<appname>/<path> java deployment jboss war

tfs2013 - TFSWeb project has no team room -

tfs2013 - TFSWeb project has no team room - we had licensing issue when created our project. under "team rooms" section, said rooms not beingness available @ our licensing level. fixed licensing, , says "you not have team rooms. default room created each project.". cannot figure out how create room project. if create new project , new team, creates default team room. can create additional rooms project. how can add together room project created before licensing change? edit clarify, guess rooms kind of separate projects , teams. problem is, "team rooms" section on project , team home page in question not show link room. new teams or team projects created show links rooms. to team room project, create new team room (any name like) , add together project's default team room member. 1 time this, team room show on team project's home page. p.s. add together default team room, utilize "manage users..." link , t

c# - Can't figure out why this IEnumerable is giving this answer -

c# - Can't figure out why this IEnumerable is giving this answer - the reply next code 5 can explain why is? if replace int d1 = x.current d1 = x.current , declare d1 above while loop, reply 2 , understand why don't know why it's 5 otherwise. ienumerable<int> num = new []{10,11,12,13,14,15,16}; ienumerable<int> div = new [] {2,3,5}; var lazy = enumerable.empty<int>(); var x = div.getenumerator(); while(x.movenext()){ int d1 = x.current; lazy = lazy.concat(num.where(s=>s % d1 == 0)); } int count = lazy.distinct().count(); console.writeline("{0}",count); edit: here snippet gives reply of 2. ienumerable<int> num = new []{10,11,12,13,14,15,16}; ienumerable<int> div = new [] {2,3,5}; var lazy = enumerable.empty<int>(); var x = div.getenumerator(); int d1; while(x.movenext()){ d1 = x.current; lazy = lazy.concat(num.where(s=>s % d1 == 0)); } int count = lazy.distinct().count(); conso

ios - how to have a UIViewCojntroller that is instantiated out of a Storyboard be embedded within a UINavigationController -

ios - how to have a UIViewCojntroller that is instantiated out of a Storyboard be embedded within a UINavigationController - i have uiviewcontroller called "yellow" in storyboard i'm adding this: _detailvc = [self.storyboard instantiateviewcontrollerwithidentifier:@"yellow"]; _detailvc.location=cell.location; self.incomingview = _detailvc.view; [self addchildviewcontroller:_detailvc]; [self.view addsubview:self.incomingview]; self.incomingview.alpha = 0; [_detailvc didmovetoparentviewcontroller:self]; i need uiviewcontroller exist within uinavigationcontroller i'm using force segue , giving me next error: *** terminating app due uncaught exception 'nsgenericexception', reason: 'could not find navigation controller segue 'pushdetailvc'. force segues can used when source controller managed instance of uinavigationcontroller.' if go view "yellow" view controller, , "embed in navigation c

c++ - Qt - Using user text input to direct to folder -

c++ - Qt - Using user text input to direct to folder - is there way include user text input in file address? example: the user inputs first , lastly name, , saved qstrings firstname , lastname . want access folder named firstname_lastname (ex: john_doe`), saved in location one: c://users/user/documents/patients/firstname_lastname how go using strings direct folder? use arg() qdebug() << qstring("c:/users/user/documents/patients/%1_%2") .arg(ui->lineedit->text()) //firstname .arg(ui->lineedit_2->text()); //lastname i don't know exatly want, can utilize this open directory. or can utilize qdir c++ qt file input path

ruby on rails - Can't use `find_by` method while `where` works in ActiveRecord::Base -

ruby on rails - Can't use `find_by` method while `where` works in ActiveRecord::Base - i have method this, works fine. class user < activerecord::base def self.find_or_create_from_twitter_id(twitter_id) user = where(twitter_id: twitter_id).first user ||= create_from_twitter_id(twitter_id) end end then changed where(...).first find_by , because thought 2 look same. def self.find_or_create_from_twitter_id(twitter_id) user = find_by(twitter_id: twitter_id) user ||= create_from_twitter_id(twitter_id) end but undefined method `find_by' #<class:0x007fbb2b674970> error when seek create user . i have no thought why find_by doesn't work here. i'll grateful if tell me wrong. find_by method introduced in rails 4. if you're using rails 3.x or lesser version use: find_by_<attribute_name> instead: find_by_twitter_id(twitter_id) but, there's method find , create attributes passed it, can ut

phpunit - Testing Static function -

phpunit - Testing Static function - i newbie testing. using phpunit framework. read mocking , stubbing static functions concepts new me. want unit test next function class company implements iform { public $id = null; public $externalid = null; public $name = null; public $created = null; public $modified = null; public $state = null; private $arrservice = array(); public function __construct($externalid, $name, $state) { $this->externalid = $externalid; $this->name = $name; $this->state = $state; } public static function factoryfromobject($obj) { $c = new company($obj->external_id, $obj->name, $obj->state); // tag $c->id = $obj->id; $c->created = $obj->created; $c->modified = $obj->modified; homecoming $c; } } what have done far next class

android - Stop execution until User selects a button from the Alert Dialog -

android - Stop execution until User selects a button from the Alert Dialog - in android application utilize conflicthandler class inorder observe conflicts between records of mobile device's db , server's db. when conflict detected,i want display alert dialog user can take record version "win"(server's or mobile device's). have set code of alert dialog in class of conflicthandler, when conflict detected alert dialog pops up. problem code execution doesn't stop when alert dialog pops up, user can select action done. returns serveritem. private class conflictresolvingsynchandler implements mobileservicesynchandler { @override public jsonobject executetableoperation( final remotetableoperationprocessor processor, final tableoperation operation) throws mobileservicesynchandlerexception { final jsonobject clientitem = processor.getitem().getasjsonobject(); mobileservicepreconditionfailedexceptionbas

string - VB.NET display letters of a word under eachother in a label -

string - VB.NET display letters of a word under eachother in a label - dim intlength, intteller integer dim strback, strtext string strtext = txtinvoer.text intlength = txtinvoer.text.length intlength = 1 intlength lblletterperletter.text &= strtext.substring(0, intlength) & vbcrlf next intteller = 0 strtext.length - 1 lblondermekaar.text &= strtext.chars(intteller).tostring next how display let's name under eachoter? ex. s h a w n you can utilize string.join : lblletterperletter.text = string.join(environment.newline, "shawn".asenumerable()) you need utilize asenumerable() treat string ienumerable(of char) , otherwise it's treated single string . declare ienumerable(of char) in first place: dim namechars ienumerable(of char) = "shawn" lblletterperletter.text = string.join(environment.newline, namechars) vb.net string

jQuery - Show/Hide Elements on certain date & time? -

jQuery - Show/Hide Elements on certain date & time? - so i've been challenged task of "stunting" events. i'm new jquery, i'm kind of learning on go. said i'd give best shot , after googling around think i've made start have no thought on how continue. here phone call help! :) here's what's been requested: the user wants ability to set start date [dd/mm/yyyy] set end date set start time [hh:mm] set end time add url add new bg image path so end result like: before start date - [original banner] start date end date - [stunt banner] after end date - [original banner] i kind of need do, , think i've made start - i'm i've got code mixed , in wrong places! any direction great! here's fiddle of have far: http://jsfiddle.net/sfe0hs4v/1/ here's list of variables i'd end user able change: var target = $('#stuntevent'); var startdate = "04/10/2014"; var starttime = "09:00&q

html - Show Publisher documents using object tag -

html - Show Publisher documents using object tag - how can show publisher(.pub) documents using object tag in html. able add together success pdf file adding type attribute shown below, <object height="100%" width="100%" type="application/pdf" data="xxxxxxxxxxxxxxxxxxx"> any help highly appreciated.! thanks in advance. to show publisher files directly, need kind of browser extension. these exist pdf, how made pdf work easily, though browsers have taken building in native pdf back upwards well. no browser maker has built in back upwards publisher documents, , i'm not aware of add-ons publisher documents either. microsoft doesn't create one. however, export these publisher documents other format, , show those. html easiest browsers support, though options exist pdf (which browsers can back upwards via plug-ins or own built-in support). html object-tag

windows installer - C# MsiExec installs program to a wrong location -

windows installer - C# MsiExec installs program to a wrong location - i using c# code install programme using process runs msiexec, giving path msi file. code use: string pathtomsifile = "\"" + msipath + msiname + "\""; process p = new process(); p.startinfo.filename = "msiexec.exe"; p.startinfo.arguments = "/i " + pathtomsifile + " /quiet"; p.start(); p.waitforexit(); the unusual thing when seek install program, version installs right location expect on c:\path different version installs d:\path reason. if open msi manually, default location there c:\path . thought why? eventually appears problem programme msiexec tried install. not program's developer couldn't know problem in advanced on own. programme had custom action in installation set variable representing drive install on 1 os installed. problem is, action invoked through installation's ui (when double clicking msi), not when usin

xcode - Is there a way to disable 'iOS Team Provisioning Profile: *' automatic creation? -

xcode - Is there a way to disable 'iOS Team Provisioning Profile: *' automatic creation? - xcode automatically creates provisioning profiles app. in case, have tons of apps in single project. , i'm forced create development , app store profile manually every single app. i want disable automatic creation, it's not helping me. any ideas? thanks in advance. i recommend never add together business relationship xcode. prevents creating insane numbers of profiles. prevents altering existing profiles may shared other team members. ios xcode provisioning-profile

javascript - Chrome extension-Open the captured screen shot in new tab -

javascript - Chrome extension-Open the captured screen shot in new tab - chrome.tabs.query({ active: true, currentwindow: true }, function (tabs) { chrome.tabs.capturevisibletab(null ,{ format: "png"}, function (src) { $('body').append("<img src='" + src + "'>" + tabs[0].url + "</img>");//appends captured image popup.html } ); }); this code appends captured image body of popup.html. want insted of appending image popup body open new tab using chrome.tabs.create({url:"newtab.html") , append captured image newtab.html.(the 'newtab.html' in path folder). thanks in advance javascript jquery google-chrome google-chrome-extension share|improve question asked oct 7 '14 @ 6:32 abhilash

c# - MVVM Violations -

c# - MVVM Violations - i want clear issues mvvm violation.becuase of i've created solution projects demonstrate cases. here's definition (projects) of solution : view (its wpf class libraray , has views) viewmodel (its class libraray , has viewmodels ) model (its class libraray , has models) domain (its class libraray , has application datamodels ) core (its class libraray , has core of wpf relaycommnd or eventtocommand) application ( wpf application , startup project) externalcustomcontrol (its wpf custom command library created imaginary 3rd party company) i offer download whole solution understand improve here first issue : i've eventtocommand in mainwindow.xaml closing event of window , attached mainwindowclosingcommand passeventargstocommand set true,then,in mainviewmodel there's handler command named onmainwindowclosing private void onmainwindowclosing(object parameter) { var arg = parameter canceleventargs; // best way show message dialo

.net - Extracting string from a txt file -

.net - Extracting string from a txt file - i have txt file contains values extract: number after "your number:" "your number:" has no space, made first grouping of 3digits "-" , #digits ---***--- i.e.: [some text here] number: 123-12345678 [some other text here] ---***--- i started @ regex , honest, poor in coding skill, asking help. need extract , save in excel, sql, or similar. any help? regex: number:\n.*?\n can seek regexs @ http://regexpal.com/ .net regex string extract

r - RODBC query returns results from Windows, but not from Linux -

r - RODBC query returns results from Windows, but not from Linux - i have r script fetches results sql query r studio on windows, not rapache on linux. 2 connection strings are: channel = odbcdriverconnect('driver=freetds;server=server\\instance;database=db;uid=name;pwd=password') channel = odbcdriverconnect('driver={sql server};server=name\\instance;database=db;trusted_connection=true;') i build sql , pass function: get_sql_data <- function(query,as.is=true){ return(sqlquery(channel, query,as.is=as.is, errors=true)) } i in sql profile , see batchstarting , batchcompleted event query rapache. re-create , past query ssdt , rows back. in rstudio can view() resulting dataframe. in rapache head this: warning('head head') warning(head(results)) warning('head tail') i following: 2: in eval(expr, envir, enclos) : head head 3: in eval(expr, envir, enclos) : 4: in eval(expr, envir, enclos) : head tail what doing wrong? need ut

numpy - python - mapping values from a probability mass function to a list of random variables -

numpy - python - mapping values from a probability mass function to a list of random variables - let's have list of random variables, , utilize histogram function this: import numpy np x = [np.random.randn() in range(2**10)] vals, bin_edges = np.histogram(x, 100) 1) how efficiently normalize histogram become list representations of probability mass function? 2) how map probability mass function new list in such way end list value @ i corresponds probability of observing x[i] ? python numpy statistics

javascript - open a link in a lightbox -

javascript - open a link in a lightbox - how can open link view in lightbox? iv tryed demo no luck, ideas? html: <a href="http://rightjs.org/ui/lightbox/demo" rel="lightbox" title="loaded link" onclick="loadlightbox();">click</a> jquery: function loadlightbox(){ alert( "the link clicked" ); lightbox.load($('http://rightjs.org/ui/lightbox/demo')); } the link live site live link fiddle link lightbox im using. you need reference right.js well. see jsfiddle. http://cdn.rightjs.org/right.js javascript jquery html

php - Optimizing Queries - Eager loading takes too much memory -

php - Optimizing Queries - Eager loading takes too much memory - i have next tables: user (about 1.000 rows) fans (about 100.000 rows) - user has many fans, fan belongs 1 user likes (about 100.000 rows - user has many likes, belongs 1 user now want have table with user name number of fans number of likes it big table , utilize jquery datatable have pagnition here server side. i have set relations , out set table: $users = user::get(); foreach ($users $user) { echo $user->name; echo $user->fans()->count(); echo $user->likes()->count(); } this lot of queries , want optimize. first seek using eager loading. $users = user::with('fans', 'likes')->get(); but seems havy server memory. on local environment have 16 mb memoriy size php scripts. , tries allocate more. is normal? best solution give scripts more memory? how else optimize queries? if want count number of records there's no point records count them, 2010