Posts

Showing posts from June, 2012

Ruby Mac OS X 10.9.2 -

i'm trying figure out error. i'm on mac os x 10.9.2 , ruby -v says ruby 2.0.0p247 (2013-06-27 revision 41674) [universal.x86_64-darwin13] the error is: chadd:homebrew-openmw-master chadd$ ruby test.rb /system/library/frameworks/ruby.framework/versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require': cannot load such file -- formula (loaderror) /system/library/frameworks/ruby.framework/versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ex/kernel_require.rb:45:in `require' test.rb:1:in `<main>' the code i'm trying run looks this, left incomplete because don't need rest: require 'formula' class openmwboost < formula homepage 'http://www.boost.org' url 'http://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.gz/download' why version of ruby not find 'formula', not native package should come ruby. you need install forumla gem , gem install formu

jquery - Height to get this sub navigation to slide up on first click -

i have list items have sub navigation: <ul role="menu"> <li role="menuitem"> <a href="#" class="clearfix">top level</a> </li> <li class="slidedown open" role="menuitem"> <a href="#" class="clearfix">top level</a> <span class="slidedown-toggle">show sub menu</span> <!-- subnav --> <ul class="list-reset nav-sub" role="menu"> <li role="menuitem"> <a href="#">second level</a> </li> <li role="menuitem"> <a href="#">second level</a> </li> <li role="menuitem"> <a href="#">second level</a> </li> </ul> </li> </ul> i have script,

orchardcms - Orchard :how to hide fields in content part by using placement.info? -

i add 1 customer field called wrappersuppressed widget content part. can add , remove wrapper widget. boolean field management purpose, not content. i'm trying hide filed in front end. i put 1 line in placement.info, this, working.: <place fields_boolean-wrappersuppressed="-"/> i need add more condition, content part, field belong to, this <place fields_boolean-widgetpart-wrappersuppressed="-"/> this not work. anyone can me on issue? this not how works: can't make shape names that. first part of attribute name has shape name emitted driver of field ( fields_boolean in case), , second name of field. have more 1 field named wrappersuppressed on content type? if so, that's not such idea. there other conditions can put match tag surrounding place . can match on content type, display type, , path. recommend read http://docs.orchardproject.net/documentation/understanding-placement-info details.

c# - How to debug System.InvalidOperationException in System.Security.AccessControl.Privilege.Revert() -

i have application started crashing when shutting down following error in event log: application: app.exe framework version: v4.0.30319 description: process terminated due unhandled exception. exception info: system.invalidoperationexception stack: @ system.security.accesscontrol.privilege.revert() @ system.security.accesscontrol.privilege.finalize() i did digging in .net reference source method , appears exception thrown @ bottom. can't first invalidoperationexception because not contain message, 1 @ end of method throws blank 1 has match. the call adjusttokenprivileges (p/invoke) failing , checks not find expected error code: if ( error == win32native.error_not_enough_memory ) { throw new outofmemoryexception(); } else if ( error == win32native.error_access_denied ) { throw new unauthorizedaccessexception(); } else if ( error != 0 ) { contract.assert( false, string.format( cultureinfo.invariantculture, "adjusttokenprivileges() failed unrecogn

javascript - How to avoid showing form data in http headers -

i submitting form using "post" method. but, submit form using "post" method, can see submitted form data in http headers. using live http headers plugin check headers. trying save secure info. if browser has "live http headers" plugin, 1 can trap data. so, if want hide submitted data in http headers also, need do? if not possible hide submitted form data in http headers, mechanism follow encrypt data @ client side(so if data visible in http headers, in encrypted format. so, no 1 can understand) , decrypt , process data @ server side. totally blocked here. please me out this. appreciate help. in advance. there appears bit of confusion regarding how http post works. i'm assuming viewing headers in either client browser's debugger or on server. in case, data being sent should readable. client side debugger displays headers before encrypted , sent across wire. on server, post data should available in unencrypted format. what sent o

How to change color of all holidays in Outlook 2010? -

Image
i added national holidays outlook -> options -> calendar -> calendar options -> add holidays now want change color of holidays @ once. ideas? select holiday entry in calendar. open color categories dialog tab home-> categorize-> categories

c# - HelloWorld is successfully launched by Windows .NET but not by MONO -

i've installed mono on 64-bit windows 7 using: mono-3.2.3-gtksharp-2.12.11-win32-0.exe go-mono download page in directory (without spaces in path) changed according jim gomes' advice successfully run first 2 examples console hello world gtk# hello world from mono basics article. but 3d example "winforms hello world" compiled without errors , run windows (by double-clicking in windows explorer) running: mono hello.exe from "mono-3.2.3 command prompt" window produces errors listed below (note first 2 examples including window of second example launched command prompt invoking through mono ... ) what problem , how overcome it? update according mentioned article "mono basics" compiled 3d example "winforms hello world" gmcs hello.cs -pkg:dotnet . btw, dotnet package located? in directory same name? not have single dir such name dotnet under mono-3.2.3 dir the errors produced running mo

combobox - MFC hide CCombobox Arrow button -

is there way hide dropdown button of ccombobox of mfc ? combobox has style cbs_dropdown , editable.the dropdown should open whenever user types in edit box. if don't need drop down , want typing helper feature should not use combobox. instead use shautocomplete , iautocomplete2 read introduction .

objective c - The operation couldn’t be completed. No such file or directory: but the file exists -

i weird issue while saving file writetofile:options:error: in first case following issue: writetofile failed error error domain=nscocoaerrordomain code=4 "the file “preferences.plist” doesn’t exist." userinfo=0xa12c30 {nsfilepath=file:/users/patrick/desktop/untitled.fef/preferences.plist, nsunderlyingerror=0xa0d130 "the operation couldn’t completed. no such file or directory"} but file exist in location. file stored in app document file package. code: (subclass of nsdocument) nsstring *preffile = [[[self fileurl] absolutestring] stringbyappendingpathcomponent:@"preferences.plist"]; nserror *error; bool succes = [[nskeyedarchiver archiveddatawithrootobject:documentpreferences] writetofile:preffile options:0 error:&error]; if (!succes) { nslog(@"writetofile failed error %@", error); } make sure when using of ...tofile methods of various classes use real path , not mistake file url. can tell these apart looking @ path.

linux - Alphanumeric sorting of a string with variable width size -

i stuck in small sorting step. have huge file >300k entries , file has sorted on specific column containing alphanumeric identifiers as rpl12-8 lrsam1-1 rpl12-9 lrsam1-2 rpl12-10 lrsam1-5 rpl12-11 lrsam1-101 lrsam2-1 act-1 act-100 act-101 act-11 the problem variable width size, unable specify second key identifier (sort -k 1.8n).the first sort on first alphabet, on number next , third number after "-". can enable sorting after "-" using delimiter field don't care width of string. desired output : act-1 act-11 act-100 act-101 lrsam1-1 lrsam1-2 lrsam1-5 lrsam1-101 lrsam2-1 rpl12-8 rpl12-9 rpl12-10 rpl12-11 with above data in input.txt: sort -t- -k1,1 -k2n input.txt you can change field delimiter - -t , sort on first field (as string) -k1,1 , , 2nd field (as number) -k2n .

Error UnathorizedException when invoking JavaScript from C# -

i trying call javascript code c# in phonegap (cordova) windows phone 8 application. following steps of accepted answer thread: how call javascript c# - cordova/phonegap i supposed able access method in javascript part or execute hardcoded js code. but, encountering error: an exception of type 'system.io.filenotfoundexception' occurred in mscorlib.ni.dll , wasn't handled before managed/native boundary first chance exception of type 'system.unauthorizedaccessexception' occurred in system.windows.ni.dll exception of type 'system.unauthorizedaccessexception' occurred in system.windows.ni.dll not handled in user code first chance exception of type 'system.reflection.targetinvocationexception' occurred in mscorlib.ni.dll exception of type 'system.reflection.targetinvocationexception' occurred in mscorlib.ni.dll , wasn't handled before managed/native boundary error: exception in processcommand :: exception has been th

testing - Using gon with jasmine-rails -

our backbone app uses gon . when try run our tests, getting gon undefined error in console of browser. our layout file includes call include_gon , file not being loaded jasmine, jasmine failing in our first javascript file contains gon. tried creating helper assign gon variable empty hash (like fixture), helper called after first call gon , therefore didn't fix our issue. the secret use asset pipeline define load order of files. commented out these lines jasmine.yml # path parent directory of src_files # relative path rails.root # defaults app/assets/javascripts #src_dir: "app/assets/javascripts" # list of file expressions include source files # relative path src_dir #src_files: # - "application.{js.coffee,js,coffee}" and created spec.js.coffee these lines: #= require application #= require jasmine-jquery now js files loaded in order , go.

jquery - Retrieving option id with bootstrap-select -

i'm using bootstrap select, here code: <select class="selectpicker"> <option id="mk12bd">mustard</option> <option id="tk22fd">ketchup</option> <option id="mg32br">relish</option> </select> suppose perform $(".selectpicker").val() this: mk12bd or whatever selected. but when perform: $('.selectpicker').selectpicker(); if perform $(".selectpicker").val() this: "mustard" or whatever selected. my original layout lost , id's gone it, ui logic uses them call web services, there way keep them in new layout using bootstrap-select? thanks in advance!

Getting a GIT change summary like GitHub -

i've got group of developers make git commit , merge mistakes (once in while). i monitor 'large changes' somehow. see in github have following line when looking @ details of specific commit: showing 759 changed files 21,736 additions , 3,237 deletions. that example of real merge should have had 1 file changed , several additions/deletions. is there way or tool exists send out alert via email or sms when commit breaches configured threshold? if not, wondering if possible generate same type of output using git command line. way, if no tool exists, can script , send out email own tools. update: 2014-03-20 18:52 based on nulltoken 's suggestion, i've tried following command: git diff --shortstat $(git rev-parse head head^) and got needed (for last commit anyway). oddly enough though, observed github (1) provides following numbers, compared git provides (2): 1 : 759 changed files 21,736 additions , 3,237 deletions. 2 : 759

Java unique file id fileKey : Path -> fileKey OK | fileKey -> Path possible? -

ok, so can beautiful unique file key given file: http://openjdk.java.net/projects/nio/javadoc/java/nio/file/attribute/basicfileattributes.html but can 1 whereabouts (path) of file, given filekey?

css - Need review, increasing top margin on content increases the height of header -

so if increase top margin on #featured, pulls height header down it. doing wrong? example. if change #featured {margin:0 auto} #featured {margin:20px auto}, white of header go down 20 px, , show featured. want #featured gets pulled down 20px , grey 'border' remains between featured , header site: http://e2-repair.be/ * { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } header { height: 100px; } header #header-cont { width: 1000px; margin: 0 auto; height: 100px; font-family: 'sofadi one', cursive; } header img { height: 80px; width: 80px; float:left; margin-top:10px; } header h1 { font-size:32px; float:left; height:100px; line-height:100px; } header nav{ float: right; } header nav ul { list-style: none; display: block; height:100px; } header ul li { display: inline-block; padding: 0 50px; } header ul li a{ text-decor

java - Search and Change only 1 number of a 2-D array -

let me first say, "lab" i'm doing class, , i've been working on second of 2 programs around 5 hours now, 2 of them stuck on 1 part. let me first give requirements of program maybe of make bit more sense. a theater seating chart implemented two-dimensional array of ticket prices, this: 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 20 20 20 20 20 20 10 10 10 10 20 20 20 20 20 20 10 10 10 10 20 20 20 20 20 20 10 10 20 20 30 30 40 40 30 30 20 20 20 30 30 40 50 50 40 30 30 20 30 40 50 50 50 50 50 50 40 30 write program prompts users pick either seat or price. mark sold seats changing price 0. when user specifies seat, make sure available. when user specifies price, find seat price. that's book's description, here's professor has given me go well. required program components: initial seating chart in solution generated shown in example. solution assumes user en

javascript - Issue in creating another collection from result of a mongodb query in node -

i trying create collection result of query in mongodb using nodejs the code working fine if have few number of records. not working if there large records. error [error: document exceeds maximum allowed bson size of 16777216 bytes] code mongoclient.connect(mongodb_uri, function (err, database) { if (err) throw err; coll = database.collection("smmc_queue"); coll.insert({ "starttime": moment().format("dd-mm-yyyy, h:mm:ss a"), "casename": req.body.casename, "author": req.session.user, "jobtype": 'query', "status": 'in progress', "searchdescription": searchdescription, "query": searchcondition, "sort": sortcondition }, function (err, sucessdoc) { res.redirect(302, '/querystatus'); mongoclient.connect(mongodb_uri, function (err, database) { if (err)

php - Connection to remote mysql from localhost -

i have searched net no solution problem facing. i working on codeigniter project running on localhost apache server. database, attempting connect ci's database.php configuration file connect remote server. the following configuration $active_group = 'default'; $active_record = true; $db['default']['hostname'] = 'remotedatabase.com'; $db['default']['username'] = 'remote_2102dev'; $db['default']['password'] = '1q2w3e4r5t'; $db['default']['database'] = 'remote_cs2102'; $db['default']['dbdriver'] = 'mysql'; $db['default']['dbprefix'] = ''; $db['default']['pconnect'] = true; $db['default']['db_debug'] = true; $db['default']['cache_on'] = false; $db['default']['cachedir'] = ''; $db['default']['char_set'] = 'utf8'; $db['default

implement the android content provider's query method,with multiple tables in use -

i have 3 tables , use content provider manage them.below code content provider: private static final urimatcher surimatcher = new urimatcher( urimatcher.no_match); static { surimatcher.adduri(authority, meter_path, all_meters); surimatcher.adduri(authority, meter_path + "/#", single_meter); surimatcher.adduri(authority, customers_path, all_customers); surimatcher.adduri(authority, customers_path + "/#", single_customer); surimatcher.adduri(authority, bill_path, all_bills); surimatcher.adduri(authority, bill_path + "/#", single_bill); } @override public cursor query(uri uri, string[] projection, string selection, string[] selectionargs, string sortorder) { sqlitedatabase db = database.getwritabledatabase(); // using sqlitequerybuilder instead of query() method sqlitequerybuilder querybuilder = new sqlitequerybuilder(); querybuilder .settables(metertabledetails.table_meters

property 'overflow-y' from css don't show the expected behaviour -

in project, create follow div section simulate popup box: <div id="box"> <div id="header"> <span id="title"></span> <span id="button">x</span> </div> <div id="text"> </div> </div> where append content of several pages on it, content bigger size of box. in current status, content rendered outside box, despite using value 'scroll' property overflow-x, follow: #box { border-style: solid; box-shadow: 2px 2px 2px black; height: 400px; max-width: 90%; max-height: 90%; } #button { background-color: #99ccff; min-width: 32px; max-width: 5%; min-height: 32px; max-height: 100%; position:absolute; right:0px; text-align:center; padding-left:10px; padding-right:10px; } #header { background-color: #66b2ff; } #title { text-decoration-color: #ffffff; font: 28px arial; } #text { background-

ruby - Using Gatling as an integration test tool -

currently have small suite of integration tests running against web-server makes request , asserts assumptions on responses should be. these written in ruby generating http requests. i've been looking @ gatling stress testing tool i'm wondering if used integration tests well. way endpoint requests reused across the stress tests , integration tests. i'm losing here not having bdd of rspec gaining not having create same tests twice. does have experience of using gatling in way? you can use assertion api , set acceptance criteria. however, gatling isn't browser , won't run/test javascript, approach realistic when dealing server side content, such testing rest apis. here's an example .

java - Cocos2d: What a the black stripe below CCGLSurfaceView? -

Image
i'm trying add admob banner under game scene black stripe overlaps half banner. removed banner see if problem of admob stripe still there. how can remove it? or there way display banner on black stripe? source: public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); adview = new adview(this); adview.setadsize(adsize.banner); adview.setadunitid("xxxxxxxxx"); adrequest adrequest = new adrequest.builder().addtestdevice( adrequest.device_id_emulator).build(); adview.loadad(adrequest); adview.setbackgroundcolor(color.black); setrequestedorientation(activityinfo.screen_orientation_portrait); requestwindowfeature(window.feature_no_title); getwindow().setflags(windowmanager.layoutparams.flag_fullscreen, windowmanager.layoutparams.flag_fullscreen); mglsurfaceview = new ccglsurfaceview(this); background

android - Start Action Mode from custom CursorAdapter within ListFragment -

i trying start action mode contextual action bar, i'm having issues. using custom cursoradapter class extends listfragment contained class extends actionbaractivity. structure gamelistactivity (actionbaractivity) ---- gamelistfragment (listfragment) ---- ---- custom_adapter (cursoradapter) i'm trying start action mode in onclick listener within custom_adapter. currently, have actionmode.callback in actionbaractivity: public static final actionmode.callback anactionmode = new actionmode.callback() { // standard funcs (oncreateactionmode, etc) } i feel though better suited in listfragment, i've tried no better luck. in custom cursoradapter, have function: private void set_action_mode() { if (checked_count > 0) if (!is_action_mode_showing) ((gamelistactivity) m_context).startactionmode(gamelistactivity.anactionmode); } the error getting is: error:(142, 47) error: method startactionmode in class activity cannot applied given

Titanium: Setting minimum iOS version -

i googled question , found using <ios> <min-ios-ver>#.#</min-ios-ver> </ios> takes care of that. problem working on app created several years ago now. tiapp.xml never had <ios> section. still have <iphone> section. using ti sdk 3.2.1 , app works fine. cannot install on ipad 1 ios 5.1 on it. saying doesn't meet minimum software requirement. so question how can set value older project? have tried adding tags above tiapp.xml nothing. itunes still says doesn't meet version requirement. note support ios 5.x , earlier removed in release 3.2.0. you have use older version of sdk in order compile ios 5.x please find original answer , few additional links sdk compatability here .

Does the Sony Remote Camera API control HDR modes, ISO, shutter speed, aperture and other "manual" settings? -

i bought sony a7 , blown away incredible pictures takes, interact , automate use of camera using sony remote camera api. consider myself maker , fun stuff: add laser trigger arduino, computer controlled light painting, , long-term (on order of weeks) time-lapse photography. 1 reason purchased sony camera on other models famous brands such canon, nikon, or samsung because of ingenious sony remote camera api. however, after reading through api reference seems many of features cannot accessed. true? know work around? specifically, interested in changing lot of manual settings can change through menu system on camera such iso, shutter speed, , aperture. interested in taking hdr images in time-lapse manner , nice change setting through api well. if knows, why wasn't api opened whole menu system in first place? finally, if employee of sony reading make plea: please please please keep supporting remote camera api , improve upon amazing idea! think more control offer makers , devel

android - Why my animation keeps on last state? -

i want blinking text, alpha 0.3 alpha 1, thing works good, when anim.cancel() text statys in alpha 0.3, want return full opaque. i've tried setfillafter , setfillbefore no success. question why animation keeps on last state? time = (textview) findviewbyid(r.id.time); anim = new alphaanimation(0.3f, 1.0f); anim.setduration(100); anim.setstartoffset(100); anim.setrepeatmode(animation.restart); anim.setrepeatcount(animation.infinite); time.startanimation(anim); you can use this: textview mytext = (textview) findviewbyid(r.id.mytext ); animation anim = new alphaanimation(0.3f, 1.0f); anim.setduration(100); anim.setstartoffset(100); anim.setfillafter(false); anim.setrepeatmode(animation.reverse); anim.setrepeatcount(animation.infinite); mytext.startanimation(anim); and when cancel : mytext.setvisibility(view.invisble); // that's case, if want set alpha 1 - set (view.visible); anim.cancel();

convert properties file to hashmap in spring -

i need load of content of properties file looks this: some.properties key.1=this item needs loaded onto hashmap key.2=this item needs loaded onto hashmap key.3=this item needs loaded onto hashmap key.4=this item needs loaded onto hashmap i want know way in can load of content properties file onto hashmap. actual content present against every key lengthy, cannot make properties file abc=aa,bb,cc , load onto java class using @value annotation. also, have around 40 keys in properties file. so, im trying use approach, dont want add @value annotation separately every value in java class. as, on hashmap put in checks load keys , set parameters 1 one variables , pass further processing. i tried lot of things load properties file , convert hashmap through spring, know can make use of property placeholder configurer load of properties file. however, how access content inside properties file in java class converting onto hashmap. any highly appreciated. thanks! or do

java - cannot resolve symbol R, setContentView() android studio -

i have found numerous posts issue , read through them. have tried rebuilding project, project clean , gradle-clean still didn't help. perhaps there's wrong codes? the error lies in "setcontentview(r.layout.read_comments)" cannot resolve symbol r here code: package com.example.mysqltest; import android.app.activity; import android.os.bundle; public class readcomments extends activity{ @override protected void oncreate(bundle savedinstancestate) { // todo auto-generated method stub super.oncreate(savedinstancestate); setcontentview(r.layout.read_comments); } } this error happened if there error in 1 of xml layout files. in case, project failed generate r file. check other errors appears know error , in xml layout file caused this. if project working before , not working now, check project history know modification caused error.

jQuery document on submit -

i using jquery post forms through ajax this: $(document).on("submit",this.id, function (e) { // stuff }) this way takes id of form , uses id handle necessary things data different forms on different pages. this works prefect 1 form on page. when have multiple forms (with unique id's) fails, not respond/trigger anymore. i know can enter id of form myself , use multiple $(document).on... in jquery approach using now. is there way solve this? you don't need pass or use id, have scope problem. use such code instead more flexible: $(document).on("submit", "form", function (e) { var oform = $(this); var formid = oform.attr("id"); var firstvalue = oform.find("input").first().val(); alert("form '" + formid + " being submitted, value of first input is: " + firstvalue); // stuff return false; }) using $(this) reference form being submitted, inside event ha

session - How can i call the method from one controller in another controller in rails 3.2? -

i have been searching net last few hours cannot find how call 1 of method in controller have created in controller used populate html page in view. the method trying call one: class cataloguescontroller < applicationcontroller def index @catalogues = catalogue.all respond_to |format| format.html # index.html.erb format.json { render json: @catalogues } end and trying call in following method: def index session[:cart].catalogues = catalogue.all end rails in not having , returning following error when run in html page. undefined method `catalogues=' {:id=>5}:hash any appreciated... edit cart_controller class cartcontroller < applicationcontroller before_filter session[:cart] = session[:cart] || {} # set empty cart if no cart exist end def index session[:cart].catalogues = catalogue.all end def success end def add id = params[:id] amount = session[:cart][id] || 0 # gets cart

java - Cannot retrieve definition for form bean -

i having following error in jsp page : org.apache.jasper.jasperexception: javax.servlet.servletexception: javax.servlet.jsp.jspexception: cannot retrieve definition form bean myloginform org.apache.jasper.servlet.jspservletwrapper.handlejspexception(jspservletwrapper.java:535) org.apache.jasper.servlet.jspservletwrapper.service(jspservletwrapper.java:411) org.apache.jasper.servlet.jspservlet.servicejspfile(jspservlet.java:320) org.apache.jasper.servlet.jspservlet.service(jspservlet.java:266) javax.servlet.http.httpservlet.service(httpservlet.java:803) org.apache.struts.action.requestprocessor.doforward(requestprocessor.java:1069) org.apache.struts.action.requestprocessor.processforwardconfig(requestprocessor.java:455) org.apache.struts.action.requestprocessor.process(requestprocessor.java:279) org.apache.struts.action.actionservlet.process(actionservlet.java:1482) org.apache.struts.action.actionservlet.doget(actionservlet.java:507) javax.servlet.http.httpservlet.service(httpser

preprocessor - Using #define to determine ios device type -

i'm figuring out how determine ios device types , came across solution: https://stackoverflow.com/a/16319767/440646 the line of question: #define is_ipad (ui_user_interface_idiom() == uiuserinterfaceidiompad) i read #define preprocessor evaluated before compilation, ui_user_interface_idiom() statement. my question how compiler knows device compile for, since we'll know device user using during runtime? #define is_ipad (ui_user_interface_idiom() == uiuserinterfaceidiompad) not check specific device (iphone 4, iphone 5, etc) device category (iphone, ipad). here question shows macro does. understand: is safe check ui_user_interface_idiom() determine if it's iphone or ipad?

selenium webdriver - How to setAcceptUntrustedCertificates for Safari. -

with version 2.30, selenium webdruiver has given in built support safari browser. i want know how handle ssl certificates in safari (which installed on windows). below piece of code tried not working: desiredcapabilities capabilities = new desiredcapabilities(); capabilities.setcapability(capabilitytype.accept_ssl_certs, true); capabilities.setbrowsername("safari"); driver = new safaridriver(capabilities); driver.get("https://mydummysite"); i have countered same problem. seems safari browser using same certification mechanism internet explorer, , theoretically, can use install certification , should solve problem. instruction can found here this did not work me, used autoit script click on continue button, compiled script exe , called test. the script used: winwait("[class:#32770]","",60) winactivate("[class:#32770]","") send("{space}") baiscally, wait 6

jquery - Update Modal Pop With Ajax Response And Display in Yii -

i have been trying render modal pop html data , display pop up. have used ajax data controller , want update modal , show it. data displayed correctly first time , modal shows doesnot show same modal next time. instead throws error: object [object object] has no method 'modal' below code: link trigger ajax call: <a data-toggle="modal" href="#" class="open-edituser btn default btn-xs green-stripe">edit</a> modal pop up <div id="edituser" class="modal fade" tabindex="-1" data-width="760"> <div class="modal-body"> <div id="modal-data"></div> </div> <div class="modal-footer"> <button type="button" data-dismiss="modal" class="btn btn-default"><?php echo yii::t('user', 'close'); ?></button> </div> </div> response ajax call $(document).on(&qu

Search in python tuple list -

db = [('cat',15,22),('dog',28,30),('human',27,80)] now want create search 'dog' returned value db[1] . can't still figure out (i know use sth for item in db: if 'dog' in item[:] don't know how put really. please help? items = [i in db if 'dog' in i] items[0] if items else none # ('dog', 28, 30)

android - NullPointerException while trying to insert records -

i trying insert records db .the problem when click save button getting exception.so firstly have checked logcat , filtered out theese messages . 03-21 18:07:00.820: e/androidruntime(4756): fatal exception: main 03-21 18:07:00.820: e/androidruntime(4756): java.lang.nullpointerexception 03-21 18:07:00.820: e/androidruntime(4756): @ com.example.kjk.mainactivity$1.onclick(mainactivity.java:51) 03-21 18:07:00.820: e/androidruntime(4756): @ android.view.view.performclick(view.java:4240) 03-21 18:07:00.820: e/androidruntime(4756): @ android.view.view$performclick.run(view.java:17721) 03-21 18:07:00.820: e/androidruntime(4756): @ android.os.handler.handlecallback(handler.java:730) 03-21 18:07:00.820: e/androidruntime(4756): @ android.os.handler.dispatchmessage(handler.java:92) 03-21 18:07:00.820: e/androidruntime(4756): @ android.os.looper.loop(looper.java:137) 03-21 18:07:00.820: e/androidruntime(4756): @ android.app.activi

php - Check for authentication, output different nav? -

im trying include different nav if user logged in. need in view (i know logic should go elsewhere need here). @include( {{ auth::guest() ? 'nav-a' : 'nav-b' }} ) the above fails work: development.error: exception 'symfony\component\debug\exception\fatalerrorexception' message 'syntax error, unexpected '<', expecting ')'' it's because when working in confines of @ statement, php assumed. @include( auth::guest() ? 'nav-a' : 'nav-b' )

python - Advantage of list over string in subprocess methods -

what advantages of using list on string in subprocess methods? ones understand far: security if input comes external sources portability on different operating systems are there others? in particular case, i'm using subprocess library run tests on software. input not come external source. tests run on linux. therefore, see no benefit of lists on strings. on posix, list , string arguments have different meaning , used in different contexts. you use string argument , shell=true run shell command e.g.: from subprocess import check_output output = check_output("dmesg | grep hda", shell=true) a list argument used run command without shell e.g.: from subprocess import check_call check_call(["ls", "-l"]) one exception call("ls") equivalent call(["ls"]) (a command no arguments). you should use list argument shell=false (default) except in cases when need shell string argument used. it error use lis