What is the value of var me = this;

If your library is doing this in places where there are no embedded closures/callbacks that might have their own value of this, then this is just a “practice” or “style” or “convention” that they decided to follow in their methods. There is NO programming reason to always do it. In the specific coding example you … Read more

Call a function in an ExtJS XTemplate

Have a look at the XTemplate constructor API docs. There are lots of good examples there. Quoting: Anything between {[ … ]} is considered code to be executed in the scope of the template. So you should be able to do something like: ‘<img src={[this.getThumbUrl(rawThumbUrl)]} />’,

Flip horizontally html and css

Your fiddle already had the start of the answer – to do a second flip on the text. There was an extra , preventing the second rule from being parsed. I’ve updated the fiddle to include the heading elements, and set them to inline-block because inline elements can’t be transformed. .flip-horizontal, .x-grid-cell-inner, .x-column-header-text, .x-panel-header-text { … Read more

How can I automatically compress and minimize JavaScript files in an ASP.NET MVC app?

I personally think that keeping the files separate during development is invaluable and that during production is when something like this counts. So I modified my deployment script in order to do that above. I have a section that reads: <Target Name=”BeforeDeploy”> <ReadLinesFromFile File=”%(JsFile.Identity)”> <Output TaskParameter=”Lines” ItemName=”JsLines”/> </ReadLinesFromFile> <WriteLinesToFile File=”Scripts\all.js” Lines=”@(JsLines)” Overwrite=”true”/> <Exec Command=”java -jar … Read more

How to display binary data as image – extjs 4

Need to convert it in base64. JS have btoa() function for it. For example: var img = document.createElement(‘img’); img.src=”data:image/jpeg;base64,” + btoa(‘your-binary-data’); document.body.appendChild(img); But i think what your binary data in pastebin is invalid – the jpeg data must be ended on ‘ffd9’. Update: Need to write simple hex to base64 converter: function hexToBase64(str) { return … Read more

Listener for “date change” in FullCalendar?

Bill, I know this question is pretty much ancient, but I needed a solution and figured I’d post it here for others. I solved the problem myself by attaching the viewDisplay event to my calendar (this event was removed in v2 of FullCalendar, viewRender may be used instead). $(“#calendar”).fullCalendar({ viewDisplay: function (element) { } }); … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)