Posts

Showing posts from July, 2015

Echo of Soul: Huntress Quickdraw Build

Image
So, I've been playing this game for a month now. Currently I'm level 55 and my class is obviously a Huntress. Anyway, here's my build: SKILL BUILD I don't have plan on getting any skills from the last line. :D No hate on Sniper Stance though. I just want a quick and agile character. Skill Series The way I kill enemies(monsters) is the same with characters(PvP). Cast the Nervous Target skill to them (F7) Slow them down and decrease their defence; Stunning Shot   (1) Cast Nock Twice (2) to restore CP then Withering Arrow (skill trigger, probably Q or E ) to decrease more defence on the enemy Poison; Arsenic Arrow (3) As they approach you, cast Know Back; Suppressing Shot (4)  Lighten Quiver (5) then skill trigger; Bullseye Splitter If still alive, cast Violent Retreat  (F1) to stay away from the them Then cast Kill Shot (F2) Probably, that's how I play. :) And a simple tip in Battlefield: use Soul Skill (hotkey T) when dealin...

Overlaying Legend on Map

This is actually just a simple CSS manipulation, you need to create your legend using an image editor. This won't generate automatically based on your styling. Demo <!--HTML--> <div id="map"> <div id="infoi"> <img src="https://b3218a0dcf0f0481f4a486b8229300982d8fe048-www.googledrive.com/host/0B0JBx-GczUoYUExkeENEQWFDb00"/> </div> </div> /*CSS*/ #map { width: 500px; height: 500px; position: relative; background: #343434 } #infoi { width: 100px; height: 100px; position: absolute; bottom: 35px; left: 10px; } #infoi { z-index:10000; }

Get x-axis value in Highcharts

Demo In this example we get the corresponding latest x-axis value of the max data in a y-axis series in Highcharts. Here's the code below with comments: $(function () { $('#container').highcharts({ xAxis: { categories: ['a', 'b', 'c', 'd', 'e', 'f'] }, series: [{ data: [5, 16, 10, 3, 12, 16] }, { data: [11, 18, 15, 16, 18, 11] }] }); $("#click").click(function () { var chart = $("#container").highcharts(), series, i = 0, arr = [], myIndex = [], //change the index of the series that you like to get s = chart.series[1], max = s.dataMax, len = s.data.length; //getting the index with max value in y-axis for (var j = 0; j < len; j++) { arr[j] = s.data[j].y; if (arr[j] =...

Scribble

Just some random thoughts when I was sick written in a pad paper decided to wrote it here. Quote You read a quote You lived with it That's wrong! You read a quote You looked for the author Studied his life You read a quote You are relieved Why? You read a quote You approved Because it suits you ----------- My love for you is not that strong. I don't think it's not true. I don't think it's not real. But it's love. ------------- Note to Self: Take care of my heart (I'll change my way of meeting new people,) I'll save now. (I've been sick lately.) I will listen to my mother more. (She always takes good care of me.) Look for an ounce of confidence and drink it. Less internet usage after work. What's the point of seeing someone who doesn't want to be in a relationship? I do missed her. You know what's hard? It's accepting that you have been rejected by the person you loved. ...

Oh CORS!

Image
Cross-origin resource sharing (CORS) is a mechanism that allows restricted resources (e.g. fonts, JavaScript, etc.) on a web page to be requested from another domain outside the domain from which the resource originated. -Wikipedia Because I'm trying to get or access data from another site, I have encountered this error: “No 'Access-Control-Allow-Origin' header is present on the requested resource” After spending bunch of hours reading what really causes it, finally found a solution. HAHA CORS Anywhere is a NodeJS proxy which adds CORS headers to the proxied request. //this is to allow Cross-Origin Resource Sharing jQuery.ajaxPrefilter(function (options) { if (options.crossDomain && jQuery.support.cors) { options.url = 'https://cors-anywhere.herokuapp.com/' + options.url; } }); $.ajax({ url: <URL HERE>, dataType: 'json', type: "GET", success: function (e) { .... } .... URL wil...

Search Text in Paragraph using jQuery

Demo The code below highlight the words in the paragraph if it matches on the inputted keywords or text from the user. Gets the value from the text box Split if the words are separated by space Store the values in an array Pass those values in the function and use  RegExp  to evaluate If found, replaces the text with added span tag for the highlight. $.fn.wrapInTag = function (opts) { var words = opts.words || [], regex = RegExp(words.join('|'), 'gi'), replacement = '<span class="highlight">$&</span>'; return this.html(function () { return $(this).text().replace(regex, replacement); }); }; $('#terms').keyup(function () { var keywords = []; keywords = $(this).val().split(" "); $('p#text-body').wrapInTag({ words: keywords }); }); Demo