Posts

Showing posts from August, 2010

rest - Who will create WADL file in Application based on JERSY 2.0 -

as automatically able access wadl file application without doing manual effort, through below formatted url: http://{host}:{port}/{context_root}/{resource}/application.wadl but need know, how generated, using jersy 2.0 api on weblogic server rest implementation. if automatically generated environment , api needed ? some wiki or docs url appreciated. i think looking jersey documentation, seems responsible wadl generation. 17.2. configuration wadl generation enabled in jersey default. means options methods added default each resource , auto-generated /application.wadl resource deployed too. override default behavior , disable wadl generation in jersey, setup configuration property in application: jersey.config.server.wadl.disablewadl=true this property can setup in web.xml if jersey application deployed in servlet web.xml or property can returned application. getproperties(). see deployment chapter more information on setting ap...

php - CakePHP warning and Notice after installation -

after installing cakephp successfully, on first time running, i'm getting these warnings @ bottom. how can fix this. warning (2): missing argument 1 view::element(), called in /users/michaelanywar/sites/cakephp/app/view/layouts/default.ctp on line 61 , defined [core/cake/view/view.php, line 398] notice (8): undefined variable: name [core/cake/view/view.php, line 416] notice (8): undefined variable: name [core/cake/view/view.php, line 422] notice (1024): element not found: elements/.ctp [core/cake/view/view.php, line 425] my view/view.php lines 398 427 this: public function element($name, $data = array(), $options = array()) { $file = $plugin = null; if (isset($options['plugin'])) { $name = inflector::camelize($options['plugin']) . '.' . $name; } if (!isset($options['callbacks'])) { $options['callbacks'] = false; } if (isset($options['cache'])) { $co...

Html parsing in javacc -

i'm new javacc , have been asked extend basic html parsing using javacc code. question - <script> contains lots of characters - such > , < have other definitions. instance - if(indexof("?")) > 3 . read lexical states, did not understand much. could let me know how can have multiple definitions single character. explanation example me. and - parsing above mentioned example required? how ignore such details? also, person doing basic parsing search engine, tags such <style> required? if not, how ignore tags in javacc? suppose want "<" , ">" allowed in tags , end tags. except between <script> , </script> tags, should allowed. following should it // in default state, "<script>" changes in_script state token : { <script_tag : "<script>" > : in_script } // in both states "</script>" recognized , goes default state. <*> token : { ...

c#, How can i print in Datagridview each row center? -

i want print string datagridview. i use code. datagirdview.rows.insert('rownumber', 'string'); so, how can print string in datagridview each row center? you looking datagridviewcellstyle.alignment property gets or sets value indicating position of cell content within datagridview cell. also check datagridviewcontentalignment enumeration

javascript - Accessing global variable defined inside a function -

i trying understand variable scopes in javascript , friend asked me question. use here. function abc(){ var = b = 10; // local, b global variable. right? c = 5; // c global variable } d = 20; // d global variable console.log(b); // b not defined error. why? isn't b global variable? console.log(c); // again, why 'c not defined'. i ran code in chrome console. shouldn't expect 10 , 5 in console? gives 'b not defined', 'c not defined' error instead. why happen if b, c global variables? console.log(d) works fine. here's fiddle . why happen if b , c global variables? b , c created if call abc . merely defining function not magically execute body. function abc(){ var = b = 10; // local, b global variable. c = 5; // c global variable } // call abc execute statements inside function abc(); console.log(b); // 10 console.log(c); // 5 that said, implicitly creating global variables not still. avoid globals if possib...

c# - How to use Date and Time Picker in same control in WP8? -

i working on wp8 , requirement create item allows user select both date , time , details combined , added in textbox. can suggest there third party control using can add control or should create custom control ? i aware of creating custom control becomes difficult when managing data.

How to find and store specific lines from a file in c# -

i want search lines containing specific data , store these data in list, how can this? have written code project, code can find , store first line containing wanted data because these lines started same structure, example, data repeated in lines 100, 250, 400, 660, , these lines stated "|prod |oil |" . double[] oil_prdc = new double[10]; double[] water_prdc = new double[10]; double[] gas_prdc = new double[10]; double[] water_injc = new double[10]; double[] gas_injc = new double[10]; int length_time = 5; string[][] characters = new string[2391][]; string [] charss; string[][]counter = new string[20][]; while ((line = file.readline()) != null) { (int = 0; < length_time; i++) { total_production.add(null); total_production[i] = new list<_5_points>(); while (line.contains("|prod |oil |")) { charss = line.split('|'); (int j =...

Adding a variant to an existing homebrew formula? -

i'd modify dtc formula build specialized version of dtc used beaglebone black (and other device-tree arm boards). problem multi-fold. dtc formula provides bottled versions, , installed 1.4.0. want install version comes newer sources, not absolute latest, , applies patch available elsewhere. can build manually on os x, don't know best way make available in homebrew. i'd make variant. either entirely separate formula, or within current formula can selected command-line parameter. i'm not well-versed enough in brew know how best this. i tried creating new formula called "dtc-dyn" doesn't dashes in name. i'd make bottle, others' convenience, seems more complicated. i tried modifying current dtc , removing bottle stuff, modifying url, version, , adding system steps. of operations fail (that seem work when run original build script): def install git_sha = "f6dbc6ca9618391e4f30c415a0a09b7af35f7647" system "git checkou...

php - Override a complicated class with multiple parameters -

i trying override class usernamepasswordformauthenticationlistener . parameters: security.authentication.listener.form.class: appbundle\listener\loginformlistener class loginformlistener extends usernamepasswordformauthenticationlistener { /** * {@inheritdoc} */ public function __construct(securitycontextinterface $securitycontext, authenticationmanagerinterface $authenticationmanager, sessionauthenticationstrategyinterface $sessionstrategy, httputils $httputils, $providerkey, authenticationsuccesshandlerinterface $successhandler, authenticationfailurehandlerinterface $failurehandler, array $options = array(), loggerinterface $logger = null, eventdispatcherinterface $dispatcher = null, csrfproviderinterface $csrfprovider = null) { parent::__construct($securitycontext, $authenticationmanager, $sessionstrategy, $httputils, $providerkey, $successhandler, $failurehandler, $options, $logger, $dispatcher, $csrfprovider); } protected function at...

java - Layout inflater is null -

can me? don't know why have javanullexepction in layoutinflater.here code : this code in fragment : servicemanager.getinstance().getcampaign( new callback <campaign>() { @override public void success(campaign campaign, response response) { campaigns = campaign; adapter = new recyclercampaignadapter(getactivity(), campaign); recyclerview.setadapter(adapter); recyclerview.additemdecoration(new horizontaldivideritemdecoration.builder(getactivity()).marginprovider(adapter).showlastdivider().build()); adapter.notifydatasetchanged(); if (progressbar.isshown()) { progressbar.setvisibility(view.invisible); } } @override public void failure(retrofiterror retrofiterror) { toast.maketext(getactivity(), "failed" + retrofiterror, toast.length_short).show(); ...

c# - How to calculate list of months in specified date range in UmAlQuraCalendar -

i want calculate list of months in specified date range. for instance: datetime startdate = 24 - 11 - 2014; datetime enddate = 24 - 11 - 2016; i want calculate months between starting , ending date names of months. here go static function need: public static dictionary<int, string> monthsbetween( datetime startdate, datetime enddate) { datetime iterator; datetime limit; if (enddate > startdate) { iterator = new datetime(startdate.year, startdate.month, 1); limit = enddate; } else { iterator = new datetime(enddate.year, enddate.month, 1); limit = startdate; } var datetimeformat = cultureinfo.currentculture.datetimeformat; var result = new dictionary<int, string>(); while (iterator <= limit) { if (!result.keys.contains(iterator.month)) result.add(iterator...

swift2 - Storing user ID and password globally? -

i'm trying create login process sending post request web server. post string contains username , password, user types in textfield. as response user id , sha1 encrypted password. since need both of them access other pages on server, have store them globally in project. so question is, best way so? should create class user, store items properties? you can using 2 different ways, 01:- let id = username.text let password = password.text let displayname = display.text // stroe data var prefs:nsuserdefaults = nsuserdefaults.standarduserdefaults() prefs.setinteger(id!, forkey: "userid") // integer values prefs.setinteger(password!, forkey: "userpassword") prefs.setobject(displayname!, forkey: "displayname") // string values prefs.synchronize() // stored data let prefs:nsuserdefaults = nsuserdefaults.standarduserdefaults() id.text = prefs.valueforkey("userid...

Jwplayer 7.0.3 with flash 18 not playing videos, while HTML is working fine -

although works ni html5 mode mp4 files, player not play neither flv files in flash mode, nor mp4 files in flash mode. in chrome (44.0.2403.157) nd firefox (40.0.3), it's loading indefinitely. what stranger player jwplayer dashboard ( https://dashboard.jwplayer.com/#/players/basic_setup ) manages play flv files when loading them console using following call: jwplayer(document.queryselector('.jwplayer')).load([{ file:'http://www.sample-videos.com/video/flv/720/big_buck_bunny_720p_1mb.flv' }]); here's jsfiddle showcasing issue: https://jsfiddle.net/kldmj42d/ (make sure specify license key) just toggle comments on mp4 , flv files make sure works mp4 file. html: <div class="main"> <div id="player"> </div> </div> js: jwplayer.key = ""; jwplayer.defaults = { aspectratio: "16:9", autostart: false, controls: true, displaydescription: false, displaytitle: true, flash...

java - OTP with spring security -

how can implement otp 2 factors authentication in spring security. first, db username , password authentication , based on user role redirect otp authentication? you using plugin this: https://github.com/upcrob/spring-security-otp it hasn't been updated in awhile, @ least may give starting point.

android - Returning back to last state in previous activity -

i have 2 activities , b. when application starts, activity loaded , load data database. can go activity b without problems, when go activity a, old data viewed moment , activity reloaded. any idea how fix this? clear fields before loading data start db.loading data take little time , before clear previous field.

javascript - How to search by duration in Algolia -

let's building hotel booking platform, , every room record has availability calendar. common search criteria search duration. user inputs start date , end date, , database fetches rooms not occupied duration. i have implemented naive approach store occupied days array of days. attribute :occupied_at_i array = [] if !occupied_at.empty? occupied_at.each |date| array << time.parse(date).to_i end end array end and @ client side, add following javascript code cross-check if day in numericrefinement // date filters $('.date-field') .on('change', function() { if(_.every(_.map($('.date-field'), function(date) {return _.isempty(date.value) }), function(n) {return n==false;})) { helper.clearrefinements('occupied_at_i'); var arrayofdates = adddatefilters(); _.foreach(arrayofdates, function(n) { helper.addnumericrefinement('occupied_a...

Websocket onMessage ring the bell only once even there are multiple browser tabs listening for the messages -

i have active websocket connection on each tab of browser. when there message received each of tabs, ringing bells annoying. there way can ring bell once multiple tabs open(facebook doing this) if control server, can unicast "ring" event specific connection (i suggest latest connection) while broadcasting, now, actual message websocket connections. if don't control server, doubt there applicable solution.

java - Press [enter] to start the game, no error -

i trying function where, when press enter, start game, isn't working. there no error. have followed tutorial. here code: import greenfoot.*; /** * write description of class menu here. * * @author (your name) * @version (a version number or date) */ public class menu extends world { /** * constructor objects of class menu. * */ public menu() { // create new world 600x400 cells cell size of 1x1 pixels. super(800, 500, 1); prepare(); } public void start() { { if(greenfoot.iskeydown("enter")) { minionworld minionworld= new minionworld(); greenfoot.setworld(minionworld); } } } /** * prepare world start of program. is: create initial * objects , add them world. */ private void prepare() { controls controls = new controls(); addobject(controls, 300, 100); ...

Excel Automation through Windows Service written in C# fails in Office 365 installed machines -

i working windows service written in c#. through windows service automating excel in programmatic way. excel.application excel = excel.application(); this code working fine versions of excel (2003, 2007, 2010, 2013). have installed office 365 in machine. getting below exception when automate excel using above call: retrieving com class factory component clsid {00024500-0000-0000-c000-000000000046} failed due following error: 80080005 server execution failed (exception hresult: 0x80080005 (co_e_server_exec_failure)). can let me know, there special consideration should taken when automating office 365 excel via windows service? microsoft not recommend, , not support, automation of microsoft office applications unattended, non-interactive client application or component (including asp, asp.net, dcom, , nt services), because office may exhibit unstable behavior and/or deadlock when office run in environment. if building solution runs in server-side context, shoul...

html - Chrome Image Transform (image disapears) -

im running problem website i'm developing. (web store) there zoom function on products when hover on them. in chrome seems not work (the image disappear). in firefox , in internet explorer seems work fine. here sample of happens. in chrome images disappear when hover on them. in other (non web-kit presume) browser works without problems. does have solution / explanation problem ? https://jsfiddle.net/pnvkeugs/ <div class="col product-block"> <div class="image"> <a class="img" a="#"> <img src="http://www.ecdevelopment.org/wp-content/uploads/2015/04/hippie-flower.jpg" alt="example" /> </a> </div> </div> css: .product-block:hover { box-shadow: 0 0 4px #d4d4d4; } .product-block:hover .image .img img { -webkit-transform: scale(1.2); -moz-transform: scale(1.2); -ms-transform: scale(1.2); -o-btransform: scale(1.2); transform: scale...

javascript - C# MVC site - saving canvas to an image file on the server - image is being cropped -

Image
i'm creating admin system user(admin) can create users. system requires user have photograph. i've implemented file upload trying provide option use webcam take image , use that. i've pretty got working except image manage save on server cropped @ bottom. i assumed size of canvas/video elements have used. tried hard code larger sizes had no effect. in ui image captured video element , displayed on canvas want be. i've added text box that's bound model can pass canvas text server. here's code: <video id='v' class="employee-image-display"></video> @html.textboxfor(m => m.webcamimagedata, new { id = "tbwebcamimage" }) <a class="btn btn-block red" id="btntakephoto"> <i class="fa fa-camera"></i> </a> <canvas id="canvas"></canvas> javascript: function takephoto() { var canvas = $('#canvas')[0]; //set canvas wid...

substring - Shell Scipt sub string -

please me script below case. i have content of file below, allidpropert.txt (id|propertybit|) 1|0000000000000000000000000| 2|0000100000000000000000000| 3|0000100000000000000000000| 4|0000100000000000000000000| 5|0000000000000000000000000| 6|0000000000000000000000000| i need extract id's different file propertybit[5] == 1(where 5th bit 1) in format below. 5bitenable.txt 2| 3| 4| ` this awk one-liner should job: awk -f'|' 'substr($2,5,1)==1 {print $1fs}' file test example input: kent$ awk -f'|' 'substr($2,5,1)==1 {print $1fs}' f 2| 3| 4|

java - quartz scheduler (convert input time to quartz pattern) -

i developing java web application in need input or chose time webpage tasks run according time had specified in webpage. using quartz scheduler purpose, have succeeded in giving quartz pattern input in webpage itself. don't want input pattern, rather want can input or select time gets scheduled per choice. since new java programming have less knowledge in area.

Rsyslog filtering -

how can forward different app/service log messages 1 server central rsyslog server ? clarification : server1:swift(all in one) server2:rsyslog swift log location :/var/log/swift/all/log(server1) sshd log location:/var/log/secure(server1) i want store swift , sshd log in server2 in different location,the issue server2 taking logs in different location both location storing log both all.log , secure !! how can filter ? this server1(swift) rsyslog.conf #### modules #### # imjournal module bellow used message source instead of imuxsock. $modload imuxsock # provides support local system logging (e.g. via logger command) $modload imjournal # provides access systemd journal #$modload imklog # reads kernel messages (the same read journald) #$modload immark # provides --mark-- message capability # provides udp syslog reception #$modload imudp #$udpserverrun 514 # provides tcp syslog reception #$modload imtcp #$inputtcpserverrun 514 #swift log forward remote rsyslog server $modl...

c# - How to use callsite layout renderer with Sentinel log viewer? -

using nlog in 1 of application , able log information in different targets file,console,eventlog , nlogviewer. using layout as <?xml version="1.0" encoding="utf-8" ?> <nlog xmlns="http://www.nlog-project.org/schemas/nlog.xsd" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" > <targets> <target name="event" xsi:type="eventlog" layout="${longdate}|${level}|${message}|${event-properties:eventid}" source="nlogdemo" /> <target name="file" xsi:type="file" filename="c:\users\sharathk\desktop\tocompare\${shortdate}loggingdemo.txt" layout="---------nlog file--------${newline}${longdate}=>${level}=>${message}=>${event-properties:eventid}=>${callsite:filename=true:methodname=true}" /> <target name="console" xsi:type="console" layout="${longdate}|${level}|${message}|${callsi...

sorting - Why Guavas Ordering doesn't sort string values of integers correctly? -

i want know why guavas ordering doesn't works correctly @ follows code: public static void main(string[] args) { list<integer> integers = arrays.aslist(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); system.out.println(ordering.natural().isordered(integers)); list<string> strings = arrays.aslist("1", "2", "3", "4", "5", "6", "7", "8", "9", "10"); system.out.println(ordering.natural().isordered(strings)); list<string> strings2 = arrays.aslist("6417", "6418", "6419", "6420"); system.out.println(ordering.natural().isordered(strings2)); } output: true false true i expected see true 3 times. can explain why isn't sorted expected? the ordering of strings based on lexicographical ordering defined in documentation , not on numerical ordering. pair of strings, first character of each of them taken...

php - How can order place for multiple product from custom page after select multiple qty in magento? -

i created custom page, displaying product qty button. here can choose multiple products. after want order place of selected products. how can place order multiple product? plugin available in magento? i in need of same functionality, ended using own script instead of plugin. below complete code of placing order programatically. hope helps. <?php $transaction = mage::getmodel('core/resource_transaction'); $increment_ids = array(); if ($orderdata) { try { $reservedorderid = mage::getsingleton('eav/config')->getentitytype('order')->fetchnewincrementid($store_id); $order = mage::getmodel('sales/order') ->setincrementid($reservedorderid) ->setstoreid($store_id) ->setquoteid(0) ->setglobal_currency_code('usd') ->setbase_currency_code('usd') ->setstore_currency_cod...

php - Confused about codeigniter routes order -

i'm learning codeigniter , stumped following: i have these routes in routes file: $route['(:any)'] = 'pages/view'; $route['news/create'] = 'news/create'; $route['news/(:any)'] = 'news/view/$1'; $route['news'] = 'news'; $route['default_controller'] = 'pages/view'; yet when load http://mysite/index.php/news ," loads news page rather 'pages/view,'. thought because have catchall route @ top, page load pages/views. where going wrong? the reason :any doesn't match slash, @ least since ci 3.0+ . first route rule not "catch all" longer. http://www.codeigniter.com/user_guide/installation/upgrade_300.html?highlight=any#routes-containing-any

javascript - On adding the click event tracker using jquery on the document, the click event on a link is not working -

i have file listing , there option delete file. on clicking delete asks confirmation. on clicking confirm file deleted. please check jsfiddle that https://jsfiddle.net/d6ds7ql2/1/ when add html click handler inorder change confirm text original delete text, $('html').click(function(event){ if($('.confirmdelete').is(':visible')){ $('.confirmdelete').hide(); $('.deletelink').show(); return false; } }); $('.confirmdelete').hide(); $('.deletelink').click(function (event) { $(this).hide(); $('.confirmdelete').filter(':visible').each(function () { $(this).hide(); $(this).prev('.deletelink').show(); }); $(this).next('.confirmdelete').show(); event.stoppropagation(); return false; }); https://jsfiddle.net/d6ds7ql2/2/ but issue on clicking 'confirm' text not going href hiding confirm text , showing d...

Android: Share event from default Calendar to my app -

similar sharing images/audio , plain text, want see app when user shares event default calendar app. i sure there mime type. as see app in list shares images, similar see app when event shared. <intent-filter> <action android:name="android.intent.action.send" /> <category android:name="android.intent.category.default" /> <data android:mimetype="image/*" /> </intent-filter> <intent-filter> <action android:name="android.intent.action.send" /> <category android:name="android.intent.category.default" /> <data android:mimetype="vnd.android.cursor.item/event" /> </intent-filter> <intent-filter> <action android:name="android.intent.action.send_multiple" /> <category android:name="android.intent.category...

xcode - found nil while unwrapping an Optional value when trying to play a sound -

Image
i trying play sound in os x app has been built in swift. i getting following error: fatal error: unexpectedly found nil while unwrapping optional value the line of code in question is: let bgmusicurl:nsurl = nsbundle.mainbundle().urlforresource("emptytrash", withextension: "aif")! i have sound located here however when call method prepare , play sound: func playsound() { let bgmusicurl:nsurl = nsbundle.mainbundle().urlforresource("emptytrash", withextension: "aif")! backgroundmusicplayer = try! avaudioplayer(contentsofurl: bgmusicurl) backgroundmusicplayer.numberofloops = -1 backgroundmusicplayer.preparetoplay() backgroundmusicplayer.play() } i error. going on? i declare this: var backgroundmusicplayer:avaudioplayer = avaudioplayer() a file part of project doesn't have part of target, means won't copied application bundle. to see "target membership...

php - Remove all HTML tags and attributes from a string -

this question has answer here: remove html tags php string 4 answers i retrieving data table in mysql database created joomla framework. want encode data in json format. after retrieving data there many unnecessary tags , style properties. tried html_entity_decode , strip_tags , many more built in functions didn't work me. can tell me how remove tags , styles attributes retrieved data , plain text only. use php strip_tags() function.

javascript - Getting Clicked Edit Value Item to Another page using jquery/ajax -

mysql table name demo below listed values peter , john edit links example peter edit john edit on clicking edit link i'm opening edit_name.php page. in edit_name.php i'm updating clicked edited value update button.. my requirement in edit_name.php should receive clicked name value for example if click on peter edit button should peter value in edit_name.php file , if click on john edit button should john value in edit_name.php etc.. please me in getting value of clicked in edit_name.php file php code <div> <?php $sql="select * demo"; $data = $con->query($sql); if($data->num_rows > 0) { while($row = $data->fetch_array(mysql_assoc)) { $str = "" ?> <div class="show_edit_page"> <div> <?php echo $row['name'];?> <a href="#" class="ajax_edit" data-id="<?php echo $row...

compilation - Add subtitles to video using ffmpeg -

ffmpeg asking compile mingw add subtitles video. have installed mingw. following https://trac.ffmpeg.org/wiki/howtoburnsubtitlesintovideo add subtitles. filter requires ffmpeg compiled --enable-libass. how can compile filters? you need compile libass (the library) ffmpeg can link against it. https://github.com/rdp/ffmpeg-windows-build-helpers 1 way (cross compiles it). gl!

ng-if inside ng-repeat in angularjs -

i generating dynamic form in angularjs: <div ng-repeat="choice in mydata" class='repeater'> <div ng-if="choice.type === 'dropdown'" ng-init="count = 0"> <div class="row"> <div class="col-md-2"> <p>choose</p> </div> <div class="col-md-8"> <select ng-model="selected" ng-options="item.value item in mydatedropdown[count]"> </select> </div> </div> {{count += 1}} </div> </div> i unable increment value of count , assign mydatedropdown[] . new angularjs. you try changing ng-repeat <div ng-repeat="(index, choice) in mydata" class='repeater'> , use index in mydatedropdown <div ng-repeat="(index, choice) in mydata" class='repeater'> <d...

javascript - Promises not working for IndexedDB in angularjs -

i have app using indexeddb. made prolific use of callbacks, , decided clean using angularjs promises $q . fail. http://jsfiddle.net/ed4becky/bumm337e/ angular.module("idbtest", []); angular.module("idbtest") .service("initsvc", ['$q', function ($q) { var svc = this; svc.dbversion = 1; svc.open = open; svc.deletedb = deletedb; var idb = window.indexeddb; function deletedb() { return $q(function (resolve, reject) { idb.webkitgetdatabasenames().onsuccess = function (sender, args) { if (sender.target.result && sender.target.result.length > 0) { var db = sender.target.result[0]; console.log("deleting " + db); var request = idb.deletedatabase(db); request.onsuccess = function () { console.log('database ' + db + ' deleted.'); resolve(); ...

jquery - How to disable same origin policy for chrome new tab? -

i'd user-script increase zoom size of tiles in default chrome new tab. used able access them directly (in last year or so) they've changed new tab use iframe tiles. never got around fixing it, until trying again. so can't change more — code jq('#mv-single').contents().find('.mv-tile').css("zoom", 1.4); no results, , using jquery @ console shows me reason: jq('#mv-single').contents().find("body") vm8405:8 uncaught domexception: failed read 'contentdocument' property 'htmliframeelement': blocked frame origin "https://www.google.com" accessing cross-origin frame.(…) the iframe is: <iframe id="mv-single" src="chrome-search://most-visited/single.html?removetooltip=no%20mostrar%20en%20esta%20p%c3%a1gina"></iframe> a bad alternative i'm not interested in disabling web security. don't want permanently , globally turn off web security, seems bad idea (and men...

ios - App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure -

app transport security has blocked cleartext http (http://) resource load since insecure. temporary exceptions can configured via app's info.plist file. i have solutions possible like: ` nsapptransportsecurity <dict> <key>nsallowsarbitraryloads</key> <true/> </dict>` and <key>nsapptransportsecurity</key> <dict> <key>nsexceptiondomains</key> <dict> <key>yourserver.com</key> <dict> <!--include allow subdomains--> <key>nsincludessubdomains</key> <true/> <!--include allow http requests--> <key>nstemporaryexceptionallowsinsecurehttploads</key> <true/> <!--include specify minimum tls version--> <key>nstemporaryexceptionminimumtlsversion</key> <string>tlsv1.1</string> </dict> </dict> </dict> but still facin...

vba - FileSave() Word Macro -

i have written macro when file created , little save button clicked macro triggered(as overrides default filesave function). macro extracts information table in document, converts string cleanses string of carriage returns uses file name. if statement runs checking whether hidden row in table has value of 1 , if not set value 1 , save document @ location specified new filename. all of works great except when re-open file edit it, users do, , click save again tries run again, ignoring if statements first statement , add carriage return start of filename breaking save function sharepoint has invalid character in it. if click save again seemingly run macro normal , save reading if statement correctly. doing wrong here? here code: sub filesave() dim strtext string dim strclean string dim strfilename string dim strlocation string dim strsavedname string dim strcleansave string strtext = activedocument.tables(1).rows(1).cells(2).range.text strclean...

Error inflating class android.support.v7.widget.Toolbar in Gingerbread(sdk 9) -

i use material in application , works right (minsdkversion 11+) minsdkversion 9 application crashes <android.support.v4.widget.drawerlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:fitssystemwindows="true" android:layout_height="match_parent" android:background="@drawable/splash"> <relativelayout android:layout_width="match_parent" android:layout_height="match_parent"> <android.support.v7.widget.toolbar style="@style/toolbarstyle" xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="?attr/colorprimary" android:minheight="0dp" /> </relativelayout> error is: android.view.inflateexception: binary...

php - submit and show records without reloading page -

i have form, submit data in table , show them on same page. reloads page. i want submit , show data without reloading page. have read many ajax scripts. confused . can 1 please? <form action="viewblog.php" method="post"> <h3 class="contact_title">leave comment</h3> <div class="contact_form"> <div class="row"> <div class="large-4 columns"> <input type="text" name="name" placeholder="name" /> </div> <div class="large-12 columns"> <textarea cols="10" rows="15" name="comment" placeholder="comment"></textarea> </div> <div class="small-4 columns"> <input type="submit" name="submit" class="button right" value="add comment" /> </div> </div> </div> </form> <?php ...

time - Elasticsearch Date Histogram with Hour Interval -

i'm trying aggregation: "aggs":{ "visits_by_hour":{ "date_histogram":{ "field": "acctstarttime", "interval":"hour", "format": "hh", "min_doc_count": 0 } } } it works need group hour , not return multiple hours same hour, make sense? i'm getting now: { "key_as_string": "12", "key": 1440244800000, "doc_count": 18 }, { "key_as_string": "12", "key": 1440331200000, "doc_count": 17 } this need (grouped hour): { "key_as_string": "12", "key": 1440331200000, "doc_count": 35 } suggestions? edit i've found solution problem. not sure if best approach, works. "aggs": { "hour": { "terms...

babeljs - Prevent Babel from using .babelrc -

when requiring('babel/register)() if tell custom .babelrc path still loads original .babelrc too. how can prohibit read .babelrc? the answer impossible , therefore should specify custom babel_env each time you're using babel , in .babelrc make "env" section configuration each of babel_env

Parse multiple pages with phantomjs -

i have made code parses url-s page. next, href every parsed url <div class="holder"><a href="these url-s"></a></div> , output file , sepparate comma. so far have made code. able find url-s need parsed , collects them comma sepparated file called output2.txt. var resourcewait = 300, maxrenderwait = 10000, url = 'url parse href-s from'; var page = require('webpage').create(), count = 0, forcedrendertimeout, rendertimeout; page.viewportsize = { width: 1280, height : 1024 }; function dorender() { var fs = require('fs'); var path = 'output2.txt'; page.includejs("http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js", function() { fs.write(path,page.evaluate(function() { return $('.urldiv').find('a') .map(function() { return this.href;}) .get() .join(','); }),...

qt - Select QGraphicsItem -

i have problems selecting qgraphicsitem. i have multiple items (line , ellipse) , itemgroups (containing lines). in cases overlaying each other still visible because of transparency. for example: first create small circle , later create bigger circle around small one. how can select small circle? i want item beeing selected if click on visible nontransparent part of (maybe tolerance lines of 1px width). how can that? a small example how create circle: circletodraw = new qgraphicsellipseitem; this->additem(circletodraw); circletodraw->setpen(qpen(qt::black, 1, qt::solidline)); circletodraw->setpos(origpoint); circletodraw->setrect(origpoint.y() - event->scenepos().y(), origpoint.y() - event->scenepos().y(), (event->scenepos().y() - origpoint.y())*2, (event->scenepos().y() - origpoint.y())*2); later implement qimages transparent parts. here problem again, want select items under transparent part. thank you! edit my code now: qlist<qgra...

pandas - Python correlation matrix 3d dataframe -

i have in sql server historical return table date , asset id this: [date] [asset] [1dret] jan asset1 0.52 jan asset2 0.12 jan asset3 0.07 feb asset1 0.41 feb asset2 0.33 feb asset3 0.21 ... so need calculate correlation matrix given date range assets combinations: a1,a2 ; a1,a3 ; a2,a3 im using pandas , in sql select i'm filtering tha date range , ordering date. i'm trying using pandas df.corr(), numpy.corrcoef , scipy not able n-variable dataframe i see example it's dataframe have asset per column , 1 row per day. this code block i'm doing it: qryret = "select * indexesvalue date > '20100901' , date < '20150901' order date" result = conn.execute(qryret) df = pd.dataframe(data=list(result),columns=result.keys()) df1d = df[['date','id_riskfactor','1dreturn']] corr = df1d.set_index(['date','id_riskfactor']).unstack().corr() corr.columns = corr.columns.dr...