Selenium Conference London
October 7-8 2019
Remember the legend of the Pied Piper of Hamelin? He was known as the Rat-catcher. He played an enticing song on his pipe and the rats followed him mesmerised by his music. Who are the “rats” we want to control in Selenium? Mouse events and complex user gestures.
Unfortunately the mouse is often deaf and unresponsive to the code we play.
All of us can become like the The Pied Piper of Selenium and get those "rats" to dance to our tune.
Michelle will elaborate further on how we can achieve this and look at elementary mouse events and element attributes. She will look at how actions and interactions differ across programming languages, and in a variety of browsers and devices. Michelle will discuss the pros and cons of learning more about Javascript, and how executing JS can result in less painful scrolling, hovering and dragging. And a bit of chit-chat about using appropriate waits and sensible pauses when coding your interactions. The moral of the story. Keep your promises. Make those mouse simulations work.
Workshop JavaScript Testing. Frameworks. Client vs Server Testing. Jasmine. Chai. Nock. Sinon. Spec Runners: Karma. TDD. Code coverage. Building a testable JS app.
Presentado por ing: Raúl Delgado y Mario García
Selenium Conference London
October 7-8 2019
Remember the legend of the Pied Piper of Hamelin? He was known as the Rat-catcher. He played an enticing song on his pipe and the rats followed him mesmerised by his music. Who are the “rats” we want to control in Selenium? Mouse events and complex user gestures.
Unfortunately the mouse is often deaf and unresponsive to the code we play.
All of us can become like the The Pied Piper of Selenium and get those "rats" to dance to our tune.
Michelle will elaborate further on how we can achieve this and look at elementary mouse events and element attributes. She will look at how actions and interactions differ across programming languages, and in a variety of browsers and devices. Michelle will discuss the pros and cons of learning more about Javascript, and how executing JS can result in less painful scrolling, hovering and dragging. And a bit of chit-chat about using appropriate waits and sensible pauses when coding your interactions. The moral of the story. Keep your promises. Make those mouse simulations work.
Workshop JavaScript Testing. Frameworks. Client vs Server Testing. Jasmine. Chai. Nock. Sinon. Spec Runners: Karma. TDD. Code coverage. Building a testable JS app.
Presentado por ing: Raúl Delgado y Mario García
Dion Almaer & Ben Galbraith - Build Once, Deploy EverywhereCarsonified Team
The Web is becoming the common operating system across all devices, both mobile and desktop. In this talk Dion will explain the technology that you need to understand to make sure your app is ready for the next era where all web apps will need to be mobile. This is going to give web developers a HUGE advantage and opportunity to deploy their apps to multiple devices, and it's vital to understand what's coming down the pipeline. Dion will explain exactly that, and prepare you for what's coming. Exciting!
Reactive programming with RxJS - ByteConf 2018Tracy Lee
Reactive programming paradigms are all around us. So why does is it awesome? We'll explore reactive programming in standards, frameworks and libraries and talk about how to think reactively.
Then we'll take a more practical approach and talk about how to utilize reactive programming patterns with an abstraction like RxJS, a domain specific language for reacting to events and how using this abstraction can make your development life much easier in React Native.
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfPeter Spielvogel
Building better applications for business users with SAP Fiori.
• What is SAP Fiori and why it matters to you
• How a better user experience drives measurable business benefits
• How to get started with SAP Fiori today
• How SAP Fiori elements accelerates application development
• How SAP Build Code includes SAP Fiori tools and other generative artificial intelligence capabilities
• How SAP Fiori paves the way for using AI in SAP apps
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
A tale of scale & speed: How the US Navy is enabling software delivery from l...sonjaschweigert1
Rapid and secure feature delivery is a goal across every application team and every branch of the DoD. The Navy’s DevSecOps platform, Party Barge, has achieved:
- Reduction in onboarding time from 5 weeks to 1 day
- Improved developer experience and productivity through actionable findings and reduction of false positives
- Maintenance of superior security standards and inherent policy enforcement with Authorization to Operate (ATO)
Development teams can ship efficiently and ensure applications are cyber ready for Navy Authorizing Officials (AOs). In this webinar, Sigma Defense and Anchore will give attendees a look behind the scenes and demo secure pipeline automation and security artifacts that speed up application ATO and time to production.
We will cover:
- How to remove silos in DevSecOps
- How to build efficient development pipeline roles and component templates
- How to deliver security artifacts that matter for ATO’s (SBOMs, vulnerability reports, and policy evidence)
- How to streamline operations with automated policy checks on container images
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
Enhancing Performance with Globus and the Science DMZGlobus
ESnet has led the way in helping national facilities—and many other institutions in the research community—configure Science DMZs and troubleshoot network issues to maximize data transfer performance. In this talk we will present a summary of approaches and tips for getting the most out of your network infrastructure using Globus Connect Server.
Climate Impact of Software Testing at Nordic Testing DaysKari Kakkonen
My slides at Nordic Testing Days 6.6.2024
Climate impact / sustainability of software testing discussed on the talk. ICT and testing must carry their part of global responsibility to help with the climat warming. We can minimize the carbon footprint but we can also have a carbon handprint, a positive impact on the climate. Quality characteristics can be added with sustainability, and then measured continuously. Test environments can be used less, and in smaller scale and on demand. Test techniques can be used in optimizing or minimizing number of tests. Test automation can be used to speed up testing.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
In his public lecture, Christian Timmerer provides insights into the fascinating history of video streaming, starting from its humble beginnings before YouTube to the groundbreaking technologies that now dominate platforms like Netflix and ORF ON. Timmerer also presents provocative contributions of his own that have significantly influenced the industry. He concludes by looking at future challenges and invites the audience to join in a discussion.
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
KODE JS POKENNNNN
1. var buffer = document.createElement('canvas');
var bufferCtx = buffer.getContext('2d');
var bIsIPhone = false;
var bIsIPad = false;
var bWildBattleIsReady = false;
var bIsLoadingWildDialog = false;
var inventory = [];
var eggs = [];
if( navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPod/i) ) {
bIsIPhone = true;
rebindClicks();
} else if( navigator.userAgent.match(/iPad/i) ) {
bIsIPad = true;
rebindClicks();
}
var bMagnify = false;
//User Variables
var userID = '';
var userName = '';
var userSprite = '';
var userMoney = 0;
var userEvent = null;
var serverToken = '';
var userX = 0;
var userY = 0;
var userDirection = 0;
var userStepPart = 0;
var userStepX = 0;
var userStepY = 0;
//Rendering Variables
var bLoading = true;
var loadAction = "";
var tick = 0;
var ctx = null;
var cvsWidth = 0;
var cvsHeight = 0;
var tagAlong = "";
var tagAlongName = "";
var follower = null;
var captchaKeypress = new Array(false,false,false,false,false,false);
//Drawing Resources
2. var screenResources = new Array();
var ImageResourceLoadedCount = 0;
var ImageResourceTotalCount = 0;
function ResourceImage(src,key) {
this.img = new Image();
this.img.src = src;
this.url = src;
this.img.onload = loadedResource;
this.key = key;
ImageResourceTotalCount++;
return this;
}
//Audio Resources
var musicResources = new Array();
var MusicResourceLoadedCount = 0;
var MusicResourceTotalCount = 0;
function ResourceMusic(src,key) {
this.audio = null;
MusicResourceTotalCount++;
this.key = key;
this.src = src;
if(navigator.userAgent.toLowerCase().indexOf('firefox') > -1)
{
this.audio = new Audio();
this.audio.src = src;
this.audio.load();
}
return this;
}
var prevPlaying = "";
var prevPlayingSong = null;
var playOnceSong = null;
var soundEnabled = 0;
var musicEnabled = 0;
var effectResources = new Array();
var EffectResourceLoadedCount = 0;
var EffectResourceTotalCount = 0;
function ResourceEffect(src,key) {
this.audio = new Audio();
this.audio.src = src;
//this.audio.onload = loadedEffectResource;
this.audio.oncanplaythrough = loadedEffectResource;
//this.audio.load();
if(navigator.userAgent.toLowerCase().indexOf('firefox') > -1)
{
this.audio.load();
}
//this.audio.play();
//this.audio.pause();
this.audio.volume = 0.5;
3. this.key = key;
EffectResourceTotalCount++;
return this;
}
//Map Variables
var currentMap = null;
var mapName = '';
var mapCode = '';
var mapID = '';
var mapWidth = 0;
var mapHeight = 0;
var mapData = null;
var mapEvents = null;
var bMapDataLoaded = false;
var bMapEventsLoaded = false;
var mapLoadedCount = 0;
var rawMapData = null;
var mapAbove = new Image();
var mapBase = new Image();
mapAbove.onload = loadedMapImage;
mapBase.onload = loadedMapImage;
var stepsInGrass = 0;
var mapEventObjects = new Array();
//Map - runtime draw,centerMap functions
var mapLeft = 0;
var mapTop = 0;
//Charset Variables
var charsets = new Array();
var charsetLoadedCount = 0;
//Scripting Variables
var events = new Array();
var lastTriggeredEventName = "";
//User Interaction
var keyState = new Object;
keyState.up = false;
keyState.down = false;
keyState.left = false;
keyState.right = false;
keyState.btn1 = false;
keyState.btn2 = false;
keyState.btn3 = false;
var bMouseDown = false;
//###########################################################
//### SOCKET FUNCTIONS ############## Chat, Support Dialog
//###########################################################
4. //Sockets Variables
var foregnusers = new Array();
var ws = null;
var bConnected = false;
var updateTick = 0;
var messages = new Array();
function ChatMessage(isadmin,userid,username,message) {
this.isadmin = isadmin;
this.userid = userid;
this.username = username;
this.message = message;
return this;
}
function chatKeyPress(e){
e = e || event;
var unicode=e.keyCode? e.keyCode : e.charCode
if( unicode == 13 ) {
e.preventDefault();
if( document.getElementById("txtUpdate").value != "" ) {
ws.send("/msg^" + document.getElementById("txtUpdate").value +
"rnrn");
document.getElementById("txtUpdate").value = "";
return true;
}
}
return false;
}
function chatBoxIsActive() {
var curElement = document.activeElement;
if( document.getElementById("txtUpdate") == curElement ) {
return true;
}
return false;
}
function selectChatBox() {
if( bConnected ) {
var curElement = document.activeElement;
if( document.getElementById("txtUpdate") != curElement ) {
document.getElementById("txtUpdate").focus();
} /* else {
document.getElementById("txtUpdate").blur();
return true;
}*/
}
}
function showChatBox() {
if( bConnected ) {
5. document.getElementById("txtUpdate").value = "";
$("#mws-jui-dialog-post").dialog({
autoOpen: false,
title: "Chat Window",
modal: true,
width: "480",
buttons: []
});
$("#mws-jui-dialog-post").dialog("option", {modal:
false}).dialog("open");
document.getElementById("txtUpdate").focus();
}
}
function showUnsupportedMessage() {
var html = "<p>Some of the functionality needed to dsplay this page correctly
is missing from the browser you are using. You can continue to play but you will not
be able to see or chat to other players of the game.</p>";
document.getElementById("mws-jui-dialog-data").innerHTML = html;
$("#mws-jui-dialog-data").dialog({
autoOpen: false,
title: "Partial Functionality Support Notification",
modal: true,
width: "480",
buttons: []
});
$("#mws-jui-dialog-data").dialog("option", {modal: true}).dialog("open");
}
function rebindClicks(){
var userAgent = navigator.userAgent.toLowerCase();
var isIphone = (userAgent.indexOf('iphone') != -1) ? true : false;
if (isIphone) {
// For each event with an inline onclick
$('[onclick]').each(function() {
var onclick = $(this).attr('onclick');
$(this).removeAttr('onclick'); // Remove the onclick attribute
$(this).bind("click", preventClickEvent); // See to it that clicks never
happen
$(this).bind('tap', onclick); // Point taps to the onclick
});
}
}
function preventClickEvent(event) {
event.preventDefault();
}
30. battleUpdatedMenu();
}
}
/*
keyState.up = false;
keyState.down = false;
keyState.left = false;
keyState.right = false;
keyState.btn1 = false;
keyState.btn2 = false;
keyState.btn3 = false;
var left = $("#cvsGame").offset().left + $("#cvsGame").position().left;
var top = $("#cvsGame").offset().top + $("#cvsGame").position().top;
if( pos.x - left < 64 ) {
keyState.left = true;
} else if( pos.x - left > cvsWidth - 64 ) {
keyState.right = true;
} else if( pos.y - top < 64 ) {
keyState.up = true;
} else if( pos.y - top > cvsHeight - 64 ) {
keyState.down = true;
}
*/
}
//### MMO FUNCTIONS ###############
function displayMMOUser(user) {
var div = document.getElementById('mws-explore-trade-or-battle');
var html = "<center><b>" + user.name + "</b><br/>";
//html += '<input type="button" style="width:120px;" class="mws-tooltip-s
mws-button blue" value="Trade" title="Offer to Trade with this Player."><br/>';
html += '<input type="button" style="width:120px;" class="mws-tooltip-s
mws-button red" value="Battle" onclick="pvpRequest('' + user.name + '');"
title="Request a Battle with this Player."><br/>';
html += '<input type="button" style="width:120px;" class="mws-tooltip-s
mws-button green" value="PM" onclick="pmUser('' + user.name + '')" title="Send a
Private Message to this Player."><br/>';
html += "</center>";
div.innerHTML = html;
}
function pmUser(name) {
document.getElementById("txtUpdate").value = "/pm " + name + " ";
document.getElementById("txtUpdate").focus();
}
function pvpRequest(name) {
31. ws.send("/msg^/pvprequest " + name + "rnrn");
document.getElementById('mws-explore-trade-or-battle').innerHTML = "";
}
function pvpAccept(name) {
ws.send("/msg^/pvpaccept " + name + "rnrn");
document.getElementById("mws-explore-requests").innerHTML = "";
}
function pvpRequested(data) {
var dataRow = data.split("^");
document.getElementById("mws-explore-requests").innerHTML = '<div
style="padding:8px;"><b>'+dataRow[1]+'</b> wants to battle: <br/><center><input
type="button" style="width:120px;" class="mws-tooltip-s mws-button green"
value="Accept PvP" onclick="pvpAccept('' +dataRow[1]+ '')"
title="Accept"></center></div>';
}
var userCount = "?";
function serverPing(data) {
var dataRow = data.split("^");
userCount = parseInt(dataRow[1]);
}
function pvpLoadBattle(data) {
var dataRow = data.split("^");
battleRoundTacker = 0;
curOpp = null;
nextOpp = null;
curMon = null;
nextMon = null;
curMonImage.src = 'http://cache.pokemonlegends.com/images/blank.png';
curOppImage.src = 'http://cache.pokemonlegends.com/images/blank.png';
battleLoading = false;
//battle_id needs to be provided.
curOpp = null;
scriptAddLine("battlescreen","PVP");
//bInBattle = true; - this is set in the above script funciton
battleSelectedMenu = 2;
playSFX("battle");
playMusic("battle1");
if( prevPlayingSong )
prevPlayingSong.currentTime = 0;
bWildBattle = false;
wipeWildMonsterBox();
}
function updateChat(data) {
var dataRow = data.split("^");
var dataMsg = dataRow[1].split("|");
var isadmin = dataMsg[0];
var userids = dataMsg[1];
32. var user = dataMsg[2];
var msg = dataMsg[3];
var isPM = dataMsg[4];
var changeColor = true;
var title = "A Legend";
messages.push(new ChatMessage(isadmin,userids,user,msg));
var sender = mmoUserByName(user);
if( sender != null ) {
sender.msg = msg;
sender.msgTick = 0;
} else {
if( userids == userID ) {
userEvent.msg = msg;
userEvent.msgTick = 0;
}
}
if (msg.toLowerCase().indexOf(userName.toLowerCase()) > -1)
{
color = "#CE93D8";
changeColor = false;
}
if (changeColor) //if name is mentioned on a word, do not change unless it's
PM. PM is always in the special color.
{
var color = "#fff";
if( isadmin > 1 ) {
color = "#99FF99";
title = "Game Moderators";
}
else if ( isadmin == 1)
{
color = "#72C065";
title = "Chat Moderators";
}
if (isadmin > 2)
{
title = "Administrators";
}
if( userids == 0 ) {
color = "#FF9999";
}
if ( msg.toLowerCase().indexOf("pm to") > -1 &&
user.toLowerCase().indexOf("you") > -1) //pm sent msg
{
color = "#FFCC99";
}
}
if (isPM == 1)
{
33. color = "#FFCC99";
}
//sharks remove html tags from user input
msg = msg.replace(/<(?:.|n)*?>/gm, '');
var html = "<p data-username='"+user+"' onclick=quickPM(this)
style='color:"+color+";margin-bottom:2px;'><b>";
if (userids > 0)
{
html = html + "<a href='user?id="+userids+"' style='color:"+color+"'
target='_blank' title = '"+title+"'>";
}
html = html + user;
if (userids > 0)
{
html = html + "</a>";
}
html = html + ":</b> " + msg + "</p>";
$('#chat').append(html);
$('#chat')[0].scrollTop = $('#chat')[0].scrollHeight;
}
function quickPM(msg)
{
if (msg.getAttribute("data-username") != "You" )
document.getElementById("txtUpdate").value = "/pm
"+msg.getAttribute("data-username")+" ";
}
//### AUDIO FUNCTIONS ###############
function restoreLastSong() {
if( musicEnabled == false )
return;
if( prevPlayingSong )
prevPlayingSong.play();
}
function playMusicOnce(key) {
if( musicEnabled == false )
return;
var audio = musicResourceByKey(key);
if( audio ) {
if( prevPlayingSong )
prevPlayingSong.pause();
62. //TODO: Complete Event Collision Detection
return true;
}
return this;
}
function base64_decode (data) {
// Decodes string using MIME base64 algorithm
var b64 =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
+/=";
var o1, o2, o3, h1, h2, h3, h4, bits, i = 0,
ac = 0,
dec = "",
tmp_arr = [];
if (!data) {
return data;
}
data += '';
do { // unpack four hexets into three octets using index points in b64
h1 = b64.indexOf(data.charAt(i++));
h2 = b64.indexOf(data.charAt(i++));
h3 = b64.indexOf(data.charAt(i++));
h4 = b64.indexOf(data.charAt(i++));
bits = h1 << 18 | h2 << 12 | h3 << 6 | h4;
o1 = bits >> 16 & 0xff;
o2 = bits >> 8 & 0xff;
o3 = bits & 0xff;
if (h3 == 64) {
tmp_arr[ac++] = String.fromCharCode(o1);
} else if (h4 == 64) {
tmp_arr[ac++] = String.fromCharCode(o1, o2);
} else {
tmp_arr[ac++] = String.fromCharCode(o1, o2, o3);
}
} while (i < data.length);
dec = tmp_arr.join('');
//dec = this.utf8_decode(dec);
return dec;
}
String.prototype.trim = function() {
return this.replace(/^s+|s+$/g,"");
}
63. function stringToBytes ( str ) {
var ch, st, re = [];
for (var i = 0; i < str.length; i++ ) {
ch = str.charCodeAt(i); // get char
st = []; // set up "stack"
do {
st.push( ch & 0xFF ); // push byte to stack
ch = ch >> 8; // shift value down by 1 byte
}
while ( ch );
// add stack contents to result
// done because chars have "wrong" endianness
re = re.concat( st.reverse() );
}
// return an array of bytes
return re;
}
function getIntAt ( arr, offs ) {
if( arr[offs+0] == 0 && arr[offs+1] == 0 && arr[offs+2] == 0 && arr[offs+3] ==
0 ) {
return 0;
}
return 1;
return (arr[offs+0] << 24) +
(arr[offs+1] << 16) +
(arr[offs+2] << 8) +
arr[offs+3];
}
// ################################################
// ### BATTLE CLASS ###########################
// ################################################
//Battle Variables
var bInBattle = false;
var battleStage = 0;
var battleTaskQueue = new Array();
var teamMonsters = new Array();
var opponentMonsters = new Array();
var monSkills = new Array();
var battleItems = new Array();
var doingCaptcha = false;
var captchaImages = new Array();
var captchaKeys = new Array();
var curMon = null;
var curOpp = null;
64. var nextMon = null;
var nextOpp = null;
var battleScript = new Array();
var battleSelectedMenu = 0;
var battleItemSelectedMenu = 0;
var battleSwappedMonsters = false;
var battleTick1 = 0;
var battleTick2 = 0;
var battleTick3 = 0;
var battleLoading = false;
var loadExplore = false;
var drawMons = true;
var drawMyHp = true;
var drawOpHp = true;
var bWildBattle = false;
function addToCaptcha(letter) {
if( doingCaptcha ) {
if( captchaKeypress[parseInt(letter)-1]== false ) {
captchaKeys.push(letter);
if( captchaKeys.length == 3 ) {
$str = captchaKeys[0] + captchaKeys[1] + captchaKeys[2];
loadBattle("captcha=" + $str);
}
captchaKeypress[parseInt(letter)-1] = true;
}
}
}
function MonsterSkill(id,name) {
this.id = id;
this.name = name;
}
function BattleItem(id,name,file,qty) {
this.id = id;
this.name = name;
this.file = file;
this.qty = qty;
}
function
BattleMonsterLineup(id,name,level,special,specialName,gender,hpleft,hp,image,type1
,type2,reborn) {
this.id = id;
this.name = name;
this.level = level;
this.special = special;