Posts

javascript - How to use HTML tags/Attributes in JSON file with Angular -

i have json file has html tags place in objects. possible use html attributes? js var app = angular.module('app', []); app.controller('mainctrl', function ($scope) { $scope.colors = [ { "color": "red", "value": "#f00", "message": "simple message" }, { "color": "green", "value": "#0f0", "message": "message <strong>html</strong> tags" }, { "color": "blue", "value": "#00f", "message": "am going work? should not!" }, { "color": "magenta", "value": "#f0f", "message": "<img src='https://c2.staticflickr.com/4/3684/1180...

php - Links with single/double quote or space are redirecting -

am testing on localhost, htaccess shown below: rewriteengine on rewriterule ^user/(.*)$ pages/user.php?u=$1 [nc,l] rewriterule ^bookmarks pages/bookmarks.php [qsa] if type 'localhost/project/bookmarks' or 'localhost/project/user/username' taken bookmark's page or user's page. if added characters '({[-,._' php dissect variable, if doesn't comply page's url accepted characters echo error. but when ' or " or space added, page redirect instead of processing '$_get' request. book'marks or bookma'rks redirecting https://www.google.com/search?q=localhost%2fproject%2fboo%27kmarks&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-us:official&client=firefox-a&channel=fflb how stop happening? this not .htaccess or php. firefox offering google's search services. there number of ways fix (in ff's about:config page) might best off typing http before localhost local urls. inste...

javascript - Moving content of canvas with a specific framerate -

so have sprite animation goes fine when it's not in movement (i need go on 20 fps max because if not animation fast), when try move across screen, movement looks choppy. ideas on how make movement smoothly? increase framerate works, i'd see if there option aside of that. var canvasa = document.createelement("canvas"); var canvasb = document.createelement("canvas"); var contexta = canvasa.getcontext("2d"); var contextb = canvasb.getcontext("2d"); canvasa.style.position = "absolute"; canvasb.style.position = "absolute"; var xpos = 0; var ypos = 0; var index = 0; var framesizex = 140; var framesizey = 395; var numframes = 20; var drawing_character = false; var xposition = 0; var now, then, elapsed, starttime, fps, fpsinterval; var fpscounter = setinterval(updatefps, 1000); var forw = true; var cfps = 0; // pictures var background = new image(); background.src = "http://i.imgur.com/3fdb45h.png"; var ch...

How end-user know whether the page is developed using semantic elements in HTML5? -

how end-user know whether page developed using semantic elements in html5? differences end-user can if use html5 semantic tags? ok valid question , don't haters downvoted it. here quick reminder: non-semantic elements : example div , span - tell nothing content. semantic elements : example form, table, , img - defines content. http://www.w3schools.com/html/html5_semantic_elements.asp for common user doesn't change see how displayed (the graphical result).but: for , people work on code better if have well-organized code semantic elements used correctly. accessibility : blind people , other people handicaps or diseases can't see , understand page display. have special navigators read them page quick summary based on h[1-6] elements ( basic example far more elaborated ). read http://www.clarissapeterson.com/2012/11/html5-accessibility/ more in-depth explanations on matter.

delphi - How to avoid TDateTime Data Rounding -

i writing column , cell classes fmx tgrid contain tcalendaredit , ttimeedit instances in every cell. works fine except proper processing of changes done in these child controls. type tfmtvalue<t> = record fieldvalue: t; modified: boolean; appended: boolean; deleted: boolean; end; tdatetimecell = class(tstyledcontrol) private fdate_time: tfmtvalue<tdatetime>; procedure setdatetime(const value: tfmtvalue<tdatetime>); function getdatetime: tfmtvalue<tdatetime>; protected procedure setdata(const value: tvalue); override; public property date_time: tfmtvalue<tdatetime> read getdatetime write setdatetime; ... end; ... function tdatetimecell.getdatetime: tfmtvalue<tdatetime>; begin fdate_time.modified := (fdate_time.modified) or (fdate_time.fieldvalue <> fcalendaredit.date + + ftimeedit.time); fdate_time.fieldvalue := fcalendared...

javascript - Initialize AMCharts on Button Click Event -

i using amcharts stock chart displaying details. have below code draw amchart. amcharts.ready(function () { generatechartdata(); createstockchart(); }); var chartdata1 = []; var chartdata2 = []; var chartdata3 = []; var chartdata4 = []; function generatechartdata() { var firstdate = new date("2013-01-01"); alert('1 :' + firstdate); firstdate.setdate(firstdate.getdate() - 1500); alert(firstdate); firstdate.sethours(0, 0, 0, 0); (var = 0; < 5; i++) { var newdate = new date(firstdate); newdate.setdate(newdate.getdate() + i); var a1 = math.round(math.random() * (40 + i)) + 100 + i; var b1 = math.round(math.random() * (1000 + i)) + 500 + * 2; var a2 = math.round(ma...

Basics of XML view in SAPUI5 -

i've been studying sapui5 framework time , used javascript views in applications. the question - there reasons why should prefer xml views on javascript, if should @ all? if there some, they? if want start trying write xml views, best place learn basic syntax , can find api reference controls created using xml? sapui5 api written use javascript. thanks. the reason use xml views because standard approach of fiori apps sap. creates situation developers have 1 approach. me easier readable. generally speaking see in mobile library xml views used while in desktop usage js still leading. on scn can find many similar questions. the library of examples can found in same api page under tab explored. perhaps using webide (which offers local) install can provide base start development using xml based views.