Posts

Showing posts from March, 2010

margin - css box doesn't fit in correctly -

i have piece of html , css code,and want table(id = "table") fit in higher in "box".but there little margin on header says "kalkulatory macierzowe".so how can fix it? html <div id = "box"> <div class = "table" id = "table"> <div id = "header">kalkulatory macierzowe</div> <div id = "table1"> <div class = "header">wyznacznik [2x2]</div> <form id = "row1"> <input type = "text" class = "det1"/><!--first row--> <input type = "text" class = "det1"/> </form> <form id = "row2"> <input type = "text" class = "det1"/><!--second row--> <input type = "text" class = "det1"/> </form> <div class = "count"><a href = "#" oncl

web applications - List of web development design patterns? -

in wikipedia, there article "web development" , "design patterns", none "web development design patterns". the 1 know: prg (post/redirect/get). can list them or give references books? yahoo has comprehensive library can accessed here

scroll - Logitech m555b mouse scrolling in OSX 10.7 -

Image
just updated mac lion (aka osx 10.7.5) searched goggle advice on how revert "new" (to me anyway) scrolling behavior. (i've decided needing cross functional in windows , mac have difficulty learning "new" convention. control panels logitech mouse version m555b not default ones seeing in advice online allows 1 specify "natural scrolling" disabled. not coding question, seem fall within configuring user interface. if want refer me venue, please so. i'll delete question if advised so. edit. since didn't convey lack of desired disable natural scrolling button, show dialog panels see. apple menu in top left of screen: system preferences: mouse: disable natural scrolling should work, unless question getting @ different.

user interface - How to move files in different directories in linux (cui) -

i working on exercise in command line crash course ( http://cli.learncodethehardway.org/book/ex11.html ) so far learned , understand how copy (cp) , move (mv) directories , files within same path. but! how move (mv) or copy (cp) file or directory separate path? example: here path path 1: ~/temp/i/like/icecream ~/temp path 2: ~/desktop/blue/red/yellow ~/desktop if wanted lets blue desktop, temp folder how do this? i bash error or "this file or directory doesn't exist". understand reading in specific path or in "desktop" can't figure out life of me how 2 different paths recognize 1 another. way can use gui , put temp directory in desktop directory or dragging files want temp directory desktop. if can gui, shouldn't able cui? thanks! if wanted given folder blue personal temp directory, type: mv ~/desktop/blue ~/temp this appears want do; comment if doesn't work.

heap - Execute jmap inside java program to generate dumps for the same process -

is possible execute 'jmap' @ different spots inside java-programm generate dump files. guess 1 must own process id , execute command via runtime().exec() or similar. didn't succeed though. chris try: string name = managementfactory.getruntimemxbean().getname(); string[] str = name.split("@"); runtime.getruntime().exec("jmap -dump:file=yourfilename " + str[0]);

php - 770 permissions on file in apache root, still viewable -

i've seen lot of questions on here regarding files not being accessible due permissions lamp nothing making files unviewable http client using permissions. i have files , folders in apache2 root folder don't want people able access via browser or other external means. set permissions 770, doesn't seem enough. outside users access files apache user? i'm running lamp under ubuntu server little modifications defaults, apache user www-data, group :www-data, , apache root /var/www. i have /var/www/_private folder has 770 permissions , same permissions on enclosed files. however, if access these files through browser, still viewable. clients accessing files www-data user? if so, how rectify this? i've worked on hosted setups setting "other" permissions 0 sufficient denying outside direct access files. need install module gain functionality? note: still need accessible-to-the-client php scripts access these files via includes, fopen, etc...

war - Why doesn't extractWars work in Jetty 8.1.10? -

here definition of extractwars: if parameter true, packed war or zip files first extracted temporary directory before being deployed. advisable if there uncompiled jsps in web apps. but when set extractwars false, app doesn't work more. app doesn't have jsp. what failure get? typically if don't extract war webapp attempts direct access resources files going fail.

Using AJAX or jQuery in WordPress to Return Results of PHP Script -

i have html form accepts user input: <form action="script_conv.php" method="post"> convert: <input type="number" name="input" id="input"> <select name="unit1" id="unit1"> <option value="w">words</option> <option value="l">lines</option> <option value="p">pages</option> <option value="r">recorded minutes</option> <option value="f">finished minutes</option> </select> <select name="unit2" id="unit2"> <option value="w">words</option> <option value="l">lines</option> <option value="p">pages</option> <option value="r">recorded minutes</option> <option value="f">finished minutes</option> </select> <input type="submit"> </form>

javascript - How to show suggestions for search -

i trying add suggestions search box. once user enters should show suggestions , if user hover on of suggestion should highlighted , when suggestion clicked should added search terms along semicolon separate search terms. i able show suggestions problem implementing following expected result following search box >>> f suggestions first 4 when first clicked highlighted search box >>> first; when t clicked search box >>> first;t suggestions 2 3 click on 3 cause remove t search box , add 3 search box >>> first;three when tw entered search box >>> first;three;tw suggestions 2 twelve when 2 selected search box (first;three;two suggestion.jsp <c:foreach items="${sug}" var="mysug"> <label id="suggestion" onclick="selectsug(<c:out value="${mysug}"/>)"><c:out value="${mysug}"/></label> <br/

java - HTTP URL connection: display specific line of website source code -

im building first application , im kind of new but: i'm sending http request using httpurlconnection. here's activity code: import java.io.bufferedreader; import java.io.ioexception; import java.io.inputstream; import java.io.inputstreamreader; import java.net.httpurlconnection; import java.net.url; import java.net.urlconnection; import android.app.activity; import android.os.asynctask; import android.os.bundle; import android.view.view; import android.view.view.onclicklistener; import android.widget.button; import android.widget.textview; public class httpgetservletactivity3 extends activity implements onclicklistener { button button; textview outputtext; public static final string url = "url"; /** called when activity first created. */ @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.main); findviewsbyid(); button.setonclicklistener(this); } private void

javascript - How to take a value from one jQuery function and assign it to a parameter of another function? -

i have function jquery slider. sets delay time , shows in "#slider" div : $(function () { $("#slider").slider({ range: 'max', min: 1, max: 5, slide: function(event,ui) { $("#delaytime").val(ui.value); delaytime = ui.value * 1000; } }); }); this works ok itself. later in code have function runs whole slideshow. function has own parameter determines delay time between each slide: function myslideshow(){ var wholeslideshow = $('#thumbholder').gallerywithslideshow({ maincntrls: true, prevnextcntrls: true, delaytime: 2000, etc. }); this 1 works fine too. question. what should add code pass value in slider function slideshow function's delaytime parameter slider function determine delaytime in slideshow function? i considering modifying slider function this

templates - a C++ syntax error when passing class members in a constructor -

i need write kind of shared_ptr<> in c++. however, i'm struggling weird error. following code: template <typename t> class shared_ptr; typedef std::map<void*, shared_ptr<void*>> ptr_t; ptr_t ptr_set; template <typename t> class shared_ptr { t* ptr; public: bool in_use; shared_ptr<t>() { ptr = new t; in_use = false; ptr_set.insert(ptr_t::value_type(ptr, *this)); // error here } t operator*() { return *ptr; } shared_ptr<t>(shared_ptr<t>& ref) { this->in_use = false; this->ptr = ref.ptr; t* p = this->ptr; ptr_set.insert(ptr_t::value_type(p, *this)); } }; refuses compile saying 'std::pair<_ty1,_ty2>::pair: none of 2 overloads convert argument types' (c2665 in 13th line actually). way, shared_ptr instantiated in main() shared_ptr<array_t> a , array_t struct consisting of nothing more simple

ios - video zoom in and zoom out while recording iphone -

i working on app in user have facility zoom in , zoom out video. using av foundation record video not able zoom in , zoom out video when user recording video. i using following code record video - (void) startcamera nslog(@"setting capture session"); capturesession = [[avcapturesession alloc] init]; //----- add inputs ----- nslog(@"adding video input"); //add video input avcapturedevice *videodevice = [avcapturedevice defaultdevicewithmediatype:avmediatypevideo]; if (videodevice) { nserror *error; videoinputdevice = [avcapturedeviceinput deviceinputwithdevice:videodevice error:&error]; if (!error) { if ([capturesession canaddinput:videoinputdevice]) [capturesession addinput:videoinputdevice]; else nslog(@"couldn't add video input"); }

JPA Inheritance strategy JOINED - why only remove child? -

i have 3 entities: employee(father), technician, developer. strategy type joined. when remove entity technician, 1 row table "technician" removed no row removed table "employee". how can remove both. normal? when delete technician employee should removed, right? employee: @entity @table(name = "employee", catalog = "curso") @inheritance(strategy = inheritancetype.joined) public class employee implements java.io.serializable { long id; private string nif; private string name; private string phone; private string email; public employee() { } public employee(string name) { this.name = name; } public employee(string nif, string name, string phone, string email) { this.nif = nif; this.name = name; this.phone = phone; this.email = email; } @id @generatedvalue @column(name = "id", unique = true, nullable = false) public long getid() { return this.id; } public void setid(long id) { this.id = id; } @

How can i stop executing getview() method in android? -

i have 2 list view displaying data sqlite database.i displayed data without problem.in second list view have header 4 columns.when click on first list view , related data displayed in second list displayed based on position.by default displayed first list view of 0 position related data in second list. problem , while scrolling first list view automatically calls 0 position values need data of whatever position clicked on first list view.i displayed data below.how can do? please can on help? first list view: first........ second........ third........ i displayed data based on selection of first list view. second list view: header id name contact 1 ram 12345 thanking in advance. easy bruteforce way use flag this.. public boolean flag=false; // declare class variable outside both listview adapter class then in 1st list view getview() function if(!flag){ //display 2nd list view conten

jquery - Remove CSS "content" property -

i have 3rdparty css contains following declaration: :-webkit-any(body):after { content: ""; display: block; visibility: hidden; height: 0; font: 0/0; -webkit-transform: translatez(0); } the content css property cause problem in jquery ui dialog - scrollbar disappears... if removing content (putting in comment) works well. since 3rdparty, remove property code via jquery , not updating css. possible? thanks sigal you've tagged question jquery , it's important ot know not possible directly target :before , :after pseudo elements using javascript. your options are: write additional css code overrides styles don't want. change original css selector (or html) such selector no longer applies don't want it.

checkbox - How to sum checkboxes value in android? -

i have problem in java. package apa.y; import android.app.activity; import android.os.bundle; import android.view.view; import android.widget.checkbox; import android.widget.textview; public class myprice extends activity { /** called when activity first created. */ checkbox book,pencil; textview total; int sum=0; public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.mymain); pencil = (checkbox) findviewbyid(r.id.pencil); book = (checkbox) findviewbyid(r.id.book); total = (textview) findviewbyid(r.id.total); } public void onclick(view v) { sum = 0; if (pencil.ischecked()) {sum += 10;}else{sum +=0;} if (book.ischecked()) {sum += 5;}else{sum +=0;} total.settext("total: "+sum); } } if book , pencil checkbox , 1 textview, how sum it? existing code didn't work. what clicking on? checkboxes? need kind of lis

c++ - Prevent time cheating of Trial Product: Which Files to monitor? -

i reading on trial products , challenge of user forwarding time before installing product not expire long time. 1 of strategies read checking modified time files , compare current time , see difference if makes sense. question is, best files use task in both windows , linux? why think best task? since don't remember url of site (was reading in phone , cannot reproduce url right now), appreciate link on subject or answer in case missed it! dynamically embed date , time of download in setup installer package. tell customer activate trial product before 48 hours or so. (after activation can use entire trial period) then, @ time of installation, check whether system time (client machine time) matching date time of installer. if not matching, not allow installation. edit: it can done in following ways. 1. using encryption: create xml file download time stamp when download button clicked. create private key using cryptography library such openssl extract

javascript - How to fix UI issue when Cursor set to last position of textbox in chrome -

i have big problem tried find fix didn't work posting here. visit link see ui issue present in chrome. ideally blue colored textbox how ui should like. when keep on adding elements , size grows textbox doesn't show last text instead shows data non blue colored textboxes though caret position @ last of textbox. using code. <!doctype html> <html lang="en"> <head> <meta charset="utf-8" /> <title>jquery ui autocomplete - multiple values</title> <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" /> <script src="http://code.jquery.com/jquery-1.9.1.js"></script> <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script> <link rel="stylesheet" href="/resources/demos/style.css" /> <script> $(function() { var availabletags = [ "actionscript", "app

css - Opacity IE 8 Fallback with jQuery -

i have gone through post: set opacity javascript in ie 8? this purely done javascript, using jquery want set opacity in ie8 not getting succeed using jquery. so far doing this: $('.set').click(function (e) { var hiddensection = $('div.hidden'); hiddensection.fadein() .css({ 'display': 'block' }) .css({ width: $(window).width() + 'px', height: $(window).height() + 'px' }) .css({ top: ($(window).height() - hiddensection.height()) / 2 + 'px', left: ($(window).width() - hiddensection.width()) / 2 + 'px'}) .css({ 'background-color': 'rgb(190,190,190)'}) //here bgcolor .css({ 'filter': 'alpha(opacity=1000)' }) // here opacity .appendto('body'); $('span.close').click(function () { $(hiddensection).fadeout(); }); }); is there anyway achieve css opacity in ie 8, know ie8 doesn'

javascript - page load ajax Jquery mobile not show -

how debug ajax pageload on change page jquery mobile, faced not showing page somehow? noted, on bare link, not using rel="external" , jqm ussually treat ajax load, on layout, not show, cause i'm migrate desktop site. try turn off page transitions.as quite rough in jquery mobile. may help. $(document).on( "mobileinit", function() { $.mobile.defaultpagetransition = "none"; });

xaml - slider control and textblock control interaction-Metro apps -

i trying set slider control value text block's text property through {binding} on xaml. <slider valuechanged="slider_valuechanged_1" value= "{binding elementname=componenttextblockvalue,path=text}" stepfrequency="25"/> do need converter set slider's value . binding seems work sometimes doesn't work. sometimes,the slider doesn't set value text block value. since bind slider's value directly without value converter, suspect binding broken when text not number or out of range. you can prevent creating value converter prevent bad value bound, binding work. here example: public class texttoslidervalueconverter : ivalueconverter { public double maximumslidervalue { get; set; } public double minimumslidervalue { get; set; } public object convert(object value, type targettype, object parameter, string language) { double slidervalue; if (double.tryparse(value string, out sli

Google Spreadsheet ImportXML error #NA not received any data as a result of XPath queries -

i have problem scraping 1 website - motoallegro i want title of ads in page so set formula in google spreadsheet: =importxml("http://allegro.pl/samochody-149?order=qd&string=primera+gt&search_scope=automotive&department=automotive";"//header/h2/a/span") this formula return #na error: not received data result of xpath queries but if try other data same page, example h1 text: =importxml("http://allegro.pl/samochody-149?order=qd&string=primera+gt&search_scope=automotive&department=automotive";"//h1/span") the result correct: "primera gt" i want add, xpath rule - //header/h2/a/span correct. tested on few firefox xpath plugins. any ideas, why google spreadsheet formula importxml correct xpath rule not return correct data? google seems strip non-html4-tags <header/> , <section/> . use <div id="listing">...</div> accessing headlines need. try xpath exp

ios - Adding Array to PLIST -

Image
i trying add , array root array in plist: and not working. here's code: -(ibaction)addname:(id)sender{ nsarray *arrayvalues = [nsarray arraywithobjects: namelabel.text, namedate.text, namevalue.text, nil]; nsstring *plistpath = [[nsbundle mainbundle] pathforresource:@"names" oftype:@"plist"]; nsmutablearray *namesnew = [[nsmutablearray alloc] initwithcontentsoffile:plistpath]; [namesnew addobject:arrayvalues]; [namesnew writetofile:plistpath atomically:yes]; } what doing wrong? thanks! you need move file nsdocumentdirectory. edit plist file. for example: moving nsdocumentdirectory: -(nsdictionary *)copybundletodocuments { nsfilemanager *filemanager = [nsfilemanager defaultmanager]; nsarray *documentpaths = nssearchpathfordirectoriesindomains(nsdocumentdirectory, nsuserdomainmask, yes); nsstring *documentsdirectory = [documentpaths objectatindex:0]; nsstring *documentplistpath = [documentsdirectory stringbyappendingpa

c# - How to add the lostfocus event handler to a dynamically created combobox's textbox? -

Image
the combobox not editable have tried: textbox txtbox = (textbox)mycombo.template.findname("part_editabletextbox", mycombo); but turns null. i have tried adding windows xaml: <style targettype="{x:type combobox}"> <setter property="template"> <setter.value> <controltemplate targettype="{x:type textbox}"> <border x:name="part_editabletextbox" focusable="true" background="{templatebinding background}" /> </controltemplate> </setter.value> </setter> </style> but system.windows.markup.xamlparseexception occurred: set property 'system.windows.resourcedictionary.deferrablecontent' threw exception. here code use create combobox , set it's position in grid: public static system.windows.controls.combobox createnewcombobox(string newcomboboxname,

symfony - Method Assetic\AssetWriter::getCombinations() does not exist exception on symfony2 deploy using capifony -

my deployment fail when calling: cd /var/www/prod/releases/20130513164742 && php app/console assetic:dump --env=prod --no-debug my setup worked fine yestertay today can't deploy using cap deploy command checked cloning repo in prod environment , executing php app/console assetic:dump --env=prod --no-debug (in dev mode), , worked fine ! any idea ? ** [out :: prod] executing "sh -c 'cd /var/www/prod/releases/20130513164742 && php app/console assetic:dump --env=prod --no-debug'" ** [out :: prod] php deprecated: getentitymanager deprecated since symfony 2.1. use getmanager instead in /var/www/prod/shared/vendor/doctrine/doctrine-bundle/doctrine/bundle/doctrinebundle/registry.php on line 71 ** [out :: prod] dumping prod assets. ** [out :: prod] debug mode off. ** [out :: prod] ** [out :: prod] ** [out :: prod] ** [out :: prod] ** [out :: prod] [reflectionexcept

javascript - Firefox returning invalid for timezone offsets? -

i've come across appears odd result firefox. using following format: 2013/01/01 00:00:00-0000 for date, run issue when timezone goes "positive". example. new date('2013/01/01 05:00:00-0000') date { tue jan 01 2013 00:00:00 gmt-0500 (est) } but. new date('2013/01/01 05:00:00+0100') date { invalid date } i expect rather get: date { mon dec 31 2012 23:00:00 gmt-0500 (est) } it appears + causes problems, seems pretty big issue if can't use timezones east of gmt. edit: added http://jsfiddle.net/utm4f/ run in firefox , return invalid date (i running firefox 20 on os x 10.8.3) well, found issue throwing whatever can @ it. apparently firefox requires space between time , timezone. new date('2013/01/01 05:00:00 +0100') new date('2013/01/01 05:00:00 -0100') the - timezones won't error without space, + ones will.

ajaxcontroltoolkit - Ajax Control Toolkit not working on Azure -

the toolkit working fine on development machine (vs 2012, toolkit version: 4.1.60919.0). after publishing azure works fine except toolkit - no errors, no problems - simple isn't working. have tried numerous solutions (including copy local, , editing config file) found on web none of them worked. believe in end work, not want spend hours , hours deployed. i thinking of dropping toolkit , alternatives. i still think there small chance there elephant in room don't see, if sees please let me know. thanks

ruby on rails - Getting the Request Env in a worker -

i'm using mixpanel gem server side event tracking. chose use resque implementation . can see in example, in userscontroller , have pass env hash because "trying pass request.env resque going fail (it chokes when trying convert json)" . works if refactor code model, have generate env variable in controller before passing queue in model, seems wrong. i've written method generates in applicationcontroller , i'm measuring many events i'm passing through model many times doesn't make sense. there way request variable in worker instead of passing through worker?

php - jquery function is not sending the value on page load -

i'm sending value from jquery function body, seems jquery not sending value. want fire following jquery function when page loads: <!doctype html> <html> <head> <script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script> <script type="text/javascript" src='http://cdn.bitbucket.org/pellepim/jstimezonedetect/downloads/jstz-1.0.4.min.js'></script> <script> $(document).ready(function(){ var tz = jstz.determine(); // determines time zone of browser client jquery('body').load('index.php?session_name='+tz.name()); }); </script> </head> <body> index.php: <?php session_start(); if (isset($_get['session_name'])) {$_session['session_name'] = $_get['session_name'];} echo $_session['session_name'];

java - Spring Web - decoding URL params -

i have spring based web application running on apache tomcat 7.0.39 , request contains parameter values having special characters (utf-8 encoded). for example: street=r%c3%bcbenkamp+246 i need pass values db lookup first decode them. how shall it? i tried: urldecoder.decode(street, "utf-8"); but seems value stays same after decoding... the thing helped modifying tomcat server.xml , adding uriencoding="utf-8" connector settings (my ws runs on port 8181) <connector connectiontimeout="20000" port="8181" protocol="http/1.1" redirectport="8443" uriencoding="utf-8"/>

javascript - Angular JS, is it possible to set ng-include or ng-controller dynamically? -

i new angular js , through research looks not possible wanted double-check/see if there alternative solution have similar result. what want populate page json file, , load customized li using url on json file. this: json/inside controller: function exctrl($scope) { $scope.examples = [ {name:"example", num: 1, url:"website.html"} ]; } js (inside js) <ul ng-controller="exctrl"> <li ng-repeat="example in examples"> <div ng-include src="folder/{{example.url}}> </div> </li> </ul> solution : <ul ng-controller="exctrl"> <li ng-repeat="example in examples"> <div ng-include src="example.url"> </div> </li> </ul> where now: function exctrl($scope) { $scope.examples = [ {name:"example", num: 1, url:&

android - group view disappear in expandable list view -

i have expandable list view contain list view when after number of rows add other custom view. problem when try expand group 2nd time disappear. thank's in advance. code wrote on getchildview: if(childpos == currgroup.maxitems && currgroup.competitors.size() > currgroup.maxitems) { if(view == null) { view = inflater.inflate(r.layout.wizard_show_more_item, null, true); textview leauge_title = (textview) view.findviewbyid(r.id.show_more_title); leauge_title.settext(uiutils.getterm(context, "scores_game_show_more")); view.setonclicklistener(new onclicklistener() { @override public void onclick(view v) { intent tourallcompetitorsintent = new intent(context, tournamentpromoallcompetitors.class);

node.js - mongoose query for an array of dictionaries -

how work arrays contain dictionaries? i'm trying post fields can search text. my attempts keep going using mongo shell. user.blog().find({}).where('post').in(writing).exec(function (err, result) { //do results }); // doesn't work schema (edit: fixed @jam comments) var blogschema = new mongoose.schema({ group: string, writing: [{ post: string, name : number }] }); var blog = mongoose.model('blog', blogschema); update: adding json data , command put data in mongodb using mongo shell: { group: "design writing", writing: [{ post: "a very short post.", name: 10 }, { post: "an morning post everything.", name: 11 }] } * or, here 1 line insert db in collection named my_collection : * db.my_collection.insert( {group: "design writing", writing: [{post: "a very short post.",name: 10}, {post: "an morning post everything.&

c# - Returning JSON as a .json file -

i trying following code return json file instead of returning aspx file. have used similar code in php works, however, can not duplicate in c#. respond .json file. string json = jsonconvert.serializeobject(output, formatting.indented); response.headers.add("content-type", "application/json; charset=utf-8"); response.headers.add("expires"," mon, 26 jul 1997 05:00:00 gmt"); response.headers.add("pragma.","no-cache"); response.cache.setnostore(); the output fine, want recognized .json file. try using: // note case response.headers.add("content-type", "application/json; charset=utf-8"); or better: response.contenttype = "application/json; charset=utf-8"; for seem do, i'd recommend using ihttphandler instead of aspx page. can configure 1 have json extension (although extension should not important). here example: public class customhttp

Slider Image getting blured in wordpress -

i working on website, other guys developed , make lot of mess have clear. 1 of problem getting annoying. i have designed banners slider same size of previous banners when uploaded them in wordpress , set them blurred. don't know problem please check , let me know . thank you view website you call images processed timthumb modify image. instance, have 1 image slider source : /wp-content/uploads/2012/07/pose-1024x298.jpg&h=320&w=1100&zc=1 if can change image source (depending on slider admin backoffice), put : /wp-content/uploads/2012/07/pose-1024x298.jpg&h=298&w=1024&zc=1 ...so won't have crop up. or can try put original image source no paramater : /wp-content/uploads/2012/07/pose-1024x298.jp

visual studio 2012 - VS2012: Access to path is denied when executing publish -

Image
when trying publish application (a wcf service specifically) in vs2012, error stating: "exception in executing publishing: access path [path] denied." file referenced publish profile i'm trying execute , type ".pubxml" i've used sysinternals process explorer check if process has file locked, i've closed vs2012 , reopened administrator rights, , have rebooted pc. this same issue described here: vs2012 error when creating publish package: exception in executing publishing access path denied , i'd rather comment on question asking if ever found solution unfortunately don't have comment rights yet. edit ------ i'm using visual studio 2012 ultimate update 2 (11.0.60315.01 update 2) i had same issue crop up. the reason why because files read only. browse folder profiles kept, select them all, , drop click on checkbox: this caused profiles being checked source control without knowledge.

objective c - Cache Video while loading -

i tried search both on site , google, not find anything. want save mpmovieplayercontroller cache of video stream. tried different libraries asihttprequest , others can't play video until finished downloading. possible save cache or play while downloading? thank in advance.

html - Adding an input match-randomizer with JS / jQuery? (Edited) -

i trying make basic randomizer can match things. sort of date(romance) picker, different situation. i want product this: (user input a1) (user input a2) (user input a3) (user input b1) (user input b2) (user input b3) where input randomly matches b input, never matches a, , doesn't randomize. so looks this: a1 - (b#) a2 - (b#) a3 - (b#) problem is, suck @ js. take classes on codecademy, being html / css / jquery. keep trying different things, keep failing. can me? html: <!doctype html> <html> <head> <link class="jsbin" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/base/jquery-ui.css" rel="stylesheet" type="text/css" /> <script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"> </script> <script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.

Git/Github, moving and properly updating a repo -

i moved git repo https://github.com/username/testrepo.git https://github.com/companyname/testrepo.git , need more work on gem. when go directory on local machine , type git remote -v still says origin https://github.com/username/testrepo.git . my question is, proper way me update remote new location , begin working again? first remove origin remote: git remote rm origin then rename this: git remote set-url origin git@github.com:companyname/testrepo.git source: how rename repository on github?

SQL Server: Update portion of Merge Statement not working -

i think i've been looking @ statement way long. can tell me why update portion of statement isn't updating? think testing or , != on columns, should invoke cause updates when needed--instead, seem have unintentionally created condition ..where update never needed! here 4 things know prior looking @ statement: 1. data in temp table #facilities populated current data multiple sources. data contains bot new ( insert ) , changed ( update ) data. 2. contents of #facilities has been verified contain data, prior executing merge statement. 3. insert portion of merge statement succeeds. 4. although update portion of statement not update changed data, statement not fail. merge phonemaster facilitymaster using #facilities facilitynew on facilitymaster.facilityid = facilitynew.facilityid , facilitymaster.siteid = facilitynew.siteid when matched , ( facilitymaster.user__bid != facilitynew.user__bid or facilitymaster.email__baddress != facilitynew

javascript - Rotating an image around a point of axis depending on browser width/height -

i'm trying put code take image pointing part of site , adjust based on users current browser width/height facing too. kind of pictures eyes follow round room, time painting pointing , goes , down depending on position. i assume job canvas if can point me in right direction, appreciated!

arrays - Python - comparing elements of list with 'neighbour' elements -

this may more of 'approach' or conceptual question. basically, have python multi-dimensional list so: my_list = [[0,1,1,1,0,1], [1,1,1,0,0,1], [1,1,0,0,0,1], [1,1,1,1,1,1]] what have iterate through array , compare each element directly surrounding though list layed out matrix. for instance, given first element of first row, my_list[0][0] , need know know value of my_list[0][1] , my_list[1][0] , my_list[1][1] . value of 'surrounding' elements determine how current element should operated on. of course element in heart of array, 8 comparisons necessary. now know iterate through array , compare indexed values, above. curious whether there more efficient way limited amount of iteration required? should iterate through array is, or iterate , compare values either side , transpose array , run again. this, ignore values diagonal. , should store results of element lookups, don't keep determining value of same element multiple times? i suspect may have fun

c# - Storage file to System uri? -

i have windows metro app written in c#. here code using pick file local music library: fileopenpicker openpicker = new fileopenpicker(); openpicker.viewmode = pickerviewmode.thumbnail; openpicker.suggestedstartlocation = pickerlocationid.musiclibrary; openpicker.filetypefilter.add(".mp3"); openpicker.filetypefilter.add(".wav"); storagefile file = await openpicker.picksinglefileasync(); if (file != null) { mymediaelement.source = file; //error here } else { //error here } it says storagefile cannot converted system.uri used change source of mediaelement. how make file became uri link? seems uri("...") accepts string of file location is. you have use file stream along setsource . how play local media file using mediaelement : var file = await openpicker.picksinglefileasync(); var stream = await file.openasync(windows.storage.fileaccessmode.read); mymediaelement.setsource(stream, file.contenttype);

My XPath expression does not select anything in Java -

i evaluating xpath expression in java , supposed return single string value in return. however, blank value. sscce import javax.xml.xpath.*; import java.io.*; import org.xml.sax.*; public class xpathbasic{ public static void main(string[] args){ xpathfactory factory; xpath xpath; xpathexpression xpathexpressioncompiled; string xpathexpressionstring; file xmlfile; inputsource inputsource; try{ factory = xpathfactory.newinstance(); xpath = factory.newxpath(); xpathexpressionstring = "/people/student[@scholarship='yes']/name"; xpathexpressioncompiled = xpath.compile(xpathexpressionstring); xmlfile = new file("helloworld.xml"); inputsource = new inputsource(new fileinputstream(xmlfile)); string name = xpathexpressioncompiled.evaluate(inputsource); if(name != null){ system.out